@bigbinary/neeto-molecules 5.2.30 → 5.2.31

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.
@@ -22,16 +22,16 @@ require('@babel/runtime/helpers/defineProperty');
22
22
  var jsxRuntime = require('react/jsx-runtime');
23
23
  var formik$1 = require('@bigbinary/neeto-atoms/formik');
24
24
  var classnames = require('classnames');
25
- var Copy = require('@bigbinary/neeto-icons/Copy');
26
25
  var _typeof = require('@babel/runtime/helpers/typeof');
27
- var Plus = require('@bigbinary/neeto-icons/Plus');
28
- var Delete = require('@bigbinary/neeto-icons/Delete');
26
+ var trash2 = require('../trash-2-Dic3f2Hq.js');
27
+ var plus = require('../plus-B3N_9NiI.js');
28
+ var copy = require('../copy-9aTKZsfo.js');
29
29
  var Profile = require('@bigbinary/neeto-team-members-frontend/v2/Profile');
30
30
  var v2_MoreDropdown = require('./MoreDropdown.js');
31
31
  var injectCss = require('../inject-css-B6qYtOJe.js');
32
+ require('../createLucideIcon-BbuuRL2u.js');
32
33
  require('@babel/runtime/helpers/objectWithoutProperties');
33
34
  require('@bigbinary/neeto-commons-frontend/v2/react-utils');
34
- require('../createLucideIcon-BbuuRL2u.js');
35
35
  require('../ellipsis-DDma6joP.js');
36
36
 
37
37
  function _interopNamespaceDefault(e) {
@@ -373,13 +373,12 @@ var DisplayAvailability = function DisplayAvailability(_ref) {
373
373
  children: sortDays(firstDay).map(function (day) {
374
374
  var _sortPeriodsByKey;
375
375
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
376
- className: "flex w-full flex-wrap items-center justify-center gap-2 rounded-md border border-gray-300 bg-white px-6 py-4 sm:items-start sm:justify-start",
376
+ className: "border-border bg-card flex w-full flex-wrap items-center justify-center gap-2 rounded-md border px-6 py-4 sm:items-start sm:justify-start",
377
377
  "data-testid": "day-cards-".concat(day),
378
378
  children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
379
379
  className: "mt-0.5 w-24 text-center sm:w-1/4 sm:text-start",
380
380
  "data-testid": general.joinHyphenCase(day, "day-text"),
381
- variant: "h5",
382
- weight: "semibold",
381
+ variant: "h6",
383
382
  children: t("neetoMolecules.schedule.days.".concat(day))
384
383
  }), /*#__PURE__*/jsxRuntime.jsx("div", {
385
384
  className: "flex flex-grow flex-col items-center gap-y-4 sm:w-1/2",
@@ -392,18 +391,16 @@ var DisplayAvailability = function DisplayAvailability(_ref) {
392
391
  className: "flex items-center gap-x-4",
393
392
  children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
394
393
  className: "w-20 text-end",
395
- variant: "h5",
396
- weight: "semibold",
394
+ variant: "h6",
397
395
  "data-testid": general.joinHyphenCase(day, period.startTime, "start-time-text"),
398
396
  children: formatHour(period.startTime)
399
397
  }), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
400
398
  as: "span",
401
- className: "text-gray-600",
399
+ color: "muted",
402
400
  children: "-"
403
401
  }), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
404
402
  className: "w-20 text-start",
405
- variant: "h5",
406
- weight: "semibold",
403
+ variant: "h6",
407
404
  "data-testid": general.joinHyphenCase(day, period.endTime, "start-time-text"),
408
405
  children: formatHour(period.endTime)
409
406
  })]
@@ -411,7 +408,7 @@ var DisplayAvailability = function DisplayAvailability(_ref) {
411
408
  }) : /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
412
409
  className: "mx-8 flex-grow text-center",
413
410
  "data-testid": general.joinHyphenCase(day, "unavailable-time-text"),
414
- variant: "h5",
411
+ variant: "h6",
415
412
  children: t("neetoMolecules.schedule.unavailable")
416
413
  })
417
414
  })]
@@ -595,7 +592,7 @@ var ScheduleRow$1 = function ScheduleRow(_ref) {
595
592
  isClearable: true,
596
593
  isCreatable: true,
597
594
  isSearchable: true,
598
- className: "w-full",
595
+ className: "w-full min-w-0",
599
596
  filterOption: filterSlots,
600
597
  isValidNewOption: isValidTimeSlotOption,
601
598
  name: "wdays.".concat(day, ".periods[").concat(index, "].startTime"),
@@ -610,7 +607,7 @@ var ScheduleRow$1 = function ScheduleRow(_ref) {
610
607
  isClearable: true,
611
608
  isCreatable: true,
612
609
  isSearchable: true,
613
- className: "w-full",
610
+ className: "w-full min-w-0",
614
611
  filterOption: filterSlots,
615
612
  isValidNewOption: isValidTimeSlotOption,
616
613
  name: "wdays.".concat(day, ".periods[").concat(index, "].endTime"),
@@ -623,7 +620,7 @@ var ScheduleRow$1 = function ScheduleRow(_ref) {
623
620
  }), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Button, {
624
621
  className: "flex-shrink-0 self-start",
625
622
  "data-testid": "delete-period-button",
626
- icon: Delete,
623
+ icon: trash2.Trash2,
627
624
  variant: "ghost",
628
625
  onClick: function onClick() {
629
626
  return handleDeleteRow(arrayHelpers, index);
@@ -633,7 +630,7 @@ var ScheduleRow$1 = function ScheduleRow(_ref) {
633
630
  name: "wdays.".concat(day, ".periods[").concat(index, "]"),
634
631
  children: function children(message) {
635
632
  return _typeof(message) !== "object" && /*#__PURE__*/jsxRuntime.jsx("span", {
636
- className: "text-error-500 mt-1 w-11/12 px-2 text-xs",
633
+ className: "text-error-foreground mt-1 w-11/12 px-2 text-xs",
637
634
  children: message
638
635
  });
639
636
  }
@@ -643,7 +640,7 @@ var ScheduleRow$1 = function ScheduleRow(_ref) {
643
640
  }), values.wdays[day].available && allowAddPeriod && /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Button, {
644
641
  className: "absolute end-14 top-3 ms-auto flex-shrink-0 @xl:static",
645
642
  "data-testid": "add-new-period-button",
646
- icon: Plus,
643
+ icon: plus.Plus,
647
644
  variant: "secondary",
648
645
  tooltipProps: {
649
646
  content: t("neetoMolecules.schedule.addNewPeriod"),
@@ -714,7 +711,7 @@ var Form$1 = function Form(_ref) {
714
711
  return setWdaysToCopy(checked ? ramda.append(day) : ramda.without([day]));
715
712
  };
716
713
  return /*#__PURE__*/jsxRuntime.jsx("div", {
717
- className: "@container relative mb-3 w-full rounded-md border border-gray-300 bg-white px-4 last:mb-0 md:px-6",
714
+ className: "border-border bg-card @container relative mb-3 w-full rounded-md border px-4 last:mb-0 md:px-6",
718
715
  children: /*#__PURE__*/jsxRuntime.jsxs("div", {
719
716
  className: "@xl:flex-no-wrap my-4 flex w-full flex-wrap items-start gap-2 @xl:flex-nowrap @xl:gap-4" // Added `@xl:flex-no-wrap` since neetoCal is using old version of tailwind
720
717
  ,
@@ -730,49 +727,45 @@ var Form$1 = function Form(_ref) {
730
727
  "data-testid": general.joinHyphenCase(day, "weekly-hours-checkbox"),
731
728
  id: "day",
732
729
  name: "wdays.".concat(day, ".available"),
730
+ size: "lg",
733
731
  onCheckedChange: handleCheckbox
734
732
  }), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
735
733
  as: "span",
734
+ className: "ms-2 capitalize",
735
+ color: values.wdays[day].available ? "default" : "muted",
736
736
  "data-testid": general.joinHyphenCase(day, "day-text"),
737
737
  variant: "body2",
738
738
  weight: values.wdays[day].available ? "semibold" : "normal",
739
- className: classnames("ms-2 capitalize", {
740
- "text-gray-600": !values.wdays[day].available
741
- }),
742
739
  children: t("neetoMolecules.schedule.days.".concat(day))
743
740
  })]
744
741
  }), /*#__PURE__*/jsxRuntime.jsx(ScheduleRow, {
745
742
  day: day
746
743
  }), values.wdays[day].available && /*#__PURE__*/jsxRuntime.jsxs(neetoAtoms.DropdownMenu, {
747
744
  closeOnSelect: true,
748
- icon: Copy,
745
+ dropdownProps: {
746
+ className: "w-max"
747
+ },
749
748
  position: "right-start",
750
- buttonProps: {
749
+ customTarget: /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Button, {
750
+ className: "absolute end-4 top-3 flex-shrink-0 @xl:static",
751
+ "data-testid": general.joinHyphenCase(day, "copy-schedule-icon"),
752
+ icon: copy.Copy,
751
753
  variant: "secondary",
752
754
  tooltipProps: {
753
755
  content: t("neetoMolecules.schedule.copyScheduleTooltip"),
754
- position: "top",
755
- hideAfter: 5000,
756
- touch: ["hold", 500]
757
- },
758
- className: "absolute end-4 top-3 @xl:static flex-shrink-0",
759
- "data-testid": general.joinHyphenCase(day, "copy-schedule-icon")
760
- },
761
- dropdownProps: {
762
- className: "dropdown__popup neeto-molecules-schedule__dropdown"
763
- },
756
+ position: "top"
757
+ }
758
+ }),
764
759
  onClose: function onClose() {
765
760
  return setWdaysToCopy([]);
766
761
  },
767
- children: [/*#__PURE__*/jsxRuntime.jsx("li", {
768
- children: /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
769
- variant: "h5",
770
- children: t("neetoMolecules.schedule.copySchedule")
771
- })
762
+ children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.DropdownMenu.Label, {
763
+ children: t("neetoMolecules.schedule.copySchedule")
772
764
  }), sortDays(firstDay).filter(function (copyDay) {
773
765
  return copyDay !== day;
774
766
  }).map(function (day) {
775
- return /*#__PURE__*/jsxRuntime.jsx("li", {
767
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
768
+ className: "px-1.5 py-1",
776
769
  onClick: function onClick(e) {
777
770
  return e.stopPropagation();
778
771
  },
@@ -788,7 +781,8 @@ var Form$1 = function Form(_ref) {
788
781
  })
789
782
  })
790
783
  }, day);
791
- }), /*#__PURE__*/jsxRuntime.jsx("li", {
784
+ }), /*#__PURE__*/jsxRuntime.jsx("div", {
785
+ className: "px-1.5 py-1",
792
786
  children: /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Button, {
793
787
  "data-testid": "copy-schedule-submit-button",
794
788
  disabled: neetoCist.isNotPresent(wdaysToCopy),
@@ -881,7 +875,7 @@ var Header = function Header(_ref) {
881
875
  children: /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
882
876
  as: "h4",
883
877
  "data-testid": "timezone-text",
884
- variant: "h5",
878
+ variant: "h6",
885
879
  weight: "medium",
886
880
  children: timeZoneAndTime
887
881
  })
@@ -918,7 +912,6 @@ var Header = function Header(_ref) {
918
912
  "data-testid": "weekly-schedule-header",
919
913
  label: t("neetoMolecules.schedule.changeAvailability"),
920
914
  variant: "default",
921
- weight: "semibold",
922
915
  onClick: function onClick() {
923
916
  return setIsEditing(true);
924
917
  }
@@ -927,7 +920,7 @@ var Header = function Header(_ref) {
927
920
  });
928
921
  };
929
922
 
930
- var css = ".neeto-molecules-schedule{margin:auto;max-width:40rem;width:100%}.neeto-molecules-schedule__dropdown{max-height:var(--neeto-ui-dropdown-popup-max-height)!important}";
923
+ var css = ".neeto-molecules-schedule{margin:auto;max-width:40rem;width:100%}";
931
924
  injectCss.n(css,{});
932
925
 
933
926
  var Schedule = /*#__PURE__*/React.forwardRef(function (_ref, scheduleRef) {
@@ -976,7 +969,7 @@ var Schedule = /*#__PURE__*/React.forwardRef(function (_ref, scheduleRef) {
976
969
  hourFormat: hourFormat
977
970
  },
978
971
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
979
- className: "neeto-molecules-schedule flex-shrink-0 border-gray-200",
972
+ className: "neeto-molecules-schedule border-border flex-shrink-0",
980
973
  children: /*#__PURE__*/jsxRuntime.jsx(formik.Formik, {
981
974
  validationSchema: validationSchema,
982
975
  enableReinitialize: true,