react-restyle-components 0.2.40 → 0.2.41
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/README.md +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/package.json +14 -4
- package/lib/src/core-components/atoms/button/Button.types.d.ts +1 -0
- package/lib/src/core-components/atoms/button/Button.types.d.ts.map +1 -0
- package/lib/src/core-components/atoms/button/button.component.d.ts +1 -0
- package/lib/src/core-components/atoms/button/button.component.d.ts.map +1 -0
- package/lib/src/core-components/atoms/button/button.component.js +3 -3
- package/lib/src/core-components/atoms/button/buttonGroup/buttonGroup.component.d.ts +2 -2
- package/lib/src/core-components/atoms/button/buttonGroup/buttonGroup.component.d.ts.map +1 -0
- package/lib/src/core-components/atoms/button/buttonGroup/buttonGroup.component.js +2 -2
- package/lib/src/core-components/atoms/check-box/checkBox.component.d.ts +2 -2
- package/lib/src/core-components/atoms/check-box/checkBox.component.d.ts.map +1 -0
- package/lib/src/core-components/atoms/check-box/checkBox.component.js +14 -13
- package/lib/src/core-components/atoms/date-picker/date-picker.component.d.ts +2 -2
- package/lib/src/core-components/atoms/date-picker/date-picker.component.d.ts.map +1 -0
- package/lib/src/core-components/atoms/date-picker/date-picker.component.js +4 -7
- package/lib/src/core-components/atoms/form/form.component.d.ts +8 -7
- package/lib/src/core-components/atoms/form/form.component.d.ts.map +1 -0
- package/lib/src/core-components/atoms/form/form.component.js +21 -55
- package/lib/src/core-components/atoms/grid/grid.component.d.ts +1 -0
- package/lib/src/core-components/atoms/grid/grid.component.d.ts.map +1 -0
- package/lib/src/core-components/atoms/grid/grid.component.js +2 -2
- package/lib/src/core-components/atoms/icons/icons.component.d.ts +2 -0
- package/lib/src/core-components/atoms/icons/icons.component.d.ts.map +1 -0
- package/lib/src/core-components/atoms/icons/icons.component.js +5 -6
- package/lib/src/core-components/atoms/input/input-otp.component.d.ts +1 -0
- package/lib/src/core-components/atoms/input/input-otp.component.d.ts.map +1 -0
- package/lib/src/core-components/atoms/input/input-otp.component.js +15 -15
- package/lib/src/core-components/atoms/input/input-pin.component.d.ts +1 -0
- package/lib/src/core-components/atoms/input/input-pin.component.d.ts.map +1 -0
- package/lib/src/core-components/atoms/input/input-pin.component.js +15 -20
- package/lib/src/core-components/atoms/input/input.component.d.ts +2 -2
- package/lib/src/core-components/atoms/input/input.component.d.ts.map +1 -0
- package/lib/src/core-components/atoms/input/input.component.js +6 -9
- package/lib/src/core-components/atoms/input-dropdown/input-dropdown.component.d.ts +2 -2
- package/lib/src/core-components/atoms/input-dropdown/input-dropdown.component.d.ts.map +1 -0
- package/lib/src/core-components/atoms/input-dropdown/input-dropdown.component.js +8 -14
- package/lib/src/core-components/atoms/list/list.component.d.ts +1 -0
- package/lib/src/core-components/atoms/list/list.component.d.ts.map +1 -0
- package/lib/src/core-components/atoms/list/list.component.js +2 -2
- package/lib/src/core-components/atoms/loader/loader.component.d.ts +3 -3
- package/lib/src/core-components/atoms/loader/loader.component.d.ts.map +1 -0
- package/lib/src/core-components/atoms/loader/loader.component.js +4 -18
- package/lib/src/core-components/atoms/pdf/pdf-images.components.d.ts +2 -2
- package/lib/src/core-components/atoms/pdf/pdf-images.components.d.ts.map +1 -0
- package/lib/src/core-components/atoms/pdf/pdf-images.components.js +3 -4
- package/lib/src/core-components/atoms/pdf/pdf-table.components.d.ts +2 -2
- package/lib/src/core-components/atoms/pdf/pdf-table.components.d.ts.map +1 -0
- package/lib/src/core-components/atoms/pdf/pdf-table.components.js +15 -23
- package/lib/src/core-components/atoms/pdf/pdf-typography.components.d.ts +7 -6
- package/lib/src/core-components/atoms/pdf/pdf-typography.components.d.ts.map +1 -0
- package/lib/src/core-components/atoms/pdf/pdf-typography.components.js +12 -12
- package/lib/src/core-components/atoms/pdf/pdf-wrapped-view.components.d.ts +6 -5
- package/lib/src/core-components/atoms/pdf/pdf-wrapped-view.components.d.ts.map +1 -0
- package/lib/src/core-components/atoms/pdf/pdf-wrapped-view.components.js +13 -13
- package/lib/src/core-components/atoms/radio/radio.component.d.ts +2 -2
- package/lib/src/core-components/atoms/radio/radio.component.d.ts.map +1 -0
- package/lib/src/core-components/atoms/radio/radio.component.js +12 -15
- package/lib/src/core-components/atoms/stepper/stepper.component.d.ts +2 -2
- package/lib/src/core-components/atoms/stepper/stepper.component.d.ts.map +1 -0
- package/lib/src/core-components/atoms/stepper/stepper.component.js +9 -15
- package/lib/src/core-components/atoms/tabs/tabs.component.d.ts +3 -2
- package/lib/src/core-components/atoms/tabs/tabs.component.d.ts.map +1 -0
- package/lib/src/core-components/atoms/tabs/tabs.component.js +8 -10
- package/lib/src/core-components/atoms/timer/timer.component.d.ts +1 -0
- package/lib/src/core-components/atoms/timer/timer.component.d.ts.map +1 -0
- package/lib/src/core-components/atoms/timer/timer.component.js +2 -7
- package/lib/src/core-components/atoms/tooltip/Tooltip.types.d.ts +1 -0
- package/lib/src/core-components/atoms/tooltip/Tooltip.types.d.ts.map +1 -0
- package/lib/src/core-components/atoms/tooltip/tooltip.component.d.ts +2 -1
- package/lib/src/core-components/atoms/tooltip/tooltip.component.d.ts.map +1 -0
- package/lib/src/core-components/atoms/tooltip/tooltip.component.js +2 -6
- package/lib/src/core-components/index.d.ts +1 -0
- package/lib/src/core-components/index.d.ts.map +1 -0
- package/lib/src/core-components/molecules/auto-complete-filter-multiple-select-multiple-fields-display/auto-complete-filter-multiple-select-multiple-fields-display.component.d.ts +2 -2
- package/lib/src/core-components/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/molecules/auto-complete-filter-multiple-select-multiple-fields-display/auto-complete-filter-multiple-select-multiple-fields-display.component.js +19 -29
- package/lib/src/core-components/molecules/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.component.d.ts +2 -2
- package/lib/src/core-components/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/molecules/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.component.js +29 -36
- package/lib/src/core-components/molecules/auto-complete-group-by/auto-complete-group-by.component.d.ts +2 -2
- package/lib/src/core-components/molecules/auto-complete-group-by/auto-complete-group-by.component.d.ts.map +1 -0
- package/lib/src/core-components/molecules/auto-complete-group-by/auto-complete-group-by.component.js +43 -51
- package/lib/src/core-components/molecules/autocomplete/autocomplete.d.ts +2 -2
- package/lib/src/core-components/molecules/autocomplete/autocomplete.d.ts.map +1 -0
- package/lib/src/core-components/molecules/autocomplete/autocomplete.js +12 -19
- package/lib/src/core-components/molecules/color-picker/color-picker.component.d.ts +2 -2
- package/lib/src/core-components/molecules/color-picker/color-picker.component.d.ts.map +1 -0
- package/lib/src/core-components/molecules/color-picker/color-picker.component.js +3 -5
- package/lib/src/core-components/molecules/color-picker-modal/color-picker-modal.component.d.ts +2 -2
- package/lib/src/core-components/molecules/color-picker-modal/color-picker-modal.component.d.ts.map +1 -0
- package/lib/src/core-components/molecules/color-picker-modal/color-picker-modal.component.js +3 -10
- package/lib/src/core-components/molecules/css-multiline-input/css-multiline-input.component.d.ts +2 -2
- package/lib/src/core-components/molecules/css-multiline-input/css-multiline-input.component.d.ts.map +1 -0
- package/lib/src/core-components/molecules/css-multiline-input/css-multiline-input.component.js +29 -36
- package/lib/src/core-components/molecules/css-multiline-input/css-properties.d.ts +1 -0
- package/lib/src/core-components/molecules/css-multiline-input/css-properties.d.ts.map +1 -0
- package/lib/src/core-components/molecules/modal-confirm/modal-confirm.component.d.ts +2 -2
- package/lib/src/core-components/molecules/modal-confirm/modal-confirm.component.d.ts.map +1 -0
- package/lib/src/core-components/molecules/modal-confirm/modal-confirm.component.js +11 -25
- package/lib/src/core-components/molecules/multi-select/multi-select.component.d.ts +2 -2
- package/lib/src/core-components/molecules/multi-select/multi-select.component.d.ts.map +1 -0
- package/lib/src/core-components/molecules/multi-select/multi-select.component.js +22 -28
- package/lib/src/core-components/molecules/multi-select-with-field/multi-select-with-field.component.d.ts +2 -2
- package/lib/src/core-components/molecules/multi-select-with-field/multi-select-with-field.component.d.ts.map +1 -0
- package/lib/src/core-components/molecules/multi-select-with-field/multi-select-with-field.component.js +29 -34
- package/lib/src/core-utils/index.d.ts +1 -0
- package/lib/src/core-utils/index.d.ts.map +1 -0
- package/lib/src/core-utils/utility.util.d.ts +1 -0
- package/lib/src/core-utils/utility.util.d.ts.map +1 -0
- package/lib/src/hooks/index.d.ts +1 -0
- package/lib/src/hooks/index.d.ts.map +1 -0
- package/lib/src/hooks/outside.hook.d.ts +1 -0
- package/lib/src/hooks/outside.hook.d.ts.map +1 -0
- package/lib/src/library/assets/svg/index.d.ts +9 -8
- package/lib/src/library/assets/svg/index.d.ts.map +1 -0
- package/lib/src/library/assets/svg/index.js +8 -8
- package/lib/src/tc.module.css +1592 -208
- package/package.json +14 -4
- package/lib/src/App.css +0 -45
- package/lib/src/App.d.ts +0 -4
- package/lib/src/App.js +0 -13
- package/lib/src/__mocks__/styleMock.d.ts +0 -1
- package/lib/src/__mocks__/styleMock.js +0 -1
- package/lib/src/assets/styles/colors.css +0 -217
- package/lib/src/assets/styles/decorations.css +0 -15
- package/lib/src/assets/styles/fontface.css +0 -17
- package/lib/src/assets/styles/scrollbars.css +0 -70
- package/lib/src/assets/styles/typography.css +0 -3
- package/lib/src/core-components/atoms/button/Button.stories.d.ts +0 -300
- package/lib/src/core-components/atoms/button/Button.stories.js +0 -24
- package/lib/src/core-components/atoms/button/Button.test.d.ts +0 -1
- package/lib/src/core-components/atoms/button/Button.test.js +0 -31
- package/lib/src/core-components/atoms/button/_button.component.d.ts +0 -7
- package/lib/src/core-components/atoms/button/_button.component.js +0 -20
- package/lib/src/core-components/atoms/button/buttonGroup/ButtonGroup.stories.d.ts +0 -28
- package/lib/src/core-components/atoms/button/buttonGroup/ButtonGroup.stories.js +0 -34
- package/lib/src/core-components/atoms/check-box/checkBox.stories.d.ts +0 -6
- package/lib/src/core-components/atoms/check-box/checkBox.stories.js +0 -23
- package/lib/src/core-components/atoms/date-picker/date-picker.stories.d.ts +0 -6
- package/lib/src/core-components/atoms/date-picker/date-picker.stories.js +0 -18
- package/lib/src/core-components/atoms/grid/grid.component.spec.d.ts +0 -1
- package/lib/src/core-components/atoms/grid/grid.component.spec.js +0 -9
- package/lib/src/core-components/atoms/grid/grid.stories.d.ts +0 -6
- package/lib/src/core-components/atoms/grid/grid.stories.js +0 -20
- package/lib/src/core-components/atoms/icons/icons.stories.d.ts +0 -6
- package/lib/src/core-components/atoms/icons/icons.stories.js +0 -19
- package/lib/src/core-components/atoms/input/input-otp.styles.css +0 -35
- package/lib/src/core-components/atoms/input/input-pin.stories.d.ts +0 -6
- package/lib/src/core-components/atoms/input/input-pin.stories.js +0 -20
- package/lib/src/core-components/atoms/input/input.stories.d.ts +0 -6
- package/lib/src/core-components/atoms/input/input.stories.js +0 -21
- package/lib/src/core-components/atoms/input/input.styles.css +0 -35
- package/lib/src/core-components/atoms/input-dropdown/input-dropdown.stories.d.ts +0 -6
- package/lib/src/core-components/atoms/input-dropdown/input-dropdown.stories.js +0 -17
- package/lib/src/core-components/atoms/list/list.component.spec.d.ts +0 -1
- package/lib/src/core-components/atoms/list/list.component.spec.js +0 -9
- package/lib/src/core-components/atoms/list/list.stories.d.ts +0 -6
- package/lib/src/core-components/atoms/list/list.stories.js +0 -20
- package/lib/src/core-components/atoms/loader/loader.stories.d.ts +0 -6
- package/lib/src/core-components/atoms/loader/loader.stories.js +0 -13
- package/lib/src/core-components/atoms/radio/radio.stories.d.ts +0 -6
- package/lib/src/core-components/atoms/radio/radio.stories.js +0 -22
- package/lib/src/core-components/atoms/stepper/stepper.stories.d.ts +0 -6
- package/lib/src/core-components/atoms/stepper/stepper.stories.js +0 -18
- package/lib/src/core-components/atoms/tabs/_tabs.component.d.ts +0 -16
- package/lib/src/core-components/atoms/tabs/_tabs.component.js +0 -19
- package/lib/src/core-components/atoms/tabs/tabs.module.css +0 -238
- package/lib/src/core-components/atoms/tabs/tabs.stories.d.ts +0 -6
- package/lib/src/core-components/atoms/tabs/tabs.stories.js +0 -29
- package/lib/src/core-components/atoms/tooltip/Tooltip.stories.d.ts +0 -30
- package/lib/src/core-components/atoms/tooltip/Tooltip.stories.js +0 -83
- package/lib/src/core-components/molecules/auto-complete-filter-multiple-select-multiple-fields-display/auto-complete-filter-multiple-select-multiple-fields-display.stories.d.ts +0 -6
- package/lib/src/core-components/molecules/auto-complete-filter-multiple-select-multiple-fields-display/auto-complete-filter-multiple-select-multiple-fields-display.stories.js +0 -45
- package/lib/src/core-components/molecules/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.stories.d.ts +0 -6
- package/lib/src/core-components/molecules/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.stories.js +0 -25
- package/lib/src/core-components/molecules/auto-complete-group-by/auto-complete-group-by.component.test.d.ts +0 -1
- package/lib/src/core-components/molecules/auto-complete-group-by/auto-complete-group-by.component.test.js +0 -9
- package/lib/src/core-components/molecules/auto-complete-group-by/auto-complete-group-by.stories.d.ts +0 -6
- package/lib/src/core-components/molecules/auto-complete-group-by/auto-complete-group-by.stories.js +0 -35
- package/lib/src/core-components/molecules/autocomplete/autocomplete.css +0 -37
- package/lib/src/core-components/molecules/autocomplete/autocomplete.spec.d.ts +0 -1
- package/lib/src/core-components/molecules/autocomplete/autocomplete.spec.js +0 -79
- package/lib/src/core-components/molecules/autocomplete/autocomplete.stories.d.ts +0 -6
- package/lib/src/core-components/molecules/autocomplete/autocomplete.stories.js +0 -17
- package/lib/src/core-components/molecules/color-picker/color-picker.css +0 -24
- package/lib/src/core-components/molecules/color-picker/color-picker.spec.d.ts +0 -1
- package/lib/src/core-components/molecules/color-picker/color-picker.spec.js +0 -7
- package/lib/src/core-components/molecules/color-picker/color-picker.stories.d.ts +0 -6
- package/lib/src/core-components/molecules/color-picker/color-picker.stories.js +0 -18
- package/lib/src/core-components/molecules/color-picker-modal/color-picker-modal.css +0 -24
- package/lib/src/core-components/molecules/color-picker-modal/color-picker-modal.spec.d.ts +0 -1
- package/lib/src/core-components/molecules/color-picker-modal/color-picker-modal.spec.js +0 -7
- package/lib/src/core-components/molecules/color-picker-modal/color-picker-modal.stories.d.ts +0 -6
- package/lib/src/core-components/molecules/color-picker-modal/color-picker-modal.stories.js +0 -18
- package/lib/src/core-components/molecules/css-multiline-input/css-multiline-input.stories.d.ts +0 -6
- package/lib/src/core-components/molecules/css-multiline-input/css-multiline-input.stories.js +0 -13
- package/lib/src/core-components/molecules/modal-confirm/modal-confirm.stories.d.ts +0 -6
- package/lib/src/core-components/molecules/modal-confirm/modal-confirm.stories.js +0 -20
- package/lib/src/core-components/molecules/multi-select/multi-select.stories.d.ts +0 -6
- package/lib/src/core-components/molecules/multi-select/multi-select.stories.js +0 -19
- package/lib/src/core-components/molecules/multi-select-with-field/multi-select-with-field.stories.d.ts +0 -6
- package/lib/src/core-components/molecules/multi-select-with-field/multi-select-with-field.stories.js +0 -20
- package/lib/src/index.css +0 -110
- package/lib/src/index.d.ts +0 -1
- package/lib/src/index.js +0 -12
- package/lib/src/reportWebVitals.d.ts +0 -3
- package/lib/src/reportWebVitals.js +0 -12
- package/lib/src/setupTests.d.ts +0 -1
- package/lib/src/setupTests.js +0 -5
- /package/lib/src/library/assets/svg/{checkedBox.svg → CheckedBox.svg} +0 -0
- /package/lib/src/library/assets/svg/{unCheckbox.svg → UnCheckbox.svg} +0 -0
package/README.md
CHANGED
package/lib/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AACA,cAAc,uBAAuB,CAAC"}
|
package/lib/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-restyle-components",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.40",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Easy use restyle components",
|
|
6
6
|
"author": {
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
],
|
|
17
17
|
"scripts": {
|
|
18
18
|
"start": "serve -s ./build",
|
|
19
|
-
"dev": "DISABLE_ESLINT_PLUGIN=true craco start",
|
|
20
19
|
"serve-webapp": "craco build && craco start",
|
|
20
|
+
"dev": "DISABLE_ESLINT_PLUGIN=true craco start",
|
|
21
21
|
"build": "rm -rf ./lib && tsc && chmod +x npm-publish.sh && sh ./npm-publish.sh",
|
|
22
22
|
"eject": "react-scripts eject",
|
|
23
23
|
"precommit": "lint-staged --allow-empty",
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
"@mui/material": "^5.15.19",
|
|
42
42
|
"@radix-ui/react-tooltip": "^1.1.5",
|
|
43
43
|
"@react-pdf/renderer": "^4.1.4",
|
|
44
|
+
"@storybook/addon-styling-webpack": "^1.0.1",
|
|
44
45
|
"@testing-library/jest-dom": "^5.17.0",
|
|
45
46
|
"@testing-library/user-event": "^13.5.0",
|
|
46
47
|
"@types/jest": "^27.5.2",
|
|
@@ -76,6 +77,7 @@
|
|
|
76
77
|
"@storybook/addon-webpack5-compiler-swc": "^1.0.2",
|
|
77
78
|
"@storybook/blocks": "^8.0.6",
|
|
78
79
|
"@storybook/react": "^8.0.6",
|
|
80
|
+
"@storybook/react-vite": "^8.4.7",
|
|
79
81
|
"@storybook/react-webpack5": "^8.0.6",
|
|
80
82
|
"@storybook/test": "^8.0.6",
|
|
81
83
|
"@svgr/webpack": "^8.1.0",
|
|
@@ -87,6 +89,7 @@
|
|
|
87
89
|
"copyfiles": "^2.4.1",
|
|
88
90
|
"craco-alias": "^3.0.1",
|
|
89
91
|
"css-loader": "^7.1.2",
|
|
92
|
+
"@vitejs/plugin-react": "^4.2.1",
|
|
90
93
|
"eslint": "^9.14.0",
|
|
91
94
|
"eslint-plugin-storybook": "^0.8.0",
|
|
92
95
|
"gh-pages": "^3.2.3",
|
|
@@ -103,9 +106,16 @@
|
|
|
103
106
|
"style-loader": "^4.0.0",
|
|
104
107
|
"tailwindcss": "^3.4.14",
|
|
105
108
|
"ts-jest": "^29.2.5",
|
|
109
|
+
"webpack": "^5.72.0",
|
|
110
|
+
"vite": "^5.0.11",
|
|
111
|
+
"vite-plugin-css-injected-by-js": "^3.1.1",
|
|
112
|
+
"vite-plugin-dts": "^2.3.0",
|
|
113
|
+
"vite-plugin-eslint": "^1.8.1",
|
|
114
|
+
"vite-plugin-static-copy": "^1.0.0",
|
|
115
|
+
"vite-plugin-svgr": "^4.2.0",
|
|
116
|
+
"vite-tsconfig-paths": "^4.2.0",
|
|
106
117
|
"vitest": "^0.31.4",
|
|
107
|
-
"vitest-dom": "^0.1.0"
|
|
108
|
-
"webpack": "^5.72.0"
|
|
118
|
+
"vitest-dom": "^0.1.0"
|
|
109
119
|
},
|
|
110
120
|
"eslintConfig": {
|
|
111
121
|
"extends": [
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.types.d.ts","sourceRoot":"","sources":["../../../../../src/core-components/atoms/button/Button.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,yBAAyB,EAAE,aAAa,EAAC,MAAM,OAAO,CAAC;AAC/D,OAAO,EAAC,SAAS,EAAC,MAAM,kBAAkB,CAAC;AAE3C,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B,+BAA+B;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,GAAG;IAC3D,6CAA6C;IAC7C,EAAE,EAAE,MAAM,CAAC;IACX,0CAA0C;IAC1C,SAAS,EAAE,yBAAyB,CAClC,SAAS,GAAG,aAAa,CAAC,iBAAiB,CAAC,CAC7C,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,GAAG;IAC7D,8DAA8D;IAC9D,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gEAAgE;IAChE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,yFAAyF;IACzF,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,kDAAkD;IAClD,OAAO,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;CAC9B,CAAC"}
|
|
@@ -4,3 +4,4 @@ import { ButtonProps } from './Button.types';
|
|
|
4
4
|
* It's a `<button>button</button>`. Pass in regular button props such as onClick as well as any of the props defined here.
|
|
5
5
|
*/
|
|
6
6
|
export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
//# sourceMappingURL=button.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.component.d.ts","sourceRoot":"","sources":["../../../../../src/core-components/atoms/button/button.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAI3C;;GAEG;AACH,eAAO,MAAM,MAAM,uIA0DlB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
3
|
import { Tooltip } from '../tooltip/tooltip.component';
|
|
4
4
|
import s from '../../../tc.module.css';
|
|
@@ -10,9 +10,9 @@ export const Button = forwardRef(({ variant = 'solid', tooltip, disabled = false
|
|
|
10
10
|
const buttonColorClass = variant === 'solid'
|
|
11
11
|
? cn(s['text-white'], s['bg-[#007BFF]'], s['hover:bg-[#007BFF]'], s['hover:shadow-lg'], s['text-white'])
|
|
12
12
|
: cn(s['dark:text-white'], s['text-black'], s['border'], s['border-gray-400'], s['hover:shadow-lg']);
|
|
13
|
-
const button = (
|
|
13
|
+
const button = (_jsx("button", { ref: ref, ...args, className: cn(s['rounded-100px'], s['px-3'], s['py-1'], s['text-md'], buttonColorClass, s['pt-2'], s['pb-2'], s['font-nunitoSansRegular'], disabled ? s['opacity-50'] : s['opacity-100'], className), type: type, disabled: disabled, children: children }));
|
|
14
14
|
if (tooltip) {
|
|
15
|
-
return
|
|
15
|
+
return _jsx(Tooltip, { content: tooltip, children: button });
|
|
16
16
|
}
|
|
17
17
|
else {
|
|
18
18
|
return button;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { ReactNode } from 'react';
|
|
3
2
|
import '../../../../tc.module.css';
|
|
4
3
|
export declare const ButtonGroup: ({ children, orientation, className, }: {
|
|
5
4
|
children: ReactNode;
|
|
6
5
|
orientation?: "horizontal" | "vertical" | undefined;
|
|
7
6
|
className?: string | undefined;
|
|
8
|
-
}) =>
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=buttonGroup.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buttonGroup.component.d.ts","sourceRoot":"","sources":["../../../../../../src/core-components/atoms/button/buttonGroup/buttonGroup.component.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAChC,OAAO,2BAA2B,CAAC;AAEnC,eAAO,MAAM,WAAW;cAKZ,SAAS;;;6CASpB,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import '../../../../tc.module.css';
|
|
3
|
-
export const ButtonGroup = ({ children, orientation = 'horizontal', className, }) => (
|
|
3
|
+
export const ButtonGroup = ({ children, orientation = 'horizontal', className, }) => (_jsx("div", { className: `flex ${orientation == 'horizontal' ? 'flex-row' : 'flex-col'} w-fit gap-2 ${className}`, children: children }));
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import '../../../tc.module.css';
|
|
3
2
|
interface CheckBoxProps {
|
|
4
3
|
title: string;
|
|
@@ -7,5 +6,6 @@ interface CheckBoxProps {
|
|
|
7
6
|
disable?: boolean;
|
|
8
7
|
onChange: (items: any) => void;
|
|
9
8
|
}
|
|
10
|
-
export declare const CheckBox: ({ title, data, className, onChange, }: CheckBoxProps) =>
|
|
9
|
+
export declare const CheckBox: ({ title, data, className, onChange, }: CheckBoxProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
10
|
export {};
|
|
11
|
+
//# sourceMappingURL=checkBox.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkBox.component.d.ts","sourceRoot":"","sources":["../../../../../src/core-components/atoms/check-box/checkBox.component.tsx"],"names":[],"mappings":"AACA,OAAO,wBAAwB,CAAC;AAMhC,UAAU,aAAa;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;CAChC;AAED,eAAO,MAAM,QAAQ,0CAKlB,aAAa,4CAqCf,CAAC"}
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
2
3
|
import '../../../tc.module.css';
|
|
3
4
|
import { UnCheckbox, CheckedBox } from '../../../library/assets/svg';
|
|
5
|
+
// import UnCheckbox from '../../../library/assets/svg/UnCheckbox.svg?react';
|
|
6
|
+
// import CheckedBox from '../../../library/assets/svg/CheckedBox.svg?react';
|
|
4
7
|
import { InputWrapper } from '../form/form.component';
|
|
5
8
|
export const CheckBox = ({ title = 'Banks', data = [{ title: 'SBI Bank', checked: false }], className, onChange, }) => {
|
|
6
9
|
const [list, setList] = useState(data);
|
|
7
10
|
const width = 20;
|
|
8
|
-
return (
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
React.createElement("div", { className: "flex mt-1" }, item.checked ? (React.createElement(CheckedBox, { width: width, height: width, fill: "#E7503D", stroke: "E7503D" })) : (React.createElement(UnCheckbox, { width: width, height: width }))),
|
|
19
|
-
React.createElement("span", null, item?.title))))));
|
|
11
|
+
return (_jsx(InputWrapper, { label: title, children: list?.map((item, index) => (_jsxs("div", { className: `${className} flex flex-row items-center `, onClick: () => {
|
|
12
|
+
const result = list?.map((e, i) => {
|
|
13
|
+
if (i === index)
|
|
14
|
+
return { ...e, checked: !item.checked };
|
|
15
|
+
else
|
|
16
|
+
return { ...e };
|
|
17
|
+
});
|
|
18
|
+
setList(result);
|
|
19
|
+
onChange(result?.filter((item) => item.checked));
|
|
20
|
+
}, children: [_jsx("div", { className: "flex mt-1", children: item.checked ? (_jsx(CheckedBox, { width: width, height: width, fill: "#E7503D", stroke: "E7503D" })) : (_jsx(UnCheckbox, { width: width, height: width })) }), _jsx("span", { children: item?.title })] }, index))) }));
|
|
20
21
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import '../../../tc.module.css';
|
|
3
2
|
import 'react-datepicker/dist/react-datepicker.css';
|
|
4
3
|
interface DatePickerProps {
|
|
@@ -9,5 +8,6 @@ interface DatePickerProps {
|
|
|
9
8
|
showFormat?: string;
|
|
10
9
|
placeholder?: string;
|
|
11
10
|
}
|
|
12
|
-
export declare const DatePickerComp: ({ title, className, disable, value, showFormat, placeholder, }: DatePickerProps) =>
|
|
11
|
+
export declare const DatePickerComp: ({ title, className, disable, value, showFormat, placeholder, }: DatePickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
12
|
export {};
|
|
13
|
+
//# sourceMappingURL=date-picker.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-picker.component.d.ts","sourceRoot":"","sources":["../../../../../src/core-components/atoms/date-picker/date-picker.component.tsx"],"names":[],"mappings":"AACA,OAAO,wBAAwB,CAAC;AAEhC,OAAO,4CAA4C,CAAC;AAKpD,UAAU,eAAe;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,cAAc,mEAOxB,eAAe,4CAoCjB,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState, forwardRef } from 'react';
|
|
2
3
|
import '../../../tc.module.css';
|
|
3
4
|
import DatePicker from 'react-datepicker';
|
|
4
5
|
import 'react-datepicker/dist/react-datepicker.css';
|
|
@@ -8,15 +9,11 @@ import { InputWrapper } from '../form/form.component';
|
|
|
8
9
|
export const DatePickerComp = ({ title = 'Title', className, disable, value, showFormat = 'yyyy-MM-dd', placeholder = 'Select Date', }) => {
|
|
9
10
|
const [pickedDate, setPickedDate] = useState(value && dayjs(value).toDate());
|
|
10
11
|
const CustomInput = forwardRef((props, ref) => {
|
|
11
|
-
return (
|
|
12
|
-
React.createElement("label", { className: "mr-3 font-arimaRegular text-primaryCharcoal text-lg" }, props.value || props.placeholder),
|
|
13
|
-
React.createElement(DatePickerSvg, { width: 15, height: 15 })));
|
|
12
|
+
return (_jsxs("div", { onClick: !disable && props.onClick, ref: ref, className: " border-gray-light place-items-center border rounded-md px-2 flex ", children: [_jsx("label", { className: "mr-3 font-arimaRegular text-primaryCharcoal text-lg", children: props.value || props.placeholder }), _jsx(DatePickerSvg, { width: 15, height: 15 })] }));
|
|
14
13
|
});
|
|
15
14
|
CustomInput.displayName = 'CustomInput';
|
|
16
15
|
const handleChanges = (date) => {
|
|
17
16
|
setPickedDate(date);
|
|
18
17
|
};
|
|
19
|
-
return (
|
|
20
|
-
React.createElement("div", { className: `${className} flex zIndex-999` },
|
|
21
|
-
React.createElement(DatePicker, { selected: pickedDate || new Date(), dateFormat: showFormat, placeholder: placeholder, onChange: handleChanges, customInput: React.createElement(CustomInput, null) }))));
|
|
18
|
+
return (_jsx(InputWrapper, { label: title, children: _jsx("div", { className: `${className} flex zIndex-999`, children: _jsx(DatePicker, { selected: pickedDate || new Date(), dateFormat: showFormat, placeholder: placeholder, onChange: handleChanges, customInput: _jsx(CustomInput, {}) }) }) }));
|
|
22
19
|
};
|
|
@@ -45,7 +45,7 @@ export declare const Input: React.ForwardRefExoticComponent<Omit<InputProps, "re
|
|
|
45
45
|
export declare const InputPassword: React.ForwardRefExoticComponent<Omit<InputProps, "ref"> & React.RefAttributes<any>>;
|
|
46
46
|
export declare const Input1: React.ForwardRefExoticComponent<Omit<InputProps, "ref"> & React.RefAttributes<any>>;
|
|
47
47
|
export declare const Input2: React.ForwardRefExoticComponent<Omit<InputProps, "ref"> & React.RefAttributes<any>>;
|
|
48
|
-
export declare const MultilineInput: (props: InputProps) =>
|
|
48
|
+
export declare const MultilineInput: (props: InputProps) => import("react/jsx-runtime").JSX.Element;
|
|
49
49
|
interface InputRadioProps extends InputWrapperProps {
|
|
50
50
|
values?: any[];
|
|
51
51
|
value?: string;
|
|
@@ -55,7 +55,7 @@ interface InputRadioProps extends InputWrapperProps {
|
|
|
55
55
|
labelStyle?: any;
|
|
56
56
|
onChange?: (e: any) => void;
|
|
57
57
|
}
|
|
58
|
-
export declare const InputRadio: (props: InputRadioProps) =>
|
|
58
|
+
export declare const InputRadio: (props: InputRadioProps) => import("react/jsx-runtime").JSX.Element;
|
|
59
59
|
interface InputDateProps extends InputWrapperProps {
|
|
60
60
|
value?: any;
|
|
61
61
|
name?: string;
|
|
@@ -71,8 +71,8 @@ interface InputDateProps extends InputWrapperProps {
|
|
|
71
71
|
onCalendarToggle?: (status: boolean) => void;
|
|
72
72
|
onFocusRemove?: (date: any) => void;
|
|
73
73
|
}
|
|
74
|
-
export declare const InputDate: ({ name, value, placeholder, use12Hours, label, id, hasError, disabled, format, onChange, onFocusRemove, }: InputDateProps) =>
|
|
75
|
-
export declare const CheckBox: (props: any) =>
|
|
74
|
+
export declare const InputDate: ({ name, value, placeholder, use12Hours, label, id, hasError, disabled, format, onChange, onFocusRemove, }: InputDateProps) => import("react/jsx-runtime").JSX.Element;
|
|
75
|
+
export declare const CheckBox: (props: any) => import("react/jsx-runtime").JSX.Element;
|
|
76
76
|
interface InputFileProps extends InputWrapperProps {
|
|
77
77
|
value?: any;
|
|
78
78
|
name?: string;
|
|
@@ -83,7 +83,7 @@ interface InputFileProps extends InputWrapperProps {
|
|
|
83
83
|
hasError?: boolean;
|
|
84
84
|
onChange?: (e: any) => void;
|
|
85
85
|
}
|
|
86
|
-
export declare const InputFile: (props: InputFileProps) =>
|
|
86
|
+
export declare const InputFile: (props: InputFileProps) => import("react/jsx-runtime").JSX.Element;
|
|
87
87
|
interface ToggleProps extends InputWrapperProps {
|
|
88
88
|
disabled?: boolean;
|
|
89
89
|
isToggleLabel?: boolean;
|
|
@@ -95,6 +95,7 @@ interface ToggleProps extends InputWrapperProps {
|
|
|
95
95
|
onChange?: (e: boolean) => void;
|
|
96
96
|
style?: any;
|
|
97
97
|
}
|
|
98
|
-
export declare const Toggle: (props: ToggleProps) =>
|
|
99
|
-
export declare const DeliveryScheduleToggle: (props: ToggleProps) =>
|
|
98
|
+
export declare const Toggle: (props: ToggleProps) => import("react/jsx-runtime").JSX.Element;
|
|
99
|
+
export declare const DeliveryScheduleToggle: (props: ToggleProps) => import("react/jsx-runtime").JSX.Element;
|
|
100
100
|
export {};
|
|
101
|
+
//# sourceMappingURL=form.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form.component.d.ts","sourceRoot":"","sources":["../../../../../src/core-components/atoms/form/form.component.tsx"],"names":[],"mappings":"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"}
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import React, { useState, useEffect } from 'react';
|
|
2
3
|
import classNames from 'classnames';
|
|
3
4
|
import '../../../tc.module.css';
|
|
4
|
-
export const Label = (props) => (
|
|
5
|
-
|
|
6
|
-
export const InputWrapper = (props) => (React.createElement("div", { className: props.className, ref: props.ref },
|
|
7
|
-
React.createElement(Label, { htmlFor: props.id || '', hasError: props.hasError, style: { ...props.style } },
|
|
8
|
-
React.createElement("span", { className: "dark:text-white w-10" }, props.label)),
|
|
9
|
-
props.children));
|
|
5
|
+
export const Label = (props) => (_jsx(_Fragment, { children: _jsx("label", { htmlFor: props.htmlFor, className: `${props.hasError ? 'text-red-400' : 'text-current'} block text-3xs font-medium mb-1`, style: { ...props.style }, children: props.children }) }));
|
|
6
|
+
export const InputWrapper = (props) => (_jsxs("div", { className: props.className, ref: props.ref, children: [_jsx(Label, { htmlFor: props.id || '', hasError: props.hasError, style: { ...props.style }, children: _jsx("span", { className: "dark:text-white w-10", children: props.label }) }), props.children] }));
|
|
10
7
|
export const Input = React.forwardRef((props, ref) => {
|
|
11
8
|
const handleKeyPress = (e) => {
|
|
12
9
|
const key = e.key;
|
|
@@ -15,8 +12,7 @@ export const Input = React.forwardRef((props, ref) => {
|
|
|
15
12
|
e.preventDefault();
|
|
16
13
|
}
|
|
17
14
|
};
|
|
18
|
-
return (
|
|
19
|
-
React.createElement("input", { type: props.type || 'text', id: props.id, ref: props.inputRef, "data-testid": "INPT", autoFocus: props?.isAutoFocus || false, name: props.name, style: props.style, defaultValue: props.defaultValue, placeholder: props.placeholder, required: props.required || false, disabled: props.disabled || false, autoComplete: "given-name", maxLength: props.maxLength, value: props.value, onChange: (e) => props.onChange && props.onChange(e.target.value), onKeyPress: (e) => handleKeyPress(e), className: `${props.className} leading-4 p-2 dark:bg-boxdark focus:outline-none focus:ring block w-full shadow-sm sm:text-base border-2 ${props.hasError ? 'border-red ' : 'border-gray-300'} rounded-md `, onBlur: (e) => props.onBlur && props.onBlur(e.target.value), onKeyDown: props.onKeyDown && props.onKeyDown })));
|
|
15
|
+
return (_jsx(InputWrapper, { label: props.label, id: props.id, hasError: props.hasError, style: props.wrapperStyle, className: props.labelClassName, children: _jsx("input", { type: props.type || 'text', id: props.id, ref: props.inputRef, "data-testid": "INPT", autoFocus: props?.isAutoFocus || false, name: props.name, style: props.style, defaultValue: props.defaultValue, placeholder: props.placeholder, required: props.required || false, disabled: props.disabled || false, autoComplete: "given-name", maxLength: props.maxLength, value: props.value, onChange: (e) => props.onChange && props.onChange(e.target.value), onKeyPress: (e) => handleKeyPress(e), className: `${props.className} leading-4 p-2 dark:bg-boxdark focus:outline-none focus:ring block w-full shadow-sm sm:text-base border-2 ${props.hasError ? 'border-red ' : 'border-gray-300'} rounded-md `, onBlur: (e) => props.onBlur && props.onBlur(e.target.value), onKeyDown: props.onKeyDown && props.onKeyDown }) }));
|
|
20
16
|
});
|
|
21
17
|
export const InputPassword = React.forwardRef((props, ref) => {
|
|
22
18
|
const [showPassword, setShowPassword] = useState(false);
|
|
@@ -26,13 +22,9 @@ export const InputPassword = React.forwardRef((props, ref) => {
|
|
|
26
22
|
const handleMouseUp = () => {
|
|
27
23
|
setShowPassword(false);
|
|
28
24
|
};
|
|
29
|
-
return (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
// onKeyPress={e => handleKeyPress(e)}
|
|
33
|
-
className: `${props.className} leading-4 p-2 focus:outline-none focus:ring block w-full shadow-sm sm:text-base border-2 ${props.hasError ? 'border-red ' : 'border-gray-300'} rounded-md dark:bg-boxdark`, onBlur: (e) => props.onBlur && props.onBlur(e.target.value), onKeyDown: props.onKeyDown && props.onKeyDown }),
|
|
34
|
-
React.createElement("div", { className: "flex absolute right-3" },
|
|
35
|
-
React.createElement("svg", { className: "h-6 dark:bg-boxdark", fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 576 512", onMouseDown: handleMouseDown, onMouseUp: handleMouseUp, onMouseLeave: handleMouseUp }, showPassword ? (React.createElement("path", { fill: "currentColor", d: "M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z" })) : (React.createElement("path", { fill: "currentColor", d: "M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z" })))))));
|
|
25
|
+
return (_jsx(InputWrapper, { label: props.label, id: props.id, hasError: props.hasError, style: props.wrapperStyle, className: props.labelClassName, children: _jsxs("div", { className: "flex items-center relative", children: [_jsx("input", { type: showPassword ? 'text' : 'password', id: props.id, ref: props.inputRef, "data-testid": "INPT", autoFocus: props?.isAutoFocus || false, name: props.name, style: props.style, defaultValue: props.defaultValue, placeholder: props.placeholder, required: props.required || false, disabled: props.disabled || false, autoComplete: "given-name", maxLength: props.maxLength, value: props.value, onChange: (e) => props.onChange && props.onChange(e.target.value),
|
|
26
|
+
// onKeyPress={e => handleKeyPress(e)}
|
|
27
|
+
className: `${props.className} leading-4 p-2 focus:outline-none focus:ring block w-full shadow-sm sm:text-base border-2 ${props.hasError ? 'border-red ' : 'border-gray-300'} rounded-md dark:bg-boxdark`, onBlur: (e) => props.onBlur && props.onBlur(e.target.value), onKeyDown: props.onKeyDown && props.onKeyDown }), _jsx("div", { className: "flex absolute right-3", children: _jsx("svg", { className: "h-6 dark:bg-boxdark", fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 576 512", onMouseDown: handleMouseDown, onMouseUp: handleMouseUp, onMouseLeave: handleMouseUp, children: showPassword ? (_jsx("path", { fill: "currentColor", d: "M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z" })) : (_jsx("path", { fill: "currentColor", d: "M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z" })) }) })] }) }));
|
|
36
28
|
});
|
|
37
29
|
export const Input1 = React.forwardRef((props, ref) => {
|
|
38
30
|
const handleKeyPress = (e) => {
|
|
@@ -42,8 +34,7 @@ export const Input1 = React.forwardRef((props, ref) => {
|
|
|
42
34
|
e.preventDefault();
|
|
43
35
|
}
|
|
44
36
|
};
|
|
45
|
-
return (
|
|
46
|
-
React.createElement("input", { type: props.type || 'text', id: props.id, ref: props.inputRef, "data-testid": "INPT", autoFocus: props?.isAutoFocus || false, name: props.name, style: props.style, defaultValue: props.defaultValue, placeholder: props.placeholder, required: props.required || false, disabled: props.disabled || false, autoComplete: "given-name", maxLength: props.maxLength, value: props.value, onChange: (e) => props.onChange && props.onChange(e.target.value), onKeyPress: (e) => handleKeyPress(e), className: `${props.className} leading-4 p-2 focus:outline-none focus:ring block w-full shadow-sm sm:text-base border-2 ${props.hasError ? 'border-red ' : 'border-gray-300'} rounded-md dark:text-black`, onBlur: (e) => props.onBlur && props.onBlur(e), onKeyDown: props.onKeyDown })));
|
|
37
|
+
return (_jsx(InputWrapper, { label: props.label, id: props.id, hasError: props.hasError, style: props.wrapperStyle, className: props.labelClassName, children: _jsx("input", { type: props.type || 'text', id: props.id, ref: props.inputRef, "data-testid": "INPT", autoFocus: props?.isAutoFocus || false, name: props.name, style: props.style, defaultValue: props.defaultValue, placeholder: props.placeholder, required: props.required || false, disabled: props.disabled || false, autoComplete: "given-name", maxLength: props.maxLength, value: props.value, onChange: (e) => props.onChange && props.onChange(e.target.value), onKeyPress: (e) => handleKeyPress(e), className: `${props.className} leading-4 p-2 focus:outline-none focus:ring block w-full shadow-sm sm:text-base border-2 ${props.hasError ? 'border-red ' : 'border-gray-300'} rounded-md dark:text-black`, onBlur: (e) => props.onBlur && props.onBlur(e), onKeyDown: props.onKeyDown }) }));
|
|
47
38
|
});
|
|
48
39
|
export const Input2 = React.forwardRef((props, ref) => {
|
|
49
40
|
const [isBlur, setIsBlur] = useState(true);
|
|
@@ -57,8 +48,7 @@ export const Input2 = React.forwardRef((props, ref) => {
|
|
|
57
48
|
const handleBlur = (value) => {
|
|
58
49
|
props.onBlur && isBlur && props.onBlur(value);
|
|
59
50
|
};
|
|
60
|
-
return (
|
|
61
|
-
React.createElement("input", { type: props.type || 'text', id: props.id, ref: props.inputRef, "data-testid": "INPT", autoFocus: props?.isAutoFocus || false, name: props.name, style: props.style, defaultValue: props.defaultValue, placeholder: props.placeholder, required: props.required || false, disabled: props.disabled || false, autoComplete: "given-name", maxLength: props.maxLength, value: props.value, onChange: (e) => {
|
|
51
|
+
return (_jsx(InputWrapper, { label: props.label, id: props.id, hasError: props.hasError, style: props.wrapperStyle, className: props.labelClassName, children: _jsx("input", { type: props.type || 'text', id: props.id, ref: props.inputRef, "data-testid": "INPT", autoFocus: props?.isAutoFocus || false, name: props.name, style: props.style, defaultValue: props.defaultValue, placeholder: props.placeholder, required: props.required || false, disabled: props.disabled || false, autoComplete: "given-name", maxLength: props.maxLength, value: props.value, onChange: (e) => {
|
|
62
52
|
setIsBlur(true);
|
|
63
53
|
props.onChange && props.onChange(e.target.value);
|
|
64
54
|
}, onKeyPress: (e) => handleKeyPress(e), className: `${props.className} leading-4 p-2 focus:outline-none focus:ring block w-full shadow-sm sm:text-base border-2 ${props.hasError ? 'border-red ' : 'border-gray-300'} rounded-md dark:text-black`, onKeyDown: (e) => {
|
|
@@ -69,25 +59,17 @@ export const Input2 = React.forwardRef((props, ref) => {
|
|
|
69
59
|
props.onKeyDown && props.onKeyDown(e);
|
|
70
60
|
}, onBlur: (e) => {
|
|
71
61
|
handleBlur(e.target.value);
|
|
72
|
-
} })));
|
|
62
|
+
} }) }));
|
|
73
63
|
});
|
|
74
|
-
export const MultilineInput = (props) => (
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
props.onChange && props.onChange(item.value);
|
|
78
|
-
|
|
79
|
-
React.createElement("input", { key: key, type: "radio", id: props.id, name: props.name, value: item.value, checked: item.value == props.value ? true : false, onChange: () => props.onChange && props.onChange(item.value), className: "w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600" }),
|
|
80
|
-
React.createElement(Label, { htmlFor: props.id || '', style: { marginTop: 6 } }, item.label))))));
|
|
81
|
-
export const InputDate = ({ name, value, placeholder, use12Hours = true, label, id, hasError, disabled, format, onChange, onFocusRemove, }) => (React.createElement(InputWrapper, { label: label, id: id, hasError: hasError },
|
|
82
|
-
React.createElement("input", { type: "date", id: id, name: name, disabled: disabled || false, value: value, onChange: (e) => onChange && onChange(e), className: `leading-4 p-2 focus:outline-none focus:ring block w-full shadow-sm sm:text-base border-2 ${hasError ? 'border-red ' : 'border-gray-300'} rounded-md` })));
|
|
64
|
+
export const MultilineInput = (props) => (_jsx(InputWrapper, { label: props.label, id: props.id, className: props.className, children: _jsx("textarea", { id: props.id, autoComplete: "given-name", value: props.value, disabled: props.disabled, style: props.style, rows: props.rows, onKeyUp: props.onKeyUp && props.onKeyUp, placeholder: props.placeholder, onChange: (e) => props.onChange && props.onChange(e.target.value), onBlur: (e) => props.onBlur && props.onBlur(e.target.value), className: `leading-4 p-2 focus:outline-none focus:ring block w-full shadow-sm sm:text-base border-2 ${props.hasError ? 'border-red ' : 'border-gray-300'} rounded-md dark:bg-boxdark`, defaultValue: props.defaultValue }) }));
|
|
65
|
+
export const InputRadio = (props) => (_jsx(InputWrapper, { label: props.label, id: props.id, style: props.labelStyle, children: props.values?.map((item, key) => (_jsxs("div", { className: "flex items-center gap-2", onClick: () => {
|
|
66
|
+
props.onChange && props.onChange(item.value);
|
|
67
|
+
}, children: [_jsx("input", { type: "radio", id: props.id, name: props.name, value: item.value, checked: item.value == props.value ? true : false, onChange: () => props.onChange && props.onChange(item.value), className: "w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600" }, key), _jsx(Label, { htmlFor: props.id || '', style: { marginTop: 6 }, children: item.label })] }, key))) }));
|
|
68
|
+
export const InputDate = ({ name, value, placeholder, use12Hours = true, label, id, hasError, disabled, format, onChange, onFocusRemove, }) => (_jsx(InputWrapper, { label: label, id: id, hasError: hasError, children: _jsx("input", { type: "date", id: id, name: name, disabled: disabled || false, value: value, onChange: (e) => onChange && onChange(e), className: `leading-4 p-2 focus:outline-none focus:ring block w-full shadow-sm sm:text-base border-2 ${hasError ? 'border-red ' : 'border-gray-300'} rounded-md` }) }));
|
|
83
69
|
export const CheckBox = (props) => {
|
|
84
|
-
return (
|
|
85
|
-
React.createElement("input", { key: props.id, onClick: props.handleCheckChieldElement, type: "checkbox", checked: props.isChecked, value: props.value }),
|
|
86
|
-
' ',
|
|
87
|
-
props.value));
|
|
70
|
+
return (_jsxs("div", { children: [_jsx("input", { onClick: props.handleCheckChieldElement, type: "checkbox", checked: props.isChecked, value: props.value }, props.id), ' ', props.value] }));
|
|
88
71
|
};
|
|
89
|
-
export const InputFile = (props) => (
|
|
90
|
-
React.createElement("input", { type: "file", id: props.id, name: props.name, disabled: props.disabled || false, accept: props.accept, value: props.value, onChange: (e) => props.onChange && props.onChange(e), className: `leading-4 p-2 focus:outline-none focus:ring block w-full shadow-sm sm:text-base border-2 ${props.hasError ? 'border-red ' : 'border-gray-300'} rounded-md`, multiple: props.multiple })));
|
|
72
|
+
export const InputFile = (props) => (_jsx(InputWrapper, { label: props.label, id: props.id, children: _jsx("input", { type: "file", id: props.id, name: props.name, disabled: props.disabled || false, accept: props.accept, value: props.value, onChange: (e) => props.onChange && props.onChange(e), className: `leading-4 p-2 focus:outline-none focus:ring block w-full shadow-sm sm:text-base border-2 ${props.hasError ? 'border-red ' : 'border-gray-300'} rounded-md`, multiple: props.multiple }) }));
|
|
91
73
|
export const Toggle = (props) => {
|
|
92
74
|
const [toggle, setToggle] = useState(props.value);
|
|
93
75
|
const { onChange, disabled, className, isToggleLabel = true } = props;
|
|
@@ -107,16 +89,8 @@ export const Toggle = (props) => {
|
|
|
107
89
|
'wrg-toggle--checked': toggle,
|
|
108
90
|
'wrg-toggle--disabled': disabled,
|
|
109
91
|
}, className);
|
|
110
|
-
return (
|
|
111
|
-
|
|
112
|
-
React.createElement("div", { className: 'wrg-toggle-container ' +
|
|
113
|
-
(toggle ? 'bg-green-700' : 'bg-black dark:bg-white') }, isToggleLabel && (React.createElement(React.Fragment, null,
|
|
114
|
-
React.createElement("div", { className: "wrg-toggle-check" },
|
|
115
|
-
React.createElement("span", { className: "text-white ml-1" }, "Yes")),
|
|
116
|
-
React.createElement("div", { className: "wrg-toggle-uncheck" },
|
|
117
|
-
React.createElement("span", { className: "dark:text-black" }, "No"))))),
|
|
118
|
-
React.createElement("div", { className: `wrg-toggle-circle dark:bg-black ${toggle ? 'ml-1' : 'mr-1'} ` }),
|
|
119
|
-
React.createElement("input", { type: "checkbox", "aria-label": "Toggle Button", className: "wrg-toggle-input" }))));
|
|
92
|
+
return (_jsx(InputWrapper, { label: props.label, id: props.id, style: props.style, children: _jsxs("div", { onClick: triggerToggle, className: toggleClasses, children: [_jsx("div", { className: 'wrg-toggle-container ' +
|
|
93
|
+
(toggle ? 'bg-green-700' : 'bg-black dark:bg-white'), children: isToggleLabel && (_jsxs(_Fragment, { children: [_jsx("div", { className: "wrg-toggle-check", children: _jsx("span", { className: "text-white ml-1", children: "Yes" }) }), _jsx("div", { className: "wrg-toggle-uncheck", children: _jsx("span", { className: "dark:text-black", children: "No" }) })] })) }), _jsx("div", { className: `wrg-toggle-circle dark:bg-black ${toggle ? 'ml-1' : 'mr-1'} ` }), _jsx("input", { type: "checkbox", "aria-label": "Toggle Button", className: "wrg-toggle-input" })] }) }));
|
|
120
94
|
};
|
|
121
95
|
export const DeliveryScheduleToggle = (props) => {
|
|
122
96
|
const [toggle, setToggle] = useState(props.value);
|
|
@@ -137,14 +111,6 @@ export const DeliveryScheduleToggle = (props) => {
|
|
|
137
111
|
'wrg-toggle--checked1': toggle,
|
|
138
112
|
'wrg-toggle--disabled1': disabled,
|
|
139
113
|
}, className);
|
|
140
|
-
return (
|
|
141
|
-
|
|
142
|
-
React.createElement("div", { className: 'wrg-toggle-container1 ' +
|
|
143
|
-
(toggle ? 'bg-green-700' : 'bg-black dark:bg-white') }, isToggleLabel && (React.createElement(React.Fragment, null,
|
|
144
|
-
React.createElement("div", { className: "wrg-toggle-check1" },
|
|
145
|
-
React.createElement("span", { className: "text-white ml-1" }, "Departments")),
|
|
146
|
-
React.createElement("div", { className: "wrg-toggle-uncheck1" },
|
|
147
|
-
React.createElement("span", { className: "dark:text-black" }, "Patients"))))),
|
|
148
|
-
React.createElement("div", { className: `wrg-toggle-circle1 dark:bg-black ${toggle ? 'ml-1' : 'mr-1'} ` }),
|
|
149
|
-
React.createElement("input", { type: "checkbox", "aria-label": "Toggle Button", className: "wrg-toggle-input1" }))));
|
|
114
|
+
return (_jsx(InputWrapper, { label: props.label, id: props.id, style: props.style, children: _jsxs("div", { onClick: triggerToggle, className: toggleClasses, children: [_jsx("div", { className: 'wrg-toggle-container1 ' +
|
|
115
|
+
(toggle ? 'bg-green-700' : 'bg-black dark:bg-white'), children: isToggleLabel && (_jsxs(_Fragment, { children: [_jsx("div", { className: "wrg-toggle-check1", children: _jsx("span", { className: "text-white ml-1", children: "Departments" }) }), _jsx("div", { className: "wrg-toggle-uncheck1", children: _jsx("span", { className: "dark:text-black", children: "Patients" }) })] })) }), _jsx("div", { className: `wrg-toggle-circle1 dark:bg-black ${toggle ? 'ml-1' : 'mr-1'} ` }), _jsx("input", { type: "checkbox", "aria-label": "Toggle Button", className: "wrg-toggle-input1" })] }) }));
|
|
150
116
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grid.component.d.ts","sourceRoot":"","sources":["../../../../../src/core-components/atoms/grid/grid.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,wBAAwB,CAAC;AAChC,UAAU,SAAS;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,iBAAiB,CAAC,SAAS,CAInD,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import '../../../tc.module.css';
|
|
3
|
-
export const Grid = (props) => (
|
|
3
|
+
export const Grid = (props) => (_jsx("div", { className: `xl:grid sm:inline-block grid-cols-${props.cols || 1} gap-3`, children: props.children }));
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { IconBaseProps } from 'react-icons/lib';
|
|
2
3
|
import '../../../tc.module.css';
|
|
3
4
|
interface IconProps {
|
|
@@ -9,3 +10,4 @@ interface IconProps {
|
|
|
9
10
|
}
|
|
10
11
|
export declare const Icon: ({ nameIcon, propsIcon, tooltip, isDisable, onClick, }: IconProps) => JSX.Element;
|
|
11
12
|
export {};
|
|
13
|
+
//# sourceMappingURL=icons.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.component.d.ts","sourceRoot":"","sources":["../../../../../src/core-components/atoms/icons/icons.component.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAE9C,OAAO,wBAAwB,CAAC;AAEhC,UAAU,SAAS;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAGD,eAAO,MAAM,IAAI,0DAMd,SAAS,KAAG,WA2Cd,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Suspense } from 'react';
|
|
2
3
|
import _ from 'lodash';
|
|
3
4
|
import { Tooltip } from '../tooltip/tooltip.component';
|
|
4
5
|
import loadable from '@loadable/component';
|
|
@@ -23,14 +24,12 @@ export const Icon = ({ nameIcon, propsIcon, tooltip = '', isDisable = false, onC
|
|
|
23
24
|
ElementIcon = loadable(() => import('react-icons/fa'), {
|
|
24
25
|
resolveComponent: (el) => el[nameIcon] != null ? el[nameIcon] : el[Object.keys(el.default)[0]],
|
|
25
26
|
});
|
|
26
|
-
return (
|
|
27
|
+
return (_jsx("div", { onClick: () => {
|
|
27
28
|
if (!isDisable)
|
|
28
29
|
onClick && onClick();
|
|
29
|
-
}
|
|
30
|
-
React.createElement(ElementIcon, { ...iconProps }))) : (React.createElement(Suspense, { fallback: React.createElement("div", null, "Loading...") },
|
|
31
|
-
React.createElement(ElementIcon, { ...iconProps })))));
|
|
30
|
+
}, children: !_.isEmpty(tooltip) ? (_jsx(Tooltip, { content: tooltip, children: _jsx(ElementIcon, { ...iconProps }) })) : (_jsx(Suspense, { fallback: _jsx("div", { children: "Loading..." }), children: _jsx(ElementIcon, { ...iconProps }) })) }));
|
|
32
31
|
}
|
|
33
32
|
catch (error) {
|
|
34
|
-
return
|
|
33
|
+
return _jsx(_Fragment, {});
|
|
35
34
|
}
|
|
36
35
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-otp.component.d.ts","sourceRoot":"","sources":["../../../../../src/core-components/atoms/input/input-otp.component.tsx"],"names":[],"mappings":"AACA,OAAO,KAA0B,MAAM,OAAO,CAAC;AAC/C,OAAO,wBAAwB,CAAC;AAEhC,OAAO,wBAAwB,CAAC;AAChC,UAAU,iBAAiB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAE/B,YAAY,EAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACrE;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAyFhD,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
/* eslint-disable no-console */
|
|
2
|
-
import
|
|
3
|
+
import { useEffect, useRef } from 'react';
|
|
3
4
|
import './input-otp.styles.css';
|
|
4
5
|
import '../../../tc.module.css';
|
|
5
6
|
export const InputOtp = ({ className, pin, onPinChanged, }) => {
|
|
@@ -44,18 +45,17 @@ export const InputOtp = ({ className, pin, onPinChanged, }) => {
|
|
|
44
45
|
onPinChanged(undefined, index);
|
|
45
46
|
}
|
|
46
47
|
};
|
|
47
|
-
return (
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
}, onChange: (event) => onChange(event, index), value: pin[index] || '' }))))));
|
|
48
|
+
return (_jsx("div", { className: `${className} relative`, children: _jsx("div", { className: "flex space-x-1 bg-background-secondary rounded-lg outline-offset-8", children: Array.from({ length: pinLength }, (_, index) => (_jsx("input", { "data-testid": "onPinChanged", className: "pt-3 pb-2 block w-full px-0 text-5xl font-extrabold border-b-0 text-orange mt-0 bg-transparent text-center z-20 appearance-none focus:outline-none font-arimaRegular", onKeyDown: (event) => onKeyDown(event, index), onMouseUp: () => {
|
|
49
|
+
if (pin.join('').length <= 0) {
|
|
50
|
+
changePinFocus(0);
|
|
51
|
+
}
|
|
52
|
+
}, onClick: () => {
|
|
53
|
+
if (pin.join('').length <= 0) {
|
|
54
|
+
onPinChanged(undefined, 0);
|
|
55
|
+
}
|
|
56
|
+
}, ref: (el) => {
|
|
57
|
+
if (el) {
|
|
58
|
+
inputRefs.current[index] = el;
|
|
59
|
+
}
|
|
60
|
+
}, onChange: (event) => onChange(event, index), value: pin[index] || '' }, index))) }) }));
|
|
61
61
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-pin.component.d.ts","sourceRoot":"","sources":["../../../../../src/core-components/atoms/input/input-pin.component.tsx"],"names":[],"mappings":"AACA,OAAO,KAAyB,MAAM,OAAO,CAAC;AAC9C,OAAO,oBAAoB,CAAC;AAE5B,OAAO,wBAAwB,CAAC;AAEhC,UAAU,iBAAiB;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,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,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACtC,YAAY,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAClD;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA+HhD,CAAC"}
|