@uncinc/uncinc-react-kitchen-sink 2.25.1 → 2.25.3
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.
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export function useExtendedFormikContext(): any;
|
|
2
|
-
export function FormikExtendedContextProvider({ children, ...props }: {
|
|
2
|
+
export function FormikExtendedContextProvider({ children, formProps, ...props }: {
|
|
3
3
|
[x: string]: any;
|
|
4
4
|
children: any;
|
|
5
|
+
formProps: any;
|
|
5
6
|
}): React.JSX.Element;
|
|
6
7
|
export default FormikWrapper;
|
|
7
8
|
import React from 'react';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
var _excluded = ["children"],
|
|
3
|
-
_excluded2 = ["initialValues", "onSubmit", "validate", "validateOnChange", "validateOnBlur", "validateOnMount", "onReset", "children", "displayRequiredIndicator"];
|
|
2
|
+
var _excluded = ["children", "formProps"],
|
|
3
|
+
_excluded2 = ["initialValues", "onSubmit", "validate", "validateOnChange", "validateOnBlur", "validateOnMount", "onReset", "children", "displayRequiredIndicator", "formProps"];
|
|
4
4
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
5
5
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6
6
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -17,6 +17,7 @@ export var useExtendedFormikContext = function useExtendedFormikContext() {
|
|
|
17
17
|
};
|
|
18
18
|
export var FormikExtendedContextProvider = function FormikExtendedContextProvider(_ref) {
|
|
19
19
|
var children = _ref.children,
|
|
20
|
+
formProps = _ref.formProps,
|
|
20
21
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
21
22
|
var formikContext = useFormikContext();
|
|
22
23
|
|
|
@@ -27,7 +28,7 @@ export var FormikExtendedContextProvider = function FormikExtendedContextProvide
|
|
|
27
28
|
}, [formikContext, props]);
|
|
28
29
|
return /*#__PURE__*/React.createElement(CustomFormikContext.Provider, {
|
|
29
30
|
value: value
|
|
30
|
-
}, /*#__PURE__*/React.createElement(Form,
|
|
31
|
+
}, /*#__PURE__*/React.createElement(Form, formProps, children));
|
|
31
32
|
};
|
|
32
33
|
var FormikWrapper = function FormikWrapper(props) {
|
|
33
34
|
var initialValues = props.initialValues,
|
|
@@ -39,6 +40,7 @@ var FormikWrapper = function FormikWrapper(props) {
|
|
|
39
40
|
onReset = props.onReset,
|
|
40
41
|
children = props.children,
|
|
41
42
|
displayRequiredIndicator = props.displayRequiredIndicator,
|
|
43
|
+
formProps = props.formProps,
|
|
42
44
|
restProps = _objectWithoutProperties(props, _excluded2);
|
|
43
45
|
return /*#__PURE__*/React.createElement(Formik, _extends({
|
|
44
46
|
initialValues: initialValues || {},
|
|
@@ -50,7 +52,8 @@ var FormikWrapper = function FormikWrapper(props) {
|
|
|
50
52
|
onReset: onReset
|
|
51
53
|
}, restProps), function () {
|
|
52
54
|
return /*#__PURE__*/React.createElement(FormikExtendedContextProvider, {
|
|
53
|
-
displayRequiredIndicator: displayRequiredIndicator
|
|
55
|
+
displayRequiredIndicator: displayRequiredIndicator,
|
|
56
|
+
formProps: formProps
|
|
54
57
|
}, children);
|
|
55
58
|
});
|
|
56
59
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import React, { HTMLAttributes } from 'react';
|
|
2
|
+
export type TitleWithTextHeadingTag = 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
2
3
|
export interface TitleWithTextProps extends React.HTMLProps<HTMLAttributes<HTMLDivElement>> {
|
|
3
4
|
title?: string;
|
|
4
5
|
titleProps?: React.ComponentPropsWithoutRef<'h2'>;
|
|
5
6
|
text?: string;
|
|
6
7
|
className?: string;
|
|
8
|
+
headingTag?: TitleWithTextHeadingTag;
|
|
7
9
|
}
|
|
8
10
|
declare const TitleWithText: React.FC<TitleWithTextProps>;
|
|
9
11
|
export default TitleWithText;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["title", "titleProps", "text", "className"];
|
|
1
|
+
var _excluded = ["title", "titleProps", "text", "className", "headingTag"];
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
3
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
4
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -10,11 +10,14 @@ var TitleWithText = function TitleWithText(_ref) {
|
|
|
10
10
|
titleProps = _ref.titleProps,
|
|
11
11
|
text = _ref.text,
|
|
12
12
|
className = _ref.className,
|
|
13
|
+
_ref$headingTag = _ref.headingTag,
|
|
14
|
+
headingTag = _ref$headingTag === void 0 ? 'h2' : _ref$headingTag,
|
|
13
15
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
14
16
|
var classes = c('TitleWithText', className);
|
|
17
|
+
var HeadingTag = headingTag;
|
|
15
18
|
return /*#__PURE__*/React.createElement("div", {
|
|
16
19
|
className: classes
|
|
17
|
-
}, title && /*#__PURE__*/React.createElement(
|
|
20
|
+
}, title && /*#__PURE__*/React.createElement(HeadingTag, _extends({
|
|
18
21
|
className: "TitleWithText__title"
|
|
19
22
|
}, titleProps), title), text && /*#__PURE__*/React.createElement(WysiwygField, _extends({
|
|
20
23
|
className: "TitleWithText__text",
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React, { HTMLAttributes } from 'react';
|
|
2
|
+
import { type TitleWithTextHeadingTag } from '../../components/TitleWithText';
|
|
2
3
|
export interface TextProps extends React.HTMLProps<HTMLAttributes<HTMLDivElement>> {
|
|
3
4
|
title?: string;
|
|
4
5
|
titleProps?: React.ComponentProps<'h2'>;
|
|
6
|
+
headingTag?: TitleWithTextHeadingTag;
|
|
5
7
|
text: string;
|
|
6
8
|
readMore?: string;
|
|
7
9
|
duration?: number;
|