@fluid-topics/ft-ripple 2.1.18 → 2.1.20
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/build/ft-ripple.js
CHANGED
|
@@ -5,9 +5,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
import { html, } from "lit";
|
|
8
|
-
import { property, query, state } from "lit/decorators.js";
|
|
8
|
+
import { property, query, state, } from "lit/decorators.js";
|
|
9
9
|
import { classMap } from "lit/directives/class-map.js";
|
|
10
|
-
import { Debouncer, FtLitElement } from "@fluid-topics/ft-wc-utils";
|
|
10
|
+
import { Debouncer, FtLitElement, } from "@fluid-topics/ft-wc-utils";
|
|
11
11
|
import { styles } from "./ft-ripple.styles";
|
|
12
12
|
export class FtRipple extends FtLitElement {
|
|
13
13
|
constructor() {
|
|
@@ -39,8 +39,8 @@ export class FtRipple extends FtLitElement {
|
|
|
39
39
|
this.setupDebouncer = new Debouncer(10);
|
|
40
40
|
this.moveRipple = (e) => {
|
|
41
41
|
var _a, _b;
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
const { x, y } = this.getCoordinates(e);
|
|
43
|
+
const rect = (_b = (_a = this.ripple) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) !== null && _b !== void 0 ? _b : { x: 0, y: 0, width: 0, height: 0 };
|
|
44
44
|
this.originX = Math.round(x != null ? x - rect.x : rect.width / 2);
|
|
45
45
|
this.originY = Math.round(y != null ? y - rect.y : rect.height / 2);
|
|
46
46
|
};
|
|
@@ -65,7 +65,7 @@ export class FtRipple extends FtLitElement {
|
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
67
|
render() {
|
|
68
|
-
|
|
68
|
+
const classes = {
|
|
69
69
|
"ft-ripple": true,
|
|
70
70
|
"ft-ripple--primary": this.primary,
|
|
71
71
|
"ft-ripple--secondary": this.secondary,
|
|
@@ -144,7 +144,7 @@ export class FtRipple extends FtLitElement {
|
|
|
144
144
|
target.setAttribute("data-is-ft-ripple-target", "true");
|
|
145
145
|
const startPress = (...endEvents) => {
|
|
146
146
|
return (startEvent) => {
|
|
147
|
-
endEvents.forEach(endEvent => window.addEventListener(endEvent, this.endPress, { once: true }));
|
|
147
|
+
endEvents.forEach((endEvent) => window.addEventListener(endEvent, this.endPress, { once: true }));
|
|
148
148
|
this.startPress(startEvent);
|
|
149
149
|
};
|
|
150
150
|
};
|
|
@@ -210,7 +210,7 @@ export class FtRipple extends FtLitElement {
|
|
|
210
210
|
return true;
|
|
211
211
|
}
|
|
212
212
|
if (e != null) {
|
|
213
|
-
for (
|
|
213
|
+
for (const t of e.composedPath()) {
|
|
214
214
|
if (t === this.target) {
|
|
215
215
|
break;
|
|
216
216
|
}
|
package/build/ft-ripple.min.js
CHANGED
|
@@ -5,7 +5,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:r.extend("--ftds-con
|
|
|
5
5
|
.highlight-html-match {
|
|
6
6
|
background: ${ii};
|
|
7
7
|
}
|
|
8
|
-
`;function Bl(t,e,o){var n,a;let i=t.getAttribute("data-highlight-html-query");if((i??"")!==(e??"")){let s=new Ml(t);if(s.unmark(),e&&e.trim()){let l={className:(n=o?.className)!==null&&n!==void 0?n:"highlight-html-match",acrossElements:!0};o?.attributes!=null&&(l.each=
|
|
8
|
+
`;function Bl(t,e,o){var n,a;let i=t.getAttribute("data-highlight-html-query");if((i??"")!==(e??"")){let s=new Ml(t);if(s.unmark(),e&&e.trim()){let l={className:(n=o?.className)!==null&&n!==void 0?n:"highlight-html-match",acrossElements:!0};o?.attributes!=null&&(l.each=p=>{for(let h in o.attributes)p.setAttribute(h,o.attributes[h])}),s.mark(e.replace(/"[^"]+"/g,""),{...l,separateWordSearch:!0}),((a=e.match(/"[^"]+"/g))!==null&&a!==void 0?a:[]).forEach(p=>s.mark(p.replace(/"/g,""),{...l,separateWordSearch:!1}))}}t.setAttribute("data-highlight-html-query",e??"")}var Io={};k(Io,{noTextInputDefaultClearButton:()=>Gl,noTextSelect:()=>$l,safariEllipsisFix:()=>zl,wordWrap:()=>Hl});var $l=M`
|
|
9
9
|
.ft-no-text-select {
|
|
10
10
|
-webkit-touch-callout: none;
|
|
11
11
|
-webkit-user-select: none;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { css } from "lit";
|
|
2
|
-
import { designSystemVariables, FtCssVariableFactory } from "@fluid-topics/ft-wc-utils";
|
|
2
|
+
import { designSystemVariables, FtCssVariableFactory, } from "@fluid-topics/ft-wc-utils";
|
|
3
3
|
const colorCssVar = FtCssVariableFactory.extend("--ft-ripple-color", "", designSystemVariables.colorContent);
|
|
4
4
|
export const FtRippleCssVariables = {
|
|
5
5
|
color: colorCssVar,
|
|
@@ -8,7 +8,7 @@ export const FtRippleCssVariables = {
|
|
|
8
8
|
opacityContentOnSurfaceHover: FtCssVariableFactory.external(designSystemVariables.opacityContentOnSurfaceHover, "Design system"),
|
|
9
9
|
opacityContentOnSurfaceFocused: FtCssVariableFactory.external(designSystemVariables.opacityContentOnSurfaceFocused, "Design system"),
|
|
10
10
|
opacityContentOnSurfaceSelected: FtCssVariableFactory.external(designSystemVariables.opacityContentOnSurfaceSelected, "Design system"),
|
|
11
|
-
borderRadius: FtCssVariableFactory.create("--ft-ripple-border-radius", "", "SIZE", "0px")
|
|
11
|
+
borderRadius: FtCssVariableFactory.create("--ft-ripple-border-radius", "", "SIZE", "0px"),
|
|
12
12
|
};
|
|
13
13
|
const primaryColorCssVar = FtCssVariableFactory.extend("--ft-ripple-color", "", designSystemVariables.colorPrimary);
|
|
14
14
|
export const FtRipplePrimaryCssVariables = {
|
|
@@ -20,7 +20,7 @@ export const FtRippleSecondaryCssVariables = {
|
|
|
20
20
|
color: secondaryColorCssVar,
|
|
21
21
|
backgroundColor: FtCssVariableFactory.extend("--ft-ripple-background-color", "", secondaryColorCssVar),
|
|
22
22
|
};
|
|
23
|
-
//language=css
|
|
23
|
+
// language=css
|
|
24
24
|
export const styles = css `
|
|
25
25
|
:host {
|
|
26
26
|
display: contents;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-ripple",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.20",
|
|
4
4
|
"description": "A custom Fluid Topics ripple component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-wc-utils": "2.1.
|
|
22
|
+
"@fluid-topics/ft-wc-utils": "2.1.20",
|
|
23
23
|
"lit": "3.1.0"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "77e9f03085f977dde887e175b964bf66b862253f"
|
|
26
26
|
}
|