@studiometa/ui 1.0.0-beta.1 → 1.0.0-rc.1
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/AnchorScrollTo/AnchorScrollTo.d.ts +2 -2
- package/AnchorScrollTo/AnchorScrollTo.js +0 -1
- package/AnchorScrollTo/AnchorScrollTo.js.map +2 -2
- package/Button/Button.twig +12 -9
- package/Button/StyledButton.twig +40 -5
- package/Button/StyledButtonRounded.twig +12 -42
- package/CircularMarquee/CircularMarquee.twig +30 -18
- package/Data/DataBind.js +1 -1
- package/Data/DataBind.js.map +2 -2
- package/Draggable/Draggable.js +7 -2
- package/Draggable/Draggable.js.map +2 -2
- package/Figure/Figure.d.ts +1 -0
- package/Figure/Figure.js.map +2 -2
- package/Frame/AbstractFrameTrigger.d.ts +43 -0
- package/Frame/AbstractFrameTrigger.js +72 -0
- package/Frame/AbstractFrameTrigger.js.map +7 -0
- package/Frame/Frame.d.ts +55 -27
- package/Frame/Frame.js +132 -138
- package/Frame/Frame.js.map +3 -3
- package/Frame/FrameAnchor.d.ts +7 -4
- package/Frame/FrameAnchor.js +8 -5
- package/Frame/FrameAnchor.js.map +2 -2
- package/Frame/FrameForm.d.ts +22 -4
- package/Frame/FrameForm.js +43 -6
- package/Frame/FrameForm.js.map +2 -2
- package/Frame/FrameLoader.d.ts +22 -0
- package/Frame/FrameLoader.js +22 -0
- package/Frame/FrameLoader.js.map +7 -0
- package/Frame/FrameTarget.d.ts +6 -17
- package/Frame/FrameTarget.js +25 -60
- package/Frame/FrameTarget.js.map +2 -2
- package/Frame/FrameTriggerLoader.d.ts +13 -0
- package/Frame/FrameTriggerLoader.js +13 -0
- package/Frame/FrameTriggerLoader.js.map +7 -0
- package/Frame/index.d.ts +4 -0
- package/Frame/index.js +4 -0
- package/Frame/index.js.map +2 -2
- package/Frame/types.d.ts +12 -0
- package/Frame/types.js +1 -0
- package/Frame/types.js.map +7 -0
- package/Frame/utils.d.ts +9 -0
- package/Frame/utils.js +13 -0
- package/Frame/utils.js.map +7 -0
- package/LICENSE.md +110 -0
- package/Reinsurance/Reinsurance.twig +6 -6
- package/Slider/AbstractSliderChild.d.ts +5 -9
- package/Slider/AbstractSliderChild.js +0 -11
- package/Slider/AbstractSliderChild.js.map +2 -2
- package/Slider/Slider.d.ts +23 -30
- package/Slider/Slider.js +40 -100
- package/Slider/Slider.js.map +2 -2
- package/Slider/SliderBtn.d.ts +0 -3
- package/Slider/SliderBtn.js +3 -7
- package/Slider/SliderBtn.js.map +2 -2
- package/Slider/SliderCount.d.ts +0 -2
- package/Slider/SliderCount.js +4 -3
- package/Slider/SliderCount.js.map +2 -2
- package/Slider/SliderDots.d.ts +0 -3
- package/Slider/SliderDots.js +6 -7
- package/Slider/SliderDots.js.map +2 -2
- package/Slider/SliderDrag.d.ts +0 -2
- package/Slider/SliderDrag.js +0 -2
- package/Slider/SliderDrag.js.map +2 -2
- package/Slider/SliderItem.d.ts +10 -26
- package/Slider/SliderItem.js +9 -41
- package/Slider/SliderItem.js.map +2 -2
- package/Tabs/Tabs.twig +73 -9
- package/decorators/withTransition.d.ts +4 -0
- package/decorators/withTransition.js +40 -45
- package/decorators/withTransition.js.map +2 -2
- package/index.d.ts +0 -1
- package/index.js +0 -1
- package/index.js.map +2 -2
- package/package.json +4 -3
- package/LICENSE +0 -21
- package/TableOfContent/TableOfContent.d.ts +0 -39
- package/TableOfContent/TableOfContent.js +0 -50
- package/TableOfContent/TableOfContent.js.map +0 -7
- package/TableOfContent/TableOfContentAnchor.d.ts +0 -36
- package/TableOfContent/TableOfContentAnchor.js +0 -54
- package/TableOfContent/TableOfContentAnchor.js.map +0 -7
- package/TableOfContent/index.d.ts +0 -2
- package/TableOfContent/index.js +0 -3
- package/TableOfContent/index.js.map +0 -7
package/Frame/FrameForm.js
CHANGED
|
@@ -1,16 +1,53 @@
|
|
|
1
|
-
import {
|
|
2
|
-
class FrameForm extends
|
|
1
|
+
import { AbstractFrameTrigger } from "./AbstractFrameTrigger.js";
|
|
2
|
+
class FrameForm extends AbstractFrameTrigger {
|
|
3
3
|
/**
|
|
4
4
|
* Config.
|
|
5
5
|
*/
|
|
6
6
|
static config = {
|
|
7
|
-
name: "FrameForm"
|
|
7
|
+
name: "FrameForm",
|
|
8
|
+
refs: ["headers[]"]
|
|
8
9
|
};
|
|
9
10
|
/**
|
|
10
|
-
*
|
|
11
|
+
* Form submission method.
|
|
11
12
|
*/
|
|
12
|
-
get
|
|
13
|
-
return this.$el.
|
|
13
|
+
get method() {
|
|
14
|
+
return this.$el.method.toLowerCase();
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Add params to the requested URL for GET submissions.
|
|
18
|
+
*/
|
|
19
|
+
get url() {
|
|
20
|
+
const url = new URL(this.$el.action);
|
|
21
|
+
if (this.method === "get") {
|
|
22
|
+
url.search = new URLSearchParams(new FormData(this.$el)).toString();
|
|
23
|
+
}
|
|
24
|
+
return url;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Add body to the request for POST submissions.
|
|
28
|
+
*/
|
|
29
|
+
get requestInit() {
|
|
30
|
+
const requestInit = { ...super.requestInit };
|
|
31
|
+
requestInit.headers ??= {};
|
|
32
|
+
for (const header of this.$refs.headers) {
|
|
33
|
+
if (header.dataset.name && header.value) {
|
|
34
|
+
requestInit.headers[header.dataset.name] = header.value;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
if (this.method === "post") {
|
|
38
|
+
requestInit.method = this.method;
|
|
39
|
+
requestInit.body = new FormData(this.$el);
|
|
40
|
+
}
|
|
41
|
+
return requestInit;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Prevent submit on forms.
|
|
45
|
+
*/
|
|
46
|
+
onSubmit({ event }) {
|
|
47
|
+
if (this.$el.target !== "_blank") {
|
|
48
|
+
event.preventDefault();
|
|
49
|
+
this.trigger();
|
|
50
|
+
}
|
|
14
51
|
}
|
|
15
52
|
}
|
|
16
53
|
export {
|
package/Frame/FrameForm.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../packages/ui/Frame/FrameForm.ts"],
|
|
4
|
-
"sourcesContent": ["import {
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import type { BaseProps, BaseConfig } from '@studiometa/js-toolkit';\nimport { AbstractFrameTrigger } from './AbstractFrameTrigger.js';\n\nexport interface FrameFormProps extends BaseProps {\n $el: HTMLFormElement;\n $refs: {\n headers: HTMLInputElement[];\n };\n}\n\n/**\n * FrameForm class.\n */\nexport class FrameForm<T extends BaseProps = BaseProps> extends AbstractFrameTrigger<\n T & FrameFormProps\n> {\n /**\n * Config.\n */\n static config: BaseConfig = {\n name: 'FrameForm',\n refs: ['headers[]'],\n };\n\n /**\n * Form submission method.\n */\n get method() {\n return this.$el.method.toLowerCase() as 'post' | 'get';\n }\n\n /**\n * Add params to the requested URL for GET submissions.\n */\n get url(): URL {\n const url = new URL(this.$el.action);\n\n if (this.method === 'get') {\n // @ts-expect-error URLSearchParams accepts FormData as parameter in the browser.\n url.search = new URLSearchParams(new FormData(this.$el)).toString();\n }\n\n return url;\n }\n\n /**\n * Add body to the request for POST submissions.\n */\n get requestInit(): RequestInit {\n const requestInit = { ...super.requestInit };\n requestInit.headers ??= {};\n\n for (const header of this.$refs.headers) {\n if (header.dataset.name && header.value) {\n requestInit.headers[header.dataset.name] = header.value;\n }\n }\n\n if (this.method === 'post') {\n requestInit.method = this.method;\n requestInit.body = new FormData(this.$el);\n }\n\n return requestInit;\n }\n\n /**\n * Prevent submit on forms.\n */\n onSubmit({ event }: { event: SubmitEvent; target: FrameForm }) {\n if (this.$el.target !== '_blank') {\n event.preventDefault();\n this.trigger();\n }\n }\n}\n"],
|
|
5
|
+
"mappings": "AACA,SAAS,4BAA4B;AAY9B,MAAM,kBAAmD,qBAE9D;AAAA;AAAA;AAAA;AAAA,EAIA,OAAO,SAAqB;AAAA,IAC1B,MAAM;AAAA,IACN,MAAM,CAAC,WAAW;AAAA,EACpB;AAAA;AAAA;AAAA;AAAA,EAKA,IAAI,SAAS;AACX,WAAO,KAAK,IAAI,OAAO,YAAY;AAAA,EACrC;AAAA;AAAA;AAAA;AAAA,EAKA,IAAI,MAAW;AACb,UAAM,MAAM,IAAI,IAAI,KAAK,IAAI,MAAM;AAEnC,QAAI,KAAK,WAAW,OAAO;AAEzB,UAAI,SAAS,IAAI,gBAAgB,IAAI,SAAS,KAAK,GAAG,CAAC,EAAE,SAAS;AAAA,IACpE;AAEA,WAAO;AAAA,EACT;AAAA;AAAA;AAAA;AAAA,EAKA,IAAI,cAA2B;AAC7B,UAAM,cAAc,EAAE,GAAG,MAAM,YAAY;AAC3C,gBAAY,YAAY,CAAC;AAEzB,eAAW,UAAU,KAAK,MAAM,SAAS;AACvC,UAAI,OAAO,QAAQ,QAAQ,OAAO,OAAO;AACvC,oBAAY,QAAQ,OAAO,QAAQ,IAAI,IAAI,OAAO;AAAA,MACpD;AAAA,IACF;AAEA,QAAI,KAAK,WAAW,QAAQ;AAC1B,kBAAY,SAAS,KAAK;AAC1B,kBAAY,OAAO,IAAI,SAAS,KAAK,GAAG;AAAA,IAC1C;AAEA,WAAO;AAAA,EACT;AAAA;AAAA;AAAA;AAAA,EAKA,SAAS,EAAE,MAAM,GAA8C;AAC7D,QAAI,KAAK,IAAI,WAAW,UAAU;AAChC,YAAM,eAAe;AACrB,WAAK,QAAQ;AAAA,IACf;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { BaseProps, BaseConfig } from '@studiometa/js-toolkit';
|
|
2
|
+
import { Transition } from '../Transition/index.js';
|
|
3
|
+
import type { TransitionProps } from '../decorators/withTransition.js';
|
|
4
|
+
export interface FrameLoaderProps extends BaseProps {
|
|
5
|
+
$options: TransitionProps['$options'] & {
|
|
6
|
+
enterKeep: true;
|
|
7
|
+
leaveKeep: true;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Class.
|
|
12
|
+
*/
|
|
13
|
+
export declare class FrameLoader<T extends BaseProps = BaseProps> extends Transition<T & FrameLoaderProps> {
|
|
14
|
+
/**
|
|
15
|
+
* Config.
|
|
16
|
+
*/
|
|
17
|
+
static config: BaseConfig;
|
|
18
|
+
get $options(): import("@studiometa/js-toolkit").BaseOptions & (T & FrameLoaderProps & TransitionProps)["$options"] & {
|
|
19
|
+
enterKeep: boolean;
|
|
20
|
+
leaveKeep: boolean;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Transition } from "../Transition/index.js";
|
|
2
|
+
class FrameLoader extends Transition {
|
|
3
|
+
/**
|
|
4
|
+
* Config.
|
|
5
|
+
*/
|
|
6
|
+
static config = {
|
|
7
|
+
name: "FrameLoader"
|
|
8
|
+
};
|
|
9
|
+
// @ts-expect-error this is fine.
|
|
10
|
+
get $options() {
|
|
11
|
+
const options = super.$options;
|
|
12
|
+
return {
|
|
13
|
+
...options,
|
|
14
|
+
enterKeep: true,
|
|
15
|
+
leaveKeep: true
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
FrameLoader
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=FrameLoader.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../packages/ui/Frame/FrameLoader.ts"],
|
|
4
|
+
"sourcesContent": ["import type { BaseProps, BaseConfig } from '@studiometa/js-toolkit';\nimport { Transition } from '../Transition/index.js';\nimport type { TransitionProps } from '../decorators/withTransition.js';\n\nexport interface FrameLoaderProps extends BaseProps {\n $options: TransitionProps['$options'] & {\n enterKeep: true;\n leaveKeep: true;\n };\n}\n\n/**\n * Class.\n */\nexport class FrameLoader<T extends BaseProps = BaseProps> extends Transition<T & FrameLoaderProps> {\n /**\n * Config.\n */\n static config: BaseConfig = {\n name: 'FrameLoader',\n };\n\n // @ts-expect-error this is fine.\n get $options() {\n const options = super.$options;\n\n return {\n ...options,\n enterKeep: true,\n leaveKeep: true,\n };\n }\n}\n"],
|
|
5
|
+
"mappings": "AACA,SAAS,kBAAkB;AAapB,MAAM,oBAAqD,WAAiC;AAAA;AAAA;AAAA;AAAA,EAIjG,OAAO,SAAqB;AAAA,IAC1B,MAAM;AAAA,EACR;AAAA;AAAA,EAGA,IAAI,WAAW;AACb,UAAM,UAAU,MAAM;AAEtB,WAAO;AAAA,MACL,GAAG;AAAA,MACH,WAAW;AAAA,MACX,WAAW;AAAA,IACb;AAAA,EACF;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/Frame/FrameTarget.d.ts
CHANGED
|
@@ -3,8 +3,6 @@ import { Transition } from '../Transition/index.js';
|
|
|
3
3
|
export interface FrameTargetProps extends BaseProps {
|
|
4
4
|
$options: {
|
|
5
5
|
mode: 'replace' | 'prepend' | 'append';
|
|
6
|
-
id: string;
|
|
7
|
-
leaveKeep: true;
|
|
8
6
|
};
|
|
9
7
|
}
|
|
10
8
|
/**
|
|
@@ -16,28 +14,19 @@ export declare class FrameTarget<T extends BaseProps = BaseProps> extends Transi
|
|
|
16
14
|
*/
|
|
17
15
|
static config: BaseConfig;
|
|
18
16
|
/**
|
|
19
|
-
*
|
|
17
|
+
* Different mode of content insertion.
|
|
20
18
|
*/
|
|
21
|
-
|
|
22
|
-
readonly
|
|
23
|
-
readonly
|
|
19
|
+
modes: {
|
|
20
|
+
readonly APPEND: "append";
|
|
21
|
+
readonly PREPEND: "prepend";
|
|
22
|
+
readonly REPLACE: "replace";
|
|
24
23
|
};
|
|
25
|
-
/**
|
|
26
|
-
* Override options.
|
|
27
|
-
*/
|
|
28
|
-
get $options(): import("@studiometa/js-toolkit").BaseOptions & (T & FrameTargetProps & import("../index.js").TransitionProps)["$options"];
|
|
29
24
|
/**
|
|
30
25
|
* Get uniq ID.
|
|
31
26
|
*/
|
|
32
27
|
get id(): string;
|
|
33
|
-
/**
|
|
34
|
-
* Enter transition.
|
|
35
|
-
*/
|
|
36
|
-
enter(): Promise<void>;
|
|
37
28
|
/**
|
|
38
29
|
* Update the content from the new target.
|
|
39
|
-
* @param {FrameTarget} newTarget The instance of the new target.
|
|
40
|
-
* @returns {void}
|
|
41
30
|
*/
|
|
42
|
-
updateContent(
|
|
31
|
+
updateContent(content?: Element): Promise<void>;
|
|
43
32
|
}
|
package/Frame/FrameTarget.js
CHANGED
|
@@ -1,88 +1,53 @@
|
|
|
1
|
-
import { addClass, transition } from "@studiometa/js-toolkit/utils";
|
|
2
1
|
import { Transition } from "../Transition/index.js";
|
|
2
|
+
import morphdom from "morphdom";
|
|
3
3
|
class FrameTarget extends Transition {
|
|
4
4
|
/**
|
|
5
5
|
* Config.
|
|
6
6
|
*/
|
|
7
7
|
static config = {
|
|
8
|
-
...Transition.config,
|
|
9
8
|
name: "FrameTarget",
|
|
10
|
-
log: true,
|
|
11
9
|
options: {
|
|
12
|
-
...Transition.config.options,
|
|
13
10
|
mode: {
|
|
14
11
|
type: String,
|
|
15
12
|
default: "replace"
|
|
16
13
|
// or 'prepend' or 'append'
|
|
17
|
-
}
|
|
18
|
-
id: String
|
|
14
|
+
}
|
|
19
15
|
}
|
|
20
16
|
};
|
|
21
17
|
/**
|
|
22
|
-
*
|
|
18
|
+
* Different mode of content insertion.
|
|
23
19
|
*/
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
modes = {
|
|
21
|
+
APPEND: "append",
|
|
22
|
+
PREPEND: "prepend",
|
|
23
|
+
REPLACE: "replace"
|
|
27
24
|
};
|
|
28
|
-
/**
|
|
29
|
-
* Override options.
|
|
30
|
-
*/
|
|
31
|
-
// @ts-ignore
|
|
32
|
-
get $options() {
|
|
33
|
-
const options = super.$options;
|
|
34
|
-
options.leaveKeep = true;
|
|
35
|
-
return options;
|
|
36
|
-
}
|
|
37
25
|
/**
|
|
38
26
|
* Get uniq ID.
|
|
39
27
|
*/
|
|
40
28
|
get id() {
|
|
41
|
-
return this.$
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Enter transition.
|
|
45
|
-
*/
|
|
46
|
-
async enter() {
|
|
47
|
-
this.$log("enter");
|
|
48
|
-
const { enterFrom: from, enterActive: active, enterTo: to, leaveTo, enterKeep } = this.$options;
|
|
49
|
-
const transitionStyles = { from, active, to };
|
|
50
|
-
switch (this.$options.mode) {
|
|
51
|
-
case "append":
|
|
52
|
-
case "prepend":
|
|
53
|
-
await Promise.all(
|
|
54
|
-
Array.from(this.$el.children).filter(
|
|
55
|
-
(child) => from.split(" ").every((className) => child.classList.contains(className))
|
|
56
|
-
).map(
|
|
57
|
-
(child) => transition(child, transitionStyles, enterKeep ? "keep" : void 0)
|
|
58
|
-
)
|
|
59
|
-
);
|
|
60
|
-
break;
|
|
61
|
-
case "replace":
|
|
62
|
-
default:
|
|
63
|
-
transitionStyles.from = Array.from(new Set([from, leaveTo].flat())).join(" ");
|
|
64
|
-
await transition(this.$el, transitionStyles, enterKeep ? "keep" : void 0);
|
|
65
|
-
}
|
|
29
|
+
return this.$el.id;
|
|
66
30
|
}
|
|
67
31
|
/**
|
|
68
32
|
* Update the content from the new target.
|
|
69
|
-
* @param {FrameTarget} newTarget The instance of the new target.
|
|
70
|
-
* @returns {void}
|
|
71
33
|
*/
|
|
72
|
-
updateContent(
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
34
|
+
async updateContent(content = null) {
|
|
35
|
+
if (!content) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
const { mode } = this.$options;
|
|
39
|
+
if (mode === this.modes.APPEND || mode === this.modes.PREPEND) {
|
|
40
|
+
const leaveTargets = Array.from(this.$el.children);
|
|
41
|
+
const enterTargets = Array.from(content.children);
|
|
42
|
+
this.$el[mode](...Array.from(content.childNodes));
|
|
43
|
+
await Promise.all([
|
|
44
|
+
this.leave(leaveTargets),
|
|
45
|
+
this.enter(enterTargets)
|
|
46
|
+
]);
|
|
47
|
+
} else {
|
|
48
|
+
await this.leave();
|
|
49
|
+
morphdom(this.$el, content);
|
|
50
|
+
await this.enter();
|
|
86
51
|
}
|
|
87
52
|
}
|
|
88
53
|
}
|
package/Frame/FrameTarget.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../packages/ui/Frame/FrameTarget.ts"],
|
|
4
|
-
"sourcesContent": ["import type { BaseConfig, BaseProps } from '@studiometa/js-toolkit';\nimport {
|
|
5
|
-
"mappings": "AACA,SAAS,
|
|
4
|
+
"sourcesContent": ["import type { BaseConfig, BaseProps } from '@studiometa/js-toolkit';\nimport { Transition } from '../Transition/index.js';\nimport morphdom from 'morphdom';\n\nexport interface FrameTargetProps extends BaseProps {\n $options: {\n mode: 'replace' | 'prepend' | 'append';\n };\n}\n\n/**\n * FrameTarget class.\n */\nexport class FrameTarget<T extends BaseProps = BaseProps> extends Transition<T & FrameTargetProps> {\n /**\n * Config.\n */\n static config: BaseConfig = {\n name: 'FrameTarget',\n options: {\n mode: {\n type: String,\n default: 'replace', // or 'prepend' or 'append'\n },\n },\n };\n\n /**\n * Different mode of content insertion.\n */\n modes = {\n APPEND: 'append',\n PREPEND: 'prepend',\n REPLACE: 'replace',\n } as const;\n\n /**\n * Get uniq ID.\n */\n get id(): string {\n return this.$el.id;\n }\n\n /**\n * Update the content from the new target.\n */\n async updateContent(content: Element = null) {\n if (!content) {\n return;\n }\n\n const { mode } = this.$options;\n\n // In append or prepend mode, the leave transition can be used to\n // move the exisiting children of the root element, with the leave\n // transition being applied in parallel of the enter transition.\n if (mode === this.modes.APPEND || mode === this.modes.PREPEND) {\n const leaveTargets = Array.from(this.$el.children) as HTMLElement[];\n const enterTargets = Array.from(content.children) as HTMLElement[];\n\n this.$el[mode](...Array.from(content.childNodes));\n\n await Promise.all([\n this.leave(leaveTargets),\n this.enter(enterTargets),\n ]);\n } else {\n await this.leave();\n morphdom(this.$el, content);\n await this.enter();\n }\n }\n}\n"],
|
|
5
|
+
"mappings": "AACA,SAAS,kBAAkB;AAC3B,OAAO,cAAc;AAWd,MAAM,oBAAqD,WAAiC;AAAA;AAAA;AAAA;AAAA,EAIjG,OAAO,SAAqB;AAAA,IAC1B,MAAM;AAAA,IACN,SAAS;AAAA,MACP,MAAM;AAAA,QACJ,MAAM;AAAA,QACN,SAAS;AAAA;AAAA,MACX;AAAA,IACF;AAAA,EACF;AAAA;AAAA;AAAA;AAAA,EAKA,QAAQ;AAAA,IACN,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,SAAS;AAAA,EACX;AAAA;AAAA;AAAA;AAAA,EAKA,IAAI,KAAa;AACf,WAAO,KAAK,IAAI;AAAA,EAClB;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,cAAc,UAAmB,MAAM;AAC3C,QAAI,CAAC,SAAS;AACZ;AAAA,IACF;AAEA,UAAM,EAAE,KAAK,IAAI,KAAK;AAKtB,QAAI,SAAS,KAAK,MAAM,UAAU,SAAS,KAAK,MAAM,SAAS;AAC7D,YAAM,eAAe,MAAM,KAAK,KAAK,IAAI,QAAQ;AACjD,YAAM,eAAe,MAAM,KAAK,QAAQ,QAAQ;AAEhD,WAAK,IAAI,IAAI,EAAE,GAAG,MAAM,KAAK,QAAQ,UAAU,CAAC;AAEhD,YAAM,QAAQ,IAAI;AAAA,QAChB,KAAK,MAAM,YAAY;AAAA,QACvB,KAAK,MAAM,YAAY;AAAA,MACzB,CAAC;AAAA,IACH,OAAO;AACL,YAAM,KAAK,MAAM;AACjB,eAAS,KAAK,KAAK,OAAO;AAC1B,YAAM,KAAK,MAAM;AAAA,IACnB;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { BaseConfig, BaseProps } from '@studiometa/js-toolkit';
|
|
2
|
+
import { FrameLoader } from './FrameLoader.js';
|
|
3
|
+
import type { FrameLoaderProps } from './FrameLoader.js';
|
|
4
|
+
export type FrameTriggerLoaderProps = FrameLoaderProps;
|
|
5
|
+
/**
|
|
6
|
+
* FrameTriggerLoader class.
|
|
7
|
+
*/
|
|
8
|
+
export declare class FrameTriggerLoader<T extends BaseProps = BaseProps> extends FrameLoader<T & FrameTriggerLoaderProps> {
|
|
9
|
+
/**
|
|
10
|
+
* Config.
|
|
11
|
+
*/
|
|
12
|
+
static config: BaseConfig;
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FrameLoader } from "./FrameLoader.js";
|
|
2
|
+
class FrameTriggerLoader extends FrameLoader {
|
|
3
|
+
/**
|
|
4
|
+
* Config.
|
|
5
|
+
*/
|
|
6
|
+
static config = {
|
|
7
|
+
name: "FrameTriggerLoader"
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
FrameTriggerLoader
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=FrameTriggerLoader.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../packages/ui/Frame/FrameTriggerLoader.ts"],
|
|
4
|
+
"sourcesContent": ["import type { BaseConfig, BaseProps } from '@studiometa/js-toolkit';\nimport { FrameLoader } from './FrameLoader.js';\nimport type { FrameLoaderProps } from './FrameLoader.js';\n\nexport type FrameTriggerLoaderProps = FrameLoaderProps;\n\n/**\n * FrameTriggerLoader class.\n */\nexport class FrameTriggerLoader<T extends BaseProps = BaseProps> extends FrameLoader<\n T & FrameTriggerLoaderProps\n> {\n /**\n * Config.\n */\n static config: BaseConfig = {\n name: 'FrameTriggerLoader',\n }\n}\n"],
|
|
5
|
+
"mappings": "AACA,SAAS,mBAAmB;AAQrB,MAAM,2BAA4D,YAEvE;AAAA;AAAA;AAAA;AAAA,EAIA,OAAO,SAAqB;AAAA,IAC1B,MAAM;AAAA,EACR;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/Frame/index.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export * from './Frame.js';
|
|
2
2
|
export * from './FrameAnchor.js';
|
|
3
3
|
export * from './FrameForm.js';
|
|
4
|
+
export * from './FrameLoader.js';
|
|
5
|
+
export * from './FrameTriggerLoader.js';
|
|
4
6
|
export * from './FrameTarget.js';
|
|
7
|
+
export * from './AbstractFrameTrigger.js';
|
|
8
|
+
export * from './types.js';
|
package/Frame/index.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export * from "./Frame.js";
|
|
2
2
|
export * from "./FrameAnchor.js";
|
|
3
3
|
export * from "./FrameForm.js";
|
|
4
|
+
export * from "./FrameLoader.js";
|
|
5
|
+
export * from "./FrameTriggerLoader.js";
|
|
4
6
|
export * from "./FrameTarget.js";
|
|
7
|
+
export * from "./AbstractFrameTrigger.js";
|
|
8
|
+
export * from "./types.js";
|
|
5
9
|
//# sourceMappingURL=index.js.map
|
package/Frame/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../packages/ui/Frame/index.ts"],
|
|
4
|
-
"sourcesContent": ["export * from './Frame.js';\nexport * from './FrameAnchor.js';\nexport * from './FrameForm.js';\nexport * from './FrameTarget.js';\n"],
|
|
5
|
-
"mappings": "AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;",
|
|
4
|
+
"sourcesContent": ["export * from './Frame.js';\nexport * from './FrameAnchor.js';\nexport * from './FrameForm.js';\nexport * from './FrameLoader.js';\nexport * from './FrameTriggerLoader.js';\nexport * from './FrameTarget.js';\nexport * from './AbstractFrameTrigger.js';\nexport * from './types.js';\n"],
|
|
5
|
+
"mappings": "AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/Frame/types.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { FrameAnchor } from './FrameAnchor.js';
|
|
2
|
+
import type { FrameForm } from './FrameForm.js';
|
|
3
|
+
export type FrameRequestInit = RequestInit & {
|
|
4
|
+
trigger?: FrameAnchor | FrameForm;
|
|
5
|
+
};
|
|
6
|
+
export type FrameTriggerEvent = CustomEvent<[URL, FrameRequestInit]>;
|
|
7
|
+
export type FrameFetchEvent = CustomEvent<[URL, FrameRequestInit]>;
|
|
8
|
+
export type FrameFetchBeforeEvent = FrameFetchEvent;
|
|
9
|
+
export type FrameFetchAfterEvent = CustomEvent<[URL, FrameRequestInit, string | Error]>;
|
|
10
|
+
export type FrameErrorEvent = CustomEvent<[URL, FrameRequestInit, Error]>;
|
|
11
|
+
export type FrameContentEvent = CustomEvent<[URL, FrameRequestInit, string]>;
|
|
12
|
+
export type FrameContentAfterEvent = CustomEvent<[URL, FrameRequestInit, string]>;
|
package/Frame/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=types.js.map
|
package/Frame/utils.d.ts
ADDED
package/Frame/utils.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const EVENTS = {
|
|
2
|
+
FETCH_BEFORE: "frame-fetch-before",
|
|
3
|
+
FETCH: "frame-fetch",
|
|
4
|
+
FETCH_AFTER: "frame-fetch-after",
|
|
5
|
+
ERROR: "frame-error",
|
|
6
|
+
CONTENT: "frame-content",
|
|
7
|
+
CONTENT_AFTER: "frame-content-after",
|
|
8
|
+
TRIGGER: "frame-trigger"
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
EVENTS
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../packages/ui/Frame/utils.ts"],
|
|
4
|
+
"sourcesContent": ["export const EVENTS = {\n FETCH_BEFORE: 'frame-fetch-before',\n FETCH: 'frame-fetch',\n FETCH_AFTER: 'frame-fetch-after',\n ERROR: 'frame-error',\n CONTENT: 'frame-content',\n CONTENT_AFTER: 'frame-content-after',\n TRIGGER: 'frame-trigger',\n};\n"],
|
|
5
|
+
"mappings": "AAAO,MAAM,SAAS;AAAA,EACpB,cAAc;AAAA,EACd,OAAO;AAAA,EACP,aAAa;AAAA,EACb,OAAO;AAAA,EACP,SAAS;AAAA,EACT,eAAe;AAAA,EACf,SAAS;AACX;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/LICENSE.md
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# Functional Source License, Version 1.1, MIT Future License
|
|
2
|
+
|
|
3
|
+
## Abbreviation
|
|
4
|
+
|
|
5
|
+
FSL-1.1-MIT
|
|
6
|
+
|
|
7
|
+
## Notice
|
|
8
|
+
|
|
9
|
+
Copyright 2025 Studio Meta
|
|
10
|
+
|
|
11
|
+
## Terms and Conditions
|
|
12
|
+
|
|
13
|
+
### Licensor ("We")
|
|
14
|
+
|
|
15
|
+
The party offering the Software under these Terms and Conditions.
|
|
16
|
+
|
|
17
|
+
### The Software
|
|
18
|
+
|
|
19
|
+
The "Software" is each version of the software that we make available under
|
|
20
|
+
these Terms and Conditions, as indicated by our inclusion of these Terms and
|
|
21
|
+
Conditions with the Software.
|
|
22
|
+
|
|
23
|
+
### License Grant
|
|
24
|
+
|
|
25
|
+
Subject to your compliance with this License Grant and the Patents,
|
|
26
|
+
Redistribution and Trademark clauses below, we hereby grant you the right to
|
|
27
|
+
use, copy, modify, create derivative works, publicly perform, publicly display
|
|
28
|
+
and redistribute the Software for any Permitted Purpose identified below.
|
|
29
|
+
|
|
30
|
+
### Permitted Purpose
|
|
31
|
+
|
|
32
|
+
A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
|
|
33
|
+
means making the Software available to others in a commercial product or
|
|
34
|
+
service that:
|
|
35
|
+
|
|
36
|
+
1. substitutes for the Software;
|
|
37
|
+
|
|
38
|
+
2. substitutes for any other product or service we offer using the Software
|
|
39
|
+
that exists as of the date we make the Software available; or
|
|
40
|
+
|
|
41
|
+
3. offers the same or substantially similar functionality as the Software.
|
|
42
|
+
|
|
43
|
+
Permitted Purposes specifically include using the Software:
|
|
44
|
+
|
|
45
|
+
1. for your internal use and access;
|
|
46
|
+
|
|
47
|
+
2. for non-commercial education;
|
|
48
|
+
|
|
49
|
+
3. for non-commercial research; and
|
|
50
|
+
|
|
51
|
+
4. in connection with professional services that you provide to a licensee
|
|
52
|
+
using the Software in accordance with these Terms and Conditions.
|
|
53
|
+
|
|
54
|
+
### Patents
|
|
55
|
+
|
|
56
|
+
To the extent your use for a Permitted Purpose would necessarily infringe our
|
|
57
|
+
patents, the license grant above includes a license under our patents. If you
|
|
58
|
+
make a claim against any party that the Software infringes or contributes to
|
|
59
|
+
the infringement of any patent, then your patent license to the Software ends
|
|
60
|
+
immediately.
|
|
61
|
+
|
|
62
|
+
### Redistribution
|
|
63
|
+
|
|
64
|
+
The Terms and Conditions apply to all copies, modifications and derivatives of
|
|
65
|
+
the Software.
|
|
66
|
+
|
|
67
|
+
If you redistribute any copies, modifications or derivatives of the Software,
|
|
68
|
+
you must include a copy of or a link to these Terms and Conditions and not
|
|
69
|
+
remove any copyright notices provided in or with the Software.
|
|
70
|
+
|
|
71
|
+
### Disclaimer
|
|
72
|
+
|
|
73
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
|
|
74
|
+
IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
|
|
75
|
+
PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
|
|
76
|
+
|
|
77
|
+
IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
|
|
78
|
+
SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
|
|
79
|
+
EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
|
|
80
|
+
|
|
81
|
+
### Trademarks
|
|
82
|
+
|
|
83
|
+
Except for displaying the License Details and identifying us as the origin of
|
|
84
|
+
the Software, you have no right under these Terms and Conditions to use our
|
|
85
|
+
trademarks, trade names, service marks or product names.
|
|
86
|
+
|
|
87
|
+
## Grant of Future License
|
|
88
|
+
|
|
89
|
+
We hereby irrevocably grant you an additional license to use the Software under
|
|
90
|
+
the MIT license that is effective on the second anniversary of the date we make
|
|
91
|
+
the Software available. On or after that date, you may use the Software under
|
|
92
|
+
the MIT license, in which case the following will apply:
|
|
93
|
+
|
|
94
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
95
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
96
|
+
the Software without restriction, including without limitation the rights to
|
|
97
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
98
|
+
of the Software, and to permit persons to whom the Software is furnished to do
|
|
99
|
+
so, subject to the following conditions:
|
|
100
|
+
|
|
101
|
+
The above copyright notice and this permission notice shall be included in all
|
|
102
|
+
copies or substantial portions of the Software.
|
|
103
|
+
|
|
104
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
105
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
106
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
107
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
108
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
109
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
110
|
+
SOFTWARE.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @file
|
|
4
4
|
* Reinsurance
|
|
5
5
|
*
|
|
6
|
-
* @param {Object}
|
|
6
|
+
* @param {Object} attr customize the section element.
|
|
7
7
|
* @param {Object} title_attr customize the title element
|
|
8
8
|
* @param {Object} content_attr customize the content element
|
|
9
9
|
* @param {Boolean} slider_mobile activate scroll on mobile
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
#}
|
|
18
18
|
|
|
19
|
-
{% set
|
|
19
|
+
{% set attributes = merge_html_attributes(attr ?? null, { class: 'text-[0] pt-14 pb-6 text-center w-full' }) %}
|
|
20
20
|
|
|
21
21
|
{% set title_attributes = merge_html_attributes(title_attr ?? null, { class: 'text-xl mb-2' }) %}
|
|
22
22
|
|
|
@@ -28,14 +28,14 @@
|
|
|
28
28
|
|
|
29
29
|
{% if slider_mobile %}
|
|
30
30
|
{% set mobile_classes = mobile_classes|default(['whitespace-nowrap overflow-scroll s:whitespace-normal s:overflow-auto']) %}
|
|
31
|
-
{% set
|
|
32
|
-
|
|
31
|
+
{% set attributes = merge_html_attributes(
|
|
32
|
+
attr ?? null,
|
|
33
33
|
{
|
|
34
|
-
class:
|
|
34
|
+
class: attributes.class|merge(mobile_classes)|join(' ')
|
|
35
35
|
}) %}
|
|
36
36
|
{% endif %}
|
|
37
37
|
|
|
38
|
-
<section {{ html_attributes(
|
|
38
|
+
<section {{ html_attributes(attributes) }}>
|
|
39
39
|
{% for item in list %}
|
|
40
40
|
{% set icon_attributes = merge_html_attributes(icon_attr ?? null, { attr: { class: 'inline-block mb-2 s:mb-8' }, name: item.icon }) %}
|
|
41
41
|
<div {{ html_attributes(item_attributes) }}>
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Base } from '@studiometa/js-toolkit';
|
|
2
|
-
import type { BaseProps, BaseConfig
|
|
3
|
-
import { Slider } from './Slider.js';
|
|
2
|
+
import type { BaseProps, BaseConfig } from '@studiometa/js-toolkit';
|
|
3
|
+
import type { Slider } from './Slider.js';
|
|
4
4
|
export interface AbstractSliderChildProps extends BaseProps {
|
|
5
5
|
$parent: Slider;
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
8
|
* AbstractSliderChild class.
|
|
9
9
|
*/
|
|
10
|
-
export declare class AbstractSliderChild<T extends BaseProps = BaseProps> extends Base<T & AbstractSliderChildProps>
|
|
10
|
+
export declare class AbstractSliderChild<T extends BaseProps = BaseProps> extends Base<T & AbstractSliderChildProps> {
|
|
11
11
|
/**
|
|
12
12
|
* Config.
|
|
13
13
|
*/
|
|
@@ -26,14 +26,10 @@ export declare class AbstractSliderChild<T extends BaseProps = BaseProps> extend
|
|
|
26
26
|
destroyed(): void;
|
|
27
27
|
/**
|
|
28
28
|
* Dispatch event.
|
|
29
|
-
* @param {CustomEvent} event
|
|
30
|
-
* @returns {void}
|
|
31
29
|
*/
|
|
32
|
-
handleEvent(event:
|
|
30
|
+
handleEvent(event: CustomEvent): void;
|
|
33
31
|
/**
|
|
34
32
|
* Update the child component with the given index.
|
|
35
|
-
* @param {number} index The new active index.
|
|
36
|
-
* @returns {void|(()=>void)}
|
|
37
33
|
*/
|
|
38
|
-
update(index:
|
|
34
|
+
update(index: number): void | (() => void);
|
|
39
35
|
}
|