@plaidev/karte-action-sdk 1.1.238-28697831.6177a2a4 → 1.1.238-28698168.190b390b

Sign up to get free protection for your applications and to get access to all the features.
@@ -2469,6 +2469,9 @@ type ButtonProps = CommonProps & {
2469
2469
  iconAngle?: keyof typeof BUTTON_ICON_ANGLE;
2470
2470
  width?: Properties["width"];
2471
2471
  wrap?: "wrap" | "nowrap";
2472
+ fontWeight?: Properties["fontWeight"];
2473
+ fontColor?: Properties["color"];
2474
+ backgroundColor?: Properties["backgroundColor"];
2472
2475
  };
2473
2476
  declare const TEXT_BUTTON_SIZE: {
2474
2477
  readonly extra_small: "XSmall";
@@ -14182,7 +14182,7 @@ function add_css$7(target) {
14182
14182
  append_styles(target, "svelte-bo01kn", ".button.svelte-bo01kn{display:inline-flex;align-content:center;justify-content:center;gap:0.65em;cursor:pointer;outline:0;transition:background-color 0.12s, border-color 0.12s, color 0.12s}.button-icon.svelte-bo01kn{display:flex;align-items:center;justify-content:center;margin-left:-0.2em;margin-right:-0.2em}");
14183
14183
  }
14184
14184
 
14185
- // (127:2) {#if (props.isIcon && props.iconVariant)}
14185
+ // (134:2) {#if (props.isIcon && props.iconVariant)}
14186
14186
  function create_if_block$3(ctx) {
14187
14187
  let div;
14188
14188
  let icon;
@@ -14440,6 +14440,20 @@ function instance$7($$self, $$props, $$invalidate) {
14440
14440
  }
14441
14441
  };
14442
14442
 
14443
+ const getCssColor = () => {
14444
+ return {
14445
+ backgroundColor: props.backgroundColor
14446
+ ? props.backgroundColor
14447
+ : VARIANTS.color[props.color ?? 'default'].backgroundColor,
14448
+ color: props.fontColor
14449
+ ? props.fontColor
14450
+ : VARIANTS.color[props.color ?? 'default'].color,
14451
+ fontWeight: props.fontWeight
14452
+ ? props.fontWeight
14453
+ : VARIANTS.color[props.color ?? 'default'].fontWeight
14454
+ };
14455
+ };
14456
+
14443
14457
  function handleClick() {
14444
14458
  if (eventName) {
14445
14459
  send_event(eventName, eventValue);
@@ -14468,12 +14482,12 @@ function instance$7($$self, $$props, $$invalidate) {
14468
14482
  transition: 'background-color 0.12s, border-color 0.12s, color 0.12s',
14469
14483
  width: props.width,
14470
14484
  ...VARIANTS.size[props.size ?? 'medium'],
14471
- ...VARIANTS.color[props.color ?? 'default'],
14472
14485
  ...VARIANTS.wrap[props.wrap ?? 'nowrap'],
14473
14486
  ...VARIANTS.round[props.round ?? 'default'],
14474
14487
  ...props.iconAngle
14475
14488
  ? { flexDirection: props.iconAngle }
14476
14489
  : {},
14490
+ ...getCssColor(),
14477
14491
  ...toCssCommon(props)
14478
14492
  }));
14479
14493
  }
@@ -15638,11 +15652,10 @@ function create_if_block_2(ctx) {
15638
15652
 
15639
15653
  // (267:0) {#if visible}
15640
15654
  function create_if_block(ctx) {
15641
- let div1;
15655
+ let div;
15642
15656
  let t;
15643
- let div0;
15644
- let div1_class_value;
15645
- let div1_intro;
15657
+ let div_class_value;
15658
+ let div_intro;
15646
15659
  let current;
15647
15660
  let if_block = /*closable*/ ctx[16] && create_if_block_1(ctx);
15648
15661
  const default_slot_template = /*#slots*/ ctx[30].default;
@@ -15650,48 +15663,43 @@ function create_if_block(ctx) {
15650
15663
 
15651
15664
  return {
15652
15665
  c() {
15653
- div1 = element("div");
15666
+ div = element("div");
15654
15667
  if (if_block) if_block.c();
15655
15668
  t = space();
15656
- div0 = element("div");
15657
15669
  if (default_slot) default_slot.c();
15658
15670
  this.h();
15659
15671
  },
15660
15672
  l(nodes) {
15661
- div1 = claim_element(nodes, "DIV", {
15673
+ div = claim_element(nodes, "DIV", {
15662
15674
  class: true,
15663
15675
  role: true,
15664
15676
  "aria-modal": true,
15665
15677
  style: true
15666
15678
  });
15667
15679
 
15668
- var div1_nodes = children(div1);
15669
- if (if_block) if_block.l(div1_nodes);
15670
- t = claim_space(div1_nodes);
15671
- div0 = claim_element(div1_nodes, "DIV", {});
15672
- var div0_nodes = children(div0);
15673
- if (default_slot) default_slot.l(div0_nodes);
15674
- div0_nodes.forEach(detach);
15675
- div1_nodes.forEach(detach);
15680
+ var div_nodes = children(div);
15681
+ if (if_block) if_block.l(div_nodes);
15682
+ t = claim_space(div_nodes);
15683
+ if (default_slot) default_slot.l(div_nodes);
15684
+ div_nodes.forEach(detach);
15676
15685
  this.h();
15677
15686
  },
15678
15687
  h() {
15679
- attr(div1, "class", div1_class_value = "" + (null_to_empty(['modal', /*useBreakPoint*/ ctx[0] ? 'modal-bp' : ''].join(' ')) + " svelte-1ks2ecq"));
15680
- attr(div1, "role", "dialog");
15681
- attr(div1, "aria-modal", "true");
15682
- attr(div1, "style", Array.from(/*modalStyles*/ ctx[18]).join(';'));
15688
+ attr(div, "class", div_class_value = "" + (null_to_empty(['modal', /*useBreakPoint*/ ctx[0] ? 'modal-bp' : ''].join(' ')) + " svelte-1ks2ecq"));
15689
+ attr(div, "role", "dialog");
15690
+ attr(div, "aria-modal", "true");
15691
+ attr(div, "style", Array.from(/*modalStyles*/ ctx[18]).join(';'));
15683
15692
  },
15684
15693
  m(target, anchor) {
15685
- insert_hydration(target, div1, anchor);
15686
- if (if_block) if_block.m(div1, null);
15687
- append_hydration(div1, t);
15688
- append_hydration(div1, div0);
15694
+ insert_hydration(target, div, anchor);
15695
+ if (if_block) if_block.m(div, null);
15696
+ append_hydration(div, t);
15689
15697
 
15690
15698
  if (default_slot) {
15691
- default_slot.m(div0, null);
15699
+ default_slot.m(div, null);
15692
15700
  }
15693
15701
 
15694
- /*div1_binding*/ ctx[31](div1);
15702
+ /*div_binding*/ ctx[31](div);
15695
15703
  current = true;
15696
15704
  },
15697
15705
  p(new_ctx, dirty) {
@@ -15708,7 +15716,7 @@ function create_if_block(ctx) {
15708
15716
  if_block = create_if_block_1(ctx);
15709
15717
  if_block.c();
15710
15718
  transition_in(if_block, 1);
15711
- if_block.m(div1, t);
15719
+ if_block.m(div, t);
15712
15720
  }
15713
15721
  } else if (if_block) {
15714
15722
  group_outros();
@@ -15735,8 +15743,8 @@ function create_if_block(ctx) {
15735
15743
  }
15736
15744
  }
15737
15745
 
15738
- if (!current || dirty[0] & /*useBreakPoint*/ 1 && div1_class_value !== (div1_class_value = "" + (null_to_empty(['modal', /*useBreakPoint*/ ctx[0] ? 'modal-bp' : ''].join(' ')) + " svelte-1ks2ecq"))) {
15739
- attr(div1, "class", div1_class_value);
15746
+ if (!current || dirty[0] & /*useBreakPoint*/ 1 && div_class_value !== (div_class_value = "" + (null_to_empty(['modal', /*useBreakPoint*/ ctx[0] ? 'modal-bp' : ''].join(' ')) + " svelte-1ks2ecq"))) {
15747
+ attr(div, "class", div_class_value);
15740
15748
  }
15741
15749
  },
15742
15750
  i(local) {
@@ -15744,14 +15752,14 @@ function create_if_block(ctx) {
15744
15752
  transition_in(if_block);
15745
15753
  transition_in(default_slot, local);
15746
15754
 
15747
- if (!div1_intro) {
15755
+ if (!div_intro) {
15748
15756
  add_render_callback(() => {
15749
- div1_intro = create_in_transition(div1, customAnimation, {
15757
+ div_intro = create_in_transition(div, customAnimation, {
15750
15758
  transforms: /*transforms*/ ctx[6],
15751
15759
  animationStyle: /*animation*/ ctx[1]
15752
15760
  });
15753
15761
 
15754
- div1_intro.start();
15762
+ div_intro.start();
15755
15763
  });
15756
15764
  }
15757
15765
 
@@ -15763,10 +15771,10 @@ function create_if_block(ctx) {
15763
15771
  current = false;
15764
15772
  },
15765
15773
  d(detaching) {
15766
- if (detaching) detach(div1);
15774
+ if (detaching) detach(div);
15767
15775
  if (if_block) if_block.d();
15768
15776
  if (default_slot) default_slot.d(detaching);
15769
- /*div1_binding*/ ctx[31](null);
15777
+ /*div_binding*/ ctx[31](null);
15770
15778
  }
15771
15779
  };
15772
15780
  }
@@ -16005,7 +16013,7 @@ function instance($$self, $$props, $$invalidate) {
16005
16013
 
16006
16014
  onDestroy$1(() => setPreviousFocus());
16007
16015
 
16008
- function div1_binding($$value) {
16016
+ function div_binding($$value) {
16009
16017
  binding_callbacks[$$value ? 'unshift' : 'push'](() => {
16010
16018
  modal = $$value;
16011
16019
  $$invalidate(10, modal);
@@ -16225,7 +16233,7 @@ function instance($$self, $$props, $$invalidate) {
16225
16233
  close,
16226
16234
  $$scope,
16227
16235
  slots,
16228
- div1_binding
16236
+ div_binding
16229
16237
  ];
16230
16238
  }
16231
16239
 
@@ -2469,6 +2469,9 @@ type ButtonProps = CommonProps & {
2469
2469
  iconAngle?: keyof typeof BUTTON_ICON_ANGLE;
2470
2470
  width?: Properties["width"];
2471
2471
  wrap?: "wrap" | "nowrap";
2472
+ fontWeight?: Properties["fontWeight"];
2473
+ fontColor?: Properties["color"];
2474
+ backgroundColor?: Properties["backgroundColor"];
2472
2475
  };
2473
2476
  declare const TEXT_BUTTON_SIZE: {
2474
2477
  readonly extra_small: "XSmall";
package/dist/index.es.js CHANGED
@@ -13168,7 +13168,7 @@ function add_css$7(target) {
13168
13168
  append_styles(target, "svelte-bo01kn", ".button.svelte-bo01kn{display:inline-flex;align-content:center;justify-content:center;gap:0.65em;cursor:pointer;outline:0;transition:background-color 0.12s, border-color 0.12s, color 0.12s}.button-icon.svelte-bo01kn{display:flex;align-items:center;justify-content:center;margin-left:-0.2em;margin-right:-0.2em}");
13169
13169
  }
13170
13170
 
13171
- // (127:2) {#if (props.isIcon && props.iconVariant)}
13171
+ // (134:2) {#if (props.isIcon && props.iconVariant)}
13172
13172
  function create_if_block$3(ctx) {
13173
13173
  let div;
13174
13174
  let icon;
@@ -13396,6 +13396,20 @@ function instance$7($$self, $$props, $$invalidate) {
13396
13396
  }
13397
13397
  };
13398
13398
 
13399
+ const getCssColor = () => {
13400
+ return {
13401
+ backgroundColor: props.backgroundColor
13402
+ ? props.backgroundColor
13403
+ : VARIANTS.color[props.color ?? 'default'].backgroundColor,
13404
+ color: props.fontColor
13405
+ ? props.fontColor
13406
+ : VARIANTS.color[props.color ?? 'default'].color,
13407
+ fontWeight: props.fontWeight
13408
+ ? props.fontWeight
13409
+ : VARIANTS.color[props.color ?? 'default'].fontWeight
13410
+ };
13411
+ };
13412
+
13399
13413
  function handleClick() {
13400
13414
  if (eventName) {
13401
13415
  send_event(eventName, eventValue);
@@ -13424,12 +13438,12 @@ function instance$7($$self, $$props, $$invalidate) {
13424
13438
  transition: 'background-color 0.12s, border-color 0.12s, color 0.12s',
13425
13439
  width: props.width,
13426
13440
  ...VARIANTS.size[props.size ?? 'medium'],
13427
- ...VARIANTS.color[props.color ?? 'default'],
13428
13441
  ...VARIANTS.wrap[props.wrap ?? 'nowrap'],
13429
13442
  ...VARIANTS.round[props.round ?? 'default'],
13430
13443
  ...props.iconAngle
13431
13444
  ? { flexDirection: props.iconAngle }
13432
13445
  : {},
13446
+ ...getCssColor(),
13433
13447
  ...toCssCommon(props)
13434
13448
  }));
13435
13449
  }
@@ -14470,11 +14484,10 @@ function create_if_block_2(ctx) {
14470
14484
 
14471
14485
  // (267:0) {#if visible}
14472
14486
  function create_if_block(ctx) {
14473
- let div1;
14487
+ let div;
14474
14488
  let t;
14475
- let div0;
14476
- let div1_class_value;
14477
- let div1_intro;
14489
+ let div_class_value;
14490
+ let div_intro;
14478
14491
  let current;
14479
14492
  let if_block = /*closable*/ ctx[16] && create_if_block_1(ctx);
14480
14493
  const default_slot_template = /*#slots*/ ctx[30].default;
@@ -14482,27 +14495,25 @@ function create_if_block(ctx) {
14482
14495
 
14483
14496
  return {
14484
14497
  c() {
14485
- div1 = element("div");
14498
+ div = element("div");
14486
14499
  if (if_block) if_block.c();
14487
14500
  t = space();
14488
- div0 = element("div");
14489
14501
  if (default_slot) default_slot.c();
14490
- attr(div1, "class", div1_class_value = "" + (null_to_empty(['modal', /*useBreakPoint*/ ctx[0] ? 'modal-bp' : ''].join(' ')) + " svelte-1ks2ecq"));
14491
- attr(div1, "role", "dialog");
14492
- attr(div1, "aria-modal", "true");
14493
- attr(div1, "style", Array.from(/*modalStyles*/ ctx[18]).join(';'));
14502
+ attr(div, "class", div_class_value = "" + (null_to_empty(['modal', /*useBreakPoint*/ ctx[0] ? 'modal-bp' : ''].join(' ')) + " svelte-1ks2ecq"));
14503
+ attr(div, "role", "dialog");
14504
+ attr(div, "aria-modal", "true");
14505
+ attr(div, "style", Array.from(/*modalStyles*/ ctx[18]).join(';'));
14494
14506
  },
14495
14507
  m(target, anchor) {
14496
- insert(target, div1, anchor);
14497
- if (if_block) if_block.m(div1, null);
14498
- append(div1, t);
14499
- append(div1, div0);
14508
+ insert(target, div, anchor);
14509
+ if (if_block) if_block.m(div, null);
14510
+ append(div, t);
14500
14511
 
14501
14512
  if (default_slot) {
14502
- default_slot.m(div0, null);
14513
+ default_slot.m(div, null);
14503
14514
  }
14504
14515
 
14505
- /*div1_binding*/ ctx[31](div1);
14516
+ /*div_binding*/ ctx[31](div);
14506
14517
  current = true;
14507
14518
  },
14508
14519
  p(new_ctx, dirty) {
@@ -14519,7 +14530,7 @@ function create_if_block(ctx) {
14519
14530
  if_block = create_if_block_1(ctx);
14520
14531
  if_block.c();
14521
14532
  transition_in(if_block, 1);
14522
- if_block.m(div1, t);
14533
+ if_block.m(div, t);
14523
14534
  }
14524
14535
  } else if (if_block) {
14525
14536
  group_outros();
@@ -14546,8 +14557,8 @@ function create_if_block(ctx) {
14546
14557
  }
14547
14558
  }
14548
14559
 
14549
- if (!current || dirty[0] & /*useBreakPoint*/ 1 && div1_class_value !== (div1_class_value = "" + (null_to_empty(['modal', /*useBreakPoint*/ ctx[0] ? 'modal-bp' : ''].join(' ')) + " svelte-1ks2ecq"))) {
14550
- attr(div1, "class", div1_class_value);
14560
+ if (!current || dirty[0] & /*useBreakPoint*/ 1 && div_class_value !== (div_class_value = "" + (null_to_empty(['modal', /*useBreakPoint*/ ctx[0] ? 'modal-bp' : ''].join(' ')) + " svelte-1ks2ecq"))) {
14561
+ attr(div, "class", div_class_value);
14551
14562
  }
14552
14563
  },
14553
14564
  i(local) {
@@ -14555,14 +14566,14 @@ function create_if_block(ctx) {
14555
14566
  transition_in(if_block);
14556
14567
  transition_in(default_slot, local);
14557
14568
 
14558
- if (!div1_intro) {
14569
+ if (!div_intro) {
14559
14570
  add_render_callback(() => {
14560
- div1_intro = create_in_transition(div1, customAnimation, {
14571
+ div_intro = create_in_transition(div, customAnimation, {
14561
14572
  transforms: /*transforms*/ ctx[6],
14562
14573
  animationStyle: /*animation*/ ctx[1]
14563
14574
  });
14564
14575
 
14565
- div1_intro.start();
14576
+ div_intro.start();
14566
14577
  });
14567
14578
  }
14568
14579
 
@@ -14574,10 +14585,10 @@ function create_if_block(ctx) {
14574
14585
  current = false;
14575
14586
  },
14576
14587
  d(detaching) {
14577
- if (detaching) detach(div1);
14588
+ if (detaching) detach(div);
14578
14589
  if (if_block) if_block.d();
14579
14590
  if (default_slot) default_slot.d(detaching);
14580
- /*div1_binding*/ ctx[31](null);
14591
+ /*div_binding*/ ctx[31](null);
14581
14592
  }
14582
14593
  };
14583
14594
  }
@@ -14800,7 +14811,7 @@ function instance($$self, $$props, $$invalidate) {
14800
14811
 
14801
14812
  onDestroy$1(() => setPreviousFocus());
14802
14813
 
14803
- function div1_binding($$value) {
14814
+ function div_binding($$value) {
14804
14815
  binding_callbacks[$$value ? 'unshift' : 'push'](() => {
14805
14816
  modal = $$value;
14806
14817
  $$invalidate(10, modal);
@@ -15049,7 +15060,7 @@ function instance($$self, $$props, $$invalidate) {
15049
15060
  close,
15050
15061
  $$scope,
15051
15062
  slots,
15052
- div1_binding
15063
+ div_binding
15053
15064
  ];
15054
15065
  }
15055
15066
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plaidev/karte-action-sdk",
3
- "version": "1.1.238-28697831.6177a2a4",
3
+ "version": "1.1.238-28698168.190b390b",
4
4
  "author": "Plaid Inc.",
5
5
  "license": "Apache-2.0",
6
6
  "module": "./dist/index.es.js",