@jobber/components 6.115.3 → 6.116.1

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.
@@ -28,18 +28,19 @@ require('../keysIn-cjs.js');
28
28
  require('../_isIterateeCall-cjs.js');
29
29
  require('../_setToString-cjs.js');
30
30
 
31
- var styles$1 = {"container":"y3M-9xoEnk0-","overlay":"zkyJp1mib-U-","modal":"gMPgiggaud8-","header":"_5sBzUnyOqD0-","closeButton":"_4gw63G7IYG0-","actionBar":"cwVJrrJkNDg-","leftAction":"MkD4pNUKeAA-","rightAction":"C-yC8JKpQLg-","spinning":"_7hYqr6OrfHs-"};
31
+ var styles$1 = {"container":"y3M-9xoEnk0-","containerFullScreen":"IsN-kBe8icY-","overlay":"zkyJp1mib-U-","modal":"gMPgiggaud8-","header":"_5sBzUnyOqD0-","closeButton":"_4gw63G7IYG0-","actionBar":"cwVJrrJkNDg-","leftAction":"MkD4pNUKeAA-","rightAction":"C-yC8JKpQLg-","spinning":"_7hYqr6OrfHs-"};
32
32
 
33
- var sizes = {"small":"BSZvIAUzFEU-","large":"-ydIALYVvGg-","spinning":"_10FfgKITqY0-"};
33
+ var sizes = {"small":"BSZvIAUzFEU-","large":"-ydIALYVvGg-","fullScreen":"_9wD-TaKfDys-","spinning":"_10FfgKITqY0-"};
34
34
 
35
35
  const MODAL_HEADER_ID = "ATL-Modal-Header";
36
36
 
37
37
  function ModalLegacy({ open = false, title, size, dismissible = true, children, primaryAction, secondaryAction, tertiaryAction, onRequestClose, ariaLabel, }) {
38
38
  const modalClassName = classnames(styles$1.modal, size && sizes[size]);
39
+ const containerClassName = classnames(styles$1.container, size === "fullScreen" && styles$1.containerFullScreen);
39
40
  jobberHooks.useRefocusOnActivator(open);
40
41
  const modalRef = jobberHooks.useFocusTrap(open);
41
42
  jobberHooks.useOnKeyDown(handleRequestClose, "Escape");
42
- const template = (React.createElement(framerMotion.AnimatePresence, null, open && (React.createElement("div", { ref: modalRef, role: "dialog", className: styles$1.container, tabIndex: 0, "aria-modal": "true", "aria-labelledby": title ? MODAL_HEADER_ID : undefined, "aria-label": ariaLabel },
43
+ const template = (React.createElement(framerMotion.AnimatePresence, null, open && (React.createElement("div", { ref: modalRef, role: "dialog", className: containerClassName, tabIndex: 0, "aria-modal": "true", "aria-labelledby": title ? MODAL_HEADER_ID : undefined, "aria-label": ariaLabel },
43
44
  React.createElement(framerMotion.motion.div, { key: styles$1.overlay, className: styles$1.overlay, onClick: onRequestClose, initial: { opacity: 0 }, animate: { opacity: 0.8 }, exit: { opacity: 0 }, transition: { duration: 0.2 } }),
44
45
  React.createElement(framerMotion.motion.div, { key: styles$1.modal, className: modalClassName, initial: { scale: 0.9, opacity: 0 }, animate: { scale: 1, opacity: 1 }, exit: { scale: 0.9, opacity: 0 }, transition: {
45
46
  duration: 0.2,
@@ -26,18 +26,19 @@ import '../keysIn-es.js';
26
26
  import '../_isIterateeCall-es.js';
27
27
  import '../_setToString-es.js';
28
28
 
29
- var styles$1 = {"container":"y3M-9xoEnk0-","overlay":"zkyJp1mib-U-","modal":"gMPgiggaud8-","header":"_5sBzUnyOqD0-","closeButton":"_4gw63G7IYG0-","actionBar":"cwVJrrJkNDg-","leftAction":"MkD4pNUKeAA-","rightAction":"C-yC8JKpQLg-","spinning":"_7hYqr6OrfHs-"};
29
+ var styles$1 = {"container":"y3M-9xoEnk0-","containerFullScreen":"IsN-kBe8icY-","overlay":"zkyJp1mib-U-","modal":"gMPgiggaud8-","header":"_5sBzUnyOqD0-","closeButton":"_4gw63G7IYG0-","actionBar":"cwVJrrJkNDg-","leftAction":"MkD4pNUKeAA-","rightAction":"C-yC8JKpQLg-","spinning":"_7hYqr6OrfHs-"};
30
30
 
31
- var sizes = {"small":"BSZvIAUzFEU-","large":"-ydIALYVvGg-","spinning":"_10FfgKITqY0-"};
31
+ var sizes = {"small":"BSZvIAUzFEU-","large":"-ydIALYVvGg-","fullScreen":"_9wD-TaKfDys-","spinning":"_10FfgKITqY0-"};
32
32
 
33
33
  const MODAL_HEADER_ID = "ATL-Modal-Header";
34
34
 
35
35
  function ModalLegacy({ open = false, title, size, dismissible = true, children, primaryAction, secondaryAction, tertiaryAction, onRequestClose, ariaLabel, }) {
36
36
  const modalClassName = classnames(styles$1.modal, size && sizes[size]);
37
+ const containerClassName = classnames(styles$1.container, size === "fullScreen" && styles$1.containerFullScreen);
37
38
  useRefocusOnActivator(open);
38
39
  const modalRef = useFocusTrap(open);
39
40
  useOnKeyDown(handleRequestClose, "Escape");
40
- const template = (React__default.createElement(AnimatePresence, null, open && (React__default.createElement("div", { ref: modalRef, role: "dialog", className: styles$1.container, tabIndex: 0, "aria-modal": "true", "aria-labelledby": title ? MODAL_HEADER_ID : undefined, "aria-label": ariaLabel },
41
+ const template = (React__default.createElement(AnimatePresence, null, open && (React__default.createElement("div", { ref: modalRef, role: "dialog", className: containerClassName, tabIndex: 0, "aria-modal": "true", "aria-labelledby": title ? MODAL_HEADER_ID : undefined, "aria-label": ariaLabel },
41
42
  React__default.createElement(motion.div, { key: styles$1.overlay, className: styles$1.overlay, onClick: onRequestClose, initial: { opacity: 0 }, animate: { opacity: 0.8 }, exit: { opacity: 0 }, transition: { duration: 0.2 } }),
42
43
  React__default.createElement(motion.div, { key: styles$1.modal, className: modalClassName, initial: { scale: 0.9, opacity: 0 }, animate: { scale: 1, opacity: 1 }, exit: { scale: 0.9, opacity: 0 }, transition: {
43
44
  duration: 0.2,
package/dist/styles.css CHANGED
@@ -4735,6 +4735,9 @@ a._7BLGtYNuJOU-.zgRx3ehZ2z8-:hover {
4735
4735
 
4736
4736
  :root {
4737
4737
  --modal--width: 600px;
4738
+ --modal--max-height: calc(100dvh - 2 * var(--space-base));
4739
+ --modal--margin: auto;
4740
+ --modal--border-radius: var(--radius-base);
4738
4741
  --modal--padding-horizontal: var(--space-base);
4739
4742
  --modal--padding-vertical: var(--space-base);
4740
4743
  --modal--padding: var(--modal--padding-vertical)
@@ -4766,15 +4769,20 @@ a._7BLGtYNuJOU-.zgRx3ehZ2z8-:hover {
4766
4769
  .y3M-9xoEnk0- {
4767
4770
  display: -ms-flexbox;
4768
4771
  display: flex;
4769
- -ms-flex-direction: column;
4770
- flex-direction: column;
4771
4772
  z-index: 1001;
4772
4773
  z-index: var(--elevation-modal);
4774
+ box-sizing: border-box;
4775
+ -ms-flex-direction: column;
4776
+ flex-direction: column;
4773
4777
  padding: 8px;
4774
4778
  padding: var(--space-small);
4775
4779
  overflow: auto;
4776
4780
  }
4777
4781
 
4782
+ .IsN-kBe8icY- {
4783
+ padding: 0;
4784
+ }
4785
+
4778
4786
  .y3M-9xoEnk0-,
4779
4787
  .zkyJp1mib-U- {
4780
4788
  position: fixed;
@@ -4796,11 +4804,13 @@ a._7BLGtYNuJOU-.zgRx3ehZ2z8-:hover {
4796
4804
  max-width: var(--modal--width);
4797
4805
  box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.1), 0px 4px 12px 0px rgba(0, 0, 0, 0.05);
4798
4806
  box-shadow: var(--modal--shadow);
4807
+ box-sizing: border-box;
4799
4808
  margin: auto;
4809
+ margin: var(--modal--margin);
4800
4810
  border: 1px solid hsl(200, 13%, 87%);
4801
4811
  border: var(--border-base) solid var(--color-border);
4802
4812
  border-radius: 8px;
4803
- border-radius: var(--radius-base);
4813
+ border-radius: var(--modal--border-radius);
4804
4814
  background-color: rgba(255, 255, 255, 1);
4805
4815
  background-color: var(--color-surface);
4806
4816
  -ms-flex: 0 0 auto;
@@ -4911,8 +4921,20 @@ a._7BLGtYNuJOU-.zgRx3ehZ2z8-:hover {
4911
4921
  max-width: 940px;
4912
4922
  }
4913
4923
 
4924
+ ._9wD-TaKfDys- {
4925
+ --modal--width: 100dvw;
4926
+ --modal--max-height: 100dvh;
4927
+ --modal--margin: 0;
4928
+ --modal--border-radius: 0;
4929
+ height: 100dvh;
4930
+ max-width: 100dvw;
4931
+ }
4932
+
4914
4933
  :root {
4915
4934
  --modal--width: 600px;
4935
+ --modal--max-height: calc(100dvh - 2 * var(--space-base));
4936
+ --modal--margin: auto;
4937
+ --modal--border-radius: var(--radius-base);
4916
4938
  --modal--padding-horizontal: var(--space-base);
4917
4939
  --modal--padding-vertical: var(--space-base);
4918
4940
  --modal--padding: var(--modal--padding-vertical)
@@ -4971,14 +4993,16 @@ a._7BLGtYNuJOU-.zgRx3ehZ2z8-:hover {
4971
4993
  max-width: 600px;
4972
4994
  max-width: var(--modal--width);
4973
4995
  max-height: calc(100dvh - 2 * 16px);
4974
- max-height: calc(100dvh - 2 * var(--space-base));
4996
+ max-height: var(--modal--max-height);
4975
4997
  box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.1), 0px 4px 12px 0px rgba(0, 0, 0, 0.05);
4976
4998
  box-shadow: var(--modal--shadow);
4999
+ box-sizing: border-box;
4977
5000
  margin: auto;
5001
+ margin: var(--modal--margin);
4978
5002
  border: 1px solid hsl(200, 13%, 87%);
4979
5003
  border: var(--border-base) solid var(--color-border);
4980
5004
  border-radius: 8px;
4981
- border-radius: var(--radius-base);
5005
+ border-radius: var(--modal--border-radius);
4982
5006
  outline: none;
4983
5007
  overflow: hidden;
4984
5008
  background-color: rgba(255, 255, 255, 1);
@@ -4994,6 +5018,7 @@ a._7BLGtYNuJOU-.zgRx3ehZ2z8-:hover {
4994
5018
 
4995
5019
  .zM9SWwAd5Dg- {
4996
5020
  max-height: inherit;
5021
+ box-sizing: border-box;
4997
5022
  padding: 8px;
4998
5023
  padding: var(--space-small);
4999
5024
  overflow-y: auto;
@@ -10525,14 +10550,26 @@ input.oOrjwubmsVA- {
10525
10550
  background-color: var(--color-interactive--background--subtle--hover);
10526
10551
  }
10527
10552
 
10553
+ /* Extends beyond the container's padding box by --border-base so the green
10554
+ border overlays the grey container border. margin-left applies the horizontal
10555
+ offset uniformly to all left positions. */
10556
+
10528
10557
  .FDDKTZkTdfM- span {
10529
10558
  position: absolute;
10559
+ top: calc(-1 * 1px);
10560
+ top: calc(-1 * var(--border-base));
10530
10561
  left: 0;
10531
- width: calc(100% / var(--segmentedControl--option-count));
10532
- height: 100%;
10562
+ width: calc(
10563
+ 100% / var(--segmentedControl--option-count) + 2 * 1px
10564
+ );
10565
+ width: calc(
10566
+ 100% / var(--segmentedControl--option-count) + 2 * var(--border-base)
10567
+ );
10568
+ height: calc(100% + 2 * 1px);
10569
+ height: calc(100% + 2 * var(--border-base));
10533
10570
  box-sizing: border-box;
10534
- border: 1px solid hsl(107, 58%, 33%);
10535
- border: var(--border-base) solid var(--color-interactive);
10571
+ margin-left: calc(-1 * 1px);
10572
+ margin-left: calc(-1 * var(--border-base));
10536
10573
  border-radius: 8px;
10537
10574
  border-radius: var(--radius-base);
10538
10575
  background-color: rgba(255, 255, 255, 1);
@@ -10541,22 +10578,20 @@ input.oOrjwubmsVA- {
10541
10578
  transition: var(--timing-slow) left ease-out;
10542
10579
  }
10543
10580
 
10544
- /* Focus ring at z-index: 2 so hover backgrounds (z-index: 1) can't cover it.
10545
- Negative inset aligns with the span's outer edge so the green border stays
10546
- visible inside the focus ring. */
10581
+ /* Green border and focus ring live on ::after at z-index: 2 so hover
10582
+ backgrounds on adjacent labels (z-index: 1) can't cover them. */
10547
10583
 
10548
10584
  .FDDKTZkTdfM- span::after {
10549
10585
  content: "";
10550
10586
  position: absolute;
10551
- top: calc(-1 * 1px);
10552
- right: calc(-1 * 1px);
10553
- bottom: calc(-1 * 1px);
10554
- left: calc(-1 * 1px);
10555
- top: calc(-1 * var(--border-base));
10556
- right: calc(-1 * var(--border-base));
10557
- bottom: calc(-1 * var(--border-base));
10558
- left: calc(-1 * var(--border-base));
10587
+ top: 0;
10588
+ right: 0;
10589
+ bottom: 0;
10590
+ left: 0;
10559
10591
  z-index: 2;
10592
+ box-sizing: border-box;
10593
+ border: 1px solid hsl(107, 58%, 33%);
10594
+ border: var(--border-base) solid var(--color-interactive);
10560
10595
  border-radius: inherit;
10561
10596
  pointer-events: none;
10562
10597
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components",
3
- "version": "6.115.3",
3
+ "version": "6.116.1",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -538,5 +538,5 @@
538
538
  "> 1%",
539
539
  "IE 10"
540
540
  ],
541
- "gitHead": "a707925b53e459e55d217809955eced664dfa70c"
541
+ "gitHead": "4b569551a7938c439c4543a4520b65d2aea9fc33"
542
542
  }