@studiometa/ui 0.2.12 → 0.2.14
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/atoms/AnchorScrollTo/AnchorScrollTo.cjs +3 -3
- package/atoms/AnchorScrollTo/AnchorScrollTo.d.ts +8 -15
- package/atoms/AnchorScrollTo/AnchorScrollTo.js +26 -1
- package/atoms/AnchorScrollTo/index.cjs +20 -0
- package/atoms/AnchorScrollTo/index.d.ts +1 -0
- package/atoms/AnchorScrollTo/index.js +1 -0
- package/atoms/Cursor/Cursor.cjs +16 -9
- package/atoms/Cursor/Cursor.d.ts +19 -117
- package/atoms/Cursor/Cursor.js +111 -1
- package/atoms/Cursor/index.cjs +20 -0
- package/atoms/Cursor/index.d.ts +1 -0
- package/atoms/Cursor/index.js +1 -0
- package/atoms/Figure/Figure.cjs +15 -9
- package/atoms/Figure/Figure.d.ts +18 -53
- package/atoms/Figure/Figure.js +56 -1
- package/atoms/Figure/FigureTwicPics.cjs +10 -10
- package/atoms/Figure/FigureTwicPics.d.ts +16 -37
- package/atoms/Figure/FigureTwicPics.js +51 -1
- package/atoms/Figure/index.cjs +4 -14
- package/atoms/Figure/index.d.ts +2 -2
- package/atoms/Figure/index.js +2 -1
- package/atoms/LargeText/LargeText.cjs +17 -10
- package/atoms/LargeText/LargeText.d.ts +19 -40
- package/atoms/LargeText/LargeText.js +68 -1
- package/atoms/LargeText/index.cjs +20 -0
- package/atoms/LargeText/index.d.ts +1 -0
- package/atoms/LargeText/index.js +1 -0
- package/atoms/LazyInclude/LazyInclude.cjs +2 -2
- package/atoms/LazyInclude/LazyInclude.d.ts +17 -36
- package/atoms/LazyInclude/LazyInclude.js +46 -1
- package/atoms/LazyInclude/index.cjs +20 -0
- package/atoms/LazyInclude/index.d.ts +1 -0
- package/atoms/LazyInclude/index.js +1 -0
- package/atoms/Prefetch/AbstractPrefetch.cjs +6 -6
- package/atoms/Prefetch/AbstractPrefetch.d.ts +12 -35
- package/atoms/Prefetch/AbstractPrefetch.js +58 -1
- package/atoms/Prefetch/PrefetchWhenOver.cjs +5 -8
- package/atoms/Prefetch/PrefetchWhenOver.d.ts +8 -14
- package/atoms/Prefetch/PrefetchWhenOver.js +19 -1
- package/atoms/Prefetch/PrefetchWhenVisible.cjs +5 -8
- package/atoms/Prefetch/PrefetchWhenVisible.d.ts +10 -14
- package/atoms/Prefetch/PrefetchWhenVisible.js +20 -1
- package/atoms/Prefetch/index.cjs +5 -16
- package/atoms/Prefetch/index.d.ts +3 -3
- package/atoms/Prefetch/index.js +3 -1
- package/atoms/ScrollAnimation/AbstractScrollAnimation.cjs +17 -14
- package/atoms/ScrollAnimation/AbstractScrollAnimation.d.ts +19 -89
- package/atoms/ScrollAnimation/AbstractScrollAnimation.js +67 -1
- package/atoms/ScrollAnimation/ScrollAnimation.cjs +5 -14
- package/atoms/ScrollAnimation/ScrollAnimation.d.ts +13 -51
- package/atoms/ScrollAnimation/ScrollAnimation.js +21 -1
- package/atoms/ScrollAnimation/ScrollAnimationChild.cjs +37 -14
- package/atoms/ScrollAnimation/ScrollAnimationChild.d.ts +19 -6
- package/atoms/ScrollAnimation/ScrollAnimationChild.js +53 -1
- package/atoms/ScrollAnimation/ScrollAnimationChildWithEase.cjs +6 -9
- package/atoms/ScrollAnimation/ScrollAnimationChildWithEase.d.ts +8 -2
- package/atoms/ScrollAnimation/ScrollAnimationChildWithEase.js +17 -1
- package/atoms/ScrollAnimation/ScrollAnimationParent.cjs +8 -8
- package/atoms/ScrollAnimation/ScrollAnimationParent.d.ts +14 -26
- package/atoms/ScrollAnimation/ScrollAnimationParent.js +27 -1
- package/atoms/ScrollAnimation/ScrollAnimationWithEase.cjs +6 -9
- package/atoms/ScrollAnimation/ScrollAnimationWithEase.d.ts +15 -2
- package/atoms/ScrollAnimation/ScrollAnimationWithEase.js +17 -1
- package/atoms/ScrollAnimation/animationScrollWithEase.cjs +24 -16
- package/atoms/ScrollAnimation/animationScrollWithEase.d.ts +10 -8
- package/atoms/ScrollAnimation/animationScrollWithEase.js +36 -1
- package/atoms/ScrollAnimation/index.cjs +9 -24
- package/atoms/ScrollAnimation/index.d.ts +7 -7
- package/atoms/ScrollAnimation/index.js +7 -1
- package/atoms/ScrollReveal/ScrollReveal.cjs +7 -4
- package/atoms/ScrollReveal/ScrollReveal.d.ts +16 -59
- package/atoms/ScrollReveal/ScrollReveal.js +54 -1
- package/atoms/ScrollReveal/index.cjs +3 -12
- package/atoms/ScrollReveal/index.d.ts +1 -1
- package/atoms/ScrollReveal/index.js +1 -1
- package/atoms/index.cjs +5 -18
- package/atoms/index.d.ts +8 -8
- package/atoms/index.js +8 -1
- package/decorators/index.cjs +3 -12
- package/decorators/index.d.ts +1 -1
- package/decorators/index.js +1 -1
- package/decorators/withTransition.cjs +44 -29
- package/decorators/withTransition.d.ts +21 -33
- package/decorators/withTransition.js +60 -1
- package/index.cjs +1 -1
- package/index.d.ts +5 -5
- package/index.js +5 -1
- package/molecules/Accordion/Accordion.cjs +7 -10
- package/molecules/Accordion/Accordion.d.ts +5 -23
- package/molecules/Accordion/Accordion.js +19 -1
- package/molecules/Accordion/AccordionCore.cjs +6 -8
- package/molecules/Accordion/AccordionCore.d.ts +22 -70
- package/molecules/Accordion/AccordionCore.js +32 -1
- package/molecules/Accordion/AccordionItem.cjs +39 -23
- package/molecules/Accordion/AccordionItem.d.ts +24 -94
- package/molecules/Accordion/AccordionItem.js +153 -1
- package/molecules/Accordion/index.cjs +21 -0
- package/molecules/Accordion/index.d.ts +2 -0
- package/molecules/Accordion/index.js +2 -0
- package/molecules/Menu/Menu.cjs +6 -10
- package/molecules/Menu/Menu.d.ts +24 -84
- package/molecules/Menu/Menu.js +114 -1
- package/molecules/Menu/MenuBtn.cjs +7 -5
- package/molecules/Menu/MenuBtn.d.ts +7 -9
- package/molecules/Menu/MenuBtn.js +30 -1
- package/molecules/Menu/MenuList.cjs +13 -11
- package/molecules/Menu/MenuList.d.ts +16 -53
- package/molecules/Menu/MenuList.js +113 -1
- package/molecules/Menu/index.cjs +5 -16
- package/molecules/Menu/index.d.ts +3 -3
- package/molecules/Menu/index.js +3 -1
- package/molecules/Modal/Modal.cjs +42 -13
- package/molecules/Modal/Modal.d.ts +69 -140
- package/molecules/Modal/Modal.js +163 -1
- package/molecules/Modal/ModalWithTransition.cjs +4 -7
- package/molecules/Modal/ModalWithTransition.d.ts +6 -22
- package/molecules/Modal/ModalWithTransition.js +46 -1
- package/molecules/Modal/index.cjs +21 -0
- package/molecules/Modal/index.d.ts +2 -0
- package/molecules/Modal/index.js +2 -0
- package/molecules/Panel/Panel.cjs +41 -26
- package/molecules/Panel/Panel.d.ts +22 -21
- package/molecules/Panel/Panel.js +108 -1
- package/molecules/Panel/index.cjs +20 -0
- package/molecules/Panel/index.d.ts +1 -0
- package/molecules/Panel/index.js +1 -0
- package/molecules/Slider/AbstractSliderChild.cjs +7 -9
- package/molecules/Slider/AbstractSliderChild.d.ts +11 -30
- package/molecules/Slider/AbstractSliderChild.js +48 -1
- package/molecules/Slider/Slider.cjs +46 -30
- package/molecules/Slider/Slider.d.ts +40 -157
- package/molecules/Slider/Slider.js +279 -1
- package/molecules/Slider/SliderBtn.cjs +4 -7
- package/molecules/Slider/SliderBtn.d.ts +12 -23
- package/molecules/Slider/SliderBtn.js +34 -1
- package/molecules/Slider/SliderCount.cjs +4 -7
- package/molecules/Slider/SliderCount.d.ts +10 -16
- package/molecules/Slider/SliderCount.js +19 -1
- package/molecules/Slider/SliderDots.cjs +8 -8
- package/molecules/Slider/SliderDots.d.ts +11 -31
- package/molecules/Slider/SliderDots.js +32 -1
- package/molecules/Slider/SliderDrag.cjs +2 -2
- package/molecules/Slider/SliderDrag.d.ts +12 -30
- package/molecules/Slider/SliderDrag.js +34 -1
- package/molecules/Slider/SliderItem.cjs +12 -6
- package/molecules/Slider/SliderItem.d.ts +21 -33
- package/molecules/Slider/SliderItem.js +93 -1
- package/molecules/Slider/SliderProgress.cjs +4 -7
- package/molecules/Slider/SliderProgress.d.ts +10 -25
- package/molecules/Slider/SliderProgress.js +26 -1
- package/molecules/Slider/index.cjs +10 -26
- package/molecules/Slider/index.d.ts +8 -8
- package/molecules/Slider/index.js +8 -1
- package/molecules/Sticky/Sticky.cjs +16 -10
- package/molecules/Sticky/Sticky.d.ts +30 -68
- package/molecules/Sticky/Sticky.js +110 -1
- package/molecules/Sticky/index.cjs +20 -0
- package/molecules/Sticky/index.d.ts +1 -0
- package/molecules/Sticky/index.js +1 -0
- package/molecules/TableOfContent/TableOfContent.cjs +5 -8
- package/molecules/TableOfContent/TableOfContent.d.ts +19 -41
- package/molecules/TableOfContent/TableOfContent.js +42 -1
- package/molecules/TableOfContent/TableOfContentAnchor.cjs +9 -5
- package/molecules/TableOfContent/TableOfContentAnchor.d.ts +14 -17
- package/molecules/TableOfContent/TableOfContentAnchor.js +43 -1
- package/molecules/TableOfContent/index.cjs +4 -14
- package/molecules/TableOfContent/index.d.ts +2 -2
- package/molecules/TableOfContent/index.js +2 -1
- package/molecules/Tabs/Tabs.cjs +42 -22
- package/molecules/Tabs/Tabs.d.ts +28 -90
- package/molecules/Tabs/Tabs.js +123 -1
- package/molecules/Tabs/index.cjs +20 -0
- package/molecules/Tabs/index.d.ts +1 -0
- package/molecules/Tabs/index.js +1 -0
- package/molecules/index.cjs +7 -24
- package/molecules/index.d.ts +9 -10
- package/molecules/index.js +9 -1
- package/organisms/Frame/Frame.cjs +20 -43
- package/organisms/Frame/Frame.d.ts +21 -98
- package/organisms/Frame/Frame.js +161 -1
- package/organisms/Frame/FrameAnchor.cjs +2 -2
- package/organisms/Frame/FrameAnchor.d.ts +7 -16
- package/organisms/Frame/FrameAnchor.js +18 -1
- package/organisms/Frame/FrameForm.cjs +2 -2
- package/organisms/Frame/FrameForm.d.ts +10 -16
- package/organisms/Frame/FrameForm.js +18 -1
- package/organisms/Frame/FrameTarget.cjs +15 -7
- package/organisms/Frame/FrameTarget.d.ts +17 -26
- package/organisms/Frame/FrameTarget.js +79 -1
- package/organisms/Frame/index.cjs +6 -18
- package/organisms/Frame/index.d.ts +4 -4
- package/organisms/Frame/index.js +4 -1
- package/organisms/index.cjs +1 -1
- package/organisms/index.d.ts +1 -1
- package/organisms/index.js +1 -1
- package/package.json +2 -2
- package/primitives/Draggable/Draggable.cjs +9 -6
- package/primitives/Draggable/Draggable.d.ts +10 -11
- package/primitives/Draggable/Draggable.js +33 -1
- package/primitives/Draggable/index.cjs +20 -0
- package/primitives/Draggable/index.d.ts +1 -0
- package/primitives/Draggable/index.js +1 -0
- package/primitives/Sentinel/Sentinel.cjs +2 -2
- package/primitives/Sentinel/Sentinel.d.ts +6 -5
- package/primitives/Sentinel/Sentinel.js +15 -1
- package/primitives/Sentinel/index.cjs +20 -0
- package/primitives/Sentinel/index.d.ts +1 -0
- package/primitives/Sentinel/index.js +1 -0
- package/primitives/Transition/Transition.cjs +12 -3
- package/primitives/Transition/Transition.d.ts +13 -7
- package/primitives/Transition/Transition.js +16 -1
- package/primitives/Transition/index.cjs +20 -0
- package/primitives/Transition/index.d.ts +1 -0
- package/primitives/Transition/index.js +1 -0
- package/primitives/index.cjs +5 -16
- package/primitives/index.d.ts +3 -3
- package/primitives/index.js +3 -1
|
@@ -1,24 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { Base } from '@studiometa/js-toolkit';
|
|
2
|
+
import type { BaseProps, BaseConfig } from '@studiometa/js-toolkit';
|
|
3
|
+
export interface FrameFormProps extends BaseProps {
|
|
4
|
+
$el: HTMLFormElement;
|
|
5
|
+
}
|
|
6
6
|
/**
|
|
7
7
|
* FrameForm class.
|
|
8
8
|
*/
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
export declare class FrameForm<T extends BaseProps = BaseProps> extends Base<T & FrameFormProps> {
|
|
10
|
+
/**
|
|
11
|
+
* Config.
|
|
12
|
+
*/
|
|
13
|
+
static config: BaseConfig;
|
|
13
14
|
/**
|
|
14
15
|
* Get the form action.
|
|
15
|
-
*
|
|
16
|
-
* @this {FrameFormInterface}
|
|
17
|
-
* @returns {string}
|
|
18
16
|
*/
|
|
19
17
|
get action(): string;
|
|
20
18
|
}
|
|
21
|
-
export type FrameFormInterface = FrameForm & {
|
|
22
|
-
$el: HTMLFormElement;
|
|
23
|
-
};
|
|
24
|
-
import { Base } from "@studiometa/js-toolkit";
|
|
@@ -1 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => {
|
|
4
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
+
return value;
|
|
6
|
+
};
|
|
7
|
+
import { Base } from "@studiometa/js-toolkit";
|
|
8
|
+
class FrameForm extends Base {
|
|
9
|
+
get action() {
|
|
10
|
+
return this.$el.action;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
__publicField(FrameForm, "config", {
|
|
14
|
+
name: "FrameForm"
|
|
15
|
+
});
|
|
16
|
+
export {
|
|
17
|
+
FrameForm
|
|
18
|
+
};
|
|
@@ -21,10 +21,10 @@ var __publicField = (obj, key, value) => {
|
|
|
21
21
|
return value;
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
// packages/ui/organisms/Frame/FrameTarget.
|
|
24
|
+
// packages/ui/organisms/Frame/FrameTarget.ts
|
|
25
25
|
var FrameTarget_exports = {};
|
|
26
26
|
__export(FrameTarget_exports, {
|
|
27
|
-
|
|
27
|
+
FrameTarget: () => FrameTarget
|
|
28
28
|
});
|
|
29
29
|
module.exports = __toCommonJS(FrameTarget_exports);
|
|
30
30
|
var import_utils = require("@studiometa/js-toolkit/utils");
|
|
@@ -36,7 +36,8 @@ var _FrameTarget = class extends import_primitives.Transition {
|
|
|
36
36
|
return options;
|
|
37
37
|
}
|
|
38
38
|
get id() {
|
|
39
|
-
|
|
39
|
+
var _a;
|
|
40
|
+
return (_a = this.$options.id) != null ? _a : this.$el.id;
|
|
40
41
|
}
|
|
41
42
|
async enter() {
|
|
42
43
|
this.$log("enter");
|
|
@@ -45,9 +46,13 @@ var _FrameTarget = class extends import_primitives.Transition {
|
|
|
45
46
|
switch (this.$options.mode) {
|
|
46
47
|
case "append":
|
|
47
48
|
case "prepend":
|
|
48
|
-
await Promise.all(
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
await Promise.all(
|
|
50
|
+
Array.from(this.$el.children).filter(
|
|
51
|
+
(child) => from.split(" ").every((className) => child.classList.contains(className))
|
|
52
|
+
).map(
|
|
53
|
+
(child) => (0, import_utils.transition)(child, transitionStyles, enterKeep && "keep")
|
|
54
|
+
)
|
|
55
|
+
);
|
|
51
56
|
break;
|
|
52
57
|
case "replace":
|
|
53
58
|
default:
|
|
@@ -62,7 +67,10 @@ var _FrameTarget = class extends import_primitives.Transition {
|
|
|
62
67
|
Array.from(newTarget.$el.children).forEach((child) => {
|
|
63
68
|
child.classList.add(...this.$options.enterFrom.split(" "));
|
|
64
69
|
});
|
|
65
|
-
this.$el.insertAdjacentHTML(
|
|
70
|
+
this.$el.insertAdjacentHTML(
|
|
71
|
+
_FrameTarget.__INSERT_MODES[this.$options.mode],
|
|
72
|
+
newTarget.$el.innerHTML
|
|
73
|
+
);
|
|
66
74
|
break;
|
|
67
75
|
case "replace":
|
|
68
76
|
default:
|
|
@@ -1,45 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import type { BaseConfig, BaseProps } from '@studiometa/js-toolkit';
|
|
2
|
+
import { Transition } from '../../primitives/index.js';
|
|
3
|
+
export interface FrameTargetProps extends BaseProps {
|
|
4
|
+
$options: {
|
|
5
|
+
mode: 'replace' | 'prepend' | 'append';
|
|
6
|
+
id: string;
|
|
7
|
+
leaveKeep: true;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
6
10
|
/**
|
|
7
11
|
* FrameTarget class.
|
|
8
12
|
*/
|
|
9
|
-
export
|
|
13
|
+
export declare class FrameTarget<T extends BaseProps = BaseProps> extends Transition<T & FrameTargetProps> {
|
|
10
14
|
/**
|
|
11
15
|
* Config.
|
|
12
16
|
*/
|
|
13
|
-
static config:
|
|
14
|
-
name: string;
|
|
15
|
-
log: boolean;
|
|
16
|
-
options: {
|
|
17
|
-
mode: {
|
|
18
|
-
type: StringConstructor;
|
|
19
|
-
default: string;
|
|
20
|
-
};
|
|
21
|
-
id: StringConstructor;
|
|
22
|
-
};
|
|
23
|
-
debug?: boolean;
|
|
24
|
-
refs?: string[];
|
|
25
|
-
emits?: string[];
|
|
26
|
-
components?: import("@studiometa/js-toolkit/Base/index.js").BaseConfigComponents;
|
|
27
|
-
};
|
|
17
|
+
static config: BaseConfig;
|
|
28
18
|
/**
|
|
29
19
|
* Insert modes.
|
|
30
20
|
*/
|
|
31
21
|
static __INSERT_MODES: {
|
|
32
|
-
prepend:
|
|
33
|
-
append:
|
|
22
|
+
readonly prepend: "afterbegin";
|
|
23
|
+
readonly append: "beforeend";
|
|
34
24
|
};
|
|
25
|
+
/**
|
|
26
|
+
* Override options.
|
|
27
|
+
*/
|
|
28
|
+
get $options(): import("@studiometa/js-toolkit/Base/managers/OptionsManager.js").default & import("@studiometa/js-toolkit/Base/index.js").BaseOptions & (T & FrameTargetProps & import("../../index.js").TransitionProps)["$options"];
|
|
35
29
|
/**
|
|
36
30
|
* Get uniq ID.
|
|
37
|
-
* @returns {string}
|
|
38
31
|
*/
|
|
39
32
|
get id(): string;
|
|
40
33
|
/**
|
|
41
34
|
* Enter transition.
|
|
42
|
-
* @returns {Promise<void>}
|
|
43
35
|
*/
|
|
44
36
|
enter(): Promise<void>;
|
|
45
37
|
/**
|
|
@@ -50,4 +42,3 @@ export default class FrameTarget extends FrameTarget_base {
|
|
|
50
42
|
*/
|
|
51
43
|
updateContent(newTarget: FrameTarget): void;
|
|
52
44
|
}
|
|
53
|
-
export {};
|
|
@@ -1 +1,79 @@
|
|
|
1
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => {
|
|
4
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
+
return value;
|
|
6
|
+
};
|
|
7
|
+
import { transition } from "@studiometa/js-toolkit/utils";
|
|
8
|
+
import { Transition } from "../../primitives/index.js";
|
|
9
|
+
const _FrameTarget = class extends Transition {
|
|
10
|
+
get $options() {
|
|
11
|
+
const options = super.$options;
|
|
12
|
+
options.leaveKeep = true;
|
|
13
|
+
return options;
|
|
14
|
+
}
|
|
15
|
+
get id() {
|
|
16
|
+
var _a;
|
|
17
|
+
return (_a = this.$options.id) != null ? _a : this.$el.id;
|
|
18
|
+
}
|
|
19
|
+
async enter() {
|
|
20
|
+
this.$log("enter");
|
|
21
|
+
const { enterFrom: from, enterActive: active, enterTo: to, leaveTo, enterKeep } = this.$options;
|
|
22
|
+
const transitionStyles = { from, active, to };
|
|
23
|
+
switch (this.$options.mode) {
|
|
24
|
+
case "append":
|
|
25
|
+
case "prepend":
|
|
26
|
+
await Promise.all(
|
|
27
|
+
Array.from(this.$el.children).filter(
|
|
28
|
+
(child) => from.split(" ").every((className) => child.classList.contains(className))
|
|
29
|
+
).map(
|
|
30
|
+
(child) => transition(child, transitionStyles, enterKeep && "keep")
|
|
31
|
+
)
|
|
32
|
+
);
|
|
33
|
+
break;
|
|
34
|
+
case "replace":
|
|
35
|
+
default:
|
|
36
|
+
transitionStyles.from = Array.from(new Set([from, leaveTo].flat())).join(" ");
|
|
37
|
+
await transition(this.$el, transitionStyles, enterKeep && "keep");
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
updateContent(newTarget) {
|
|
41
|
+
switch (this.$options.mode) {
|
|
42
|
+
case "prepend":
|
|
43
|
+
case "append":
|
|
44
|
+
Array.from(newTarget.$el.children).forEach((child) => {
|
|
45
|
+
child.classList.add(...this.$options.enterFrom.split(" "));
|
|
46
|
+
});
|
|
47
|
+
this.$el.insertAdjacentHTML(
|
|
48
|
+
_FrameTarget.__INSERT_MODES[this.$options.mode],
|
|
49
|
+
newTarget.$el.innerHTML
|
|
50
|
+
);
|
|
51
|
+
break;
|
|
52
|
+
case "replace":
|
|
53
|
+
default:
|
|
54
|
+
this.$el.innerHTML = newTarget.$el.innerHTML;
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
let FrameTarget = _FrameTarget;
|
|
60
|
+
__publicField(FrameTarget, "config", {
|
|
61
|
+
...Transition.config,
|
|
62
|
+
name: "FrameTarget",
|
|
63
|
+
log: true,
|
|
64
|
+
options: {
|
|
65
|
+
...Transition.config.options,
|
|
66
|
+
mode: {
|
|
67
|
+
type: String,
|
|
68
|
+
default: "replace"
|
|
69
|
+
},
|
|
70
|
+
id: String
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
__publicField(FrameTarget, "__INSERT_MODES", {
|
|
74
|
+
prepend: "afterbegin",
|
|
75
|
+
append: "beforeend"
|
|
76
|
+
});
|
|
77
|
+
export {
|
|
78
|
+
FrameTarget
|
|
79
|
+
};
|
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
1
|
var __defProp = Object.defineProperty;
|
|
3
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
5
|
var __copyProps = (to, from, except, desc) => {
|
|
12
6
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
7
|
for (let key of __getOwnPropNames(from))
|
|
@@ -16,20 +10,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
10
|
}
|
|
17
11
|
return to;
|
|
18
12
|
};
|
|
19
|
-
var
|
|
13
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
20
14
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
15
|
|
|
22
|
-
// packages/ui/organisms/Frame/index.
|
|
16
|
+
// packages/ui/organisms/Frame/index.ts
|
|
23
17
|
var Frame_exports = {};
|
|
24
|
-
__export(Frame_exports, {
|
|
25
|
-
Frame: () => import_Frame.default,
|
|
26
|
-
FrameAnchor: () => import_FrameAnchor.default,
|
|
27
|
-
FrameForm: () => import_FrameForm.default,
|
|
28
|
-
FrameTarget: () => import_FrameTarget.default
|
|
29
|
-
});
|
|
30
18
|
module.exports = __toCommonJS(Frame_exports);
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
19
|
+
__reExport(Frame_exports, require("./Frame.cjs"), module.exports);
|
|
20
|
+
__reExport(Frame_exports, require("./FrameAnchor.cjs"), module.exports);
|
|
21
|
+
__reExport(Frame_exports, require("./FrameForm.cjs"), module.exports);
|
|
22
|
+
__reExport(Frame_exports, require("./FrameTarget.cjs"), module.exports);
|
|
35
23
|
if (module.exports.default) module.exports = module.exports.default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
1
|
+
export * from './Frame.js';
|
|
2
|
+
export * from './FrameAnchor.js';
|
|
3
|
+
export * from './FrameForm.js';
|
|
4
|
+
export * from './FrameTarget.js';
|
package/organisms/Frame/index.js
CHANGED
|
@@ -1 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
export * from "./Frame.js";
|
|
2
|
+
export * from "./FrameAnchor.js";
|
|
3
|
+
export * from "./FrameForm.js";
|
|
4
|
+
export * from "./FrameTarget.js";
|
package/organisms/index.cjs
CHANGED
|
@@ -13,7 +13,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
13
13
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
14
14
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
15
|
|
|
16
|
-
// packages/ui/organisms/index.
|
|
16
|
+
// packages/ui/organisms/index.ts
|
|
17
17
|
var organisms_exports = {};
|
|
18
18
|
module.exports = __toCommonJS(organisms_exports);
|
|
19
19
|
__reExport(organisms_exports, require("./Frame/index.cjs"), module.exports);
|
package/organisms/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from './Frame/index.js';
|
package/organisms/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export*from"./Frame/index.js";
|
|
1
|
+
export * from "./Frame/index.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@studiometa/ui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.14",
|
|
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.5.0",
|
|
33
33
|
"deepmerge": "^4.2.2"
|
|
34
34
|
}
|
|
35
35
|
}
|
|
@@ -21,19 +21,22 @@ var __publicField = (obj, key, value) => {
|
|
|
21
21
|
return value;
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
// packages/ui/primitives/Draggable/Draggable.
|
|
24
|
+
// packages/ui/primitives/Draggable/Draggable.ts
|
|
25
25
|
var Draggable_exports = {};
|
|
26
26
|
__export(Draggable_exports, {
|
|
27
|
-
|
|
27
|
+
Draggable: () => Draggable
|
|
28
28
|
});
|
|
29
29
|
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
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
constructor() {
|
|
34
|
+
super(...arguments);
|
|
35
|
+
__publicField(this, "x", 0);
|
|
36
|
+
__publicField(this, "y", 0);
|
|
37
|
+
__publicField(this, "originX", 0);
|
|
38
|
+
__publicField(this, "originY", 0);
|
|
39
|
+
}
|
|
37
40
|
dragged(props) {
|
|
38
41
|
if (props.mode === "start") {
|
|
39
42
|
this.originX = this.x;
|
|
@@ -1,34 +1,33 @@
|
|
|
1
|
+
import { Base } from '@studiometa/js-toolkit';
|
|
2
|
+
import type { BaseProps, BaseConfig, DragServiceProps } from '@studiometa/js-toolkit';
|
|
3
|
+
declare const Draggable_base: import("@studiometa/js-toolkit").BaseDecorator<import("@studiometa/js-toolkit").BaseInterface, Base<BaseProps>, BaseProps>;
|
|
1
4
|
/**
|
|
2
5
|
* Draggable class.
|
|
3
6
|
*/
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
export declare class Draggable<T extends BaseProps = BaseProps> extends Draggable_base<T> {
|
|
8
|
+
/**
|
|
9
|
+
* Config.
|
|
10
|
+
*/
|
|
11
|
+
static config: BaseConfig;
|
|
8
12
|
/**
|
|
9
13
|
* Horizontal transformation.
|
|
10
|
-
* @type {number}
|
|
11
14
|
*/
|
|
12
15
|
x: number;
|
|
13
16
|
/**
|
|
14
17
|
* Vertical transformation.
|
|
15
|
-
* @type {number}
|
|
16
18
|
*/
|
|
17
19
|
y: number;
|
|
18
20
|
/**
|
|
19
21
|
* Horizontal position origin.
|
|
20
|
-
* @type {number}
|
|
21
22
|
*/
|
|
22
23
|
originX: number;
|
|
23
24
|
/**
|
|
24
25
|
* Vertical position origin.
|
|
25
|
-
* @type {number}
|
|
26
26
|
*/
|
|
27
27
|
originY: number;
|
|
28
28
|
/**
|
|
29
29
|
* Drag service hook.
|
|
30
|
-
* @param {import('@studiometa/js-toolkit/services/drag.js').DragServiceProps} props
|
|
31
30
|
*/
|
|
32
|
-
dragged(props:
|
|
31
|
+
dragged(props: DragServiceProps): void;
|
|
33
32
|
}
|
|
34
|
-
|
|
33
|
+
export {};
|
|
@@ -1 +1,33 @@
|
|
|
1
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => {
|
|
4
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
+
return value;
|
|
6
|
+
};
|
|
7
|
+
import { Base, withDrag } from "@studiometa/js-toolkit";
|
|
8
|
+
import { matrix } from "@studiometa/js-toolkit/utils";
|
|
9
|
+
class Draggable extends withDrag(Base) {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
__publicField(this, "x", 0);
|
|
13
|
+
__publicField(this, "y", 0);
|
|
14
|
+
__publicField(this, "originX", 0);
|
|
15
|
+
__publicField(this, "originY", 0);
|
|
16
|
+
}
|
|
17
|
+
dragged(props) {
|
|
18
|
+
if (props.mode === "start") {
|
|
19
|
+
this.originX = this.x;
|
|
20
|
+
this.originY = this.y;
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
this.x = this.originX + props.x - props.origin.x;
|
|
24
|
+
this.y = this.originY + props.y - props.origin.y;
|
|
25
|
+
this.$el.style.transform = matrix({ translateX: this.x, translateY: this.y });
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
__publicField(Draggable, "config", {
|
|
29
|
+
name: "DraggableElement"
|
|
30
|
+
});
|
|
31
|
+
export {
|
|
32
|
+
Draggable
|
|
33
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
|
|
16
|
+
// packages/ui/primitives/Draggable/index.ts
|
|
17
|
+
var Draggable_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(Draggable_exports);
|
|
19
|
+
__reExport(Draggable_exports, require("./Draggable.cjs"), module.exports);
|
|
20
|
+
if (module.exports.default) module.exports = module.exports.default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Draggable.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Draggable.js";
|
|
@@ -21,10 +21,10 @@ var __publicField = (obj, key, value) => {
|
|
|
21
21
|
return value;
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
// packages/ui/primitives/Sentinel/Sentinel.
|
|
24
|
+
// packages/ui/primitives/Sentinel/Sentinel.ts
|
|
25
25
|
var Sentinel_exports = {};
|
|
26
26
|
__export(Sentinel_exports, {
|
|
27
|
-
|
|
27
|
+
Sentinel: () => Sentinel
|
|
28
28
|
});
|
|
29
29
|
module.exports = __toCommonJS(Sentinel_exports);
|
|
30
30
|
var import_js_toolkit = require("@studiometa/js-toolkit");
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import { Base } from '@studiometa/js-toolkit';
|
|
2
|
+
import type { BaseConfig } from '@studiometa/js-toolkit';
|
|
3
|
+
declare const Sentinel_base: import("@studiometa/js-toolkit").BaseDecorator<import("@studiometa/js-toolkit").WithIntersectionObserverInterface, Base<import("@studiometa/js-toolkit").BaseProps>, import("@studiometa/js-toolkit").WithIntersectionObserverProps>;
|
|
1
4
|
/**
|
|
2
5
|
* Sentinel class.
|
|
3
6
|
*/
|
|
4
|
-
export
|
|
7
|
+
export declare class Sentinel extends Sentinel_base {
|
|
5
8
|
/**
|
|
6
9
|
* Config.
|
|
7
10
|
*/
|
|
8
|
-
static config:
|
|
9
|
-
name: string;
|
|
10
|
-
};
|
|
11
|
+
static config: BaseConfig;
|
|
11
12
|
}
|
|
12
|
-
|
|
13
|
+
export {};
|
|
@@ -1 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => {
|
|
4
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
+
return value;
|
|
6
|
+
};
|
|
7
|
+
import { Base, withIntersectionObserver } from "@studiometa/js-toolkit";
|
|
8
|
+
class Sentinel extends withIntersectionObserver(Base, { threshold: [0, 1] }) {
|
|
9
|
+
}
|
|
10
|
+
__publicField(Sentinel, "config", {
|
|
11
|
+
name: "Sentinel"
|
|
12
|
+
});
|
|
13
|
+
export {
|
|
14
|
+
Sentinel
|
|
15
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
|
|
16
|
+
// packages/ui/primitives/Sentinel/index.ts
|
|
17
|
+
var Sentinel_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(Sentinel_exports);
|
|
19
|
+
__reExport(Sentinel_exports, require("./Sentinel.cjs"), module.exports);
|
|
20
|
+
if (module.exports.default) module.exports = module.exports.default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Sentinel.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Sentinel.js";
|
|
@@ -2,6 +2,7 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
5
6
|
var __export = (target, all) => {
|
|
6
7
|
for (var name in all)
|
|
7
8
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -15,14 +16,22 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
16
|
return to;
|
|
16
17
|
};
|
|
17
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var __publicField = (obj, key, value) => {
|
|
20
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
21
|
+
return value;
|
|
22
|
+
};
|
|
18
23
|
|
|
19
|
-
// packages/ui/primitives/Transition/Transition.
|
|
24
|
+
// packages/ui/primitives/Transition/Transition.ts
|
|
20
25
|
var Transition_exports = {};
|
|
21
26
|
__export(Transition_exports, {
|
|
22
|
-
|
|
27
|
+
Transition: () => Transition
|
|
23
28
|
});
|
|
24
29
|
module.exports = __toCommonJS(Transition_exports);
|
|
25
30
|
var import_js_toolkit = require("@studiometa/js-toolkit");
|
|
26
31
|
var import_decorators = require("../../decorators/index.cjs");
|
|
27
|
-
var
|
|
32
|
+
var Transition = class extends (0, import_decorators.withTransition)(import_js_toolkit.Base) {
|
|
33
|
+
};
|
|
34
|
+
__publicField(Transition, "config", {
|
|
35
|
+
name: "Transition"
|
|
36
|
+
});
|
|
28
37
|
if (module.exports.default) module.exports = module.exports.default;
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { Base, BaseProps } from '@studiometa/js-toolkit';
|
|
2
|
+
import type { BaseConfig } from '@studiometa/js-toolkit';
|
|
3
|
+
declare const Transition_base: import("@studiometa/js-toolkit").BaseDecorator<import("../../decorators/withTransition.js").TransitionInterface, Base<BaseProps>, import("../../decorators/withTransition.js").TransitionProps>;
|
|
4
|
+
/**
|
|
5
|
+
* Transition class.
|
|
6
|
+
*/
|
|
7
|
+
export declare class Transition<T extends BaseProps = BaseProps> extends Transition_base<T> {
|
|
8
|
+
/**
|
|
9
|
+
* Config.
|
|
10
|
+
*/
|
|
11
|
+
static config: BaseConfig;
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
@@ -1 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => {
|
|
4
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
+
return value;
|
|
6
|
+
};
|
|
7
|
+
import { Base } from "@studiometa/js-toolkit";
|
|
8
|
+
import { withTransition } from "../../decorators/index.js";
|
|
9
|
+
class Transition extends withTransition(Base) {
|
|
10
|
+
}
|
|
11
|
+
__publicField(Transition, "config", {
|
|
12
|
+
name: "Transition"
|
|
13
|
+
});
|
|
14
|
+
export {
|
|
15
|
+
Transition
|
|
16
|
+
};
|