@awell-health/ui-library 0.1.61 → 0.1.63

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 CHANGED
@@ -1167,7 +1167,7 @@ html {
1167
1167
  }
1168
1168
  .awell__questionLabel_label {
1169
1169
  margin-bottom: var(--awell-spacing-1\.5);
1170
- font-size: var(--awell-font-size-sm);
1170
+ font-size: var(--awell-font-size-base);
1171
1171
  line-height: var(--awell-leading-normal);
1172
1172
  font-weight: var(--awell-font-medium);
1173
1173
  color: rgb(55, 65, 81);
@@ -1176,7 +1176,7 @@ html {
1176
1176
  }
1177
1177
  @media (min-width: 640px) {
1178
1178
  .awell__questionLabel_label {
1179
- font-size: var(--awell-font-size-base);
1179
+ font-size: var(--awell-font-size-lg);
1180
1180
  line-height: var(--awell-leading-relaxed);
1181
1181
  }
1182
1182
  }
@@ -10013,6 +10013,10 @@ html {
10013
10013
  margin: 0 auto;
10014
10014
  }
10015
10015
 
10016
+ .awell__collectMedication_label {
10017
+ margin-bottom: var(--awell-spacing-4);
10018
+ }
10019
+
10016
10020
  .awell__collectMedication_groupMedsListContainer {
10017
10021
  font-size: var(--awell-font-size-sm);
10018
10022
  display: flex;
package/dist/index.js CHANGED
@@ -33884,9 +33884,14 @@ Check the top-level render call using <` + t + ">.");
33884
33884
  }
33885
33885
  }, [internalValue, is_value_tooltip_on, max, min, touched]);
33886
33886
  return jsxRuntime.exports.jsxs("div", { children: [jsxRuntime.exports.jsx(QuestionLabel, { htmlFor: id, label: label, mandatory: mandatory, id: "".concat(id, "-label") }), jsxRuntime.exports.jsxs("div", __assign({ className: classes$i.input_container }, { children: [jsxRuntime.exports.jsx("div", __assign({ className: "".concat(classes$i.touch_tooltip_wrapper, " ").concat(is_value_tooltip_on ? classes$i.with_value_tooltip : '') }, { children: renderTouchTooltip() })), jsxRuntime.exports.jsxs("div", __assign({ className: "".concat(classes$i.awell_range_input_wrapper, " ").concat(display_marks ? classes$i.with_marks : ''), style: style }, { children: [is_value_tooltip_on &&
33887
- renderValueTooltip(internalValue, tooltipPosition.left, tooltipPosition.top, touched), jsxRuntime.exports.jsx("input", __assign({}, props, { "data-testid": id, type: "range", id: "awell__slider_input", min: min, max: max, step: step_value, className: "".concat(classes$i.awell_range_input, " ").concat(touched ? classes$i.showThumb : classes$i.hideThumb), onChange: handleValueChange, onFocus: function () {
33888
- setTouched(true);
33889
- onTouched(true);
33887
+ renderValueTooltip(internalValue, tooltipPosition.left, tooltipPosition.top, touched), jsxRuntime.exports.jsx("input", __assign({}, props, { "data-testid": id, type: "range", id: "awell__slider_input", min: min, max: max, step: step_value, className: "".concat(classes$i.awell_range_input, " ").concat(touched ? classes$i.showThumb : classes$i.hideThumb), onChange: handleValueChange, onFocus: function (e) {
33888
+ if (!touched) {
33889
+ handleValueChange(e);
33890
+ } else
33891
+ {
33892
+ setTouched(true);
33893
+ onTouched(true);
33894
+ }
33890
33895
  }, "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": props.value || min, "aria-labelledby": "".concat(id, "-label") }))] })), jsxRuntime.exports.jsxs("div", __assign({ className: classes$i.min_max_wrapper }, { children: [show_min_max_values && jsxRuntime.exports.jsxs("div", __assign({ className: classes$i.min_max_data_list, "data-testid": "".concat(id, "-datalist-values") }, { children: [jsxRuntime.exports.jsx("div", __assign({ className: classes$i.min, "aria-label": "Minimum value" }, { children: min })), jsxRuntime.exports.jsx("div", __assign({ className: classes$i.max, "aria-label": "Maximum value" }, { children: max }))] })), (!lodash.exports.isEmpty(min_label) || !lodash.exports.isEmpty(max_label)) && jsxRuntime.exports.jsxs("div", __assign({ className: classes$i.min_max_data_list, "data-testid": "".concat(id, "-datalist-labels") }, { children: [jsxRuntime.exports.jsx("div", __assign({ className: classes$i.min, "aria-label": "Minimum label" }, { children: min_label })), jsxRuntime.exports.jsx("div", __assign({ className: classes$i.max, "aria-label": "Maximum label" }, { children: max_label }))] }))] }))] }))] });
33891
33896
  };
33892
33897
 
@@ -51792,10 +51797,10 @@ Check the top-level render call using <` + t + ">.");
51792
51797
  };
51793
51798
  CloudinarySingleFileUpload.displayName = 'CloudinarySingleFileUpload';
51794
51799
 
51795
- var classes = {"container":"awell__collectMedication_container","groupMedsListContainer":"awell__collectMedication_groupMedsListContainer","singleMedsListContainer":"awell__collectMedication_singleMedsListContainer","addMedsButton":"awell__collectMedication_addMedsButton","deleteMedsButton":"awell__collectMedication_deleteMedsButton","icon":"awell__collectMedication_icon","button_wrapper":"awell__collectMedication_button_wrapper"};
51800
+ var classes = {"container":"awell__collectMedication_container","label":"awell__collectMedication_label","groupMedsListContainer":"awell__collectMedication_groupMedsListContainer","singleMedsListContainer":"awell__collectMedication_singleMedsListContainer","addMedsButton":"awell__collectMedication_addMedsButton","deleteMedsButton":"awell__collectMedication_deleteMedsButton","icon":"awell__collectMedication_icon","button_wrapper":"awell__collectMedication_button_wrapper"};
51796
51801
 
51797
51802
  var CollectMedication = function (_a) {
51798
- var text = _a.text,onSubmit = _a.onSubmit;
51803
+ var label = _a.label,text = _a.text,onSubmit = _a.onSubmit;
51799
51804
  var _b = React.useState([]),medications = _b[0],setMedications = _b[1];
51800
51805
  var _c = useTheme(),updateLayoutMode = _c.updateLayoutMode,resetLayoutMode = _c.resetLayoutMode;
51801
51806
  React.useEffect(function () {
@@ -51824,7 +51829,7 @@ Check the top-level render call using <` + t + ">.");
51824
51829
  var removeMedication = function (index) {
51825
51830
  setMedications(medications.filter(function (_, i) {return i !== index;}));
51826
51831
  };
51827
- return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment, { children: [jsxRuntime.exports.jsxs("main", __assign({ id: "ahp_main_content_with_scroll_hint", className: layoutClasses.main_content }, { children: [jsxRuntime.exports.jsx("div", __assign({ className: "".concat(classes.container, " ").concat(classes.groupMedsListContainer) }, { children: medications.map(function (medication, index) {return jsxRuntime.exports.jsxs("div", __assign({ className: classes.singleMedsListContainer }, { children: [jsxRuntime.exports.jsx(InputField, { id: "name", label: text.medication_name, type: "text", value: medication.name, onChange: function (e) {
51832
+ return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment, { children: [jsxRuntime.exports.jsxs("main", __assign({ id: "ahp_main_content_with_scroll_hint", className: layoutClasses.main_content }, { children: [!lodash.exports.isEmpty(label) && jsxRuntime.exports.jsx("div", __assign({ className: "".concat(classes.container, " ").concat(classes.label) }, { children: jsxRuntime.exports.jsx(QuestionLabel, { label: label !== null && label !== void 0 ? label : '' }) })), jsxRuntime.exports.jsx("div", __assign({ className: "".concat(classes.container, " ").concat(classes.groupMedsListContainer) }, { children: medications.map(function (medication, index) {return jsxRuntime.exports.jsxs("div", __assign({ className: classes.singleMedsListContainer }, { children: [jsxRuntime.exports.jsx(InputField, { id: "name", label: text.medication_name, type: "text", value: medication.name, onChange: function (e) {
51828
51833
  return updateMedication(index, 'name', e.target.value);
51829
51834
  }, placeholder: text.medication_name }), jsxRuntime.exports.jsx(InputField, { id: "dose", label: text.medication_dose, type: "text", value: medication.dose, onChange: function (e) {
51830
51835
  return updateMedication(index, 'dose', e.target.value);
@@ -5,6 +5,7 @@ export declare type Medication = {
5
5
  };
6
6
  export interface CollectMedicationProps {
7
7
  onSubmit: (data: Medication[]) => void;
8
+ label?: string;
8
9
  text: {
9
10
  medication_name: string;
10
11
  medication_dose: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awell-health/ui-library",
3
- "version": "0.1.61",
3
+ "version": "0.1.63",
4
4
  "private": false,
5
5
  "description": "UI components to integrate with Awell Health",
6
6
  "repository": {