@bigbinary/neeto-molecules 5.2.29 → 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.
@@ -18,16 +18,16 @@ import '@babel/runtime/helpers/defineProperty';
18
18
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
19
19
  import { Select, Switch } from '@bigbinary/neeto-atoms/formik';
20
20
  import classnames from 'classnames';
21
- import Copy from '@bigbinary/neeto-icons/Copy';
22
21
  import _typeof from '@babel/runtime/helpers/typeof';
23
- import Plus from '@bigbinary/neeto-icons/Plus';
24
- import Delete from '@bigbinary/neeto-icons/Delete';
22
+ import { T as Trash2 } from '../trash-2-hGkzsa87.js';
23
+ import { P as Plus } from '../plus-Bnd2C3yl.js';
24
+ import { C as Copy } from '../copy-Dj71cP65.js';
25
25
  import Profile from '@bigbinary/neeto-team-members-frontend/v2/Profile';
26
26
  import MoreDropdown from './MoreDropdown.js';
27
27
  import { n } from '../inject-css-C2dztUxs.js';
28
+ import '../createLucideIcon--oLqczpc.js';
28
29
  import '@babel/runtime/helpers/objectWithoutProperties';
29
30
  import '@bigbinary/neeto-commons-frontend/v2/react-utils';
30
- import '../createLucideIcon--oLqczpc.js';
31
31
  import '../ellipsis-BSu1ZIFZ.js';
32
32
 
33
33
  var DAYS = ["sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"];
@@ -350,13 +350,12 @@ var DisplayAvailability = function DisplayAvailability(_ref) {
350
350
  children: sortDays(firstDay).map(function (day) {
351
351
  var _sortPeriodsByKey;
352
352
  return /*#__PURE__*/jsxs("div", {
353
- 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",
353
+ 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",
354
354
  "data-testid": "day-cards-".concat(day),
355
355
  children: [/*#__PURE__*/jsx(Typography, {
356
356
  className: "mt-0.5 w-24 text-center sm:w-1/4 sm:text-start",
357
357
  "data-testid": joinHyphenCase(day, "day-text"),
358
- variant: "h5",
359
- weight: "semibold",
358
+ variant: "h6",
360
359
  children: t("neetoMolecules.schedule.days.".concat(day))
361
360
  }), /*#__PURE__*/jsx("div", {
362
361
  className: "flex flex-grow flex-col items-center gap-y-4 sm:w-1/2",
@@ -369,18 +368,16 @@ var DisplayAvailability = function DisplayAvailability(_ref) {
369
368
  className: "flex items-center gap-x-4",
370
369
  children: [/*#__PURE__*/jsx(Typography, {
371
370
  className: "w-20 text-end",
372
- variant: "h5",
373
- weight: "semibold",
371
+ variant: "h6",
374
372
  "data-testid": joinHyphenCase(day, period.startTime, "start-time-text"),
375
373
  children: formatHour(period.startTime)
376
374
  }), /*#__PURE__*/jsx(Typography, {
377
375
  as: "span",
378
- className: "text-gray-600",
376
+ color: "muted",
379
377
  children: "-"
380
378
  }), /*#__PURE__*/jsx(Typography, {
381
379
  className: "w-20 text-start",
382
- variant: "h5",
383
- weight: "semibold",
380
+ variant: "h6",
384
381
  "data-testid": joinHyphenCase(day, period.endTime, "start-time-text"),
385
382
  children: formatHour(period.endTime)
386
383
  })]
@@ -388,7 +385,7 @@ var DisplayAvailability = function DisplayAvailability(_ref) {
388
385
  }) : /*#__PURE__*/jsx(Typography, {
389
386
  className: "mx-8 flex-grow text-center",
390
387
  "data-testid": joinHyphenCase(day, "unavailable-time-text"),
391
- variant: "h5",
388
+ variant: "h6",
392
389
  children: t("neetoMolecules.schedule.unavailable")
393
390
  })
394
391
  })]
@@ -572,7 +569,7 @@ var ScheduleRow = function ScheduleRow(_ref) {
572
569
  isClearable: true,
573
570
  isCreatable: true,
574
571
  isSearchable: true,
575
- className: "w-full",
572
+ className: "w-full min-w-0",
576
573
  filterOption: filterSlots,
577
574
  isValidNewOption: isValidTimeSlotOption,
578
575
  name: "wdays.".concat(day, ".periods[").concat(index, "].startTime"),
@@ -587,7 +584,7 @@ var ScheduleRow = function ScheduleRow(_ref) {
587
584
  isClearable: true,
588
585
  isCreatable: true,
589
586
  isSearchable: true,
590
- className: "w-full",
587
+ className: "w-full min-w-0",
591
588
  filterOption: filterSlots,
592
589
  isValidNewOption: isValidTimeSlotOption,
593
590
  name: "wdays.".concat(day, ".periods[").concat(index, "].endTime"),
@@ -600,7 +597,7 @@ var ScheduleRow = function ScheduleRow(_ref) {
600
597
  }), /*#__PURE__*/jsx(Button, {
601
598
  className: "flex-shrink-0 self-start",
602
599
  "data-testid": "delete-period-button",
603
- icon: Delete,
600
+ icon: Trash2,
604
601
  variant: "ghost",
605
602
  onClick: function onClick() {
606
603
  return handleDeleteRow(arrayHelpers, index);
@@ -610,7 +607,7 @@ var ScheduleRow = function ScheduleRow(_ref) {
610
607
  name: "wdays.".concat(day, ".periods[").concat(index, "]"),
611
608
  children: function children(message) {
612
609
  return _typeof(message) !== "object" && /*#__PURE__*/jsx("span", {
613
- className: "text-error-500 mt-1 w-11/12 px-2 text-xs",
610
+ className: "text-error-foreground mt-1 w-11/12 px-2 text-xs",
614
611
  children: message
615
612
  });
616
613
  }
@@ -691,7 +688,7 @@ var Form = function Form(_ref) {
691
688
  return setWdaysToCopy(checked ? append(day) : without([day]));
692
689
  };
693
690
  return /*#__PURE__*/jsx("div", {
694
- className: "@container relative mb-3 w-full rounded-md border border-gray-300 bg-white px-4 last:mb-0 md:px-6",
691
+ className: "border-border bg-card @container relative mb-3 w-full rounded-md border px-4 last:mb-0 md:px-6",
695
692
  children: /*#__PURE__*/jsxs("div", {
696
693
  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
697
694
  ,
@@ -707,49 +704,45 @@ var Form = function Form(_ref) {
707
704
  "data-testid": joinHyphenCase(day, "weekly-hours-checkbox"),
708
705
  id: "day",
709
706
  name: "wdays.".concat(day, ".available"),
707
+ size: "lg",
710
708
  onCheckedChange: handleCheckbox
711
709
  }), /*#__PURE__*/jsx(Typography, {
712
710
  as: "span",
711
+ className: "ms-2 capitalize",
712
+ color: values.wdays[day].available ? "default" : "muted",
713
713
  "data-testid": joinHyphenCase(day, "day-text"),
714
714
  variant: "body2",
715
715
  weight: values.wdays[day].available ? "semibold" : "normal",
716
- className: classnames("ms-2 capitalize", {
717
- "text-gray-600": !values.wdays[day].available
718
- }),
719
716
  children: t("neetoMolecules.schedule.days.".concat(day))
720
717
  })]
721
718
  }), /*#__PURE__*/jsx(ScheduleRow$1, {
722
719
  day: day
723
720
  }), values.wdays[day].available && /*#__PURE__*/jsxs(DropdownMenu, {
724
721
  closeOnSelect: true,
725
- icon: Copy,
722
+ dropdownProps: {
723
+ className: "w-max"
724
+ },
726
725
  position: "right-start",
727
- buttonProps: {
726
+ customTarget: /*#__PURE__*/jsx(Button, {
727
+ className: "absolute end-4 top-3 flex-shrink-0 @xl:static",
728
+ "data-testid": joinHyphenCase(day, "copy-schedule-icon"),
729
+ icon: Copy,
728
730
  variant: "secondary",
729
731
  tooltipProps: {
730
732
  content: t("neetoMolecules.schedule.copyScheduleTooltip"),
731
- position: "top",
732
- hideAfter: 5000,
733
- touch: ["hold", 500]
734
- },
735
- className: "absolute end-4 top-3 @xl:static flex-shrink-0",
736
- "data-testid": joinHyphenCase(day, "copy-schedule-icon")
737
- },
738
- dropdownProps: {
739
- className: "dropdown__popup neeto-molecules-schedule__dropdown"
740
- },
733
+ position: "top"
734
+ }
735
+ }),
741
736
  onClose: function onClose() {
742
737
  return setWdaysToCopy([]);
743
738
  },
744
- children: [/*#__PURE__*/jsx("li", {
745
- children: /*#__PURE__*/jsx(Typography, {
746
- variant: "h5",
747
- children: t("neetoMolecules.schedule.copySchedule")
748
- })
739
+ children: [/*#__PURE__*/jsx(DropdownMenu.Label, {
740
+ children: t("neetoMolecules.schedule.copySchedule")
749
741
  }), sortDays(firstDay).filter(function (copyDay) {
750
742
  return copyDay !== day;
751
743
  }).map(function (day) {
752
- return /*#__PURE__*/jsx("li", {
744
+ return /*#__PURE__*/jsx("div", {
745
+ className: "px-1.5 py-1",
753
746
  onClick: function onClick(e) {
754
747
  return e.stopPropagation();
755
748
  },
@@ -765,7 +758,8 @@ var Form = function Form(_ref) {
765
758
  })
766
759
  })
767
760
  }, day);
768
- }), /*#__PURE__*/jsx("li", {
761
+ }), /*#__PURE__*/jsx("div", {
762
+ className: "px-1.5 py-1",
769
763
  children: /*#__PURE__*/jsx(Button, {
770
764
  "data-testid": "copy-schedule-submit-button",
771
765
  disabled: isNotPresent(wdaysToCopy),
@@ -858,7 +852,7 @@ var Header = function Header(_ref) {
858
852
  children: /*#__PURE__*/jsx(Typography, {
859
853
  as: "h4",
860
854
  "data-testid": "timezone-text",
861
- variant: "h5",
855
+ variant: "h6",
862
856
  weight: "medium",
863
857
  children: timeZoneAndTime
864
858
  })
@@ -895,7 +889,6 @@ var Header = function Header(_ref) {
895
889
  "data-testid": "weekly-schedule-header",
896
890
  label: t("neetoMolecules.schedule.changeAvailability"),
897
891
  variant: "default",
898
- weight: "semibold",
899
892
  onClick: function onClick() {
900
893
  return setIsEditing(true);
901
894
  }
@@ -904,7 +897,7 @@ var Header = function Header(_ref) {
904
897
  });
905
898
  };
906
899
 
907
- 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}";
900
+ var css = ".neeto-molecules-schedule{margin:auto;max-width:40rem;width:100%}";
908
901
  n(css,{});
909
902
 
910
903
  var Schedule = /*#__PURE__*/forwardRef(function (_ref, scheduleRef) {
@@ -953,7 +946,7 @@ var Schedule = /*#__PURE__*/forwardRef(function (_ref, scheduleRef) {
953
946
  hourFormat: hourFormat
954
947
  },
955
948
  children: /*#__PURE__*/jsx("div", {
956
- className: "neeto-molecules-schedule flex-shrink-0 border-gray-200",
949
+ className: "neeto-molecules-schedule border-border flex-shrink-0",
957
950
  children: /*#__PURE__*/jsx(Formik, {
958
951
  validationSchema: validationSchema,
959
952
  enableReinitialize: true,