@plaidev/karte-action-sdk 1.0.24 → 1.0.25

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.
@@ -140,6 +140,31 @@ declare const ModalPositionTranslations: {
140
140
  en: string;
141
141
  };
142
142
  };
143
+ type ModalMarginSides = "left" | "right" | "top" | "bottom";
144
+ type ModalMargin<T extends ModalMarginSides = ModalMarginSides> = {
145
+ side: T;
146
+ length: string;
147
+ };
148
+ type ModalMarginX = ModalMargin<"left" | "right">;
149
+ type ModalMarginY = ModalMargin<"top" | "bottom">;
150
+ declare const ModalMarginTranslations: {
151
+ left: {
152
+ ja: string;
153
+ en: string;
154
+ };
155
+ right: {
156
+ ja: string;
157
+ en: string;
158
+ };
159
+ top: {
160
+ ja: string;
161
+ en: string;
162
+ };
163
+ bottom: {
164
+ ja: string;
165
+ en: string;
166
+ };
167
+ };
143
168
  type LongText = string;
144
169
  type Url = string;
145
170
  type Image = string;
@@ -187,13 +212,14 @@ declare const handleKeydown: (handlers: {
187
212
  [eventName: string]: (e: any) => void;
188
213
  }) => (e: any) => void;
189
214
  declare const getPositionStyle: (position: ModalPosition) => string;
215
+ declare const getMarginStyle: (modalMargins: ModalMargin[]) => string;
190
216
  declare function onScroll(fn: Function, rate: number): () => void;
191
217
  declare function onTime(fn: Function, time: number): () => void;
192
218
  declare function hasSuffix<Suffix extends "px" | "em" | "rem" | "%" | "fr" | "vw" | "vh" | "">(value: string, suffix: Suffix): value is `${number}${Suffix}`;
193
219
  declare function toBr(text: string): string;
194
220
  declare function randStr(digit?: number): string;
195
221
  declare const _default: "dummy";
196
- export { state, closed, maximumZindex, initialize, finalize, send_event, isPreview, setMiximumZindex, none, moveTo, linkTo, closeApp, _default, handleFocus, setPreviousFocus, handleKeydown, getPositionStyle, onScroll, onTime, hasSuffix, toBr, randStr, PropTypes, PropType, Code, MediaQueries, MediaQuery, Directions, Direction, AnimationStyles, AnimationStyle, AnimationStyleTranslations, ModalPositions, ModalPosition, ModalPositionTranslations, LongText, Url, Image, LengthUnits, LengthUnit, Length, Color, Justifies, Justify, Alignments, Alignment, ObjectFits, ObjectFit, Repeats, Repeat, Style, StateName };
222
+ export { state, closed, maximumZindex, initialize, finalize, send_event, isPreview, setMiximumZindex, none, moveTo, linkTo, closeApp, _default, handleFocus, setPreviousFocus, handleKeydown, getPositionStyle, getMarginStyle, onScroll, onTime, hasSuffix, toBr, randStr, PropTypes, PropType, Code, MediaQueries, MediaQuery, Directions, Direction, AnimationStyles, AnimationStyle, AnimationStyleTranslations, ModalPositions, ModalPosition, ModalPositionTranslations, ModalMargin, ModalMarginX, ModalMarginY, ModalMarginTranslations, LongText, Url, Image, LengthUnits, LengthUnit, Length, Color, Justifies, Justify, Alignments, Alignment, ObjectFits, ObjectFit, Repeats, Repeat, Style, StateName };
197
223
  export { default as State } from './State.svelte';
198
224
  export { default as GridModalState } from './GridModalState.svelte';
199
225
  export { default as GridItem } from './GridItem.svelte';
package/dist/index.es.js CHANGED
@@ -66,6 +66,18 @@ const getPositionStyle = (position) => {
66
66
  }, '')
67
67
  .trimStart();
68
68
  };
69
+ const getMarginStyle = (modalMargins) => {
70
+ const margin = {
71
+ left: '0',
72
+ right: '0',
73
+ top: '0',
74
+ bottom: '0',
75
+ };
76
+ modalMargins.forEach(modalMargin => {
77
+ margin[modalMargin.side] = modalMargin.length;
78
+ });
79
+ return `margin: ${margin.top} ${margin.right} ${margin.bottom} ${margin.left};`;
80
+ };
69
81
  function onScroll(fn, rate) {
70
82
  const target = document.querySelector('body');
71
83
  // TBD ページが長いときの対策
@@ -272,6 +284,24 @@ const ModalPositionTranslations = {
272
284
  en: 'Bottom Right',
273
285
  },
274
286
  };
287
+ const ModalMarginTranslations = {
288
+ left: {
289
+ ja: '左からの距離',
290
+ en: 'Left',
291
+ },
292
+ right: {
293
+ ja: '右からの距離',
294
+ en: 'Right',
295
+ },
296
+ top: {
297
+ ja: '上からの距離',
298
+ en: 'Top',
299
+ },
300
+ bottom: {
301
+ ja: '下からの距離',
302
+ en: 'Bottom',
303
+ },
304
+ };
275
305
  const LengthUnits = ['px', 'em', 'rem', 'vw', 'fr', '%'];
276
306
  const Justifies = ['flex-start', 'center', 'flex-end'];
277
307
  const Alignments = ['flex-start', 'center', 'flex-end'];
@@ -665,10 +695,10 @@ class Animation extends SvelteComponent {
665
695
  /* src/components/Modal.svelte generated by Svelte v3.44.1 */
666
696
 
667
697
  function add_css$3(target) {
668
- append_styles(target, "svelte-1ra4zfg", ".modal.svelte-1ra4zfg{position:absolute;box-sizing:border-box;z-index:2147483647}.close.svelte-1ra4zfg{position:absolute;display:flex;justify-content:center;align-items:center;background-color:transparent;border:none;cursor:pointer;padding:0;transition:all 0.25s}.close.svelte-1ra4zfg:hover{transform:rotate(90deg)}");
698
+ append_styles(target, "svelte-1bxl6mz", ".modal.svelte-1bxl6mz{position:fixed;box-sizing:border-box;z-index:2147483647}.close.svelte-1bxl6mz{position:absolute;display:flex;justify-content:center;align-items:center;background-color:transparent;border:none;cursor:pointer;padding:0;transition:all 0.25s}.close.svelte-1bxl6mz:hover{transform:rotate(90deg)}");
669
699
  }
670
700
 
671
- // (78:2) {#if closable}
701
+ // (82:2) {#if closable}
672
702
  function create_if_block(ctx) {
673
703
  let button;
674
704
  let svg;
@@ -690,8 +720,8 @@ function create_if_block(ctx) {
690
720
  attr(svg, "viewBox", "0 0 9 10");
691
721
  attr(svg, "fill", "none");
692
722
  attr(svg, "xmlns", "http://www.w3.org/2000/svg");
693
- attr(button, "class", "close svelte-1ra4zfg");
694
- attr(button, "style", button_style_value = "z-index:" + (/*$maximumZindex*/ ctx[6] + 1) + "; " + /*_closeStyle*/ ctx[3] + "");
723
+ attr(button, "class", "close svelte-1bxl6mz");
724
+ attr(button, "style", button_style_value = "z-index:" + (/*$maximumZindex*/ ctx[7] + 1) + "; " + /*_closeStyle*/ ctx[3] + "");
695
725
  },
696
726
  m(target, anchor) {
697
727
  insert(target, button, anchor);
@@ -708,7 +738,7 @@ function create_if_block(ctx) {
708
738
  attr(path, "fill", /*closeButtonColor*/ ctx[1]);
709
739
  }
710
740
 
711
- if (dirty & /*$maximumZindex, _closeStyle*/ 72 && button_style_value !== (button_style_value = "z-index:" + (/*$maximumZindex*/ ctx[6] + 1) + "; " + /*_closeStyle*/ ctx[3] + "")) {
741
+ if (dirty & /*$maximumZindex, _closeStyle*/ 136 && button_style_value !== (button_style_value = "z-index:" + (/*$maximumZindex*/ ctx[7] + 1) + "; " + /*_closeStyle*/ ctx[3] + "")) {
712
742
  attr(button, "style", button_style_value);
713
743
  }
714
744
  },
@@ -728,8 +758,8 @@ function create_fragment$5(ctx) {
728
758
  let mounted;
729
759
  let dispose;
730
760
  let if_block = /*closable*/ ctx[0] && create_if_block(ctx);
731
- const default_slot_template = /*#slots*/ ctx[15].default;
732
- const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[14], null);
761
+ const default_slot_template = /*#slots*/ ctx[16].default;
762
+ const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[15], null);
733
763
 
734
764
  return {
735
765
  c() {
@@ -737,10 +767,10 @@ function create_fragment$5(ctx) {
737
767
  if (if_block) if_block.c();
738
768
  t = space();
739
769
  if (default_slot) default_slot.c();
740
- attr(div, "class", "modal svelte-1ra4zfg");
770
+ attr(div, "class", "modal svelte-1bxl6mz");
741
771
  attr(div, "role", "dialog");
742
772
  attr(div, "aria-modal", "true");
743
- attr(div, "style", div_style_value = "position:" + (/*overwriteFixed*/ ctx[7] ? 'fixed' : 'absolute') + "; " + /*pos*/ ctx[5] + " " + /*_style*/ ctx[2] + "");
773
+ attr(div, "style", div_style_value = "" + /*pos*/ ctx[6] + " " + /*margin*/ ctx[5] + " " + /*_style*/ ctx[2] + "");
744
774
  },
745
775
  m(target, anchor) {
746
776
  insert(target, div, anchor);
@@ -751,7 +781,7 @@ function create_fragment$5(ctx) {
751
781
  default_slot.m(div, null);
752
782
  }
753
783
 
754
- /*div_binding*/ ctx[16](div);
784
+ /*div_binding*/ ctx[17](div);
755
785
  current = true;
756
786
 
757
787
  if (!mounted) {
@@ -774,21 +804,21 @@ function create_fragment$5(ctx) {
774
804
  }
775
805
 
776
806
  if (default_slot) {
777
- if (default_slot.p && (!current || dirty & /*$$scope*/ 16384)) {
807
+ if (default_slot.p && (!current || dirty & /*$$scope*/ 32768)) {
778
808
  update_slot_base(
779
809
  default_slot,
780
810
  default_slot_template,
781
811
  ctx,
782
- /*$$scope*/ ctx[14],
812
+ /*$$scope*/ ctx[15],
783
813
  !current
784
- ? get_all_dirty_from_scope(/*$$scope*/ ctx[14])
785
- : get_slot_changes(default_slot_template, /*$$scope*/ ctx[14], dirty, null),
814
+ ? get_all_dirty_from_scope(/*$$scope*/ ctx[15])
815
+ : get_slot_changes(default_slot_template, /*$$scope*/ ctx[15], dirty, null),
786
816
  null
787
817
  );
788
818
  }
789
819
  }
790
820
 
791
- if (!current || dirty & /*pos, _style*/ 36 && div_style_value !== (div_style_value = "position:" + (/*overwriteFixed*/ ctx[7] ? 'fixed' : 'absolute') + "; " + /*pos*/ ctx[5] + " " + /*_style*/ ctx[2] + "")) {
821
+ if (!current || dirty & /*pos, margin, _style*/ 100 && div_style_value !== (div_style_value = "" + /*pos*/ ctx[6] + " " + /*margin*/ ctx[5] + " " + /*_style*/ ctx[2] + "")) {
792
822
  attr(div, "style", div_style_value);
793
823
  }
794
824
  },
@@ -805,7 +835,7 @@ function create_fragment$5(ctx) {
805
835
  if (detaching) detach(div);
806
836
  if (if_block) if_block.d();
807
837
  if (default_slot) default_slot.d(detaching);
808
- /*div_binding*/ ctx[16](null);
838
+ /*div_binding*/ ctx[17](null);
809
839
  mounted = false;
810
840
  dispose();
811
841
  }
@@ -814,8 +844,9 @@ function create_fragment$5(ctx) {
814
844
 
815
845
  function instance$5($$self, $$props, $$invalidate) {
816
846
  let pos;
847
+ let margin;
817
848
  let $maximumZindex;
818
- component_subscribe($$self, maximumZindex, $$value => $$invalidate(6, $maximumZindex = $$value));
849
+ component_subscribe($$self, maximumZindex, $$value => $$invalidate(7, $maximumZindex = $$value));
819
850
  let { $$slots: slots = {}, $$scope } = $$props;
820
851
  let { closable = true } = $$props;
821
852
  let { closeButtonColor = '#000000' } = $$props;
@@ -823,8 +854,8 @@ function instance$5($$self, $$props, $$invalidate) {
823
854
  let { eventValue = null } = $$props;
824
855
  let { position = 'center' } = $$props;
825
856
  const overwritePosition = isPreview() ? 'center' : position;
826
- let { fixed = false } = $$props;
827
- const overwriteFixed = isPreview() ? false : fixed;
857
+ let { modalMarginX = { side: 'left', length: '0' } } = $$props;
858
+ let { modalMarginY = { side: 'top', length: '0' } } = $$props;
828
859
  let { _style = '' } = $$props;
829
860
  let { _closeStyle = '' } = $$props;
830
861
 
@@ -858,13 +889,20 @@ function instance$5($$self, $$props, $$invalidate) {
858
889
  if ('eventName' in $$props) $$invalidate(10, eventName = $$props.eventName);
859
890
  if ('eventValue' in $$props) $$invalidate(11, eventValue = $$props.eventValue);
860
891
  if ('position' in $$props) $$invalidate(12, position = $$props.position);
861
- if ('fixed' in $$props) $$invalidate(13, fixed = $$props.fixed);
892
+ if ('modalMarginX' in $$props) $$invalidate(13, modalMarginX = $$props.modalMarginX);
893
+ if ('modalMarginY' in $$props) $$invalidate(14, modalMarginY = $$props.modalMarginY);
862
894
  if ('_style' in $$props) $$invalidate(2, _style = $$props._style);
863
895
  if ('_closeStyle' in $$props) $$invalidate(3, _closeStyle = $$props._closeStyle);
864
- if ('$$scope' in $$props) $$invalidate(14, $$scope = $$props.$$scope);
896
+ if ('$$scope' in $$props) $$invalidate(15, $$scope = $$props.$$scope);
897
+ };
898
+
899
+ $$self.$$.update = () => {
900
+ if ($$self.$$.dirty & /*modalMarginX, modalMarginY*/ 24576) {
901
+ $$invalidate(5, margin = getMarginStyle([modalMarginX, modalMarginY]));
902
+ }
865
903
  };
866
904
 
867
- $$invalidate(5, pos = getPositionStyle(overwritePosition));
905
+ $$invalidate(6, pos = getPositionStyle(overwritePosition));
868
906
 
869
907
  return [
870
908
  closable,
@@ -872,15 +910,16 @@ function instance$5($$self, $$props, $$invalidate) {
872
910
  _style,
873
911
  _closeStyle,
874
912
  modal,
913
+ margin,
875
914
  pos,
876
915
  $maximumZindex,
877
- overwriteFixed,
878
916
  close,
879
917
  handle_keydown,
880
918
  eventName,
881
919
  eventValue,
882
920
  position,
883
- fixed,
921
+ modalMarginX,
922
+ modalMarginY,
884
923
  $$scope,
885
924
  slots,
886
925
  div_binding
@@ -903,7 +942,8 @@ class Modal extends SvelteComponent {
903
942
  eventName: 10,
904
943
  eventValue: 11,
905
944
  position: 12,
906
- fixed: 13,
945
+ modalMarginX: 13,
946
+ modalMarginY: 14,
907
947
  _style: 2,
908
948
  _closeStyle: 3
909
949
  },
@@ -1032,8 +1072,8 @@ class Grid extends SvelteComponent {
1032
1072
 
1033
1073
  function create_default_slot_3(ctx) {
1034
1074
  let current;
1035
- const default_slot_template = /*#slots*/ ctx[18].default;
1036
- const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[19], null);
1075
+ const default_slot_template = /*#slots*/ ctx[19].default;
1076
+ const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[20], null);
1037
1077
 
1038
1078
  return {
1039
1079
  c() {
@@ -1048,15 +1088,15 @@ function create_default_slot_3(ctx) {
1048
1088
  },
1049
1089
  p(ctx, dirty) {
1050
1090
  if (default_slot) {
1051
- if (default_slot.p && (!current || dirty & /*$$scope*/ 524288)) {
1091
+ if (default_slot.p && (!current || dirty & /*$$scope*/ 1048576)) {
1052
1092
  update_slot_base(
1053
1093
  default_slot,
1054
1094
  default_slot_template,
1055
1095
  ctx,
1056
- /*$$scope*/ ctx[19],
1096
+ /*$$scope*/ ctx[20],
1057
1097
  !current
1058
- ? get_all_dirty_from_scope(/*$$scope*/ ctx[19])
1059
- : get_slot_changes(default_slot_template, /*$$scope*/ ctx[19], dirty, null),
1098
+ ? get_all_dirty_from_scope(/*$$scope*/ ctx[20])
1099
+ : get_slot_changes(default_slot_template, /*$$scope*/ ctx[20], dirty, null),
1060
1100
  null
1061
1101
  );
1062
1102
  }
@@ -1077,19 +1117,19 @@ function create_default_slot_3(ctx) {
1077
1117
  };
1078
1118
  }
1079
1119
 
1080
- // (99:4) <Modal {closable} {closeButtonColor} {_closeStyle} {position} {fixed} _style={_modalStyle} on:close={close} >
1120
+ // (104:4) <Modal {closable} {closeButtonColor} {_closeStyle} {position} {modalMarginX} {modalMarginY} _style={_modalStyle} on:close={close} >
1081
1121
  function create_default_slot_2(ctx) {
1082
1122
  let grid;
1083
1123
  let current;
1084
1124
 
1085
1125
  grid = new Grid({
1086
1126
  props: {
1087
- width: /*width*/ ctx[9],
1088
- height: /*height*/ ctx[10],
1089
- rows: /*rows*/ ctx[11],
1090
- columns: /*columns*/ ctx[12],
1091
- gap: /*gap*/ ctx[13],
1092
- background: /*background*/ ctx[14],
1127
+ width: /*width*/ ctx[10],
1128
+ height: /*height*/ ctx[11],
1129
+ rows: /*rows*/ ctx[12],
1130
+ columns: /*columns*/ ctx[13],
1131
+ gap: /*gap*/ ctx[14],
1132
+ background: /*background*/ ctx[15],
1093
1133
  $$slots: { default: [create_default_slot_3] },
1094
1134
  $$scope: { ctx }
1095
1135
  }
@@ -1105,14 +1145,14 @@ function create_default_slot_2(ctx) {
1105
1145
  },
1106
1146
  p(ctx, dirty) {
1107
1147
  const grid_changes = {};
1108
- if (dirty & /*width*/ 512) grid_changes.width = /*width*/ ctx[9];
1109
- if (dirty & /*height*/ 1024) grid_changes.height = /*height*/ ctx[10];
1110
- if (dirty & /*rows*/ 2048) grid_changes.rows = /*rows*/ ctx[11];
1111
- if (dirty & /*columns*/ 4096) grid_changes.columns = /*columns*/ ctx[12];
1112
- if (dirty & /*gap*/ 8192) grid_changes.gap = /*gap*/ ctx[13];
1113
- if (dirty & /*background*/ 16384) grid_changes.background = /*background*/ ctx[14];
1114
-
1115
- if (dirty & /*$$scope*/ 524288) {
1148
+ if (dirty & /*width*/ 1024) grid_changes.width = /*width*/ ctx[10];
1149
+ if (dirty & /*height*/ 2048) grid_changes.height = /*height*/ ctx[11];
1150
+ if (dirty & /*rows*/ 4096) grid_changes.rows = /*rows*/ ctx[12];
1151
+ if (dirty & /*columns*/ 8192) grid_changes.columns = /*columns*/ ctx[13];
1152
+ if (dirty & /*gap*/ 16384) grid_changes.gap = /*gap*/ ctx[14];
1153
+ if (dirty & /*background*/ 32768) grid_changes.background = /*background*/ ctx[15];
1154
+
1155
+ if (dirty & /*$$scope*/ 1048576) {
1116
1156
  grid_changes.$$scope = { dirty, ctx };
1117
1157
  }
1118
1158
 
@@ -1133,25 +1173,26 @@ function create_default_slot_2(ctx) {
1133
1173
  };
1134
1174
  }
1135
1175
 
1136
- // (98:2) <Animation {animation}>
1176
+ // (103:2) <Animation {animation}>
1137
1177
  function create_default_slot_1(ctx) {
1138
1178
  let modal;
1139
1179
  let current;
1140
1180
 
1141
1181
  modal = new Modal({
1142
1182
  props: {
1143
- closable: /*closable*/ ctx[4],
1144
- closeButtonColor: /*closeButtonColor*/ ctx[5],
1145
- _closeStyle: /*_closeStyle*/ ctx[8],
1146
- position: /*position*/ ctx[3],
1147
- fixed: /*fixed*/ ctx[6],
1148
- _style: /*_modalStyle*/ ctx[7],
1183
+ closable: /*closable*/ ctx[6],
1184
+ closeButtonColor: /*closeButtonColor*/ ctx[8],
1185
+ _closeStyle: /*_closeStyle*/ ctx[9],
1186
+ position: /*position*/ ctx[1],
1187
+ modalMarginX: /*modalMarginX*/ ctx[2],
1188
+ modalMarginY: /*modalMarginY*/ ctx[3],
1189
+ _style: /*_modalStyle*/ ctx[5],
1149
1190
  $$slots: { default: [create_default_slot_2] },
1150
1191
  $$scope: { ctx }
1151
1192
  }
1152
1193
  });
1153
1194
 
1154
- modal.$on("close", /*close*/ ctx[15]);
1195
+ modal.$on("close", /*close*/ ctx[16]);
1155
1196
 
1156
1197
  return {
1157
1198
  c() {
@@ -1163,14 +1204,15 @@ function create_default_slot_1(ctx) {
1163
1204
  },
1164
1205
  p(ctx, dirty) {
1165
1206
  const modal_changes = {};
1166
- if (dirty & /*closable*/ 16) modal_changes.closable = /*closable*/ ctx[4];
1167
- if (dirty & /*closeButtonColor*/ 32) modal_changes.closeButtonColor = /*closeButtonColor*/ ctx[5];
1168
- if (dirty & /*_closeStyle*/ 256) modal_changes._closeStyle = /*_closeStyle*/ ctx[8];
1169
- if (dirty & /*position*/ 8) modal_changes.position = /*position*/ ctx[3];
1170
- if (dirty & /*fixed*/ 64) modal_changes.fixed = /*fixed*/ ctx[6];
1171
- if (dirty & /*_modalStyle*/ 128) modal_changes._style = /*_modalStyle*/ ctx[7];
1172
-
1173
- if (dirty & /*$$scope, width, height, rows, columns, gap, background*/ 556544) {
1207
+ if (dirty & /*closable*/ 64) modal_changes.closable = /*closable*/ ctx[6];
1208
+ if (dirty & /*closeButtonColor*/ 256) modal_changes.closeButtonColor = /*closeButtonColor*/ ctx[8];
1209
+ if (dirty & /*_closeStyle*/ 512) modal_changes._closeStyle = /*_closeStyle*/ ctx[9];
1210
+ if (dirty & /*position*/ 2) modal_changes.position = /*position*/ ctx[1];
1211
+ if (dirty & /*modalMarginX*/ 4) modal_changes.modalMarginX = /*modalMarginX*/ ctx[2];
1212
+ if (dirty & /*modalMarginY*/ 8) modal_changes.modalMarginY = /*modalMarginY*/ ctx[3];
1213
+ if (dirty & /*_modalStyle*/ 32) modal_changes._style = /*_modalStyle*/ ctx[5];
1214
+
1215
+ if (dirty & /*$$scope, width, height, rows, columns, gap, background*/ 1113088) {
1174
1216
  modal_changes.$$scope = { dirty, ctx };
1175
1217
  }
1176
1218
 
@@ -1191,7 +1233,7 @@ function create_default_slot_1(ctx) {
1191
1233
  };
1192
1234
  }
1193
1235
 
1194
- // (96:0) <StateItem {path}>
1236
+ // (101:0) <StateItem {path}>
1195
1237
  function create_default_slot(ctx) {
1196
1238
  let backgroundoverray;
1197
1239
  let t;
@@ -1200,15 +1242,15 @@ function create_default_slot(ctx) {
1200
1242
 
1201
1243
  backgroundoverray = new BackgroundOverray({
1202
1244
  props: {
1203
- backgroundOverray: /*backgroundOverray*/ ctx[2]
1245
+ backgroundOverray: /*backgroundOverray*/ ctx[7]
1204
1246
  }
1205
1247
  });
1206
1248
 
1207
- backgroundoverray.$on("click", /*close*/ ctx[15]);
1249
+ backgroundoverray.$on("click", /*close*/ ctx[16]);
1208
1250
 
1209
1251
  animation_1 = new Animation({
1210
1252
  props: {
1211
- animation: /*animation*/ ctx[1],
1253
+ animation: /*animation*/ ctx[4],
1212
1254
  $$slots: { default: [create_default_slot_1] },
1213
1255
  $$scope: { ctx }
1214
1256
  }
@@ -1228,12 +1270,12 @@ function create_default_slot(ctx) {
1228
1270
  },
1229
1271
  p(ctx, dirty) {
1230
1272
  const backgroundoverray_changes = {};
1231
- if (dirty & /*backgroundOverray*/ 4) backgroundoverray_changes.backgroundOverray = /*backgroundOverray*/ ctx[2];
1273
+ if (dirty & /*backgroundOverray*/ 128) backgroundoverray_changes.backgroundOverray = /*backgroundOverray*/ ctx[7];
1232
1274
  backgroundoverray.$set(backgroundoverray_changes);
1233
1275
  const animation_1_changes = {};
1234
- if (dirty & /*animation*/ 2) animation_1_changes.animation = /*animation*/ ctx[1];
1276
+ if (dirty & /*animation*/ 16) animation_1_changes.animation = /*animation*/ ctx[4];
1235
1277
 
1236
- if (dirty & /*$$scope, closable, closeButtonColor, _closeStyle, position, fixed, _modalStyle, width, height, rows, columns, gap, background*/ 557048) {
1278
+ if (dirty & /*$$scope, closable, closeButtonColor, _closeStyle, position, modalMarginX, modalMarginY, _modalStyle, width, height, rows, columns, gap, background*/ 1113966) {
1237
1279
  animation_1_changes.$$scope = { dirty, ctx };
1238
1280
  }
1239
1281
 
@@ -1282,7 +1324,7 @@ function create_fragment$3(ctx) {
1282
1324
  const stateitem_changes = {};
1283
1325
  if (dirty & /*path*/ 1) stateitem_changes.path = /*path*/ ctx[0];
1284
1326
 
1285
- if (dirty & /*$$scope, animation, closable, closeButtonColor, _closeStyle, position, fixed, _modalStyle, width, height, rows, columns, gap, background, backgroundOverray*/ 557054) {
1327
+ if (dirty & /*$$scope, animation, closable, closeButtonColor, _closeStyle, position, modalMarginX, modalMarginY, _modalStyle, width, height, rows, columns, gap, background, backgroundOverray*/ 1114110) {
1286
1328
  stateitem_changes.$$scope = { dirty, ctx };
1287
1329
  }
1288
1330
 
@@ -1306,15 +1348,16 @@ function create_fragment$3(ctx) {
1306
1348
  function instance$3($$self, $$props, $$invalidate) {
1307
1349
  let { $$slots: slots = {}, $$scope } = $$props;
1308
1350
  let { path } = $$props;
1309
- let { animation = 'none' } = $$props;
1310
- let { backgroundOverray = false } = $$props;
1311
1351
  let { position = 'center' } = $$props;
1352
+ let { modalMarginX = { side: 'left', length: '0' } } = $$props;
1353
+ let { modalMarginY = { side: 'top', length: '0' } } = $$props;
1354
+ let { animation = 'none' } = $$props;
1355
+ let { _modalStyle = '' } = $$props;
1312
1356
  let { closable = true } = $$props;
1357
+ let { backgroundOverray = false } = $$props;
1313
1358
  let { closeButtonColor = '#000000' } = $$props;
1314
1359
  let { eventName = '' } = $$props;
1315
1360
  let { eventValue = null } = $$props;
1316
- let { fixed = false } = $$props;
1317
- let { _modalStyle = '' } = $$props;
1318
1361
  let { _closeStyle = '' } = $$props;
1319
1362
  let { width = '512px' } = $$props;
1320
1363
  let { height = '256px' } = $$props;
@@ -1338,34 +1381,36 @@ function instance$3($$self, $$props, $$invalidate) {
1338
1381
 
1339
1382
  $$self.$$set = $$props => {
1340
1383
  if ('path' in $$props) $$invalidate(0, path = $$props.path);
1341
- if ('animation' in $$props) $$invalidate(1, animation = $$props.animation);
1342
- if ('backgroundOverray' in $$props) $$invalidate(2, backgroundOverray = $$props.backgroundOverray);
1343
- if ('position' in $$props) $$invalidate(3, position = $$props.position);
1344
- if ('closable' in $$props) $$invalidate(4, closable = $$props.closable);
1345
- if ('closeButtonColor' in $$props) $$invalidate(5, closeButtonColor = $$props.closeButtonColor);
1346
- if ('eventName' in $$props) $$invalidate(16, eventName = $$props.eventName);
1347
- if ('eventValue' in $$props) $$invalidate(17, eventValue = $$props.eventValue);
1348
- if ('fixed' in $$props) $$invalidate(6, fixed = $$props.fixed);
1349
- if ('_modalStyle' in $$props) $$invalidate(7, _modalStyle = $$props._modalStyle);
1350
- if ('_closeStyle' in $$props) $$invalidate(8, _closeStyle = $$props._closeStyle);
1351
- if ('width' in $$props) $$invalidate(9, width = $$props.width);
1352
- if ('height' in $$props) $$invalidate(10, height = $$props.height);
1353
- if ('rows' in $$props) $$invalidate(11, rows = $$props.rows);
1354
- if ('columns' in $$props) $$invalidate(12, columns = $$props.columns);
1355
- if ('gap' in $$props) $$invalidate(13, gap = $$props.gap);
1356
- if ('background' in $$props) $$invalidate(14, background = $$props.background);
1357
- if ('$$scope' in $$props) $$invalidate(19, $$scope = $$props.$$scope);
1384
+ if ('position' in $$props) $$invalidate(1, position = $$props.position);
1385
+ if ('modalMarginX' in $$props) $$invalidate(2, modalMarginX = $$props.modalMarginX);
1386
+ if ('modalMarginY' in $$props) $$invalidate(3, modalMarginY = $$props.modalMarginY);
1387
+ if ('animation' in $$props) $$invalidate(4, animation = $$props.animation);
1388
+ if ('_modalStyle' in $$props) $$invalidate(5, _modalStyle = $$props._modalStyle);
1389
+ if ('closable' in $$props) $$invalidate(6, closable = $$props.closable);
1390
+ if ('backgroundOverray' in $$props) $$invalidate(7, backgroundOverray = $$props.backgroundOverray);
1391
+ if ('closeButtonColor' in $$props) $$invalidate(8, closeButtonColor = $$props.closeButtonColor);
1392
+ if ('eventName' in $$props) $$invalidate(17, eventName = $$props.eventName);
1393
+ if ('eventValue' in $$props) $$invalidate(18, eventValue = $$props.eventValue);
1394
+ if ('_closeStyle' in $$props) $$invalidate(9, _closeStyle = $$props._closeStyle);
1395
+ if ('width' in $$props) $$invalidate(10, width = $$props.width);
1396
+ if ('height' in $$props) $$invalidate(11, height = $$props.height);
1397
+ if ('rows' in $$props) $$invalidate(12, rows = $$props.rows);
1398
+ if ('columns' in $$props) $$invalidate(13, columns = $$props.columns);
1399
+ if ('gap' in $$props) $$invalidate(14, gap = $$props.gap);
1400
+ if ('background' in $$props) $$invalidate(15, background = $$props.background);
1401
+ if ('$$scope' in $$props) $$invalidate(20, $$scope = $$props.$$scope);
1358
1402
  };
1359
1403
 
1360
1404
  return [
1361
1405
  path,
1362
- animation,
1363
- backgroundOverray,
1364
1406
  position,
1407
+ modalMarginX,
1408
+ modalMarginY,
1409
+ animation,
1410
+ _modalStyle,
1365
1411
  closable,
1412
+ backgroundOverray,
1366
1413
  closeButtonColor,
1367
- fixed,
1368
- _modalStyle,
1369
1414
  _closeStyle,
1370
1415
  width,
1371
1416
  height,
@@ -1387,22 +1432,23 @@ class GridModalState extends SvelteComponent {
1387
1432
 
1388
1433
  init(this, options, instance$3, create_fragment$3, safe_not_equal, {
1389
1434
  path: 0,
1390
- animation: 1,
1391
- backgroundOverray: 2,
1392
- position: 3,
1393
- closable: 4,
1394
- closeButtonColor: 5,
1395
- eventName: 16,
1396
- eventValue: 17,
1397
- fixed: 6,
1398
- _modalStyle: 7,
1399
- _closeStyle: 8,
1400
- width: 9,
1401
- height: 10,
1402
- rows: 11,
1403
- columns: 12,
1404
- gap: 13,
1405
- background: 14
1435
+ position: 1,
1436
+ modalMarginX: 2,
1437
+ modalMarginY: 3,
1438
+ animation: 4,
1439
+ _modalStyle: 5,
1440
+ closable: 6,
1441
+ backgroundOverray: 7,
1442
+ closeButtonColor: 8,
1443
+ eventName: 17,
1444
+ eventValue: 18,
1445
+ _closeStyle: 9,
1446
+ width: 10,
1447
+ height: 11,
1448
+ rows: 12,
1449
+ columns: 13,
1450
+ gap: 14,
1451
+ background: 15
1406
1452
  });
1407
1453
  }
1408
1454
  }
@@ -1755,4 +1801,4 @@ class FlexItem extends SvelteComponent {
1755
1801
  }
1756
1802
  }
1757
1803
 
1758
- export { Alignments, AnimationStyleTranslations, AnimationStyles, Directions, Flex, FlexItem, GridItem, GridModalState, Justifies, LengthUnits, MediaQueries, Modal, ModalPositionTranslations, ModalPositions, ObjectFits, PropTypes, Repeats, State, closeApp, closed, finalize, getPositionStyle, handleFocus, handleKeydown, hasSuffix, initialize, isPreview, linkTo, maximumZindex, moveTo, none, onScroll, onTime, randStr, send_event, setMiximumZindex, setPreviousFocus, state, toBr };
1804
+ export { Alignments, AnimationStyleTranslations, AnimationStyles, Directions, Flex, FlexItem, GridItem, GridModalState, Justifies, LengthUnits, MediaQueries, Modal, ModalMarginTranslations, ModalPositionTranslations, ModalPositions, ObjectFits, PropTypes, Repeats, State, closeApp, closed, finalize, getMarginStyle, getPositionStyle, handleFocus, handleKeydown, hasSuffix, initialize, isPreview, linkTo, maximumZindex, moveTo, none, onScroll, onTime, randStr, send_event, setMiximumZindex, setPreviousFocus, state, toBr };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plaidev/karte-action-sdk",
3
- "version": "1.0.24",
3
+ "version": "1.0.25",
4
4
  "author": "Plaid Inc.",
5
5
  "license": "Apache-2.0",
6
6
  "module": "./dist/index.es.js",