@activecollab/components 2.0.250 → 2.0.252
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/Styles.js +1 -5
- package/dist/cjs/components/Button/Styles.js.map +1 -1
- package/dist/cjs/components/ChooseV2/ChooseV2.js +20 -12
- package/dist/cjs/components/ChooseV2/ChooseV2.js.map +1 -1
- package/dist/cjs/components/ChooseV2/Styles.js +14 -4
- package/dist/cjs/components/ChooseV2/Styles.js.map +1 -1
- package/dist/cjs/components/ContentWizard/{ContentWizard.js → ContentStepper.js} +6 -6
- package/dist/cjs/components/ContentWizard/ContentStepper.js.map +1 -0
- package/dist/cjs/components/ContentWizard/context/{ContentWizardContext.js → ContentStepperContext.js} +7 -7
- package/dist/cjs/components/ContentWizard/context/ContentStepperContext.js.map +1 -0
- package/dist/cjs/components/ContentWizard/context/index.js +4 -4
- package/dist/cjs/components/ContentWizard/context/index.js.map +1 -1
- package/dist/cjs/components/ContentWizard/index.js +7 -7
- package/dist/cjs/components/ContentWizard/index.js.map +1 -1
- package/dist/esm/components/Button/Styles.d.ts.map +1 -1
- package/dist/esm/components/Button/Styles.js +1 -5
- package/dist/esm/components/Button/Styles.js.map +1 -1
- package/dist/esm/components/ChooseV2/ChooseV2.d.ts.map +1 -1
- package/dist/esm/components/ChooseV2/ChooseV2.js +19 -11
- package/dist/esm/components/ChooseV2/ChooseV2.js.map +1 -1
- package/dist/esm/components/ChooseV2/Styles.d.ts +6 -1
- package/dist/esm/components/ChooseV2/Styles.d.ts.map +1 -1
- package/dist/esm/components/ChooseV2/Styles.js +9 -3
- package/dist/esm/components/ChooseV2/Styles.js.map +1 -1
- package/dist/esm/components/ContentWizard/ContentStepper.d.ts +9 -0
- package/dist/esm/components/ContentWizard/ContentStepper.d.ts.map +1 -0
- package/dist/esm/components/ContentWizard/{ContentWizard.js → ContentStepper.js} +5 -5
- package/dist/esm/components/ContentWizard/ContentStepper.js.map +1 -0
- package/dist/esm/components/ContentWizard/context/ContentStepperContext.d.ts +16 -0
- package/dist/esm/components/ContentWizard/context/ContentStepperContext.d.ts.map +1 -0
- package/dist/esm/components/ContentWizard/context/ContentStepperContext.js +19 -0
- package/dist/esm/components/ContentWizard/context/ContentStepperContext.js.map +1 -0
- package/dist/esm/components/ContentWizard/context/index.d.ts +1 -1
- package/dist/esm/components/ContentWizard/context/index.d.ts.map +1 -1
- package/dist/esm/components/ContentWizard/context/index.js +1 -1
- package/dist/esm/components/ContentWizard/context/index.js.map +1 -1
- package/dist/esm/components/ContentWizard/index.d.ts +3 -3
- package/dist/esm/components/ContentWizard/index.d.ts.map +1 -1
- package/dist/esm/components/ContentWizard/index.js +3 -3
- package/dist/esm/components/ContentWizard/index.js.map +1 -1
- package/dist/index.js +99 -86
- 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 +1 -1
- package/dist/cjs/components/ContentWizard/ContentWizard.js.map +0 -1
- package/dist/cjs/components/ContentWizard/context/ContentWizardContext.js.map +0 -1
- package/dist/esm/components/ContentWizard/ContentWizard.d.ts +0 -9
- package/dist/esm/components/ContentWizard/ContentWizard.d.ts.map +0 -1
- package/dist/esm/components/ContentWizard/ContentWizard.js.map +0 -1
- package/dist/esm/components/ContentWizard/context/ContentWizardContext.d.ts +0 -16
- package/dist/esm/components/ContentWizard/context/ContentWizardContext.d.ts.map +0 -1
- package/dist/esm/components/ContentWizard/context/ContentWizardContext.js +0 -19
- package/dist/esm/components/ContentWizard/context/ContentWizardContext.js.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import React, { useRef, useState, useEffect } from "react";
|
|
3
|
-
import { StyledChoose, StyledFlexContainer, StyledRadioOption, StyledVerticalContainer } from "./Styles";
|
|
3
|
+
import { StyledChoose, StyledFlexContainer, StyledLabel, StyledRadioOption, StyledVerticalContainer } from "./Styles";
|
|
4
4
|
import { useResizeObserver, useForkRef } from "../../utils";
|
|
5
5
|
import { ButtonGroup } from "../ButtonGroup";
|
|
6
|
+
import { Checkbox } from "../Checkbox";
|
|
6
7
|
import { RadioButton } from "../RadioButton";
|
|
7
|
-
import { Body2 } from "../Typography";
|
|
8
8
|
export const ChooseV2 = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
9
9
|
var _parentSize$width, _flexSize$width;
|
|
10
10
|
let {
|
|
@@ -61,9 +61,6 @@ export const ChooseV2 = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
61
61
|
onChange(newSelected);
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
|
-
const handleRadioChange = id => {
|
|
65
|
-
if (multiple) handleSelect(id);else onChange([id]);
|
|
66
|
-
};
|
|
67
64
|
if (!isReady) {
|
|
68
65
|
return /*#__PURE__*/React.createElement("div", {
|
|
69
66
|
ref: handleRef,
|
|
@@ -81,15 +78,26 @@ export const ChooseV2 = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
81
78
|
width: "100%"
|
|
82
79
|
}
|
|
83
80
|
}), useVerticalLayout ? /*#__PURE__*/React.createElement(StyledVerticalContainer, null, options.map(option => /*#__PURE__*/React.createElement(StyledRadioOption, {
|
|
81
|
+
$disabled: !!option.disabled,
|
|
84
82
|
key: option.id,
|
|
85
|
-
"data-disabled": option.disabled
|
|
86
|
-
|
|
87
|
-
|
|
83
|
+
"data-disabled": option.disabled
|
|
84
|
+
}, multiple || !required ? /*#__PURE__*/React.createElement(Checkbox, {
|
|
85
|
+
checked: selected.includes(option.id),
|
|
86
|
+
disabled: option.disabled,
|
|
87
|
+
onChange: () => !option.disabled && handleSelect(option.id),
|
|
88
|
+
name: "choose-v2-" + option.id,
|
|
89
|
+
id: "choose-v2-" + option.id
|
|
90
|
+
}) : /*#__PURE__*/React.createElement(RadioButton, {
|
|
88
91
|
checked: selected.includes(option.id),
|
|
89
92
|
disabled: option.disabled,
|
|
90
|
-
onChange: () => !option.disabled &&
|
|
91
|
-
|
|
92
|
-
|
|
93
|
+
onChange: () => !option.disabled && handleSelect(option.id),
|
|
94
|
+
id: "choose-v2-" + option.id,
|
|
95
|
+
name: "choose-v2-" + option.id
|
|
96
|
+
}), /*#__PURE__*/React.createElement(StyledLabel, {
|
|
97
|
+
$disabled: !!option.disabled,
|
|
98
|
+
weight: "regular",
|
|
99
|
+
htmlFor: "choose-v2-" + option.id
|
|
100
|
+
}, option.name)))) : /*#__PURE__*/React.createElement(StyledFlexContainer, {
|
|
93
101
|
ref: flexContainerRef
|
|
94
102
|
}, /*#__PURE__*/React.createElement(ButtonGroup, {
|
|
95
103
|
invalid: invalid
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChooseV2.js","names":["React","useRef","useState","useEffect","StyledChoose","StyledFlexContainer","StyledRadioOption","StyledVerticalContainer","useResizeObserver","useForkRef","ButtonGroup","RadioButton","Body2","ChooseV2","forwardRef","_ref","ref","_parentSize$width","_flexSize$width","required","multiple","invalid","options","selected","onChange","rest","internalRef","flexContainerRef","handleRef","useVerticalLayout","setUseVerticalLayout","isReady","setIsReady","parentSize","flexSize","parentWidth","width","flexWidth","measure","temp","document","createElement","style","display","visibility","position","whiteSpace","pointerEvents","body","appendChild","forEach","option","button","textContent","name","padding","border","marginRight","totalWidth","offsetWidth","removeChild","requestAnimationFrame","handleSelect","id","newSelected","includes","filter","s","length","handleRadioChange","minHeight","_extends","map","key","disabled","onClick","checked","active","displayName"],"sources":["../../../../src/components/ChooseV2/ChooseV2.tsx"],"sourcesContent":["import React, { useRef, useState, useEffect } from \"react\";\n\nimport {\n StyledChoose,\n StyledFlexContainer,\n StyledRadioOption,\n StyledVerticalContainer,\n} from \"./Styles\";\nimport { useResizeObserver, useForkRef } from \"../../utils\";\nimport { ButtonGroup } from \"../ButtonGroup\";\nimport { RadioButton } from \"../RadioButton\";\nimport { Body2 } from \"../Typography\";\n\nexport interface ChooseV2Option {\n id: string | number;\n name: string;\n disabled?: boolean;\n}\n\nexport interface ChooseV2Props {\n required?: boolean;\n multiple?: boolean;\n invalid?: boolean;\n options: ChooseV2Option[];\n selected: (string | number)[];\n onChange: (ids: (string | number)[]) => void;\n}\n\nexport const ChooseV2 = React.forwardRef<\n HTMLDivElement,\n ChooseV2Props &\n Omit<React.ComponentPropsWithoutRef<\"div\">, keyof ChooseV2Props>\n>(\n (\n {\n required = false,\n multiple = false,\n invalid = false,\n options,\n selected,\n onChange,\n ...rest\n },\n ref\n ) => {\n const internalRef = useRef<HTMLDivElement | null>(null);\n const flexContainerRef = useRef<HTMLDivElement | null>(null);\n const handleRef = useForkRef(ref, internalRef);\n\n const [useVerticalLayout, setUseVerticalLayout] = useState(false);\n const [isReady, setIsReady] = useState(false);\n\n const parentSize = useResizeObserver(internalRef);\n const flexSize = useResizeObserver(flexContainerRef);\n\n const parentWidth = parentSize?.width ?? 0;\n const flexWidth = flexSize?.width ?? 0;\n\n useEffect(() => {\n if (parentWidth === 0) return;\n\n const measure = () => {\n const temp = document.createElement(\"div\");\n temp.style.display = \"inline-flex\";\n temp.style.visibility = \"hidden\";\n temp.style.position = \"absolute\";\n temp.style.whiteSpace = \"nowrap\";\n temp.style.pointerEvents = \"none\";\n document.body.appendChild(temp);\n\n options.forEach((option) => {\n const button = document.createElement(\"button\");\n button.textContent = option.name;\n button.style.padding = \"6px 12px\";\n button.style.border = \"1px solid transparent\";\n button.style.marginRight = \"4px\";\n temp.appendChild(button);\n });\n\n const totalWidth = temp.offsetWidth + 8;\n document.body.removeChild(temp);\n\n setUseVerticalLayout(totalWidth > parentWidth);\n setIsReady(true);\n };\n\n requestAnimationFrame(measure);\n }, [parentWidth, options, flexWidth]);\n\n const handleSelect = (id: string | number) => {\n if (multiple) {\n const newSelected = selected.includes(id)\n ? selected.filter((s) => s !== id)\n : [...selected, id];\n if (required && newSelected.length === 0) return;\n onChange(newSelected);\n } else {\n const newSelected = selected.includes(id) ? [] : [id];\n if (required && newSelected.length === 0) return;\n onChange(newSelected);\n }\n };\n\n const handleRadioChange = (id: string | number) => {\n if (multiple) handleSelect(id);\n else onChange([id]);\n };\n\n if (!isReady) {\n return (\n <div ref={handleRef} style={{ width: \"100%\", minHeight: \"32px\" }} />\n );\n }\n\n return (\n <div ref={handleRef} {...rest} style={{ display: \"flex\", width: \"100%\" }}>\n {useVerticalLayout ? (\n <StyledVerticalContainer>\n {options.map((option) => (\n <StyledRadioOption\n key={option.id}\n data-disabled={option.disabled}\n onClick={() => !option.disabled && handleRadioChange(option.id)}\n >\n <RadioButton\n checked={selected.includes(option.id)}\n disabled={option.disabled}\n onChange={() =>\n !option.disabled && handleRadioChange(option.id)\n }\n name={multiple ? `choose-v2-${option.id}` : \"choose-v2-group\"}\n />\n <Body2>{option.name}</Body2>\n </StyledRadioOption>\n ))}\n </StyledVerticalContainer>\n ) : (\n <StyledFlexContainer ref={flexContainerRef}>\n <ButtonGroup invalid={invalid}>\n {options.map((option) => (\n <StyledChoose\n key={option.id}\n active={selected.includes(option.id)}\n disabled={option.disabled}\n onClick={() => handleSelect(option.id)}\n >\n {option.name}\n </StyledChoose>\n ))}\n </ButtonGroup>\n </StyledFlexContainer>\n )}\n </div>\n );\n }\n);\n\nChooseV2.displayName = \"ChooseV2\";\n"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,MAAM,EAAEC,QAAQ,EAAEC,SAAS,QAAQ,OAAO;AAE1D,SACEC,YAAY,EACZC,mBAAmB,EACnBC,iBAAiB,EACjBC,uBAAuB,QAClB,UAAU;AACjB,SAASC,iBAAiB,EAAEC,UAAU,QAAQ,aAAa;AAC3D,SAASC,WAAW,QAAQ,gBAAgB;AAC5C,SAASC,WAAW,QAAQ,gBAAgB;AAC5C,SAASC,KAAK,QAAQ,eAAe;AAiBrC,OAAO,MAAMC,QAAQ,gBAAGb,KAAK,CAACc,UAAU,CAKtC,CAAAC,IAAA,EAUEC,GAAG,KACA;EAAA,IAAAC,iBAAA,EAAAC,eAAA;EAAA,IAVH;IACEC,QAAQ,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ACY,EAAE,CAChD;IACDT,IAAI,EAAElC,QAAQ,kBAAgB+B,MAAM,CAACY,EAAE,GAAK;EAAkB,CAC/D,CAAC,eACF/D,KAAA,CAAAyC,aAAA,CAAC7B,KAAK,QAAEuC,MAAM,CAACG,IAAY,CACV,CACpB,CACsB,CAAC,gBAE1BtD,KAAA,CAAAyC,aAAA,CAACpC,mBAAmB;IAACW,GAAG,EAAEW;EAAiB,gBACzC3B,KAAA,CAAAyC,aAAA,CAAC/B,WAAW;IAACW,OAAO,EAAEA;EAAQ,GAC3BC,OAAO,CAACkD,GAAG,CAAErB,MAAM,iBAClBnD,KAAA,CAAAyC,aAAA,CAACrC,YAAY;IACXqE,GAAG,EAAEtB,MAAM,CAACY,EAAG;IACfc,MAAM,EAAEtD,QAAQ,CAAC0C,QAAQ,CAACd,MAAM,CAACY,EAAE,CAAE;IACrCW,QAAQ,EAAEvB,MAAM,CAACuB,QAAS;IAC1BC,OAAO,EAAEA,CAAA,KAAMb,YAAY,CAACX,MAAM,CAACY,EAAE;EAAE,GAEtCZ,MAAM,CAACG,IACI,CACf,CACU,CACM,CAEpB,CAAC;AAEV,CACF,CAAC;AAEDzC,QAAQ,CAACiE,WAAW,GAAG,UAAU"}
|
|
1
|
+
{"version":3,"file":"ChooseV2.js","names":["React","useRef","useState","useEffect","StyledChoose","StyledFlexContainer","StyledLabel","StyledRadioOption","StyledVerticalContainer","useResizeObserver","useForkRef","ButtonGroup","Checkbox","RadioButton","ChooseV2","forwardRef","_ref","ref","_parentSize$width","_flexSize$width","required","multiple","invalid","options","selected","onChange","rest","internalRef","flexContainerRef","handleRef","useVerticalLayout","setUseVerticalLayout","isReady","setIsReady","parentSize","flexSize","parentWidth","width","flexWidth","measure","temp","document","createElement","style","display","visibility","position","whiteSpace","pointerEvents","body","appendChild","forEach","option","button","textContent","name","padding","border","marginRight","totalWidth","offsetWidth","removeChild","requestAnimationFrame","handleSelect","id","newSelected","includes","filter","s","length","minHeight","_extends","map","$disabled","disabled","key","checked","weight","htmlFor","active","onClick","displayName"],"sources":["../../../../src/components/ChooseV2/ChooseV2.tsx"],"sourcesContent":["import React, { useRef, useState, useEffect } from \"react\";\n\nimport {\n StyledChoose,\n StyledFlexContainer,\n StyledLabel,\n StyledRadioOption,\n StyledVerticalContainer,\n} from \"./Styles\";\nimport { useResizeObserver, useForkRef } from \"../../utils\";\nimport { ButtonGroup } from \"../ButtonGroup\";\nimport { Checkbox } from \"../Checkbox\";\nimport { RadioButton } from \"../RadioButton\";\n\nexport interface ChooseV2Option {\n id: string | number;\n name: string;\n disabled?: boolean;\n}\n\nexport interface ChooseV2Props {\n required?: boolean;\n multiple?: boolean;\n invalid?: boolean;\n options: ChooseV2Option[];\n selected: (string | number)[];\n onChange: (ids: (string | number)[]) => void;\n}\n\nexport const ChooseV2 = React.forwardRef<\n HTMLDivElement,\n ChooseV2Props &\n Omit<React.ComponentPropsWithoutRef<\"div\">, keyof ChooseV2Props>\n>(\n (\n {\n required = false,\n multiple = false,\n invalid = false,\n options,\n selected,\n onChange,\n ...rest\n },\n ref\n ) => {\n const internalRef = useRef<HTMLDivElement | null>(null);\n const flexContainerRef = useRef<HTMLDivElement | null>(null);\n const handleRef = useForkRef(ref, internalRef);\n\n const [useVerticalLayout, setUseVerticalLayout] = useState(false);\n const [isReady, setIsReady] = useState(false);\n\n const parentSize = useResizeObserver(internalRef);\n const flexSize = useResizeObserver(flexContainerRef);\n\n const parentWidth = parentSize?.width ?? 0;\n const flexWidth = flexSize?.width ?? 0;\n\n useEffect(() => {\n if (parentWidth === 0) return;\n\n const measure = () => {\n const temp = document.createElement(\"div\");\n temp.style.display = \"inline-flex\";\n temp.style.visibility = \"hidden\";\n temp.style.position = \"absolute\";\n temp.style.whiteSpace = \"nowrap\";\n temp.style.pointerEvents = \"none\";\n document.body.appendChild(temp);\n\n options.forEach((option) => {\n const button = document.createElement(\"button\");\n button.textContent = option.name;\n button.style.padding = \"6px 12px\";\n button.style.border = \"1px solid transparent\";\n button.style.marginRight = \"4px\";\n temp.appendChild(button);\n });\n\n const totalWidth = temp.offsetWidth + 8;\n document.body.removeChild(temp);\n\n setUseVerticalLayout(totalWidth > parentWidth);\n setIsReady(true);\n };\n\n requestAnimationFrame(measure);\n }, [parentWidth, options, flexWidth]);\n\n const handleSelect = (id: string | number) => {\n if (multiple) {\n const newSelected = selected.includes(id)\n ? selected.filter((s) => s !== id)\n : [...selected, id];\n\n if (required && newSelected.length === 0) return;\n onChange(newSelected);\n } else {\n const newSelected = selected.includes(id) ? [] : [id];\n if (required && newSelected.length === 0) return;\n onChange(newSelected);\n }\n };\n\n if (!isReady) {\n return (\n <div ref={handleRef} style={{ width: \"100%\", minHeight: \"32px\" }} />\n );\n }\n\n return (\n <div ref={handleRef} {...rest} style={{ display: \"flex\", width: \"100%\" }}>\n {useVerticalLayout ? (\n <StyledVerticalContainer>\n {options.map((option) => (\n <StyledRadioOption\n $disabled={!!option.disabled}\n key={option.id}\n data-disabled={option.disabled}\n >\n {multiple || !required ? (\n <Checkbox\n checked={selected.includes(option.id)}\n disabled={option.disabled}\n onChange={() => !option.disabled && handleSelect(option.id)}\n name={`choose-v2-${option.id}`}\n id={`choose-v2-${option.id}`}\n />\n ) : (\n <RadioButton\n checked={selected.includes(option.id)}\n disabled={option.disabled}\n onChange={() => !option.disabled && handleSelect(option.id)}\n id={`choose-v2-${option.id}`}\n name={`choose-v2-${option.id}`}\n />\n )}\n <StyledLabel\n $disabled={!!option.disabled}\n weight=\"regular\"\n htmlFor={`choose-v2-${option.id}`}\n >\n {option.name}\n </StyledLabel>\n </StyledRadioOption>\n ))}\n </StyledVerticalContainer>\n ) : (\n <StyledFlexContainer ref={flexContainerRef}>\n <ButtonGroup invalid={invalid}>\n {options.map((option) => (\n <StyledChoose\n key={option.id}\n active={selected.includes(option.id)}\n disabled={option.disabled}\n onClick={() => handleSelect(option.id)}\n >\n {option.name}\n </StyledChoose>\n ))}\n </ButtonGroup>\n </StyledFlexContainer>\n )}\n </div>\n );\n }\n);\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,YAAY;IACXuE,GAAG,EAAEvB,MAAM,CAACY,EAAG;IACfe,MAAM,EAAEvD,QAAQ,CAAC0C,QAAQ,CAACd,MAAM,CAACY,EAAE,CAAE;IACrCU,QAAQ,EAAEtB,MAAM,CAACsB,QAAS;IAC1BM,OAAO,EAAEA,CAAA,KAAMjB,YAAY,CAACX,MAAM,CAACY,EAAE;EAAE,GAEtCZ,MAAM,CAACG,IACI,CACf,CACU,CACM,CAEpB,CAAC;AAEV,CACF,CAAC;AAEDzC,QAAQ,CAACmE,WAAW,GAAG,UAAU"}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const StyledChoose: import("styled-components").StyledComponent<import("react").FC<import("../Choose/Choose").IChooseProps>, any, {}, never>;
|
|
3
3
|
export declare const StyledVerticalContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const StyledLabel: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../Label").ILabelProps & Omit<import("../Typography/Typography").ITypographyProps, "color" | "variant" | keyof import("../Label").ILabelProps> & import("react").RefAttributes<HTMLLabelElement>>, any, {
|
|
5
|
+
$disabled?: boolean | undefined;
|
|
6
|
+
}, never>;
|
|
7
|
+
export declare const StyledRadioOption: import("styled-components").StyledComponent<"div", any, {
|
|
8
|
+
$disabled?: boolean | undefined;
|
|
9
|
+
}, never>;
|
|
5
10
|
export declare const StyledFlexContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
11
|
//# sourceMappingURL=Styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Styles.d.ts","sourceRoot":"","sources":["../../../../src/components/ChooseV2/Styles.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Styles.d.ts","sourceRoot":"","sources":["../../../../src/components/ChooseV2/Styles.ts"],"names":[],"mappings":";AAKA,eAAO,MAAM,YAAY,0HASxB,CAAC;AAIF,eAAO,MAAM,uBAAuB,oEAKnC,CAAC;AAIF,eAAO,MAAM,WAAW;;SASvB,CAAC;AAIF,eAAO,MAAM,iBAAiB;;SAsB7B,CAAC;AAIF,eAAO,MAAM,mBAAmB,oEAG/B,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import styled, { css } from "styled-components";
|
|
2
2
|
import { Choose } from "../Choose/Choose";
|
|
3
|
+
import { Label } from "../Label";
|
|
3
4
|
export const StyledChoose = styled(Choose).withConfig({
|
|
4
5
|
displayName: "Styles__StyledChoose",
|
|
5
6
|
componentId: "sc-uv67fb-0"
|
|
@@ -10,14 +11,19 @@ export const StyledVerticalContainer = styled.div.withConfig({
|
|
|
10
11
|
componentId: "sc-uv67fb-1"
|
|
11
12
|
})(["display:flex;flex-direction:column;width:100%;gap:8px;"]);
|
|
12
13
|
StyledVerticalContainer.displayName = "StyledVerticalContainer";
|
|
14
|
+
export const StyledLabel = styled(Label).withConfig({
|
|
15
|
+
displayName: "Styles__StyledLabel",
|
|
16
|
+
componentId: "sc-uv67fb-2"
|
|
17
|
+
})(["", ""], props => !props.$disabled ? css(["cursor:pointer;"]) : css(["cursor:not-allowed;"]));
|
|
18
|
+
StyledLabel.displayName = "StyledLabel";
|
|
13
19
|
export const StyledRadioOption = styled.div.withConfig({
|
|
14
20
|
displayName: "Styles__StyledRadioOption",
|
|
15
|
-
componentId: "sc-uv67fb-
|
|
16
|
-
})(["display:flex;align-items:center;gap:6px;
|
|
21
|
+
componentId: "sc-uv67fb-3"
|
|
22
|
+
})(["display:flex;align-items:center;gap:6px;", " &:hover{opacity:0.8;}&[data-disabled=\"true\"]{opacity:0.5;cursor:not-allowed;}"], props => !props.$disabled ? css(["cursor:pointer;"]) : css(["cursor:not-allowed;"]));
|
|
17
23
|
StyledRadioOption.displayName = "StyledRadioOption";
|
|
18
24
|
export const StyledFlexContainer = styled.div.withConfig({
|
|
19
25
|
displayName: "Styles__StyledFlexContainer",
|
|
20
|
-
componentId: "sc-uv67fb-
|
|
26
|
+
componentId: "sc-uv67fb-4"
|
|
21
27
|
})(["display:flex;width:100%;"]);
|
|
22
28
|
StyledFlexContainer.displayName = "StyledFlexContainer";
|
|
23
29
|
//# sourceMappingURL=Styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Styles.js","names":["styled","css","Choose","StyledChoose","withConfig","displayName","componentId","props","active","StyledVerticalContainer","div","StyledRadioOption","StyledFlexContainer"],"sources":["../../../../src/components/ChooseV2/Styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\n\nimport { Choose } from \"../Choose/Choose\";\n\nexport const StyledChoose = styled(Choose)`\n flex-shrink: 0;\n white-space: nowrap;\n\n ${(props) =>\n !props.active &&\n css`\n background-color: transparent !important;\n `}\n`;\n\nStyledChoose.displayName = \"StyledChoose\";\n\nexport const StyledVerticalContainer = styled.div`\n display: flex;\n flex-direction: column;\n width: 100%;\n gap: 8px;\n`;\n\nStyledVerticalContainer.displayName = \"StyledVerticalContainer\";\n\nexport const StyledRadioOption = styled.div
|
|
1
|
+
{"version":3,"file":"Styles.js","names":["styled","css","Choose","Label","StyledChoose","withConfig","displayName","componentId","props","active","StyledVerticalContainer","div","StyledLabel","$disabled","StyledRadioOption","StyledFlexContainer"],"sources":["../../../../src/components/ChooseV2/Styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\n\nimport { Choose } from \"../Choose/Choose\";\nimport { Label } from \"../Label\";\n\nexport const StyledChoose = styled(Choose)`\n flex-shrink: 0;\n white-space: nowrap;\n\n ${(props) =>\n !props.active &&\n css`\n background-color: transparent !important;\n `}\n`;\n\nStyledChoose.displayName = \"StyledChoose\";\n\nexport const StyledVerticalContainer = styled.div`\n display: flex;\n flex-direction: column;\n width: 100%;\n gap: 8px;\n`;\n\nStyledVerticalContainer.displayName = \"StyledVerticalContainer\";\n\nexport const StyledLabel = styled(Label)<{ $disabled?: boolean }>`\n ${(props) =>\n !props.$disabled\n ? css`\n cursor: pointer;\n `\n : css`\n cursor: not-allowed;\n `}\n`;\n\nStyledLabel.displayName = \"StyledLabel\";\n\nexport const StyledRadioOption = styled.div<{ $disabled?: boolean }>`\n display: flex;\n align-items: center;\n gap: 6px;\n\n ${(props) =>\n !props.$disabled\n ? css`\n cursor: pointer;\n `\n : css`\n cursor: not-allowed;\n `}\n\n &:hover {\n opacity: 0.8;\n }\n\n &[data-disabled=\"true\"] {\n opacity: 0.5;\n cursor: not-allowed;\n }\n`;\n\nStyledRadioOption.displayName = \"StyledRadioOption\";\n\nexport const StyledFlexContainer = styled.div`\n display: flex;\n width: 100%;\n`;\n\nStyledFlexContainer.displayName = \"StyledFlexContainer\";\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAE/C,SAASC,MAAM,QAAQ,kBAAkB;AACzC,SAASC,KAAK,QAAQ,UAAU;AAEhC,OAAO,MAAMC,YAAY,GAAGJ,MAAM,CAACE,MAAM,CAAC,CAAAG,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,8CAIrCC,KAAK,IACN,CAACA,KAAK,CAACC,MAAM,IACbR,GAAG,8CAEF,CACJ;AAEDG,YAAY,CAACE,WAAW,GAAG,cAAc;AAEzC,OAAO,MAAMI,uBAAuB,GAAGV,MAAM,CAACW,GAAG,CAAAN,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,8DAKhD;AAEDG,uBAAuB,CAACJ,WAAW,GAAG,yBAAyB;AAE/D,OAAO,MAAMM,WAAW,GAAGZ,MAAM,CAACG,KAAK,CAAC,CAAAE,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,aACnCC,KAAK,IACN,CAACA,KAAK,CAACK,SAAS,GACZZ,GAAG,wBAGHA,GAAG,yBAEF,CACR;AAEDW,WAAW,CAACN,WAAW,GAAG,aAAa;AAEvC,OAAO,MAAMQ,iBAAiB,GAAGd,MAAM,CAACW,GAAG,CAAAN,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,qIAKtCC,KAAK,IACN,CAACA,KAAK,CAACK,SAAS,GACZZ,GAAG,wBAGHA,GAAG,yBAEF,CAUR;AAEDa,iBAAiB,CAACR,WAAW,GAAG,mBAAmB;AAEnD,OAAO,MAAMS,mBAAmB,GAAGf,MAAM,CAACW,GAAG,CAAAN,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,gCAG5C;AAEDQ,mBAAmB,CAACT,WAAW,GAAG,qBAAqB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
export interface IContentStepper {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
step?: number;
|
|
6
|
+
onStepChange?: (step: number) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const ContentStepper: React.ForwardRefExoticComponent<IContentStepper & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
//# sourceMappingURL=ContentStepper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContentStepper.d.ts","sourceRoot":"","sources":["../../../../src/components/ContentWizard/ContentStepper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAGZ,SAAS,EAKV,MAAM,OAAO,CAAC;AAQf,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC;AAED,eAAO,MAAM,cAAc,wFAoH1B,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { forwardRef, useCallback, useMemo, useRef, useState } from "react";
|
|
2
2
|
import { MoveFocusInside } from "react-focus-lock";
|
|
3
3
|
import { ContentStep } from "./ContentStep";
|
|
4
|
-
import {
|
|
4
|
+
import { ContentStepperContextProvider } from "./context/ContentStepperContext";
|
|
5
5
|
import { StyledContentWizardContainer, StyledStepWrapper } from "./Styles";
|
|
6
6
|
import { SlideLeftRightTransition, ResizeTransition } from "../Transitions";
|
|
7
|
-
export const
|
|
7
|
+
export const ContentStepper = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
8
8
|
let {
|
|
9
9
|
children,
|
|
10
10
|
className,
|
|
@@ -71,7 +71,7 @@ export const ContentWizard = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
71
71
|
return null;
|
|
72
72
|
});
|
|
73
73
|
}, [activeStep, childrenCollection, isLeft, enteredStep, handleHeight, handleEntered]);
|
|
74
|
-
return /*#__PURE__*/React.createElement(
|
|
74
|
+
return /*#__PURE__*/React.createElement(ContentStepperContextProvider, {
|
|
75
75
|
value: {
|
|
76
76
|
activeStep,
|
|
77
77
|
setActiveStep,
|
|
@@ -92,5 +92,5 @@ export const ContentWizard = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
92
92
|
$height: height
|
|
93
93
|
}, renderSteps)));
|
|
94
94
|
});
|
|
95
|
-
|
|
96
|
-
//# sourceMappingURL=
|
|
95
|
+
ContentStepper.displayName = "ContentStepper";
|
|
96
|
+
//# sourceMappingURL=ContentStepper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContentStepper.js","names":["React","forwardRef","useCallback","useMemo","useRef","useState","MoveFocusInside","ContentStep","ContentStepperContextProvider","StyledContentWizardContainer","StyledStepWrapper","SlideLeftRightTransition","ResizeTransition","ContentStepper","_ref","ref","children","className","step","controlledStep","onStepChange","childrenCollection","Children","toArray","internalStep","setInternalStep","enteredStep","setEnteredStep","height","setHeight","previousStepRef","activeStep","undefined","isLeft","prevStep","current","direction","setActiveStep","newStep","goNext","nextIndex","Math","min","length","goPrevious","prevIndex","max","handleHeight","element","offsetHeight","handleEntered","stepIndex","renderSteps","map","child","index","type","stepContent","cloneElement","key","isFirst","isLast","createElement","in","onEnter","onEntered","disabled","value","totalSteps","style","width","$height","displayName"],"sources":["../../../../src/components/ContentWizard/ContentStepper.tsx"],"sourcesContent":["import React, {\n forwardRef,\n ReactElement,\n ReactNode,\n useCallback,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport { MoveFocusInside } from \"react-focus-lock\";\n\nimport { ContentStep } from \"./ContentStep\";\nimport { ContentStepperContextProvider } from \"./context/ContentStepperContext\";\nimport { StyledContentWizardContainer, StyledStepWrapper } from \"./Styles\";\nimport { SlideLeftRightTransition, ResizeTransition } from \"../Transitions\";\n\nexport interface IContentStepper {\n children: ReactNode;\n className?: string;\n step?: number;\n onStepChange?: (step: number) => void;\n}\n\nexport const ContentStepper = forwardRef<HTMLDivElement, IContentStepper>(\n ({ children, className, step: controlledStep, onStepChange }, ref) => {\n const childrenCollection = useMemo(\n () => React.Children.toArray(children),\n [children]\n );\n\n const [internalStep, setInternalStep] = useState(0);\n const [enteredStep, setEnteredStep] = useState(0);\n const [height, setHeight] = useState(\"auto\");\n const previousStepRef = useRef(0);\n\n // Use controlled step if provided, otherwise use internal state\n const activeStep =\n controlledStep !== undefined ? controlledStep : internalStep;\n\n // Calculate direction synchronously based on step change\n const isLeft = useMemo(() => {\n const prevStep = previousStepRef.current;\n const direction = activeStep > prevStep;\n previousStepRef.current = activeStep;\n return direction;\n }, [activeStep]);\n\n const setActiveStep = useCallback(\n (newStep: number) => {\n if (newStep === activeStep) return;\n\n if (controlledStep === undefined) {\n setInternalStep(newStep);\n }\n\n onStepChange?.(newStep);\n },\n [activeStep, controlledStep, onStepChange]\n );\n\n const goNext = useCallback(() => {\n const nextIndex = Math.min(activeStep + 1, childrenCollection.length - 1);\n setActiveStep(nextIndex);\n }, [activeStep, childrenCollection.length, setActiveStep]);\n\n const goPrevious = useCallback(() => {\n const prevIndex = Math.max(activeStep - 1, 0);\n setActiveStep(prevIndex);\n }, [activeStep, setActiveStep]);\n\n const handleHeight = useCallback((element: HTMLElement) => {\n setHeight(`${element.offsetHeight}px`);\n }, []);\n\n const handleEntered = useCallback((stepIndex: number) => {\n setEnteredStep(stepIndex);\n }, []);\n\n const renderSteps = useMemo(() => {\n return childrenCollection.map((child, index) => {\n const element = child as ReactElement;\n\n if (element?.type === ContentStep) {\n const stepContent = React.cloneElement(element, {\n key: `step-${index}`,\n index,\n isFirst: index === 0,\n isLast: index === childrenCollection.length - 1,\n });\n\n return (\n <SlideLeftRightTransition\n key={`transition-${index}`}\n in={activeStep === index}\n direction={isLeft ? \"left\" : \"right\"}\n onEnter={handleHeight}\n onEntered={() => handleEntered(index)}\n >\n <MoveFocusInside disabled={enteredStep !== index}>\n <StyledStepWrapper>{stepContent}</StyledStepWrapper>\n </MoveFocusInside>\n </SlideLeftRightTransition>\n );\n }\n\n return null;\n });\n }, [\n activeStep,\n childrenCollection,\n isLeft,\n enteredStep,\n handleHeight,\n handleEntered,\n ]);\n\n return (\n <ContentStepperContextProvider\n value={{\n activeStep,\n setActiveStep,\n goNext,\n goPrevious,\n direction: isLeft ? \"left\" : \"right\",\n totalSteps: childrenCollection.length,\n }}\n >\n <ResizeTransition in style={{ height, width: \"100%\" }}>\n <StyledContentWizardContainer\n ref={ref}\n className={className}\n $height={height}\n >\n {renderSteps}\n </StyledContentWizardContainer>\n </ResizeTransition>\n </ContentStepperContextProvider>\n );\n }\n);\n\nContentStepper.displayName = \"ContentStepper\";\n"],"mappings":"AAAA,OAAOA,KAAK,IACVC,UAAU,EAGVC,WAAW,EACXC,OAAO,EACPC,MAAM,EACNC,QAAQ,QACH,OAAO;AACd,SAASC,eAAe,QAAQ,kBAAkB;AAElD,SAASC,WAAW,QAAQ,eAAe;AAC3C,SAASC,6BAA6B,QAAQ,iCAAiC;AAC/E,SAASC,4BAA4B,EAAEC,iBAAiB,QAAQ,UAAU;AAC1E,SAASC,wBAAwB,EAAEC,gBAAgB,QAAQ,gBAAgB;AAS3E,OAAO,MAAMC,cAAc,gBAAGZ,UAAU,CACtC,CAAAa,IAAA,EAA8DC,GAAG,KAAK;EAAA,IAArE;IAAEC,QAAQ;IAAEC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BnB,SAAS,EAAEH,MAAM,GAAG,MAAM,GAAG,OAAQ;UACrC+B,OAAO,EAAEjB,YAAa;UACtBkB,SAAS,EAAEA,CAAA,KAAMf,aAAa,CAACK,KAAK;QAAE,gBAEtCvD,KAAA,CAAA8D,aAAA,CAACxD,eAAe;UAAC4D,QAAQ,EAAExC,WAAW,KAAK6B;QAAM,gBAC/CvD,KAAA,CAAA8D,aAAA,CAACpD,iBAAiB,QAAE+C,WAA+B,CACpC,CACO,CAAC;MAE/B;MAEA,OAAO,IAAI;IACb,CAAC,CAAC;EACJ,CAAC,EAAE,CACD1B,UAAU,EACVV,kBAAkB,EAClBY,MAAM,EACNP,WAAW,EACXqB,YAAY,EACZG,aAAa,CACd,CAAC;EAEF,oBACElD,KAAA,CAAA8D,aAAA,CAACtD,6BAA6B;IAC5B2D,KAAK,EAAE;MACLpC,UAAU;MACVM,aAAa;MACbE,MAAM;MACNK,UAAU;MACVR,SAAS,EAAEH,MAAM,GAAG,MAAM,GAAG,OAAO;MACpCmC,UAAU,EAAE/C,kBAAkB,CAACsB;IACjC;EAAE,gBAEF3C,KAAA,CAAA8D,aAAA,CAAClD,gBAAgB;IAACmD,EAAE;IAACM,KAAK,EAAE;MAAEzC,MAAM;MAAE0C,KAAK,EAAE;IAAO;EAAE,gBACpDtE,KAAA,CAAA8D,aAAA,CAACrD,4BAA4B;IAC3BM,GAAG,EAAEA,GAAI;IACTE,SAAS,EAAEA,SAAU;IACrBsD,OAAO,EAAE3C;EAAO,GAEfwB,WAC2B,CACd,CACW,CAAC;AAEpC,CACF,CAAC;AAEDvC,cAAc,CAAC2D,WAAW,GAAG,gBAAgB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
export interface IContentStepperContext {
|
|
3
|
+
activeStep: number;
|
|
4
|
+
setActiveStep: (step: number) => void;
|
|
5
|
+
goNext: () => void;
|
|
6
|
+
goPrevious: () => void;
|
|
7
|
+
direction: "left" | "right";
|
|
8
|
+
totalSteps: number;
|
|
9
|
+
}
|
|
10
|
+
export interface IContentWizardContextProvider {
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
value: IContentStepperContext;
|
|
13
|
+
}
|
|
14
|
+
export declare const ContentStepperContextProvider: React.FC<IContentWizardContextProvider>;
|
|
15
|
+
export declare const useContentStepperContext: () => IContentStepperContext;
|
|
16
|
+
//# sourceMappingURL=ContentStepperContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContentStepperContext.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContentWizard/context/ContentStepperContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAA6B,SAAS,EAAE,MAAM,OAAO,CAAC;AAEpE,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;CACpB;AAMD,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,EAAE,sBAAsB,CAAC;CAC/B;AAED,eAAO,MAAM,6BAA6B,EAAE,KAAK,CAAC,EAAE,CAClD,6BAA6B,CAO9B,CAAC;AAEF,eAAO,MAAM,wBAAwB,QAAO,sBAU3C,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React, { createContext, useContext } from "react";
|
|
2
|
+
const ContentStepperContext = /*#__PURE__*/createContext(undefined);
|
|
3
|
+
export const ContentStepperContextProvider = _ref => {
|
|
4
|
+
let {
|
|
5
|
+
children,
|
|
6
|
+
value
|
|
7
|
+
} = _ref;
|
|
8
|
+
return /*#__PURE__*/React.createElement(ContentStepperContext.Provider, {
|
|
9
|
+
value: value
|
|
10
|
+
}, children);
|
|
11
|
+
};
|
|
12
|
+
export const useContentStepperContext = () => {
|
|
13
|
+
const context = useContext(ContentStepperContext);
|
|
14
|
+
if (context === undefined) {
|
|
15
|
+
throw new Error("useContentWizardContext must be used within a ContentWizardContextProvider");
|
|
16
|
+
}
|
|
17
|
+
return context;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=ContentStepperContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContentStepperContext.js","names":["React","createContext","useContext","ContentStepperContext","undefined","ContentStepperContextProvider","_ref","children","value","createElement","Provider","useContentStepperContext","context","Error"],"sources":["../../../../../src/components/ContentWizard/context/ContentStepperContext.tsx"],"sourcesContent":["import React, { createContext, useContext, ReactNode } from \"react\";\n\nexport interface IContentStepperContext {\n activeStep: number;\n setActiveStep: (step: number) => void;\n goNext: () => void;\n goPrevious: () => void;\n direction: \"left\" | \"right\";\n totalSteps: number;\n}\n\nconst ContentStepperContext = createContext<IContentStepperContext | undefined>(\n undefined\n);\n\nexport interface IContentWizardContextProvider {\n children: ReactNode;\n value: IContentStepperContext;\n}\n\nexport const ContentStepperContextProvider: React.FC<\n IContentWizardContextProvider\n> = ({ children, value }) => {\n return (\n <ContentStepperContext.Provider value={value}>\n {children}\n </ContentStepperContext.Provider>\n );\n};\n\nexport const useContentStepperContext = (): IContentStepperContext => {\n const context = useContext(ContentStepperContext);\n\n if (context === undefined) {\n throw new Error(\n \"useContentWizardContext must be used within a ContentWizardContextProvider\"\n );\n }\n\n return context;\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,aAAa,EAAEC,UAAU,QAAmB,OAAO;AAWnE,MAAMC,qBAAqB,gBAAGF,aAAa,CACzCG,SACF,CAAC;AAOD,OAAO,MAAMC,6BAEZ,GAAGC,IAAA,IAAyB;EAAA,IAAxB;IAAEC,QAAQ;IAAEC;EAAM,CAAC,GAAAF,IAAA;EACtB,oBACEN,KAAA,CAAAS,aAAA,CAACN,qBAAqB,CAACO,QAAQ;IAACF,KAAK,EAAEA;EAAM,GAC1CD,QAC6B,CAAC;AAErC,CAAC;AAED,OAAO,MAAMI,wBAAwB,GAAGA,CAAA,KAA8B;EACpE,MAAMC,OAAO,GAAGV,UAAU,CAACC,qBAAqB,CAAC;EAEjD,IAAIS,OAAO,KAAKR,SAAS,EAAE;IACzB,MAAM,IAAIS,KAAK,CACb,4EACF,CAAC;EACH;EAEA,OAAOD,OAAO;AAChB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./
|
|
1
|
+
export * from "./ContentStepperContext";
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContentWizard/context/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContentWizard/context/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./
|
|
1
|
+
export * from "./ContentStepperContext";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/ContentWizard/context/index.ts"],"sourcesContent":["export * from \"./
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/ContentWizard/context/index.ts"],"sourcesContent":["export * from \"./ContentStepperContext\";\n"],"mappings":"AAAA,cAAc,yBAAyB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export * from "./
|
|
1
|
+
import { useContentStepperContext } from "./context";
|
|
2
|
+
export * from "./ContentStepper";
|
|
3
3
|
export * from "./ContentStep";
|
|
4
|
-
export {
|
|
4
|
+
export { useContentStepperContext };
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ContentWizard/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ContentWizard/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAErD,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAE9B,OAAO,EAAE,wBAAwB,EAAE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export * from "./
|
|
1
|
+
import { useContentStepperContext } from "./context";
|
|
2
|
+
export * from "./ContentStepper";
|
|
3
3
|
export * from "./ContentStep";
|
|
4
|
-
export {
|
|
4
|
+
export { useContentStepperContext };
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["
|
|
1
|
+
{"version":3,"file":"index.js","names":["useContentStepperContext"],"sources":["../../../../src/components/ContentWizard/index.ts"],"sourcesContent":["import { useContentStepperContext } from \"./context\";\n\nexport * from \"./ContentStepper\";\nexport * from \"./ContentStep\";\n\nexport { useContentStepperContext };\n"],"mappings":"AAAA,SAASA,wBAAwB,QAAQ,WAAW;AAEpD,cAAc,kBAAkB;AAChC,cAAc,eAAe;AAE7B,SAASA,wBAAwB"}
|