@xaypay/tui 0.0.96 → 0.0.98

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -66,9 +66,9 @@ function styleInject(css, ref) {
66
66
  }
67
67
  }
68
68
 
69
- var css_248z$g = ".file-module_file-form__l13d5{align-items:center;background:#fbfbfb;border:2px dashed;border-radius:6px;cursor:pointer;display:flex;flex-direction:column;height:190px;justify-content:space-between;overflow:hidden;padding:4px 0;position:relative;width:100%}.file-module_file-form-wrap__qY--B:before{background:rgba(60,57,62,.4);border-radius:6px;content:\"\";height:100%;left:0;opacity:0;pointer-events:none;position:absolute;top:0;transition:opacity .24s;width:100%;z-index:1}.file-module_file-form-wrap__qY--B.file-module_active__L1gPt:hover:before{opacity:1;pointer-events:unset}.file-module_file-form-wrap__qY--B.file-module_active__L1gPt:hover .file-module_delete-upload-icon__PWN66{opacity:1}.file-module_file-form-inner-upload__tq3Dn{align-items:center;display:flex;flex-direction:column;justify-content:space-between;padding-bottom:16px;padding-top:48px}.file-module_file-form-inner-upload__tq3Dn>img{display:block;margin-bottom:14px}.file-module_upload-info__a8GFs{margin-bottom:40px;max-width:150px;text-align:center}.file-module_upload-info-txt__l11uN{color:#0da574}.file-module_file-form__l13d5.file-module_default__t7KU0{border-color:#d1d1d1}.file-module_file-form__l13d5.file-module_error__H-M4Z{border-color:#e00!important}.file-module_file-form__l13d5.file-module_accept__WTW6V{border-color:#00236a}.file-module_delete-upload-icon__PWN66{align-items:center;background:#fff;border-radius:6px;cursor:pointer;display:flex;height:26px;justify-content:center;opacity:0;position:absolute;right:10px;top:10px;transition:opacity .24s;width:26px;z-index:11}.file-module_delete-upload-icon__PWN66>i{color:#00236a;font-size:16px}.file-module_upload-file-content__QHMjn{align-items:center;display:flex;height:100%;justify-content:center;max-height:190px;overflow:hidden;position:relative;width:100%}.file-module_upload-file-content__QHMjn>img{display:block;height:auto;max-height:95%;object-fit:contain;width:27.8rem}.file-module_file-form-title__zWTSB{margin-bottom:10px;max-width:390px;word-break:break-all}.file-module_file-form-wrap__qY--B{position:relative;transform:translateZ(0)}";
69
+ var css_248z$f = ".file-module_file-form__l13d5{align-items:center;background:#fbfbfb;border:2px dashed;border-radius:6px;cursor:pointer;display:flex;flex-direction:column;height:190px;justify-content:space-between;overflow:hidden;padding:4px 0;position:relative;width:100%}.file-module_file-form-wrap__qY--B:before{background:rgba(60,57,62,.4);border-radius:6px;content:\"\";height:100%;left:0;opacity:0;pointer-events:none;position:absolute;top:0;transition:opacity .24s;width:100%;z-index:1}.file-module_file-form-wrap__qY--B.file-module_active__L1gPt:hover:before{opacity:1;pointer-events:unset}.file-module_file-form-wrap__qY--B.file-module_active__L1gPt:hover .file-module_delete-upload-icon__PWN66{opacity:1}.file-module_file-form-inner-upload__tq3Dn{align-items:center;display:flex;flex-direction:column;justify-content:space-between;padding-bottom:16px;padding-top:48px}.file-module_file-form-inner-upload__tq3Dn>img{display:block;margin-bottom:14px}.file-module_upload-info__a8GFs{margin-bottom:40px;max-width:150px;text-align:center}.file-module_upload-info-txt__l11uN{color:#0da574}.file-module_file-form__l13d5.file-module_default__t7KU0{border-color:#d1d1d1}.file-module_file-form__l13d5.file-module_error__H-M4Z{border-color:#e00!important}.file-module_file-form__l13d5.file-module_accept__WTW6V{border-color:#00236a}.file-module_delete-upload-icon__PWN66{align-items:center;background:#fff;border-radius:6px;cursor:pointer;display:flex;height:26px;justify-content:center;opacity:0;position:absolute;right:10px;top:10px;transition:opacity .24s;width:26px;z-index:11}.file-module_delete-upload-icon__PWN66>i{color:#00236a;font-size:16px}.file-module_upload-file-content__QHMjn{align-items:center;display:flex;height:100%;justify-content:center;max-height:190px;overflow:hidden;position:relative;width:100%}.file-module_upload-file-content__QHMjn>img{display:block;height:auto;max-height:95%;object-fit:contain;width:27.8rem}.file-module_file-form-title__zWTSB{margin-bottom:10px;max-width:390px;word-break:break-all}.file-module_file-form-wrap__qY--B{position:relative;transform:translateZ(0)}";
70
70
  var styles$c = {"file-form-wrap":"file-module_file-form-wrap__qY--B","file-form":"file-module_file-form__l13d5","active":"file-module_active__L1gPt","delete-upload-icon":"file-module_delete-upload-icon__PWN66","file-form-inner-upload":"file-module_file-form-inner-upload__tq3Dn","upload-info":"file-module_upload-info__a8GFs","upload-info-txt":"file-module_upload-info-txt__l11uN","default":"file-module_default__t7KU0","error":"file-module_error__H-M4Z","accept":"file-module_accept__WTW6V","upload-file-content":"file-module_upload-file-content__QHMjn","file-form-title":"file-module_file-form-title__zWTSB"};
71
- styleInject(css_248z$g);
71
+ styleInject(css_248z$f);
72
72
 
73
73
  const File = ({
74
74
  name,
@@ -190,63 +190,6 @@ File.defaultProps = {
190
190
  fileExtensions: ['jpg', 'jpeg', 'png', 'pdf']
191
191
  };
192
192
 
193
- const _ = require('lodash');
194
- const compereConfigs = () => {
195
- let projectConfig = {};
196
- let packageConfig = {};
197
- try {
198
- packageConfig = require('../tui.config.js');
199
- } catch (e) {
200
- try {
201
- packageConfig = require('../../tui.config.js');
202
- } catch (err) {
203
- packageConfig = {};
204
- }
205
- }
206
- try {
207
- projectConfig = require('../../../../tui.config.js');
208
- } catch (error) {
209
- projectConfig = {};
210
- // console.log(error, 'Project: if you want to use custom styles, create tui.config.js file in your project root');
211
- }
212
-
213
- return _.merge(packageConfig, projectConfig);
214
- };
215
-
216
- var css_248z$f = "";
217
- styleInject(css_248z$f);
218
-
219
- const Chart = ({
220
- width,
221
- height
222
- }) => {
223
- compereConfigs();
224
- useEffect(() => {
225
- const canvas = document.getElementById('myChart');
226
- // const canvas = canvasRef.current;
227
- const ctx = canvas.getContext('2d');
228
- const data = [10, 20, 30, 15, 25];
229
- const barWidth = 40;
230
- const chartHeight = 200;
231
- ctx.clearRect(0, 0, canvas.width, canvas.height);
232
- data.forEach((value, index) => {
233
- const x = index * (barWidth + 10);
234
- const y = chartHeight - value;
235
- ctx.fillStyle = 'blue';
236
- ctx.fillRect(x, y, barWidth, value);
237
- });
238
- }, []);
239
- return /*#__PURE__*/React__default.createElement("canvas", {
240
- id: "myChart",
241
- width: width,
242
- height: height
243
- });
244
- };
245
- Chart.propTypes = {
246
- width: PropTypes.number,
247
- height: PropTypes.number
248
- };
249
-
250
193
  const SvgCheckboxUnchecked = ({
251
194
  title,
252
195
  titleId,
@@ -328,6 +271,29 @@ SingleCheckbox.propTypes = {
328
271
  var css_248z$e = ".table-module_sorting-arrows__BaN-G:after{content:\"▲\";font-size:11px;position:absolute;right:0;top:calc(50% - 12px)}.table-module_sorting-arrows__BaN-G:before{bottom:calc(50% - 12px);content:\"▼\";font-size:11px;position:absolute;right:0}.table-module_td-span__XHo6k{cursor:pointer;display:inline-block;position:relative}.table-module_td-span__XHo6k>svg{left:0;position:absolute;top:0;z-index:-1}";
329
272
  styleInject(css_248z$e);
330
273
 
274
+ const _ = require('lodash');
275
+ const compereConfigs = () => {
276
+ let projectConfig = {};
277
+ let packageConfig = {};
278
+ try {
279
+ packageConfig = require('../tui.config.js');
280
+ } catch (e) {
281
+ try {
282
+ packageConfig = require('../../tui.config.js');
283
+ } catch (err) {
284
+ packageConfig = {};
285
+ }
286
+ }
287
+ try {
288
+ projectConfig = require('../../../../tui.config.js');
289
+ } catch (error) {
290
+ projectConfig = {};
291
+ // console.log(error, 'Project: if you want to use custom styles, create tui.config.js file in your project root');
292
+ }
293
+
294
+ return _.merge(packageConfig, projectConfig);
295
+ };
296
+
331
297
  ({
332
298
  dataBody: PropTypes.array,
333
299
  dataHeader: PropTypes.array,
@@ -457,6 +423,7 @@ const Modal = ({
457
423
  headerColor,
458
424
  borderStyle,
459
425
  borderWidth,
426
+ borderColor,
460
427
  outsideClose,
461
428
  headerWeight,
462
429
  headerHeight,
@@ -489,6 +456,11 @@ const Modal = ({
489
456
  }
490
457
  }
491
458
  };
459
+ const handleESC = e => {
460
+ if (e.key === 'Escape') {
461
+ handleCloseModal();
462
+ }
463
+ };
492
464
  useEffect(() => {
493
465
  if (type === 'images') {
494
466
  if (data) {
@@ -514,9 +486,11 @@ const Modal = ({
514
486
  }
515
487
  }, [selected]);
516
488
  useEffect(() => {
489
+ document.addEventListener('keydown', handleESC, false);
517
490
  return () => {
518
491
  setSelect(0);
519
492
  setInnerData([]);
493
+ document.removeEventListener('keydown', handleESC, false);
520
494
  };
521
495
  }, []);
522
496
  return /*#__PURE__*/React__default.createElement("div", {
@@ -611,7 +585,8 @@ const Modal = ({
611
585
  justifyContent: 'center',
612
586
  overflow: 'auto',
613
587
  borderWidth: borderWidth ? borderWidth : configStyles.MODAL.borderWidth,
614
- borderStyle: borderStyle ? borderStyle : configStyles.MODAL.borderStyle
588
+ borderStyle: borderStyle ? borderStyle : configStyles.MODAL.borderStyle,
589
+ borderColor: borderColor ? borderColor : configStyles.MODAL.borderColor
615
590
  }
616
591
  }, type === 'content' ? children ? children : '' : /*#__PURE__*/React__default.createElement("div", {
617
592
  style: {
@@ -700,7 +675,7 @@ Modal.defaultProps = {
700
675
  type: 'content'
701
676
  };
702
677
 
703
- var css_248z$c = ".input-module_input-wrap__NunrE{position:relative;width:100%}.input-module_input-content__kP7lZ{-webkit-appearance:none;display:flex;width:100%}input:-webkit-autofill,input:-webkit-autofill:active,input:-webkit-autofill:focus,input:-webkit-autofill:hover{background-color:inherit!important}.input-module_error-message-show__OrVSo{animation-fill-mode:forwards;animation-name:input-module_error-show__9MP6k}.input-module_inp-num__vH7HL::-webkit-inner-spin-button,.input-module_inp-num__vH7HL::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.input-module_inp-num__vH7HL[type=number]{-moz-appearance:textfield}@keyframes input-module_error-show__9MP6k{to{bottom:-20px;transform:scaleX(1);-webkit-transform:scaleX(1);-moz-transform:scaleX(1);-ms-transform:scaleX(1);-o-transform:scaleX(1)}}";
678
+ var css_248z$c = ".input-module_input-wrap__NunrE{position:relative;width:100%}.input-module_input-content__kP7lZ{-webkit-appearance:none;display:flex;width:100%}input:-webkit-autofill,input:-webkit-autofill:active,input:-webkit-autofill:focus,input:-webkit-autofill:hover{background-color:inherit!important}input::-ms-clear,input::-ms-reveal{display:none}.input-module_error-message-show__OrVSo{animation-fill-mode:forwards;animation-name:input-module_error-show__9MP6k}.input-module_inp-num__vH7HL::-webkit-inner-spin-button,.input-module_inp-num__vH7HL::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.input-module_inp-num__vH7HL[type=number]{-moz-appearance:textfield}@keyframes input-module_error-show__9MP6k{to{bottom:-20px;transform:scaleX(1);-webkit-transform:scaleX(1);-moz-transform:scaleX(1);-ms-transform:scaleX(1);-o-transform:scaleX(1)}}";
704
679
  var styles$a = {"input-wrap":"input-module_input-wrap__NunrE","input-content":"input-module_input-content__kP7lZ","error-message-show":"input-module_error-message-show__OrVSo","error-show":"input-module_error-show__9MP6k","inp-num":"input-module_inp-num__vH7HL"};
705
680
  styleInject(css_248z$c);
706
681
 
@@ -3676,14 +3651,21 @@ const Pagination = ({
3676
3651
  }
3677
3652
  };
3678
3653
  let lastPage = paginationRange[paginationRange.length - 1];
3679
- return /*#__PURE__*/React__default.createElement("ul", {
3654
+ return /*#__PURE__*/React__default.createElement("div", {
3655
+ style: {
3656
+ display: 'flex',
3657
+ margin: '0 auto',
3658
+ alignItems: 'center',
3659
+ justifyContent: 'center'
3660
+ }
3661
+ }, /*#__PURE__*/React__default.createElement("ul", {
3680
3662
  className: classProps
3681
3663
  }, /*#__PURE__*/React__default.createElement("button", {
3682
3664
  style: {
3683
3665
  transform: 'rotate(180deg)'
3684
3666
  },
3685
3667
  onClick: onPrevious,
3686
- disabled: currentPage === 1 ? true : false,
3668
+ disabled: currentPageNumber === 1 ? true : false,
3687
3669
  className: `${styles$2["pagination-btn"]} pagination-btn-rem`
3688
3670
  }, /*#__PURE__*/React__default.createElement(SvgNextarrow, null)), paginationRange.map((pageNumber, id) => {
3689
3671
  if (pageNumber === Dots) {
@@ -3715,7 +3697,7 @@ const Pagination = ({
3715
3697
  onClick: onNext,
3716
3698
  disabled: currentPageNumber === lastPage ? true : false,
3717
3699
  className: `${styles$2["pagination-btn"]} pagination-btn-rem`
3718
- }, /*#__PURE__*/React__default.createElement(SvgNextarrow, null)), goTo && /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("input", {
3700
+ }, /*#__PURE__*/React__default.createElement(SvgNextarrow, null))), goTo && /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("input", {
3719
3701
  onKeyDown: handleKeyDown,
3720
3702
  onInput: handleChangeInput,
3721
3703
  type: "number",
@@ -3973,6 +3955,7 @@ const NewAutocomplete = ({
3973
3955
  const [show, setShow] = useState(false);
3974
3956
  const [isHover, setIsHover] = useState(false);
3975
3957
  const [isFocus, setIsFocus] = useState(false);
3958
+ const [innerError, setInnerError] = useState('');
3976
3959
  const [innerValue, setInnerValue] = useState('');
3977
3960
  const [innerOptions, setInnerOptions] = useState([]);
3978
3961
  const configStyles = compereConfigs();
@@ -4008,6 +3991,7 @@ const NewAutocomplete = ({
4008
3991
  const value = e.target.value;
4009
3992
  const currentId = e.target.id;
4010
3993
  value.length > 0 ? setShow(true) : setShow(false);
3994
+ setInnerError('');
4011
3995
  setInnerValue(value);
4012
3996
  if (value.length >= searchCount) {
4013
3997
  change({
@@ -4073,7 +4057,7 @@ const NewAutocomplete = ({
4073
4057
  backgroundColor: contentBottomRowBackgroundColor ? contentBottomRowBackgroundColor : configStyles.NEWAUTOCOMPLETE.contentBottomRowBackgroundColor
4074
4058
  }
4075
4059
  }, item[keyNames.name]);
4076
- }))) : innerOptions.length <= 0 ? /*#__PURE__*/React__default.createElement("span", {
4060
+ }))) : innerOptions.length <= 0 ? innerError ? '' : /*#__PURE__*/React__default.createElement("span", {
4077
4061
  style: {
4078
4062
  position: 'absolute',
4079
4063
  zIndex: '9999999999',
@@ -4114,6 +4098,9 @@ const NewAutocomplete = ({
4114
4098
  setInnerValue('');
4115
4099
  }
4116
4100
  }, [selected]);
4101
+ useEffect(() => {
4102
+ setInnerError(errorMessage);
4103
+ }, [errorMessage]);
4117
4104
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, label ? /*#__PURE__*/React__default.createElement("label", {
4118
4105
  style: {
4119
4106
  color: labelColor ? labelColor : configStyles.NEWAUTOCOMPLETE.labelColor,
@@ -4167,7 +4154,7 @@ const NewAutocomplete = ({
4167
4154
  flexDirection: contentTopDirection ? contentTopDirection : configStyles.NEWAUTOCOMPLETE.contentTopDirection,
4168
4155
  boxShadow: errorMessage ? errorColor ? `0 0 0 2px ${errorColor}` : `0 0 0 2px ${configStyles.NEWAUTOCOMPLETE.errorColor}` : isFocus ? contentTopBorderActive ? contentTopBorderActive : configStyles.NEWAUTOCOMPLETE.contentTopBorderActive : isHover ? contentTopBorderHover ? contentTopBorderHover : configStyles.NEWAUTOCOMPLETE.contentTopBorderHover : contentTopBorder ? contentTopBorder : configStyles.NEWAUTOCOMPLETE.contentTopBorder
4169
4156
  }
4170
- }, props)), errorMessage ? /*#__PURE__*/React__default.createElement("span", {
4157
+ }, props)), innerError ? /*#__PURE__*/React__default.createElement("span", {
4171
4158
  style: {
4172
4159
  left: '0px',
4173
4160
  position: 'absolute',
@@ -4176,7 +4163,7 @@ const NewAutocomplete = ({
4176
4163
  top: marginTop ? `calc(100% + ${marginTop})` : `calc(100% + ${configStyles.INPUT.marginTop})`,
4177
4164
  maxWidth: contentTopMaxWidth ? contentTopMaxWidth : configStyles.NEWAUTOCOMPLETE.contentTopMaxWidth
4178
4165
  }
4179
- }, errorMessage) : '', optionList));
4166
+ }, innerError) : '', optionList));
4180
4167
  };
4181
4168
  NewAutocomplete.propTypes = {
4182
4169
  label: PropTypes.string,
@@ -4258,4 +4245,4 @@ NewAutocomplete.defaultProps = {
4258
4245
  disabled: false
4259
4246
  };
4260
4247
 
4261
- export { Autocomplate, Button, Captcha, Chart, Checkbox, File, Input, InputTypes, Modal, NewAutocomplete, NewFile, Pagination, Radio, Select, SingleCheckbox, Stepper, Textarea, Toaster, Tooltip, Typography, TypographyType, toast };
4248
+ export { Autocomplate, Button, Captcha, Checkbox, File, Input, InputTypes, Modal, NewAutocomplete, NewFile, Pagination, Radio, Select, SingleCheckbox, Stepper, Textarea, Toaster, Tooltip, Typography, TypographyType, toast };
package/dist/index.js CHANGED
@@ -96,9 +96,9 @@ function styleInject(css, ref) {
96
96
  }
97
97
  }
98
98
 
99
- var css_248z$g = ".file-module_file-form__l13d5{align-items:center;background:#fbfbfb;border:2px dashed;border-radius:6px;cursor:pointer;display:flex;flex-direction:column;height:190px;justify-content:space-between;overflow:hidden;padding:4px 0;position:relative;width:100%}.file-module_file-form-wrap__qY--B:before{background:rgba(60,57,62,.4);border-radius:6px;content:\"\";height:100%;left:0;opacity:0;pointer-events:none;position:absolute;top:0;transition:opacity .24s;width:100%;z-index:1}.file-module_file-form-wrap__qY--B.file-module_active__L1gPt:hover:before{opacity:1;pointer-events:unset}.file-module_file-form-wrap__qY--B.file-module_active__L1gPt:hover .file-module_delete-upload-icon__PWN66{opacity:1}.file-module_file-form-inner-upload__tq3Dn{align-items:center;display:flex;flex-direction:column;justify-content:space-between;padding-bottom:16px;padding-top:48px}.file-module_file-form-inner-upload__tq3Dn>img{display:block;margin-bottom:14px}.file-module_upload-info__a8GFs{margin-bottom:40px;max-width:150px;text-align:center}.file-module_upload-info-txt__l11uN{color:#0da574}.file-module_file-form__l13d5.file-module_default__t7KU0{border-color:#d1d1d1}.file-module_file-form__l13d5.file-module_error__H-M4Z{border-color:#e00!important}.file-module_file-form__l13d5.file-module_accept__WTW6V{border-color:#00236a}.file-module_delete-upload-icon__PWN66{align-items:center;background:#fff;border-radius:6px;cursor:pointer;display:flex;height:26px;justify-content:center;opacity:0;position:absolute;right:10px;top:10px;transition:opacity .24s;width:26px;z-index:11}.file-module_delete-upload-icon__PWN66>i{color:#00236a;font-size:16px}.file-module_upload-file-content__QHMjn{align-items:center;display:flex;height:100%;justify-content:center;max-height:190px;overflow:hidden;position:relative;width:100%}.file-module_upload-file-content__QHMjn>img{display:block;height:auto;max-height:95%;object-fit:contain;width:27.8rem}.file-module_file-form-title__zWTSB{margin-bottom:10px;max-width:390px;word-break:break-all}.file-module_file-form-wrap__qY--B{position:relative;transform:translateZ(0)}";
99
+ var css_248z$f = ".file-module_file-form__l13d5{align-items:center;background:#fbfbfb;border:2px dashed;border-radius:6px;cursor:pointer;display:flex;flex-direction:column;height:190px;justify-content:space-between;overflow:hidden;padding:4px 0;position:relative;width:100%}.file-module_file-form-wrap__qY--B:before{background:rgba(60,57,62,.4);border-radius:6px;content:\"\";height:100%;left:0;opacity:0;pointer-events:none;position:absolute;top:0;transition:opacity .24s;width:100%;z-index:1}.file-module_file-form-wrap__qY--B.file-module_active__L1gPt:hover:before{opacity:1;pointer-events:unset}.file-module_file-form-wrap__qY--B.file-module_active__L1gPt:hover .file-module_delete-upload-icon__PWN66{opacity:1}.file-module_file-form-inner-upload__tq3Dn{align-items:center;display:flex;flex-direction:column;justify-content:space-between;padding-bottom:16px;padding-top:48px}.file-module_file-form-inner-upload__tq3Dn>img{display:block;margin-bottom:14px}.file-module_upload-info__a8GFs{margin-bottom:40px;max-width:150px;text-align:center}.file-module_upload-info-txt__l11uN{color:#0da574}.file-module_file-form__l13d5.file-module_default__t7KU0{border-color:#d1d1d1}.file-module_file-form__l13d5.file-module_error__H-M4Z{border-color:#e00!important}.file-module_file-form__l13d5.file-module_accept__WTW6V{border-color:#00236a}.file-module_delete-upload-icon__PWN66{align-items:center;background:#fff;border-radius:6px;cursor:pointer;display:flex;height:26px;justify-content:center;opacity:0;position:absolute;right:10px;top:10px;transition:opacity .24s;width:26px;z-index:11}.file-module_delete-upload-icon__PWN66>i{color:#00236a;font-size:16px}.file-module_upload-file-content__QHMjn{align-items:center;display:flex;height:100%;justify-content:center;max-height:190px;overflow:hidden;position:relative;width:100%}.file-module_upload-file-content__QHMjn>img{display:block;height:auto;max-height:95%;object-fit:contain;width:27.8rem}.file-module_file-form-title__zWTSB{margin-bottom:10px;max-width:390px;word-break:break-all}.file-module_file-form-wrap__qY--B{position:relative;transform:translateZ(0)}";
100
100
  var styles$c = {"file-form-wrap":"file-module_file-form-wrap__qY--B","file-form":"file-module_file-form__l13d5","active":"file-module_active__L1gPt","delete-upload-icon":"file-module_delete-upload-icon__PWN66","file-form-inner-upload":"file-module_file-form-inner-upload__tq3Dn","upload-info":"file-module_upload-info__a8GFs","upload-info-txt":"file-module_upload-info-txt__l11uN","default":"file-module_default__t7KU0","error":"file-module_error__H-M4Z","accept":"file-module_accept__WTW6V","upload-file-content":"file-module_upload-file-content__QHMjn","file-form-title":"file-module_file-form-title__zWTSB"};
101
- styleInject(css_248z$g);
101
+ styleInject(css_248z$f);
102
102
 
103
103
  const File = ({
104
104
  name,
@@ -220,63 +220,6 @@ File.defaultProps = {
220
220
  fileExtensions: ['jpg', 'jpeg', 'png', 'pdf']
221
221
  };
222
222
 
223
- const _ = require('lodash');
224
- const compereConfigs = () => {
225
- let projectConfig = {};
226
- let packageConfig = {};
227
- try {
228
- packageConfig = require('../tui.config.js');
229
- } catch (e) {
230
- try {
231
- packageConfig = require('../../tui.config.js');
232
- } catch (err) {
233
- packageConfig = {};
234
- }
235
- }
236
- try {
237
- projectConfig = require('../../../../tui.config.js');
238
- } catch (error) {
239
- projectConfig = {};
240
- // console.log(error, 'Project: if you want to use custom styles, create tui.config.js file in your project root');
241
- }
242
-
243
- return _.merge(packageConfig, projectConfig);
244
- };
245
-
246
- var css_248z$f = "";
247
- styleInject(css_248z$f);
248
-
249
- const Chart = ({
250
- width,
251
- height
252
- }) => {
253
- compereConfigs();
254
- React.useEffect(() => {
255
- const canvas = document.getElementById('myChart');
256
- // const canvas = canvasRef.current;
257
- const ctx = canvas.getContext('2d');
258
- const data = [10, 20, 30, 15, 25];
259
- const barWidth = 40;
260
- const chartHeight = 200;
261
- ctx.clearRect(0, 0, canvas.width, canvas.height);
262
- data.forEach((value, index) => {
263
- const x = index * (barWidth + 10);
264
- const y = chartHeight - value;
265
- ctx.fillStyle = 'blue';
266
- ctx.fillRect(x, y, barWidth, value);
267
- });
268
- }, []);
269
- return /*#__PURE__*/React__default["default"].createElement("canvas", {
270
- id: "myChart",
271
- width: width,
272
- height: height
273
- });
274
- };
275
- Chart.propTypes = {
276
- width: PropTypes__default["default"].number,
277
- height: PropTypes__default["default"].number
278
- };
279
-
280
223
  const SvgCheckboxUnchecked = ({
281
224
  title,
282
225
  titleId,
@@ -358,6 +301,29 @@ SingleCheckbox.propTypes = {
358
301
  var css_248z$e = ".table-module_sorting-arrows__BaN-G:after{content:\"▲\";font-size:11px;position:absolute;right:0;top:calc(50% - 12px)}.table-module_sorting-arrows__BaN-G:before{bottom:calc(50% - 12px);content:\"▼\";font-size:11px;position:absolute;right:0}.table-module_td-span__XHo6k{cursor:pointer;display:inline-block;position:relative}.table-module_td-span__XHo6k>svg{left:0;position:absolute;top:0;z-index:-1}";
359
302
  styleInject(css_248z$e);
360
303
 
304
+ const _ = require('lodash');
305
+ const compereConfigs = () => {
306
+ let projectConfig = {};
307
+ let packageConfig = {};
308
+ try {
309
+ packageConfig = require('../tui.config.js');
310
+ } catch (e) {
311
+ try {
312
+ packageConfig = require('../../tui.config.js');
313
+ } catch (err) {
314
+ packageConfig = {};
315
+ }
316
+ }
317
+ try {
318
+ projectConfig = require('../../../../tui.config.js');
319
+ } catch (error) {
320
+ projectConfig = {};
321
+ // console.log(error, 'Project: if you want to use custom styles, create tui.config.js file in your project root');
322
+ }
323
+
324
+ return _.merge(packageConfig, projectConfig);
325
+ };
326
+
361
327
  ({
362
328
  dataBody: PropTypes__default["default"].array,
363
329
  dataHeader: PropTypes__default["default"].array,
@@ -487,6 +453,7 @@ const Modal = ({
487
453
  headerColor,
488
454
  borderStyle,
489
455
  borderWidth,
456
+ borderColor,
490
457
  outsideClose,
491
458
  headerWeight,
492
459
  headerHeight,
@@ -519,6 +486,11 @@ const Modal = ({
519
486
  }
520
487
  }
521
488
  };
489
+ const handleESC = e => {
490
+ if (e.key === 'Escape') {
491
+ handleCloseModal();
492
+ }
493
+ };
522
494
  React.useEffect(() => {
523
495
  if (type === 'images') {
524
496
  if (data) {
@@ -544,9 +516,11 @@ const Modal = ({
544
516
  }
545
517
  }, [selected]);
546
518
  React.useEffect(() => {
519
+ document.addEventListener('keydown', handleESC, false);
547
520
  return () => {
548
521
  setSelect(0);
549
522
  setInnerData([]);
523
+ document.removeEventListener('keydown', handleESC, false);
550
524
  };
551
525
  }, []);
552
526
  return /*#__PURE__*/React__default["default"].createElement("div", {
@@ -641,7 +615,8 @@ const Modal = ({
641
615
  justifyContent: 'center',
642
616
  overflow: 'auto',
643
617
  borderWidth: borderWidth ? borderWidth : configStyles.MODAL.borderWidth,
644
- borderStyle: borderStyle ? borderStyle : configStyles.MODAL.borderStyle
618
+ borderStyle: borderStyle ? borderStyle : configStyles.MODAL.borderStyle,
619
+ borderColor: borderColor ? borderColor : configStyles.MODAL.borderColor
645
620
  }
646
621
  }, type === 'content' ? children ? children : '' : /*#__PURE__*/React__default["default"].createElement("div", {
647
622
  style: {
@@ -730,7 +705,7 @@ Modal.defaultProps = {
730
705
  type: 'content'
731
706
  };
732
707
 
733
- var css_248z$c = ".input-module_input-wrap__NunrE{position:relative;width:100%}.input-module_input-content__kP7lZ{-webkit-appearance:none;display:flex;width:100%}input:-webkit-autofill,input:-webkit-autofill:active,input:-webkit-autofill:focus,input:-webkit-autofill:hover{background-color:inherit!important}.input-module_error-message-show__OrVSo{animation-fill-mode:forwards;animation-name:input-module_error-show__9MP6k}.input-module_inp-num__vH7HL::-webkit-inner-spin-button,.input-module_inp-num__vH7HL::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.input-module_inp-num__vH7HL[type=number]{-moz-appearance:textfield}@keyframes input-module_error-show__9MP6k{to{bottom:-20px;transform:scaleX(1);-webkit-transform:scaleX(1);-moz-transform:scaleX(1);-ms-transform:scaleX(1);-o-transform:scaleX(1)}}";
708
+ var css_248z$c = ".input-module_input-wrap__NunrE{position:relative;width:100%}.input-module_input-content__kP7lZ{-webkit-appearance:none;display:flex;width:100%}input:-webkit-autofill,input:-webkit-autofill:active,input:-webkit-autofill:focus,input:-webkit-autofill:hover{background-color:inherit!important}input::-ms-clear,input::-ms-reveal{display:none}.input-module_error-message-show__OrVSo{animation-fill-mode:forwards;animation-name:input-module_error-show__9MP6k}.input-module_inp-num__vH7HL::-webkit-inner-spin-button,.input-module_inp-num__vH7HL::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.input-module_inp-num__vH7HL[type=number]{-moz-appearance:textfield}@keyframes input-module_error-show__9MP6k{to{bottom:-20px;transform:scaleX(1);-webkit-transform:scaleX(1);-moz-transform:scaleX(1);-ms-transform:scaleX(1);-o-transform:scaleX(1)}}";
734
709
  var styles$a = {"input-wrap":"input-module_input-wrap__NunrE","input-content":"input-module_input-content__kP7lZ","error-message-show":"input-module_error-message-show__OrVSo","error-show":"input-module_error-show__9MP6k","inp-num":"input-module_inp-num__vH7HL"};
735
710
  styleInject(css_248z$c);
736
711
 
@@ -3706,14 +3681,21 @@ const Pagination = ({
3706
3681
  }
3707
3682
  };
3708
3683
  let lastPage = paginationRange[paginationRange.length - 1];
3709
- return /*#__PURE__*/React__default["default"].createElement("ul", {
3684
+ return /*#__PURE__*/React__default["default"].createElement("div", {
3685
+ style: {
3686
+ display: 'flex',
3687
+ margin: '0 auto',
3688
+ alignItems: 'center',
3689
+ justifyContent: 'center'
3690
+ }
3691
+ }, /*#__PURE__*/React__default["default"].createElement("ul", {
3710
3692
  className: classProps
3711
3693
  }, /*#__PURE__*/React__default["default"].createElement("button", {
3712
3694
  style: {
3713
3695
  transform: 'rotate(180deg)'
3714
3696
  },
3715
3697
  onClick: onPrevious,
3716
- disabled: currentPage === 1 ? true : false,
3698
+ disabled: currentPageNumber === 1 ? true : false,
3717
3699
  className: `${styles$2["pagination-btn"]} pagination-btn-rem`
3718
3700
  }, /*#__PURE__*/React__default["default"].createElement(SvgNextarrow, null)), paginationRange.map((pageNumber, id) => {
3719
3701
  if (pageNumber === Dots) {
@@ -3745,7 +3727,7 @@ const Pagination = ({
3745
3727
  onClick: onNext,
3746
3728
  disabled: currentPageNumber === lastPage ? true : false,
3747
3729
  className: `${styles$2["pagination-btn"]} pagination-btn-rem`
3748
- }, /*#__PURE__*/React__default["default"].createElement(SvgNextarrow, null)), goTo && /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement("input", {
3730
+ }, /*#__PURE__*/React__default["default"].createElement(SvgNextarrow, null))), goTo && /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement("input", {
3749
3731
  onKeyDown: handleKeyDown,
3750
3732
  onInput: handleChangeInput,
3751
3733
  type: "number",
@@ -4003,6 +3985,7 @@ const NewAutocomplete = ({
4003
3985
  const [show, setShow] = React.useState(false);
4004
3986
  const [isHover, setIsHover] = React.useState(false);
4005
3987
  const [isFocus, setIsFocus] = React.useState(false);
3988
+ const [innerError, setInnerError] = React.useState('');
4006
3989
  const [innerValue, setInnerValue] = React.useState('');
4007
3990
  const [innerOptions, setInnerOptions] = React.useState([]);
4008
3991
  const configStyles = compereConfigs();
@@ -4038,6 +4021,7 @@ const NewAutocomplete = ({
4038
4021
  const value = e.target.value;
4039
4022
  const currentId = e.target.id;
4040
4023
  value.length > 0 ? setShow(true) : setShow(false);
4024
+ setInnerError('');
4041
4025
  setInnerValue(value);
4042
4026
  if (value.length >= searchCount) {
4043
4027
  change({
@@ -4103,7 +4087,7 @@ const NewAutocomplete = ({
4103
4087
  backgroundColor: contentBottomRowBackgroundColor ? contentBottomRowBackgroundColor : configStyles.NEWAUTOCOMPLETE.contentBottomRowBackgroundColor
4104
4088
  }
4105
4089
  }, item[keyNames.name]);
4106
- }))) : innerOptions.length <= 0 ? /*#__PURE__*/React__default["default"].createElement("span", {
4090
+ }))) : innerOptions.length <= 0 ? innerError ? '' : /*#__PURE__*/React__default["default"].createElement("span", {
4107
4091
  style: {
4108
4092
  position: 'absolute',
4109
4093
  zIndex: '9999999999',
@@ -4144,6 +4128,9 @@ const NewAutocomplete = ({
4144
4128
  setInnerValue('');
4145
4129
  }
4146
4130
  }, [selected]);
4131
+ React.useEffect(() => {
4132
+ setInnerError(errorMessage);
4133
+ }, [errorMessage]);
4147
4134
  return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, label ? /*#__PURE__*/React__default["default"].createElement("label", {
4148
4135
  style: {
4149
4136
  color: labelColor ? labelColor : configStyles.NEWAUTOCOMPLETE.labelColor,
@@ -4197,7 +4184,7 @@ const NewAutocomplete = ({
4197
4184
  flexDirection: contentTopDirection ? contentTopDirection : configStyles.NEWAUTOCOMPLETE.contentTopDirection,
4198
4185
  boxShadow: errorMessage ? errorColor ? `0 0 0 2px ${errorColor}` : `0 0 0 2px ${configStyles.NEWAUTOCOMPLETE.errorColor}` : isFocus ? contentTopBorderActive ? contentTopBorderActive : configStyles.NEWAUTOCOMPLETE.contentTopBorderActive : isHover ? contentTopBorderHover ? contentTopBorderHover : configStyles.NEWAUTOCOMPLETE.contentTopBorderHover : contentTopBorder ? contentTopBorder : configStyles.NEWAUTOCOMPLETE.contentTopBorder
4199
4186
  }
4200
- }, props)), errorMessage ? /*#__PURE__*/React__default["default"].createElement("span", {
4187
+ }, props)), innerError ? /*#__PURE__*/React__default["default"].createElement("span", {
4201
4188
  style: {
4202
4189
  left: '0px',
4203
4190
  position: 'absolute',
@@ -4206,7 +4193,7 @@ const NewAutocomplete = ({
4206
4193
  top: marginTop ? `calc(100% + ${marginTop})` : `calc(100% + ${configStyles.INPUT.marginTop})`,
4207
4194
  maxWidth: contentTopMaxWidth ? contentTopMaxWidth : configStyles.NEWAUTOCOMPLETE.contentTopMaxWidth
4208
4195
  }
4209
- }, errorMessage) : '', optionList));
4196
+ }, innerError) : '', optionList));
4210
4197
  };
4211
4198
  NewAutocomplete.propTypes = {
4212
4199
  label: PropTypes__default["default"].string,
@@ -4291,7 +4278,6 @@ NewAutocomplete.defaultProps = {
4291
4278
  exports.Autocomplate = Autocomplate;
4292
4279
  exports.Button = Button;
4293
4280
  exports.Captcha = Captcha;
4294
- exports.Chart = Chart;
4295
4281
  exports.Checkbox = Checkbox;
4296
4282
  exports.File = File;
4297
4283
  exports.Input = Input;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xaypay/tui",
3
- "version": "0.0.96",
3
+ "version": "0.0.98",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.js",
@@ -16,6 +16,11 @@ input:-webkit-autofill:active {
16
16
  background-color: inherit !important;
17
17
  }
18
18
 
19
+ input::-ms-reveal,
20
+ input::-ms-clear {
21
+ display: none;
22
+ }
23
+
19
24
  .error-message-show {
20
25
  animation-name: error-show;
21
26
  animation-fill-mode: forwards;
@@ -33,6 +33,7 @@ export const Modal = ({
33
33
  headerColor,
34
34
  borderStyle,
35
35
  borderWidth,
36
+ borderColor,
36
37
  outsideClose,
37
38
  headerWeight,
38
39
  headerHeight,
@@ -70,6 +71,12 @@ export const Modal = ({
70
71
  }
71
72
  };
72
73
 
74
+ const handleESC = (e) => {
75
+ if (e.key === 'Escape') {
76
+ handleCloseModal();
77
+ }
78
+ };
79
+
73
80
  useEffect(() => {
74
81
  if (type === 'images') {
75
82
  if (data) {
@@ -97,9 +104,11 @@ export const Modal = ({
97
104
  }, [selected]);
98
105
 
99
106
  useEffect(() => {
107
+ document.addEventListener('keydown', handleESC, false);
100
108
  return () => {
101
109
  setSelect(0);
102
110
  setInnerData([]);
111
+ document.removeEventListener('keydown', handleESC, false);
103
112
  }
104
113
  }, []);
105
114
 
@@ -216,7 +225,8 @@ export const Modal = ({
216
225
  justifyContent: 'center',
217
226
  overflow: 'auto',
218
227
  borderWidth: borderWidth ? borderWidth : configStyles.MODAL.borderWidth,
219
- borderStyle: borderStyle ? borderStyle : configStyles.MODAL.borderStyle
228
+ borderStyle: borderStyle ? borderStyle : configStyles.MODAL.borderStyle,
229
+ borderColor: borderColor ? borderColor : configStyles.MODAL.borderColor,
220
230
  }}
221
231
  >
222
232
  {
@@ -87,6 +87,7 @@ export const NewAutocomplete = ({
87
87
  const [show, setShow] = useState(false);
88
88
  const [isHover, setIsHover] = useState(false);
89
89
  const [isFocus, setIsFocus] = useState(false);
90
+ const [innerError, setInnerError] = useState('');
90
91
  const [innerValue, setInnerValue] = useState('');
91
92
  const [innerOptions, setInnerOptions] = useState([]);
92
93
  const configStyles = compereConfigs();
@@ -131,6 +132,7 @@ export const NewAutocomplete = ({
131
132
  const value = e.target.value;
132
133
  const currentId = e.target.id;
133
134
  value.length > 0 ? setShow(true) : setShow(false);
135
+ setInnerError('');
134
136
  setInnerValue(value);
135
137
  if (value.length >= searchCount) {
136
138
  change({ name: value, id: currentId });
@@ -218,7 +220,7 @@ export const NewAutocomplete = ({
218
220
  </div>
219
221
  : innerOptions.length <= 0
220
222
  ?
221
- <span
223
+ innerError ? '' : <span
222
224
  style={{
223
225
  position: 'absolute',
224
226
  zIndex: '9999999999',
@@ -276,6 +278,10 @@ export const NewAutocomplete = ({
276
278
  setInnerValue('');
277
279
  }
278
280
  }, [selected]);
281
+
282
+ useEffect(() => {
283
+ setInnerError(errorMessage);
284
+ }, [errorMessage]);
279
285
 
280
286
  return (
281
287
  <>
@@ -351,7 +357,7 @@ export const NewAutocomplete = ({
351
357
  />
352
358
 
353
359
  {
354
- errorMessage
360
+ innerError
355
361
  ? <span
356
362
  style={{
357
363
  left: '0px',
@@ -362,7 +368,7 @@ export const NewAutocomplete = ({
362
368
  maxWidth: contentTopMaxWidth ? contentTopMaxWidth : configStyles.NEWAUTOCOMPLETE.contentTopMaxWidth,
363
369
  }}
364
370
  >
365
- {errorMessage}
371
+ {innerError}
366
372
  </span>
367
373
  : ''
368
374
  }
@@ -108,103 +108,111 @@ export const Pagination = ({
108
108
 
109
109
  let lastPage = paginationRange[paginationRange.length - 1];
110
110
  return (
111
- <ul className={classProps}>
112
- <button
113
- style={{
114
- transform: 'rotate(180deg)'
115
- }}
116
- onClick={onPrevious}
117
- disabled={currentPage === 1 ? true : false}
118
- className={`${styles["pagination-btn"]} pagination-btn-rem`}
119
- >
120
- <SvgNextarrow />
121
- </button>
111
+ <div
112
+ style={{
113
+ display: 'flex',
114
+ margin: '0 auto',
115
+ alignItems: 'center',
116
+ justifyContent: 'center',
117
+ }}
118
+ >
119
+ <ul className={classProps}>
120
+ <button
121
+ style={{
122
+ transform: 'rotate(180deg)'
123
+ }}
124
+ onClick={onPrevious}
125
+ disabled={currentPageNumber === 1 ? true : false}
126
+ className={`${styles["pagination-btn"]} pagination-btn-rem`}
127
+ >
128
+ <SvgNextarrow />
129
+ </button>
130
+
131
+ {paginationRange.map((pageNumber, id) => {
132
+ if (pageNumber === Dots) {
133
+ let currentPageIndex = paginationRange.indexOf(currentPageNumber);
134
+ return (
135
+ <li
136
+ key={id}
137
+ className={classnames(
138
+ `${styles["pagination-jump-next"]} pagination-jump-next-rem`,
139
+ styles.listItem
140
+ )}
141
+ onClick={
142
+ id < currentPageIndex
143
+ ? onPreviousFive
144
+ : onNextFive
145
+ }
146
+ disabled={currentPageIndex === 0 ? true : false}
147
+ >
148
+ {id < currentPageIndex ? (
149
+ <>
150
+ <span
151
+ className={
152
+ `${styles["pagination-jump-next-txt"]} pagination-jump-next-txt-rem`
153
+ }
154
+ >
155
+ <DotsIcon />
156
+ </span>
157
+ <span
158
+ className={
159
+ `${styles["pagination-jump-next-arrow"]} pagination-jump-next-arrow-rem`
160
+ }
161
+ style={{
162
+ transform: 'rotate(180deg)'
163
+ }}
164
+ >
165
+ <SvgNextarrow />
166
+ </span>
167
+ </>
168
+ ) : (
169
+ <>
170
+ <span
171
+ className={
172
+ `${styles["pagination-jump-next-txt"]} pagination-jump-next-txt-rem`
173
+ }
174
+ >
175
+ <DotsIcon />
176
+ </span>
177
+ <span
178
+ className={
179
+ `${styles["pagination-jump-next-arrow"]} pagination-jump-next-arrow-rem`
180
+ }
181
+ >
182
+ <SvgNextarrow />
183
+ </span>
184
+ </>
185
+ )}
186
+ </li>
187
+ );
188
+ }
122
189
 
123
- {paginationRange.map((pageNumber, id) => {
124
- if (pageNumber === Dots) {
125
- let currentPageIndex = paginationRange.indexOf(currentPageNumber);
126
190
  return (
127
191
  <li
192
+ onClick={() => onPageChange(pageNumber)}
128
193
  key={id}
129
194
  className={classnames(
130
- `${styles["pagination-jump-next"]} pagination-jump-next-rem`,
131
- styles.listItem
195
+ `${
196
+ pageNumber === currentPageNumber
197
+ ? styles.selected
198
+ : styles.listItem
199
+ }`,
200
+ `${styles["pagination-item"]} pagination-item-rem`
132
201
  )}
133
- onClick={
134
- id < currentPageIndex
135
- ? onPreviousFive
136
- : onNextFive
137
- }
138
- disabled={currentPageIndex === 0 ? true : false}
139
202
  >
140
- {id < currentPageIndex ? (
141
- <>
142
- <span
143
- className={
144
- `${styles["pagination-jump-next-txt"]} pagination-jump-next-txt-rem`
145
- }
146
- >
147
- <DotsIcon />
148
- </span>
149
- <span
150
- className={
151
- `${styles["pagination-jump-next-arrow"]} pagination-jump-next-arrow-rem`
152
- }
153
- style={{
154
- transform: 'rotate(180deg)'
155
- }}
156
- >
157
- <SvgNextarrow />
158
- </span>
159
- </>
160
- ) : (
161
- <>
162
- <span
163
- className={
164
- `${styles["pagination-jump-next-txt"]} pagination-jump-next-txt-rem`
165
- }
166
- >
167
- <DotsIcon />
168
- </span>
169
- <span
170
- className={
171
- `${styles["pagination-jump-next-arrow"]} pagination-jump-next-arrow-rem`
172
- }
173
- >
174
- <SvgNextarrow />
175
- </span>
176
- </>
177
- )}
203
+ {pageNumber}
178
204
  </li>
179
205
  );
180
- }
181
-
182
- return (
183
- <li
184
- onClick={() => onPageChange(pageNumber)}
185
- key={id}
186
- className={classnames(
187
- `${
188
- pageNumber === currentPageNumber
189
- ? styles.selected
190
- : styles.listItem
191
- }`,
192
- `${styles["pagination-item"]} pagination-item-rem`
193
- )}
194
- >
195
- {pageNumber}
196
- </li>
197
- );
198
- })}
199
-
200
- <button
201
- onClick={onNext}
202
- disabled={currentPageNumber === lastPage ? true : false}
203
- className={`${styles["pagination-btn"]} pagination-btn-rem`}
204
- >
205
- <SvgNextarrow />
206
- </button>
206
+ })}
207
207
 
208
+ <button
209
+ onClick={onNext}
210
+ disabled={currentPageNumber === lastPage ? true : false}
211
+ className={`${styles["pagination-btn"]} pagination-btn-rem`}
212
+ >
213
+ <SvgNextarrow />
214
+ </button>
215
+ </ul>
208
216
  {
209
217
  goTo && <div>
210
218
  <input
@@ -234,7 +242,7 @@ export const Pagination = ({
234
242
  >Էջ</span>
235
243
  </div>
236
244
  }
237
- </ul>
245
+ </div>
238
246
  );
239
247
  };
240
248
 
package/src/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  export * from './components/file';
2
- export * from './components/chart';
3
2
  export * from './components/table';
4
3
  export * from './components/modal';
5
4
  export * from './components/input';
package/tui.config.js CHANGED
@@ -397,6 +397,7 @@ module.exports = {
397
397
  layerBackgroundColor: 'rgba(0,0,0,0.4)', // for modal parent layer background color
398
398
  borderWidth: '20px', // for modal padding from border transparent
399
399
  borderStyle: 'solid', // for modal border style
400
+ borderColor: 'transparent', // for modal border color
400
401
  },
401
402
  // default properties for <Table /> component
402
403
  TABLE: {
File without changes
@@ -1,16 +0,0 @@
1
- import React from "react";
2
- import { Chart } from './index';
3
-
4
- export default {
5
- component: Chart,
6
- title: "Components/Chart",
7
- };
8
-
9
- const Template = (args) => {
10
- return <Chart width={500} height={200} {...args} />;
11
- };
12
-
13
- export const Default = Template.bind({});
14
- Default.args = {
15
-
16
- };
@@ -1,42 +0,0 @@
1
- import React, { useEffect } from 'react';
2
- import PropTypes from 'prop-types';
3
- import { compereConfigs } from './../../utils';
4
-
5
- import styles from "./chart.module.css";
6
-
7
- export const Chart = ({
8
- width,
9
- height
10
- }) => {
11
- const configStyles = compereConfigs();
12
- useEffect(() => {
13
- const canvas = document.getElementById('myChart');
14
- // const canvas = canvasRef.current;
15
- const ctx = canvas.getContext('2d');
16
-
17
- const data = [10, 20, 30, 15, 25];
18
- const barWidth = 40;
19
- const chartHeight = 200;
20
-
21
- ctx.clearRect(0, 0, canvas.width, canvas.height);
22
-
23
- data.forEach((value, index) => {
24
- const x = index * (barWidth + 10);
25
- const y = chartHeight - value;
26
-
27
- ctx.fillStyle = 'blue';
28
- ctx.fillRect(x, y, barWidth, value);
29
- });
30
-
31
- }, []);
32
-
33
-
34
- return (
35
- <canvas id='myChart' width={width} height={height}></canvas>
36
- );
37
- };
38
-
39
- Chart.propTypes = {
40
- width: PropTypes.number,
41
- height: PropTypes.number,
42
- };