@plaidev/karte-action-sdk 1.0.26 → 1.0.29

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,13 +140,6 @@ 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
143
  declare const ModalMarginTranslations: {
151
144
  left: {
152
145
  ja: string;
@@ -165,6 +158,18 @@ declare const ModalMarginTranslations: {
165
158
  en: string;
166
159
  };
167
160
  };
161
+ type ModalMargin = {
162
+ left: string;
163
+ right: string;
164
+ top: string;
165
+ bottom: string;
166
+ };
167
+ type ModalPlacement = {
168
+ position: ModalPosition;
169
+ margin: ModalMargin;
170
+ backgroundOverlay: boolean;
171
+ };
172
+ declare const DefaultModalPlacement: ModalPlacement;
168
173
  type LongText = string;
169
174
  type Url = string;
170
175
  type Image = string;
@@ -204,6 +209,12 @@ declare const Repeats: readonly [
204
209
  "no-repeat"
205
210
  ];
206
211
  type Repeat = typeof Repeats[number];
212
+ declare const BackgroundSizes: readonly [
213
+ "cover",
214
+ "contain",
215
+ "auto"
216
+ ];
217
+ type BackgroundSize = typeof BackgroundSizes[number];
207
218
  type Style = string;
208
219
  type StateName = string;
209
220
  declare const handleFocus: (node: HTMLElement | null) => (e: any) => void;
@@ -212,14 +223,14 @@ declare const handleKeydown: (handlers: {
212
223
  [eventName: string]: (e: any) => void;
213
224
  }) => (e: any) => void;
214
225
  declare const getPositionStyle: (position: ModalPosition) => string;
215
- declare const getMarginStyle: (modalMargins: ModalMargin[]) => string;
226
+ declare const getMarginStyle: (margin: ModalMargin) => string;
216
227
  declare function onScroll(fn: Function, rate: number): () => void;
217
228
  declare function onTime(fn: Function, time: number): () => void;
218
229
  declare function hasSuffix<Suffix extends "px" | "em" | "rem" | "%" | "fr" | "vw" | "vh" | "">(value: string, suffix: Suffix): value is `${number}${Suffix}`;
219
230
  declare function toBr(text: string): string;
220
231
  declare function randStr(digit?: number): string;
221
232
  declare const _default: "dummy";
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 };
233
+ 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, ModalMarginTranslations, ModalMargin, ModalPlacement, DefaultModalPlacement, LongText, Url, Image, LengthUnits, LengthUnit, Length, Color, Justifies, Justify, Alignments, Alignment, ObjectFits, ObjectFit, Repeats, Repeat, BackgroundSizes, BackgroundSize, Style, StateName };
223
234
  export { default as State } from './State.svelte';
224
235
  export { default as GridModalState } from './GridModalState.svelte';
225
236
  export { default as GridItem } from './GridItem.svelte';
package/dist/index.es.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { writable, get } from 'svelte/store';
2
- import { SvelteComponent, init, safe_not_equal, append_styles, create_slot, create_component, space, mount_component, insert, update_slot_base, get_all_dirty_from_scope, get_slot_changes, transition_in, transition_out, destroy_component, detach, empty, group_outros, check_outros, component_subscribe, element, attr, listen, noop, null_to_empty, svg_element, append, binding_callbacks, src_url_equal } from 'svelte/internal';
2
+ import { SvelteComponent, init, safe_not_equal, append_styles, create_slot, create_component, space, mount_component, insert, update_slot_base, get_all_dirty_from_scope, get_slot_changes, transition_in, transition_out, destroy_component, detach, empty, group_outros, check_outros, component_subscribe, noop, element, attr, listen, null_to_empty, append, svg_element, binding_callbacks, src_url_equal } from 'svelte/internal';
3
3
  import { createEventDispatcher, onDestroy, onMount, setContext, getContext } from 'svelte';
4
4
 
5
5
  /**
@@ -66,16 +66,7 @@ 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
- });
69
+ const getMarginStyle = (margin) => {
79
70
  return `margin: ${margin.top} ${margin.right} ${margin.bottom} ${margin.left};`;
80
71
  };
81
72
  function onScroll(fn, rate) {
@@ -286,27 +277,38 @@ const ModalPositionTranslations = {
286
277
  };
287
278
  const ModalMarginTranslations = {
288
279
  left: {
289
- ja: '左からの距離',
280
+ ja: '左側からの距離',
290
281
  en: 'Left',
291
282
  },
292
283
  right: {
293
- ja: '右からの距離',
284
+ ja: '右側からの距離',
294
285
  en: 'Right',
295
286
  },
296
287
  top: {
297
- ja: '上からの距離',
288
+ ja: '上側からの距離',
298
289
  en: 'Top',
299
290
  },
300
291
  bottom: {
301
- ja: '下からの距離',
292
+ ja: '下側からの距離',
302
293
  en: 'Bottom',
303
294
  },
304
295
  };
296
+ const DefaultModalPlacement = {
297
+ position: 'center',
298
+ margin: {
299
+ left: '0px',
300
+ right: '0px',
301
+ top: '0px',
302
+ bottom: '0px',
303
+ },
304
+ backgroundOverlay: true,
305
+ };
305
306
  const LengthUnits = ['px', 'em', 'rem', 'vw', 'fr', '%'];
306
307
  const Justifies = ['flex-start', 'center', 'flex-end'];
307
308
  const Alignments = ['flex-start', 'center', 'flex-end'];
308
309
  const ObjectFits = ['fill', 'contain', 'cover'];
309
310
  const Repeats = ['repeat', 'space', 'round', 'no-repeat'];
311
+ const BackgroundSizes = ['cover', 'contain', 'auto'];
310
312
 
311
313
  /* src/components/Normalize.svelte generated by Svelte v3.44.1 */
312
314
 
@@ -698,7 +700,7 @@ function add_css$6(target) {
698
700
  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)}");
699
701
  }
700
702
 
701
- // (82:2) {#if closable}
703
+ // (79:2) {#if closable}
702
704
  function create_if_block(ctx) {
703
705
  let button;
704
706
  let svg;
@@ -758,8 +760,8 @@ function create_fragment$8(ctx) {
758
760
  let mounted;
759
761
  let dispose;
760
762
  let if_block = /*closable*/ ctx[0] && create_if_block(ctx);
761
- const default_slot_template = /*#slots*/ ctx[16].default;
762
- const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[15], null);
763
+ const default_slot_template = /*#slots*/ ctx[15].default;
764
+ const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[14], null);
763
765
 
764
766
  return {
765
767
  c() {
@@ -770,7 +772,7 @@ function create_fragment$8(ctx) {
770
772
  attr(div, "class", "modal svelte-1bxl6mz");
771
773
  attr(div, "role", "dialog");
772
774
  attr(div, "aria-modal", "true");
773
- attr(div, "style", div_style_value = "" + /*pos*/ ctx[6] + " " + /*margin*/ ctx[5] + " " + /*_style*/ ctx[2] + "");
775
+ attr(div, "style", div_style_value = "" + /*pos*/ ctx[6] + " " + /*marginStyle*/ ctx[5] + " " + /*_style*/ ctx[2] + "");
774
776
  },
775
777
  m(target, anchor) {
776
778
  insert(target, div, anchor);
@@ -781,7 +783,7 @@ function create_fragment$8(ctx) {
781
783
  default_slot.m(div, null);
782
784
  }
783
785
 
784
- /*div_binding*/ ctx[17](div);
786
+ /*div_binding*/ ctx[16](div);
785
787
  current = true;
786
788
 
787
789
  if (!mounted) {
@@ -804,21 +806,21 @@ function create_fragment$8(ctx) {
804
806
  }
805
807
 
806
808
  if (default_slot) {
807
- if (default_slot.p && (!current || dirty & /*$$scope*/ 32768)) {
809
+ if (default_slot.p && (!current || dirty & /*$$scope*/ 16384)) {
808
810
  update_slot_base(
809
811
  default_slot,
810
812
  default_slot_template,
811
813
  ctx,
812
- /*$$scope*/ ctx[15],
814
+ /*$$scope*/ ctx[14],
813
815
  !current
814
- ? get_all_dirty_from_scope(/*$$scope*/ ctx[15])
815
- : get_slot_changes(default_slot_template, /*$$scope*/ ctx[15], dirty, null),
816
+ ? get_all_dirty_from_scope(/*$$scope*/ ctx[14])
817
+ : get_slot_changes(default_slot_template, /*$$scope*/ ctx[14], dirty, null),
816
818
  null
817
819
  );
818
820
  }
819
821
  }
820
822
 
821
- if (!current || dirty & /*pos, margin, _style*/ 100 && div_style_value !== (div_style_value = "" + /*pos*/ ctx[6] + " " + /*margin*/ ctx[5] + " " + /*_style*/ ctx[2] + "")) {
823
+ if (!current || dirty & /*pos, marginStyle, _style*/ 100 && div_style_value !== (div_style_value = "" + /*pos*/ ctx[6] + " " + /*marginStyle*/ ctx[5] + " " + /*_style*/ ctx[2] + "")) {
822
824
  attr(div, "style", div_style_value);
823
825
  }
824
826
  },
@@ -835,7 +837,7 @@ function create_fragment$8(ctx) {
835
837
  if (detaching) detach(div);
836
838
  if (if_block) if_block.d();
837
839
  if (default_slot) default_slot.d(detaching);
838
- /*div_binding*/ ctx[17](null);
840
+ /*div_binding*/ ctx[16](null);
839
841
  mounted = false;
840
842
  dispose();
841
843
  }
@@ -844,7 +846,7 @@ function create_fragment$8(ctx) {
844
846
 
845
847
  function instance$8($$self, $$props, $$invalidate) {
846
848
  let pos;
847
- let margin;
849
+ let marginStyle;
848
850
  let $maximumZindex;
849
851
  component_subscribe($$self, maximumZindex, $$value => $$invalidate(7, $maximumZindex = $$value));
850
852
  let { $$slots: slots = {}, $$scope } = $$props;
@@ -854,8 +856,23 @@ function instance$8($$self, $$props, $$invalidate) {
854
856
  let { eventValue = null } = $$props;
855
857
  let { position = 'center' } = $$props;
856
858
  const overwritePosition = isPreview() ? 'center' : position;
857
- let { modalMarginX = { side: 'left', length: '0' } } = $$props;
858
- let { modalMarginY = { side: 'top', length: '0' } } = $$props;
859
+
860
+ let { margin = {
861
+ left: '0px',
862
+ right: '0px',
863
+ top: '0px',
864
+ bottom: '0px'
865
+ } } = $$props;
866
+
867
+ const overwriteMargin = isPreview()
868
+ ? {
869
+ left: '0px',
870
+ right: '0px',
871
+ top: '0px',
872
+ bottom: '0px'
873
+ }
874
+ : margin;
875
+
859
876
  let { _style = '' } = $$props;
860
877
  let { _closeStyle = '' } = $$props;
861
878
 
@@ -889,20 +906,14 @@ function instance$8($$self, $$props, $$invalidate) {
889
906
  if ('eventName' in $$props) $$invalidate(10, eventName = $$props.eventName);
890
907
  if ('eventValue' in $$props) $$invalidate(11, eventValue = $$props.eventValue);
891
908
  if ('position' in $$props) $$invalidate(12, position = $$props.position);
892
- if ('modalMarginX' in $$props) $$invalidate(13, modalMarginX = $$props.modalMarginX);
893
- if ('modalMarginY' in $$props) $$invalidate(14, modalMarginY = $$props.modalMarginY);
909
+ if ('margin' in $$props) $$invalidate(13, margin = $$props.margin);
894
910
  if ('_style' in $$props) $$invalidate(2, _style = $$props._style);
895
911
  if ('_closeStyle' in $$props) $$invalidate(3, _closeStyle = $$props._closeStyle);
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
- }
912
+ if ('$$scope' in $$props) $$invalidate(14, $$scope = $$props.$$scope);
903
913
  };
904
914
 
905
915
  $$invalidate(6, pos = getPositionStyle(overwritePosition));
916
+ $$invalidate(5, marginStyle = getMarginStyle(overwriteMargin));
906
917
 
907
918
  return [
908
919
  closable,
@@ -910,7 +921,7 @@ function instance$8($$self, $$props, $$invalidate) {
910
921
  _style,
911
922
  _closeStyle,
912
923
  modal,
913
- margin,
924
+ marginStyle,
914
925
  pos,
915
926
  $maximumZindex,
916
927
  close,
@@ -918,8 +929,7 @@ function instance$8($$self, $$props, $$invalidate) {
918
929
  eventName,
919
930
  eventValue,
920
931
  position,
921
- modalMarginX,
922
- modalMarginY,
932
+ margin,
923
933
  $$scope,
924
934
  slots,
925
935
  div_binding
@@ -942,8 +952,7 @@ class Modal extends SvelteComponent {
942
952
  eventName: 10,
943
953
  eventValue: 11,
944
954
  position: 12,
945
- modalMarginX: 13,
946
- modalMarginY: 14,
955
+ margin: 13,
947
956
  _style: 2,
948
957
  _closeStyle: 3
949
958
  },
@@ -1072,8 +1081,8 @@ class Grid extends SvelteComponent {
1072
1081
 
1073
1082
  function create_default_slot_3(ctx) {
1074
1083
  let current;
1075
- const default_slot_template = /*#slots*/ ctx[19].default;
1076
- const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[20], null);
1084
+ const default_slot_template = /*#slots*/ ctx[21].default;
1085
+ const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[22], null);
1077
1086
 
1078
1087
  return {
1079
1088
  c() {
@@ -1088,15 +1097,15 @@ function create_default_slot_3(ctx) {
1088
1097
  },
1089
1098
  p(ctx, dirty) {
1090
1099
  if (default_slot) {
1091
- if (default_slot.p && (!current || dirty & /*$$scope*/ 1048576)) {
1100
+ if (default_slot.p && (!current || dirty & /*$$scope*/ 4194304)) {
1092
1101
  update_slot_base(
1093
1102
  default_slot,
1094
1103
  default_slot_template,
1095
1104
  ctx,
1096
- /*$$scope*/ ctx[20],
1105
+ /*$$scope*/ ctx[22],
1097
1106
  !current
1098
- ? get_all_dirty_from_scope(/*$$scope*/ ctx[20])
1099
- : get_slot_changes(default_slot_template, /*$$scope*/ ctx[20], dirty, null),
1107
+ ? get_all_dirty_from_scope(/*$$scope*/ ctx[22])
1108
+ : get_slot_changes(default_slot_template, /*$$scope*/ ctx[22], dirty, null),
1100
1109
  null
1101
1110
  );
1102
1111
  }
@@ -1117,19 +1126,19 @@ function create_default_slot_3(ctx) {
1117
1126
  };
1118
1127
  }
1119
1128
 
1120
- // (104:4) <Modal {closable} {closeButtonColor} {_closeStyle} {position} {modalMarginX} {modalMarginY} _style={_modalStyle} on:close={close} >
1129
+ // (104:4) <Modal {closable} {closeButtonColor} {_closeStyle} position={_position} {margin} _style={_modalStyle} on:close={close} >
1121
1130
  function create_default_slot_2(ctx) {
1122
1131
  let grid;
1123
1132
  let current;
1124
1133
 
1125
1134
  grid = new Grid({
1126
1135
  props: {
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],
1136
+ width: /*width*/ ctx[6],
1137
+ height: /*height*/ ctx[7],
1138
+ rows: /*rows*/ ctx[8],
1139
+ columns: /*columns*/ ctx[9],
1140
+ gap: /*gap*/ ctx[10],
1141
+ background: /*background*/ ctx[11],
1133
1142
  $$slots: { default: [create_default_slot_3] },
1134
1143
  $$scope: { ctx }
1135
1144
  }
@@ -1145,14 +1154,14 @@ function create_default_slot_2(ctx) {
1145
1154
  },
1146
1155
  p(ctx, dirty) {
1147
1156
  const grid_changes = {};
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) {
1157
+ if (dirty & /*width*/ 64) grid_changes.width = /*width*/ ctx[6];
1158
+ if (dirty & /*height*/ 128) grid_changes.height = /*height*/ ctx[7];
1159
+ if (dirty & /*rows*/ 256) grid_changes.rows = /*rows*/ ctx[8];
1160
+ if (dirty & /*columns*/ 512) grid_changes.columns = /*columns*/ ctx[9];
1161
+ if (dirty & /*gap*/ 1024) grid_changes.gap = /*gap*/ ctx[10];
1162
+ if (dirty & /*background*/ 2048) grid_changes.background = /*background*/ ctx[11];
1163
+
1164
+ if (dirty & /*$$scope*/ 4194304) {
1156
1165
  grid_changes.$$scope = { dirty, ctx };
1157
1166
  }
1158
1167
 
@@ -1180,19 +1189,18 @@ function create_default_slot_1(ctx) {
1180
1189
 
1181
1190
  modal = new Modal({
1182
1191
  props: {
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],
1192
+ closable: /*closable*/ ctx[3],
1193
+ closeButtonColor: /*closeButtonColor*/ ctx[4],
1194
+ _closeStyle: /*_closeStyle*/ ctx[5],
1195
+ position: /*_position*/ ctx[13],
1196
+ margin: /*margin*/ ctx[14],
1197
+ _style: /*_modalStyle*/ ctx[2],
1190
1198
  $$slots: { default: [create_default_slot_2] },
1191
1199
  $$scope: { ctx }
1192
1200
  }
1193
1201
  });
1194
1202
 
1195
- modal.$on("close", /*close*/ ctx[16]);
1203
+ modal.$on("close", /*close*/ ctx[12]);
1196
1204
 
1197
1205
  return {
1198
1206
  c() {
@@ -1204,15 +1212,12 @@ function create_default_slot_1(ctx) {
1204
1212
  },
1205
1213
  p(ctx, dirty) {
1206
1214
  const modal_changes = {};
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) {
1215
+ if (dirty & /*closable*/ 8) modal_changes.closable = /*closable*/ ctx[3];
1216
+ if (dirty & /*closeButtonColor*/ 16) modal_changes.closeButtonColor = /*closeButtonColor*/ ctx[4];
1217
+ if (dirty & /*_closeStyle*/ 32) modal_changes._closeStyle = /*_closeStyle*/ ctx[5];
1218
+ if (dirty & /*_modalStyle*/ 4) modal_changes._style = /*_modalStyle*/ ctx[2];
1219
+
1220
+ if (dirty & /*$$scope, width, height, rows, columns, gap, background*/ 4198336) {
1216
1221
  modal_changes.$$scope = { dirty, ctx };
1217
1222
  }
1218
1223
 
@@ -1242,15 +1247,15 @@ function create_default_slot(ctx) {
1242
1247
 
1243
1248
  backgroundoverray = new BackgroundOverray({
1244
1249
  props: {
1245
- backgroundOverray: /*backgroundOverray*/ ctx[7]
1250
+ backgroundOverray: /*_backgroundOverray*/ ctx[15]
1246
1251
  }
1247
1252
  });
1248
1253
 
1249
- backgroundoverray.$on("click", /*close*/ ctx[16]);
1254
+ backgroundoverray.$on("click", /*close*/ ctx[12]);
1250
1255
 
1251
1256
  animation_1 = new Animation({
1252
1257
  props: {
1253
- animation: /*animation*/ ctx[4],
1258
+ animation: /*animation*/ ctx[1],
1254
1259
  $$slots: { default: [create_default_slot_1] },
1255
1260
  $$scope: { ctx }
1256
1261
  }
@@ -1269,13 +1274,10 @@ function create_default_slot(ctx) {
1269
1274
  current = true;
1270
1275
  },
1271
1276
  p(ctx, dirty) {
1272
- const backgroundoverray_changes = {};
1273
- if (dirty & /*backgroundOverray*/ 128) backgroundoverray_changes.backgroundOverray = /*backgroundOverray*/ ctx[7];
1274
- backgroundoverray.$set(backgroundoverray_changes);
1275
1277
  const animation_1_changes = {};
1276
- if (dirty & /*animation*/ 16) animation_1_changes.animation = /*animation*/ ctx[4];
1278
+ if (dirty & /*animation*/ 2) animation_1_changes.animation = /*animation*/ ctx[1];
1277
1279
 
1278
- if (dirty & /*$$scope, closable, closeButtonColor, _closeStyle, position, modalMarginX, modalMarginY, _modalStyle, width, height, rows, columns, gap, background*/ 1113966) {
1280
+ if (dirty & /*$$scope, closable, closeButtonColor, _closeStyle, _modalStyle, width, height, rows, columns, gap, background*/ 4198396) {
1279
1281
  animation_1_changes.$$scope = { dirty, ctx };
1280
1282
  }
1281
1283
 
@@ -1324,7 +1326,7 @@ function create_fragment$6(ctx) {
1324
1326
  const stateitem_changes = {};
1325
1327
  if (dirty & /*path*/ 1) stateitem_changes.path = /*path*/ ctx[0];
1326
1328
 
1327
- if (dirty & /*$$scope, animation, closable, closeButtonColor, _closeStyle, position, modalMarginX, modalMarginY, _modalStyle, width, height, rows, columns, gap, background, backgroundOverray*/ 1114110) {
1329
+ if (dirty & /*$$scope, animation, closable, closeButtonColor, _closeStyle, _modalStyle, width, height, rows, columns, gap, background*/ 4198398) {
1328
1330
  stateitem_changes.$$scope = { dirty, ctx };
1329
1331
  }
1330
1332
 
@@ -1348,9 +1350,8 @@ function create_fragment$6(ctx) {
1348
1350
  function instance$6($$self, $$props, $$invalidate) {
1349
1351
  let { $$slots: slots = {}, $$scope } = $$props;
1350
1352
  let { path } = $$props;
1353
+ let { placement = DefaultModalPlacement } = $$props;
1351
1354
  let { position = 'center' } = $$props;
1352
- let { modalMarginX = { side: 'left', length: '0' } } = $$props;
1353
- let { modalMarginY = { side: 'top', length: '0' } } = $$props;
1354
1355
  let { animation = 'none' } = $$props;
1355
1356
  let { _modalStyle = '' } = $$props;
1356
1357
  let { closable = true } = $$props;
@@ -1379,37 +1380,36 @@ function instance$6($$self, $$props, $$invalidate) {
1379
1380
  dispatch('close');
1380
1381
  };
1381
1382
 
1383
+ const _position = placement.position ?? position;
1384
+ const margin = placement.margin;
1385
+ const _backgroundOverray = placement.backgroundOverlay ?? backgroundOverray;
1386
+
1382
1387
  $$self.$$set = $$props => {
1383
1388
  if ('path' in $$props) $$invalidate(0, path = $$props.path);
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);
1389
+ if ('placement' in $$props) $$invalidate(16, placement = $$props.placement);
1390
+ if ('position' in $$props) $$invalidate(17, position = $$props.position);
1391
+ if ('animation' in $$props) $$invalidate(1, animation = $$props.animation);
1392
+ if ('_modalStyle' in $$props) $$invalidate(2, _modalStyle = $$props._modalStyle);
1393
+ if ('closable' in $$props) $$invalidate(3, closable = $$props.closable);
1394
+ if ('backgroundOverray' in $$props) $$invalidate(18, backgroundOverray = $$props.backgroundOverray);
1395
+ if ('closeButtonColor' in $$props) $$invalidate(4, closeButtonColor = $$props.closeButtonColor);
1396
+ if ('eventName' in $$props) $$invalidate(19, eventName = $$props.eventName);
1397
+ if ('eventValue' in $$props) $$invalidate(20, eventValue = $$props.eventValue);
1398
+ if ('_closeStyle' in $$props) $$invalidate(5, _closeStyle = $$props._closeStyle);
1399
+ if ('width' in $$props) $$invalidate(6, width = $$props.width);
1400
+ if ('height' in $$props) $$invalidate(7, height = $$props.height);
1401
+ if ('rows' in $$props) $$invalidate(8, rows = $$props.rows);
1402
+ if ('columns' in $$props) $$invalidate(9, columns = $$props.columns);
1403
+ if ('gap' in $$props) $$invalidate(10, gap = $$props.gap);
1404
+ if ('background' in $$props) $$invalidate(11, background = $$props.background);
1405
+ if ('$$scope' in $$props) $$invalidate(22, $$scope = $$props.$$scope);
1402
1406
  };
1403
1407
 
1404
1408
  return [
1405
1409
  path,
1406
- position,
1407
- modalMarginX,
1408
- modalMarginY,
1409
1410
  animation,
1410
1411
  _modalStyle,
1411
1412
  closable,
1412
- backgroundOverray,
1413
1413
  closeButtonColor,
1414
1414
  _closeStyle,
1415
1415
  width,
@@ -1419,6 +1419,12 @@ function instance$6($$self, $$props, $$invalidate) {
1419
1419
  gap,
1420
1420
  background,
1421
1421
  close,
1422
+ _position,
1423
+ margin,
1424
+ _backgroundOverray,
1425
+ placement,
1426
+ position,
1427
+ backgroundOverray,
1422
1428
  eventName,
1423
1429
  eventValue,
1424
1430
  slots,
@@ -1432,23 +1438,22 @@ class GridModalState extends SvelteComponent {
1432
1438
 
1433
1439
  init(this, options, instance$6, create_fragment$6, safe_not_equal, {
1434
1440
  path: 0,
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
1441
+ placement: 16,
1442
+ position: 17,
1443
+ animation: 1,
1444
+ _modalStyle: 2,
1445
+ closable: 3,
1446
+ backgroundOverray: 18,
1447
+ closeButtonColor: 4,
1448
+ eventName: 19,
1449
+ eventValue: 20,
1450
+ _closeStyle: 5,
1451
+ width: 6,
1452
+ height: 7,
1453
+ rows: 8,
1454
+ columns: 9,
1455
+ gap: 10,
1456
+ background: 11
1452
1457
  });
1453
1458
  }
1454
1459
  }
@@ -2086,4 +2091,4 @@ class ImageBlock extends SvelteComponent {
2086
2091
  }
2087
2092
  }
2088
2093
 
2089
- export { Alignments, AnimationStyleTranslations, AnimationStyles, Directions, Flex, FlexItem, GridItem, GridModalState, ImageBlock, Justifies, LengthUnits, MediaQueries, Modal, ModalMarginTranslations, ModalPositionTranslations, ModalPositions, ObjectFits, PropTypes, Repeats, State, TextBlock, TextButtonBlock, closeApp, closed, finalize, getMarginStyle, getPositionStyle, handleFocus, handleKeydown, hasSuffix, initialize, isPreview, linkTo, maximumZindex, moveTo, none, onScroll, onTime, randStr, send_event, setMiximumZindex, setPreviousFocus, state, toBr };
2094
+ export { Alignments, AnimationStyleTranslations, AnimationStyles, BackgroundSizes, DefaultModalPlacement, Directions, Flex, FlexItem, GridItem, GridModalState, ImageBlock, Justifies, LengthUnits, MediaQueries, Modal, ModalMarginTranslations, ModalPositionTranslations, ModalPositions, ObjectFits, PropTypes, Repeats, State, TextBlock, TextButtonBlock, 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.26",
3
+ "version": "1.0.29",
4
4
  "author": "Plaid Inc.",
5
5
  "license": "Apache-2.0",
6
6
  "module": "./dist/index.es.js",