lupine.components 1.0.17 → 1.0.19
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/package.json +1 -1
- package/src/components/desktop-footer.tsx +17 -0
- package/src/components/desktop-header.tsx +52 -0
- package/src/components/menu-bar.tsx +1 -1
- package/src/components/menu-sidebar.tsx +1 -1
- package/src/components/mobile-components/icon-menu-item-props.ts +6 -0
- package/src/components/mobile-components/index.ts +7 -0
- package/src/components/mobile-components/mobile-footer-menu.tsx +9 -13
- package/src/{frames/header-with-back-frame.tsx → components/mobile-components/mobile-frame-with-header.tsx} +22 -13
- package/src/components/mobile-components/mobile-header-component.tsx +16 -4
- package/src/components/mobile-components/mobile-header-title-icon.tsx +105 -0
- package/src/components/mobile-components/mobile-side-menu.tsx +150 -0
- package/src/components/mobile-components/mobile-top-sys-icon.tsx +18 -0
- package/src/components/mobile-components/mobile-top-sys-menu.tsx +62 -0
- package/src/components/modal.tsx +2 -0
- package/src/components/popup-menu.tsx +30 -24
- package/src/components/progress.tsx +2 -2
- package/src/frames/index.ts +0 -2
- package/src/frames/responsive-frame.tsx +31 -33
- package/src/frames/slider-frame.tsx +20 -8
- package/src/frames/top-frame.tsx +4 -2
- package/src/lib/blob-utils.ts +23 -0
- package/src/lib/dom-utils.ts +32 -0
- package/src/lib/{dom/download.ts → download-link.ts} +1 -1
- package/src/lib/{dom/download-stream.ts → download-stream.ts} +3 -1
- package/src/lib/escape-html.ts +8 -0
- package/src/lib/find-parent-tag.ts +8 -0
- package/src/lib/index.ts +8 -1
- package/src/lib/path-utils.ts +37 -0
- package/src/frames/desktop-frame.tsx +0 -81
- package/src/lib/dom/index.ts +0 -71
- /package/src/lib/{dom/calculate-text-width.ts → calculate-text-width.ts} +0 -0
package/src/lib/dom/index.ts
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { clearCookie, getCookie, setCookie } from 'lupine.web';
|
|
2
|
-
import { calculateTextWidth } from './calculate-text-width';
|
|
3
|
-
import { download } from './download';
|
|
4
|
-
import { downloadStream } from './download-stream';
|
|
5
|
-
|
|
6
|
-
export class DomUtils {
|
|
7
|
-
public static calculateTextWidth(text: string, font: string) {
|
|
8
|
-
return calculateTextWidth(text, font);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
public static getValue(cssSelector: string) {
|
|
12
|
-
return (document.querySelector(cssSelector) as HTMLInputElement)?.value;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
public static setValue(cssSelector: string, value: string) {
|
|
16
|
-
const dom = document.querySelector(cssSelector) as HTMLInputElement;
|
|
17
|
-
if (dom) dom.value = value;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
public static getChecked(cssSelector: string) {
|
|
21
|
-
return (document.querySelector(cssSelector) as HTMLInputElement)?.checked;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
public static setChecked(cssSelector: string, checked: boolean) {
|
|
25
|
-
const dom = document.querySelector(cssSelector) as HTMLInputElement;
|
|
26
|
-
if (dom) dom.checked = checked;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
public static joinValues(values: (string | undefined)[]) {
|
|
30
|
-
return values.filter((item) => item && item !== '').join(' ');
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
public static setCookie(
|
|
34
|
-
name: string,
|
|
35
|
-
value: string,
|
|
36
|
-
expireDays = 365,
|
|
37
|
-
path?: string,
|
|
38
|
-
domain?: string,
|
|
39
|
-
secure?: string
|
|
40
|
-
) {
|
|
41
|
-
return setCookie(name, value, expireDays, path, domain, secure);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
public static getCookie(key: string) {
|
|
45
|
-
return getCookie(key);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
public static clearCookie(name: string, path?: string, domain?: string, secure?: string) {
|
|
49
|
-
return clearCookie(name, path, domain, secure);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
public static download(link: string, filename?: string) {
|
|
53
|
-
return download(link, filename);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
public static downloadStream(blob: Blob, filename?: string) {
|
|
57
|
-
return downloadStream(blob, filename);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
public static byId(id: string) {
|
|
61
|
-
return document.querySelector(`#${id}`);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
public static byCssPath(cssPath: string) {
|
|
65
|
-
return document.querySelector(cssPath);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
public static bySelector(selector: string) {
|
|
69
|
-
return document.querySelector(selector);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
File without changes
|