@capillarytech/blaze-ui 6.3.0 → 6.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/CapDateRangePicker/index.d.ts.map +1 -1
  2. package/CapDateRangePicker/index.js +1 -5
  3. package/CapDateRangePicker/styles.css +0 -28
  4. package/CapDateRangePicker/styles.module.scss.js +1 -2
  5. package/CapDateRangePicker/styles.scss +0 -37
  6. package/CapDateRangePicker/types.d.ts +0 -5
  7. package/CapDateRangePicker/types.d.ts.map +1 -1
  8. package/CapDragAndDrop/index.d.ts +3 -19
  9. package/CapDragAndDrop/index.d.ts.map +1 -1
  10. package/CapDragAndDrop/index.js +24 -29
  11. package/CapDragAndDrop/messages.d.ts +25 -0
  12. package/CapDragAndDrop/messages.d.ts.map +1 -0
  13. package/CapDragAndDrop/messages.js +28 -0
  14. package/CapDragAndDrop/styles.css +17 -15
  15. package/CapDragAndDrop/styles.module.scss.js +21 -0
  16. package/CapDragAndDrop/styles.scss +18 -16
  17. package/CapDragAndDrop/types.d.ts +17 -0
  18. package/CapDragAndDrop/types.d.ts.map +1 -0
  19. package/CapMobileDateRangePicker/ReactMobileDatePickerModule.d.ts.map +1 -1
  20. package/CapMobileDateRangePicker/ReactMobileDatePickerModule.js +1 -2
  21. package/CapMobileDateRangePicker/index.d.ts +21 -5
  22. package/CapMobileDateRangePicker/index.d.ts.map +1 -1
  23. package/CapMobileDateRangePicker/index.js +309 -262
  24. package/CapMobileDateRangePicker/styles.css +144 -107
  25. package/CapMobileDateRangePicker/styles.scss +192 -188
  26. package/CapTimeline/CapTimelineCard.d.ts +4 -27
  27. package/CapTimeline/CapTimelineCard.d.ts.map +1 -1
  28. package/CapTimeline/CapTimelineCard.js +40 -157
  29. package/CapTimeline/CapTimelinePanesWrapper.d.ts +4 -25
  30. package/CapTimeline/CapTimelinePanesWrapper.d.ts.map +1 -1
  31. package/CapTimeline/CapTimelinePanesWrapper.js +24 -20
  32. package/CapTimeline/index.d.ts +2 -17
  33. package/CapTimeline/index.d.ts.map +1 -1
  34. package/CapTimeline/index.js +62 -23
  35. package/CapTimeline/messages.d.ts +21 -0
  36. package/CapTimeline/messages.d.ts.map +1 -0
  37. package/CapTimeline/messages.js +24 -0
  38. package/CapTimeline/styles.css +40 -40
  39. package/CapTimeline/styles.module.scss.js +30 -0
  40. package/CapTimeline/styles.scss +76 -57
  41. package/CapTimeline/tests/CapTimeline.mockData.d.ts +14 -0
  42. package/CapTimeline/tests/CapTimeline.mockData.d.ts.map +1 -0
  43. package/CapTimeline/types.d.ts +60 -0
  44. package/CapTimeline/types.d.ts.map +1 -0
  45. package/CapTimeline/types.js +1 -0
  46. package/index.d.ts +4 -2
  47. package/index.d.ts.map +1 -1
  48. package/index.js +99 -97
  49. package/package.json +1 -1
  50. package/utils/dayjs.d.ts +0 -29
  51. package/utils/dayjs.d.ts.map +1 -1
  52. package/utils/dayjs.js +0 -30
  53. package/utils/getCapThemeConfig.d.ts.map +1 -1
  54. package/utils/getCapThemeConfig.js +9 -1
  55. package/CapMobileDateRangePicker/DateRangeInputSelectors.d.ts +0 -7
  56. package/CapMobileDateRangePicker/DateRangeInputSelectors.d.ts.map +0 -1
  57. package/CapMobileDateRangePicker/DateRangeInputSelectors.js +0 -68
  58. package/CapMobileDateRangePicker/messages.d.ts +0 -17
  59. package/CapMobileDateRangePicker/messages.d.ts.map +0 -1
  60. package/CapMobileDateRangePicker/messages.js +0 -20
  61. package/CapMobileDateRangePicker/styles.module.scss.js +0 -21
  62. package/CapMobileDateRangePicker/tests/CapMobileDateRangePicker.mockData.d.ts +0 -18
  63. package/CapMobileDateRangePicker/tests/CapMobileDateRangePicker.mockData.d.ts.map +0 -1
  64. package/CapMobileDateRangePicker/types.d.ts +0 -95
  65. package/CapMobileDateRangePicker/types.d.ts.map +0 -1
  66. package/CapVirtualSelect/actions.d.ts +0 -16
  67. package/CapVirtualSelect/actions.d.ts.map +0 -1
  68. package/CapVirtualSelect/actions.js +0 -21
  69. package/CapVirtualSelect/constants.d.ts +0 -13
  70. package/CapVirtualSelect/constants.d.ts.map +0 -1
  71. package/CapVirtualSelect/constants.js +0 -26
  72. package/CapVirtualSelect/index.d.ts +0 -169
  73. package/CapVirtualSelect/index.d.ts.map +0 -1
  74. package/CapVirtualSelect/index.js +0 -409
  75. package/CapVirtualSelect/messages.d.ts +0 -9
  76. package/CapVirtualSelect/messages.d.ts.map +0 -1
  77. package/CapVirtualSelect/messages.js +0 -12
  78. package/CapVirtualSelect/reducer.d.ts +0 -4
  79. package/CapVirtualSelect/reducer.d.ts.map +0 -1
  80. package/CapVirtualSelect/reducer.js +0 -63
  81. package/CapVirtualSelect/saga.d.ts +0 -40
  82. package/CapVirtualSelect/saga.d.ts.map +0 -1
  83. package/CapVirtualSelect/saga.js +0 -91
  84. package/CapVirtualSelect/selectors.d.ts +0 -28
  85. package/CapVirtualSelect/selectors.d.ts.map +0 -1
  86. package/CapVirtualSelect/selectors.js +0 -30
  87. package/CapVirtualSelect/styles.css +0 -110
  88. package/CapVirtualSelect/styles.scss +0 -106
  89. package/CapVirtualSelect/tests/mockData.d.ts +0 -7
  90. package/CapVirtualSelect/tests/mockData.d.ts.map +0 -1
  91. package/CapVirtualSelect/utils.d.ts +0 -2
  92. package/CapVirtualSelect/utils.d.ts.map +0 -1
  93. package/CapVirtualSelect/utils.js +0 -12
  94. /package/{CapMobileDateRangePicker → CapDragAndDrop}/types.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../components/CapDateRangePicker/index.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B,OAAO,iCAAiC,CAAC;;AA8OzC,wBAAyD;AACzD,YAAY,EAAE,uBAAuB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../components/CapDateRangePicker/index.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B,OAAO,iCAAiC,CAAC;;AA0OzC,wBAAyD;AACzD,YAAY,EAAE,uBAAuB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC"}
@@ -47,7 +47,6 @@ const CapDateRangePicker = ({
47
47
  open,
48
48
  onOpenChange,
49
49
  suffixIcon,
50
- isSingleMonthRangePicker = false,
51
50
  ...rest
52
51
  }) => {
53
52
  logDeprecationWarning(
@@ -174,10 +173,7 @@ const CapDateRangePicker = ({
174
173
  popupClassName: classNames(
175
174
  `${commonClsPrefix}-dropdown`,
176
175
  `${clsPrefix}-dropdown`,
177
- finalPopupClassName,
178
- {
179
- [styles[`${clsPrefix}--single-month-range-picker`]]: isSingleMonthRangePicker
180
- }
176
+ finalPopupClassName
181
177
  ),
182
178
  popupStyle: finalPopupStyle,
183
179
  getPopupContainer: finalGetPopupContainer,
@@ -32,32 +32,4 @@
32
32
  padding: 0;
33
33
  border: 0;
34
34
  overflow: hidden;
35
- }
36
- .cap-date-range-picker-v2--single-month-range-picker {
37
- --ant-size-popup-arrow: 0;
38
- }
39
- .cap-date-range-picker-v2--single-month-range-picker .ant-picker-header {
40
- --ant-color-icon: $CAP_G01;
41
- }
42
- .cap-date-range-picker-v2--single-month-range-picker .ant-picker-panels {
43
- position: relative;
44
- }
45
- .cap-date-range-picker-v2--single-month-range-picker .ant-picker-panel:last-of-type {
46
- position: absolute;
47
- top: 0;
48
- left: 0;
49
- right: 0;
50
- width: 100% !important;
51
- }
52
- .cap-date-range-picker-v2--single-month-range-picker .ant-picker-panel:last-of-type .ant-picker-header-view {
53
- display: none;
54
- }
55
- .cap-date-range-picker-v2--single-month-range-picker .ant-picker-panel:last-of-type .ant-picker-header {
56
- position: absolute;
57
- right: 0.143rem;
58
- height: 3rem;
59
- width: unset;
60
- }
61
- .cap-date-range-picker-v2--single-month-range-picker .ant-picker-panel:last-of-type .ant-picker-body {
62
- display: none;
63
35
  }
@@ -1,8 +1,7 @@
1
1
  import './styles.css';const styles = {
2
2
  "cap-date-range-picker-v2__timezone-footer": "cap-date-range-picker-v2__timezone-footer",
3
3
  "cap-icon": "cap-icon",
4
- "cap-date-range-picker-v2--calendar-only": "cap-date-range-picker-v2--calendar-only",
5
- "cap-date-range-picker-v2--single-month-range-picker": "cap-date-range-picker-v2--single-month-range-picker"
4
+ "cap-date-range-picker-v2--calendar-only": "cap-date-range-picker-v2--calendar-only"
6
5
  };
7
6
  export {
8
7
  styles as default
@@ -38,41 +38,4 @@ $clsPrefix: 'cap-date-range-picker-v2';
38
38
  }
39
39
  }
40
40
  }
41
-
42
- &--single-month-range-picker {
43
- :global {
44
- --ant-size-popup-arrow: 0;
45
-
46
- .ant-picker-header {
47
- --ant-color-icon: $CAP_G01;
48
- }
49
-
50
- .ant-picker-panels {
51
- position: relative;
52
- }
53
-
54
- .ant-picker-panel:last-of-type {
55
- position: absolute;
56
- top: 0;
57
- left: 0;
58
- right: 0;
59
- width: 100% !important;
60
-
61
- .ant-picker-header-view {
62
- display: none;
63
- }
64
-
65
- .ant-picker-header {
66
- position: absolute;
67
- right: 0.143rem;
68
- height: 3rem;
69
- width: unset;
70
- }
71
-
72
- .ant-picker-body {
73
- display: none;
74
- }
75
- }
76
- }
77
- }
78
41
  }
@@ -138,10 +138,5 @@ export interface CapDateRangePickerProps extends Omit<RangePickerProps, 'value'
138
138
  * @deprecated Use `autoFocus` instead. Will be removed in next major version.
139
139
  */
140
140
  autoFocusEndDate?: boolean;
141
- /**
142
- * Whether to show a single month range picker
143
- * @default false
144
- */
145
- isSingleMonthRangePicker?: boolean;
146
141
  }
147
142
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../components/CapDateRangePicker/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,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G,IAAI,CAAC;IAEhC;;;OAGG;IACH,cAAc,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IAE9B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAElC;;;OAGG;IACH,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAElC;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAEtD;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK,OAAO,CAAC;IAEvC;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B"}
@@ -4,24 +4,8 @@
4
4
  *
5
5
  */
6
6
  import React from 'react';
7
- import './styles.scss';
8
- declare const _default: React.ComponentType<Omit<{
9
- setacceptedfiles: any;
10
- setrejectedfiles: any;
11
- accept?: {
12
- 'text/csv': string[];
13
- 'application/vnd.ms-excel': string[];
14
- };
15
- maxfilesize?: number;
16
- minfilesize?: number;
17
- multiple?: boolean;
18
- dropboxwidth?: string;
19
- dropboxtext: any;
20
- selectFilesText: any;
21
- droptext: any;
22
- invalidFileSelectionText: any;
23
- or: any;
24
- className: any;
25
- } & import("react-intl").WrappedComponentProps, "intl">>;
7
+ import type { WrappedComponentProps } from 'react-intl';
8
+ import type { CapDragAndDropProps } from './types';
9
+ declare const _default: React.ComponentType<Omit<CapDragAndDropProps & WrappedComponentProps, "intl">>;
26
10
  export default _default;
27
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../components/CapDragAndDrop/index.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAsB,MAAM,OAAO,CAAC;AAU3C,OAAO,eAAe,CAAC;;;;;;;;;;;;;;;;;;;AAsGvB,wBAAoE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../components/CapDragAndDrop/index.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAsB,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAUxD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;;AA4GnD,wBAA0C"}
@@ -1,16 +1,16 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import classNames from "classnames";
3
3
  import { isEmpty } from "lodash";
4
- import PropTypes from "prop-types";
5
4
  import { useCallback } from "react";
6
5
  import { useDropzone } from "react-dropzone";
6
+ import { injectIntl } from "react-intl";
7
7
  import addFileSvg from "../assets/images/file-selector.svg.js";
8
8
  import CapButton from "../CapButton/index.js";
9
9
  import CapImage from "../CapImage/index.js";
10
10
  import CapRow from "../CapRow/index.js";
11
- import LocaleHoc from "../LocaleHoc/index.js";
12
11
  import { defaultMinFileSize, defaultMaxFileSize, defaultAcceptedFiles, small } from "./constants.js";
13
- import './styles.css';/* empty css */
12
+ import messages from "./messages.js";
13
+ import styles from "./styles.module.scss.js";
14
14
  const clsPrefix = "cap-drag-and-drop-v1";
15
15
  const CapDragAndDrop = ({
16
16
  setacceptedfiles,
@@ -25,8 +25,14 @@ const CapDragAndDrop = ({
25
25
  droptext,
26
26
  invalidFileSelectionText,
27
27
  or,
28
- className
28
+ className,
29
+ intl: { formatMessage }
29
30
  }) => {
31
+ const displayDropboxtext = dropboxtext ?? formatMessage(messages.dropboxtext);
32
+ const displaySelectFilesText = selectFilesText ?? formatMessage(messages.selectFilesText);
33
+ const displayDroptext = droptext ?? formatMessage(messages.droptext);
34
+ const displayInvalidFileSelectionText = invalidFileSelectionText ?? formatMessage(messages.invalidFileSelectionText);
35
+ const displayOr = or ?? formatMessage(messages.or);
30
36
  const onDrop = useCallback(
31
37
  (filesAccepted, filesRejected) => {
32
38
  if (multiple) {
@@ -52,40 +58,29 @@ const CapDragAndDrop = ({
52
58
  maxSize: maxfilesize,
53
59
  minSize: minfilesize
54
60
  });
55
- return /* @__PURE__ */ jsx(CapRow, { className: classNames("uploadFileSlideBoxContent", className), children: /* @__PURE__ */ jsx(CapRow, { "data-testid": "dragZoneCapColumn", type: "flex", children: /* @__PURE__ */ jsxs(
61
+ return /* @__PURE__ */ jsx(CapRow, { useLegacy: true, className: classNames("uploadFileSlideBoxContent", className), children: /* @__PURE__ */ jsx(CapRow, { useLegacy: true, "data-testid": "dragZoneCapColumn", type: "flex", children: /* @__PURE__ */ jsxs(
56
62
  "div",
57
63
  {
58
- className: classNames(`${clsPrefix}-main-div`, `${clsPrefix}-${dropboxwidth}`),
64
+ className: classNames(
65
+ styles[`${clsPrefix}-main-div`],
66
+ styles[`${clsPrefix}-${dropboxwidth}`]
67
+ ),
59
68
  ...getRootProps({ isDragAccept, isDragReject }),
60
69
  children: [
61
- /* @__PURE__ */ jsx("input", { ...getInputProps(), className: "cap-drag-and-drop-input" }),
62
- !isDragActive && /* @__PURE__ */ jsxs(CapRow, { "data-testid": "dragZone", className: "dragInactiveText", children: [
63
- /* @__PURE__ */ jsx(CapRow, { className: "fileUploadImage", children: /* @__PURE__ */ jsx(CapImage, { src: addFileSvg, alt: "default" }) }),
64
- /* @__PURE__ */ jsx(CapRow, { className: classNames(`${clsPrefix}-dropboxtext`), children: dropboxtext }),
65
- /* @__PURE__ */ jsx(CapRow, { className: "intermediateOR", children: or }),
66
- /* @__PURE__ */ jsx(CapRow, { className: classNames(`${clsPrefix}-uploadButton`), children: /* @__PURE__ */ jsx(CapButton, { type: "secondary", children: selectFilesText }) })
70
+ /* @__PURE__ */ jsx("input", { ...getInputProps(), className: styles["cap-drag-and-drop-input"] }),
71
+ !isDragActive && /* @__PURE__ */ jsxs(CapRow, { "data-testid": "dragZone", useLegacy: true, className: styles["dragInactiveText"], children: [
72
+ /* @__PURE__ */ jsx(CapRow, { useLegacy: true, className: styles["fileUploadImage"], children: /* @__PURE__ */ jsx(CapImage, { src: addFileSvg, alt: "default" }) }),
73
+ /* @__PURE__ */ jsx(CapRow, { useLegacy: true, className: styles[`${clsPrefix}-dropBoxText`], children: displayDropboxtext }),
74
+ /* @__PURE__ */ jsx(CapRow, { useLegacy: true, className: styles["intermediateOR"], children: displayOr }),
75
+ /* @__PURE__ */ jsx(CapRow, { useLegacy: true, className: styles[`${clsPrefix}-uploadButton`], children: /* @__PURE__ */ jsx(CapButton, { type: "secondary", children: displaySelectFilesText }) })
67
76
  ] }),
68
- isDragReject && /* @__PURE__ */ jsx(CapRow, { className: "drag-active-section", children: invalidFileSelectionText }),
69
- isDragAccept && /* @__PURE__ */ jsx(CapRow, { className: "drag-active-section", children: droptext })
77
+ isDragReject && /* @__PURE__ */ jsx(CapRow, { useLegacy: true, className: styles["drag-active-section"], children: displayInvalidFileSelectionText }),
78
+ isDragAccept && /* @__PURE__ */ jsx(CapRow, { useLegacy: true, className: styles["drag-active-section"], children: displayDroptext })
70
79
  ]
71
80
  }
72
81
  ) }) });
73
82
  };
74
- CapDragAndDrop.propTypes = {
75
- setacceptedfiles: PropTypes.func.isRequired,
76
- setrejectedfiles: PropTypes.func,
77
- accept: PropTypes.object,
78
- maxfilesize: PropTypes.number,
79
- multiple: PropTypes.bool,
80
- dropboxwidth: PropTypes.string,
81
- dropboxtext: PropTypes.string,
82
- className: PropTypes.string
83
- };
84
- CapDragAndDrop.defaultProps = {
85
- dropboxwidth: small,
86
- multiple: true
87
- };
88
- const index = LocaleHoc(CapDragAndDrop, { key: "CapDragAndDrop" });
83
+ const index = injectIntl(CapDragAndDrop);
89
84
  export {
90
85
  index as default
91
86
  };
@@ -0,0 +1,25 @@
1
+ export declare const scope = "app.commonUtils.capUiLibrary.CapDragAndDrop";
2
+ declare const _default: {
3
+ dropboxtext: {
4
+ id: string;
5
+ defaultMessage: string;
6
+ };
7
+ selectFilesText: {
8
+ id: string;
9
+ defaultMessage: string;
10
+ };
11
+ droptext: {
12
+ id: string;
13
+ defaultMessage: string;
14
+ };
15
+ invalidFileSelectionText: {
16
+ id: string;
17
+ defaultMessage: string;
18
+ };
19
+ or: {
20
+ id: string;
21
+ defaultMessage: string;
22
+ };
23
+ };
24
+ export default _default;
25
+ //# sourceMappingURL=messages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../components/CapDragAndDrop/messages.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK,gDAAgD,CAAC;;;;;;;;;;;;;;;;;;;;;;;AAEnE,wBAqBG"}
@@ -0,0 +1,28 @@
1
+ import { defineMessages } from "react-intl";
2
+ const scope = "app.commonUtils.capUiLibrary.CapDragAndDrop";
3
+ const messages = defineMessages({
4
+ dropboxtext: {
5
+ id: `${scope}.dropboxtext`,
6
+ defaultMessage: "Drop here!"
7
+ },
8
+ selectFilesText: {
9
+ id: `${scope}.selectFilesText`,
10
+ defaultMessage: "Select files from your computer"
11
+ },
12
+ droptext: {
13
+ id: `${scope}.droptext`,
14
+ defaultMessage: "Drag and drop files"
15
+ },
16
+ invalidFileSelectionText: {
17
+ id: `${scope}.invalidFileSelectionText`,
18
+ defaultMessage: "Invalid file selection!"
19
+ },
20
+ or: {
21
+ id: `${scope}.or`,
22
+ defaultMessage: "OR"
23
+ }
24
+ });
25
+ export {
26
+ messages as default,
27
+ scope
28
+ };
@@ -10,30 +10,31 @@
10
10
  display: flex;
11
11
  flex-direction: column;
12
12
  align-items: center;
13
- padding: 30px 158px;
14
- gap: 10px;
13
+ padding: 2.143rem 11.286rem;
14
+ gap: 0.714rem;
15
15
  background: #ffffff;
16
- border: 2px dashed #ebecf0;
17
- border-radius: 5px;
18
- border-width: 3px;
19
- height: 285px;
16
+ border: 0.143rem dashed #ebecf0;
17
+ border-radius: 0.357rem;
18
+ border-width: 0.214rem;
19
+ height: 20.357rem;
20
20
  }
21
21
  .cap-drag-and-drop-v1-size-r {
22
- width: 495px;
22
+ width: 35.357rem;
23
23
  }
24
24
  .cap-drag-and-drop-v1-size-s {
25
- width: 322px;
25
+ width: 23rem;
26
26
  }
27
27
  .dragInactiveText {
28
+ display: block;
28
29
  font-weight: 500;
29
30
  font-size: 1.428rem;
30
- line-height: 30px;
31
+ line-height: 1.875rem;
31
32
  text-align: center;
32
- width: 300px;
33
+ width: 21.429rem;
33
34
  }
34
35
  .intermediateOR {
35
- margin-top: 17px;
36
- margin-bottom: 13px;
36
+ margin-top: 1.214rem;
37
+ margin-bottom: 0.929rem;
37
38
  font-weight: 400;
38
39
  font-size: 1.142rem;
39
40
  line-height: 1.714rem;
@@ -41,17 +42,18 @@
41
42
  color: #091e42;
42
43
  }
43
44
  .fileUploadImage {
44
- margin-bottom: 31px;
45
+ margin-bottom: 2.214rem;
45
46
  }
46
47
  .cap-drag-and-drop-v1-uploadButton {
47
- margin-bottom: 10px;
48
+ margin-bottom: 0.714rem;
48
49
  }
49
50
  .cap-drag-and-drop-v1-dropBoxText {
50
51
  white-space: initial;
51
52
  word-break: break-word;
53
+ font-size: 1.428rem;
52
54
  }
53
55
  .drag-active-section {
54
- width: 200px;
56
+ width: 14.286rem;
55
57
  text-align: center;
56
58
  }
57
59
  .cap-drag-and-drop-input {
@@ -0,0 +1,21 @@
1
+ import './styles.css';const dragInactiveText = "dragInactiveText";
2
+ const intermediateOR = "intermediateOR";
3
+ const fileUploadImage = "fileUploadImage";
4
+ const styles = {
5
+ "cap-drag-and-drop-v1-main-div": "cap-drag-and-drop-v1-main-div",
6
+ "cap-drag-and-drop-v1-size-r": "cap-drag-and-drop-v1-size-r",
7
+ "cap-drag-and-drop-v1-size-s": "cap-drag-and-drop-v1-size-s",
8
+ dragInactiveText,
9
+ intermediateOR,
10
+ fileUploadImage,
11
+ "cap-drag-and-drop-v1-uploadButton": "cap-drag-and-drop-v1-uploadButton",
12
+ "cap-drag-and-drop-v1-dropBoxText": "cap-drag-and-drop-v1-dropBoxText",
13
+ "drag-active-section": "drag-active-section",
14
+ "cap-drag-and-drop-input": "cap-drag-and-drop-input"
15
+ };
16
+ export {
17
+ styles as default,
18
+ dragInactiveText,
19
+ fileUploadImage,
20
+ intermediateOR
21
+ };
@@ -1,36 +1,37 @@
1
- @import "../styles/_variables.scss";
1
+ @import '../styles/_variables.scss';
2
2
 
3
3
  .cap-drag-and-drop-v1-main-div {
4
4
  display: flex;
5
5
  flex-direction: column;
6
6
  align-items: center;
7
- padding: 30px 158px;
8
- gap: 10px;
7
+ padding: 2.143rem 11.286rem; // 30px 158px
8
+ gap: 0.714rem; // 10px
9
9
  background: $CAP_WHITE;
10
- border: 2px dashed $CAP_G08;
11
- border-radius: 5px;
12
- border-width: 3px;
13
- height: 285px;
10
+ border: 0.143rem dashed $CAP_G08; // 2px
11
+ border-radius: 0.357rem; // 5px
12
+ border-width: 0.214rem; // 3px
13
+ height: 20.357rem; // 285px
14
14
  }
15
15
 
16
16
  .cap-drag-and-drop-v1-size-r {
17
- width: 495px;
17
+ width: 35.357rem; // 495px
18
18
  }
19
19
  .cap-drag-and-drop-v1-size-s {
20
- width: 322px;
20
+ width: 23rem; // 322px
21
21
  }
22
22
 
23
23
  .dragInactiveText {
24
+ display: block;
24
25
  font-weight: 500;
25
26
  font-size: $CAP_SPACE_20;
26
- line-height: 30px;
27
+ line-height: 1.875rem;
27
28
  text-align: center;
28
- width: 300px;
29
+ width: 21.429rem; // 300px
29
30
  }
30
31
 
31
32
  .intermediateOR {
32
- margin-top: 17px;
33
- margin-bottom: 13px;
33
+ margin-top: 1.214rem; // 17px
34
+ margin-bottom: 0.929rem; // 13px
34
35
  font-weight: $FONT_WEIGHT_REGULAR;
35
36
  font-size: $CAP_SPACE_16;
36
37
  line-height: $CAP_SPACE_24;
@@ -39,19 +40,20 @@
39
40
  }
40
41
 
41
42
  .fileUploadImage {
42
- margin-bottom: 31px;
43
+ margin-bottom: 2.214rem; // 31px
43
44
  }
44
45
 
45
46
  .cap-drag-and-drop-v1-uploadButton {
46
- margin-bottom: 10px;
47
+ margin-bottom: 0.714rem; // 10px
47
48
  }
48
49
  .cap-drag-and-drop-v1-dropBoxText {
49
50
  white-space: initial;
50
51
  word-break: break-word;
52
+ font-size: $CAP_SPACE_20;
51
53
  }
52
54
 
53
55
  .drag-active-section {
54
- width: 200px;
56
+ width: 14.286rem; // 200px
55
57
  text-align: center;
56
58
  }
57
59
 
@@ -0,0 +1,17 @@
1
+ import type React from 'react';
2
+ export interface CapDragAndDropProps {
3
+ setacceptedfiles: (value: File[] | ((prev: File[]) => File[])) => void;
4
+ setrejectedfiles?: (value: unknown) => void;
5
+ accept?: Record<string, string[]>;
6
+ maxfilesize?: number;
7
+ minfilesize?: number;
8
+ multiple?: boolean;
9
+ dropboxwidth?: string;
10
+ dropboxtext?: string;
11
+ selectFilesText?: string;
12
+ droptext?: string;
13
+ invalidFileSelectionText?: string;
14
+ or?: React.ReactNode;
15
+ className?: string;
16
+ }
17
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../components/CapDragAndDrop/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,mBAAmB;IAClC,gBAAgB,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;IACvE,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,EAAE,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -1 +1 @@
1
- {"version":3,"file":"ReactMobileDatePickerModule.d.ts","sourceRoot":"","sources":["../../components/CapMobileDateRangePicker/ReactMobileDatePickerModule.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,QAAA,MAAM,qBAAqB,KAA4C,CAAC;AACxE,eAAe,qBAAqB,CAAC"}
1
+ {"version":3,"file":"ReactMobileDatePickerModule.d.ts","sourceRoot":"","sources":["../../components/CapMobileDateRangePicker/ReactMobileDatePickerModule.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,QAAA,MAAM,qBAAqB,KAAqC,CAAC;AACjE,eAAe,qBAAqB,CAAC"}
@@ -1,5 +1,4 @@
1
- const mod = require("./ReactMobileDatePicker");
2
- const ReactMobileDatePicker = mod && mod.__esModule ? mod.default : mod;
1
+ const ReactMobileDatePicker = require("./ReactMobileDatePicker");
3
2
  export {
4
3
  ReactMobileDatePicker as default
5
4
  };
@@ -4,9 +4,25 @@
4
4
  *
5
5
  */
6
6
  import React from 'react';
7
- import type { CapMobileDateRangePickerProps } from './types';
8
- export declare const clsPrefix = "cap-mobile-date-range-picker";
9
- declare const _default: React.ComponentType<Omit<CapMobileDateRangePickerProps, "intl">>;
10
- export default _default;
11
- export type { CapMobileDateRangePickerProps } from './types';
7
+ import './styles.scss';
8
+ declare class CapMobileDateRangePicker extends React.Component {
9
+ constructor(props: any);
10
+ componentWillReceiveProps(nextProps: any): void;
11
+ handleDatePickerVisible: (val: any) => void;
12
+ handleModalVisible: () => void;
13
+ checkIfSameDate: (d1: any, d2: any) => boolean;
14
+ toggleFocusedInput: (inputType: string, onClickHandler: any) => void;
15
+ handleDateRangeChange: (date: any) => void;
16
+ handleOnSelect: (date: any) => void;
17
+ checkIfDateDisabled: (current: any) => boolean;
18
+ formatDate: (date: any) => Date;
19
+ checkMaxDateForScrollDatepicker: () => Date;
20
+ checkMinDateForScrollDatepicker: () => Date;
21
+ resetDate: () => void;
22
+ handleCancel: () => void;
23
+ handleDone: () => void;
24
+ getDaySize: () => number;
25
+ render(): import("react/jsx-runtime").JSX.Element;
26
+ }
27
+ export default CapMobileDateRangePicker;
12
28
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../components/CapMobileDateRangePicker/index.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAoD,MAAM,OAAO,CAAC;AAiBzE,OAAO,KAAK,EAAE,6BAA6B,EAAgC,MAAM,SAAS,CAAC;AAE3F,eAAO,MAAM,SAAS,iCAAiC,CAAC;;AAyTxD,wBAAmF;AACnF,YAAY,EAAE,6BAA6B,EAAE,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../components/CapMobileDateRangePicker/index.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,OAAO,eAAe,CAAC;AAmCvB,cAAM,wBAAyB,SAAQ,KAAK,CAAC,SAAS;gBACxC,KAAK,KAAA;IAYjB,yBAAyB,CAAC,SAAS,KAAA;IAcnC,uBAAuB,GAAI,QAAG,UAAyD;IAEvF,kBAAkB,aACwD;IAE1E,eAAe,GAAI,OAAE,EAAE,OAAE,aAAuD;IAEhF,kBAAkB,GAAI,iBAAc,EAAE,mBAAc,UAWlD;IAEF,qBAAqB,GAAI,SAAI,UAmD3B;IAEF,cAAc,GAAI,SAAI,UAIpB;IAEF,mBAAmB,GAAI,YAAO,aAiB5B;IAEF,UAAU,GAAI,SAAI,UAAqC;IAEvD,+BAA+B,aAO7B;IAEF,+BAA+B,aAO7B;IAEF,SAAS,aAGP;IAEF,YAAY,aAGV;IAEF,UAAU,aAOR;IAEF,UAAU,eAGR;IAEF,MAAM;CA4IP;AAqBD,eAAe,wBAAwB,CAAC"}