@easypost/easy-ui 1.0.0-alpha.93 → 1.0.0-alpha.94

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @easypost/easy-ui
2
2
 
3
+ ## 1.0.0-alpha.94
4
+
5
+ ### Minor Changes
6
+
7
+ - 6166055: feat(Modal): add nesting support
8
+
3
9
  ## 1.0.0-alpha.93
4
10
 
5
11
  ### Minor Changes
@@ -12,4 +12,5 @@ export declare const Size: ModalStory;
12
12
  export declare const DefaultOpen: ModalTriggerStory;
13
13
  export declare const Controlled: ModalTriggerStory;
14
14
  export declare const MenuTrigger: ModalTriggerStory;
15
+ export declare const Nested: ModalTriggerStory;
15
16
  //# sourceMappingURL=Modal.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.stories.d.ts","sourceRoot":"","sources":["../../src/Modal/Modal.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAQlD,OAAO,EAAE,KAAK,EAAmC,MAAM,SAAS,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAI9C,KAAK,UAAU,GAAG,QAAQ,CAAC,OAAO,KAAK,CAAC,CAAC;AACzC,KAAK,iBAAiB,GAAG,QAAQ,CAAC,OAAO,YAAY,CAAC,CAAC;AAEvD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,KAAK,CAQ5B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,MAAM,EAAE,UAkBpB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,UA6CtB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,iBA6B5B,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,UAwBlB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,iBAwBzB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,iBAwBxB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,iBAyBzB,CAAC"}
1
+ {"version":3,"file":"Modal.stories.d.ts","sourceRoot":"","sources":["../../src/Modal/Modal.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAQlD,OAAO,EAAE,KAAK,EAAmC,MAAM,SAAS,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAI9C,KAAK,UAAU,GAAG,QAAQ,CAAC,OAAO,KAAK,CAAC,CAAC;AACzC,KAAK,iBAAiB,GAAG,QAAQ,CAAC,OAAO,YAAY,CAAC,CAAC;AAEvD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,KAAK,CAQ5B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,MAAM,EAAE,UAkBpB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,UA6CtB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,iBA6B5B,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,UAwBlB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,iBAwBzB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,iBAwBxB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,iBAyBzB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,iBA4FpB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ModalContainer.d.ts","sourceRoot":"","sources":["../../src/Modal/ModalContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAEZ,SAAS,EAKV,MAAM,OAAO,CAAC;AAMf,KAAK,mBAAmB,GAAG;IACzB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,qBAmDxD"}
1
+ {"version":3,"file":"ModalContainer.d.ts","sourceRoot":"","sources":["../../src/Modal/ModalContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAEZ,SAAS,EAIV,MAAM,OAAO,CAAC;AAMf,KAAK,mBAAmB,GAAG;IACzB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,qBA8CxD"}
package/Modal/index.js CHANGED
@@ -65,21 +65,21 @@ const useModalTrigger = () => {
65
65
  const modalTriggerContext = useModalTriggerContext();
66
66
  return modalTriggerContext.state;
67
67
  };
68
- const underlayBg = "_underlayBg_12m01_4";
69
- const underlayBox = "_underlayBox_12m01_27";
70
- const underlayEdge = "_underlayEdge_12m01_35";
71
- const Modal$1 = "_Modal_12m01_41";
72
- const header = "_header_12m01_59";
73
- const stuck = "_stuck_12m01_65";
74
- const body = "_body_12m01_69";
75
- const content = "_content_12m01_76";
76
- const footer = "_footer_12m01_93";
77
- const closeBtn = "_closeBtn_12m01_110";
78
- const iconAtEnd = "_iconAtEnd_12m01_124";
79
- const sizeSm = "_sizeSm_12m01_130";
80
- const sizeMd = "_sizeMd_12m01_134";
81
- const sizeLg = "_sizeLg_12m01_138";
82
- const sizeXl = "_sizeXl_12m01_142";
68
+ const underlayBg = "_underlayBg_1i8y3_4";
69
+ const underlayBox = "_underlayBox_1i8y3_30";
70
+ const underlayEdge = "_underlayEdge_1i8y3_38";
71
+ const Modal$1 = "_Modal_1i8y3_44";
72
+ const header = "_header_1i8y3_62";
73
+ const stuck = "_stuck_1i8y3_68";
74
+ const body = "_body_1i8y3_72";
75
+ const content = "_content_1i8y3_79";
76
+ const footer = "_footer_1i8y3_96";
77
+ const closeBtn = "_closeBtn_1i8y3_113";
78
+ const iconAtEnd = "_iconAtEnd_1i8y3_127";
79
+ const sizeSm = "_sizeSm_1i8y3_133";
80
+ const sizeMd = "_sizeMd_1i8y3_137";
81
+ const sizeLg = "_sizeLg_1i8y3_141";
82
+ const sizeXl = "_sizeXl_1i8y3_145";
83
83
  const styles = {
84
84
  underlayBg,
85
85
  underlayBox,
@@ -213,10 +213,6 @@ function ModalTrigger(props) {
213
213
  function ModalContainer(props) {
214
214
  const { children, isDismissable = true, onDismiss = () => {
215
215
  } } = props;
216
- const existingModalTriggerContext = React.useContext(ModalTriggerContext);
217
- if (existingModalTriggerContext) {
218
- throw new Error("Modal.Container must be used outside of a Modal.Trigger");
219
- }
220
216
  const childArray = React.Children.toArray(children);
221
217
  if (childArray.length > 1) {
222
218
  throw new Error("Only a single child can be passed to ModalContainer.");
package/Modal/index.mjs CHANGED
@@ -63,21 +63,21 @@ const useModalTrigger = () => {
63
63
  const modalTriggerContext = useModalTriggerContext();
64
64
  return modalTriggerContext.state;
65
65
  };
66
- const underlayBg = "_underlayBg_12m01_4";
67
- const underlayBox = "_underlayBox_12m01_27";
68
- const underlayEdge = "_underlayEdge_12m01_35";
69
- const Modal$1 = "_Modal_12m01_41";
70
- const header = "_header_12m01_59";
71
- const stuck = "_stuck_12m01_65";
72
- const body = "_body_12m01_69";
73
- const content = "_content_12m01_76";
74
- const footer = "_footer_12m01_93";
75
- const closeBtn = "_closeBtn_12m01_110";
76
- const iconAtEnd = "_iconAtEnd_12m01_124";
77
- const sizeSm = "_sizeSm_12m01_130";
78
- const sizeMd = "_sizeMd_12m01_134";
79
- const sizeLg = "_sizeLg_12m01_138";
80
- const sizeXl = "_sizeXl_12m01_142";
66
+ const underlayBg = "_underlayBg_1i8y3_4";
67
+ const underlayBox = "_underlayBox_1i8y3_30";
68
+ const underlayEdge = "_underlayEdge_1i8y3_38";
69
+ const Modal$1 = "_Modal_1i8y3_44";
70
+ const header = "_header_1i8y3_62";
71
+ const stuck = "_stuck_1i8y3_68";
72
+ const body = "_body_1i8y3_72";
73
+ const content = "_content_1i8y3_79";
74
+ const footer = "_footer_1i8y3_96";
75
+ const closeBtn = "_closeBtn_1i8y3_113";
76
+ const iconAtEnd = "_iconAtEnd_1i8y3_127";
77
+ const sizeSm = "_sizeSm_1i8y3_133";
78
+ const sizeMd = "_sizeMd_1i8y3_137";
79
+ const sizeLg = "_sizeLg_1i8y3_141";
80
+ const sizeXl = "_sizeXl_1i8y3_145";
81
81
  const styles = {
82
82
  underlayBg,
83
83
  underlayBox,
@@ -211,10 +211,6 @@ function ModalTrigger(props) {
211
211
  function ModalContainer(props) {
212
212
  const { children, isDismissable = true, onDismiss = () => {
213
213
  } } = props;
214
- const existingModalTriggerContext = useContext(ModalTriggerContext);
215
- if (existingModalTriggerContext) {
216
- throw new Error("Modal.Container must be used outside of a Modal.Trigger");
217
- }
218
214
  const childArray = React__default.Children.toArray(children);
219
215
  if (childArray.length > 1) {
220
216
  throw new Error("Only a single child can be passed to ModalContainer.");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easypost/easy-ui",
3
- "version": "1.0.0-alpha.93",
3
+ "version": "1.0.0-alpha.94",
4
4
  "sideEffects": [
5
5
  "**/*.css"
6
6
  ],
package/style.css CHANGED
@@ -4961,7 +4961,7 @@ textarea {
4961
4961
  }/**
4962
4962
  * Do not edit directly, this file was auto-generated.
4963
4963
  */
4964
- ._underlayBg_12m01_4 {
4964
+ ._underlayBg_1i8y3_4 {
4965
4965
  --ezui-c-modal-underlay-edge-max-height: 72px;
4966
4966
  --ezui-c-modal-underlay-edge-min-height: 2.5vh;
4967
4967
  position: fixed;
@@ -4969,22 +4969,25 @@ textarea {
4969
4969
  display: flex;
4970
4970
  flex-direction: column;
4971
4971
  }
4972
- ._underlayBg_12m01_4::before {
4972
+ ._underlayBg_1i8y3_4::before {
4973
4973
  content: "";
4974
4974
  position: absolute;
4975
4975
  background: var(--ezui-color-primary-800);
4976
4976
  opacity: var(--ezui-opacity-underlay);
4977
4977
  }
4978
+ ._underlayBg_1i8y3_4[aria-hidden=true] {
4979
+ display: none;
4980
+ }
4978
4981
 
4979
- ._underlayBg_12m01_4,
4980
- ._underlayBg_12m01_4::before {
4982
+ ._underlayBg_1i8y3_4,
4983
+ ._underlayBg_1i8y3_4::before {
4981
4984
  top: 0;
4982
4985
  left: 0;
4983
4986
  right: 0;
4984
4987
  bottom: 0;
4985
4988
  }
4986
4989
 
4987
- ._underlayBox_12m01_27 {
4990
+ ._underlayBox_1i8y3_30 {
4988
4991
  position: relative;
4989
4992
  display: flex;
4990
4993
  flex-direction: column;
@@ -4992,13 +4995,13 @@ textarea {
4992
4995
  pointer-events: none;
4993
4996
  }
4994
4997
 
4995
- ._underlayEdge_12m01_35 {
4998
+ ._underlayEdge_1i8y3_38 {
4996
4999
  flex: 0 9 auto;
4997
5000
  height: var(--ezui-c-modal-underlay-edge-max-height);
4998
5001
  min-height: var(--ezui-c-modal-underlay-edge-min-height);
4999
5002
  }
5000
5003
 
5001
- ._Modal_12m01_41 {
5004
+ ._Modal_1i8y3_44 {
5002
5005
  --ezui-c-modal-max-height: 762px;
5003
5006
  --ezui-c-modal-width: 95vw;
5004
5007
  flex: 0 1 auto;
@@ -5016,41 +5019,41 @@ textarea {
5016
5019
  outline: none;
5017
5020
  }
5018
5021
 
5019
- ._header_12m01_59 {
5022
+ ._header_1i8y3_62 {
5020
5023
  margin: 0;
5021
5024
  padding: var(--ezui-space-5);
5022
5025
  padding-bottom: var(--ezui-space-2);
5023
5026
  color: var(--ezui-color-primary-800);
5024
5027
  }
5025
- ._header_12m01_59._stuck_12m01_65 {
5028
+ ._header_1i8y3_62._stuck_1i8y3_68 {
5026
5029
  box-shadow: var(--ezui-shadow-stuck-from-top);
5027
5030
  }
5028
5031
 
5029
- ._body_12m01_69 {
5032
+ ._body_1i8y3_72 {
5030
5033
  overflow: auto;
5031
5034
  display: flex;
5032
5035
  flex-direction: column;
5033
5036
  overscroll-behavior: contain;
5034
5037
  }
5035
5038
 
5036
- ._content_12m01_76 {
5039
+ ._content_1i8y3_79 {
5037
5040
  padding: 0 var(--ezui-space-5);
5038
5041
  position: relative;
5039
5042
  }
5040
- ._content_12m01_76 [data-intercept] {
5043
+ ._content_1i8y3_79 [data-intercept] {
5041
5044
  position: absolute;
5042
5045
  left: 0;
5043
5046
  width: 1px;
5044
5047
  height: 1px;
5045
5048
  }
5046
- ._content_12m01_76 [data-intercept="header"] {
5049
+ ._content_1i8y3_79 [data-intercept="header"] {
5047
5050
  top: 0;
5048
5051
  }
5049
- ._content_12m01_76 [data-intercept="footer"] {
5052
+ ._content_1i8y3_79 [data-intercept="footer"] {
5050
5053
  bottom: 0;
5051
5054
  }
5052
5055
 
5053
- ._footer_12m01_93 {
5056
+ ._footer_1i8y3_96 {
5054
5057
  display: flex;
5055
5058
  flex-direction: column;
5056
5059
  justify-content: flex-end;
@@ -5059,15 +5062,15 @@ textarea {
5059
5062
  padding-top: var(--ezui-space-3);
5060
5063
  }
5061
5064
  @media (min-width: 30em) {
5062
- ._footer_12m01_93 {
5065
+ ._footer_1i8y3_96 {
5063
5066
  flex-direction: row;
5064
5067
  }
5065
5068
  }
5066
- ._footer_12m01_93._stuck_12m01_65 {
5069
+ ._footer_1i8y3_96._stuck_1i8y3_68 {
5067
5070
  box-shadow: var(--ezui-shadow-stuck-from-bottom);
5068
5071
  }
5069
5072
 
5070
- ._closeBtn_12m01_110 {
5073
+ ._closeBtn_1i8y3_113 {
5071
5074
  appearance: none;
5072
5075
  margin: 0;
5073
5076
  padding: 0;
@@ -5081,25 +5084,25 @@ textarea {
5081
5084
  cursor: pointer;
5082
5085
  }
5083
5086
 
5084
- ._iconAtEnd_12m01_124[data-size="2xl"] {
5087
+ ._iconAtEnd_1i8y3_127[data-size="2xl"] {
5085
5088
  display: inline-flex;
5086
5089
  margin-top: -5px;
5087
5090
  margin-bottom: -5px;
5088
5091
  }
5089
5092
 
5090
- ._sizeSm_12m01_130 {
5093
+ ._sizeSm_1i8y3_133 {
5091
5094
  --ezui-c-modal-max-width: 528px;
5092
5095
  }
5093
5096
 
5094
- ._sizeMd_12m01_134 {
5097
+ ._sizeMd_1i8y3_137 {
5095
5098
  --ezui-c-modal-max-width: 672px;
5096
5099
  }
5097
5100
 
5098
- ._sizeLg_12m01_138 {
5101
+ ._sizeLg_1i8y3_141 {
5099
5102
  --ezui-c-modal-max-width: 788px;
5100
5103
  }
5101
5104
 
5102
- ._sizeXl_12m01_142 {
5105
+ ._sizeXl_1i8y3_145 {
5103
5106
  --ezui-c-modal-max-width: 1000px;
5104
5107
  }/**
5105
5108
  * Do not edit directly, this file was auto-generated.