@studiometa/ui 0.2.22 → 0.2.24
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/README.md +2 -12
- package/atoms/AnchorScrollTo/AnchorScrollTo.cjs +11 -0
- package/atoms/AnchorScrollTo/AnchorScrollTo.cjs.map +2 -2
- package/atoms/AnchorScrollTo/AnchorScrollTo.js +11 -0
- package/atoms/AnchorScrollTo/AnchorScrollTo.js.map +2 -2
- package/atoms/Button/StyledButton.twig +6 -4
- package/atoms/Button/StyledButtonRounded.twig +65 -0
- package/atoms/Cursor/Cursor.cjs +12 -0
- package/atoms/Cursor/Cursor.cjs.map +2 -2
- package/atoms/Cursor/Cursor.js +12 -0
- package/atoms/Cursor/Cursor.js.map +2 -2
- package/atoms/Figure/Figure.cjs +31 -4
- package/atoms/Figure/Figure.cjs.map +2 -2
- package/atoms/Figure/Figure.d.ts +4 -0
- package/atoms/Figure/Figure.js +31 -4
- package/atoms/Figure/Figure.js.map +2 -2
- package/atoms/Figure/Figure.twig +6 -1
- package/atoms/Figure/FigureTwicpics.cjs +28 -4
- package/atoms/Figure/FigureTwicpics.cjs.map +2 -2
- package/atoms/Figure/FigureTwicpics.d.ts +6 -2
- package/atoms/Figure/FigureTwicpics.js +28 -4
- package/atoms/Figure/FigureTwicpics.js.map +2 -2
- package/atoms/Figure/FigureTwicpics.twig +6 -0
- package/atoms/LargeText/LargeText.cjs +27 -0
- package/atoms/LargeText/LargeText.cjs.map +2 -2
- package/atoms/LargeText/LargeText.js +27 -0
- package/atoms/LargeText/LargeText.js.map +2 -2
- package/atoms/LazyInclude/LazyInclude.cjs +15 -0
- package/atoms/LazyInclude/LazyInclude.cjs.map +2 -2
- package/atoms/LazyInclude/LazyInclude.js +15 -0
- package/atoms/LazyInclude/LazyInclude.js.map +2 -2
- package/atoms/Prefetch/AbstractPrefetch.cjs +12 -0
- package/atoms/Prefetch/AbstractPrefetch.cjs.map +2 -2
- package/atoms/Prefetch/AbstractPrefetch.js +12 -0
- package/atoms/Prefetch/AbstractPrefetch.js.map +2 -2
- package/atoms/Prefetch/PrefetchWhenOver.cjs +6 -0
- package/atoms/Prefetch/PrefetchWhenOver.cjs.map +2 -2
- package/atoms/Prefetch/PrefetchWhenOver.js +6 -0
- package/atoms/Prefetch/PrefetchWhenOver.js.map +2 -2
- package/atoms/Prefetch/PrefetchWhenVisible.cjs +6 -0
- package/atoms/Prefetch/PrefetchWhenVisible.cjs.map +2 -2
- package/atoms/Prefetch/PrefetchWhenVisible.js +6 -0
- package/atoms/Prefetch/PrefetchWhenVisible.js.map +2 -2
- package/atoms/ScrollAnimation/AbstractScrollAnimation.cjs +12 -0
- package/atoms/ScrollAnimation/AbstractScrollAnimation.cjs.map +2 -2
- package/atoms/ScrollAnimation/AbstractScrollAnimation.js +12 -0
- package/atoms/ScrollAnimation/AbstractScrollAnimation.js.map +2 -2
- package/atoms/ScrollAnimation/ScrollAnimation.cjs +6 -0
- package/atoms/ScrollAnimation/ScrollAnimation.cjs.map +1 -1
- package/atoms/ScrollAnimation/ScrollAnimation.js +6 -0
- package/atoms/ScrollAnimation/ScrollAnimation.js.map +1 -1
- package/atoms/ScrollAnimation/ScrollAnimationChild.cjs +18 -1
- package/atoms/ScrollAnimation/ScrollAnimationChild.cjs.map +2 -2
- package/atoms/ScrollAnimation/ScrollAnimationChild.js +18 -1
- package/atoms/ScrollAnimation/ScrollAnimationChild.js.map +2 -2
- package/atoms/ScrollAnimation/ScrollAnimationChildWithEase.cjs +3 -0
- package/atoms/ScrollAnimation/ScrollAnimationChildWithEase.cjs.map +1 -1
- package/atoms/ScrollAnimation/ScrollAnimationChildWithEase.js +3 -0
- package/atoms/ScrollAnimation/ScrollAnimationChildWithEase.js.map +1 -1
- package/atoms/ScrollAnimation/ScrollAnimationParent.cjs +6 -0
- package/atoms/ScrollAnimation/ScrollAnimationParent.cjs.map +1 -1
- package/atoms/ScrollAnimation/ScrollAnimationParent.js +6 -0
- package/atoms/ScrollAnimation/ScrollAnimationParent.js.map +1 -1
- package/atoms/ScrollAnimation/ScrollAnimationWithEase.cjs +3 -0
- package/atoms/ScrollAnimation/ScrollAnimationWithEase.cjs.map +1 -1
- package/atoms/ScrollAnimation/ScrollAnimationWithEase.js +3 -0
- package/atoms/ScrollAnimation/ScrollAnimationWithEase.js.map +1 -1
- package/atoms/ScrollAnimation/animationScrollWithEase.cjs +6 -0
- package/atoms/ScrollAnimation/animationScrollWithEase.cjs.map +2 -2
- package/atoms/ScrollAnimation/animationScrollWithEase.js +6 -0
- package/atoms/ScrollAnimation/animationScrollWithEase.js.map +2 -2
- package/atoms/ScrollReveal/ScrollReveal.cjs +12 -0
- package/atoms/ScrollReveal/ScrollReveal.cjs.map +1 -1
- package/atoms/ScrollReveal/ScrollReveal.js +12 -0
- package/atoms/ScrollReveal/ScrollReveal.js.map +1 -1
- package/decorators/withTransition.cjs +16 -2
- package/decorators/withTransition.cjs.map +2 -2
- package/decorators/withTransition.js +16 -2
- package/decorators/withTransition.js.map +2 -2
- package/molecules/Accordion/AccordionCore.cjs +9 -0
- package/molecules/Accordion/AccordionCore.cjs.map +2 -2
- package/molecules/Accordion/AccordionCore.js +9 -0
- package/molecules/Accordion/AccordionCore.js.map +2 -2
- package/molecules/Accordion/AccordionItem.cjs +33 -1
- package/molecules/Accordion/AccordionItem.cjs.map +2 -2
- package/molecules/Accordion/AccordionItem.d.ts +1 -1
- package/molecules/Accordion/AccordionItem.js +29 -1
- package/molecules/Accordion/AccordionItem.js.map +2 -2
- package/molecules/Menu/Menu.cjs +47 -0
- package/molecules/Menu/Menu.cjs.map +1 -1
- package/molecules/Menu/Menu.js +47 -0
- package/molecules/Menu/Menu.js.map +1 -1
- package/molecules/Menu/MenuBtn.cjs +24 -0
- package/molecules/Menu/MenuBtn.cjs.map +1 -1
- package/molecules/Menu/MenuBtn.js +24 -0
- package/molecules/Menu/MenuBtn.js.map +1 -1
- package/molecules/Menu/MenuList.cjs +39 -0
- package/molecules/Menu/MenuList.cjs.map +2 -2
- package/molecules/Menu/MenuList.js +39 -0
- package/molecules/Menu/MenuList.js.map +2 -2
- package/molecules/Modal/Modal.cjs +50 -1
- package/molecules/Modal/Modal.cjs.map +2 -2
- package/molecules/Modal/Modal.d.ts +3 -3
- package/molecules/Modal/Modal.js +50 -1
- package/molecules/Modal/Modal.js.map +2 -2
- package/molecules/Modal/ModalWithTransition.cjs +6 -0
- package/molecules/Modal/ModalWithTransition.cjs.map +2 -2
- package/molecules/Modal/ModalWithTransition.js +6 -0
- package/molecules/Modal/ModalWithTransition.js.map +2 -2
- package/molecules/Panel/Panel.cjs +19 -0
- package/molecules/Panel/Panel.cjs.map +2 -2
- package/molecules/Panel/Panel.js +19 -0
- package/molecules/Panel/Panel.js.map +2 -2
- package/molecules/Slider/AbstractSliderChild.cjs +24 -0
- package/molecules/Slider/AbstractSliderChild.cjs.map +2 -2
- package/molecules/Slider/AbstractSliderChild.js +24 -0
- package/molecules/Slider/AbstractSliderChild.js.map +2 -2
- package/molecules/Slider/Slider.cjs +97 -0
- package/molecules/Slider/Slider.cjs.map +2 -2
- package/molecules/Slider/Slider.d.ts +3 -2
- package/molecules/Slider/Slider.js +97 -0
- package/molecules/Slider/Slider.js.map +2 -2
- package/molecules/Slider/SliderBtn.cjs +22 -2
- package/molecules/Slider/SliderBtn.cjs.map +2 -2
- package/molecules/Slider/SliderBtn.d.ts +1 -0
- package/molecules/Slider/SliderBtn.js +22 -2
- package/molecules/Slider/SliderBtn.js.map +2 -2
- package/molecules/Slider/SliderCount.cjs +9 -0
- package/molecules/Slider/SliderCount.cjs.map +2 -2
- package/molecules/Slider/SliderCount.js +9 -0
- package/molecules/Slider/SliderCount.js.map +2 -2
- package/molecules/Slider/SliderDots.cjs +19 -0
- package/molecules/Slider/SliderDots.cjs.map +2 -2
- package/molecules/Slider/SliderDots.js +19 -0
- package/molecules/Slider/SliderDots.js.map +2 -2
- package/molecules/Slider/SliderDrag.cjs +15 -0
- package/molecules/Slider/SliderDrag.cjs.map +2 -2
- package/molecules/Slider/SliderDrag.js +15 -0
- package/molecules/Slider/SliderDrag.js.map +2 -2
- package/molecules/Slider/SliderItem.cjs +75 -14
- package/molecules/Slider/SliderItem.cjs.map +2 -2
- package/molecules/Slider/SliderItem.d.ts +12 -11
- package/molecules/Slider/SliderItem.js +75 -14
- package/molecules/Slider/SliderItem.js.map +2 -2
- package/molecules/Slider/SliderProgress.cjs +6 -0
- package/molecules/Slider/SliderProgress.cjs.map +2 -2
- package/molecules/Slider/SliderProgress.js +6 -0
- package/molecules/Slider/SliderProgress.js.map +2 -2
- package/molecules/Sticky/Sticky.cjs +56 -0
- package/molecules/Sticky/Sticky.cjs.map +2 -2
- package/molecules/Sticky/Sticky.js +56 -0
- package/molecules/Sticky/Sticky.js.map +2 -2
- package/molecules/TableOfContent/TableOfContent.cjs +13 -0
- package/molecules/TableOfContent/TableOfContent.cjs.map +1 -1
- package/molecules/TableOfContent/TableOfContent.js +13 -0
- package/molecules/TableOfContent/TableOfContent.js.map +1 -1
- package/molecules/TableOfContent/TableOfContentAnchor.cjs +16 -0
- package/molecules/TableOfContent/TableOfContentAnchor.cjs.map +2 -2
- package/molecules/TableOfContent/TableOfContentAnchor.js +16 -0
- package/molecules/TableOfContent/TableOfContentAnchor.js.map +2 -2
- package/molecules/Tabs/Tabs.cjs +16 -0
- package/molecules/Tabs/Tabs.cjs.map +2 -2
- package/molecules/Tabs/Tabs.d.ts +3 -3
- package/molecules/Tabs/Tabs.js +16 -0
- package/molecules/Tabs/Tabs.js.map +2 -2
- package/organisms/Frame/Frame.cjs +30 -0
- package/organisms/Frame/Frame.cjs.map +2 -2
- package/organisms/Frame/Frame.js +30 -0
- package/organisms/Frame/Frame.js.map +2 -2
- package/organisms/Frame/FrameAnchor.cjs +6 -0
- package/organisms/Frame/FrameAnchor.cjs.map +1 -1
- package/organisms/Frame/FrameAnchor.js +6 -0
- package/organisms/Frame/FrameAnchor.js.map +1 -1
- package/organisms/Frame/FrameForm.cjs +6 -0
- package/organisms/Frame/FrameForm.cjs.map +1 -1
- package/organisms/Frame/FrameForm.js +6 -0
- package/organisms/Frame/FrameForm.js.map +1 -1
- package/organisms/Frame/FrameTarget.cjs +25 -2
- package/organisms/Frame/FrameTarget.cjs.map +2 -2
- package/organisms/Frame/FrameTarget.js +25 -2
- package/organisms/Frame/FrameTarget.js.map +2 -2
- package/organisms/Hero/Hero.twig +151 -0
- package/package.json +2 -2
- package/primitives/Draggable/Draggable.cjs +18 -0
- package/primitives/Draggable/Draggable.cjs.map +2 -2
- package/primitives/Draggable/Draggable.js +18 -0
- package/primitives/Draggable/Draggable.js.map +2 -2
- package/primitives/Sentinel/Sentinel.cjs +3 -0
- package/primitives/Sentinel/Sentinel.cjs.map +2 -2
- package/primitives/Sentinel/Sentinel.js +3 -0
- package/primitives/Sentinel/Sentinel.js.map +2 -2
- package/primitives/Transition/Transition.cjs +3 -0
- package/primitives/Transition/Transition.cjs.map +1 -1
- package/primitives/Transition/Transition.js +3 -0
- package/primitives/Transition/Transition.js.map +1 -1
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { addClass, transition } from "@studiometa/js-toolkit/utils";
|
|
2
2
|
import { Transition } from "../../primitives/index.js";
|
|
3
3
|
class FrameTarget extends Transition {
|
|
4
|
+
/**
|
|
5
|
+
* Config.
|
|
6
|
+
*/
|
|
4
7
|
static config = {
|
|
5
8
|
...Transition.config,
|
|
6
9
|
name: "FrameTarget",
|
|
@@ -10,22 +13,36 @@ class FrameTarget extends Transition {
|
|
|
10
13
|
mode: {
|
|
11
14
|
type: String,
|
|
12
15
|
default: "replace"
|
|
16
|
+
// or 'prepend' or 'append'
|
|
13
17
|
},
|
|
14
18
|
id: String
|
|
15
19
|
}
|
|
16
20
|
};
|
|
21
|
+
/**
|
|
22
|
+
* Insert modes.
|
|
23
|
+
*/
|
|
17
24
|
static __INSERT_MODES = {
|
|
18
25
|
prepend: "afterbegin",
|
|
19
26
|
append: "beforeend"
|
|
20
27
|
};
|
|
28
|
+
/**
|
|
29
|
+
* Override options.
|
|
30
|
+
*/
|
|
31
|
+
// @ts-ignore
|
|
21
32
|
get $options() {
|
|
22
33
|
const options = super.$options;
|
|
23
34
|
options.leaveKeep = true;
|
|
24
35
|
return options;
|
|
25
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* Get uniq ID.
|
|
39
|
+
*/
|
|
26
40
|
get id() {
|
|
27
41
|
return this.$options.id ?? this.$el.id;
|
|
28
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* Enter transition.
|
|
45
|
+
*/
|
|
29
46
|
async enter() {
|
|
30
47
|
this.$log("enter");
|
|
31
48
|
const { enterFrom: from, enterActive: active, enterTo: to, leaveTo, enterKeep } = this.$options;
|
|
@@ -37,16 +54,22 @@ class FrameTarget extends Transition {
|
|
|
37
54
|
Array.from(this.$el.children).filter(
|
|
38
55
|
(child) => from.split(" ").every((className) => child.classList.contains(className))
|
|
39
56
|
).map(
|
|
40
|
-
(child) => transition(child, transitionStyles, enterKeep
|
|
57
|
+
(child) => transition(child, transitionStyles, enterKeep ? "keep" : void 0)
|
|
41
58
|
)
|
|
42
59
|
);
|
|
43
60
|
break;
|
|
44
61
|
case "replace":
|
|
45
62
|
default:
|
|
46
63
|
transitionStyles.from = Array.from(new Set([from, leaveTo].flat())).join(" ");
|
|
47
|
-
await transition(this.$el, transitionStyles, enterKeep
|
|
64
|
+
await transition(this.$el, transitionStyles, enterKeep ? "keep" : void 0);
|
|
48
65
|
}
|
|
49
66
|
}
|
|
67
|
+
/**
|
|
68
|
+
* Update the content from the new target.
|
|
69
|
+
*
|
|
70
|
+
* @param {FrameTarget} newTarget The instance of the new target.
|
|
71
|
+
* @returns {void}
|
|
72
|
+
*/
|
|
50
73
|
updateContent(newTarget) {
|
|
51
74
|
switch (this.$options.mode) {
|
|
52
75
|
case "prepend":
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../packages/ui/organisms/Frame/FrameTarget.ts"],
|
|
4
|
-
"sourcesContent": ["import type { BaseConfig, BaseProps } from '@studiometa/js-toolkit';\nimport { addClass, transition } from '@studiometa/js-toolkit/utils';\nimport { Transition } from '../../primitives/index.js';\n\nexport interface FrameTargetProps extends BaseProps {\n $options: {\n mode: 'replace' | 'prepend' | 'append';\n id: string;\n leaveKeep: true;\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 ...Transition.config,\n name: 'FrameTarget',\n log: true,\n options: {\n ...Transition.config.options,\n mode: {\n type: String,\n default: 'replace', // or 'prepend' or 'append'\n },\n id: String,\n },\n };\n\n /**\n * Insert modes.\n */\n static __INSERT_MODES = {\n prepend: 'afterbegin',\n append: 'beforeend',\n } as const;\n\n /**\n * Override options.\n */\n // @ts-ignore\n get $options() {\n const options = super.$options;\n\n options.leaveKeep = true;\n\n return options;\n }\n\n /**\n * Get uniq ID.\n */\n get id(): string {\n return this.$options.id ?? this.$el.id;\n }\n\n /**\n * Enter transition.\n */\n async enter() {\n this.$log('enter');\n\n const { enterFrom: from, enterActive: active, enterTo: to, leaveTo, enterKeep } = this.$options;\n const transitionStyles = { from, active, to };\n\n switch (this.$options.mode) {\n case 'append':\n case 'prepend':\n await Promise.all(\n Array.from(this.$el.children)\n .filter((child) =>\n from.split(' ').every((className) => child.classList.contains(className)),\n )\n .map((child) =>\n transition(child as HTMLElement, transitionStyles, enterKeep
|
|
5
|
-
"mappings": "AACA,SAAS,UAAU,kBAAkB;AACrC,SAAS,kBAAkB;AAapB,MAAM,oBAAqD,WAAiC;AAAA,EAIjG,OAAO,SAAqB;AAAA,IAC1B,GAAG,WAAW;AAAA,IACd,MAAM;AAAA,IACN,KAAK;AAAA,IACL,SAAS;AAAA,MACP,GAAG,WAAW,OAAO;AAAA,MACrB,MAAM;AAAA,QACJ,MAAM;AAAA,QACN,SAAS;AAAA,MACX;AAAA,MACA,IAAI;AAAA,IACN;AAAA,EACF;AAAA,EAKA,OAAO,iBAAiB;AAAA,IACtB,SAAS;AAAA,IACT,QAAQ;AAAA,EACV;AAAA,EAMA,IAAI,WAAW;AACb,UAAM,UAAU,MAAM;AAEtB,YAAQ,YAAY;AAEpB,WAAO;AAAA,EACT;AAAA,EAKA,IAAI,KAAa;AACf,WAAO,KAAK,SAAS,MAAM,KAAK,IAAI;AAAA,EACtC;AAAA,EAKA,MAAM,QAAQ;AACZ,SAAK,KAAK,OAAO;AAEjB,UAAM,EAAE,WAAW,MAAM,aAAa,QAAQ,SAAS,IAAI,SAAS,UAAU,IAAI,KAAK;AACvF,UAAM,mBAAmB,EAAE,MAAM,QAAQ,GAAG;AAE5C,YAAQ,KAAK,SAAS,MAAM;AAAA,MAC1B,KAAK;AAAA,MACL,KAAK;AACH,cAAM,QAAQ;AAAA,UACZ,MAAM,KAAK,KAAK,IAAI,QAAQ,EACzB;AAAA,YAAO,CAAC,UACP,KAAK,MAAM,GAAG,EAAE,MAAM,CAAC,cAAc,MAAM,UAAU,SAAS,SAAS,CAAC;AAAA,UAC1E,EACC;AAAA,YAAI,CAAC,UACJ,WAAW,OAAsB,kBAAkB,
|
|
4
|
+
"sourcesContent": ["import type { BaseConfig, BaseProps } from '@studiometa/js-toolkit';\nimport { addClass, transition } from '@studiometa/js-toolkit/utils';\nimport { Transition } from '../../primitives/index.js';\n\nexport interface FrameTargetProps extends BaseProps {\n $options: {\n mode: 'replace' | 'prepend' | 'append';\n id: string;\n leaveKeep: true;\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 ...Transition.config,\n name: 'FrameTarget',\n log: true,\n options: {\n ...Transition.config.options,\n mode: {\n type: String,\n default: 'replace', // or 'prepend' or 'append'\n },\n id: String,\n },\n };\n\n /**\n * Insert modes.\n */\n static __INSERT_MODES = {\n prepend: 'afterbegin',\n append: 'beforeend',\n } as const;\n\n /**\n * Override options.\n */\n // @ts-ignore\n get $options() {\n const options = super.$options;\n\n options.leaveKeep = true;\n\n return options;\n }\n\n /**\n * Get uniq ID.\n */\n get id(): string {\n return this.$options.id ?? this.$el.id;\n }\n\n /**\n * Enter transition.\n */\n async enter() {\n this.$log('enter');\n\n const { enterFrom: from, enterActive: active, enterTo: to, leaveTo, enterKeep } = this.$options;\n const transitionStyles = { from, active, to };\n\n switch (this.$options.mode) {\n case 'append':\n case 'prepend':\n await Promise.all(\n Array.from(this.$el.children)\n .filter((child) =>\n from.split(' ').every((className) => child.classList.contains(className)),\n )\n .map((child) =>\n transition(child as HTMLElement, transitionStyles, enterKeep ? 'keep' : undefined),\n ),\n );\n break;\n case 'replace':\n default:\n transitionStyles.from = Array.from(new Set([from, leaveTo].flat())).join(' ');\n await transition(this.$el, transitionStyles, enterKeep ? 'keep' : undefined);\n }\n }\n\n /**\n * Update the content from the new target.\n *\n * @param {FrameTarget} newTarget The instance of the new target.\n * @returns {void}\n */\n updateContent(newTarget: FrameTarget) {\n // @todo manage 'prepend' and 'append' transition\n // only the new content should have the transition\n // - add the leaveTo and enterFrom classes to all `newTarget.children`\n // - or wrap the new content in a custom div ?\n switch (this.$options.mode) {\n case 'prepend':\n case 'append':\n addClass(Array.from(newTarget.$el.children), this.$options.enterFrom.split(' '));\n this.$el.insertAdjacentHTML(\n FrameTarget.__INSERT_MODES[this.$options.mode],\n newTarget.$el.innerHTML,\n );\n break;\n case 'replace':\n default:\n this.$el.innerHTML = newTarget.$el.innerHTML;\n break;\n }\n }\n}\n"],
|
|
5
|
+
"mappings": "AACA,SAAS,UAAU,kBAAkB;AACrC,SAAS,kBAAkB;AAapB,MAAM,oBAAqD,WAAiC;AAAA;AAAA;AAAA;AAAA,EAIjG,OAAO,SAAqB;AAAA,IAC1B,GAAG,WAAW;AAAA,IACd,MAAM;AAAA,IACN,KAAK;AAAA,IACL,SAAS;AAAA,MACP,GAAG,WAAW,OAAO;AAAA,MACrB,MAAM;AAAA,QACJ,MAAM;AAAA,QACN,SAAS;AAAA;AAAA,MACX;AAAA,MACA,IAAI;AAAA,IACN;AAAA,EACF;AAAA;AAAA;AAAA;AAAA,EAKA,OAAO,iBAAiB;AAAA,IACtB,SAAS;AAAA,IACT,QAAQ;AAAA,EACV;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,IAAI,WAAW;AACb,UAAM,UAAU,MAAM;AAEtB,YAAQ,YAAY;AAEpB,WAAO;AAAA,EACT;AAAA;AAAA;AAAA;AAAA,EAKA,IAAI,KAAa;AACf,WAAO,KAAK,SAAS,MAAM,KAAK,IAAI;AAAA,EACtC;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,QAAQ;AACZ,SAAK,KAAK,OAAO;AAEjB,UAAM,EAAE,WAAW,MAAM,aAAa,QAAQ,SAAS,IAAI,SAAS,UAAU,IAAI,KAAK;AACvF,UAAM,mBAAmB,EAAE,MAAM,QAAQ,GAAG;AAE5C,YAAQ,KAAK,SAAS,MAAM;AAAA,MAC1B,KAAK;AAAA,MACL,KAAK;AACH,cAAM,QAAQ;AAAA,UACZ,MAAM,KAAK,KAAK,IAAI,QAAQ,EACzB;AAAA,YAAO,CAAC,UACP,KAAK,MAAM,GAAG,EAAE,MAAM,CAAC,cAAc,MAAM,UAAU,SAAS,SAAS,CAAC;AAAA,UAC1E,EACC;AAAA,YAAI,CAAC,UACJ,WAAW,OAAsB,kBAAkB,YAAY,SAAS,MAAS;AAAA,UACnF;AAAA,QACJ;AACA;AAAA,MACF,KAAK;AAAA,MACL;AACE,yBAAiB,OAAO,MAAM,KAAK,IAAI,IAAI,CAAC,MAAM,OAAO,EAAE,KAAK,CAAC,CAAC,EAAE,KAAK,GAAG;AAC5E,cAAM,WAAW,KAAK,KAAK,kBAAkB,YAAY,SAAS,MAAS;AAAA,IAC/E;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,cAAc,WAAwB;AAKpC,YAAQ,KAAK,SAAS,MAAM;AAAA,MAC1B,KAAK;AAAA,MACL,KAAK;AACH,iBAAS,MAAM,KAAK,UAAU,IAAI,QAAQ,GAAG,KAAK,SAAS,UAAU,MAAM,GAAG,CAAC;AAC/E,aAAK,IAAI;AAAA,UACP,YAAY,eAAe,KAAK,SAAS,IAAI;AAAA,UAC7C,UAAU,IAAI;AAAA,QAChB;AACA;AAAA,MACF,KAAK;AAAA,MACL;AACE,aAAK,IAAI,YAAY,UAAU,IAAI;AACnC;AAAA,IACJ;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
{#
|
|
2
|
+
/**
|
|
3
|
+
* @file
|
|
4
|
+
* Hero component.
|
|
5
|
+
*
|
|
6
|
+
* @param string $surtitle
|
|
7
|
+
* @param string $title
|
|
8
|
+
* @param string $subtitle
|
|
9
|
+
* @param array{url: string, label: string} $actions
|
|
10
|
+
*
|
|
11
|
+
* @param array $attr
|
|
12
|
+
* customize the root element attributes.
|
|
13
|
+
* @param Image $image
|
|
14
|
+
* Image to display. See Figure.twig for the composition.
|
|
15
|
+
* @param array $content_attr
|
|
16
|
+
* customize the content classes.
|
|
17
|
+
* @param 'left'|'center'|'right' $content_position
|
|
18
|
+
* define the content position.
|
|
19
|
+
* @param string $surtitle_tag
|
|
20
|
+
* customize the tag of the surtitle element
|
|
21
|
+
* @param array $surtitle_attr
|
|
22
|
+
* customize the surtitle element attributes.
|
|
23
|
+
* @param array $title_tag
|
|
24
|
+
* customize the tag of the title element
|
|
25
|
+
* @param array $title_attr
|
|
26
|
+
* customize the title element attributes.
|
|
27
|
+
* @param array $description_tag
|
|
28
|
+
* customize the tag of the description element
|
|
29
|
+
* @param array $description_attr
|
|
30
|
+
* customize the description element attributes.
|
|
31
|
+
* @param array $actions_attr
|
|
32
|
+
* customize the cta element attributes.
|
|
33
|
+
*/
|
|
34
|
+
#}
|
|
35
|
+
|
|
36
|
+
{% set content_position = content_position|default('center') %}
|
|
37
|
+
|
|
38
|
+
{% set attributes =
|
|
39
|
+
merge_html_attributes(
|
|
40
|
+
attr ?? null,
|
|
41
|
+
{ class: 'w-full min-h-screen' },
|
|
42
|
+
{
|
|
43
|
+
class: [
|
|
44
|
+
'hero flex relative',
|
|
45
|
+
{
|
|
46
|
+
'justify-start': content_position == 'left',
|
|
47
|
+
'justify-center text-center': content_position == 'center',
|
|
48
|
+
'justify-end': content_position == 'right'
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
%}
|
|
54
|
+
|
|
55
|
+
{# Default images attributes #}
|
|
56
|
+
|
|
57
|
+
{% set image =
|
|
58
|
+
image
|
|
59
|
+
|default({})
|
|
60
|
+
|merge({
|
|
61
|
+
attr: merge_html_attributes(
|
|
62
|
+
image.attr ?? null,
|
|
63
|
+
{ class: ['absolute inset-0'] },
|
|
64
|
+
{ class: ['hero__image'] }
|
|
65
|
+
)
|
|
66
|
+
})
|
|
67
|
+
%}
|
|
68
|
+
|
|
69
|
+
{# Default content attributes #}
|
|
70
|
+
{% set content_attributes =
|
|
71
|
+
merge_html_attributes(
|
|
72
|
+
content_attr ?? null,
|
|
73
|
+
{ class: 'flex-col justify-center h-screen w-1/2 gap-8 relative' },
|
|
74
|
+
{
|
|
75
|
+
class: [
|
|
76
|
+
'hero__content flex',
|
|
77
|
+
{
|
|
78
|
+
'items-start text-left': content_position == 'left',
|
|
79
|
+
'items-center text-center': content_position == 'center',
|
|
80
|
+
'items-end text-right': content_position == 'right'
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
)
|
|
85
|
+
%}
|
|
86
|
+
{% set surtitle_tag = title_tag|default('p') %}
|
|
87
|
+
{% set surtitle_attributes =
|
|
88
|
+
merge_html_attributes(surtitle_attr ?? null, { class: ['hero__surtitle type-base'] })
|
|
89
|
+
%}
|
|
90
|
+
|
|
91
|
+
{% set title_tag = title_tag|default('p') %}
|
|
92
|
+
{% set title_attributes =
|
|
93
|
+
merge_html_attributes(title_attr ?? null, { class: ['hero__title type-h1'] })
|
|
94
|
+
%}
|
|
95
|
+
|
|
96
|
+
{% set description_tag = description_tag|default('p') %}
|
|
97
|
+
{% set description_attributes =
|
|
98
|
+
merge_html_attributes(description_attr ?? null, { class: ['hero__description type-base'] })
|
|
99
|
+
%}
|
|
100
|
+
|
|
101
|
+
{% set actions_attributes =
|
|
102
|
+
merge_html_attributes(actions_attr ?? null, { class: ['hero__actions', 'flex', 'gap-6'] })
|
|
103
|
+
%}
|
|
104
|
+
|
|
105
|
+
<section {{ html_attributes(attributes) }}>
|
|
106
|
+
{% block before %}
|
|
107
|
+
|
|
108
|
+
{% endblock %}
|
|
109
|
+
{% block background %}
|
|
110
|
+
{% if image.src %}
|
|
111
|
+
{% include '@ui/atoms/Figure/Figure.twig' with image only %}
|
|
112
|
+
{% endif %}
|
|
113
|
+
{% endblock %}
|
|
114
|
+
{% block content %}
|
|
115
|
+
<div {{ html_attributes(content_attributes) }}>
|
|
116
|
+
{% block surtitle %}
|
|
117
|
+
{% if surtitle %}
|
|
118
|
+
{% html_element surtitle_tag with surtitle_attributes %}
|
|
119
|
+
{{ surtitle }}
|
|
120
|
+
{% end_html_element %}
|
|
121
|
+
{% endif %}
|
|
122
|
+
{% endblock %}
|
|
123
|
+
{% block title %}
|
|
124
|
+
{% if title %}
|
|
125
|
+
{% html_element title_tag with title_attributes %}
|
|
126
|
+
{{ title }}
|
|
127
|
+
{% end_html_element %}
|
|
128
|
+
{% endif %}
|
|
129
|
+
{% endblock %}
|
|
130
|
+
{% block description %}
|
|
131
|
+
{% if description %}
|
|
132
|
+
{% html_element description_tag with description_attributes %}
|
|
133
|
+
{{ description }}
|
|
134
|
+
{% end_html_element %}
|
|
135
|
+
{% endif %}
|
|
136
|
+
{% endblock %}
|
|
137
|
+
{% block actions %}
|
|
138
|
+
{% if actions %}
|
|
139
|
+
<div {{ html_attributes(actions_attributes) }}>
|
|
140
|
+
{% for action in actions %}
|
|
141
|
+
{% include '@ui/atoms/Button/StyledButtonRounded.twig' with action only %}
|
|
142
|
+
{% endfor %}
|
|
143
|
+
</div>
|
|
144
|
+
{% endif %}
|
|
145
|
+
{% endblock %}
|
|
146
|
+
</div>
|
|
147
|
+
{% endblock %}
|
|
148
|
+
{% block after %}
|
|
149
|
+
|
|
150
|
+
{% endblock %}
|
|
151
|
+
</section>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@studiometa/ui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.24",
|
|
4
4
|
"description": "A set of opiniated, unstyled and accessible components",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"homepage": "https://github.com/studiometa/ui#readme",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@studiometa/js-toolkit": "^2.
|
|
32
|
+
"@studiometa/js-toolkit": "^2.8.0",
|
|
33
33
|
"deepmerge": "^4.2.2"
|
|
34
34
|
}
|
|
35
35
|
}
|
|
@@ -30,10 +30,25 @@ module.exports = __toCommonJS(Draggable_exports);
|
|
|
30
30
|
var import_js_toolkit = require("@studiometa/js-toolkit");
|
|
31
31
|
var import_utils = require("@studiometa/js-toolkit/utils");
|
|
32
32
|
var Draggable = class extends (0, import_js_toolkit.withDrag)(import_js_toolkit.Base) {
|
|
33
|
+
/**
|
|
34
|
+
* Horizontal transformation.
|
|
35
|
+
*/
|
|
33
36
|
x = 0;
|
|
37
|
+
/**
|
|
38
|
+
* Vertical transformation.
|
|
39
|
+
*/
|
|
34
40
|
y = 0;
|
|
41
|
+
/**
|
|
42
|
+
* Horizontal position origin.
|
|
43
|
+
*/
|
|
35
44
|
originX = 0;
|
|
45
|
+
/**
|
|
46
|
+
* Vertical position origin.
|
|
47
|
+
*/
|
|
36
48
|
originY = 0;
|
|
49
|
+
/**
|
|
50
|
+
* Drag service hook.
|
|
51
|
+
*/
|
|
37
52
|
dragged(props) {
|
|
38
53
|
if (props.mode === "start") {
|
|
39
54
|
this.originX = this.x;
|
|
@@ -45,6 +60,9 @@ var Draggable = class extends (0, import_js_toolkit.withDrag)(import_js_toolkit.
|
|
|
45
60
|
this.$el.style.transform = (0, import_utils.matrix)({ translateX: this.x, translateY: this.y });
|
|
46
61
|
}
|
|
47
62
|
};
|
|
63
|
+
/**
|
|
64
|
+
* Config.
|
|
65
|
+
*/
|
|
48
66
|
__publicField(Draggable, "config", {
|
|
49
67
|
name: "DraggableElement"
|
|
50
68
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../packages/ui/primitives/Draggable/Draggable.ts"],
|
|
4
|
-
"sourcesContent": ["import { Base, withDrag } from '@studiometa/js-toolkit';\nimport type { BaseProps, BaseConfig, DragServiceProps } from '@studiometa/js-toolkit';\nimport { matrix } from '@studiometa/js-toolkit/utils';\n\n/**\n * Draggable class.\n */\nexport class Draggable<T extends BaseProps = BaseProps> extends withDrag(Base)<T> {\n /**\n * Config.\n */\n static config:BaseConfig = {\n name: 'DraggableElement',\n };\n\n /**\n * Horizontal transformation.\n */\n x = 0;\n\n /**\n * Vertical transformation.\n */\n y = 0;\n\n /**\n * Horizontal position origin.\n */\n originX = 0;\n\n /**\n * Vertical position origin.\n */\n originY = 0;\n\n /**\n * Drag service hook.\n */\n dragged(props:DragServiceProps) {\n if (props.mode === 'start') {\n this.originX = this.x;\n this.originY = this.y;\n return;\n }\n\n this.x = this.originX + props.x - props.origin.x;\n this.y = this.originY + props.y - props.origin.y;\n\n this.$el.style.transform = matrix({ translateX: this.x, translateY: this.y });\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAA+B;AAE/B,mBAAuB;AAKhB,IAAM,YAAN,kBAAyD,4BAAS,sBAAI,EAAK;AAAA,EAWhF,IAAI;AAAA,EAKJ,IAAI;AAAA,EAKJ,UAAU;AAAA,EAKV,UAAU;AAAA,EAKV,QAAQ,
|
|
4
|
+
"sourcesContent": ["import { Base, withDrag } from '@studiometa/js-toolkit';\nimport type { BaseProps, BaseConfig, DragServiceProps } from '@studiometa/js-toolkit';\nimport { matrix } from '@studiometa/js-toolkit/utils';\n\n/**\n * Draggable class.\n */\nexport class Draggable<T extends BaseProps = BaseProps> extends withDrag(Base)<T> {\n /**\n * Config.\n */\n static config: BaseConfig = {\n name: 'DraggableElement',\n };\n\n /**\n * Horizontal transformation.\n */\n x = 0;\n\n /**\n * Vertical transformation.\n */\n y = 0;\n\n /**\n * Horizontal position origin.\n */\n originX = 0;\n\n /**\n * Vertical position origin.\n */\n originY = 0;\n\n /**\n * Drag service hook.\n */\n dragged(props: DragServiceProps) {\n if (props.mode === 'start') {\n this.originX = this.x;\n this.originY = this.y;\n return;\n }\n\n this.x = this.originX + props.x - props.origin.x;\n this.y = this.originY + props.y - props.origin.y;\n\n this.$el.style.transform = matrix({ translateX: this.x, translateY: this.y });\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAA+B;AAE/B,mBAAuB;AAKhB,IAAM,YAAN,kBAAyD,4BAAS,sBAAI,EAAK;AAAA;AAAA;AAAA;AAAA,EAWhF,IAAI;AAAA;AAAA;AAAA;AAAA,EAKJ,IAAI;AAAA;AAAA;AAAA;AAAA,EAKJ,UAAU;AAAA;AAAA;AAAA;AAAA,EAKV,UAAU;AAAA;AAAA;AAAA;AAAA,EAKV,QAAQ,OAAyB;AAC/B,QAAI,MAAM,SAAS,SAAS;AAC1B,WAAK,UAAU,KAAK;AACpB,WAAK,UAAU,KAAK;AACpB;AAAA,IACF;AAEA,SAAK,IAAI,KAAK,UAAU,MAAM,IAAI,MAAM,OAAO;AAC/C,SAAK,IAAI,KAAK,UAAU,MAAM,IAAI,MAAM,OAAO;AAE/C,SAAK,IAAI,MAAM,gBAAY,qBAAO,EAAE,YAAY,KAAK,GAAG,YAAY,KAAK,EAAE,CAAC;AAAA,EAC9E;AACF;AAAA;AAAA;AAAA;AAvCE,cAJW,WAIJ,UAAqB;AAAA,EAC1B,MAAM;AACR;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,13 +1,31 @@
|
|
|
1
1
|
import { Base, withDrag } from "@studiometa/js-toolkit";
|
|
2
2
|
import { matrix } from "@studiometa/js-toolkit/utils";
|
|
3
3
|
class Draggable extends withDrag(Base) {
|
|
4
|
+
/**
|
|
5
|
+
* Config.
|
|
6
|
+
*/
|
|
4
7
|
static config = {
|
|
5
8
|
name: "DraggableElement"
|
|
6
9
|
};
|
|
10
|
+
/**
|
|
11
|
+
* Horizontal transformation.
|
|
12
|
+
*/
|
|
7
13
|
x = 0;
|
|
14
|
+
/**
|
|
15
|
+
* Vertical transformation.
|
|
16
|
+
*/
|
|
8
17
|
y = 0;
|
|
18
|
+
/**
|
|
19
|
+
* Horizontal position origin.
|
|
20
|
+
*/
|
|
9
21
|
originX = 0;
|
|
22
|
+
/**
|
|
23
|
+
* Vertical position origin.
|
|
24
|
+
*/
|
|
10
25
|
originY = 0;
|
|
26
|
+
/**
|
|
27
|
+
* Drag service hook.
|
|
28
|
+
*/
|
|
11
29
|
dragged(props) {
|
|
12
30
|
if (props.mode === "start") {
|
|
13
31
|
this.originX = this.x;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../packages/ui/primitives/Draggable/Draggable.ts"],
|
|
4
|
-
"sourcesContent": ["import { Base, withDrag } from '@studiometa/js-toolkit';\nimport type { BaseProps, BaseConfig, DragServiceProps } from '@studiometa/js-toolkit';\nimport { matrix } from '@studiometa/js-toolkit/utils';\n\n/**\n * Draggable class.\n */\nexport class Draggable<T extends BaseProps = BaseProps> extends withDrag(Base)<T> {\n /**\n * Config.\n */\n static config:BaseConfig = {\n name: 'DraggableElement',\n };\n\n /**\n * Horizontal transformation.\n */\n x = 0;\n\n /**\n * Vertical transformation.\n */\n y = 0;\n\n /**\n * Horizontal position origin.\n */\n originX = 0;\n\n /**\n * Vertical position origin.\n */\n originY = 0;\n\n /**\n * Drag service hook.\n */\n dragged(props:DragServiceProps) {\n if (props.mode === 'start') {\n this.originX = this.x;\n this.originY = this.y;\n return;\n }\n\n this.x = this.originX + props.x - props.origin.x;\n this.y = this.originY + props.y - props.origin.y;\n\n this.$el.style.transform = matrix({ translateX: this.x, translateY: this.y });\n }\n}\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,MAAM,gBAAgB;AAE/B,SAAS,cAAc;AAKhB,MAAM,kBAAmD,SAAS,IAAI,EAAK;AAAA,EAIhF,OAAO,
|
|
4
|
+
"sourcesContent": ["import { Base, withDrag } from '@studiometa/js-toolkit';\nimport type { BaseProps, BaseConfig, DragServiceProps } from '@studiometa/js-toolkit';\nimport { matrix } from '@studiometa/js-toolkit/utils';\n\n/**\n * Draggable class.\n */\nexport class Draggable<T extends BaseProps = BaseProps> extends withDrag(Base)<T> {\n /**\n * Config.\n */\n static config: BaseConfig = {\n name: 'DraggableElement',\n };\n\n /**\n * Horizontal transformation.\n */\n x = 0;\n\n /**\n * Vertical transformation.\n */\n y = 0;\n\n /**\n * Horizontal position origin.\n */\n originX = 0;\n\n /**\n * Vertical position origin.\n */\n originY = 0;\n\n /**\n * Drag service hook.\n */\n dragged(props: DragServiceProps) {\n if (props.mode === 'start') {\n this.originX = this.x;\n this.originY = this.y;\n return;\n }\n\n this.x = this.originX + props.x - props.origin.x;\n this.y = this.originY + props.y - props.origin.y;\n\n this.$el.style.transform = matrix({ translateX: this.x, translateY: this.y });\n }\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,MAAM,gBAAgB;AAE/B,SAAS,cAAc;AAKhB,MAAM,kBAAmD,SAAS,IAAI,EAAK;AAAA;AAAA;AAAA;AAAA,EAIhF,OAAO,SAAqB;AAAA,IAC1B,MAAM;AAAA,EACR;AAAA;AAAA;AAAA;AAAA,EAKA,IAAI;AAAA;AAAA;AAAA;AAAA,EAKJ,IAAI;AAAA;AAAA;AAAA;AAAA,EAKJ,UAAU;AAAA;AAAA;AAAA;AAAA,EAKV,UAAU;AAAA;AAAA;AAAA;AAAA,EAKV,QAAQ,OAAyB;AAC/B,QAAI,MAAM,SAAS,SAAS;AAC1B,WAAK,UAAU,KAAK;AACpB,WAAK,UAAU,KAAK;AACpB;AAAA,IACF;AAEA,SAAK,IAAI,KAAK,UAAU,MAAM,IAAI,MAAM,OAAO;AAC/C,SAAK,IAAI,KAAK,UAAU,MAAM,IAAI,MAAM,OAAO;AAE/C,SAAK,IAAI,MAAM,YAAY,OAAO,EAAE,YAAY,KAAK,GAAG,YAAY,KAAK,EAAE,CAAC;AAAA,EAC9E;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -30,6 +30,9 @@ module.exports = __toCommonJS(Sentinel_exports);
|
|
|
30
30
|
var import_js_toolkit = require("@studiometa/js-toolkit");
|
|
31
31
|
var Sentinel = class extends (0, import_js_toolkit.withIntersectionObserver)(import_js_toolkit.Base, { threshold: [0, 1] }) {
|
|
32
32
|
};
|
|
33
|
+
/**
|
|
34
|
+
* Config.
|
|
35
|
+
*/
|
|
33
36
|
__publicField(Sentinel, "config", {
|
|
34
37
|
name: "Sentinel"
|
|
35
38
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../packages/ui/primitives/Sentinel/Sentinel.ts"],
|
|
4
|
-
"sourcesContent": ["import { Base, withIntersectionObserver } from '@studiometa/js-toolkit';\nimport type { BaseConfig } from '@studiometa/js-toolkit';\n\n/**\n * Sentinel class.\n */\nexport class Sentinel extends withIntersectionObserver(Base, { threshold: [0, 1] }) {\n /**\n * Config.\n */\n static config:BaseConfig = {\n name: 'Sentinel',\n };\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAA+C;AAMxC,IAAM,WAAN,kBAAuB,4CAAyB,wBAAM,EAAE,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE;AAOpF;AAHE,cAJW,UAIJ,
|
|
4
|
+
"sourcesContent": ["import { Base, withIntersectionObserver } from '@studiometa/js-toolkit';\nimport type { BaseConfig } from '@studiometa/js-toolkit';\n\n/**\n * Sentinel class.\n */\nexport class Sentinel extends withIntersectionObserver(Base, { threshold: [0, 1] }) {\n /**\n * Config.\n */\n static config: BaseConfig = {\n name: 'Sentinel',\n };\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAA+C;AAMxC,IAAM,WAAN,kBAAuB,4CAAyB,wBAAM,EAAE,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE;AAOpF;AAAA;AAAA;AAAA;AAHE,cAJW,UAIJ,UAAqB;AAAA,EAC1B,MAAM;AACR;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../packages/ui/primitives/Sentinel/Sentinel.ts"],
|
|
4
|
-
"sourcesContent": ["import { Base, withIntersectionObserver } from '@studiometa/js-toolkit';\nimport type { BaseConfig } from '@studiometa/js-toolkit';\n\n/**\n * Sentinel class.\n */\nexport class Sentinel extends withIntersectionObserver(Base, { threshold: [0, 1] }) {\n /**\n * Config.\n */\n static config:BaseConfig = {\n name: 'Sentinel',\n };\n}\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,MAAM,gCAAgC;AAMxC,MAAM,iBAAiB,yBAAyB,MAAM,EAAE,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE;AAAA,EAIlF,OAAO,
|
|
4
|
+
"sourcesContent": ["import { Base, withIntersectionObserver } from '@studiometa/js-toolkit';\nimport type { BaseConfig } from '@studiometa/js-toolkit';\n\n/**\n * Sentinel class.\n */\nexport class Sentinel extends withIntersectionObserver(Base, { threshold: [0, 1] }) {\n /**\n * Config.\n */\n static config: BaseConfig = {\n name: 'Sentinel',\n };\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,MAAM,gCAAgC;AAMxC,MAAM,iBAAiB,yBAAyB,MAAM,EAAE,WAAW,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE;AAAA;AAAA;AAAA;AAAA,EAIlF,OAAO,SAAqB;AAAA,IAC1B,MAAM;AAAA,EACR;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -31,6 +31,9 @@ var import_js_toolkit = require("@studiometa/js-toolkit");
|
|
|
31
31
|
var import_decorators = require("../../decorators/index.cjs");
|
|
32
32
|
var Transition = class extends (0, import_decorators.withTransition)(import_js_toolkit.Base) {
|
|
33
33
|
};
|
|
34
|
+
/**
|
|
35
|
+
* Config.
|
|
36
|
+
*/
|
|
34
37
|
__publicField(Transition, "config", {
|
|
35
38
|
name: "Transition"
|
|
36
39
|
});
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../packages/ui/primitives/Transition/Transition.ts"],
|
|
4
4
|
"sourcesContent": ["// eslint-disable-next-line max-classes-per-file\nimport { Base, BaseProps } from '@studiometa/js-toolkit';\nimport type { BaseConfig } from '@studiometa/js-toolkit';\nimport { withTransition } from '../../decorators/index.js';\n\n/**\n * Transition class.\n */\nexport class Transition<T extends BaseProps = BaseProps> extends withTransition<Base>(Base)<T> {\n /**\n * Config.\n */\n static config: BaseConfig = {\n name: 'Transition',\n };\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,wBAAgC;AAEhC,wBAA+B;AAKxB,IAAM,aAAN,kBAA0D,kCAAqB,sBAAI,EAAK;AAO/F;AAHE,cAJW,YAIJ,UAAqB;AAAA,EAC1B,MAAM;AACR;",
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,wBAAgC;AAEhC,wBAA+B;AAKxB,IAAM,aAAN,kBAA0D,kCAAqB,sBAAI,EAAK;AAO/F;AAAA;AAAA;AAAA;AAHE,cAJW,YAIJ,UAAqB;AAAA,EAC1B,MAAM;AACR;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../packages/ui/primitives/Transition/Transition.ts"],
|
|
4
4
|
"sourcesContent": ["// eslint-disable-next-line max-classes-per-file\nimport { Base, BaseProps } from '@studiometa/js-toolkit';\nimport type { BaseConfig } from '@studiometa/js-toolkit';\nimport { withTransition } from '../../decorators/index.js';\n\n/**\n * Transition class.\n */\nexport class Transition<T extends BaseProps = BaseProps> extends withTransition<Base>(Base)<T> {\n /**\n * Config.\n */\n static config: BaseConfig = {\n name: 'Transition',\n };\n}\n"],
|
|
5
|
-
"mappings": "AACA,SAAS,YAAuB;AAEhC,SAAS,sBAAsB;AAKxB,MAAM,mBAAoD,eAAqB,IAAI,EAAK;AAAA,EAI7F,OAAO,SAAqB;AAAA,IAC1B,MAAM;AAAA,EACR;AACF;",
|
|
5
|
+
"mappings": "AACA,SAAS,YAAuB;AAEhC,SAAS,sBAAsB;AAKxB,MAAM,mBAAoD,eAAqB,IAAI,EAAK;AAAA;AAAA;AAAA;AAAA,EAI7F,OAAO,SAAqB;AAAA,IAC1B,MAAM;AAAA,EACR;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|