@awell-health/ui-library 0.1.71 → 0.1.72
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 +19 -0
- package/dist/index.js +15 -3
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -8195,6 +8195,25 @@ html {
|
|
|
8195
8195
|
.awell__form_trademark.awell__form_conversational {
|
|
8196
8196
|
padding-top: var(--awell-spacing-4);
|
|
8197
8197
|
}
|
|
8198
|
+
|
|
8199
|
+
/* Overlay for the opacity gradient */
|
|
8200
|
+
.awell__form_scroll_hint_overlay {
|
|
8201
|
+
position: fixed;
|
|
8202
|
+
bottom: 50px;
|
|
8203
|
+
left: 0;
|
|
8204
|
+
width: 100%;
|
|
8205
|
+
height: 70px;
|
|
8206
|
+
background: linear-gradient(to bottom, transparent, var(--awell-neutralLight10) 100%);
|
|
8207
|
+
pointer-events: none; /* Prevent interaction */
|
|
8208
|
+
transition: top 0.5s ease-in-out;
|
|
8209
|
+
}
|
|
8210
|
+
|
|
8211
|
+
.awell__form_footer_for_traditional_form {
|
|
8212
|
+
width: 100%;
|
|
8213
|
+
position: fixed;
|
|
8214
|
+
bottom: 0;
|
|
8215
|
+
left: 0;
|
|
8216
|
+
}
|
|
8198
8217
|
@import 'https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap';
|
|
8199
8218
|
:root {
|
|
8200
8219
|
--awell-accent100: #fdb833;
|
package/dist/index.js
CHANGED
|
@@ -37804,7 +37804,7 @@ Check the top-level render call using <` + t + ">.");
|
|
|
37804
37804
|
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 })) })) }))] });
|
|
37805
37805
|
};
|
|
37806
37806
|
|
|
37807
|
-
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":"awell__form_traditional_form","traditional_form_question":"awell__form_traditional_form_question","trademark":"awell__form_trademark","traditional":"awell__form_traditional","conversational":"awell__form_conversational"};
|
|
37807
|
+
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":"awell__form_traditional_form","traditional_form_question":"awell__form_traditional_form_question","trademark":"awell__form_trademark","traditional":"awell__form_traditional","conversational":"awell__form_conversational","scroll_hint_overlay":"awell__form_scroll_hint_overlay","footer_for_traditional_form":"awell__form_footer_for_traditional_form"};
|
|
37808
37808
|
|
|
37809
37809
|
var useClickOutsideNotifier = function (_a) {
|
|
37810
37810
|
var ref = _a.ref,clickOutsideHandler = _a.clickOutsideHandler;
|
|
@@ -38380,6 +38380,18 @@ Check the top-level render call using <` + t + ">.");
|
|
|
38380
38380
|
|
|
38381
38381
|
var TraditionalForm = function (_a) {
|
|
38382
38382
|
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;
|
|
38383
|
+
var scrollHintOverlayRef = React.useRef(null);
|
|
38384
|
+
React.useEffect(function () {
|
|
38385
|
+
var handleScroll = function () {
|
|
38386
|
+
if (scrollHintOverlayRef.current) {
|
|
38387
|
+
var _a = document.documentElement,scrollTop = _a.scrollTop,scrollHeight = _a.scrollHeight,clientHeight = _a.clientHeight;
|
|
38388
|
+
var isAtBottom = scrollTop + clientHeight >= scrollHeight;
|
|
38389
|
+
scrollHintOverlayRef.current.style.top = isAtBottom ? '100%' : 'auto';
|
|
38390
|
+
}
|
|
38391
|
+
};
|
|
38392
|
+
window.addEventListener('scroll', handleScroll);
|
|
38393
|
+
return function () {return window.removeEventListener('scroll', handleScroll);};
|
|
38394
|
+
}, []);
|
|
38383
38395
|
var _c = useTheme(),updateLayoutMode = _c.updateLayoutMode,resetLayoutMode = _c.resetLayoutMode;
|
|
38384
38396
|
var _d = useTraditionalForm({
|
|
38385
38397
|
questions: form.questions,
|
|
@@ -38396,9 +38408,9 @@ Check the top-level render call using <` + t + ">.");
|
|
|
38396
38408
|
resetLayoutMode();
|
|
38397
38409
|
};
|
|
38398
38410
|
}, []);
|
|
38399
|
-
return jsxRuntime.exports.jsxs(
|
|
38411
|
+
return jsxRuntime.exports.jsxs("div", { children: [jsxRuntime.exports.jsx("main", __assign({ id: "ahp_main_content_with_scroll_hint", className: "".concat(layoutClasses.main_content, " ").concat(classes$4.traditional_form) }, { children: jsxRuntime.exports.jsxs("div", __assign({ className: "".concat(classes$4.container, " ").concat(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.
|
|
38400
38412
|
filter(function (vb) {return vb.visible;}).
|
|
38401
|
-
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 }, visibleQuestion.id) }), visibleQuestion.id);}) }) }), (form === null || form === void 0 ? void 0 : form.trademark) && jsxRuntime.exports.jsx("div", __assign({ className: "".concat(classes$4.trademark, " ").concat(classes$4.conversational) }, { children: form.trademark }))] })) })), jsxRuntime.exports.jsx(HostedPageFooter, __assign({ showScrollHint: false }, { children: jsxRuntime.exports.jsxs("div", __assign({ className:
|
|
38413
|
+
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 }, visibleQuestion.id) }), visibleQuestion.id);}) }) }), (form === null || form === void 0 ? void 0 : form.trademark) && jsxRuntime.exports.jsx("div", __assign({ className: "".concat(classes$4.trademark, " ").concat(classes$4.conversational) }, { children: form.trademark }))] })) })), jsxRuntime.exports.jsx("div", { ref: scrollHintOverlayRef, className: classes$4.scroll_hint_overlay }), jsxRuntime.exports.jsx("div", __assign({ className: classes$4.footer_for_traditional_for }, { children: jsxRuntime.exports.jsx(HostedPageFooter, __assign({ showScrollHint: false }, { 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 }))] })) })) }))] });
|
|
38402
38414
|
};
|
|
38403
38415
|
|
|
38404
38416
|
var WizardForm = ConversationalForm;
|