@plaidev/karte-action-sdk 1.1.270-29228770.05dce6ca → 1.1.270-29270413.6a2b1dc5c
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/action.d.ts +0 -1
- package/dist/actionEvent.d.ts +0 -1
- package/dist/components/index.d.ts +0 -1
- package/dist/components-flex/avatar/types.d.ts +0 -1
- package/dist/components-flex/button/types.d.ts +0 -3
- package/dist/components-flex/button-outlined/types.d.ts +0 -3
- package/dist/components-flex/button-text/types.d.ts +0 -3
- package/dist/components-flex/form/types.d.ts +35 -20
- package/dist/components-flex/form.d.ts +40 -3
- package/dist/components-flex/icon/types.d.ts +0 -1
- package/dist/components-flex/text/types.d.ts +0 -3
- package/dist/components-flex/text-link/types.d.ts +0 -3
- package/dist/components-flex/variants.d.ts +0 -15
- package/dist/components-flex/youtube/types.d.ts +0 -1
- package/dist/constants.d.ts +0 -1
- package/dist/hooks/useInjectCustomizeCss.d.ts +1 -1
- package/dist/hooks/useText.d.ts +1 -1
- package/dist/hydrate/action.d.ts +0 -1
- package/dist/hydrate/actionEvent.d.ts +0 -1
- package/dist/hydrate/components/index.d.ts +0 -1
- package/dist/hydrate/components-flex/avatar/types.d.ts +0 -1
- package/dist/hydrate/components-flex/button/types.d.ts +0 -3
- package/dist/hydrate/components-flex/button-outlined/types.d.ts +0 -3
- package/dist/hydrate/components-flex/button-text/types.d.ts +0 -3
- package/dist/hydrate/components-flex/form/types.d.ts +35 -20
- package/dist/hydrate/components-flex/form.d.ts +40 -3
- package/dist/hydrate/components-flex/icon/types.d.ts +0 -1
- package/dist/hydrate/components-flex/text/types.d.ts +0 -3
- package/dist/hydrate/components-flex/text-link/types.d.ts +0 -3
- package/dist/hydrate/components-flex/variants.d.ts +0 -15
- package/dist/hydrate/components-flex/youtube/types.d.ts +0 -1
- package/dist/hydrate/constants.d.ts +0 -1
- package/dist/hydrate/hooks/useInjectCustomizeCss.d.ts +1 -1
- package/dist/hydrate/hooks/useText.d.ts +1 -1
- package/dist/hydrate/index.d.ts +0 -2
- package/dist/hydrate/index.es.js +903 -572
- package/dist/hydrate/index.svelte5.d.ts +2 -1
- package/dist/hydrate/modal.d.ts +0 -2
- package/dist/hydrate/modal.svelte5.d.ts +0 -2
- package/dist/hydrate/types.d.ts +0 -1
- package/dist/icons.d.ts +0 -3
- package/dist/index.es.d.ts +0 -2
- package/dist/index.es.js +891 -510
- package/dist/modal.d.ts +0 -2
- package/dist/modal.svelte5.d.ts +0 -2
- package/dist/svelte5/action.d.ts +0 -1
- package/dist/svelte5/actionEvent.d.ts +0 -1
- package/dist/svelte5/components/index.d.ts +0 -1
- package/dist/svelte5/components-flex/avatar/types.d.ts +0 -1
- package/dist/svelte5/components-flex/button/types.d.ts +0 -3
- package/dist/svelte5/components-flex/button-outlined/types.d.ts +0 -3
- package/dist/svelte5/components-flex/button-text/types.d.ts +0 -3
- package/dist/svelte5/components-flex/form/types.d.ts +35 -20
- package/dist/svelte5/components-flex/form.d.ts +40 -3
- package/dist/svelte5/components-flex/icon/types.d.ts +0 -1
- package/dist/svelte5/components-flex/text/types.d.ts +0 -3
- package/dist/svelte5/components-flex/text-link/types.d.ts +0 -3
- package/dist/svelte5/components-flex/variants.d.ts +0 -15
- package/dist/svelte5/components-flex/youtube/types.d.ts +0 -1
- package/dist/svelte5/constants.d.ts +0 -1
- package/dist/svelte5/hooks/useInjectCustomizeCss.d.ts +1 -1
- package/dist/svelte5/hooks/useText.d.ts +1 -1
- package/dist/svelte5/hydrate/action.d.ts +0 -1
- package/dist/svelte5/hydrate/actionEvent.d.ts +0 -1
- package/dist/svelte5/hydrate/components/index.d.ts +0 -1
- package/dist/svelte5/hydrate/components-flex/avatar/types.d.ts +0 -1
- package/dist/svelte5/hydrate/components-flex/button/types.d.ts +0 -3
- package/dist/svelte5/hydrate/components-flex/button-outlined/types.d.ts +0 -3
- package/dist/svelte5/hydrate/components-flex/button-text/types.d.ts +0 -3
- package/dist/svelte5/hydrate/components-flex/form/types.d.ts +35 -20
- package/dist/svelte5/hydrate/components-flex/form.d.ts +40 -3
- package/dist/svelte5/hydrate/components-flex/icon/types.d.ts +0 -1
- package/dist/svelte5/hydrate/components-flex/text/types.d.ts +0 -3
- package/dist/svelte5/hydrate/components-flex/text-link/types.d.ts +0 -3
- package/dist/svelte5/hydrate/components-flex/variants.d.ts +0 -15
- package/dist/svelte5/hydrate/components-flex/youtube/types.d.ts +0 -1
- package/dist/svelte5/hydrate/constants.d.ts +0 -1
- package/dist/svelte5/hydrate/hooks/useInjectCustomizeCss.d.ts +1 -1
- package/dist/svelte5/hydrate/hooks/useText.d.ts +1 -1
- package/dist/svelte5/hydrate/index.es.d.ts +2 -1
- package/dist/svelte5/hydrate/index.es.js +595 -378
- package/dist/svelte5/hydrate/modal.d.ts +0 -2
- package/dist/svelte5/hydrate/modal.svelte5.d.ts +0 -2
- package/dist/svelte5/hydrate/types.d.ts +0 -1
- package/dist/svelte5/index.es.d.ts +2 -1
- package/dist/svelte5/index.es.js +595 -378
- package/dist/svelte5/index.front2.es.js +637 -417
- package/dist/svelte5/index.svelte5.d.ts +2 -1
- package/dist/svelte5/modal.d.ts +0 -2
- package/dist/svelte5/modal.svelte5.d.ts +0 -2
- package/dist/svelte5/types.d.ts +0 -1
- package/dist/templates.cjs.js +4 -2
- package/dist/templates.d.ts +0 -2
- package/dist/templates.js +4 -2
- package/dist/types.d.ts +0 -1
- package/package.json +3 -3
@@ -1,21 +1,54 @@
|
|
1
1
|
import { Writable } from "svelte/store";
|
2
2
|
import { FormFieldType } from "./form/types.js";
|
3
|
-
export type FormStoreValue = string | string[];
|
3
|
+
export type FormStoreValue = string | string[] | boolean | undefined;
|
4
4
|
export type FormStoreState = {
|
5
5
|
isDirty: boolean;
|
6
6
|
isTouched: boolean;
|
7
7
|
isValid: boolean;
|
8
8
|
errorMessage: string | null;
|
9
|
+
type: FormFieldType;
|
9
10
|
value: FormStoreValue;
|
10
11
|
};
|
11
12
|
export type FormStoreValues = Record<string, FormStoreValue>;
|
13
|
+
export type FormSubmittedValues = Record<string, {
|
14
|
+
value: FormStoreValue;
|
15
|
+
type: FormFieldType;
|
16
|
+
}>;
|
12
17
|
export type FormStoreErrorMessages = Record<string, FormStoreState["errorMessage"]>;
|
13
18
|
export type FormStoreStates = Record<string, FormStoreState>;
|
19
|
+
export declare const FORM_VALIDATION_TYPE: {
|
20
|
+
readonly required: "必須";
|
21
|
+
readonly email: "メールアドレス";
|
22
|
+
readonly tel: "電話番号";
|
23
|
+
readonly url: "URL";
|
24
|
+
readonly minLength: "最小文字数";
|
25
|
+
readonly maxLength: "最大文字数";
|
26
|
+
readonly minCount: "最小個数";
|
27
|
+
readonly maxCount: "最大個数";
|
28
|
+
readonly pattern: "正規表現";
|
29
|
+
};
|
30
|
+
export type FormValidationType = keyof typeof FORM_VALIDATION_TYPE;
|
31
|
+
export declare const FORM_VALIDATION_DEFAULT_ERROR_MESSAGES: Record<FormValidationType, string>;
|
32
|
+
export declare const FORM_VALIDATION_REGEX: {
|
33
|
+
email: string;
|
34
|
+
tel: string;
|
35
|
+
url: string;
|
36
|
+
};
|
37
|
+
export type FormStoreValidation = {
|
38
|
+
id: string;
|
39
|
+
type: FormValidationType;
|
40
|
+
number?: number;
|
41
|
+
regexp?: string;
|
42
|
+
errorMessage?: string;
|
43
|
+
locked?: boolean;
|
44
|
+
};
|
14
45
|
export type FormStoreSchemaInput = {
|
15
46
|
name: string;
|
16
47
|
type: FormFieldType;
|
17
48
|
defaultValue: string | string[];
|
18
49
|
required: boolean;
|
50
|
+
validations?: FormStoreValidation[];
|
51
|
+
isIdentify?: boolean;
|
19
52
|
};
|
20
53
|
export type FormStoreSchema = FormStoreSchemaInput & {
|
21
54
|
statePath: string;
|
@@ -28,7 +61,8 @@ export type FormStore = {
|
|
28
61
|
* @internal
|
29
62
|
*/
|
30
63
|
export declare const formStore: Writable<FormStore>;
|
31
|
-
export declare const formSubmittedValues: Writable<
|
64
|
+
export declare const formSubmittedValues: Writable<FormSubmittedValues>;
|
65
|
+
export declare const formSubmittedIdentifyValues: Writable<FormSubmittedValues>;
|
32
66
|
/**
|
33
67
|
* @public
|
34
68
|
*/
|
@@ -69,17 +103,20 @@ export declare const registerFormField: (schemas: FormStoreSchemaInput | FormSto
|
|
69
103
|
* @public
|
70
104
|
*/
|
71
105
|
export declare const unregisterFormField: (fieldNames: string | string[]) => void;
|
72
|
-
export
|
106
|
+
export type ValidateFormFieldResult = {
|
73
107
|
isValid: true;
|
74
108
|
error: undefined;
|
75
109
|
} | {
|
76
110
|
isValid: false;
|
77
111
|
error: string;
|
78
112
|
};
|
113
|
+
export declare const validateFormField: (schema: FormStoreSchema, value: FormStoreValue) => ValidateFormFieldResult;
|
79
114
|
/**
|
80
115
|
* @public
|
81
116
|
*/
|
82
117
|
export declare function onSubmitForm(fn: (data: {
|
83
118
|
currentStateValues: any;
|
84
119
|
allValues: any;
|
120
|
+
currentStateIdentifyValues: any;
|
121
|
+
allIdentifyValues: any;
|
85
122
|
}) => void): void;
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import type { ClickableProps, CommonProps } from "../props.js";
|
2
|
-
// @ts-ignore -- NOTE(kazupon): error TS2307: Cannot find module 'preact/src/jsx-csstype' or its corresponding type declarations
|
3
2
|
import type { Properties } from "preact/src/jsx-csstype";
|
4
3
|
export declare const ICON_SIZE: {
|
5
4
|
[key: string]: {
|
@@ -1,12 +1,9 @@
|
|
1
1
|
import type { Properties } from "csstype";
|
2
2
|
import type { BackgroundColorProps, BorderProps, ClickableProps, CommonProps, CustomizeCssProps, LinkProps, PaddingProps, RadiusProps, WithIconProps, FontFamilyProps } from "../props.js";
|
3
3
|
export declare const LAYER_TEXT_SIZE: {
|
4
|
-
// extra_small: 'ExtraSmall',
|
5
4
|
readonly small: "本文 / スモール";
|
6
5
|
readonly medium: "本文 / ミディアム";
|
7
6
|
readonly large: "本文 / ラージ";
|
8
|
-
// extra_large: 'ExtraLarge'
|
9
|
-
// MEMO(curtis): 後から調整した関係で見出しは命名と実体を一つずらしている
|
10
7
|
readonly heading_extra_small: "見出し / スモール";
|
11
8
|
readonly heading_small: "見出し / ミディアム";
|
12
9
|
readonly heading_medium: "見出し / ラージ";
|
@@ -21,14 +21,11 @@ export declare const TEXT_LINK_UNDERLINE: {
|
|
21
21
|
};
|
22
22
|
export type TextLinkProps = CommonProps & ClickableProps & LinkProps & FontFamilyProps & WithIconProps & {
|
23
23
|
label: string;
|
24
|
-
// size
|
25
24
|
size?: keyof typeof TEXT_LINK_SIZE;
|
26
25
|
lineHeight?: number;
|
27
26
|
fontSize?: Properties["fontSize"];
|
28
|
-
// theme
|
29
27
|
theme?: keyof typeof TEXT_LINK_THEME;
|
30
28
|
color?: Properties["color"];
|
31
|
-
// others
|
32
29
|
underline?: keyof typeof TEXT_LINK_UNDERLINE;
|
33
30
|
fontWeight?: Properties["fontWeight"];
|
34
31
|
};
|
@@ -21,15 +21,9 @@ type ToVariantArrayReturn<T> = T[keyof T] & {
|
|
21
21
|
code: keyof T;
|
22
22
|
};
|
23
23
|
declare const toVariantArray: <T extends VariantDefinitionGroup>(group: T) => ToVariantArrayReturn<T>[];
|
24
|
-
// ================================
|
25
|
-
// Aspect
|
26
|
-
// ================================
|
27
24
|
export declare const ASPECT_VARIANT: VariantDefinitionGroup<Omit<AspectProps, "aspectVariant">>;
|
28
25
|
export type AspectVariantCode = keyof typeof ASPECT_VARIANT;
|
29
26
|
export declare const ASPECT_VARIANTS: ReturnType<typeof toVariantArray>;
|
30
|
-
// ================================
|
31
|
-
// FontFamily
|
32
|
-
// ================================
|
33
27
|
export type FontVariantMeta = {
|
34
28
|
lang: "ja" | "en";
|
35
29
|
type: "kaku" | "maru" | "min";
|
@@ -42,21 +36,12 @@ type FontFamilyVariantGroup = {
|
|
42
36
|
variants: ReturnType<typeof toVariantArray>;
|
43
37
|
};
|
44
38
|
export declare const FONT_FAMILY_VARIANT_GROUPS: FontFamilyVariantGroup[];
|
45
|
-
// ================================
|
46
|
-
// Shadow
|
47
|
-
// ================================
|
48
39
|
export declare const SHADOW_VARIANT: VariantDefinitionGroup<Omit<ShadowProps, "shadowVariant">>;
|
49
40
|
export type ShadowVariantCode = keyof typeof SHADOW_VARIANT;
|
50
41
|
export declare const SHADOW_VARIANTS: ToVariantArrayReturn<VariantDefinitionGroup<Omit<ShadowProps, "shadowVariant">, object>>[];
|
51
|
-
// ================================
|
52
|
-
// Background
|
53
|
-
// ================================
|
54
42
|
export declare const BACKGROUND_COLOR_VARIANT: VariantDefinitionGroup<Omit<BackgroundColorProps, "backgroundColorVariant">>;
|
55
43
|
export type BackgroundColorVariantCode = keyof typeof BACKGROUND_COLOR_VARIANT;
|
56
44
|
export declare const BACKGROUND_COLOR_VARIANTS: ToVariantArrayReturn<VariantDefinitionGroup<Omit<BackgroundColorProps, "backgroundColorVariant">, object>>[];
|
57
|
-
// ================================
|
58
|
-
// Border
|
59
|
-
// ================================
|
60
45
|
export declare const BORDER_COLOR_VARIANT: VariantDefinitionGroup<Omit<BorderColorProps, "borderColorVariant">>;
|
61
46
|
export type BorderColorVariantCode = keyof typeof BORDER_COLOR_VARIANT;
|
62
47
|
export declare const BORDER_COLOR_VARIANTS: ToVariantArrayReturn<VariantDefinitionGroup<Omit<BorderColorProps, "borderColorVariant">, object>>[];
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import type { CustomizeCssProps } from "../components-flex/props.js";
|
2
|
-
export declare const useInjectCustomizeCss: (props: CustomizeCssProps) => void;
|
2
|
+
export declare const useInjectCustomizeCss: (props: CustomizeCssProps, layerId: string) => void;
|
package/dist/hydrate/index.d.ts
CHANGED
@@ -8,7 +8,6 @@ export { onScroll, onTime } from "./utils.js";
|
|
8
8
|
export type { OnScrollContext, OnScrollFunction, ScrollDirection } from "./utils.js";
|
9
9
|
export { getLogs, getEvents, logger, listenLogger } from "./logger.js";
|
10
10
|
export type { LogLevel, Log, Event } from "./logger.js";
|
11
|
-
// 以下は互換性のため
|
12
11
|
export { hideOnScroll, hideOnTime, showOnScroll, showOnTime } from "./display-logic.js";
|
13
12
|
export * from "./prop.js";
|
14
13
|
export { showAction, closeAction, loadStyle, applyCss, onShow, onClose, onChangeState, getActionRoot, getCssVariables, show, close, ensureModalRoot, createApp, createFog } from "./modal.js";
|
@@ -45,7 +44,6 @@ export { default as Countdown } from "./components/Countdown.svelte.js";
|
|
45
44
|
export { default as Box } from "./components/Box.svelte.js";
|
46
45
|
export { default as IconElement } from "./components/IconElement.svelte.js";
|
47
46
|
export { default as CodeElement } from "./components/CodeElement.svelte.js";
|
48
|
-
// 以下は互換性のため
|
49
47
|
export { default as Flex } from "./components/Flex.svelte.js";
|
50
48
|
export { default as FlexItem } from "./components/FlexItem.svelte.js";
|
51
49
|
export { default as GridModalState } from "./components/GridModalState.svelte.js";
|