@plaidev/karte-action-sdk 1.1.260-28971692.91de26ce → 1.1.260-28976393.2b8b0962

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  import { writable, get } from 'svelte/store';
2
- import { onMount as onMount$1, onDestroy as onDestroy$1, beforeUpdate as beforeUpdate$1, afterUpdate as afterUpdate$1, tick as tick$1, setContext, getContext, createEventDispatcher } from 'svelte';
2
+ import { onMount as onMount$1, onDestroy as onDestroy$1, beforeUpdate as beforeUpdate$1, afterUpdate as afterUpdate$1, tick as tick$1, getContext, setContext, createEventDispatcher } from 'svelte';
3
3
  import { SvelteComponent, init, safe_not_equal, element, claim_element, children, detach, insert_hydration, noop, component_subscribe, attr, create_slot, create_component, space, claim_component, claim_space, mount_component, update_slot_base, get_all_dirty_from_scope, get_slot_changes, transition_in, transition_out, destroy_component, append_styles, empty, group_outros, check_outros, null_to_empty, listen, assign, set_attributes, toggle_class, get_spread_update, prevent_default, is_function, add_render_callback, create_in_transition, binding_callbacks, set_style, svg_element, claim_svg_element, append_hydration, destroy_each, text, claim_text, set_data, src_url_equal, set_store_value, run_all, HtmlTagHydration, claim_html_tag, construct_svelte_component, subscribe, set_custom_element_data_map } from 'svelte/internal';
4
4
  import 'svelte/easing';
5
5
 
@@ -2950,6 +2950,38 @@ class Header extends SvelteComponent {
2950
2950
  }
2951
2951
  }
2952
2952
 
2953
+ const BRAND_KIT_DEFAULT = {
2954
+ font_family: 'sans-serif, serif, monospace, system-ui',
2955
+ color_text_primary: '#222222',
2956
+ color_text_secondary: '#555555',
2957
+ color_brand: '#33403e',
2958
+ color_link: '#1558d6',
2959
+ color_danger: '#f44336',
2960
+ color_warning: '#ffa726',
2961
+ color_success: '#10b981',
2962
+ color_info: '#29b6f6',
2963
+ color_white: '#FFFFFF',
2964
+ };
2965
+ const getBrandKit = (customBrandKit) => {
2966
+ return {
2967
+ font_family: customBrandKit?.font_family ?? BRAND_KIT_DEFAULT.font_family,
2968
+ color_text_primary: customBrandKit?.color_text_primary ?? BRAND_KIT_DEFAULT.color_text_primary,
2969
+ color_text_secondary: customBrandKit?.color_text_secondary ?? BRAND_KIT_DEFAULT.color_text_secondary,
2970
+ color_brand: customBrandKit?.color_brand ?? BRAND_KIT_DEFAULT.color_brand,
2971
+ color_link: customBrandKit?.color_link ?? BRAND_KIT_DEFAULT.color_link,
2972
+ color_danger: customBrandKit?.color_danger ?? BRAND_KIT_DEFAULT.color_danger,
2973
+ color_warning: customBrandKit?.color_warning ?? BRAND_KIT_DEFAULT.color_warning,
2974
+ color_success: customBrandKit?.color_success ?? BRAND_KIT_DEFAULT.color_success,
2975
+ color_info: customBrandKit?.color_info ?? BRAND_KIT_DEFAULT.color_info,
2976
+ color_white: customBrandKit?.color_white ?? BRAND_KIT_DEFAULT.color_white,
2977
+ };
2978
+ };
2979
+ const useBrandKit = () => {
2980
+ return {
2981
+ brandKit: (getContext('brandKit') || getBrandKit()),
2982
+ };
2983
+ };
2984
+
2953
2985
  /* src/components/State.svelte generated by Svelte v3.53.1 */
2954
2986
 
2955
2987
  function create_fragment$1g(ctx) {
@@ -2957,8 +2989,8 @@ function create_fragment$1g(ctx) {
2957
2989
  let t;
2958
2990
  let current;
2959
2991
  header = new Header({});
2960
- const default_slot_template = /*#slots*/ ctx[1].default;
2961
- const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[0], null);
2992
+ const default_slot_template = /*#slots*/ ctx[2].default;
2993
+ const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[1], null);
2962
2994
 
2963
2995
  return {
2964
2996
  c() {
@@ -2983,15 +3015,15 @@ function create_fragment$1g(ctx) {
2983
3015
  },
2984
3016
  p(ctx, [dirty]) {
2985
3017
  if (default_slot) {
2986
- if (default_slot.p && (!current || dirty & /*$$scope*/ 1)) {
3018
+ if (default_slot.p && (!current || dirty & /*$$scope*/ 2)) {
2987
3019
  update_slot_base(
2988
3020
  default_slot,
2989
3021
  default_slot_template,
2990
3022
  ctx,
2991
- /*$$scope*/ ctx[0],
3023
+ /*$$scope*/ ctx[1],
2992
3024
  !current
2993
- ? get_all_dirty_from_scope(/*$$scope*/ ctx[0])
2994
- : get_slot_changes(default_slot_template, /*$$scope*/ ctx[0], dirty, null),
3025
+ ? get_all_dirty_from_scope(/*$$scope*/ ctx[1])
3026
+ : get_slot_changes(default_slot_template, /*$$scope*/ ctx[1], dirty, null),
2995
3027
  null
2996
3028
  );
2997
3029
  }
@@ -3018,18 +3050,21 @@ function create_fragment$1g(ctx) {
3018
3050
 
3019
3051
  function instance$1g($$self, $$props, $$invalidate) {
3020
3052
  let { $$slots: slots = {}, $$scope } = $$props;
3053
+ let { customBrandKit = undefined } = $$props;
3054
+ setContext('brandKit', getBrandKit(customBrandKit));
3021
3055
 
3022
3056
  $$self.$$set = $$props => {
3023
- if ('$$scope' in $$props) $$invalidate(0, $$scope = $$props.$$scope);
3057
+ if ('customBrandKit' in $$props) $$invalidate(0, customBrandKit = $$props.customBrandKit);
3058
+ if ('$$scope' in $$props) $$invalidate(1, $$scope = $$props.$$scope);
3024
3059
  };
3025
3060
 
3026
- return [$$scope, slots];
3061
+ return [customBrandKit, $$scope, slots];
3027
3062
  }
3028
3063
 
3029
3064
  class State extends SvelteComponent {
3030
3065
  constructor(options) {
3031
3066
  super();
3032
- init(this, options, instance$1g, create_fragment$1g, safe_not_equal, {});
3067
+ init(this, options, instance$1g, create_fragment$1g, safe_not_equal, { customBrandKit: 0 });
3033
3068
  }
3034
3069
  }
3035
3070
 
@@ -11941,6 +11976,23 @@ const ROUND_VARIANT = {
11941
11976
  fulled: 'Full (100%)',
11942
11977
  };
11943
11978
 
11979
+ const AVATAR_SIZE = {
11980
+ extra_small: 'XS(48 x 48)',
11981
+ small: 'S(64 x 64)',
11982
+ medium: 'M(88 x 88)',
11983
+ large: 'L(108 x 108)',
11984
+ extra_large: 'XL(128 x 128)',
11985
+ };
11986
+ const AVATAR_SHAPE = {
11987
+ circle: 'サークル',
11988
+ square: 'スクエア',
11989
+ rounded: 'ラウンド',
11990
+ };
11991
+ const avatarPropsDefault = {
11992
+ size: 'medium',
11993
+ shape: 'circle',
11994
+ };
11995
+
11944
11996
  const toHyphenCase = (str) => {
11945
11997
  let result = str.replace(/_/g, '-');
11946
11998
  result = result.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
@@ -12106,13 +12158,36 @@ const useInjectCustomizeCss = (props) => {
12106
12158
  });
12107
12159
  };
12108
12160
 
12161
+ const AVATAR_SIZE_STYLES = {
12162
+ extra_small: {
12163
+ width: '48px',
12164
+ height: '48px',
12165
+ },
12166
+ small: {
12167
+ width: '64px',
12168
+ height: '64px',
12169
+ },
12170
+ medium: {
12171
+ width: '88px',
12172
+ height: '88px',
12173
+ },
12174
+ large: {
12175
+ width: '108px',
12176
+ height: '108px',
12177
+ },
12178
+ extra_large: {
12179
+ width: '128px',
12180
+ height: '128px',
12181
+ },
12182
+ };
12183
+
12109
12184
  /* src/components-flex/avatar/Avatar.svelte generated by Svelte v3.53.1 */
12110
12185
 
12111
12186
  function add_css$d(target) {
12112
- append_styles(target, "svelte-1vk223g", ".avatar.svelte-1vk223g{display:flex;align-items:center;justify-content:center;overflow:hidden;flex-shrink:0}");
12187
+ append_styles(target, "svelte-1krsdyx", ".avatar.svelte-1krsdyx{display:flex;align-items:center;justify-content:center;overflow:hidden;flex-shrink:0;border:0}");
12113
12188
  }
12114
12189
 
12115
- // (35:0) <svelte:element {...attributes} this={element} class="avatar" style={style} data-layer-id={layerId} on:click={handleClick} >
12190
+ // (42:0) <svelte:element {...attributes} this={element} class="avatar" style={style} data-layer-id={layerId} on:click={handleClick} >
12116
12191
  function create_dynamic_element$8(ctx) {
12117
12192
  let svelte_element;
12118
12193
  let img;
@@ -12161,7 +12236,7 @@ function create_dynamic_element$8(ctx) {
12161
12236
  },
12162
12237
  h() {
12163
12238
  if (!src_url_equal(img.src, img_src_value = /*props*/ ctx[0].image)) attr(img, "src", img_src_value);
12164
- attr(img, "class", "avatar-image svelte-1vk223g");
12239
+ attr(img, "class", "avatar-image svelte-1krsdyx");
12165
12240
  attr(img, "alt", img_alt_value = /*props*/ ctx[0].alt);
12166
12241
  attr(img, "style", /*imgStyle*/ ctx[2]);
12167
12242
 
@@ -12171,7 +12246,7 @@ function create_dynamic_element$8(ctx) {
12171
12246
  set_attributes(svelte_element, svelte_element_data);
12172
12247
  }
12173
12248
 
12174
- toggle_class(svelte_element, "svelte-1vk223g", true);
12249
+ toggle_class(svelte_element, "svelte-1krsdyx", true);
12175
12250
  },
12176
12251
  m(target, anchor) {
12177
12252
  insert_hydration(target, svelte_element, anchor);
@@ -12208,7 +12283,7 @@ function create_dynamic_element$8(ctx) {
12208
12283
  set_attributes(svelte_element, svelte_element_data);
12209
12284
  }
12210
12285
 
12211
- toggle_class(svelte_element, "svelte-1vk223g", true);
12286
+ toggle_class(svelte_element, "svelte-1krsdyx", true);
12212
12287
  },
12213
12288
  d(detaching) {
12214
12289
  if (detaching) detach(svelte_element);
@@ -12274,15 +12349,21 @@ function instance$I($$self, $$props, $$invalidate) {
12274
12349
  useInjectCustomizeCss(props);
12275
12350
  const { attributes, element, handleClick } = useClickable(props);
12276
12351
 
12352
+ const avatarSizeStyle = !isNaN(Number(props.size))
12353
+ ? {
12354
+ width: `${props.size}px`,
12355
+ height: `${props.size}px`
12356
+ }
12357
+ : AVATAR_SIZE_STYLES[props.size] || AVATAR_SIZE_STYLES[avatarPropsDefault.size];
12358
+
12277
12359
  const VARIANTS = {
12278
12360
  shape: {
12279
12361
  circle: { borderRadius: '100%' },
12280
- square: { borderRadius: '4px' }
12362
+ square: { borderRadius: '0.25em' },
12363
+ rounded: { borderRadius: '1em' }
12281
12364
  }
12282
12365
  };
12283
12366
 
12284
- const size = props.size ?? 64;
12285
-
12286
12367
  $$self.$$set = $$props => {
12287
12368
  if ('props' in $$props) $$invalidate(0, props = $$props.props);
12288
12369
  if ('layerId' in $$props) $$invalidate(1, layerId = $$props.layerId);
@@ -12291,9 +12372,9 @@ function instance$I($$self, $$props, $$invalidate) {
12291
12372
  $$self.$$.update = () => {
12292
12373
  if ($$self.$$.dirty & /*props*/ 1) {
12293
12374
  $$invalidate(3, style = objToStyle({
12294
- width: `${size}px`,
12295
- height: `${size}px`,
12296
12375
  ...VARIANTS.shape[props.shape ?? 'square'],
12376
+ width: props.width ?? avatarSizeStyle.width,
12377
+ height: props.height ?? avatarSizeStyle.height,
12297
12378
  ...toCssCommon(props),
12298
12379
  ...toCssBorder(props)
12299
12380
  }));
@@ -12316,18 +12397,6 @@ class Avatar extends SvelteComponent {
12316
12397
  }
12317
12398
  }
12318
12399
 
12319
- const AVATAR_SIZE = {
12320
- extra_small: 'XS(48 x 48)',
12321
- small: 'S(64 x 64)',
12322
- medium: 'M(88 x 88)',
12323
- large: 'L(108 x 108)',
12324
- extra_large: 'XL(128 x 128)',
12325
- };
12326
- const AVATAR_SHAPE = {
12327
- circle: 'サークル',
12328
- square: 'スクエア',
12329
- };
12330
-
12331
12400
  const BUTTON_SIZE = {
12332
12401
  extra_small: 'XSmall',
12333
12402
  small: 'Small',
@@ -14606,39 +14675,43 @@ class Icon extends SvelteComponent {
14606
14675
  }
14607
14676
  }
14608
14677
 
14609
- const BRAND_KIT = {
14610
- fontFamily: 'sans-serif, serif, monospace, system-ui',
14611
- colors: {
14612
- text_primary: {
14613
- main: '#222222',
14614
- },
14615
- text_secondary: {
14616
- main: '#555555',
14617
- },
14618
- brand: {
14619
- main: '#33403e',
14620
- },
14621
- link: {
14622
- main: '#1558d6',
14623
- },
14624
- danger: {
14625
- main: '#f44336',
14626
- },
14627
- warning: {
14628
- main: '#ffa726',
14629
- },
14630
- success: {
14631
- main: '#10b981',
14632
- },
14633
- info: {
14634
- main: '#29b6f6',
14635
- },
14636
- white: {
14637
- main: '#FFFFFF',
14638
- },
14639
- },
14678
+ const getPropStyles = (callback) => {
14679
+ return (customBrandKit) => {
14680
+ const brandKit = getBrandKit(customBrandKit);
14681
+ return callback({ brandKit });
14682
+ };
14640
14683
  };
14641
14684
 
14685
+ const getButtonThemeStyles = getPropStyles(({ brandKit }) => ({
14686
+ default: {
14687
+ backgroundColor: brandKit.color_brand,
14688
+ color: '#FFFFFF',
14689
+ },
14690
+ general: {
14691
+ backgroundColor: '#e8e8e8',
14692
+ color: 'rgba(0, 16, 14, 0.7)',
14693
+ },
14694
+ success: {
14695
+ backgroundColor: brandKit.color_success,
14696
+ color: '#ffffff',
14697
+ },
14698
+ warning: {
14699
+ backgroundColor: brandKit.color_warning,
14700
+ color: '#ffffff',
14701
+ },
14702
+ danger: {
14703
+ backgroundColor: brandKit.color_danger,
14704
+ color: '#FFFFFF',
14705
+ },
14706
+ info: {
14707
+ backgroundColor: brandKit.color_info,
14708
+ color: '#FFFFFF',
14709
+ },
14710
+ white: {
14711
+ backgroundColor: '#FFFFFF',
14712
+ color: brandKit.color_text_primary,
14713
+ },
14714
+ }));
14642
14715
  const BUTTON_SIZE_STYLES = {
14643
14716
  extra_small: {
14644
14717
  height: '32px',
@@ -14671,35 +14744,37 @@ const BUTTON_SIZE_STYLES = {
14671
14744
  fontSize: '16px',
14672
14745
  },
14673
14746
  };
14674
- const BUTTON_THEME_STYLES = {
14675
- default: {
14676
- backgroundColor: BRAND_KIT.colors.brand.main,
14677
- color: '#FFFFFF',
14678
- },
14679
- general: {
14680
- backgroundColor: '#e8e8e8',
14681
- color: 'rgba(0, 16, 14, 0.7)',
14682
- },
14683
- success: {
14684
- backgroundColor: BRAND_KIT.colors.success.main,
14685
- color: '#ffffff',
14686
- },
14687
- warning: {
14688
- backgroundColor: BRAND_KIT.colors.warning.main,
14689
- color: '#ffffff',
14690
- },
14691
- danger: {
14692
- backgroundColor: BRAND_KIT.colors.danger.main,
14693
- color: '#FFFFFF',
14694
- },
14695
- info: {
14696
- backgroundColor: BRAND_KIT.colors.info.main,
14697
- color: '#FFFFFF',
14698
- },
14699
- white: {
14700
- backgroundColor: '#FFFFFF',
14701
- color: BRAND_KIT.colors.text_primary.main,
14702
- },
14747
+ const BUTTON_THEME_STYLES = () => {
14748
+ return {
14749
+ default: {
14750
+ backgroundColor: getBrandKit().color_brand,
14751
+ color: '#FFFFFF',
14752
+ },
14753
+ general: {
14754
+ backgroundColor: '#e8e8e8',
14755
+ color: 'rgba(0, 16, 14, 0.7)',
14756
+ },
14757
+ success: {
14758
+ backgroundColor: getBrandKit().color_success,
14759
+ color: '#ffffff',
14760
+ },
14761
+ warning: {
14762
+ backgroundColor: getBrandKit().color_warning,
14763
+ color: '#ffffff',
14764
+ },
14765
+ danger: {
14766
+ backgroundColor: getBrandKit().color_danger,
14767
+ color: '#FFFFFF',
14768
+ },
14769
+ info: {
14770
+ backgroundColor: getBrandKit().color_info,
14771
+ color: '#FFFFFF',
14772
+ },
14773
+ white: {
14774
+ backgroundColor: '#FFFFFF',
14775
+ color: getBrandKit().color_text_primary,
14776
+ },
14777
+ };
14703
14778
  };
14704
14779
  const BUTTON_ROUND_STYLES = {
14705
14780
  none: {
@@ -14773,7 +14848,7 @@ function add_css$b(target) {
14773
14848
  append_styles(target, "svelte-1ix4ul", ".button.svelte-1ix4ul{display:inline-flex;gap:0.65em;align-items:center;justify-content:center;text-decoration:none;outline:0;border:0;line-height:1.5;transition:background-color 0.12s, border-color 0.12s, color 0.12s;cursor:pointer;background-color:var(--bg-color)}.button.svelte-1ix4ul:hover{background-color:var(--hover-bg-color)}.button-icon.svelte-1ix4ul{display:flex;align-items:center;justify-content:center;margin-left:-0.2em;margin-right:-0.2em;margin-bottom:0.1em}");
14774
14849
  }
14775
14850
 
14776
- // (49:2) {#if props.isIcon && props.iconVariant}
14851
+ // (52:2) {#if props.isIcon && props.iconVariant}
14777
14852
  function create_if_block$6(ctx) {
14778
14853
  let div;
14779
14854
  let icon;
@@ -14839,7 +14914,7 @@ function create_if_block$6(ctx) {
14839
14914
  };
14840
14915
  }
14841
14916
 
14842
- // (41:0) <svelte:element {...attributes} this={element} class="button" style={style} data-layer-id={layerId} on:click={handleClick} >
14917
+ // (44:0) <svelte:element {...attributes} this={element} class="button" style={style} data-layer-id={layerId} on:click={handleClick} >
14843
14918
  function create_dynamic_element$6(ctx) {
14844
14919
  let svelte_element;
14845
14920
  let t0;
@@ -15030,7 +15105,9 @@ function instance$b($$self, $$props, $$invalidate) {
15030
15105
  let { layerId = '' } = $$props;
15031
15106
  useInjectCustomizeCss(props);
15032
15107
  const { attributes, element, handleClick } = useClickable(props);
15033
- const buttonThemeStyle = BUTTON_THEME_STYLES[props.theme] || BUTTON_THEME_STYLES[buttonPropsDefault.theme];
15108
+ const { brandKit } = useBrandKit();
15109
+ const buttonThemeStyles = getButtonThemeStyles(brandKit);
15110
+ const buttonThemeStyle = buttonThemeStyles[props.theme] || buttonThemeStyles[buttonPropsDefault.theme];
15034
15111
  const buttonSizeStyle = BUTTON_SIZE_STYLES[props.size] || BUTTON_SIZE_STYLES[buttonPropsDefault.size];
15035
15112
 
15036
15113
  $$self.$$set = $$props => {
@@ -15128,35 +15205,35 @@ const BUTTON_OUTLINED_SIZE_STYLES = {
15128
15205
  fontSize: '16px',
15129
15206
  },
15130
15207
  };
15131
- const BUTTON_OUTLINED_THEME_STYLES = {
15208
+ const getButtonOutlinedThemeStyles = getPropStyles(({ brandKit }) => ({
15132
15209
  default: {
15133
- color: BRAND_KIT.colors.brand.main,
15134
- borderColor: BRAND_KIT.colors.brand.main,
15210
+ color: brandKit.color_brand,
15211
+ borderColor: brandKit.color_brand,
15135
15212
  backgroundColor: '#FFFFFF',
15136
15213
  },
15137
15214
  general: {
15138
- color: BRAND_KIT.colors.text_secondary.main,
15139
- borderColor: BRAND_KIT.colors.text_secondary.main,
15215
+ color: brandKit.color_text_secondary,
15216
+ borderColor: brandKit.color_text_secondary,
15140
15217
  backgroundColor: '#FFFFFF',
15141
15218
  },
15142
15219
  success: {
15143
- color: BRAND_KIT.colors.success.main,
15144
- borderColor: BRAND_KIT.colors.success.main,
15220
+ color: brandKit.color_success,
15221
+ borderColor: brandKit.color_success,
15145
15222
  backgroundColor: '#FFFFFF',
15146
15223
  },
15147
15224
  warning: {
15148
- color: BRAND_KIT.colors.warning.main,
15149
- borderColor: BRAND_KIT.colors.warning.main,
15225
+ color: brandKit.color_warning,
15226
+ borderColor: brandKit.color_warning,
15150
15227
  backgroundColor: '#FFFFFF',
15151
15228
  },
15152
15229
  danger: {
15153
- color: BRAND_KIT.colors.danger.main,
15154
- borderColor: BRAND_KIT.colors.danger.main,
15230
+ color: brandKit.color_danger,
15231
+ borderColor: brandKit.color_danger,
15155
15232
  backgroundColor: '#FFFFFF',
15156
15233
  },
15157
15234
  info: {
15158
- color: BRAND_KIT.colors.info.main,
15159
- borderColor: BRAND_KIT.colors.info.main,
15235
+ color: brandKit.color_info,
15236
+ borderColor: brandKit.color_info,
15160
15237
  backgroundColor: '#FFFFFF',
15161
15238
  },
15162
15239
  white: {
@@ -15164,7 +15241,7 @@ const BUTTON_OUTLINED_THEME_STYLES = {
15164
15241
  borderColor: '#FFFFFF',
15165
15242
  backgroundColor: '#000000',
15166
15243
  },
15167
- };
15244
+ }));
15168
15245
  const BUTTON_OUTLINED_ROUND_STYLES = {
15169
15246
  none: {
15170
15247
  borderRadius: 0,
@@ -15191,7 +15268,7 @@ function add_css$a(target) {
15191
15268
  append_styles(target, "svelte-38fju1", ".button-outlined.svelte-38fju1{display:inline-flex;gap:0.65em;align-items:center;justify-content:center;text-decoration:none;outline:0;border-width:1px;border-style:solid;line-height:1.5;transition:background-color 0.12s, border-color 0.12s, color 0.12s;cursor:pointer;background-color:var(--bg-color)}.button-outlined.svelte-38fju1:hover{background-color:var(--hover-bg-color)}.button-outlined-icon.svelte-38fju1{display:flex;align-items:center;justify-content:center;margin-left:-0.2em;margin-right:-0.2em;margin-bottom:0.1em}");
15192
15269
  }
15193
15270
 
15194
- // (50:2) {#if props.isIcon && props.iconVariant}
15271
+ // (53:2) {#if props.isIcon && props.iconVariant}
15195
15272
  function create_if_block$5(ctx) {
15196
15273
  let div;
15197
15274
  let icon;
@@ -15257,7 +15334,7 @@ function create_if_block$5(ctx) {
15257
15334
  };
15258
15335
  }
15259
15336
 
15260
- // (42:0) <svelte:element {...attributes} this={element} class="button-outlined" style={style} data-layer-id={layerId} on:click={handleClick} >
15337
+ // (45:0) <svelte:element {...attributes} this={element} class="button-outlined" style={style} data-layer-id={layerId} on:click={handleClick} >
15261
15338
  function create_dynamic_element$5(ctx) {
15262
15339
  let svelte_element;
15263
15340
  let t0;
@@ -15447,8 +15524,10 @@ function instance$a($$self, $$props, $$invalidate) {
15447
15524
  let { props = {} } = $$props;
15448
15525
  let { layerId = '' } = $$props;
15449
15526
  useInjectCustomizeCss(props);
15527
+ const { brandKit } = useBrandKit();
15450
15528
  const { attributes, element, handleClick } = useClickable(props);
15451
- const buttonThemeStyle = BUTTON_OUTLINED_THEME_STYLES[props.theme ?? buttonOutlinedPropsDefault.theme];
15529
+ const buttonThemeStyles = getButtonOutlinedThemeStyles(brandKit);
15530
+ const buttonThemeStyle = buttonThemeStyles[props.theme ?? buttonOutlinedPropsDefault.theme];
15452
15531
  const buttonSizeStyle = BUTTON_OUTLINED_SIZE_STYLES[props.size ?? buttonOutlinedPropsDefault.size];
15453
15532
 
15454
15533
  $$self.$$set = $$props => {
@@ -15526,40 +15605,40 @@ const BUTTON_TEXT_SIZE_STYLES = {
15526
15605
  fontSize: '16px',
15527
15606
  },
15528
15607
  };
15529
- const BUTTON_TEXT_THEME_STYLES = {
15608
+ const getButtonTextThemeStyles = getPropStyles(({ brandKit }) => ({
15530
15609
  default: {
15531
15610
  backgroundColor: '#f3f4f6',
15532
- color: BRAND_KIT.colors.brand.main,
15611
+ color: brandKit.color_brand,
15533
15612
  },
15534
15613
  link: {
15535
15614
  backgroundColor: '#f3f4f6',
15536
- color: BRAND_KIT.colors.link.main,
15615
+ color: brandKit.color_link,
15537
15616
  },
15538
15617
  general: {
15539
15618
  backgroundColor: '#f3f4f6',
15540
- color: BRAND_KIT.colors.text_primary.main,
15619
+ color: brandKit.color_text_primary,
15541
15620
  },
15542
15621
  success: {
15543
15622
  backgroundColor: '#f3f4f6',
15544
- color: BRAND_KIT.colors.success.main,
15623
+ color: brandKit.color_success,
15545
15624
  },
15546
15625
  warning: {
15547
15626
  backgroundColor: '#f3f4f6',
15548
- color: BRAND_KIT.colors.warning.main,
15627
+ color: brandKit.color_warning,
15549
15628
  },
15550
15629
  danger: {
15551
15630
  backgroundColor: '#f3f4f6',
15552
- color: BRAND_KIT.colors.danger.main,
15631
+ color: brandKit.color_danger,
15553
15632
  },
15554
15633
  info: {
15555
15634
  backgroundColor: '#f3f4f6',
15556
- color: BRAND_KIT.colors.info.main,
15635
+ color: brandKit.color_info,
15557
15636
  },
15558
15637
  white: {
15559
15638
  backgroundColor: '#f3f4f6',
15560
- color: BRAND_KIT.colors.white.main,
15639
+ color: brandKit.color_white,
15561
15640
  },
15562
- };
15641
+ }));
15563
15642
 
15564
15643
  /* src/components-flex/button-text/ButtonText.svelte generated by Svelte v3.53.1 */
15565
15644
 
@@ -15567,7 +15646,7 @@ function add_css$9(target) {
15567
15646
  append_styles(target, "svelte-1xgvp8r", ".button-text.svelte-1xgvp8r{display:inline-flex;gap:0.65em;align-items:center;justify-content:center;text-decoration:none;outline:0;border:0;line-height:1.5;transition:background-color 0.12s, border-color 0.12s, color 0.12s;cursor:pointer;background-color:rgba(255, 255, 255, 0)}.button-text.svelte-1xgvp8r:hover{background-color:var(--hover-bg-color)}.button-text-icon.svelte-1xgvp8r{display:flex;align-items:center;justify-content:center;margin-left:-0.2em;margin-right:-0.2em}");
15568
15647
  }
15569
15648
 
15570
- // (46:2) {#if props.isIcon && props.iconVariant}
15649
+ // (49:2) {#if props.isIcon && props.iconVariant}
15571
15650
  function create_if_block$4(ctx) {
15572
15651
  let div;
15573
15652
  let icon;
@@ -15633,7 +15712,7 @@ function create_if_block$4(ctx) {
15633
15712
  };
15634
15713
  }
15635
15714
 
15636
- // (38:0) <svelte:element {...attributes} this={element} class="button-text" style={style} data-layer-id={layerId} on:click={handleClick} >
15715
+ // (41:0) <svelte:element {...attributes} this={element} class="button-text" style={style} data-layer-id={layerId} on:click={handleClick} >
15637
15716
  function create_dynamic_element$4(ctx) {
15638
15717
  let svelte_element;
15639
15718
  let t0;
@@ -15823,8 +15902,10 @@ function instance$9($$self, $$props, $$invalidate) {
15823
15902
  let { props = {} } = $$props;
15824
15903
  let { layerId = '' } = $$props;
15825
15904
  useInjectCustomizeCss(props);
15905
+ const { brandKit } = useBrandKit();
15826
15906
  const { attributes, element, handleClick } = useClickable(props);
15827
- const buttonThemeStyle = BUTTON_TEXT_THEME_STYLES[props.theme ?? 'default'];
15907
+ const themeStyles = getButtonTextThemeStyles(brandKit);
15908
+ const buttonThemeStyle = themeStyles[props.theme ?? 'default'];
15828
15909
  const buttonSizeStyle = BUTTON_TEXT_SIZE_STYLES[props.size ?? 'medium'];
15829
15910
 
15830
15911
  $$self.$$set = $$props => {
@@ -17166,32 +17247,32 @@ class Slider extends SvelteComponent {
17166
17247
  }
17167
17248
  }
17168
17249
 
17169
- const TEXT_THEME_STYLES = {
17250
+ const getTextThemeStyles = getPropStyles(({ brandKit }) => ({
17170
17251
  default: {
17171
- color: BRAND_KIT.colors.text_primary.main,
17252
+ color: brandKit.color_text_primary,
17172
17253
  },
17173
17254
  gray: {
17174
- color: BRAND_KIT.colors.text_secondary.main,
17255
+ color: brandKit.color_text_secondary,
17175
17256
  },
17176
17257
  brand: {
17177
- color: BRAND_KIT.colors.brand.main,
17258
+ color: brandKit.color_brand,
17178
17259
  },
17179
17260
  success: {
17180
- color: BRAND_KIT.colors.success.main,
17261
+ color: brandKit.color_success,
17181
17262
  },
17182
17263
  warning: {
17183
- color: BRAND_KIT.colors.warning.main,
17264
+ color: brandKit.color_warning,
17184
17265
  },
17185
17266
  danger: {
17186
- color: BRAND_KIT.colors.danger.main,
17267
+ color: brandKit.color_danger,
17187
17268
  },
17188
17269
  info: {
17189
- color: BRAND_KIT.colors.info.main,
17270
+ color: brandKit.color_info,
17190
17271
  },
17191
17272
  white: {
17192
- color: BRAND_KIT.colors.white.main,
17273
+ color: brandKit.color_white,
17193
17274
  },
17194
- };
17275
+ }));
17195
17276
 
17196
17277
  const TEXT_VARIANTS = {
17197
17278
  size: {
@@ -17306,6 +17387,8 @@ function instance$4($$self, $$props, $$invalidate) {
17306
17387
  let { props = { content: '' } } = $$props;
17307
17388
  let { layerId = '' } = $$props;
17308
17389
  useInjectCustomizeCss(props);
17390
+ const { brandKit } = useBrandKit();
17391
+ const themeStyles = getTextThemeStyles(brandKit);
17309
17392
 
17310
17393
  if (props.fontFamily) {
17311
17394
  addFont(props.fontFamily);
@@ -17313,7 +17396,7 @@ function instance$4($$self, $$props, $$invalidate) {
17313
17396
 
17314
17397
  const getColor = () => {
17315
17398
  if (props.color) return props.color;
17316
- if (props.theme) return TEXT_THEME_STYLES[props.theme].color;
17399
+ if (props.theme) return themeStyles[props.theme].color;
17317
17400
  return undefined;
17318
17401
  };
17319
17402
 
@@ -17421,26 +17504,26 @@ const TEXT_LINK_SIZE_STYLES = {
17421
17504
  fontSize: '16px',
17422
17505
  },
17423
17506
  };
17424
- const TEXT_LINK_THEME_STYLES = {
17507
+ const getTextLinkThemeStyles = getPropStyles(({ brandKit }) => ({
17425
17508
  default: {
17426
- color: BRAND_KIT.colors.text_primary.main,
17509
+ color: brandKit.color_text_primary,
17427
17510
  },
17428
17511
  link: {
17429
- color: BRAND_KIT.colors.link.main,
17512
+ color: brandKit.color_link,
17430
17513
  },
17431
17514
  brand: {
17432
- color: BRAND_KIT.colors.brand.main,
17515
+ color: brandKit.color_brand,
17433
17516
  },
17434
17517
  alert: {
17435
- color: BRAND_KIT.colors.danger.main,
17518
+ color: brandKit.color_danger,
17436
17519
  },
17437
17520
  gray: {
17438
- color: BRAND_KIT.colors.text_secondary.main,
17521
+ color: brandKit.color_text_secondary,
17439
17522
  },
17440
17523
  white: {
17441
- color: BRAND_KIT.colors.white.main,
17524
+ color: brandKit.color_white,
17442
17525
  },
17443
- };
17526
+ }));
17444
17527
 
17445
17528
  /* src/components-flex/text-link/TextLink.svelte generated by Svelte v3.53.1 */
17446
17529
 
@@ -17448,7 +17531,7 @@ function add_css$3(target) {
17448
17531
  append_styles(target, "svelte-1y4hh01", ".link.svelte-1y4hh01{-webkit-appearance:none;border:0;background:none;padding:0}.link.svelte-1y4hh01,.link.svelte-1y4hh01:visited,.link.svelte-1y4hh01:link{color:var(--color)}.link.svelte-1y4hh01:hover{color:var(--hover-color)}.link.svelte-1y4hh01:active{color:var(--active-color)}.link.underline-hover-on.svelte-1y4hh01{text-decoration:none}.link.underline-hover-on.svelte-1y4hh01:hover{text-decoration:underline}.link.underline-hover-off.svelte-1y4hh01{text-decoration:underline}.link.underline-hover-off.svelte-1y4hh01:hover{text-decoration:none}.link.underline-on.svelte-1y4hh01{text-decoration:underline}.link.underline-off.svelte-1y4hh01{text-decoration:none}");
17449
17532
  }
17450
17533
 
17451
- // (69:2) {#if props.isIcon && props.iconVariant}
17534
+ // (71:2) {#if props.isIcon && props.iconVariant}
17452
17535
  function create_if_block$2(ctx) {
17453
17536
  let icon;
17454
17537
  let current;
@@ -17502,7 +17585,7 @@ function create_if_block$2(ctx) {
17502
17585
  };
17503
17586
  }
17504
17587
 
17505
- // (61:0) <svelte:element {...attributes} this={element} class={`link ${underlineClass}`} style={style} data-layer-id={layerId} on:click={handleClick} >
17588
+ // (63:0) <svelte:element {...attributes} this={element} class={`link ${underlineClass}`} style={style} data-layer-id={layerId} on:click={handleClick} >
17506
17589
  function create_dynamic_element(ctx) {
17507
17590
  let svelte_element;
17508
17591
  let t;
@@ -17689,8 +17772,10 @@ function instance$3($$self, $$props, $$invalidate) {
17689
17772
  let { props = { label: '' } } = $$props;
17690
17773
  let { layerId = '' } = $$props;
17691
17774
  useInjectCustomizeCss(props);
17775
+ const { brandKit } = useBrandKit();
17692
17776
  const { attributes, element, handleClick } = useClickable({ ...props, element: 'span' });
17693
- const themeStyle = TEXT_LINK_THEME_STYLES[props.theme ?? 'link'];
17777
+ const themeStyles = getTextLinkThemeStyles(brandKit);
17778
+ const themeStyle = themeStyles[props.theme ?? 'link'];
17694
17779
  const sizeStyle = TEXT_LINK_SIZE_STYLES[props.size ?? 'medium'];
17695
17780
 
17696
17781
  const underlineClass = (() => {
@@ -18684,4 +18769,4 @@ const ROUND_STYLES = {
18684
18769
  },
18685
18770
  };
18686
18771
 
18687
- export { ACTION_HOOK_LABEL, AVATAR_SHAPE, AVATAR_SIZE, Alignments, AnimationStyles, BRAND_KIT, BUTTON_ICON_ANGLE, BUTTON_LINK_TARGET, BUTTON_OUTLINED_ROUND_STYLES, BUTTON_OUTLINED_SIZE_STYLES, BUTTON_OUTLINED_THEME_STYLES, BUTTON_OUTLINED_WRAP_STYLES, BUTTON_ROUND, BUTTON_ROUND_STYLES, BUTTON_SIZE, BUTTON_SIZE_STYLES, BUTTON_TEXT_SIZE, BUTTON_TEXT_SIZE_STYLES, BUTTON_TEXT_THEME, BUTTON_TEXT_THEME_STYLES, BUTTON_THEME, BUTTON_THEME_STYLES, BUTTON_WRAP_STYLES, BackgroundSizes, Box, CLOSE_BUTTON_LABEL_PLACEMENT, CLOSE_BUTTON_PLACEMENT, CLOSE_BUTTON_ROUND, ClipPaths, CodeElement, Countdown, Cursors, DefaultEdgePosition, DefaultElasticity, DefaultFormButtonColor, DefaultFormIdentifyBooleanField, DefaultFormIdentifyTextField, DefaultListBackground, DefaultListBackgroundNone, DefaultListBackgroundStripe, DefaultListSeparator, DefaultListSeparatorBorder, DefaultListSeparatorGap, DefaultListSeparatorNone, DefaultModalBreakPoint, DefaultModalPlacement, DefaultSlideButton, DefaultSlideNavigationButton, Directions, Elasticities, ElasticityStyle, EmbedElement, Flex, Avatar as FlexAvatar, Button as FlexButton, ButtonOutlined as FlexButtonOutlined, ButtonText as FlexButtonText, CloseButton as FlexCloseButton, Code as FlexCode, FlexDirections, Icon as FlexIcon, Image as FlexImage, FlexItem, Layout as FlexLayout, Modal as FlexModal, Slider as FlexSlider, Text as FlexText, TextLink as FlexTextLink, Fonts, FormCheckBoxes, FormIdentifyBooleanFields, FormIdentifyChoices, FormIdentifyInput, FormIdentifyTextFieldPlaceholders, FormIdentifyTextFieldValidations, FormIdentifyTextFields, FormRadioButtons, FormRatingButtonsFace, FormRatingButtonsNumber, FormSelect, FormTextarea, Grid, GridItem, GridModalState, ICON_SIZE, ICON_SIZE_STYLES, ICON_VARIANTS, IconElement, ImageBlock, ImageElement, Justifies, KARTE_MODAL_ROOT, LAYER_TEXT_SIZE, LAYOUT_ALIGN, LAYOUT_COMPONENT_NAMES, LAYOUT_DIRECTION, LAYOUT_DISPLAY_TYPE, LAYOUT_JUSTIFY, LengthUnits, List, ListBackgroundTypes, ListDirections, ListItem, ListSeparatorTypes, MediaQueries, Modal$1 as Modal, ModalPositions, MovieVimeoElement, MovieYouTubeElement, ObjectFits, OnClickOperationOptions, Overflows, PropTypes, ROUND_STYLES, ROUND_VARIANT, Repeats, SHADOW_STYLES, SHADOW_VARIANT, SYSTEM_FONT, Slide, SlideItem, State, StateItem, TEXT_LINK_SIZE, TEXT_LINK_SIZE_STYLES, TEXT_LINK_THEME, TEXT_LINK_THEME_STYLES, TEXT_LINK_UNDERLINE, TEXT_STYLE, TEXT_THEME, TEXT_THEME_STYLES, TEXT_VARIANTS, TextBlock, TextButtonBlock, TextButtonElement, TextDirections, TextElement, WritingModes, addChoiceAnswer, addFreeAnswer, afterUpdate, applyCss, applyGlobalCss, beforeUpdate, buttonOutlinedPropsDefault, buttonPropsDefault, close, closeAction, collection$1 as collection, create, createApp, createFog, destroy, destroyAction, ensureModalRoot, eventHandlers, finalize, formData, getActionRoot, getAnsweredQuestion, getAnsweredQuestionIds, getCssVariables, getEventHandlers, getEvents, getLogs, getState$1 as getState, getStates, getSystem, getVariables, hideOnScroll, hideOnTime, initialize, isOpened, listenLogger, loadActionTable, loadActionTableQuery, loadActionTableRow, loadActionTableRows, loadGlobalScript, loadGlobalStyle, loadStyle, logger, onChangeState, onClose, onCreate, onDestory, onDestroy, onMount, onScroll, onShow, onTime, removeAnswer, resetEventHandlers, resetVariables, sendAnswer, sendAnswers, setEventHandlers, setSetting, setState$1 as setState, setVariables, show, showAction, showModal, showOnScroll, showOnTime, state, tick, variables, widget };
18772
+ export { ACTION_HOOK_LABEL, AVATAR_SHAPE, AVATAR_SIZE, AVATAR_SIZE_STYLES, Alignments, AnimationStyles, BUTTON_ICON_ANGLE, BUTTON_LINK_TARGET, BUTTON_OUTLINED_ROUND_STYLES, BUTTON_OUTLINED_SIZE_STYLES, BUTTON_OUTLINED_WRAP_STYLES, BUTTON_ROUND, BUTTON_ROUND_STYLES, BUTTON_SIZE, BUTTON_SIZE_STYLES, BUTTON_TEXT_SIZE, BUTTON_TEXT_SIZE_STYLES, BUTTON_TEXT_THEME, BUTTON_THEME, BUTTON_THEME_STYLES, BUTTON_WRAP_STYLES, BackgroundSizes, Box, CLOSE_BUTTON_LABEL_PLACEMENT, CLOSE_BUTTON_PLACEMENT, CLOSE_BUTTON_ROUND, ClipPaths, CodeElement, Countdown, Cursors, DefaultEdgePosition, DefaultElasticity, DefaultFormButtonColor, DefaultFormIdentifyBooleanField, DefaultFormIdentifyTextField, DefaultListBackground, DefaultListBackgroundNone, DefaultListBackgroundStripe, DefaultListSeparator, DefaultListSeparatorBorder, DefaultListSeparatorGap, DefaultListSeparatorNone, DefaultModalBreakPoint, DefaultModalPlacement, DefaultSlideButton, DefaultSlideNavigationButton, Directions, Elasticities, ElasticityStyle, EmbedElement, Flex, Avatar as FlexAvatar, Button as FlexButton, ButtonOutlined as FlexButtonOutlined, ButtonText as FlexButtonText, CloseButton as FlexCloseButton, Code as FlexCode, FlexDirections, Icon as FlexIcon, Image as FlexImage, FlexItem, Layout as FlexLayout, Modal as FlexModal, Slider as FlexSlider, Text as FlexText, TextLink as FlexTextLink, Fonts, FormCheckBoxes, FormIdentifyBooleanFields, FormIdentifyChoices, FormIdentifyInput, FormIdentifyTextFieldPlaceholders, FormIdentifyTextFieldValidations, FormIdentifyTextFields, FormRadioButtons, FormRatingButtonsFace, FormRatingButtonsNumber, FormSelect, FormTextarea, Grid, GridItem, GridModalState, ICON_SIZE, ICON_SIZE_STYLES, ICON_VARIANTS, IconElement, ImageBlock, ImageElement, Justifies, KARTE_MODAL_ROOT, LAYER_TEXT_SIZE, LAYOUT_ALIGN, LAYOUT_COMPONENT_NAMES, LAYOUT_DIRECTION, LAYOUT_DISPLAY_TYPE, LAYOUT_JUSTIFY, LengthUnits, List, ListBackgroundTypes, ListDirections, ListItem, ListSeparatorTypes, MediaQueries, Modal$1 as Modal, ModalPositions, MovieVimeoElement, MovieYouTubeElement, ObjectFits, OnClickOperationOptions, Overflows, PropTypes, ROUND_STYLES, ROUND_VARIANT, Repeats, SHADOW_STYLES, SHADOW_VARIANT, SYSTEM_FONT, Slide, SlideItem, State, StateItem, TEXT_LINK_SIZE, TEXT_LINK_SIZE_STYLES, TEXT_LINK_THEME, TEXT_LINK_UNDERLINE, TEXT_STYLE, TEXT_THEME, TEXT_VARIANTS, TextBlock, TextButtonBlock, TextButtonElement, TextDirections, TextElement, WritingModes, addChoiceAnswer, addFreeAnswer, afterUpdate, applyCss, applyGlobalCss, avatarPropsDefault, beforeUpdate, buttonOutlinedPropsDefault, buttonPropsDefault, close, closeAction, collection$1 as collection, create, createApp, createFog, destroy, destroyAction, ensureModalRoot, eventHandlers, finalize, formData, getActionRoot, getAnsweredQuestion, getAnsweredQuestionIds, getBrandKit, getButtonOutlinedThemeStyles, getButtonTextThemeStyles, getButtonThemeStyles, getCssVariables, getEventHandlers, getEvents, getLogs, getState$1 as getState, getStates, getSystem, getTextLinkThemeStyles, getTextThemeStyles, getVariables, hideOnScroll, hideOnTime, initialize, isOpened, listenLogger, loadActionTable, loadActionTableQuery, loadActionTableRow, loadActionTableRows, loadGlobalScript, loadGlobalStyle, loadStyle, logger, onChangeState, onClose, onCreate, onDestory, onDestroy, onMount, onScroll, onShow, onTime, removeAnswer, resetEventHandlers, resetVariables, sendAnswer, sendAnswers, setEventHandlers, setSetting, setState$1 as setState, setVariables, show, showAction, showModal, showOnScroll, showOnTime, state, tick, useBrandKit, variables, widget };