@plaidev/karte-action-sdk 1.1.270-29291355.57078a51c → 1.1.270-29364900.6ab45349e

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.
Files changed (161) hide show
  1. package/dist/actionEvent.d.ts +9 -0
  2. package/dist/components-flex/avatar/Avatar.css.d.ts +3 -0
  3. package/dist/components-flex/avatar/types.d.ts +4 -5
  4. package/dist/components-flex/button/Button.css.d.ts +4 -0
  5. package/dist/components-flex/button/types.d.ts +3 -3
  6. package/dist/components-flex/button-outlined/types.d.ts +3 -3
  7. package/dist/components-flex/button-text/types.d.ts +3 -3
  8. package/dist/components-flex/clip-copy/ClipCopy.css.d.ts +3 -0
  9. package/dist/components-flex/clip-copy/types.d.ts +3 -3
  10. package/dist/components-flex/close-button/types.d.ts +3 -3
  11. package/dist/components-flex/code/types.d.ts +3 -3
  12. package/dist/components-flex/count-down/types.d.ts +5 -5
  13. package/dist/components-flex/css.d.ts +5 -0
  14. package/dist/components-flex/embed/types.d.ts +3 -3
  15. package/dist/components-flex/form/types.d.ts +35 -35
  16. package/dist/components-flex/icon/Icon.css.d.ts +4 -0
  17. package/dist/components-flex/icon/types.d.ts +4 -4
  18. package/dist/components-flex/image/types.d.ts +3 -3
  19. package/dist/components-flex/layout/Layout.css.d.ts +4 -0
  20. package/dist/components-flex/layout/types.d.ts +3 -3
  21. package/dist/components-flex/list/types.d.ts +5 -5
  22. package/dist/components-flex/modal/types.d.ts +3 -3
  23. package/dist/components-flex/multi-column/types.d.ts +5 -5
  24. package/dist/components-flex/props.d.ts +8 -1
  25. package/dist/components-flex/responsive.d.ts +26 -0
  26. package/dist/components-flex/slider/types.d.ts +5 -4
  27. package/dist/components-flex/text/Text.css.d.ts +4 -0
  28. package/dist/components-flex/text/types.d.ts +4 -4
  29. package/dist/components-flex/text-link/TextLink.css.d.ts +4 -0
  30. package/dist/components-flex/text-link/types.d.ts +4 -4
  31. package/dist/components-flex/youtube/types.d.ts +3 -3
  32. package/dist/functions.d.ts +4 -2
  33. package/dist/hooks/useClickable.d.ts +3 -1
  34. package/dist/hydrate/actionEvent.d.ts +9 -0
  35. package/dist/hydrate/components-flex/avatar/Avatar.css.d.ts +3 -0
  36. package/dist/hydrate/components-flex/avatar/types.d.ts +4 -5
  37. package/dist/hydrate/components-flex/button/Button.css.d.ts +4 -0
  38. package/dist/hydrate/components-flex/button/types.d.ts +3 -3
  39. package/dist/hydrate/components-flex/button-outlined/types.d.ts +3 -3
  40. package/dist/hydrate/components-flex/button-text/types.d.ts +3 -3
  41. package/dist/hydrate/components-flex/clip-copy/ClipCopy.css.d.ts +3 -0
  42. package/dist/hydrate/components-flex/clip-copy/types.d.ts +3 -3
  43. package/dist/hydrate/components-flex/close-button/types.d.ts +3 -3
  44. package/dist/hydrate/components-flex/code/types.d.ts +3 -3
  45. package/dist/hydrate/components-flex/count-down/types.d.ts +5 -5
  46. package/dist/hydrate/components-flex/css.d.ts +5 -0
  47. package/dist/hydrate/components-flex/embed/types.d.ts +3 -3
  48. package/dist/hydrate/components-flex/form/types.d.ts +35 -35
  49. package/dist/hydrate/components-flex/icon/Icon.css.d.ts +4 -0
  50. package/dist/hydrate/components-flex/icon/types.d.ts +4 -4
  51. package/dist/hydrate/components-flex/image/types.d.ts +3 -3
  52. package/dist/hydrate/components-flex/layout/Layout.css.d.ts +4 -0
  53. package/dist/hydrate/components-flex/layout/types.d.ts +3 -3
  54. package/dist/hydrate/components-flex/list/types.d.ts +5 -5
  55. package/dist/hydrate/components-flex/modal/types.d.ts +3 -3
  56. package/dist/hydrate/components-flex/multi-column/types.d.ts +5 -5
  57. package/dist/hydrate/components-flex/props.d.ts +8 -1
  58. package/dist/hydrate/components-flex/responsive.d.ts +26 -0
  59. package/dist/hydrate/components-flex/slider/types.d.ts +5 -4
  60. package/dist/hydrate/components-flex/text/Text.css.d.ts +4 -0
  61. package/dist/hydrate/components-flex/text/types.d.ts +4 -4
  62. package/dist/hydrate/components-flex/text-link/TextLink.css.d.ts +4 -0
  63. package/dist/hydrate/components-flex/text-link/types.d.ts +4 -4
  64. package/dist/hydrate/components-flex/youtube/types.d.ts +3 -3
  65. package/dist/hydrate/functions.d.ts +4 -2
  66. package/dist/hydrate/hooks/useClickable.d.ts +3 -1
  67. package/dist/hydrate/index.es.js +2755 -1520
  68. package/dist/hydrate/index.svelte5.d.ts +1 -0
  69. package/dist/hydrate/modal.svelte5.d.ts +1 -1
  70. package/dist/hydrate/prop.d.ts +23 -0
  71. package/dist/hydrate/stores.d.ts +28 -1
  72. package/dist/hydrate/utils.d.ts +1 -0
  73. package/dist/index.es.js +2634 -1484
  74. package/dist/modal.svelte5.d.ts +1 -1
  75. package/dist/prop.d.ts +23 -0
  76. package/dist/stores.d.ts +28 -1
  77. package/dist/svelte5/actionEvent.d.ts +9 -0
  78. package/dist/svelte5/components-flex/avatar/Avatar.css.d.ts +3 -0
  79. package/dist/svelte5/components-flex/avatar/types.d.ts +4 -5
  80. package/dist/svelte5/components-flex/button/Button.css.d.ts +4 -0
  81. package/dist/svelte5/components-flex/button/types.d.ts +3 -3
  82. package/dist/svelte5/components-flex/button-outlined/types.d.ts +3 -3
  83. package/dist/svelte5/components-flex/button-text/types.d.ts +3 -3
  84. package/dist/svelte5/components-flex/clip-copy/ClipCopy.css.d.ts +3 -0
  85. package/dist/svelte5/components-flex/clip-copy/types.d.ts +3 -3
  86. package/dist/svelte5/components-flex/close-button/types.d.ts +3 -3
  87. package/dist/svelte5/components-flex/code/types.d.ts +3 -3
  88. package/dist/svelte5/components-flex/count-down/types.d.ts +5 -5
  89. package/dist/svelte5/components-flex/css.d.ts +5 -0
  90. package/dist/svelte5/components-flex/embed/types.d.ts +3 -3
  91. package/dist/svelte5/components-flex/form/types.d.ts +35 -35
  92. package/dist/svelte5/components-flex/icon/Icon.css.d.ts +4 -0
  93. package/dist/svelte5/components-flex/icon/types.d.ts +4 -4
  94. package/dist/svelte5/components-flex/image/types.d.ts +3 -3
  95. package/dist/svelte5/components-flex/layout/Layout.css.d.ts +4 -0
  96. package/dist/svelte5/components-flex/layout/types.d.ts +3 -3
  97. package/dist/svelte5/components-flex/list/types.d.ts +5 -5
  98. package/dist/svelte5/components-flex/modal/types.d.ts +3 -3
  99. package/dist/svelte5/components-flex/multi-column/types.d.ts +5 -5
  100. package/dist/svelte5/components-flex/props.d.ts +8 -1
  101. package/dist/svelte5/components-flex/responsive.d.ts +26 -0
  102. package/dist/svelte5/components-flex/slider/types.d.ts +5 -4
  103. package/dist/svelte5/components-flex/text/Text.css.d.ts +4 -0
  104. package/dist/svelte5/components-flex/text/types.d.ts +4 -4
  105. package/dist/svelte5/components-flex/text-link/TextLink.css.d.ts +4 -0
  106. package/dist/svelte5/components-flex/text-link/types.d.ts +4 -4
  107. package/dist/svelte5/components-flex/youtube/types.d.ts +3 -3
  108. package/dist/svelte5/functions.d.ts +4 -2
  109. package/dist/svelte5/hooks/useClickable.d.ts +3 -1
  110. package/dist/svelte5/hydrate/actionEvent.d.ts +9 -0
  111. package/dist/svelte5/hydrate/components-flex/avatar/Avatar.css.d.ts +3 -0
  112. package/dist/svelte5/hydrate/components-flex/avatar/types.d.ts +4 -5
  113. package/dist/svelte5/hydrate/components-flex/button/Button.css.d.ts +4 -0
  114. package/dist/svelte5/hydrate/components-flex/button/types.d.ts +3 -3
  115. package/dist/svelte5/hydrate/components-flex/button-outlined/types.d.ts +3 -3
  116. package/dist/svelte5/hydrate/components-flex/button-text/types.d.ts +3 -3
  117. package/dist/svelte5/hydrate/components-flex/clip-copy/ClipCopy.css.d.ts +3 -0
  118. package/dist/svelte5/hydrate/components-flex/clip-copy/types.d.ts +3 -3
  119. package/dist/svelte5/hydrate/components-flex/close-button/types.d.ts +3 -3
  120. package/dist/svelte5/hydrate/components-flex/code/types.d.ts +3 -3
  121. package/dist/svelte5/hydrate/components-flex/count-down/types.d.ts +5 -5
  122. package/dist/svelte5/hydrate/components-flex/css.d.ts +5 -0
  123. package/dist/svelte5/hydrate/components-flex/embed/types.d.ts +3 -3
  124. package/dist/svelte5/hydrate/components-flex/form/types.d.ts +35 -35
  125. package/dist/svelte5/hydrate/components-flex/icon/Icon.css.d.ts +4 -0
  126. package/dist/svelte5/hydrate/components-flex/icon/types.d.ts +4 -4
  127. package/dist/svelte5/hydrate/components-flex/image/types.d.ts +3 -3
  128. package/dist/svelte5/hydrate/components-flex/layout/Layout.css.d.ts +4 -0
  129. package/dist/svelte5/hydrate/components-flex/layout/types.d.ts +3 -3
  130. package/dist/svelte5/hydrate/components-flex/list/types.d.ts +5 -5
  131. package/dist/svelte5/hydrate/components-flex/modal/types.d.ts +3 -3
  132. package/dist/svelte5/hydrate/components-flex/multi-column/types.d.ts +5 -5
  133. package/dist/svelte5/hydrate/components-flex/props.d.ts +8 -1
  134. package/dist/svelte5/hydrate/components-flex/responsive.d.ts +26 -0
  135. package/dist/svelte5/hydrate/components-flex/slider/types.d.ts +5 -4
  136. package/dist/svelte5/hydrate/components-flex/text/Text.css.d.ts +4 -0
  137. package/dist/svelte5/hydrate/components-flex/text/types.d.ts +4 -4
  138. package/dist/svelte5/hydrate/components-flex/text-link/TextLink.css.d.ts +4 -0
  139. package/dist/svelte5/hydrate/components-flex/text-link/types.d.ts +4 -4
  140. package/dist/svelte5/hydrate/components-flex/youtube/types.d.ts +3 -3
  141. package/dist/svelte5/hydrate/functions.d.ts +4 -2
  142. package/dist/svelte5/hydrate/hooks/useClickable.d.ts +3 -1
  143. package/dist/svelte5/hydrate/index.es.d.ts +1 -0
  144. package/dist/svelte5/hydrate/index.es.js +1882 -1176
  145. package/dist/svelte5/hydrate/modal.svelte5.d.ts +1 -1
  146. package/dist/svelte5/hydrate/prop.d.ts +23 -0
  147. package/dist/svelte5/hydrate/stores.d.ts +28 -1
  148. package/dist/svelte5/hydrate/utils.d.ts +1 -0
  149. package/dist/svelte5/index.es.d.ts +1 -0
  150. package/dist/svelte5/index.es.js +1882 -1176
  151. package/dist/svelte5/index.front2.es.js +1881 -1175
  152. package/dist/svelte5/index.svelte5.d.ts +1 -0
  153. package/dist/svelte5/modal.svelte5.d.ts +1 -1
  154. package/dist/svelte5/prop.d.ts +23 -0
  155. package/dist/svelte5/stores.d.ts +28 -1
  156. package/dist/svelte5/utils.d.ts +1 -0
  157. package/dist/templates.cjs.js +4 -2
  158. package/dist/templates.d.ts +3 -0
  159. package/dist/templates.js +4 -2
  160. package/dist/utils.d.ts +1 -0
  161. package/package.json +3 -12
@@ -102,7 +102,7 @@ export declare function getCssVariables(data: {
102
102
  *
103
103
  * @public
104
104
  */
105
- export declare function getActionRoot(): ShadowRoot | null;
105
+ export declare function getActionRoot(): HTMLElement | ShadowRoot | null;
106
106
  /** @internal */
107
107
  export declare function createModal<
108
108
  Props extends ModalProps,
package/dist/prop.d.ts CHANGED
@@ -62,6 +62,8 @@ type OperationArgumentTypes = {
62
62
  BooleanKeyword: boolean;
63
63
  NumberKeyword: number;
64
64
  TransitState: string;
65
+ SliderId: string;
66
+ SliderSlideTarget: string;
65
67
  Url: string;
66
68
  Color: string;
67
69
  Handler: string;
@@ -116,6 +118,25 @@ export declare const OnClickOperationOptions: readonly [{
116
118
  readonly type: "TransitState";
117
119
  readonly default: "/";
118
120
  }];
121
+ }, {
122
+ readonly operation: "slideTo";
123
+ readonly args: readonly [{
124
+ readonly name: "name";
125
+ readonly type: "SliderId";
126
+ readonly default: "";
127
+ }, {
128
+ readonly name: "target";
129
+ readonly type: "SliderSlideTarget";
130
+ readonly default: "next";
131
+ }, {
132
+ readonly name: "slideNumber";
133
+ readonly type: "NumberKeyword";
134
+ readonly default: 1;
135
+ }, {
136
+ readonly name: "hiddenIsDisabled";
137
+ readonly type: "BooleanKeyword";
138
+ readonly default: false;
139
+ }];
119
140
  }, {
120
141
  readonly operation: "callNativeFunction";
121
142
  readonly args: readonly [{
@@ -213,6 +234,8 @@ export type LongText = string;
213
234
  /** @internal */
214
235
  export type Url = string;
215
236
  /** @internal */
237
+ export type SliderTarget = "next" | "prev" | "first" | "end" | "number";
238
+ /** @internal */
216
239
  export type RegExpProp = {
217
240
  pattern: string;
218
241
  flags: string;
package/dist/stores.d.ts CHANGED
@@ -121,13 +121,20 @@ export declare function getState(): string;
121
121
  */
122
122
  export declare const states: Store<string[]>;
123
123
  /**
124
+ * Store to handle all state names
125
+ *
126
+ * @internal
127
+ */
128
+ export declare const stateNames: Store<string[]>;
129
+ /**
124
130
  * {@link getStates} function to add new state ID to list of state IDs.
125
131
  *
126
132
  * @param stateId - New state ID
133
+ * @param stateName - New state Name
127
134
  *
128
135
  * @internal
129
136
  */
130
- export declare function addState(stateId: string): void;
137
+ export declare function addState(stateId: string, stateName?: string): void;
131
138
  /**
132
139
  * ステートID一覧を取得する
133
140
  *
@@ -140,6 +147,17 @@ export declare function addState(stateId: string): void;
140
147
  */
141
148
  export declare function getStates(): string[];
142
149
  /**
150
+ * ステート名一覧を取得する
151
+ *
152
+ * @remarks
153
+ * アクションが表示されて設定されるため、{@link onShow} フック関数で利用できます。
154
+ *
155
+ * @returns すべてのステート名
156
+ *
157
+ * @public
158
+ */
159
+ export declare function getStateNames(): string[];
160
+ /**
143
161
  * Store to handle visibility of action
144
162
  *
145
163
  * @internal
@@ -386,3 +404,12 @@ export interface FormFieldSchema {
386
404
  * @internal
387
405
  */
388
406
  export declare const formFields: Writable_<FormData>;
407
+ /** @internal */
408
+ export interface SliderData {
409
+ [name: string]: {
410
+ currentIndex: number;
411
+ slides: number;
412
+ loop: boolean;
413
+ };
414
+ }
415
+ export declare const sliderStates: Writable_<SliderData>;
@@ -12,11 +12,20 @@ export declare const ACTION_CHANGE_STATE_EVENT: string;
12
12
  /** @internal */
13
13
  export declare const send_event: (event_name: string, values?: any) => void;
14
14
  /** @internal */
15
+ export declare const toStateChangedData: (newState: string, oldState: string) => {
16
+ newState: string;
17
+ oldState: string;
18
+ newVal: number;
19
+ oldVal: number;
20
+ };
21
+ /** @internal */
15
22
  export declare const publish_edge: (topic: string, values?: any) => void;
16
23
  /** @internal */
17
24
  export declare const initialize: (setting?: ActionSetting) => () => void;
18
25
  /** @internal */
19
26
  export declare const finalize: () => void;
27
+ /** @internal */
28
+ export declare function dispatchActionEvent(eventName: string, data?: object): void;
20
29
  /**
21
30
  * Dispatch the event to destroy KARTE action
22
31
  *
@@ -0,0 +1,3 @@
1
+ import { AvatarProps } from "./types.js";
2
+ declare const _default: (layerId: string, props: AvatarProps) => string;
3
+ export default _default;
@@ -1,5 +1,5 @@
1
- import type { BorderProps, ClickableProps, CommonProps, PaddingProps } from "../props.js";
2
- import type { Properties } from "csstype";
1
+ import type { BorderProps, ClickableProps, CommonProps, FlexComponentProps, PaddingProps } from "../props.js";
2
+ import { Properties } from "csstype";
3
3
  export declare const AVATAR_SIZE: {
4
4
  readonly extra_small: "XS(48 x 48)";
5
5
  readonly small: "S(64 x 64)";
@@ -12,7 +12,7 @@ export declare const AVATAR_SHAPE: {
12
12
  readonly square: "スクエア";
13
13
  readonly rounded: "ラウンド";
14
14
  };
15
- export type AvatarProps = CommonProps & ClickableProps & PaddingProps & BorderProps & {
15
+ export type AvatarProps = FlexComponentProps<CommonProps & ClickableProps & PaddingProps & BorderProps & {
16
16
  size?: keyof typeof AVATAR_SIZE | number;
17
17
  width?: Properties["width"];
18
18
  height?: Properties["height"];
@@ -20,5 +20,4 @@ export type AvatarProps = CommonProps & ClickableProps & PaddingProps & BorderPr
20
20
  image?: string;
21
21
  caption?: string;
22
22
  alt?: string;
23
- };
24
- export declare const avatarPropsDefault: AvatarProps;
23
+ }>;
@@ -0,0 +1,4 @@
1
+ import { ButtonProps } from "./types.js";
2
+ import { BrandKit } from "../brand-kit.js";
3
+ declare const _default: (layerId: string, props: ButtonProps, brandKit?: BrandKit) => string;
4
+ export default _default;
@@ -1,5 +1,5 @@
1
1
  import type { Properties } from "csstype";
2
- import type { BorderProps, ClickableProps, CommonProps, LinkProps, ShadowProps, WithIconProps, RadiusProps } from "../props.js";
2
+ import type { BorderProps, ClickableProps, CommonProps, LinkProps, ShadowProps, WithIconProps, RadiusProps, FlexComponentProps } from "../props.js";
3
3
  export declare const BUTTON_SIZE: {
4
4
  readonly extra_small: "エクストラ スモール";
5
5
  readonly small: "スモール";
@@ -37,7 +37,7 @@ export declare const BUTTON_ICON_ANGLE: {
37
37
  readonly row: "左側";
38
38
  readonly "row-reverse": "右側";
39
39
  };
40
- export type ButtonProps = CommonProps & ClickableProps & ShadowProps & LinkProps & WithIconProps & RadiusProps & BorderProps & {
40
+ export type ButtonProps = FlexComponentProps<CommonProps & ClickableProps & ShadowProps & LinkProps & WithIconProps & RadiusProps & BorderProps & {
41
41
  label?: string;
42
42
  size?: keyof typeof BUTTON_SIZE | string;
43
43
  height?: Properties["height"];
@@ -53,5 +53,5 @@ export type ButtonProps = CommonProps & ClickableProps & ShadowProps & LinkProps
53
53
  round?: keyof typeof BUTTON_ROUND;
54
54
  width?: Properties["width"];
55
55
  wrap?: "wrap" | "nowrap";
56
- };
56
+ }>;
57
57
  export declare const buttonPropsDefault: ButtonProps;
@@ -1,7 +1,7 @@
1
1
  import type { Properties } from "csstype";
2
- import type { BorderProps, ClickableProps, CommonProps, LinkProps, ShadowProps, WithIconProps } from "../props.js";
2
+ import type { BorderProps, ClickableProps, CommonProps, LinkProps, ShadowProps, WithIconProps, FlexComponentProps } from "../props.js";
3
3
  import type { BUTTON_THEME, BUTTON_ROUND, BUTTON_SIZE } from "../button/types.js";
4
- export type ButtonOutlinedProps = CommonProps & ClickableProps & ShadowProps & WithIconProps & LinkProps & BorderProps & {
4
+ export type ButtonOutlinedProps = FlexComponentProps<CommonProps & ClickableProps & ShadowProps & WithIconProps & LinkProps & BorderProps & {
5
5
  label?: string;
6
6
  size?: keyof typeof BUTTON_SIZE;
7
7
  height?: Properties["height"];
@@ -16,5 +16,5 @@ export type ButtonOutlinedProps = CommonProps & ClickableProps & ShadowProps & W
16
16
  round?: keyof typeof BUTTON_ROUND;
17
17
  fontWeight?: Properties["fontWeight"];
18
18
  wrap?: "wrap" | "nowrap";
19
- };
19
+ }>;
20
20
  export declare const buttonOutlinedPropsDefault: ButtonOutlinedProps;
@@ -1,5 +1,5 @@
1
1
  import type { Properties } from "csstype";
2
- import type { ClickableProps, CommonProps, LinkProps, WithIconProps } from "../props.js";
2
+ import type { ClickableProps, CommonProps, LinkProps, WithIconProps, FlexComponentProps } from "../props.js";
3
3
  import type { BUTTON_ROUND } from "../button/types.js";
4
4
  export declare const BUTTON_TEXT_SIZE: {
5
5
  readonly small: "Small";
@@ -16,7 +16,7 @@ export declare const BUTTON_TEXT_THEME: {
16
16
  readonly info: "Info";
17
17
  readonly white: "White";
18
18
  };
19
- export type ButtonTextProps = CommonProps & ClickableProps & LinkProps & WithIconProps & {
19
+ export type ButtonTextProps = FlexComponentProps<CommonProps & ClickableProps & LinkProps & WithIconProps & {
20
20
  label?: string;
21
21
  size?: keyof typeof BUTTON_TEXT_SIZE;
22
22
  height?: Properties["height"];
@@ -30,4 +30,4 @@ export type ButtonTextProps = CommonProps & ClickableProps & LinkProps & WithIco
30
30
  width?: Properties["width"];
31
31
  round?: keyof typeof BUTTON_ROUND;
32
32
  wrap?: "wrap" | "nowrap";
33
- };
33
+ }>;
@@ -0,0 +1,3 @@
1
+ import { ClipboardProps } from "./types.js";
2
+ declare const _default: (layerId: string, _props: ClipboardProps) => string;
3
+ export default _default;
@@ -1,6 +1,6 @@
1
- import type { CommonProps } from "../props.js";
2
- export type ClipboardProps = CommonProps & {
1
+ import type { CommonProps, FlexComponentProps } from "../props.js";
2
+ export type ClipboardProps = FlexComponentProps<CommonProps & {
3
3
  content?: string;
4
4
  copiedEventName?: string;
5
5
  noneTooltip?: boolean;
6
- };
6
+ }>;
@@ -1,4 +1,4 @@
1
- import type { BorderProps, ClickableProps, CommonProps, BackgroundColorProps, ColorProps, PaddingProps } from "../props.js";
1
+ import type { BorderProps, ClickableProps, CommonProps, BackgroundColorProps, ColorProps, PaddingProps, FlexComponentProps } from "../props.js";
2
2
  import type { Properties } from "csstype";
3
3
  import type { TEXT_THEME } from "../text/types.js";
4
4
  export declare const CLOSE_BUTTON_PLACEMENT: {
@@ -16,7 +16,7 @@ export declare const CLOSE_BUTTON_LABEL_PLACEMENT: {
16
16
  readonly right: "right";
17
17
  readonly left: "left";
18
18
  };
19
- export type CloseButtonProps = CommonProps & BackgroundColorProps & ClickableProps & ColorProps & PaddingProps & BorderProps & {
19
+ export type CloseButtonProps = FlexComponentProps<CommonProps & BackgroundColorProps & ClickableProps & ColorProps & PaddingProps & BorderProps & {
20
20
  size?: number;
21
21
  placement?: keyof typeof CLOSE_BUTTON_PLACEMENT;
22
22
  round?: keyof typeof CLOSE_BUTTON_ROUND;
@@ -29,4 +29,4 @@ export type CloseButtonProps = CommonProps & BackgroundColorProps & ClickablePro
29
29
  right?: Properties["right"];
30
30
  left?: Properties["left"];
31
31
  bottom?: Properties["bottom"];
32
- };
32
+ }>;
@@ -1,6 +1,6 @@
1
- import type { CommonProps } from "../props.js";
2
- export type CodeProps = CommonProps & {
1
+ import type { CommonProps, FlexComponentProps } from "../props.js";
2
+ export type CodeProps = FlexComponentProps<CommonProps & {
3
3
  rawHtml?: string;
4
4
  rawCss?: string;
5
5
  rawScript?: string;
6
- };
6
+ }>;
@@ -1,14 +1,14 @@
1
- import type { CommonProps } from "../props.js";
1
+ import type { CommonProps, FlexComponentProps } from "../props.js";
2
2
  import type { OnClickOperation } from "../../prop.js";
3
3
  import type { LayerTextProps } from "../text/types.js";
4
- export type CountDownProps = CommonProps & {
4
+ export type CountDownProps = FlexComponentProps<CommonProps & {
5
5
  timeLimit?: string;
6
6
  onEnd?: OnClickOperation;
7
- };
7
+ }>;
8
8
  export type CountDownValueType = "day" | "hour" | "minute" | "second";
9
- export type CountDownValueProps = LayerTextProps & {
9
+ export type CountDownValueProps = FlexComponentProps<LayerTextProps & {
10
10
  type: CountDownValueType;
11
- };
11
+ }>;
12
12
  export type CountDownValues = {
13
13
  day: number;
14
14
  hour: number;
@@ -0,0 +1,5 @@
1
+ import { Properties } from "csstype";
2
+ import { ResponsiveSetting } from "./responsive.js";
3
+ export declare function createComponentRawCss(layerId: string, define: (style: (selector: string, styles: Properties) => string) => string[]): string;
4
+ export declare function toResponsiveSelector(responsiveSetting: ResponsiveSetting<any>, body: string): string;
5
+ export declare function toStyleTag(css: string): string;
@@ -1,7 +1,7 @@
1
- import type { CommonProps, AspectProps } from "../props.js";
1
+ import type { CommonProps, AspectProps, FlexComponentProps } from "../props.js";
2
2
  import type { Properties } from "csstype";
3
- export type EmbedProps = CommonProps & AspectProps & {
3
+ export type EmbedProps = FlexComponentProps<CommonProps & AspectProps & {
4
4
  iframe?: string;
5
5
  width?: Properties["width"];
6
6
  height?: Properties["height"];
7
- };
7
+ }>;
@@ -1,9 +1,6 @@
1
- import type { CommonProps } from "../props.js";
1
+ import type { CommonProps, FlexComponentProps } from "../props.js";
2
2
  import { Properties } from "csstype";
3
3
  import { FormStoreValidation } from "../form.js";
4
- export type FormProps = CommonProps & {
5
- fields: FormField[];
6
- };
7
4
  export declare const FORM_FIELD_LABEL_SIZE: {
8
5
  readonly small: "スモール";
9
6
  readonly medium: "ミディアム";
@@ -23,29 +20,7 @@ export declare const FORM_IDENTIFY_FIELD_TYPE: {
23
20
  readonly last_name: "名前(姓)";
24
21
  readonly address: "住所";
25
22
  };
26
- type FieldProps = CommonProps & {
27
- required?: boolean;
28
- defaultValue?: string | string[];
29
- validations?: FormStoreValidation[];
30
- direction?: "row" | "column";
31
- gap?: Properties["rowGap"];
32
- showLabel?: boolean;
33
- label?: string;
34
- labelWidth?: Properties["width"];
35
- labelSize?: keyof typeof FORM_FIELD_LABEL_SIZE | string;
36
- labelTheme?: keyof typeof FORM_FIELD_LABEL_THEME | string;
37
- };
38
- export type FormFieldProps = CommonProps & FieldProps & {
39
- fieldName?: string;
40
- fieldType?: FormFieldType;
41
- isIdentify?: boolean;
42
- };
43
23
  export type FormIdentifyFieldType = keyof typeof FORM_IDENTIFY_FIELD_TYPE;
44
- export type FormIdentifyFieldProps = CommonProps & FieldProps & {
45
- identifyType: FormIdentifyFieldType;
46
- inputProps?: FormInputStyleProps;
47
- checkerProps?: FormCheckerStyleProps & FormOptionsProps;
48
- };
49
24
  export declare const FORM_FIELD_TYPE: {
50
25
  readonly INPUT: "input";
51
26
  readonly SELECT: "select";
@@ -98,21 +73,46 @@ export type FormInputStyleProps = {
98
73
  fontColor?: string;
99
74
  placeholderColor?: string;
100
75
  };
101
- export type FormInputProps = FormFieldProps & FormInputStyleProps & {
102
- inputType?: FormInputType;
76
+ export type FormProps = FlexComponentProps<CommonProps & {
77
+ fields: FormField[];
78
+ }>;
79
+ type FieldProps = CommonProps & {
80
+ required?: boolean;
81
+ defaultValue?: string | string[];
82
+ validations?: FormStoreValidation[];
83
+ direction?: "row" | "column";
84
+ gap?: Properties["rowGap"];
85
+ showLabel?: boolean;
86
+ label?: string;
87
+ labelWidth?: Properties["width"];
88
+ labelSize?: keyof typeof FORM_FIELD_LABEL_SIZE | string;
89
+ labelTheme?: keyof typeof FORM_FIELD_LABEL_THEME | string;
103
90
  };
104
- export type FormTextareaProps = FormFieldProps & FormInputStyleProps & {
91
+ export type FormFieldProps = FlexComponentProps<CommonProps & FieldProps & {
92
+ fieldName?: string;
93
+ fieldType?: FormFieldType;
94
+ isIdentify?: boolean;
95
+ }>;
96
+ export type FormIdentifyFieldProps = FlexComponentProps<CommonProps & FieldProps & {
97
+ identifyType: FormIdentifyFieldType;
98
+ inputProps?: FormInputStyleProps;
99
+ checkerProps?: FormCheckerStyleProps & FormOptionsProps;
100
+ }>;
101
+ export type FormInputProps = FlexComponentProps<FormFieldProps & FormInputStyleProps & {
102
+ inputType?: FormInputType;
103
+ }>;
104
+ export type FormTextareaProps = FlexComponentProps<FormFieldProps & FormInputStyleProps & {
105
105
  rows?: number;
106
- };
106
+ }>;
107
107
  export type FormOptionsProps = {
108
108
  options?: {
109
109
  label: string;
110
110
  value: string;
111
111
  }[];
112
112
  };
113
- export type FormSelectProps = FormFieldProps & FormInputStyleProps & FormOptionsProps & {
113
+ export type FormSelectProps = FlexComponentProps<FormFieldProps & FormInputStyleProps & FormOptionsProps & {
114
114
  variant?: FormFieldVariant;
115
- };
115
+ }>;
116
116
  export type FormCheckerStyleProps = {
117
117
  variant?: FormFieldVariantForChecker;
118
118
  layout?: "vertical" | "horizontal" | "grid";
@@ -125,7 +125,7 @@ export type FormCheckerStyleProps = {
125
125
  backgroundColor?: string;
126
126
  size?: FormFieldSize;
127
127
  };
128
- export type FormCheckboxesProps = FormFieldProps & FormOptionsProps & FormCheckerStyleProps;
129
- export type FormRadiosProps = FormFieldProps & FormOptionsProps & FormCheckerStyleProps;
130
- export type FormBooleanProps = FormFieldProps & FormOptionsProps & FormCheckerStyleProps;
128
+ export type FormCheckboxesProps = FlexComponentProps<FormFieldProps & FormOptionsProps & FormCheckerStyleProps>;
129
+ export type FormRadiosProps = FlexComponentProps<FormFieldProps & FormOptionsProps & FormCheckerStyleProps>;
130
+ export type FormBooleanProps = FlexComponentProps<FormFieldProps & FormOptionsProps & FormCheckerStyleProps>;
131
131
  export {};
@@ -0,0 +1,4 @@
1
+ import { IconProps } from "./types.js";
2
+ import { BrandKit } from "../brand-kit.js";
3
+ declare const _default: (layerId: string, props: IconProps, _brandKit?: BrandKit) => string;
4
+ export default _default;
@@ -1,4 +1,4 @@
1
- import type { ClickableProps, CommonProps } from "../props.js";
1
+ import type { ClickableProps, CommonProps, FlexComponentProps } from "../props.js";
2
2
  import type { Properties } from "preact/src/jsx-csstype";
3
3
  export declare const ICON_SIZE: {
4
4
  [key: string]: {
@@ -9,10 +9,10 @@ export declare const ICON_SIZE: {
9
9
  export declare const ICON_VARIANTS: {
10
10
  [key: string]: any;
11
11
  };
12
- export type IconProps = CommonProps & ClickableProps & {
13
- variant: string;
12
+ export type IconProps = FlexComponentProps<CommonProps & ClickableProps & {
13
+ variant?: string;
14
14
  size?: keyof typeof ICON_SIZE;
15
15
  color?: Properties["color"];
16
16
  width?: Properties["width"];
17
17
  height?: Properties["height"];
18
- };
18
+ }>;
@@ -1,5 +1,5 @@
1
1
  import type { Properties } from "csstype";
2
- import type { CommonProps, BorderProps, ClickableProps, AspectProps, RadiusProps, PaddingProps } from "../props.js";
2
+ import type { CommonProps, BorderProps, ClickableProps, AspectProps, RadiusProps, PaddingProps, FlexComponentProps } from "../props.js";
3
3
  export declare const IMAGE_ROUND_SHAPE: {
4
4
  readonly circle: "ラウンド / ミディアム";
5
5
  readonly rounded: "ラウンド / スモール";
@@ -17,10 +17,10 @@ export declare const IMAGE_ASPECT_VARIANTS: {
17
17
  "3/4": string;
18
18
  "9/16": string;
19
19
  };
20
- export type ImageProps = CommonProps & ClickableProps & AspectProps & RadiusProps & PaddingProps & BorderProps & {
20
+ export type ImageProps = FlexComponentProps<CommonProps & ClickableProps & AspectProps & RadiusProps & PaddingProps & BorderProps & {
21
21
  image?: string;
22
22
  width?: Properties["width"];
23
23
  height?: Properties["height"];
24
24
  alt?: string;
25
25
  shape?: keyof typeof IMAGE_ROUND_SHAPE;
26
- };
26
+ }>;
@@ -0,0 +1,4 @@
1
+ import { LayerLayoutProps } from "./types.js";
2
+ import { BrandKit } from "../brand-kit.js";
3
+ declare const _default: (layerId: string, props: LayerLayoutProps, brandKit?: BrandKit) => string;
4
+ export default _default;
@@ -1,5 +1,5 @@
1
1
  import type { Properties } from "csstype";
2
- import type { BorderProps, ClickableProps, CommonProps, OverflowProps, PaddingProps, RadiusProps, ShadowProps, BackgroundProps } from "../props.js";
2
+ import type { BorderProps, ClickableProps, CommonProps, OverflowProps, PaddingProps, RadiusProps, ShadowProps, BackgroundProps, FlexComponentProps } from "../props.js";
3
3
  export declare const LAYOUT_DISPLAY_TYPE: readonly ["inline-flex", "flex", "block"];
4
4
  export type LayoutDisplayType = (typeof LAYOUT_DISPLAY_TYPE)[number];
5
5
  export declare const LAYOUT_DIRECTION: readonly ["column", "column-reverse", "row", "row-reverse"];
@@ -8,7 +8,7 @@ export declare const LAYOUT_ALIGN: readonly ["flex-start", "center", "flex-end",
8
8
  export type LayoutFlexAlign = (typeof LAYOUT_ALIGN)[number];
9
9
  export declare const LAYOUT_JUSTIFY: readonly ["flex-start", "center", "flex-end", "space-between"];
10
10
  export type LayoutFlexJustify = (typeof LAYOUT_JUSTIFY)[number];
11
- export type LayerLayoutProps = CommonProps & ClickableProps & OverflowProps & BorderProps & RadiusProps & ShadowProps & BackgroundProps & PaddingProps & {
11
+ export type LayerLayoutProps = FlexComponentProps<CommonProps & ClickableProps & OverflowProps & BorderProps & RadiusProps & ShadowProps & BackgroundProps & PaddingProps & {
12
12
  display?: LayoutDisplayType;
13
13
  direction?: LayoutFlexDirection;
14
14
  align?: LayoutFlexAlign;
@@ -19,4 +19,4 @@ export type LayerLayoutProps = CommonProps & ClickableProps & OverflowProps & Bo
19
19
  width?: Properties["width"];
20
20
  maxWidth?: Properties["maxWidth"];
21
21
  height?: Properties["height"];
22
- };
22
+ }>;
@@ -1,6 +1,6 @@
1
1
  import type { Properties } from "csstype";
2
- import type { CommonProps, ClickableProps, ActionTableProps, BorderSingleProps } from "../props.js";
3
- export type ListProps = CommonProps & BorderSingleProps & ActionTableProps & {
2
+ import type { CommonProps, ClickableProps, ActionTableProps, BorderSingleProps, FlexComponentProps } from "../props.js";
3
+ export type ListProps = FlexComponentProps<CommonProps & BorderSingleProps & ActionTableProps & {
4
4
  gap?: Properties["gap"];
5
5
  width?: Properties["width"];
6
6
  itemPaddingTop?: Properties["paddingTop"];
@@ -9,10 +9,10 @@ export type ListProps = CommonProps & BorderSingleProps & ActionTableProps & {
9
9
  itemPaddingBottom?: Properties["paddingBottom"];
10
10
  itemHeight?: Properties["height"];
11
11
  itemGap?: Properties["gap"];
12
- };
13
- export type ListItemProps = CommonProps & ClickableProps & {
12
+ }>;
13
+ export type ListItemProps = FlexComponentProps<CommonProps & ClickableProps & {
14
14
  gap?: number;
15
- };
15
+ }>;
16
16
  export declare const LIST_ITEM_CONTEXT_KEY = "ListItemContext";
17
17
  export type ListItemContext = {
18
18
  paddingTop?: Properties["paddingTop"];
@@ -1,5 +1,5 @@
1
1
  import type { Properties } from "csstype";
2
- import type { CommonProps, OverflowProps, BorderProps, RadiusProps, ShadowProps, BackgroundProps, PaddingProps } from "../props.js";
3
- export type FrameModalProps = CommonProps & OverflowProps & BorderProps & RadiusProps & ShadowProps & PaddingProps & BackgroundProps & {
2
+ import type { CommonProps, OverflowProps, BorderProps, RadiusProps, ShadowProps, BackgroundProps, PaddingProps, FlexComponentProps } from "../props.js";
3
+ export type FrameModalProps = FlexComponentProps<CommonProps & OverflowProps & BorderProps & RadiusProps & ShadowProps & PaddingProps & BackgroundProps & {
4
4
  width?: Properties["width"];
5
- };
5
+ }>;
@@ -1,6 +1,6 @@
1
1
  import type { Properties } from "csstype";
2
- import type { CommonProps, ClickableProps, BorderSingleProps } from "../props.js";
3
- export type MultiColumnProps = CommonProps & BorderSingleProps & {
2
+ import type { CommonProps, ClickableProps, BorderSingleProps, FlexComponentProps } from "../props.js";
3
+ export type MultiColumnProps = FlexComponentProps<CommonProps & BorderSingleProps & {
4
4
  gap?: Properties["columnGap"];
5
5
  width?: Properties["width"];
6
6
  itemPaddingTop?: Properties["paddingTop"];
@@ -9,10 +9,10 @@ export type MultiColumnProps = CommonProps & BorderSingleProps & {
9
9
  itemPaddingBottom?: Properties["paddingBottom"];
10
10
  itemHeight?: Properties["height"];
11
11
  itemGap?: Properties["gap"];
12
- };
13
- export type MultiColumnItemProps = CommonProps & ClickableProps & {
12
+ }>;
13
+ export type MultiColumnItemProps = FlexComponentProps<CommonProps & ClickableProps & {
14
14
  gap?: number;
15
- };
15
+ }>;
16
16
  export declare const MULTI_COLUMN_ITEM_CONTEXT_KEY = "MultiColumnItemContext";
17
17
  export type MultiColumnItemContext = {
18
18
  paddingTop?: Properties["paddingTop"];
@@ -4,6 +4,10 @@ import type { BUTTON_ICON_ANGLE, BUTTON_LINK_TARGET } from "./button/types.js";
4
4
  import type { BrandKit } from "./brand-kit.js";
5
5
  import type { AspectVariantCode, FontFamilyVariantCode, ShadowVariantCode, BackgroundColorVariantCode } from "./variants.js";
6
6
  import type { TEXT_THEME } from "./text/types.js";
7
+ import { type ResponsiveSetting } from "./responsive.js";
8
+ export type FlexComponentProps<T extends object> = T & {
9
+ responsiveSettings?: ResponsiveSetting<T>[];
10
+ };
7
11
  type PositionPlaceProps = {
8
12
  top?: Properties["top"];
9
13
  left?: Properties["left"];
@@ -31,7 +35,10 @@ export type BrandStyleProps = {
31
35
  export type ActionTableProps = {
32
36
  actionTableKey?: string;
33
37
  };
34
- export type CommonProps = MetaProps & PositionProps & CustomizeAttributesProps & CustomizeCssProps & BrandStyleProps;
38
+ export type VisibilityProps = {
39
+ hidden?: boolean;
40
+ };
41
+ export type CommonProps = MetaProps & VisibilityProps & PositionProps & CustomizeAttributesProps & CustomizeCssProps & BrandStyleProps;
35
42
  export type ClickableProps = {
36
43
  onClick?: OnClickOperation;
37
44
  eventName?: string;
@@ -0,0 +1,26 @@
1
+ import { FlexComponentProps } from "./props.js";
2
+ import { Readable } from "svelte/store";
3
+ export declare const USER_AGENT_VARIANT: Record<string, {
4
+ regex: RegExp;
5
+ }>;
6
+ export type MediaQueryCondition = {
7
+ range?: {
8
+ min?: number;
9
+ max?: number;
10
+ };
11
+ raw?: string;
12
+ orientation?: "portrait" | "landscape";
13
+ };
14
+ export type UserAgentVariant = keyof typeof USER_AGENT_VARIANT;
15
+ export type UserAgentCondition = {
16
+ variants?: UserAgentVariant[];
17
+ regex?: string;
18
+ };
19
+ export type ResponsiveSetting<T extends object> = {
20
+ id: string;
21
+ label: string;
22
+ mediaQueryCondition?: MediaQueryCondition;
23
+ userAgentCondition?: UserAgentCondition;
24
+ props: Partial<T>;
25
+ };
26
+ export declare function useResponsiveProps<T extends object>(props: FlexComponentProps<T>): Readable<T>;
@@ -1,10 +1,11 @@
1
- import type { CommonProps, ClickableProps } from "../props.js";
2
- export type SliderProps = CommonProps & {
1
+ import type { CommonProps, ClickableProps, FlexComponentProps } from "../props.js";
2
+ export type SliderProps = FlexComponentProps<CommonProps & {
3
+ name?: string;
3
4
  gap: number;
4
5
  itemWidthPercentage: number;
5
6
  auto?: boolean;
6
7
  loop?: boolean;
7
8
  hideIndicator?: boolean;
8
9
  interval?: number;
9
- };
10
- export type SliderItemProps = CommonProps & ClickableProps;
10
+ }>;
11
+ export type SliderItemProps = FlexComponentProps<CommonProps & ClickableProps>;
@@ -0,0 +1,4 @@
1
+ import { LayerTextProps } from "./types.js";
2
+ import { BrandKit } from "../brand-kit.js";
3
+ declare const _default: (layerId: string, props: LayerTextProps, brandKit?: BrandKit) => string;
4
+ export default _default;