@plaidev/karte-action-sdk 1.1.268-29128731.e21f076b → 1.1.268-29130290.f4c098fe
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.
- package/dist/components-flex/avatar/types.d.ts +2 -2
- package/dist/components-flex/close-button/types.d.ts +4 -4
- package/dist/components-flex/image/types.d.ts +2 -2
- package/dist/components-flex/layout/types.d.ts +1 -0
- package/dist/components-flex/list/types.d.ts +2 -5
- package/dist/components-flex/multi-column/types.d.ts +2 -5
- package/dist/components-flex/props.d.ts +18 -11
- package/dist/components-flex/utils/prop-to-style.d.ts +3 -2
- package/dist/components-flex/variants.d.ts +8 -2
- package/dist/hydrate/components-flex/avatar/types.d.ts +2 -2
- package/dist/hydrate/components-flex/close-button/types.d.ts +4 -4
- package/dist/hydrate/components-flex/image/types.d.ts +2 -2
- package/dist/hydrate/components-flex/layout/types.d.ts +1 -0
- package/dist/hydrate/components-flex/list/types.d.ts +2 -5
- package/dist/hydrate/components-flex/multi-column/types.d.ts +2 -5
- package/dist/hydrate/components-flex/props.d.ts +18 -11
- package/dist/hydrate/components-flex/utils/prop-to-style.d.ts +3 -2
- package/dist/hydrate/components-flex/variants.d.ts +8 -2
- package/dist/hydrate/index.es.js +209 -86
- package/dist/index.es.js +207 -85
- package/dist/svelte5/components-flex/avatar/types.d.ts +2 -2
- package/dist/svelte5/components-flex/close-button/types.d.ts +4 -4
- package/dist/svelte5/components-flex/image/types.d.ts +2 -2
- package/dist/svelte5/components-flex/layout/types.d.ts +1 -0
- package/dist/svelte5/components-flex/list/types.d.ts +2 -5
- package/dist/svelte5/components-flex/multi-column/types.d.ts +2 -5
- package/dist/svelte5/components-flex/props.d.ts +18 -11
- package/dist/svelte5/components-flex/utils/prop-to-style.d.ts +3 -2
- package/dist/svelte5/components-flex/variants.d.ts +8 -2
- package/dist/svelte5/hydrate/components-flex/avatar/types.d.ts +2 -2
- package/dist/svelte5/hydrate/components-flex/close-button/types.d.ts +4 -4
- package/dist/svelte5/hydrate/components-flex/image/types.d.ts +2 -2
- package/dist/svelte5/hydrate/components-flex/layout/types.d.ts +1 -0
- package/dist/svelte5/hydrate/components-flex/list/types.d.ts +2 -5
- package/dist/svelte5/hydrate/components-flex/multi-column/types.d.ts +2 -5
- package/dist/svelte5/hydrate/components-flex/props.d.ts +18 -11
- package/dist/svelte5/hydrate/components-flex/utils/prop-to-style.d.ts +3 -2
- package/dist/svelte5/hydrate/components-flex/variants.d.ts +8 -2
- package/dist/svelte5/hydrate/index.es.js +182 -69
- package/dist/svelte5/index.es.js +182 -69
- package/dist/svelte5/index.front2.es.js +185 -68
- package/package.json +1 -1
package/dist/svelte5/index.es.js
CHANGED
@@ -3163,6 +3163,52 @@ const SHADOW_VARIANT = {
|
|
3163
3163
|
}
|
3164
3164
|
};
|
3165
3165
|
const SHADOW_VARIANTS = toVariantArray(SHADOW_VARIANT);
|
3166
|
+
const BACKGROUND_COLOR_VARIANT = {
|
3167
|
+
base: {
|
3168
|
+
name: "ホワイト",
|
3169
|
+
getProps: () => ({ backgroundColor: "#FFFFFF" })
|
3170
|
+
},
|
3171
|
+
dark: {
|
3172
|
+
name: "ブラック",
|
3173
|
+
getProps: () => ({ backgroundColor: "#000000" })
|
3174
|
+
},
|
3175
|
+
gray: {
|
3176
|
+
name: "グレー",
|
3177
|
+
getProps: () => ({ backgroundColor: "#ECECEC" })
|
3178
|
+
},
|
3179
|
+
brand: {
|
3180
|
+
name: "ブランド",
|
3181
|
+
getProps: (kit) => ({ backgroundColor: getBrandKit(kit).color_brand })
|
3182
|
+
},
|
3183
|
+
danger: {
|
3184
|
+
name: "デンジャー",
|
3185
|
+
getProps: (kit) => ({ backgroundColor: getBrandKit(kit).color_danger })
|
3186
|
+
}
|
3187
|
+
};
|
3188
|
+
const BACKGROUND_COLOR_VARIANTS = toVariantArray(BACKGROUND_COLOR_VARIANT);
|
3189
|
+
const BORDER_COLOR_VARIANT = {
|
3190
|
+
black: {
|
3191
|
+
name: "ブラック",
|
3192
|
+
getProps: () => ({ borderColor: "#000000" })
|
3193
|
+
},
|
3194
|
+
gray: {
|
3195
|
+
name: "グレー",
|
3196
|
+
getProps: () => ({ borderColor: "#DBDBDB" })
|
3197
|
+
},
|
3198
|
+
brand: {
|
3199
|
+
name: "ブランド",
|
3200
|
+
getProps: (kit) => ({ borderColor: getBrandKit(kit).color_brand })
|
3201
|
+
},
|
3202
|
+
danger: {
|
3203
|
+
name: "デンジャー",
|
3204
|
+
getProps: (kit) => ({ borderColor: getBrandKit(kit).color_danger })
|
3205
|
+
},
|
3206
|
+
base: {
|
3207
|
+
name: "ホワイト",
|
3208
|
+
getProps: () => ({ borderColor: "#FFFFFF" })
|
3209
|
+
}
|
3210
|
+
};
|
3211
|
+
const BORDER_COLOR_VARIANTS = toVariantArray(BORDER_COLOR_VARIANT);
|
3166
3212
|
|
3167
3213
|
//#endregion
|
3168
3214
|
//#region src/components-flex/utils/prop-to-style.ts
|
@@ -3179,11 +3225,12 @@ const toCssPosition = (p) => {
|
|
3179
3225
|
const toCssCommon = (p) => {
|
3180
3226
|
return { ...toCssPosition(p) };
|
3181
3227
|
};
|
3182
|
-
const toCssBorder = (p) => {
|
3228
|
+
const toCssBorder = (p, brandKit) => {
|
3183
3229
|
const borderWidth = p?.borderTopWidth ?? p?.borderRightWidth ?? p?.borderLeftWidth ?? p?.borderBottomWidth ?? null;
|
3184
3230
|
if (borderWidth === null) return {};
|
3231
|
+
const variant = BORDER_COLOR_VARIANT[p?.borderColorVariant];
|
3185
3232
|
return {
|
3186
|
-
borderColor: p?.borderColor,
|
3233
|
+
borderColor: p?.borderColor ?? variant?.getProps(brandKit)?.borderColor,
|
3187
3234
|
borderStyle: "solid",
|
3188
3235
|
borderTopWidth: p?.borderTopWidth,
|
3189
3236
|
borderLeftWidth: p?.borderLeftWidth,
|
@@ -3199,16 +3246,19 @@ const toCssPadding = (p) => {
|
|
3199
3246
|
paddingBottom: p?.paddingBottom
|
3200
3247
|
};
|
3201
3248
|
};
|
3202
|
-
const toCssBackground = (p) => {
|
3249
|
+
const toCssBackground = (p, brandKit) => {
|
3203
3250
|
const url = p?.backgroundImageUrl;
|
3251
|
+
const variant = BACKGROUND_COLOR_VARIANT[p?.backgroundColorVariant];
|
3204
3252
|
return {
|
3205
|
-
|
3206
|
-
|
3207
|
-
|
3208
|
-
|
3209
|
-
|
3210
|
-
|
3211
|
-
|
3253
|
+
backgroundColor: p?.backgroundBlendColor ?? p?.backgroundColor ?? variant?.getProps(brandKit)?.backgroundColor,
|
3254
|
+
...url ? {
|
3255
|
+
backgroundSize: url ? "cover" : void 0,
|
3256
|
+
backgroundImage: url ? `url(${url})` : void 0,
|
3257
|
+
backgroundPositionX: p?.backgroundPositionX ?? "center",
|
3258
|
+
backgroundPositionY: p?.backgroundPositionY ?? "center",
|
3259
|
+
backgroundBlendMode: p?.backgroundBlendMode,
|
3260
|
+
backgroundRepeat: "no-repeat"
|
3261
|
+
} : {}
|
3212
3262
|
};
|
3213
3263
|
};
|
3214
3264
|
const toCssRadius = (p) => {
|
@@ -3491,6 +3541,7 @@ const $$css$22 = {
|
|
3491
3541
|
function Avatar($$anchor, $$props) {
|
3492
3542
|
$$54.push($$props, false);
|
3493
3543
|
$$54.append_styles($$anchor, $$css$22);
|
3544
|
+
const styleObj = $$54.mutable_state();
|
3494
3545
|
const style = $$54.mutable_state();
|
3495
3546
|
const imgStyle = $$54.mutable_state();
|
3496
3547
|
let props = $$54.prop($$props, "props", 24, () => ({}));
|
@@ -3506,20 +3557,36 @@ function Avatar($$anchor, $$props) {
|
|
3506
3557
|
square: { borderRadius: "0.25em" },
|
3507
3558
|
rounded: { borderRadius: "1em" }
|
3508
3559
|
} };
|
3509
|
-
|
3510
|
-
|
3560
|
+
const calcImgRadius = (parentRadius, borderWidth) => {
|
3561
|
+
const radiusSize = parentRadius ? parseInt(parentRadius) : 0;
|
3562
|
+
if (radiusSize === 0) return 0;
|
3563
|
+
if (parentRadius === "100%") return "100%";
|
3564
|
+
return radiusSize > 0 ? `calc(${parentRadius} - ${borderWidth})` : void 0;
|
3565
|
+
};
|
3566
|
+
$$54.legacy_pre_effect(() => ($$54.deep_read_state(props()), toCssPadding), () => {
|
3567
|
+
$$54.set(styleObj, {
|
3511
3568
|
...VARIANTS.shape[props().shape ?? "square"],
|
3512
3569
|
width: props().width ?? avatarSizeStyle.width,
|
3513
3570
|
height: props().height ?? avatarSizeStyle.height,
|
3514
3571
|
...toCssCommon(props()),
|
3515
|
-
...toCssBorder(props())
|
3516
|
-
|
3572
|
+
...toCssBorder(props()),
|
3573
|
+
...toCssPadding(props())
|
3574
|
+
});
|
3517
3575
|
});
|
3518
|
-
$$54.legacy_pre_effect(() =>
|
3576
|
+
$$54.legacy_pre_effect(() => $$54.get(styleObj), () => {
|
3577
|
+
$$54.set(style, objToStyle($$54.get(styleObj)));
|
3578
|
+
});
|
3579
|
+
$$54.legacy_pre_effect(() => $$54.get(styleObj), () => {
|
3519
3580
|
$$54.set(imgStyle, objToStyle({
|
3520
3581
|
width: "100%",
|
3521
3582
|
height: "100%",
|
3522
|
-
objectFit: "cover"
|
3583
|
+
objectFit: "cover",
|
3584
|
+
...toCssRadius({
|
3585
|
+
borderTopLeftRadius: calcImgRadius($$54.get(styleObj).borderRadius, $$54.get(styleObj).borderTopWidth),
|
3586
|
+
borderTopRightRadius: calcImgRadius($$54.get(styleObj).borderRadius, $$54.get(styleObj).borderTopWidth),
|
3587
|
+
borderBottomLeftRadius: calcImgRadius($$54.get(styleObj).borderRadius, $$54.get(styleObj).borderTopWidth),
|
3588
|
+
borderBottomRightRadius: calcImgRadius($$54.get(styleObj).borderRadius, $$54.get(styleObj).borderTopWidth)
|
3589
|
+
})
|
3523
3590
|
}));
|
3524
3591
|
});
|
3525
3592
|
$$54.legacy_pre_effect_reset();
|
@@ -4727,25 +4794,43 @@ const BUTTON_TEXT_THEME = {
|
|
4727
4794
|
white: "White"
|
4728
4795
|
};
|
4729
4796
|
|
4797
|
+
//#endregion
|
4798
|
+
//#region src/components-flex/text/styles.ts
|
4799
|
+
const callback$1 = ({ brandKit }) => ({
|
4800
|
+
default: { color: brandKit.color_text_primary },
|
4801
|
+
gray: { color: brandKit.color_text_secondary },
|
4802
|
+
brand: { color: brandKit.color_brand },
|
4803
|
+
success: { color: brandKit.color_success },
|
4804
|
+
warning: { color: brandKit.color_warning },
|
4805
|
+
danger: { color: brandKit.color_danger },
|
4806
|
+
info: { color: brandKit.color_info },
|
4807
|
+
white: { color: brandKit.color_white }
|
4808
|
+
});
|
4809
|
+
const getTextThemeStyles = getPropStyles(callback$1);
|
4810
|
+
|
4730
4811
|
//#endregion
|
4731
4812
|
//#region src/components-flex/close-button/CloseButton.svelte
|
4732
4813
|
var root_2$1 = $$18.template(`<span></span>`);
|
4733
|
-
var root_1$4 = $$18.template(`<span><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512" style="width: 100%; height: 100%;" class="svelte-
|
4814
|
+
var root_1$4 = $$18.template(`<span><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512" style="width: 100%; height: 100%;" class="svelte-18wmfyq"><path d="M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"></path></svg></span> <!>`, 1);
|
4734
4815
|
const $$css$17 = {
|
4735
|
-
hash: "svelte-
|
4736
|
-
code: ".close-button.svelte-
|
4816
|
+
hash: "svelte-18wmfyq",
|
4817
|
+
code: ".close-button.svelte-18wmfyq {display:inline-flex;align-items:center;justify-content:center;align-self:center;gap:8px;border-radius:100%;background:none;cursor:pointer;border:0;outline:0;flex-shrink:0;transition:background-color 0.12s,\n border-color 0.12s,\n color 0.12s;}.close-button.svelte-18wmfyq svg:where(.svelte-18wmfyq) {transition:transform 0.12s;}.close-button.svelte-18wmfyq:hover svg:where(.svelte-18wmfyq) {transform:rotate(90deg);}.close-button-order-one.svelte-18wmfyq {order:1;}.close-button-order-two.svelte-18wmfyq {order:2;}"
|
4737
4818
|
};
|
4738
4819
|
function CloseButton($$anchor, $$props) {
|
4739
4820
|
$$18.push($$props, false);
|
4740
4821
|
$$18.append_styles($$anchor, $$css$17);
|
4741
4822
|
const hasLabel = $$18.mutable_state();
|
4823
|
+
const styleObj = $$18.mutable_state();
|
4742
4824
|
const style = $$18.mutable_state();
|
4825
|
+
const borderWidth = $$18.mutable_state();
|
4826
|
+
const paddingSize = $$18.mutable_state();
|
4743
4827
|
const labelStyle = $$18.mutable_state();
|
4744
4828
|
const iconStyle = $$18.mutable_state();
|
4745
4829
|
let props = $$18.prop($$props, "props", 24, () => ({}));
|
4746
4830
|
let layerId = $$18.prop($$props, "layerId", 8, "");
|
4747
4831
|
let eventName = $$18.prop($$props, "eventName", 8, "");
|
4748
4832
|
let eventValue = $$18.prop($$props, "eventValue", 8, void 0);
|
4833
|
+
const { brandKit } = useBrandKit();
|
4749
4834
|
useInjectCustomizeCss(props());
|
4750
4835
|
const { attributes, element, handleClick } = useClickable_default({
|
4751
4836
|
onClick: {
|
@@ -4781,34 +4866,54 @@ function CloseButton($$anchor, $$props) {
|
|
4781
4866
|
}
|
4782
4867
|
};
|
4783
4868
|
const size = props().size ?? 24;
|
4784
|
-
const color = props().color ?? "#666";
|
4869
|
+
const color = props().color ?? getTextThemeStyles(brandKit)[props().colorVariant]?.color ?? "#666";
|
4785
4870
|
const label = props().label;
|
4786
4871
|
const isLeftLabelPlacement = props().labelPlacement === "left";
|
4787
4872
|
$$18.legacy_pre_effect(() => {}, () => {
|
4788
4873
|
$$18.set(hasLabel, label !== void 0 && label !== "");
|
4789
4874
|
});
|
4790
4875
|
$$18.legacy_pre_effect(() => ($$18.deep_read_state(props()), toCssBorder), () => {
|
4791
|
-
$$18.set(
|
4792
|
-
...props().bordered && {
|
4793
|
-
|
4794
|
-
|
4876
|
+
$$18.set(styleObj, {
|
4877
|
+
...props().bordered && {
|
4878
|
+
borderTopWidth: "1px",
|
4879
|
+
borderLeftWidth: "1px",
|
4880
|
+
borderRightWidth: "1px",
|
4881
|
+
borderBottomWidth: "1px",
|
4882
|
+
borderStyle: "solid",
|
4883
|
+
borderColor: "#666666"
|
4884
|
+
},
|
4795
4885
|
padding: "6px",
|
4796
|
-
|
4886
|
+
boxSizing: "border-box",
|
4887
|
+
backgroundColor: toCssBackground(props(), brandKit)?.backgroundColor ?? "rgba(255,255,255,0)",
|
4797
4888
|
...VARIANTS.round[props().round ?? "default"],
|
4889
|
+
...toCssPadding(props()),
|
4798
4890
|
...toCssCommon(props()),
|
4799
4891
|
...toCssBorder(props())
|
4800
|
-
})
|
4892
|
+
});
|
4801
4893
|
});
|
4802
|
-
$$18.legacy_pre_effect(() => $$18.
|
4894
|
+
$$18.legacy_pre_effect(() => $$18.get(styleObj), () => {
|
4895
|
+
$$18.set(style, objToStyle($$18.get(styleObj)));
|
4896
|
+
});
|
4897
|
+
$$18.legacy_pre_effect(() => $$18.get(styleObj), () => {
|
4898
|
+
$$18.set(borderWidth, $$18.get(styleObj).borderTopWidth ? parseInt($$18.get(styleObj).borderTopWidth) : 0);
|
4899
|
+
});
|
4900
|
+
$$18.legacy_pre_effect(() => $$18.get(styleObj), () => {
|
4901
|
+
$$18.set(paddingSize, $$18.get(styleObj).paddingTop ? parseInt($$18.get(styleObj).paddingTop) : 6);
|
4902
|
+
});
|
4903
|
+
$$18.legacy_pre_effect(() => ($$18.deep_read_state(props()), getTextThemeStyles), () => {
|
4803
4904
|
$$18.set(labelStyle, objToStyle({
|
4804
|
-
color: props().labelColor ?? color,
|
4905
|
+
color: props().labelColor ?? getTextThemeStyles(brandKit)[props().labelColorVariant]?.color ?? color,
|
4805
4906
|
fontSize: `${size / 2.1}px`
|
4806
4907
|
}));
|
4807
4908
|
});
|
4808
|
-
$$18.legacy_pre_effect(() =>
|
4909
|
+
$$18.legacy_pre_effect(() => ($$18.get(paddingSize), $$18.get(borderWidth)), () => {
|
4809
4910
|
$$18.set(iconStyle, objToStyle({
|
4810
|
-
width: `${size -
|
4811
|
-
height: `${size -
|
4911
|
+
width: `${size - $$18.get(paddingSize) * 2 - $$18.get(borderWidth) * 2}px`,
|
4912
|
+
height: `${size - $$18.get(paddingSize) * 2 - $$18.get(borderWidth) * 2}px`,
|
4913
|
+
display: "flex",
|
4914
|
+
alignItems: "center",
|
4915
|
+
justifyContent: "center",
|
4916
|
+
flexShrink: 0
|
4812
4917
|
}));
|
4813
4918
|
});
|
4814
4919
|
$$18.legacy_pre_effect_reset();
|
@@ -4822,7 +4927,7 @@ function CloseButton($$anchor, $$props) {
|
|
4822
4927
|
class: `close-button ${isLeftLabelPlacement ? "close-button-order-two" : ""}`,
|
4823
4928
|
"data-layer-id": layerId(),
|
4824
4929
|
style: $$18.get(style)
|
4825
|
-
}, "svelte-
|
4930
|
+
}, "svelte-18wmfyq"));
|
4826
4931
|
$$18.event("click", $$element, handleClick);
|
4827
4932
|
var fragment_1 = root_1$4();
|
4828
4933
|
var span = $$18.first_child(fragment_1);
|
@@ -4833,7 +4938,7 @@ function CloseButton($$anchor, $$props) {
|
|
4833
4938
|
{
|
4834
4939
|
var consequent = ($$anchor$2) => {
|
4835
4940
|
var span_1 = root_2$1();
|
4836
|
-
$$18.set_class(span_1, 1, `close-button-label ${isLeftLabelPlacement ? "close-button-order-one" : ""}`, "svelte-
|
4941
|
+
$$18.set_class(span_1, 1, `close-button-label ${isLeftLabelPlacement ? "close-button-order-one" : ""}`, "svelte-18wmfyq");
|
4837
4942
|
span_1.textContent = label;
|
4838
4943
|
$$18.template_effect(() => $$18.set_style(span_1, $$18.get(labelStyle)));
|
4839
4944
|
$$18.append($$anchor$2, span_1);
|
@@ -4910,16 +5015,16 @@ const IMAGE_ROUND_STYLES = {
|
|
4910
5015
|
borderBottomRightRadius: 0
|
4911
5016
|
},
|
4912
5017
|
rounded: {
|
4913
|
-
borderTopLeftRadius: "
|
4914
|
-
borderTopRightRadius: "
|
4915
|
-
borderBottomLeftRadius: "
|
4916
|
-
borderBottomRightRadius: "
|
5018
|
+
borderTopLeftRadius: "8px",
|
5019
|
+
borderTopRightRadius: "8px",
|
5020
|
+
borderBottomLeftRadius: "8px",
|
5021
|
+
borderBottomRightRadius: "8px"
|
4917
5022
|
},
|
4918
5023
|
circle: {
|
4919
|
-
borderTopLeftRadius: "
|
4920
|
-
borderTopRightRadius: "
|
4921
|
-
borderBottomLeftRadius: "
|
4922
|
-
borderBottomRightRadius: "
|
5024
|
+
borderTopLeftRadius: "16px",
|
5025
|
+
borderTopRightRadius: "16px",
|
5026
|
+
borderBottomLeftRadius: "16px",
|
5027
|
+
borderBottomRightRadius: "16px"
|
4923
5028
|
}
|
4924
5029
|
};
|
4925
5030
|
|
@@ -4933,23 +5038,43 @@ const $$css$16 = {
|
|
4933
5038
|
function Image($$anchor, $$props) {
|
4934
5039
|
$$17.push($$props, false);
|
4935
5040
|
$$17.append_styles($$anchor, $$css$16);
|
5041
|
+
const styleObj = $$17.mutable_state();
|
4936
5042
|
const style = $$17.mutable_state();
|
5043
|
+
const imgStyle = $$17.mutable_state();
|
4937
5044
|
let props = $$17.prop($$props, "props", 24, () => ({}));
|
4938
5045
|
let layerId = $$17.prop($$props, "layerId", 8, "");
|
4939
5046
|
useInjectCustomizeCss(props());
|
4940
5047
|
const { attributes, element, handleClick } = useClickable_default(props());
|
4941
5048
|
const aspectVariantStyles = ASPECT_VARIANT[props().aspectVariant]?.getProps();
|
4942
5049
|
const width = props().width ?? "100%";
|
4943
|
-
|
4944
|
-
|
5050
|
+
const calcImgRadius = (parentRadius, borderWidth) => {
|
5051
|
+
const radiusSize = parentRadius ? parseInt(parentRadius) : 0;
|
5052
|
+
if (radiusSize === 0) return 0;
|
5053
|
+
if (parentRadius === "100%") return "100%";
|
5054
|
+
return radiusSize > 0 ? `calc(${parentRadius} - ${borderWidth})` : void 0;
|
5055
|
+
};
|
5056
|
+
$$17.legacy_pre_effect(() => ($$17.deep_read_state(props()), toCssPadding), () => {
|
5057
|
+
$$17.set(styleObj, {
|
4945
5058
|
...props().borderTopLeftRadius ? toCssRadius(props()) : IMAGE_ROUND_STYLES[props().shape ?? "square"],
|
4946
5059
|
width,
|
4947
5060
|
flexShrink: String(width).indexOf("px") !== -1 ? 0 : 1,
|
4948
5061
|
height: props().height ?? "auto",
|
4949
5062
|
aspectRatio: props().aspect ?? aspectVariantStyles?.aspect,
|
4950
5063
|
...toCssCommon(props()),
|
4951
|
-
...toCssBorder(props())
|
4952
|
-
|
5064
|
+
...toCssBorder(props()),
|
5065
|
+
...toCssPadding(props())
|
5066
|
+
});
|
5067
|
+
});
|
5068
|
+
$$17.legacy_pre_effect(() => $$17.get(styleObj), () => {
|
5069
|
+
$$17.set(style, objToStyle($$17.get(styleObj)));
|
5070
|
+
});
|
5071
|
+
$$17.legacy_pre_effect(() => $$17.get(styleObj), () => {
|
5072
|
+
$$17.set(imgStyle, objToStyle({ ...toCssRadius({
|
5073
|
+
borderTopLeftRadius: calcImgRadius($$17.get(styleObj).borderTopLeftRadius, $$17.get(styleObj).borderTopWidth),
|
5074
|
+
borderTopRightRadius: calcImgRadius($$17.get(styleObj).borderTopRightRadius, $$17.get(styleObj).borderTopWidth),
|
5075
|
+
borderBottomLeftRadius: calcImgRadius($$17.get(styleObj).borderBottomLeftRadius, $$17.get(styleObj).borderTopWidth),
|
5076
|
+
borderBottomRightRadius: calcImgRadius($$17.get(styleObj).borderBottomRightRadius, $$17.get(styleObj).borderTopWidth)
|
5077
|
+
}) }));
|
4953
5078
|
});
|
4954
5079
|
$$17.legacy_pre_effect_reset();
|
4955
5080
|
$$17.init();
|
@@ -4968,6 +5093,7 @@ function Image($$anchor, $$props) {
|
|
4968
5093
|
$$17.template_effect(() => {
|
4969
5094
|
$$17.set_attribute(img, "src", props().image);
|
4970
5095
|
$$17.set_attribute(img, "alt", props().alt);
|
5096
|
+
$$17.set_style(img, $$17.get(imgStyle));
|
4971
5097
|
});
|
4972
5098
|
$$17.append($$anchor$1, img);
|
4973
5099
|
});
|
@@ -5007,6 +5133,7 @@ function Layout($$anchor, $$props) {
|
|
5007
5133
|
const style = $$16.mutable_state();
|
5008
5134
|
let props = $$16.prop($$props, "props", 24, () => ({}));
|
5009
5135
|
let layerId = $$16.prop($$props, "layerId", 8, "");
|
5136
|
+
const { brandKit } = useBrandKit();
|
5010
5137
|
useInjectCustomizeCss(props());
|
5011
5138
|
const { attributes, element, handleClick } = useClickable_default(props());
|
5012
5139
|
$$16.legacy_pre_effect(() => ($$16.deep_read_state(props()), toCssBorder), () => {
|
@@ -5018,13 +5145,14 @@ function Layout($$anchor, $$props) {
|
|
5018
5145
|
rowGap: props().rowGap ?? props().gap,
|
5019
5146
|
columnGap: props().columnGap ?? props().gap,
|
5020
5147
|
width: props().width,
|
5148
|
+
height: props().height,
|
5021
5149
|
...toCssOverflow(props()),
|
5022
5150
|
...toCssShadow(props()),
|
5023
5151
|
...toCssRadius(props()),
|
5024
|
-
...toCssBackground(props()),
|
5152
|
+
...toCssBackground(props(), brandKit),
|
5025
5153
|
...toCssCommon(props()),
|
5026
5154
|
...toCssPadding(props()),
|
5027
|
-
...toCssBorder(props())
|
5155
|
+
...toCssBorder(props(), brandKit)
|
5028
5156
|
}));
|
5029
5157
|
});
|
5030
5158
|
$$16.legacy_pre_effect_reset();
|
@@ -5324,20 +5452,6 @@ function SliderItem($$anchor, $$props) {
|
|
5324
5452
|
$$14.pop();
|
5325
5453
|
}
|
5326
5454
|
|
5327
|
-
//#endregion
|
5328
|
-
//#region src/components-flex/text/styles.ts
|
5329
|
-
const callback$1 = ({ brandKit }) => ({
|
5330
|
-
default: { color: brandKit.color_text_primary },
|
5331
|
-
gray: { color: brandKit.color_text_secondary },
|
5332
|
-
brand: { color: brandKit.color_brand },
|
5333
|
-
success: { color: brandKit.color_success },
|
5334
|
-
warning: { color: brandKit.color_warning },
|
5335
|
-
danger: { color: brandKit.color_danger },
|
5336
|
-
info: { color: brandKit.color_info },
|
5337
|
-
white: { color: brandKit.color_white }
|
5338
|
-
});
|
5339
|
-
const getTextThemeStyles = getPropStyles(callback$1);
|
5340
|
-
|
5341
5455
|
//#endregion
|
5342
5456
|
//#region src/components-flex/text/constants.ts
|
5343
5457
|
const TEXT_VARIANTS = { size: {
|
@@ -6111,11 +6225,9 @@ function List($$anchor, $$props) {
|
|
6111
6225
|
const style = $$6.mutable_state();
|
6112
6226
|
let layerId = $$6.prop($$props, "layerId", 8);
|
6113
6227
|
let props = $$6.prop($$props, "props", 8);
|
6228
|
+
const { brandKit } = useBrandKit();
|
6114
6229
|
useInjectCustomizeCss(props());
|
6115
6230
|
const vars = getVariables();
|
6116
|
-
console.log(vars);
|
6117
|
-
console.log(props().actionTableKey);
|
6118
|
-
console.log(vars[props().actionTableKey]);
|
6119
6231
|
setContext(LIST_ITEM_CONTEXT_KEY, {
|
6120
6232
|
paddingTop: props().itemPaddingTop,
|
6121
6233
|
paddingLeft: props().itemPaddingLeft,
|
@@ -6123,8 +6235,8 @@ function List($$anchor, $$props) {
|
|
6123
6235
|
paddingBottom: props().itemPaddingBottom,
|
6124
6236
|
height: props().itemHeight,
|
6125
6237
|
borderTopWidth: props().borderWidth,
|
6126
|
-
borderTopColor: props().borderColor,
|
6127
|
-
borderTopStyle:
|
6238
|
+
borderTopColor: props().borderColor ?? BORDER_COLOR_VARIANT[props().borderColorVariant]?.getProps(brandKit)?.borderColor,
|
6239
|
+
borderTopStyle: "solid",
|
6128
6240
|
gap: props().itemGap
|
6129
6241
|
});
|
6130
6242
|
$$6.legacy_pre_effect(() => $$6.deep_read_state(props()), () => {
|
@@ -6196,6 +6308,7 @@ function MultiColumn($$anchor, $$props) {
|
|
6196
6308
|
const style = $$5.mutable_state();
|
6197
6309
|
let layerId = $$5.prop($$props, "layerId", 8);
|
6198
6310
|
let props = $$5.prop($$props, "props", 8);
|
6311
|
+
const { brandKit } = useBrandKit();
|
6199
6312
|
useInjectCustomizeCss(props());
|
6200
6313
|
let listGap = (() => {
|
6201
6314
|
if (!props().gap) return "0";
|
@@ -6213,8 +6326,8 @@ function MultiColumn($$anchor, $$props) {
|
|
6213
6326
|
paddingRight: props().itemPaddingRight,
|
6214
6327
|
paddingBottom: props().itemPaddingBottom,
|
6215
6328
|
borderLeftWidth: props().borderWidth,
|
6216
|
-
borderLeftColor: props().borderColor,
|
6217
|
-
borderLeftStyle: props().borderStyle,
|
6329
|
+
borderLeftColor: props().borderColor ?? BORDER_COLOR_VARIANT[props().borderColorVariant]?.getProps(brandKit)?.borderColor,
|
6330
|
+
borderLeftStyle: props().borderStyle ?? "solid",
|
6218
6331
|
gap: listGap,
|
6219
6332
|
innerGap: props().itemGap
|
6220
6333
|
});
|
@@ -6833,4 +6946,4 @@ const flexComponentSchemes = {
|
|
6833
6946
|
};
|
6834
6947
|
|
6835
6948
|
//#endregion
|
6836
|
-
export { ACTION_HOOK_LABEL, ASPECT_VARIANT, ASPECT_VARIANTS, 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_VARIANT, BUTTON_WRAP_STYLES, BackgroundSizes, CLOSE_BUTTON_LABEL_PLACEMENT, CLOSE_BUTTON_PLACEMENT, CLOSE_BUTTON_ROUND, ClipPaths, Cursors, DefaultEdgePosition, DefaultElasticity, DefaultFormButtonColor, DefaultFormIdentifyBooleanField, DefaultFormIdentifyTextField, DefaultListBackground, DefaultListBackgroundNone, DefaultListBackgroundStripe, DefaultListSeparator, DefaultListSeparatorBorder, DefaultListSeparatorGap, DefaultListSeparatorNone, DefaultModalBreakPoint, DefaultModalPlacement, DefaultSlideButton, DefaultSlideNavigationButton, Directions, Elasticities, ElasticityStyle, FONT_FAMILY_VARIANT, FONT_FAMILY_VARIANTS, FONT_FAMILY_VARIANT_GROUPS, Avatar as FlexAvatar, Button as FlexButton, ButtonOutlined as FlexButtonOutlined, ButtonText as FlexButtonText, ClipCopy as FlexClipCopy, CloseButton as FlexCloseButton, Code as FlexCode, CountDown as FlexCountDown, CountDownValue as FlexCountDownValue, FlexDirections, Icon as FlexIcon, Image as FlexImage, Layout as FlexLayout, List as FlexList, ListItem as FlexListItem, Modal as FlexModal, MultiColumn as FlexMultiColumn, MultiColumnItem as FlexMultiColumnItem, RichText as FlexRichText, Slider as FlexSlider, SliderItem as FlexSliderItem, Text as FlexText, TextLink as FlexTextLink, Youtube as FlexYoutube, Fonts, FormIdentifyBooleanFields, FormIdentifyTextFieldPlaceholders, FormIdentifyTextFieldValidations, FormIdentifyTextFields, ICON_SIZE, ICON_SIZE_STYLES, ICON_VARIANTS, IMAGE_ASPECT_VARIANTS, IMAGE_ROUND_SHAPE, IMAGE_ROUND_STYLES, Justifies, KARTE_MODAL_ROOT, LAYER_TEXT_SIZE, LAYOUT_ALIGN, LAYOUT_COMPONENT_NAMES, LAYOUT_DIRECTION, LAYOUT_DISPLAY_TYPE, LAYOUT_JUSTIFY, LIST_ITEM_CONTEXT_KEY, LengthUnits, ListBackgroundTypes, ListDirections, ListSeparatorTypes, MULTI_COLUMN_ITEM_CONTEXT_KEY, MediaQueries, ModalPositions, ObjectFits, OnClickOperationOptions, Overflows, PropTypes, ROUND_STYLES, ROUND_VARIANT, Repeats, SHADOW_VARIANT, SHADOW_VARIANTS, SYSTEM_FONT, State, StateItem, TEXT_LINK_SIZE, TEXT_LINK_SIZE_STYLES, TEXT_LINK_THEME, TEXT_LINK_UNDERLINE, TEXT_STYLE, TEXT_THEME, TEXT_VARIANTS, TextDirections, WritingModes, addChoiceAnswer, addFreeAnswer, afterUpdate, applyCss, applyGlobalCss, avatarPropsDefault, beforeUpdate, buttonOutlinedPropsDefault, buttonPropsDefault, close, closeAction, collection, create, createApp, createFog, createProp, destroy, destroyAction, ensureModalRoot, eventHandlers, finalize, flexComponentSchemes, formData, getActionRoot, getAnsweredQuestion, getAnsweredQuestionIds, getBrandKit, getButtonOutlinedThemeStyles, getButtonTextThemeStyles, getButtonThemeStyles, getCssVariables, getEventHandlers, getEvents, getLogs, 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, setVariables, show, showAction, showModal, showOnScroll, showOnTime, state, tick, useBrandKit, variables, widget_exports as widget };
|
6949
|
+
export { ACTION_HOOK_LABEL, ASPECT_VARIANT, ASPECT_VARIANTS, AVATAR_SHAPE, AVATAR_SIZE, AVATAR_SIZE_STYLES, Alignments, AnimationStyles, BACKGROUND_COLOR_VARIANT, BACKGROUND_COLOR_VARIANTS, BORDER_COLOR_VARIANT, BORDER_COLOR_VARIANTS, 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_VARIANT, BUTTON_WRAP_STYLES, BackgroundSizes, CLOSE_BUTTON_LABEL_PLACEMENT, CLOSE_BUTTON_PLACEMENT, CLOSE_BUTTON_ROUND, ClipPaths, Cursors, DefaultEdgePosition, DefaultElasticity, DefaultFormButtonColor, DefaultFormIdentifyBooleanField, DefaultFormIdentifyTextField, DefaultListBackground, DefaultListBackgroundNone, DefaultListBackgroundStripe, DefaultListSeparator, DefaultListSeparatorBorder, DefaultListSeparatorGap, DefaultListSeparatorNone, DefaultModalBreakPoint, DefaultModalPlacement, DefaultSlideButton, DefaultSlideNavigationButton, Directions, Elasticities, ElasticityStyle, FONT_FAMILY_VARIANT, FONT_FAMILY_VARIANTS, FONT_FAMILY_VARIANT_GROUPS, Avatar as FlexAvatar, Button as FlexButton, ButtonOutlined as FlexButtonOutlined, ButtonText as FlexButtonText, ClipCopy as FlexClipCopy, CloseButton as FlexCloseButton, Code as FlexCode, CountDown as FlexCountDown, CountDownValue as FlexCountDownValue, FlexDirections, Icon as FlexIcon, Image as FlexImage, Layout as FlexLayout, List as FlexList, ListItem as FlexListItem, Modal as FlexModal, MultiColumn as FlexMultiColumn, MultiColumnItem as FlexMultiColumnItem, RichText as FlexRichText, Slider as FlexSlider, SliderItem as FlexSliderItem, Text as FlexText, TextLink as FlexTextLink, Youtube as FlexYoutube, Fonts, FormIdentifyBooleanFields, FormIdentifyTextFieldPlaceholders, FormIdentifyTextFieldValidations, FormIdentifyTextFields, ICON_SIZE, ICON_SIZE_STYLES, ICON_VARIANTS, IMAGE_ASPECT_VARIANTS, IMAGE_ROUND_SHAPE, IMAGE_ROUND_STYLES, Justifies, KARTE_MODAL_ROOT, LAYER_TEXT_SIZE, LAYOUT_ALIGN, LAYOUT_COMPONENT_NAMES, LAYOUT_DIRECTION, LAYOUT_DISPLAY_TYPE, LAYOUT_JUSTIFY, LIST_ITEM_CONTEXT_KEY, LengthUnits, ListBackgroundTypes, ListDirections, ListSeparatorTypes, MULTI_COLUMN_ITEM_CONTEXT_KEY, MediaQueries, ModalPositions, ObjectFits, OnClickOperationOptions, Overflows, PropTypes, ROUND_STYLES, ROUND_VARIANT, Repeats, SHADOW_VARIANT, SHADOW_VARIANTS, SYSTEM_FONT, State, StateItem, TEXT_LINK_SIZE, TEXT_LINK_SIZE_STYLES, TEXT_LINK_THEME, TEXT_LINK_UNDERLINE, TEXT_STYLE, TEXT_THEME, TEXT_VARIANTS, TextDirections, WritingModes, addChoiceAnswer, addFreeAnswer, afterUpdate, applyCss, applyGlobalCss, avatarPropsDefault, beforeUpdate, buttonOutlinedPropsDefault, buttonPropsDefault, close, closeAction, collection, create, createApp, createFog, createProp, destroy, destroyAction, ensureModalRoot, eventHandlers, finalize, flexComponentSchemes, formData, getActionRoot, getAnsweredQuestion, getAnsweredQuestionIds, getBrandKit, getButtonOutlinedThemeStyles, getButtonTextThemeStyles, getButtonThemeStyles, getCssVariables, getEventHandlers, getEvents, getLogs, 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, setVariables, show, showAction, showModal, showOnScroll, showOnTime, state, tick, useBrandKit, variables, widget_exports as widget };
|