@plaidev/karte-action-sdk 1.1.257-28896909.eadc4994 → 1.1.257-28941288.f09c2b35

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.
@@ -1183,7 +1183,7 @@ function cloneToJson(data) {
1183
1183
  try {
1184
1184
  return JSON.parse(JSON.stringify(data));
1185
1185
  }
1186
- catch (e) {
1186
+ catch (_) {
1187
1187
  return data;
1188
1188
  }
1189
1189
  }
@@ -1721,7 +1721,7 @@ async function loadStyle(href) {
1721
1721
  const res = await fetch(href);
1722
1722
  cssRules = await res.text();
1723
1723
  }
1724
- catch (e) {
1724
+ catch (_) {
1725
1725
  // pass
1726
1726
  }
1727
1727
  if (!cssRules)
@@ -2751,7 +2751,7 @@ function getLocalStore(key) {
2751
2751
  try {
2752
2752
  item = JSON.parse(itemJson);
2753
2753
  }
2754
- catch (e) {
2754
+ catch (_) {
2755
2755
  return;
2756
2756
  }
2757
2757
  if (item.val === undefined) {
@@ -5368,7 +5368,7 @@ function add_css$E(target) {
5368
5368
  append_styles(target, "svelte-9ixs0b", ".text-element-wrapper.svelte-9ixs0b.svelte-9ixs0b{position:relative;height:100%}.text-element.svelte-9ixs0b.svelte-9ixs0b{display:flex;position:relative;width:100%;height:100%;box-sizing:border-box;white-space:pre-wrap;margin:0px;padding:0px;border-width:0px;border-style:solid;border-color:#000000;overflow:hidden;font-size:12px;line-height:1.5}.text-link-element.svelte-9ixs0b.svelte-9ixs0b{text-decoration:none;color:inherit}.text-element-inner.svelte-9ixs0b.svelte-9ixs0b{width:100%;height:auto}.text-direction-vertical.svelte-9ixs0b.svelte-9ixs0b{writing-mode:vertical-rl}.text-direction-vertical.svelte-9ixs0b .text-element-inner.svelte-9ixs0b{width:auto;height:100%}.tooltip.svelte-9ixs0b.svelte-9ixs0b{display:none;position:absolute;bottom:-40px;left:50%;transform:translateX(-50%);color:#fff;background-color:#3d4948;white-space:nowrap;padding:4px 8px 4px 8px;border-radius:4px;font-size:12px;z-index:2147483647}.tooltip.svelte-9ixs0b.svelte-9ixs0b:before{content:'';position:absolute;top:-13px;left:50%;margin-left:-7px;border:7px solid transparent;border-bottom:7px solid #3d4948}.tooltip.show.svelte-9ixs0b.svelte-9ixs0b{display:block}.tooltip-error.svelte-9ixs0b.svelte-9ixs0b{background-color:#c00}.tooltip-error.svelte-9ixs0b.svelte-9ixs0b:before{border-bottom:7px solid #c00}");
5369
5369
  }
5370
5370
 
5371
- // (94:2) {:else}
5371
+ // (92:2) {:else}
5372
5372
  function create_else_block$2(ctx) {
5373
5373
  let div1;
5374
5374
  let div0;
@@ -5434,7 +5434,7 @@ function create_else_block$2(ctx) {
5434
5434
  };
5435
5435
  }
5436
5436
 
5437
- // (80:2) {#if enableCopy}
5437
+ // (78:2) {#if enableCopy}
5438
5438
  function create_if_block$a(ctx) {
5439
5439
  let a;
5440
5440
  let div0;
@@ -5653,7 +5653,7 @@ function instance$18($$self, $$props, $$invalidate) {
5653
5653
  }
5654
5654
 
5655
5655
  tooltipEl.classList.add('show');
5656
- } catch(err) {
5656
+ } catch(_) {
5657
5657
  tooltipErrorEl.classList.add('show');
5658
5658
  }
5659
5659
 
@@ -8868,7 +8868,7 @@ function instance$W($$self, $$props, $$invalidate) {
8868
8868
  const validationRegExp = (() => {
8869
8869
  try {
8870
8870
  return new RegExp(validation.pattern, validation.flags);
8871
- } catch(e) {
8871
+ } catch(_) {
8872
8872
  return undefined;
8873
8873
  }
8874
8874
  })();
@@ -12082,9 +12082,12 @@ const useInjectCustomizeCss = (props) => {
12082
12082
  document.head.appendChild(style);
12083
12083
  }
12084
12084
  return () => {
12085
- modalElement?.shadowRoot
12086
- ? modalElement.shadowRoot.removeChild(style)
12087
- : document.head.removeChild(style);
12085
+ if (modalElement?.shadowRoot) {
12086
+ modalElement.shadowRoot.removeChild(style);
12087
+ }
12088
+ else {
12089
+ document.head.removeChild(style);
12090
+ }
12088
12091
  };
12089
12092
  }
12090
12093
  onMount$1(() => {
@@ -17157,6 +17160,33 @@ class Slider extends SvelteComponent {
17157
17160
  }
17158
17161
  }
17159
17162
 
17163
+ const TEXT_THEME_STYLES = {
17164
+ default: {
17165
+ color: BRAND_KIT.colors.text_primary.main,
17166
+ },
17167
+ gray: {
17168
+ color: BRAND_KIT.colors.text_secondary.main,
17169
+ },
17170
+ brand: {
17171
+ color: BRAND_KIT.colors.brand.main,
17172
+ },
17173
+ success: {
17174
+ color: BRAND_KIT.colors.success.main,
17175
+ },
17176
+ warning: {
17177
+ color: BRAND_KIT.colors.warning.main,
17178
+ },
17179
+ danger: {
17180
+ color: BRAND_KIT.colors.danger.main,
17181
+ },
17182
+ info: {
17183
+ color: BRAND_KIT.colors.info.main,
17184
+ },
17185
+ white: {
17186
+ color: BRAND_KIT.colors.white.main,
17187
+ },
17188
+ };
17189
+
17160
17190
  const TEXT_VARIANTS = {
17161
17191
  size: {
17162
17192
  extra_small: {
@@ -17212,33 +17242,6 @@ const TEXT_VARIANTS = {
17212
17242
  },
17213
17243
  };
17214
17244
 
17215
- const TEXT_THEME_STYLES = {
17216
- default: {
17217
- color: BRAND_KIT.colors.text_primary.main,
17218
- },
17219
- gray: {
17220
- color: BRAND_KIT.colors.text_secondary.main,
17221
- },
17222
- brand: {
17223
- color: BRAND_KIT.colors.brand.main,
17224
- },
17225
- success: {
17226
- color: BRAND_KIT.colors.success.main,
17227
- },
17228
- warning: {
17229
- color: BRAND_KIT.colors.warning.main,
17230
- },
17231
- danger: {
17232
- color: BRAND_KIT.colors.danger.main,
17233
- },
17234
- info: {
17235
- color: BRAND_KIT.colors.info.main,
17236
- },
17237
- white: {
17238
- color: BRAND_KIT.colors.white.main,
17239
- },
17240
- };
17241
-
17242
17245
  /* src/components-flex/text/Text.svelte generated by Svelte v3.53.1 */
17243
17246
 
17244
17247
  function add_css$4(target) {
@@ -17302,14 +17305,35 @@ function instance$4($$self, $$props, $$invalidate) {
17302
17305
  addFont(props.fontFamily);
17303
17306
  }
17304
17307
 
17305
- const themeStyle = TEXT_THEME_STYLES[props.theme ?? 'default'];
17308
+ const getColor = () => {
17309
+ if (props.color) return props.color;
17310
+ if (props.theme) return TEXT_THEME_STYLES[props.theme].color;
17311
+ return undefined;
17312
+ };
17306
17313
 
17307
17314
  const getCssSize = () => {
17315
+ const getFontSize = () => {
17316
+ if (props.fontSize) return props.fontSize;
17317
+ if (props.size) return TEXT_VARIANTS.size[props.size].fontSize;
17318
+ return undefined;
17319
+ };
17320
+
17321
+ const getLineHeight = () => {
17322
+ if (props.lineHeight) return props.lineHeight;
17323
+ if (props.size) return TEXT_VARIANTS.size[props.size].lineHeight;
17324
+ return undefined;
17325
+ };
17326
+
17327
+ const getFontWeight = () => {
17328
+ if (props.fontWeight) return props.fontWeight;
17329
+ if (props.size) return TEXT_VARIANTS.size[props.size].fontWeight;
17330
+ return undefined;
17331
+ };
17332
+
17308
17333
  return {
17309
- fontSize: props.fontSize ?? TEXT_VARIANTS.size[props.size ?? 'medium'].fontSize,
17310
- lineHeight: props.lineHeight ?? TEXT_VARIANTS.size[props.size ?? 'medium'].lineHeight,
17311
- // @ts-ignore
17312
- fontWeight: props.fontWeight ?? (TEXT_VARIANTS.size[props.size ?? 'medium'].fontWeight ?? 'normal')
17334
+ fontSize: getFontSize(),
17335
+ lineHeight: getLineHeight(),
17336
+ fontWeight: getFontWeight()
17313
17337
  };
17314
17338
  };
17315
17339
 
@@ -17326,10 +17350,10 @@ function instance$4($$self, $$props, $$invalidate) {
17326
17350
  if ($$self.$$.dirty & /*props*/ 8) {
17327
17351
  $$invalidate(1, style = objToStyle({
17328
17352
  position: props?.position ?? 'static',
17329
- color: props.color ?? themeStyle.color,
17330
17353
  textAlign: props.align,
17331
17354
  width: props.width,
17332
17355
  fontFamily: props.fontFamily,
17356
+ color: getColor(),
17333
17357
  ...getCssSize(),
17334
17358
  ...toCssRadius(props),
17335
17359
  ...toCssBackgroundColor(props),
package/dist/index.es.js CHANGED
@@ -1158,7 +1158,7 @@ function cloneToJson(data) {
1158
1158
  try {
1159
1159
  return JSON.parse(JSON.stringify(data));
1160
1160
  }
1161
- catch (e) {
1161
+ catch (_) {
1162
1162
  return data;
1163
1163
  }
1164
1164
  }
@@ -1338,7 +1338,7 @@ function checkAndDo(checkFn, fn, ...conditionFns) {
1338
1338
  }
1339
1339
  if (!haveCondition || !checkFn(conditions, idx))
1340
1340
  return;
1341
- fn && fn();
1341
+ fn?.();
1342
1342
  };
1343
1343
  conditionFns.forEach((conditionFn, i) => {
1344
1344
  const checkAndDo = generageCheckAndDo(i);
@@ -1351,7 +1351,7 @@ function checkAndDo(checkFn, fn, ...conditionFns) {
1351
1351
  haveCondition = conditions.some(c => c !== null);
1352
1352
  const cleanupAll = () => {
1353
1353
  cleanups.forEach((cleanup, i) => {
1354
- cleanup && cleanup();
1354
+ cleanup?.();
1355
1355
  cleanups[i] = null;
1356
1356
  });
1357
1357
  };
@@ -1762,7 +1762,7 @@ async function loadStyle(href) {
1762
1762
  const res = await fetch(href);
1763
1763
  cssRules = await res.text();
1764
1764
  }
1765
- catch (e) {
1765
+ catch (_) {
1766
1766
  // pass
1767
1767
  }
1768
1768
  if (!cssRules)
@@ -2813,7 +2813,7 @@ function getLocalStore(key) {
2813
2813
  try {
2814
2814
  item = JSON.parse(itemJson);
2815
2815
  }
2816
- catch (e) {
2816
+ catch (_) {
2817
2817
  return;
2818
2818
  }
2819
2819
  if (item.val === undefined) {
@@ -5300,7 +5300,7 @@ function add_css$E(target) {
5300
5300
  append_styles(target, "svelte-9ixs0b", ".text-element-wrapper.svelte-9ixs0b.svelte-9ixs0b{position:relative;height:100%}.text-element.svelte-9ixs0b.svelte-9ixs0b{display:flex;position:relative;width:100%;height:100%;box-sizing:border-box;white-space:pre-wrap;margin:0px;padding:0px;border-width:0px;border-style:solid;border-color:#000000;overflow:hidden;font-size:12px;line-height:1.5}.text-link-element.svelte-9ixs0b.svelte-9ixs0b{text-decoration:none;color:inherit}.text-element-inner.svelte-9ixs0b.svelte-9ixs0b{width:100%;height:auto}.text-direction-vertical.svelte-9ixs0b.svelte-9ixs0b{writing-mode:vertical-rl}.text-direction-vertical.svelte-9ixs0b .text-element-inner.svelte-9ixs0b{width:auto;height:100%}.tooltip.svelte-9ixs0b.svelte-9ixs0b{display:none;position:absolute;bottom:-40px;left:50%;transform:translateX(-50%);color:#fff;background-color:#3d4948;white-space:nowrap;padding:4px 8px 4px 8px;border-radius:4px;font-size:12px;z-index:2147483647}.tooltip.svelte-9ixs0b.svelte-9ixs0b:before{content:'';position:absolute;top:-13px;left:50%;margin-left:-7px;border:7px solid transparent;border-bottom:7px solid #3d4948}.tooltip.show.svelte-9ixs0b.svelte-9ixs0b{display:block}.tooltip-error.svelte-9ixs0b.svelte-9ixs0b{background-color:#c00}.tooltip-error.svelte-9ixs0b.svelte-9ixs0b:before{border-bottom:7px solid #c00}");
5301
5301
  }
5302
5302
 
5303
- // (94:2) {:else}
5303
+ // (92:2) {:else}
5304
5304
  function create_else_block$2(ctx) {
5305
5305
  let div1;
5306
5306
  let div0;
@@ -5353,7 +5353,7 @@ function create_else_block$2(ctx) {
5353
5353
  };
5354
5354
  }
5355
5355
 
5356
- // (80:2) {#if enableCopy}
5356
+ // (78:2) {#if enableCopy}
5357
5357
  function create_if_block$a(ctx) {
5358
5358
  let a;
5359
5359
  let div0;
@@ -5535,7 +5535,7 @@ function instance$18($$self, $$props, $$invalidate) {
5535
5535
  }
5536
5536
 
5537
5537
  tooltipEl.classList.add('show');
5538
- } catch(err) {
5538
+ } catch(_) {
5539
5539
  tooltipErrorEl.classList.add('show');
5540
5540
  }
5541
5541
 
@@ -8462,7 +8462,7 @@ function instance$W($$self, $$props, $$invalidate) {
8462
8462
  const validationRegExp = (() => {
8463
8463
  try {
8464
8464
  return new RegExp(validation.pattern, validation.flags);
8465
- } catch(e) {
8465
+ } catch(_) {
8466
8466
  return undefined;
8467
8467
  }
8468
8468
  })();
@@ -11428,9 +11428,12 @@ const useInjectCustomizeCss = (props) => {
11428
11428
  document.head.appendChild(style);
11429
11429
  }
11430
11430
  return () => {
11431
- modalElement?.shadowRoot
11432
- ? modalElement.shadowRoot.removeChild(style)
11433
- : document.head.removeChild(style);
11431
+ if (modalElement?.shadowRoot) {
11432
+ modalElement.shadowRoot.removeChild(style);
11433
+ }
11434
+ else {
11435
+ document.head.removeChild(style);
11436
+ }
11434
11437
  };
11435
11438
  }
11436
11439
  onMount$1(() => {
@@ -15879,6 +15882,33 @@ class Slider extends SvelteComponent {
15879
15882
  }
15880
15883
  }
15881
15884
 
15885
+ const TEXT_THEME_STYLES = {
15886
+ default: {
15887
+ color: BRAND_KIT.colors.text_primary.main,
15888
+ },
15889
+ gray: {
15890
+ color: BRAND_KIT.colors.text_secondary.main,
15891
+ },
15892
+ brand: {
15893
+ color: BRAND_KIT.colors.brand.main,
15894
+ },
15895
+ success: {
15896
+ color: BRAND_KIT.colors.success.main,
15897
+ },
15898
+ warning: {
15899
+ color: BRAND_KIT.colors.warning.main,
15900
+ },
15901
+ danger: {
15902
+ color: BRAND_KIT.colors.danger.main,
15903
+ },
15904
+ info: {
15905
+ color: BRAND_KIT.colors.info.main,
15906
+ },
15907
+ white: {
15908
+ color: BRAND_KIT.colors.white.main,
15909
+ },
15910
+ };
15911
+
15882
15912
  const TEXT_VARIANTS = {
15883
15913
  size: {
15884
15914
  extra_small: {
@@ -15934,33 +15964,6 @@ const TEXT_VARIANTS = {
15934
15964
  },
15935
15965
  };
15936
15966
 
15937
- const TEXT_THEME_STYLES = {
15938
- default: {
15939
- color: BRAND_KIT.colors.text_primary.main,
15940
- },
15941
- gray: {
15942
- color: BRAND_KIT.colors.text_secondary.main,
15943
- },
15944
- brand: {
15945
- color: BRAND_KIT.colors.brand.main,
15946
- },
15947
- success: {
15948
- color: BRAND_KIT.colors.success.main,
15949
- },
15950
- warning: {
15951
- color: BRAND_KIT.colors.warning.main,
15952
- },
15953
- danger: {
15954
- color: BRAND_KIT.colors.danger.main,
15955
- },
15956
- info: {
15957
- color: BRAND_KIT.colors.info.main,
15958
- },
15959
- white: {
15960
- color: BRAND_KIT.colors.white.main,
15961
- },
15962
- };
15963
-
15964
15967
  /* src/components-flex/text/Text.svelte generated by Svelte v3.53.1 */
15965
15968
 
15966
15969
  function add_css$4(target) {
@@ -16010,14 +16013,35 @@ function instance$4($$self, $$props, $$invalidate) {
16010
16013
  addFont(props.fontFamily);
16011
16014
  }
16012
16015
 
16013
- const themeStyle = TEXT_THEME_STYLES[props.theme ?? 'default'];
16016
+ const getColor = () => {
16017
+ if (props.color) return props.color;
16018
+ if (props.theme) return TEXT_THEME_STYLES[props.theme].color;
16019
+ return undefined;
16020
+ };
16014
16021
 
16015
16022
  const getCssSize = () => {
16023
+ const getFontSize = () => {
16024
+ if (props.fontSize) return props.fontSize;
16025
+ if (props.size) return TEXT_VARIANTS.size[props.size].fontSize;
16026
+ return undefined;
16027
+ };
16028
+
16029
+ const getLineHeight = () => {
16030
+ if (props.lineHeight) return props.lineHeight;
16031
+ if (props.size) return TEXT_VARIANTS.size[props.size].lineHeight;
16032
+ return undefined;
16033
+ };
16034
+
16035
+ const getFontWeight = () => {
16036
+ if (props.fontWeight) return props.fontWeight;
16037
+ if (props.size) return TEXT_VARIANTS.size[props.size].fontWeight;
16038
+ return undefined;
16039
+ };
16040
+
16016
16041
  return {
16017
- fontSize: props.fontSize ?? TEXT_VARIANTS.size[props.size ?? 'medium'].fontSize,
16018
- lineHeight: props.lineHeight ?? TEXT_VARIANTS.size[props.size ?? 'medium'].lineHeight,
16019
- // @ts-ignore
16020
- fontWeight: props.fontWeight ?? (TEXT_VARIANTS.size[props.size ?? 'medium'].fontWeight ?? 'normal')
16042
+ fontSize: getFontSize(),
16043
+ lineHeight: getLineHeight(),
16044
+ fontWeight: getFontWeight()
16021
16045
  };
16022
16046
  };
16023
16047
 
@@ -16034,10 +16058,10 @@ function instance$4($$self, $$props, $$invalidate) {
16034
16058
  if ($$self.$$.dirty & /*props*/ 8) {
16035
16059
  $$invalidate(1, style = objToStyle({
16036
16060
  position: props?.position ?? 'static',
16037
- color: props.color ?? themeStyle.color,
16038
16061
  textAlign: props.align,
16039
16062
  width: props.width,
16040
16063
  fontFamily: props.fontFamily,
16064
+ color: getColor(),
16041
16065
  ...getCssSize(),
16042
16066
  ...toCssRadius(props),
16043
16067
  ...toCssBackgroundColor(props),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plaidev/karte-action-sdk",
3
- "version": "1.1.257-28896909.eadc4994",
3
+ "version": "1.1.257-28941288.f09c2b35",
4
4
  "author": "Plaid Inc.",
5
5
  "license": "Apache-2.0",
6
6
  "module": "./dist/index.es.js",