@awell-health/ui-library 0.1.105 → 0.1.106
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +0 -26
- package/dist/index.js +15 -21
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -8284,32 +8284,6 @@ html {
|
|
|
8284
8284
|
.awell__form_trademark.awell__form_conversational {
|
|
8285
8285
|
padding-top: var(--awell-spacing-4);
|
|
8286
8286
|
}
|
|
8287
|
-
|
|
8288
|
-
/* Overlay for the opacity gradient */
|
|
8289
|
-
.awell__form_scroll_hint_overlay {
|
|
8290
|
-
position: fixed;
|
|
8291
|
-
bottom: 50px;
|
|
8292
|
-
left: 0;
|
|
8293
|
-
width: 100%;
|
|
8294
|
-
height: 50px;
|
|
8295
|
-
background: linear-gradient(to bottom, transparent, var(--awell-neutralLight10) 50%);
|
|
8296
|
-
pointer-events: none; /* Prevent interaction */
|
|
8297
|
-
transition: top 0.5s ease-in-out;
|
|
8298
|
-
}
|
|
8299
|
-
|
|
8300
|
-
.awell__form_scroll_indicator_wrapper {
|
|
8301
|
-
position: fixed;
|
|
8302
|
-
right: 1vw;
|
|
8303
|
-
bottom: 30vh;
|
|
8304
|
-
z-index: 1001;
|
|
8305
|
-
pointer-events: none;
|
|
8306
|
-
transition: opacity 0.3s ease-in-out;
|
|
8307
|
-
}
|
|
8308
|
-
@media (min-width: 1024px) {
|
|
8309
|
-
.awell__form_scroll_indicator_wrapper {
|
|
8310
|
-
right: 20vw;
|
|
8311
|
-
}
|
|
8312
|
-
}
|
|
8313
8287
|
@import 'https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap';
|
|
8314
8288
|
:root {
|
|
8315
8289
|
--awell-accent100: #fdb833;
|
package/dist/index.js
CHANGED
|
@@ -48545,10 +48545,22 @@ var Kr=[{
|
|
|
48545
48545
|
|
|
48546
48546
|
var HostedPageFooter = function (_a) {
|
|
48547
48547
|
var children = _a.children,_b = _a.showScrollHint,showScrollHint = _b === void 0 ? false : _b,_c = _a.fixPosition,fixPosition = _c === void 0 ? false : _c;
|
|
48548
|
+
var scrollIndicatorRef = React.useRef(null);
|
|
48549
|
+
React.useEffect(function () {
|
|
48550
|
+
var handleScroll = function () {
|
|
48551
|
+
if (scrollIndicatorRef.current) {
|
|
48552
|
+
var _a = document.documentElement,scrollTop = _a.scrollTop,scrollHeight = _a.scrollHeight,clientHeight = _a.clientHeight;
|
|
48553
|
+
var isAtBottom = scrollTop + clientHeight >= scrollHeight - 1;
|
|
48554
|
+
scrollIndicatorRef.current.style.opacity = isAtBottom ? '0' : '1';
|
|
48555
|
+
}
|
|
48556
|
+
};
|
|
48557
|
+
window.addEventListener('scroll', handleScroll);
|
|
48558
|
+
return function () {return window.removeEventListener('scroll', handleScroll);};
|
|
48559
|
+
}, []);
|
|
48548
48560
|
var footerClass = fixPosition ?
|
|
48549
48561
|
"".concat(classes$7.footer, " ").concat(classes$7.fixed) :
|
|
48550
48562
|
classes$7.footer;
|
|
48551
|
-
return jsxRuntime.exports.jsxs("footer", __assign({ className: footerClass }, { children: [jsxRuntime.exports.jsx("div", __assign({ className: "".concat(classes$7.scrollHint, " ").concat(showScrollHint ? classes$7.visible : classes$7.hidden), id: "awell__form_scrollhint" }, { children: jsxRuntime.exports.jsx(ScrollIndicator, {}) })), children] }));
|
|
48563
|
+
return jsxRuntime.exports.jsxs("footer", __assign({ className: footerClass }, { children: [jsxRuntime.exports.jsx("div", __assign({ ref: scrollIndicatorRef, className: "".concat(classes$7.scrollHint, " ").concat(showScrollHint ? classes$7.visible : classes$7.hidden), id: "awell__form_scrollhint" }, { children: jsxRuntime.exports.jsx(ScrollIndicator, {}) })), children] }));
|
|
48552
48564
|
};
|
|
48553
48565
|
|
|
48554
48566
|
var classes$6 = {"container":"awell__checklist_container","awell_checklist":"awell__checklist_awell_checklist","title":"awell__checklist_title","checklist":"awell__checklist_checklist","checkboxListFormControl":"awell__checklist_checkboxListFormControl","button_wrapper":"awell__checklist_button_wrapper"};
|
|
@@ -48579,7 +48591,7 @@ var Kr=[{
|
|
|
48579
48591
|
return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment, { children: [jsxRuntime.exports.jsx("main", __assign({ id: "ahp_main_content_with_scroll_hint", className: layoutClasses.main_content }, { children: jsxRuntime.exports.jsxs("article", __assign({ className: "".concat(classes$5.awell_message, " ").concat(classes$5.container) }, { children: [jsxRuntime.exports.jsx("div", __assign({ className: classes$5.message_title }, { children: subject })), jsxRuntime.exports.jsx("div", __assign({ className: classes$5.content }, { children: jsxRuntime.exports.jsx(RichTextViewer, { content: cleanContent }) })), jsxRuntime.exports.jsxs("div", __assign({ className: classes$5.attachmentList }, { children: [jsxRuntime.exports.jsx(AttachmentList, { attachments: attachments, icon: attachmentIcon, labels: attachmentLabels }), children] }))] })) })), jsxRuntime.exports.jsx(HostedPageFooter, __assign({ showScrollHint: showScrollHint }, { children: jsxRuntime.exports.jsx("div", __assign({ className: "".concat(classes$5.button_wrapper, " ").concat(classes$5.container) }, { children: jsxRuntime.exports.jsx(Button, __assign({ "data-cy": "markMessageAsReadButton", variant: "secondary", onClick: onMessageRead }, { children: buttonLabels.readMessage })) })) }))] });
|
|
48580
48592
|
};
|
|
48581
48593
|
|
|
48582
|
-
var classes$4 = {"container":"awell__form_container","traditional_container":"awell__form_traditional_container","awell_wizard_form":"awell__form_awell_wizard_form","form_progress":"awell__form_form_progress","loadingContainer":"awell__form_loadingContainer","title":"awell__form_title","wizard_form":"awell__form_wizard_form","conversational_button_wrapper":"awell__form_conversational_button_wrapper","traditional_button_wrapper":"awell__form_traditional_button_wrapper","traditional_form_question":"awell__form_traditional_form_question","trademark":"awell__form_trademark","conversational":"awell__form_conversational"
|
|
48594
|
+
var classes$4 = {"container":"awell__form_container","traditional_container":"awell__form_traditional_container","awell_wizard_form":"awell__form_awell_wizard_form","form_progress":"awell__form_form_progress","loadingContainer":"awell__form_loadingContainer","title":"awell__form_title","wizard_form":"awell__form_wizard_form","conversational_button_wrapper":"awell__form_conversational_button_wrapper","traditional_button_wrapper":"awell__form_traditional_button_wrapper","traditional_form_question":"awell__form_traditional_form_question","trademark":"awell__form_trademark","conversational":"awell__form_conversational"};
|
|
48583
48595
|
|
|
48584
48596
|
var useClickOutsideNotifier = function (_a) {
|
|
48585
48597
|
var ref = _a.ref,clickOutsideHandler = _a.clickOutsideHandler;
|
|
@@ -49414,24 +49426,6 @@ var Kr=[{
|
|
|
49414
49426
|
|
|
49415
49427
|
var TraditionalForm = function (_a) {
|
|
49416
49428
|
var form = _a.form,onSubmit = _a.onSubmit,buttonLabels = _a.buttonLabels,evaluateDisplayConditions = _a.evaluateDisplayConditions,errorLabels = _a.errorLabels,storedAnswers = _a.storedAnswers,onAnswersChange = _a.onAnswersChange,_b = _a.autosaveAnswers,autosaveAnswers = _b === void 0 ? true : _b,questionLabels = _a.questionLabels,onFileUpload = _a.onFileUpload;
|
|
49417
|
-
var scrollHintOverlayRef = React.useRef(null);
|
|
49418
|
-
var scrollIndicatorRef = React.useRef(null);
|
|
49419
|
-
React.useEffect(function () {
|
|
49420
|
-
var handleScroll = function () {
|
|
49421
|
-
if (scrollHintOverlayRef.current) {
|
|
49422
|
-
var _a = document.documentElement,scrollTop = _a.scrollTop,scrollHeight = _a.scrollHeight,clientHeight = _a.clientHeight;
|
|
49423
|
-
var isAtBottom = scrollTop + clientHeight >= scrollHeight - 1;
|
|
49424
|
-
scrollHintOverlayRef.current.style.top = isAtBottom ? '100%' : 'auto';
|
|
49425
|
-
}
|
|
49426
|
-
if (scrollIndicatorRef.current) {
|
|
49427
|
-
var _b = document.documentElement,scrollTop = _b.scrollTop,scrollHeight = _b.scrollHeight,clientHeight = _b.clientHeight;
|
|
49428
|
-
var isAtBottom = scrollTop + clientHeight >= scrollHeight - 1;
|
|
49429
|
-
scrollIndicatorRef.current.style.opacity = isAtBottom ? '0' : '1';
|
|
49430
|
-
}
|
|
49431
|
-
};
|
|
49432
|
-
window.addEventListener('scroll', handleScroll);
|
|
49433
|
-
return function () {return window.removeEventListener('scroll', handleScroll);};
|
|
49434
|
-
}, []);
|
|
49435
49429
|
var _c = useTheme(),updateLayoutMode = _c.updateLayoutMode,resetLayoutMode = _c.resetLayoutMode;
|
|
49436
49430
|
var _d = useTraditionalForm({
|
|
49437
49431
|
questions: form.questions,
|
|
@@ -49450,7 +49444,7 @@ var Kr=[{
|
|
|
49450
49444
|
});
|
|
49451
49445
|
return jsxRuntime.exports.jsxs("div", __assign({ style: { height: '100%' } }, { children: [jsxRuntime.exports.jsx("main", __assign({ id: "ahp_main_content_with_scroll_hint", className: clsx(layoutClasses.main_content, classes$4.traditional_form) }, { children: jsxRuntime.exports.jsxs("div", __assign({ className: clsx(classes$4.container, classes$4.traditional_container) }, { children: [!questionWithVisiblity ? jsxRuntime.exports.jsx("div", __assign({ className: classes$4.loadingContainer }, { children: jsxRuntime.exports.jsx(LoadActivityPlaceholder, {}) })) : jsxRuntime.exports.jsx("div", { children: jsxRuntime.exports.jsx("div", { children: questionWithVisiblity.
|
|
49452
49446
|
filter(function (vb) {return vb.visible;}).
|
|
49453
|
-
map(function (visibleQuestion) {return jsxRuntime.exports.jsx("div", __assign({ className: classes$4.traditional_form_question }, { children: jsxRuntime.exports.jsx(Question, { question: visibleQuestion, control: control, getValues: getValues, errors: errors, inputAutoFocus: false, onAnswerChange: updateQuestionVisibility, labels: questionLabels, onFileUpload: onFileUpload }, visibleQuestion.id) }), visibleQuestion.id);}) }) }), (form === null || form === void 0 ? void 0 : form.trademark) && jsxRuntime.exports.jsx("div", __assign({ className: classes$4.trademark }, { children: form.trademark }))] })) })), jsxRuntime.exports.jsx(
|
|
49447
|
+
map(function (visibleQuestion) {return jsxRuntime.exports.jsx("div", __assign({ className: classes$4.traditional_form_question }, { children: jsxRuntime.exports.jsx(Question, { question: visibleQuestion, control: control, getValues: getValues, errors: errors, inputAutoFocus: false, onAnswerChange: updateQuestionVisibility, labels: questionLabels, onFileUpload: onFileUpload }, visibleQuestion.id) }), visibleQuestion.id);}) }) }), (form === null || form === void 0 ? void 0 : form.trademark) && jsxRuntime.exports.jsx("div", __assign({ className: classes$4.trademark }, { children: form.trademark }))] })) })), jsxRuntime.exports.jsx(HostedPageFooter, __assign({ showScrollHint: true, fixPosition: true }, { children: jsxRuntime.exports.jsxs("div", __assign({ className: classes$4.traditional_button_wrapper }, { children: [formHasErrors && jsxRuntime.exports.jsx("div", { children: jsxRuntime.exports.jsx(Text, __assign({ variant: "textSmall", color: "var(--awell-signalError100)" }, { children: errorLabels.formHasErrors })) }), jsxRuntime.exports.jsx("div", {}), jsxRuntime.exports.jsx(Button, __assign({ onClick: submitForm, type: "submit", "data-cy": "submitFormButton", disabled: isSubmittingForm }, { children: buttonLabels.submit }))] })) }))] }));
|
|
49454
49448
|
};
|
|
49455
49449
|
|
|
49456
49450
|
var WizardForm = ConversationalForm;
|