@activecollab/components 1.0.195 → 1.0.197
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/Button/AddToListButton/Styles.js +5 -3
- package/dist/cjs/components/Button/AddToListButton/Styles.js.map +1 -1
- package/dist/cjs/components/EditableContent/EditableContent.js +9 -3
- package/dist/cjs/components/EditableContent/EditableContent.js.map +1 -1
- package/dist/cjs/components/EditableText/EditableText.js +2 -2
- package/dist/cjs/components/EditableText/EditableText.js.map +1 -1
- package/dist/cjs/components/SelectDate/DatePickerForm.js +2 -2
- package/dist/cjs/components/SelectDate/DatePickerForm.js.map +1 -1
- package/dist/esm/components/Button/AddToListButton/Styles.d.ts +1 -1
- package/dist/esm/components/Button/AddToListButton/Styles.d.ts.map +1 -1
- package/dist/esm/components/Button/AddToListButton/Styles.js +2 -1
- package/dist/esm/components/Button/AddToListButton/Styles.js.map +1 -1
- package/dist/esm/components/EditableContent/EditableContent.d.ts +2 -1
- package/dist/esm/components/EditableContent/EditableContent.d.ts.map +1 -1
- package/dist/esm/components/EditableContent/EditableContent.js +6 -3
- package/dist/esm/components/EditableContent/EditableContent.js.map +1 -1
- package/dist/esm/components/EditableText/EditableText.d.ts +1 -1
- package/dist/esm/components/EditableText/EditableText.d.ts.map +1 -1
- package/dist/esm/components/EditableText/EditableText.js +1 -1
- package/dist/esm/components/EditableText/EditableText.js.map +1 -1
- package/dist/esm/components/SelectDate/DatePickerForm.js +1 -1
- package/dist/esm/components/SelectDate/DatePickerForm.js.map +1 -1
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +2 -2
|
@@ -7,17 +7,19 @@ exports.StyledText = exports.StyledAddToListButton = exports.StyledAddCrossIcon
|
|
|
7
7
|
|
|
8
8
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _Typography = require("../../Typography");
|
|
11
|
+
|
|
12
|
+
var _collection = require("../../Icons/collection");
|
|
11
13
|
|
|
12
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
15
|
|
|
14
|
-
var StyledText = (0, _styledComponents.default)(
|
|
16
|
+
var StyledText = (0, _styledComponents.default)(_Typography.Body2).withConfig({
|
|
15
17
|
displayName: "Styles__StyledText",
|
|
16
18
|
componentId: "sc-1fx7urq-0"
|
|
17
19
|
})(["transition:ease 0.3s all;color:var(--color-primary);position:relative;"]);
|
|
18
20
|
exports.StyledText = StyledText;
|
|
19
21
|
StyledText.displayName = "StyledText";
|
|
20
|
-
var StyledAddCrossIcon = (0, _styledComponents.default)(
|
|
22
|
+
var StyledAddCrossIcon = (0, _styledComponents.default)(_collection.AddCrossIcon).withConfig({
|
|
21
23
|
displayName: "Styles__StyledAddCrossIcon",
|
|
22
24
|
componentId: "sc-1fx7urq-1"
|
|
23
25
|
})(["fill:var(--page-paper-main);background:var(--color-primary);border-radius:30px;padding:7px;box-sizing:content-box;"]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/Button/AddToListButton/Styles.ts"],"names":["StyledText","Body2","displayName","StyledAddCrossIcon","AddCrossIcon","StyledAddToListButton"],"mappings":";;;;;;;AAAA;;AACA;;;;AAEO,IAAMA,UAAU,GAAG,+BAAOC,
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/Button/AddToListButton/Styles.ts"],"names":["StyledText","Body2","displayName","StyledAddCrossIcon","AddCrossIcon","StyledAddToListButton"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;AAEO,IAAMA,UAAU,GAAG,+BAAOC,iBAAP,CAAH;AAAA;AAAA;AAAA,8EAAhB;;AAMPD,UAAU,CAACE,WAAX,GAAyB,YAAzB;AAEO,IAAMC,kBAAkB,GAAG,+BAAOC,wBAAP,CAAH;AAAA;AAAA;AAAA,0HAAxB;;AAOPD,kBAAkB,CAACD,WAAnB,GAAiC,oBAAjC;AAEO,IAAMG,qBAAqB,GAAG,+BAAO,QAAP,CAAH;AAAA;AAAA;AAAA,mgBA0B5BL,UA1B4B,EAqC5BG,kBArC4B,CAA3B;;AA6CPE,qBAAqB,CAACH,WAAtB,GAAoC,uBAApC","sourcesContent":["import styled from \"styled-components\";\nimport { Body2 } from \"../../Typography\";\nimport { AddCrossIcon } from \"../../Icons/collection\";\n\nexport const StyledText = styled(Body2)`\n transition: ease 0.3s all;\n color: var(--color-primary);\n position: relative;\n`;\n\nStyledText.displayName = \"StyledText\";\n\nexport const StyledAddCrossIcon = styled(AddCrossIcon)`\n fill: var(--page-paper-main);\n background: var(--color-primary);\n border-radius: 30px;\n padding: 7px;\n box-sizing: content-box;\n`;\nStyledAddCrossIcon.displayName = \"StyledAddCrossIcon\";\n\nexport const StyledAddToListButton = styled(\"button\")`\n display: flex;\n justify-content: center;\n gap: 12px;\n align-items: center;\n height: 32px;\n padding: 4px 16px 4px 4px;\n position: relative;\n background: none;\n border: none;\n cursor: pointer;\n\n &:before {\n content: \"\";\n display: block;\n height: 2px;\n width: 0%;\n position: absolute;\n left: 16px;\n background: var(--color-primary);\n transition: ease 0.3s all;\n border-radius: 30px;\n opacity: 0;\n }\n\n &:hover {\n ${StyledText} {\n color: var(--page-paper-main);\n }\n\n &:before {\n height: 32px;\n width: 100%;\n left: 0;\n opacity: 1;\n }\n\n ${StyledAddCrossIcon} {\n fill: var(--page-paper-main);\n transform: rotate(90deg);\n transition: ease 0.3s;\n }\n }\n`;\n\nStyledAddToListButton.displayName = \"StyledAddToListButton\";\n"],"file":"Styles.js"}
|
|
@@ -9,9 +9,13 @@ exports.EditableContent = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
+
var _useForkRef = _interopRequireDefault(require("../../utils/useForkRef"));
|
|
13
|
+
|
|
12
14
|
var _Styles = require("./Styles");
|
|
13
15
|
|
|
14
|
-
var _excluded = ["className", "variant", "weight", "disabled", "inputProps"];
|
|
16
|
+
var _excluded = ["className", "variant", "weight", "disabled", "inputProps", "wrapRef"];
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
19
|
|
|
16
20
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
21
|
|
|
@@ -31,9 +35,11 @@ var EditableContent = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
31
35
|
_ref$disabled = _ref.disabled,
|
|
32
36
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
33
37
|
inputProps = _ref.inputProps,
|
|
38
|
+
wrapRef = _ref.wrapRef,
|
|
34
39
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
35
40
|
|
|
36
41
|
var intInputRef = (0, _react.useRef)(null);
|
|
42
|
+
var handleRef = (0, _useForkRef.default)(ref, intInputRef);
|
|
37
43
|
var handleBlur = (0, _react.useCallback)(function (evt) {
|
|
38
44
|
var _intInputRef$current;
|
|
39
45
|
|
|
@@ -42,14 +48,14 @@ var EditableContent = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
42
48
|
}, [inputProps]);
|
|
43
49
|
return /*#__PURE__*/_react.default.createElement(_Styles.StyledDiv, _extends({
|
|
44
50
|
className: className,
|
|
45
|
-
ref:
|
|
51
|
+
ref: wrapRef
|
|
46
52
|
}, props), /*#__PURE__*/_react.default.createElement(_Styles.StyledSpan, {
|
|
47
53
|
variant: variant,
|
|
48
54
|
forwardedAs: "span",
|
|
49
55
|
weight: weight,
|
|
50
56
|
$disabled: disabled
|
|
51
57
|
}, inputProps === null || inputProps === void 0 ? void 0 : inputProps.value), /*#__PURE__*/_react.default.createElement(_Styles.StyledInput, _extends({}, inputProps, {
|
|
52
|
-
ref:
|
|
58
|
+
ref: handleRef,
|
|
53
59
|
forwardedAs: "input",
|
|
54
60
|
variant: variant,
|
|
55
61
|
weight: weight,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/EditableContent/EditableContent.tsx"],"names":["EditableContent","ref","className","variant","weight","disabled","inputProps","props","intInputRef","handleBlur","evt","current","setSelectionRange","onBlur","value","displayName"],"mappings":";;;;;;;;;AAAA;;AAEA
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/EditableContent/EditableContent.tsx"],"names":["EditableContent","ref","className","variant","weight","disabled","inputProps","wrapRef","props","intInputRef","handleRef","handleBlur","evt","current","setSelectionRange","onBlur","value","displayName"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEA;;;;;;;;;;;;;;;;AAeO,IAAMA,eAAe,gBAAG,uBAK7B,gBAUEC,GAVF,EAWK;AAAA,MATDC,SASC,QATDA,SASC;AAAA,0BARDC,OAQC;AAAA,MARDA,OAQC,6BARS,QAQT;AAAA,MAPDC,MAOC,QAPDA,MAOC;AAAA,2BANDC,QAMC;AAAA,MANDA,QAMC,8BANU,KAMV;AAAA,MALDC,UAKC,QALDA,UAKC;AAAA,MAJDC,OAIC,QAJDA,OAIC;AAAA,MAHEC,KAGF;;AACH,MAAMC,WAAW,GAAG,mBAAyB,IAAzB,CAApB;AACA,MAAMC,SAAS,GAAG,yBAAWT,GAAX,EAAgBQ,WAAhB,CAAlB;AAEA,MAAME,UAAU,GAAG,wBACjB,UAACC,GAAD,EAAS;AAAA;;AACPH,IAAAA,WAAW,SAAX,IAAAA,WAAW,WAAX,oCAAAA,WAAW,CAAEI,OAAb,8EAAsBC,iBAAtB,CAAwC,CAAxC,EAA2C,CAA3C;AACA,YAAOR,UAAP,aAAOA,UAAP,uBAAOA,UAAU,CAAES,MAAnB,qBAA4CT,UAA5C,aAA4CA,UAA5C,uBAA4CA,UAAU,CAAES,MAAZ,CAAmBH,GAAnB,CAA5C;AACD,GAJgB,EAKjB,CAACN,UAAD,CALiB,CAAnB;AAQA,sBACE,6BAAC,iBAAD;AAAW,IAAA,SAAS,EAAEJ,SAAtB;AAAiC,IAAA,GAAG,EAAEK;AAAtC,KAAmDC,KAAnD,gBACE,6BAAC,kBAAD;AACE,IAAA,OAAO,EAAEL,OADX;AAEE,IAAA,WAAW,EAAC,MAFd;AAGE,IAAA,MAAM,EAAEC,MAHV;AAIE,IAAA,SAAS,EAAEC;AAJb,KAMGC,UANH,aAMGA,UANH,uBAMGA,UAAU,CAAEU,KANf,CADF,eASE,6BAAC,mBAAD,eACMV,UADN;AAEE,IAAA,GAAG,EAAEI,SAFP;AAGE,IAAA,WAAW,EAAC,OAHd;AAIE,IAAA,OAAO,EAAEP,OAJX;AAKE,IAAA,MAAM,EAAEC,MALV;AAME,IAAA,KAAK,EAAEE,UAAF,aAAEA,UAAF,uBAAEA,UAAU,CAAEU,KANrB;AAOE,IAAA,MAAM,EAAEL,UAPV;AAQE,IAAA,QAAQ,EAAEN;AARZ,KATF,CADF;AAsBD,CAlD4B,CAAxB;;AAqDPL,eAAe,CAACiB,WAAhB,GAA8B,iBAA9B","sourcesContent":["import React, { forwardRef, Ref, useRef, useCallback } from \"react\";\nimport useForkRef from \"../../utils/useForkRef\";\nimport { Variant } from \"../Typography/Typography\";\nimport { StyledDiv, StyledInput, StyledSpan } from \"./Styles\";\n\nexport interface EditableContentInterface {\n /** Typography variant. */\n variant?: Variant;\n /** Typography weight. */\n weight?: \"light\" | \"regular\" | \"bold\" | \"medium\";\n /** Input props. */\n inputProps?: Partial<React.ComponentPropsWithoutRef<\"input\">>;\n /** Disable edit mode. */\n disabled?: boolean;\n /** Wrapper reference. */\n wrapRef?: Ref<HTMLDivElement>;\n}\n\nexport const EditableContent = forwardRef<\n HTMLDivElement,\n EditableContentInterface &\n Omit<React.ComponentPropsWithoutRef<\"div\">, keyof EditableContentInterface>\n>(\n (\n {\n className,\n variant = \"Body 2\",\n weight,\n disabled = false,\n inputProps,\n wrapRef,\n ...props\n },\n ref\n ) => {\n const intInputRef = useRef<HTMLInputElement>(null);\n const handleRef = useForkRef(ref, intInputRef);\n\n const handleBlur = useCallback(\n (evt) => {\n intInputRef?.current?.setSelectionRange(0, 0);\n typeof inputProps?.onBlur === `function` && inputProps?.onBlur(evt);\n },\n [inputProps]\n );\n\n return (\n <StyledDiv className={className} ref={wrapRef} {...props}>\n <StyledSpan\n variant={variant}\n forwardedAs=\"span\"\n weight={weight}\n $disabled={disabled}\n >\n {inputProps?.value}\n </StyledSpan>\n <StyledInput\n {...inputProps}\n ref={handleRef}\n forwardedAs=\"input\"\n variant={variant}\n weight={weight}\n value={inputProps?.value}\n onBlur={handleBlur}\n disabled={disabled}\n />\n </StyledDiv>\n );\n }\n);\n\nEditableContent.displayName = \"EditableContent\";\n"],"file":"EditableContent.js"}
|
|
@@ -9,7 +9,7 @@ exports.EditableText = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _EditableContent = require("../EditableContent/EditableContent");
|
|
13
13
|
|
|
14
14
|
var _excluded = ["onSave", "onCancel", "value", "inputProps"];
|
|
15
15
|
|
|
@@ -87,7 +87,7 @@ var EditableText = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
87
87
|
var handleChange = (0, _react.useCallback)(function (e) {
|
|
88
88
|
setCurrentValue(e.target.value);
|
|
89
89
|
}, []);
|
|
90
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
90
|
+
return /*#__PURE__*/_react.default.createElement(_EditableContent.EditableContent, _extends({}, props, {
|
|
91
91
|
ref: ref,
|
|
92
92
|
inputProps: _objectSpread(_objectSpread({}, inputProps), {}, {
|
|
93
93
|
value: currentValue,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/EditableText/EditableText.tsx"],"names":["EditableText","ref","onSave","onCancel","value","inputProps","props","currentValue","setCurrentValue","prevValue","setPrevValue","escapeRef","handleBlur","e","current","target","trim","length","handleKeyDown","key","blur","handleChange","onBlur","onKeyDown","onChange","type","className","displayName"],"mappings":";;;;;;;;;AAAA;;AAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/EditableText/EditableText.tsx"],"names":["EditableText","ref","onSave","onCancel","value","inputProps","props","currentValue","setCurrentValue","prevValue","setPrevValue","escapeRef","handleBlur","e","current","target","trim","length","handleKeyDown","key","blur","handleChange","onBlur","onKeyDown","onChange","type","className","displayName"],"mappings":";;;;;;;;;AAAA;;AAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcO,IAAMA,YAAY,gBAAG,uBAC1B,gBAAoDC,GAApD,EAA4D;AAAA,MAAzDC,MAAyD,QAAzDA,MAAyD;AAAA,MAAjDC,QAAiD,QAAjDA,QAAiD;AAAA,MAAvCC,KAAuC,QAAvCA,KAAuC;AAAA,MAAhCC,UAAgC,QAAhCA,UAAgC;AAAA,MAAjBC,KAAiB;;AAC1D,kBAAwC,qBAASF,KAAT,CAAxC;AAAA;AAAA,MAAOG,YAAP;AAAA,MAAqBC,eAArB;;AACA,mBAAkC,qBAASJ,KAAT,CAAlC;AAAA;AAAA,MAAOK,SAAP;AAAA,MAAkBC,YAAlB;;AACA,MAAMC,SAAS,GAAG,mBAAO,KAAP,CAAlB;AAEA,MAAMC,UAAU,GAAG,wBACjB,UAACC,CAAD,EAAO;AACL,QAAIF,SAAS,CAACG,OAAd,EAAuB;AACrBN,MAAAA,eAAe,CAACC,SAAD,CAAf;AACAE,MAAAA,SAAS,CAACG,OAAV,GAAoB,KAApB;AACD,KAHD,MAGO;AACL,UACED,CAAC,CAACE,MAAF,CAASX,KAAT,CAAeY,IAAf,GAAsBC,MAAtB,GAA+B,CAA/B,IACAR,SAAS,KAAKI,CAAC,CAACE,MAAF,CA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AA2B,cAA3B","sourcesContent":["import React, {\n ChangeEvent,\n forwardRef,\n useCallback,\n useRef,\n useState,\n} from \"react\";\nimport {\n EditableContent,\n EditableContentInterface,\n} from \"../EditableContent/EditableContent\";\n\nexport interface EditableTextInterface extends EditableContentInterface {\n /** Value to display. */\n value: string;\n /** Optional callback called on enter, click outside and tab. */\n onSave?: (e: ChangeEvent<HTMLInputElement>) => void;\n /** Optional callback called on input reset. */\n onCancel?: () => void;\n}\n\nexport const EditableText = forwardRef<HTMLDivElement, EditableTextInterface>(\n ({ onSave, onCancel, value, inputProps, ...props }, ref) => {\n const [currentValue, setCurrentValue] = useState(value);\n const [prevValue, setPrevValue] = useState(value);\n const escapeRef = useRef(false);\n\n const handleBlur = useCallback(\n (e) => {\n if (escapeRef.current) {\n setCurrentValue(prevValue);\n escapeRef.current = false;\n } else {\n if (\n e.target.value.trim().length > 0 &&\n prevValue !== e.target.value\n ) {\n setPrevValue(e.target.value);\n setCurrentValue(e.target.value);\n typeof onSave === \"function\" && onSave(e);\n } else {\n setCurrentValue(prevValue);\n }\n }\n },\n [onSave, prevValue]\n );\n\n const handleKeyDown = useCallback(\n (e) => {\n if (e.key === \"Enter\") {\n e.target.blur();\n }\n if (e.key === \"Escape\") {\n escapeRef.current = true;\n e.target.blur();\n typeof onCancel === \"function\" && onCancel();\n }\n },\n [onCancel]\n );\n\n const handleChange = useCallback((e) => {\n setCurrentValue(e.target.value);\n }, []);\n\n return (\n <EditableContent\n {...props}\n ref={ref}\n inputProps={{\n ...inputProps,\n value: currentValue,\n onBlur: handleBlur,\n onKeyDown: handleKeyDown,\n onChange: handleChange,\n type: \"text\",\n className: \"c-input\",\n }}\n />\n );\n }\n);\n\nEditableText.displayName = \"EditableText\";\n"],"file":"EditableText.js"}
|
|
@@ -11,7 +11,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _moment = _interopRequireDefault(require("react-day-picker/moment"));
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _DatePicker = require("../DatePicker/DatePicker");
|
|
15
15
|
|
|
16
16
|
var _Button = require("../Button/Button");
|
|
17
17
|
|
|
@@ -64,7 +64,7 @@ var DatePickerForm = function DatePickerForm(_ref) {
|
|
|
64
64
|
onKeyDown: handleOnKeyDown,
|
|
65
65
|
tabIndex: -1,
|
|
66
66
|
className: "date-picker-form"
|
|
67
|
-
}, /*#__PURE__*/_react.default.createElement(_Styles.StyledSelectDateDatePicker, null, /*#__PURE__*/_react.default.createElement(
|
|
67
|
+
}, /*#__PURE__*/_react.default.createElement(_Styles.StyledSelectDateDatePicker, null, /*#__PURE__*/_react.default.createElement(_DatePicker.DatePicker, {
|
|
68
68
|
month: month,
|
|
69
69
|
onMonthChange: onMonthChange,
|
|
70
70
|
onChange: onChange,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/SelectDate/DatePickerForm.tsx"],"names":["DatePickerForm","mode","saveButtonText","cancelButtonText","clearButtonText","onSave","onCancel","onClear","dateRequired","firstDayOfWeek","selectedDays","selectionMode","onChange","onDayClick","onMonthChange","month","disabledSaveButton","modifiers","renderDay","handleOnKeyDown","e","key","MomentLocaleUtils","zIndex","displayName"],"mappings":";;;;;;;;;AAAA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAuCO,IAAMA,cAAmC,GAAG,SAAtCA,cAAsC,OAmB7C;AAAA,MAlBJC,IAkBI,QAlBJA,IAkBI;AAAA,iCAjBJC,cAiBI;AAAA,MAjBJA,cAiBI,oCAjBa,MAiBb;AAAA,mCAhBJC,gBAgBI;AAAA,MAhBJA,gBAgBI,sCAhBe,QAgBf;AAAA,kCAfJC,eAeI;AAAA,MAfJA,eAeI,qCAfc,OAed;AAAA,MAdJC,MAcI,QAdJA,MAcI;AAAA,MAbJC,QAaI,QAbJA,QAaI;AAAA,MAZJC,OAYI,QAZJA,OAYI;AAAA,+BAXJC,YAWI;AAAA,MAXJA,YAWI,kCAXW,KAWX;AAAA,iCAVJC,cAUI;AAAA,MAVJA,cAUI,oCAVa,CAUb;AAAA,MATJC,YASI,QATJA,YASI;AAAA,gCARJC,aAQI;AAAA,MARJA,aAQI,mCARY,QAQZ;AAAA,MAPJC,QAOI,QAPJA,QAOI;AAAA,MANJC,UAMI,QANJA,UAMI;AAAA,MALJC,aAKI,QALJA,aAKI;AAAA,MAJJC,KAII,QAJJA,KAII;AAAA,mCAHJC,kBAGI;AAAA,MAHJA,kBAGI,sCAHiB,KAGjB;AAAA,MAFJC,SAEI,QAFJA,SAEI;AAAA,MADJC,SACI,QADJA,SACI;AACJ,MAAMC,eAAe,GAAG,wBACtB,UAACC,CAAD,EAAO;AACL,QAAIA,CAAC,CAACC,GAAF,KAAU,OAAV,IAAqB,OAAOhB,MAAP,KAAkB,UAA3C,EAAuD;AACrDA,MAAAA,MAAM;AACP,KAFD,MAEO,IACL,CAACe,CAAC,CAACC,GAAF,KAAU,KAAV,IAAmBD,CAAC,CAACC,GAAF,KAAU,QAA9B,KACA,OAAOf,QAAP,KAAoB,UAFf,EAGL;AACAA,MAAAA,QAAQ,CAACc,CAAD,CAAR;AACD;AACF,GAVqB,EAWtB,CAACf,MAAD,EAASC,QAAT,CAXsB,CAAxB;AAcA,sBACE;AAAK,IAAA,SAAS,EAAEa,eAAhB;AAAiC,IAAA,QAAQ,EAAE,CAAC,CAA5C;AAA+C,IAAA,SAAS,EAAC;AAAzD,kBACE,6BAAC,kCAAD,qBACE,6BAAC,
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/SelectDate/DatePickerForm.tsx"],"names":["DatePickerForm","mode","saveButtonText","cancelButtonText","clearButtonText","onSave","onCancel","onClear","dateRequired","firstDayOfWeek","selectedDays","selectionMode","onChange","onDayClick","onMonthChange","month","disabledSaveButton","modifiers","renderDay","handleOnKeyDown","e","key","MomentLocaleUtils","zIndex","displayName"],"mappings":";;;;;;;;;AAAA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAu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,eALH,CADD,GAQG,IAzBN,CADD,GA6BC,CAACI,YAAD,iBACE,6BAAC,gCAAD;AACE,IAAA,IAAI,EAAC,OADP;AAEE,IAAA,OAAO,EAAED,OAFX;AAGE,IAAA,OAAO,EAAC;AAHV,KAKGH,eALH,CA/BN,CADD,GA0CG,IA1DN,CADF;AA8DD,CAhGM;;;AAkGPJ,cAAc,CAACwB,WAAf,GAA6B,gBAA7B","sourcesContent":["import React, { FC, ReactNode, MouseEvent, useCallback } from \"react\";\nimport { RangeModifier, Modifiers, DayModifiers } from \"react-day-picker\";\nimport MomentLocaleUtils from \"react-day-picker/moment\";\nimport { DatePicker } from \"../DatePicker/DatePicker\";\nimport { Button } from \"../Button/Button\";\nimport CancelCrossIcon from \"../Icons/collection/CancelCross\";\nimport { Tooltip } from \"../Tooltip/Tooltip\";\nimport {\n StyledButtonClose,\n StyledButtonCloseColored,\n StyledButtonSave,\n StyledSelectDateButtons,\n StyledSelectDateDatePicker,\n StyledSelectDateFooter,\n} from \"./Styles\";\n\ninterface IDatePickerForm {\n mode: \"instant\" | \"atomic\";\n saveButtonText?: string;\n cancelButtonText?: string;\n clearButtonText?: string;\n onSave?: () => void;\n onCancel?: (event: MouseEvent<HTMLElement>) => void;\n onClear?: () => void;\n onChange?: (dates?: { from: Date; to: Date }) => void;\n /** Called when day is clicked */\n onDayClick?: (day: Date, modifiers: DayModifiers) => void;\n /** Set selected day or days */\n selectedDays?: RangeModifier;\n /** Modifiers */\n modifiers?: Partial<Modifiers>;\n /** Render day callback */\n renderDay?: (date: Date, modifiers: DayModifiers) => ReactNode;\n /** Set selection range */\n selectionMode?: string;\n /** Set is date required */\n dateRequired?: boolean;\n /** Set first day of week */\n firstDayOfWeek?: number;\n /** on month change callback */\n onMonthChange?: (month: Date) => void;\n /** Selected month */\n month: Date;\n disabledSaveButton?: boolean;\n}\n\nexport const DatePickerForm: FC<IDatePickerForm> = ({\n mode,\n saveButtonText = \"Save\",\n cancelButtonText = \"Cancel\",\n clearButtonText = \"Clear\",\n onSave,\n onCancel,\n onClear,\n dateRequired = false,\n firstDayOfWeek = 0,\n selectedDays,\n selectionMode = \"custom\",\n onChange,\n onDayClick,\n onMonthChange,\n month,\n disabledSaveButton = false,\n modifiers,\n renderDay,\n}) => {\n const handleOnKeyDown = useCallback(\n (e) => {\n if (e.key === \"Enter\" && typeof onSave === \"function\") {\n onSave();\n } else if (\n (e.key === \"Esc\" || e.key === \"Escape\") &&\n typeof onCancel === \"function\"\n ) {\n onCancel(e);\n }\n },\n [onSave, onCancel]\n );\n\n return (\n <div onKeyDown={handleOnKeyDown} tabIndex={-1} className=\"date-picker-form\">\n <StyledSelectDateDatePicker>\n <DatePicker\n month={month}\n onMonthChange={onMonthChange}\n onChange={onChange}\n onDayClick={onDayClick}\n selectedDays={selectedDays}\n selectionMode={selectionMode}\n dateRequired={dateRequired}\n firstDayOfWeek={firstDayOfWeek}\n modifiers={modifiers}\n renderDay={renderDay}\n localeUtils={MomentLocaleUtils}\n />\n </StyledSelectDateDatePicker>\n {mode === \"atomic\" || !dateRequired ? (\n <StyledSelectDateFooter className=\"date-picker-footer\" $mode={mode}>\n {mode === \"atomic\" ? (\n <StyledSelectDateButtons className=\"date-picker-buttons\">\n <StyledButtonSave\n size=\"small\"\n variant=\"primary\"\n onClick={onSave}\n disabled={disabledSaveButton}\n >\n {saveButtonText}\n </StyledButtonSave>\n <Tooltip\n title={cancelButtonText}\n popperTooltipStyle={{ zIndex: 1301 }}\n >\n <Button size=\"small\" variant=\"text gray\" onClick={onCancel}>\n <CancelCrossIcon />\n </Button>\n </Tooltip>\n {!dateRequired ? (\n <StyledButtonClose\n size=\"small\"\n onClick={onClear}\n variant=\"text gray\"\n >\n {clearButtonText}\n </StyledButtonClose>\n ) : null}\n </StyledSelectDateButtons>\n ) : (\n !dateRequired && (\n <StyledButtonCloseColored\n size=\"small\"\n onClick={onClear}\n variant=\"text colored\"\n >\n {clearButtonText}\n </StyledButtonCloseColored>\n )\n )}\n </StyledSelectDateFooter>\n ) : null}\n </div>\n );\n};\n\nDatePickerForm.displayName = \"DatePickerForm\";\n"],"file":"DatePickerForm.js"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const StyledText: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("
|
|
2
|
+
export declare const StyledText: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../Typography").IBodyProps & Omit<import("../../Typography/Typography").ITypographyProps, "variant" | "weight"> & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
3
3
|
export declare const StyledAddCrossIcon: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Pick<import("react").SVGProps<SVGSVGElement>, "string" | "style" | "clipPath" | "filter" | "mask" | "path" | "key" | "css" | "name" | "type" | "className" | "id" | "lang" | "tabIndex" | "role" | "color" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "tw" | "ideographic" | "alphabetic" | "hanging" | "mathematical" | "height" | "max" | "media" | "method" | "min" | "target" | "width" | "crossOrigin" | "accentHeight" | "accumulate" | "additive" | "alignmentBaseline" | "allowReorder" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "azimuth" | "baseFrequency" | "baselineShift" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clip" | "clipPathUnits" | "clipRule" | "colorInterpolation" | "colorInterpolationFilters" | "colorProfile" | "colorRendering" | "contentScriptType" | "contentStyleType" | "cursor" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "direction" | "display" | "divisor" | "dominantBaseline" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "end" | "exponent" | "externalResourcesRequired" | "fill" | "fillOpacity" | "fillRule" | "filterRes" | "filterUnits" | "floodColor" | "floodOpacity" | "focusable" | "fontFamily" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "format" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphOrientationVertical" | "glyphRef" | "gradientTransform" | "gradientUnits" | "horizAdvX" | "horizOriginX" | "href" | "imageRendering" | "in2" | "in" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "letterSpacing" | "lightingColor" | "limitingConeAngle" | "local" | "markerEnd" | "markerHeight" | "markerMid" | "markerStart" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mode" | "numOctaves" | "offset" | "opacity" | "operator" | "order" | "orient" | "orientation" | "origin" | "overflow" | "overlinePosition" | "overlineThickness" | "paintOrder" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "pointerEvents" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rotate" | "rx" | "ry" | "scale" | "seed" | "shapeRendering" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "stopColor" | "stopOpacity" | "strikethroughPosition" | "strikethroughThickness" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textAnchor" | "textDecoration" | "textLength" | "textRendering" | "to" | "transform" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeBidi" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "values" | "vectorEffect" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewBox" | "viewTarget" | "visibility" | "vMathematical" | "widths" | "wordSpacing" | "writingMode" | "x1" | "x2" | "x" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "y" | "yChannelSelector" | "z" | "zoomAndPan"> & import("react").RefAttributes<SVGSVGElement>>, any, {}, never>;
|
|
4
4
|
export declare const StyledAddToListButton: import("styled-components").StyledComponent<"button", any, {}, never>;
|
|
5
5
|
//# sourceMappingURL=Styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/AddToListButton/Styles.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Button/AddToListButton/Styles.ts"],"names":[],"mappings":";AAIA,eAAO,MAAM,UAAU,oRAItB,CAAC;AAIF,eAAO,MAAM,kBAAkB,grPAM9B,CAAC;AAGF,eAAO,MAAM,qBAAqB,uEA2CjC,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
|
-
import {
|
|
2
|
+
import { Body2 } from "../../Typography";
|
|
3
|
+
import { AddCrossIcon } from "../../Icons/collection";
|
|
3
4
|
export var StyledText = styled(Body2).withConfig({
|
|
4
5
|
displayName: "Styles__StyledText",
|
|
5
6
|
componentId: "sc-1fx7urq-0"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/Button/AddToListButton/Styles.ts"],"names":["styled","
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/Button/AddToListButton/Styles.ts"],"names":["styled","Body2","AddCrossIcon","StyledText","displayName","StyledAddCrossIcon","StyledAddToListButton"],"mappings":"AAAA,OAAOA,MAAP,MAAmB,mBAAnB;AACA,SAASC,KAAT,QAAsB,kBAAtB;AACA,SAASC,YAAT,QAA6B,wBAA7B;AAEA,OAAO,IAAMC,UAAU,GAAGH,MAAM,CAACC,KAAD,CAAT;AAAA;AAAA;AAAA,8EAAhB;AAMPE,UAAU,CAACC,WAAX,GAAyB,YAAzB;AAEA,OAAO,IAAMC,kBAAkB,GAAGL,MAAM,CAACE,YAAD,CAAT;AAAA;AAAA;AAAA,0HAAxB;AAOPG,kBAAkB,CAACD,WAAnB,GAAiC,oBAAjC;AAEA,OAAO,IAAME,qBAAqB,GAAGN,MAAM,CAAC,QAAD,CAAT;AAAA;AAAA;AAAA,mgBA0B5BG,UA1B4B,EAqC5BE,kBArC4B,CAA3B;AA6CPC,qBAAqB,CAACF,WAAtB,GAAoC,uBAApC","sourcesContent":["import styled from \"styled-components\";\nimport { Body2 } from \"../../Typography\";\nimport { AddCrossIcon } from \"../../Icons/collection\";\n\nexport const StyledText = styled(Body2)`\n transition: ease 0.3s all;\n color: var(--color-primary);\n position: relative;\n`;\n\nStyledText.displayName = \"StyledText\";\n\nexport const StyledAddCrossIcon = styled(AddCrossIcon)`\n fill: var(--page-paper-main);\n background: var(--color-primary);\n border-radius: 30px;\n padding: 7px;\n box-sizing: content-box;\n`;\nStyledAddCrossIcon.displayName = \"StyledAddCrossIcon\";\n\nexport const StyledAddToListButton = styled(\"button\")`\n display: flex;\n justify-content: center;\n gap: 12px;\n align-items: center;\n height: 32px;\n padding: 4px 16px 4px 4px;\n position: relative;\n background: none;\n border: none;\n cursor: pointer;\n\n &:before {\n content: \"\";\n display: block;\n height: 2px;\n width: 0%;\n position: absolute;\n left: 16px;\n background: var(--color-primary);\n transition: ease 0.3s all;\n border-radius: 30px;\n opacity: 0;\n }\n\n &:hover {\n ${StyledText} {\n color: var(--page-paper-main);\n }\n\n &:before {\n height: 32px;\n width: 100%;\n left: 0;\n opacity: 1;\n }\n\n ${StyledAddCrossIcon} {\n fill: var(--page-paper-main);\n transform: rotate(90deg);\n transition: ease 0.3s;\n }\n }\n`;\n\nStyledAddToListButton.displayName = \"StyledAddToListButton\";\n"],"file":"Styles.js"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { Ref } from "react";
|
|
2
2
|
import { Variant } from "../Typography/Typography";
|
|
3
3
|
export interface EditableContentInterface {
|
|
4
4
|
variant?: Variant;
|
|
5
5
|
weight?: "light" | "regular" | "bold" | "medium";
|
|
6
6
|
inputProps?: Partial<React.ComponentPropsWithoutRef<"input">>;
|
|
7
7
|
disabled?: boolean;
|
|
8
|
+
wrapRef?: Ref<HTMLDivElement>;
|
|
8
9
|
}
|
|
9
10
|
export declare const EditableContent: React.ForwardRefExoticComponent<EditableContentInterface & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "slot" | "style" | "title" | "key" | "css" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "cs" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "tw">, keyof EditableContentInterface> & React.RefAttributes<HTMLDivElement>>;
|
|
10
11
|
//# sourceMappingURL=EditableContent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditableContent.d.ts","sourceRoot":"","sources":["../../../../src/components/EditableContent/EditableContent.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"EditableContent.d.ts","sourceRoot":"","sources":["../../../../src/components/EditableContent/EditableContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAc,GAAG,EAAuB,MAAM,OAAO,CAAC;AAEpE,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAGnD,MAAM,WAAW,wBAAwB;IAEvC,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC;IAEjD,UAAU,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,wBAAwB,CAAC,OAAO,CAAC,CAAC,CAAC;IAE9D,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,OAAO,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC/B;AAED,eAAO,MAAM,eAAe,yuJAmD3B,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
var _excluded = ["className", "variant", "weight", "disabled", "inputProps"];
|
|
3
|
+
var _excluded = ["className", "variant", "weight", "disabled", "inputProps", "wrapRef"];
|
|
4
4
|
import React, { forwardRef, useRef, useCallback } from "react";
|
|
5
|
+
import useForkRef from "../../utils/useForkRef";
|
|
5
6
|
import { StyledDiv, StyledInput, StyledSpan } from "./Styles";
|
|
6
7
|
export var EditableContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
7
8
|
var className = _ref.className,
|
|
@@ -11,9 +12,11 @@ export var EditableContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
11
12
|
_ref$disabled = _ref.disabled,
|
|
12
13
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
13
14
|
inputProps = _ref.inputProps,
|
|
15
|
+
wrapRef = _ref.wrapRef,
|
|
14
16
|
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
15
17
|
|
|
16
18
|
var intInputRef = useRef(null);
|
|
19
|
+
var handleRef = useForkRef(ref, intInputRef);
|
|
17
20
|
var handleBlur = useCallback(function (evt) {
|
|
18
21
|
var _intInputRef$current;
|
|
19
22
|
|
|
@@ -22,14 +25,14 @@ export var EditableContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
22
25
|
}, [inputProps]);
|
|
23
26
|
return /*#__PURE__*/React.createElement(StyledDiv, _extends({
|
|
24
27
|
className: className,
|
|
25
|
-
ref:
|
|
28
|
+
ref: wrapRef
|
|
26
29
|
}, props), /*#__PURE__*/React.createElement(StyledSpan, {
|
|
27
30
|
variant: variant,
|
|
28
31
|
forwardedAs: "span",
|
|
29
32
|
weight: weight,
|
|
30
33
|
$disabled: disabled
|
|
31
34
|
}, inputProps == null ? void 0 : inputProps.value), /*#__PURE__*/React.createElement(StyledInput, _extends({}, inputProps, {
|
|
32
|
-
ref:
|
|
35
|
+
ref: handleRef,
|
|
33
36
|
forwardedAs: "input",
|
|
34
37
|
variant: variant,
|
|
35
38
|
weight: weight,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/EditableContent/EditableContent.tsx"],"names":["React","forwardRef","useRef","useCallback","StyledDiv","StyledInput","StyledSpan","EditableContent","ref","className","variant","weight","disabled","inputProps","props","intInputRef","handleBlur","evt","current","setSelectionRange","onBlur","value","displayName"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,UAAhB,
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/EditableContent/EditableContent.tsx"],"names":["React","forwardRef","useRef","useCallback","useForkRef","StyledDiv","StyledInput","StyledSpan","EditableContent","ref","className","variant","weight","disabled","inputProps","wrapRef","props","intInputRef","handleRef","handleBlur","evt","current","setSelectionRange","onBlur","value","displayName"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,UAAhB,EAAiCC,MAAjC,EAAyCC,WAAzC,QAA4D,OAA5D;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AAEA,SAASC,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,MAAM,EAAEC,MALV;AAME,IAAA,KAAK,EAAEE,UAAF,oBAAEA,UAAU,CAAEU,KANrB;AAOE,IAAA,MAAM,EAAEL,UAPV;AAQE,IAAA,QAAQ,EAAEN;AARZ,KATF,CADF;AAsBD,CAlDsC,CAAlC;AAqDPL,eAAe,CAACiB,WAAhB,GAA8B,iBAA9B","sourcesContent":["import React, { forwardRef, Ref, useRef, useCallback } from \"react\";\nimport useForkRef from \"../../utils/useForkRef\";\nimport { Variant } from \"../Typography/Typography\";\nimport { StyledDiv, StyledInput, StyledSpan } from \"./Styles\";\n\nexport interface EditableContentInterface {\n /** Typography variant. */\n variant?: Variant;\n /** Typography weight. */\n weight?: \"light\" | \"regular\" | \"bold\" | \"medium\";\n /** Input props. */\n inputProps?: Partial<React.ComponentPropsWithoutRef<\"input\">>;\n /** Disable edit mode. */\n disabled?: boolean;\n /** Wrapper reference. */\n wrapRef?: Ref<HTMLDivElement>;\n}\n\nexport const EditableContent = forwardRef<\n HTMLDivElement,\n EditableContentInterface &\n Omit<React.ComponentPropsWithoutRef<\"div\">, keyof EditableContentInterface>\n>(\n (\n {\n className,\n variant = \"Body 2\",\n weight,\n disabled = false,\n inputProps,\n wrapRef,\n ...props\n },\n ref\n ) => {\n const intInputRef = useRef<HTMLInputElement>(null);\n const handleRef = useForkRef(ref, intInputRef);\n\n const handleBlur = useCallback(\n (evt) => {\n intInputRef?.current?.setSelectionRange(0, 0);\n typeof inputProps?.onBlur === `function` && inputProps?.onBlur(evt);\n },\n [inputProps]\n );\n\n return (\n <StyledDiv className={className} ref={wrapRef} {...props}>\n <StyledSpan\n variant={variant}\n forwardedAs=\"span\"\n weight={weight}\n $disabled={disabled}\n >\n {inputProps?.value}\n </StyledSpan>\n <StyledInput\n {...inputProps}\n ref={handleRef}\n forwardedAs=\"input\"\n variant={variant}\n weight={weight}\n value={inputProps?.value}\n onBlur={handleBlur}\n disabled={disabled}\n />\n </StyledDiv>\n );\n }\n);\n\nEditableContent.displayName = \"EditableContent\";\n"],"file":"EditableContent.js"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { ChangeEvent } from "react";
|
|
2
|
-
import { EditableContentInterface } from "
|
|
2
|
+
import { EditableContentInterface } from "../EditableContent/EditableContent";
|
|
3
3
|
export interface EditableTextInterface extends EditableContentInterface {
|
|
4
4
|
value: string;
|
|
5
5
|
onSave?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditableText.d.ts","sourceRoot":"","sources":["../../../../src/components/EditableText/EditableText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACZ,WAAW,EAKZ,MAAM,OAAO,CAAC;AACf,OAAO,
|
|
1
|
+
{"version":3,"file":"EditableText.d.ts","sourceRoot":"","sources":["../../../../src/components/EditableText/EditableText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACZ,WAAW,EAKZ,MAAM,OAAO,CAAC;AACf,OAAO,EAEL,wBAAwB,EACzB,MAAM,oCAAoC,CAAC;AAE5C,MAAM,WAAW,qBAAsB,SAAQ,wBAAwB;IAErE,KAAK,EAAE,MAAM,CAAC;IAEd,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAEpD,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,eAAO,MAAM,YAAY,8FA6DxB,CAAC"}
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
3
|
var _excluded = ["onSave", "onCancel", "value", "inputProps"];
|
|
4
4
|
import React, { forwardRef, useCallback, useRef, useState } from "react";
|
|
5
|
-
import { EditableContent } from "
|
|
5
|
+
import { EditableContent } from "../EditableContent/EditableContent";
|
|
6
6
|
export var EditableText = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
7
7
|
var onSave = _ref.onSave,
|
|
8
8
|
onCancel = _ref.onCancel,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/EditableText/EditableText.tsx"],"names":["React","forwardRef","useCallback","useRef","useState","EditableContent","EditableText","ref","onSave","onCancel","value","inputProps","props","currentValue","setCurrentValue","prevValue","setPrevValue","escapeRef","handleBlur","e","current","target","trim","length","handleKeyDown","key","blur","handleChange","onBlur","onKeyDown","onChange","type","className","displayName"],"mappings":";;;AAAA,OAAOA,KAAP,IAEEC,UAFF,EAGEC,WAHF,EAIEC,MAJF,EAKEC,QALF,QAMO,OANP;AAOA,
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/EditableText/EditableText.tsx"],"names":["React","forwardRef","useCallback","useRef","useState","EditableContent","EditableText","ref","onSave","onCancel","value","inputProps","props","currentValue","setCurrentValue","prevValue","setPrevValue","escapeRef","handleBlur","e","current","target","trim","length","handleKeyDown","key","blur","handleChange","onBlur","onKeyDown","onChange","type","className","displayName"],"mappings":";;;AAAA,OAAOA,KAAP,IAEEC,UAFF,EAGEC,WAHF,EAIEC,MAJF,EAKEC,QALF,QAMO,OANP;AAOA,SACEC,eADF,QAGO,oCAHP;AAcA,OAAO,IAAMC,YAAY,gBAAGL,UAAU,CACpC,gBAAoDM,GAApD,EAA4D;AAAA,MAAzDC,MAAyD,QAAzDA,MAAyD;AAAA,MAAjDC,QAAiD,QAAjDA,QAAiD;AAAA,MAAvCC,KAAuC,QAAvCA,KAAuC;AAAA,MAAhCC,UAAgC,QAAhCA,UAAgC;AAAA,MAAjBC,KAAiB;;AAC1D,kBAAwCR,QAAQ,CAACM,KAAD,CAAhD;AAAA,MAAOG,YAAP;AAAA,MAAqBC,eAArB;;AACA,mBAAkCV,QAAQ,CAACM,KAAD,CAA1C;AAAA,MAAOK,SAAP;AAAA,MAAkBC,YAAlB;;AACA,MAAMC,SAAS,GAAGd,MAAM,CAAC,KAAD,CAA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AAC,eAAD,eACME,KADN;AAEE,IAAA,GAAG,EAAEL,GAFP;AAGE,IAAA,UAAU,eACLI,UADK;AAERD,MAAAA,KAAK,EAAEG,YAFC;AAGRe,MAAAA,MAAM,EAAEV,UAHA;AAIRW,MAAAA,SAAS,EAAEL,aAJH;AAKRM,MAAAA,QAAQ,EAAEH,YALF;AAMRI,MAAAA,IAAI,EAAE,MANE;AAORC,MAAAA,SAAS,EAAE;AAPH;AAHZ,KADF;AAeD,CA5DmC,CAA/B;AA+DP1B,YAAY,CAAC2B,WAAb,GAA2B,cAA3B","sourcesContent":["import React, {\n ChangeEvent,\n forwardRef,\n useCallback,\n useRef,\n useState,\n} from \"react\";\nimport {\n EditableContent,\n EditableContentInterface,\n} from \"../EditableContent/EditableContent\";\n\nexport interface EditableTextInterface extends EditableContentInterface {\n /** Value to display. */\n value: string;\n /** Optional callback called on enter, click outside and tab. */\n onSave?: (e: ChangeEvent<HTMLInputElement>) => void;\n /** Optional callback called on input reset. */\n onCancel?: () => void;\n}\n\nexport const EditableText = forwardRef<HTMLDivElement, EditableTextInterface>(\n ({ onSave, onCancel, value, inputProps, ...props }, ref) => {\n const [currentValue, setCurrentValue] = useState(value);\n const [prevValue, setPrevValue] = useState(value);\n const escapeRef = useRef(false);\n\n const handleBlur = useCallback(\n (e) => {\n if (escapeRef.current) {\n setCurrentValue(prevValue);\n escapeRef.current = false;\n } else {\n if (\n e.target.value.trim().length > 0 &&\n prevValue !== e.target.value\n ) {\n setPrevValue(e.target.value);\n setCurrentValue(e.target.value);\n typeof onSave === \"function\" && onSave(e);\n } else {\n setCurrentValue(prevValue);\n }\n }\n },\n [onSave, prevValue]\n );\n\n const handleKeyDown = useCallback(\n (e) => {\n if (e.key === \"Enter\") {\n e.target.blur();\n }\n if (e.key === \"Escape\") {\n escapeRef.current = true;\n e.target.blur();\n typeof onCancel === \"function\" && onCancel();\n }\n },\n [onCancel]\n );\n\n const handleChange = useCallback((e) => {\n setCurrentValue(e.target.value);\n }, []);\n\n return (\n <EditableContent\n {...props}\n ref={ref}\n inputProps={{\n ...inputProps,\n value: currentValue,\n onBlur: handleBlur,\n onKeyDown: handleKeyDown,\n onChange: handleChange,\n type: \"text\",\n className: \"c-input\",\n }}\n />\n );\n }\n);\n\nEditableText.displayName = \"EditableText\";\n"],"file":"EditableText.js"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useCallback } from "react";
|
|
2
2
|
import MomentLocaleUtils from "react-day-picker/moment";
|
|
3
|
-
import { DatePicker } from "
|
|
3
|
+
import { DatePicker } from "../DatePicker/DatePicker";
|
|
4
4
|
import { Button } from "../Button/Button";
|
|
5
5
|
import CancelCrossIcon from "../Icons/collection/CancelCross";
|
|
6
6
|
import { Tooltip } from "../Tooltip/Tooltip";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/SelectDate/DatePickerForm.tsx"],"names":["React","useCallback","MomentLocaleUtils","DatePicker","Button","CancelCrossIcon","Tooltip","StyledButtonClose","StyledButtonCloseColored","StyledButtonSave","StyledSelectDateButtons","StyledSelectDateDatePicker","StyledSelectDateFooter","DatePickerForm","mode","saveButtonText","cancelButtonText","clearButtonText","onSave","onCancel","onClear","dateRequired","firstDayOfWeek","selectedDays","selectionMode","onChange","onDayClick","onMonthChange","month","disabledSaveButton","modifiers","renderDay","handleOnKeyDown","e","key","zIndex","displayName"],"mappings":"AAAA,OAAOA,KAAP,IAA2CC,WAA3C,QAA8D,OAA9D;AAEA,OAAOC,iBAAP,MAA8B,yBAA9B;AACA,SAASC,UAAT,QAA2B,
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/SelectDate/DatePickerForm.tsx"],"names":["React","useCallback","MomentLocaleUtils","DatePicker","Button","CancelCrossIcon","Tooltip","StyledButtonClose","StyledButtonCloseColored","StyledButtonSave","StyledSelectDateButtons","StyledSelectDateDatePicker","StyledSelectDateFooter","DatePickerForm","mode","saveButtonText","cancelButtonText","clearButtonText","onSave","onCancel","onClear","dateRequired","firstDayOfWeek","selectedDays","selectionMode","onChange","onDayClick","onMonthChange","month","disabledSaveButton","modifiers","renderDay","handleOnKeyDown","e","key","zIndex","displayName"],"mappings":"AAAA,OAAOA,KAAP,IAA2CC,WAA3C,QAA8D,OAA9D;AAEA,OAAOC,iBAAP,MAA8B,yBAA9B;AACA,SAASC,UAAT,QAA2B,0BAA3B;AACA,SAASC,MAAT,QAAuB,kBAAvB;AACA,OAAOC,eAAP,MAA4B,iCAA5B;AACA,SAASC,OAAT,QAAwB,oBAAxB;AACA,SACEC,iBADF,EAEEC,wBAFF,EAGEC,gBAHF,EAIEC,uBAJF,EAKEC,0BALF,EAMEC,sBANF,QAOO,UAPP;AAuCA,OAAO,IAAMC,cAAmC,GAAG,SAAtCA,cAAsC,OAmB7C;AAAA,MAlBJC,IAkBI,QAlBJA,IAkBI;AAAA,iCAjBJC,cAiBI;AAAA,MAjBJA,cAiBI,oCAjBa,MAiBb;AAAA,mCAhBJC,gBAgBI;AAAA,MAhBJA,gBAgBI,sCAhBe,QAgBf;AAAA,kCAfJC,eAeI;AAAA,MAfJA,eAeI,qCAfc,OAed;AAAA,MAdJC,MAcI,QAdJA,MAcI;AAAA,MAbJC,QAaI,QAbJA,QAaI;AAAA,MAZJC,OAYI,QAZJA,OAYI;AAAA,+BAXJC,YAWI;AAAA,MAXJA,YAWI,kCAXW,KAWX;AAAA,iCAVJC,cAUI;AAAA,MAVJA,cAUI,oCAVa,CAUb;AAAA,MATJC,YASI,QATJA,YASI;AAAA,gCARJC,aAQI;AAAA,MARJA,aAQI,mCARY,QAQZ;AAAA,MAPJC,QAOI,QAPJA,QAOI;AAAA,MANJC,UAMI,QANJA,UAMI;AAAA,MALJC,aAKI,QALJA,aAKI;AAAA,MAJJC,KAII,QAJJA,KAII;AAAA,mCAHJC,kBAGI;AAAA,MAHJA,kBAGI,sCAHiB,KAGjB;AAAA,MAFJC,SAEI,QAFJA,SAEI;AAAA,MADJC,SACI,QADJA,SACI;AACJ,MAA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AA,QAAQ,EAAEW;AAJZ,KAMGd,cANH,CADF,eASE,oBAAC,OAAD;AACE,IAAA,KAAK,EAAEC,gBADT;AAEE,IAAA,kBAAkB,EAAE;AAAEmB,MAAAA,MAAM,EAAE;AAAV;AAFtB,kBAIE,oBAAC,MAAD;AAAQ,IAAA,IAAI,EAAC,OAAb;AAAqB,IAAA,OAAO,EAAC,WAA7B;AAAyC,IAAA,OAAO,EAAEhB;AAAlD,kBACE,oBAAC,eAAD,OADF,CAJF,CATF,EAiBG,CAACE,YAAD,gBACC,oBAAC,iBAAD;AACE,IAAA,IAAI,EAAC,OADP;AAEE,IAAA,OAAO,EAAED,OAFX;AAGE,IAAA,OAAO,EAAC;AAHV,KAKGH,eALH,CADD,GAQG,IAzBN,CADD,GA6BC,CAACI,YAAD,iBACE,oBAAC,wBAAD;AACE,IAAA,IAAI,EAAC,OADP;AAEE,IAAA,OAAO,EAAED,OAFX;AAGE,IAAA,OAAO,EAAC;AAHV,KAKGH,eALH,CA/BN,CADD,GA0CG,IA1DN,CADF;AA8DD,CAhGM;AAkGPJ,cAAc,CAACuB,WAAf,GAA6B,gBAA7B","sourcesContent":["import React, { FC, ReactNode, MouseEvent, useCallback } from \"react\";\nimport { RangeModifier, Modifiers, DayModifiers } from \"react-day-picker\";\nimport MomentLocaleUtils from \"react-day-picker/moment\";\nimport { DatePicker } from \"../DatePicker/DatePicker\";\nimport { Button } from \"../Button/Button\";\nimport CancelCrossIcon from \"../Icons/collection/CancelCross\";\nimport { Tooltip } from \"../Tooltip/Tooltip\";\nimport {\n StyledButtonClose,\n StyledButtonCloseColored,\n StyledButtonSave,\n StyledSelectDateButtons,\n StyledSelectDateDatePicker,\n StyledSelectDateFooter,\n} from \"./Styles\";\n\ninterface IDatePickerForm {\n mode: \"instant\" | \"atomic\";\n saveButtonText?: string;\n cancelButtonText?: string;\n clearButtonText?: string;\n onSave?: () => void;\n onCancel?: (event: MouseEvent<HTMLElement>) => void;\n onClear?: () => void;\n onChange?: (dates?: { from: Date; to: Date }) => void;\n /** Called when day is clicked */\n onDayClick?: (day: Date, modifiers: DayModifiers) => void;\n /** Set selected day or days */\n selectedDays?: RangeModifier;\n /** Modifiers */\n modifiers?: Partial<Modifiers>;\n /** Render day callback */\n renderDay?: (date: Date, modifiers: DayModifiers) => ReactNode;\n /** Set selection range */\n selectionMode?: string;\n /** Set is date required */\n dateRequired?: boolean;\n /** Set first day of week */\n firstDayOfWeek?: number;\n /** on month change callback */\n onMonthChange?: (month: Date) => void;\n /** Selected month */\n month: Date;\n disabledSaveButton?: boolean;\n}\n\nexport const DatePickerForm: FC<IDatePickerForm> = ({\n mode,\n saveButtonText = \"Save\",\n cancelButtonText = \"Cancel\",\n clearButtonText = \"Clear\",\n onSave,\n onCancel,\n onClear,\n dateRequired = false,\n firstDayOfWeek = 0,\n selectedDays,\n selectionMode = \"custom\",\n onChange,\n onDayClick,\n onMonthChange,\n month,\n disabledSaveButton = false,\n modifiers,\n renderDay,\n}) => {\n const handleOnKeyDown = useCallback(\n (e) => {\n if (e.key === \"Enter\" && typeof onSave === \"function\") {\n onSave();\n } else if (\n (e.key === \"Esc\" || e.key === \"Escape\") &&\n typeof onCancel === \"function\"\n ) {\n onCancel(e);\n }\n },\n [onSave, onCancel]\n );\n\n return (\n <div onKeyDown={handleOnKeyDown} tabIndex={-1} className=\"date-picker-form\">\n <StyledSelectDateDatePicker>\n <DatePicker\n month={month}\n onMonthChange={onMonthChange}\n onChange={onChange}\n onDayClick={onDayClick}\n selectedDays={selectedDays}\n selectionMode={selectionMode}\n dateRequired={dateRequired}\n firstDayOfWeek={firstDayOfWeek}\n modifiers={modifiers}\n renderDay={renderDay}\n localeUtils={MomentLocaleUtils}\n />\n </StyledSelectDateDatePicker>\n {mode === \"atomic\" || !dateRequired ? (\n <StyledSelectDateFooter className=\"date-picker-footer\" $mode={mode}>\n {mode === \"atomic\" ? (\n <StyledSelectDateButtons className=\"date-picker-buttons\">\n <StyledButtonSave\n size=\"small\"\n variant=\"primary\"\n onClick={onSave}\n disabled={disabledSaveButton}\n >\n {saveButtonText}\n </StyledButtonSave>\n <Tooltip\n title={cancelButtonText}\n popperTooltipStyle={{ zIndex: 1301 }}\n >\n <Button size=\"small\" variant=\"text gray\" onClick={onCancel}>\n <CancelCrossIcon />\n </Button>\n </Tooltip>\n {!dateRequired ? (\n <StyledButtonClose\n size=\"small\"\n onClick={onClear}\n variant=\"text gray\"\n >\n {clearButtonText}\n </StyledButtonClose>\n ) : null}\n </StyledSelectDateButtons>\n ) : (\n !dateRequired && (\n <StyledButtonCloseColored\n size=\"small\"\n onClick={onClear}\n variant=\"text colored\"\n >\n {clearButtonText}\n </StyledButtonCloseColored>\n )\n )}\n </StyledSelectDateFooter>\n ) : null}\n </div>\n );\n};\n\nDatePickerForm.displayName = \"DatePickerForm\";\n"],"file":"DatePickerForm.js"}
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('styled-components'), require('classnames'), require('resize-observer-polyfill'), require('react-focus-lock'), require('react-remove-scroll'), require('react-dom'), require('@popperjs/core'), require('react-transition-group'), require('moment'), require('react-day-picker/moment'), require('react-day-picker'), require('lodash.debounce'), require('react-custom-scrollbars')) :
|
|
3
3
|
typeof define === 'function' && define.amd ? define(['exports', 'react', 'styled-components', 'classnames', 'resize-observer-polyfill', 'react-focus-lock', 'react-remove-scroll', 'react-dom', '@popperjs/core', 'react-transition-group', 'moment', 'react-day-picker/moment', 'react-day-picker', 'lodash.debounce', 'react-custom-scrollbars'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.components = {}, global.React, global.styled, global.classNames, global.ResizeObserver, global.FocusLock, global.reactRemoveScroll, global.ReactDOM, global.
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.components = {}, global.React, global.styled, global.classNames, global.ResizeObserver, global.FocusLock, global.reactRemoveScroll, global.ReactDOM, global.PopperJS, global.reactTransitionGroup, global.moment, global.MomentLocaleUtils, global.DayPicker, global.debounce, global.reactCustomScrollbars));
|
|
5
5
|
})(this, (function (exports, React, styled, classNames, ResizeObserver, FocusLock, reactRemoveScroll, ReactDOM, core, reactTransitionGroup, moment, MomentLocaleUtils, DayPicker, debounce, reactCustomScrollbars) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -12048,7 +12048,7 @@
|
|
|
12048
12048
|
});
|
|
12049
12049
|
StyledInput.displayName = "StyledInput";
|
|
12050
12050
|
|
|
12051
|
-
var _excluded$5 = ["className", "variant", "weight", "disabled", "inputProps"];
|
|
12051
|
+
var _excluded$5 = ["className", "variant", "weight", "disabled", "inputProps", "wrapRef"];
|
|
12052
12052
|
var EditableContent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
12053
12053
|
var className = _ref.className,
|
|
12054
12054
|
_ref$variant = _ref.variant,
|
|
@@ -12057,9 +12057,11 @@
|
|
|
12057
12057
|
_ref$disabled = _ref.disabled,
|
|
12058
12058
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
12059
12059
|
inputProps = _ref.inputProps,
|
|
12060
|
+
wrapRef = _ref.wrapRef,
|
|
12060
12061
|
props = _objectWithoutProperties(_ref, _excluded$5);
|
|
12061
12062
|
|
|
12062
12063
|
var intInputRef = React.useRef(null);
|
|
12064
|
+
var handleRef = useForkRef(ref, intInputRef);
|
|
12063
12065
|
var handleBlur = React.useCallback(function (evt) {
|
|
12064
12066
|
var _intInputRef$current;
|
|
12065
12067
|
|
|
@@ -12068,14 +12070,14 @@
|
|
|
12068
12070
|
}, [inputProps]);
|
|
12069
12071
|
return /*#__PURE__*/React__default["default"].createElement(StyledDiv, _extends({
|
|
12070
12072
|
className: className,
|
|
12071
|
-
ref:
|
|
12073
|
+
ref: wrapRef
|
|
12072
12074
|
}, props), /*#__PURE__*/React__default["default"].createElement(StyledSpan, {
|
|
12073
12075
|
variant: variant,
|
|
12074
12076
|
forwardedAs: "span",
|
|
12075
12077
|
weight: weight,
|
|
12076
12078
|
$disabled: disabled
|
|
12077
12079
|
}, inputProps === null || inputProps === void 0 ? void 0 : inputProps.value), /*#__PURE__*/React__default["default"].createElement(StyledInput, _extends({}, inputProps, {
|
|
12078
|
-
ref:
|
|
12080
|
+
ref: handleRef,
|
|
12079
12081
|
forwardedAs: "input",
|
|
12080
12082
|
variant: variant,
|
|
12081
12083
|
weight: weight,
|