beercss 3.13.1 → 3.13.2
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/LICENSE +21 -21
- package/README.md +328 -322
- package/custom-element/index.d.ts +18 -18
- package/custom-element/index.js +7 -7
- package/dist/cdn/arch.svg +3 -3
- package/dist/cdn/arrow.svg +3 -3
- package/dist/cdn/beer.css +4792 -4789
- package/dist/cdn/beer.custom-element.js +38 -38
- package/dist/cdn/beer.custom-element.min.js +1 -1
- package/dist/cdn/beer.js +635 -635
- package/dist/cdn/beer.min.css +1 -1
- package/dist/cdn/beer.min.js +1 -1
- package/dist/cdn/beer.scoped.css +4793 -4790
- package/dist/cdn/beer.scoped.min.css +1 -1
- package/dist/cdn/boom.svg +3 -3
- package/dist/cdn/bun.svg +3 -3
- package/dist/cdn/burst.svg +3 -3
- package/dist/cdn/circle.svg +3 -3
- package/dist/cdn/clamshell.svg +3 -3
- package/dist/cdn/diamond.svg +3 -3
- package/dist/cdn/fan.svg +3 -3
- package/dist/cdn/flower.svg +3 -3
- package/dist/cdn/gem.svg +3 -3
- package/dist/cdn/ghost-ish.svg +3 -3
- package/dist/cdn/heart.svg +3 -3
- package/dist/cdn/leaf-clover4.svg +3 -3
- package/dist/cdn/leaf-clover8.svg +3 -3
- package/dist/cdn/loading-indicator.svg +18 -18
- package/dist/cdn/oval.svg +3 -3
- package/dist/cdn/pentagon.svg +3 -3
- package/dist/cdn/pill.svg +3 -3
- package/dist/cdn/pixel-circle.svg +3 -3
- package/dist/cdn/pixel-triangle.svg +3 -3
- package/dist/cdn/puffy-diamond.svg +3 -3
- package/dist/cdn/puffy.svg +3 -3
- package/dist/cdn/semicircle.svg +3 -3
- package/dist/cdn/sided-cookie12.svg +3 -3
- package/dist/cdn/sided-cookie4.svg +3 -3
- package/dist/cdn/sided-cookie6.svg +3 -3
- package/dist/cdn/sided-cookie7.svg +3 -3
- package/dist/cdn/sided-cookie9.svg +3 -3
- package/dist/cdn/slanted.svg +3 -3
- package/dist/cdn/soft-boom.svg +3 -3
- package/dist/cdn/soft-burst.svg +3 -3
- package/dist/cdn/square.svg +3 -3
- package/dist/cdn/sunny.svg +3 -3
- package/dist/cdn/triangle.svg +3 -3
- package/dist/cdn/very-sunny.svg +3 -3
- package/dist/cdn/wavy-circle.svg +3 -3
- package/dist/cdn/wavy.svg +4 -4
- package/index.d.ts +18 -18
- package/index.js +6 -6
- package/package.json +76 -76
- package/scoped/index.d.ts +18 -18
- package/scoped/index.js +6 -6
- package/src/cdn/beer.css +52 -52
- package/src/cdn/beer.ts +120 -120
- package/src/cdn/customElement.js +38 -38
- package/src/cdn/elements/badges.css +74 -74
- package/src/cdn/elements/bars.css +91 -91
- package/src/cdn/elements/buttons.css +106 -106
- package/src/cdn/elements/cards.css +26 -26
- package/src/cdn/elements/chips.css +38 -38
- package/src/cdn/elements/dialogs.css +151 -151
- package/src/cdn/elements/dialogs.ts +69 -69
- package/src/cdn/elements/dividers.css +48 -48
- package/src/cdn/elements/expansions.css +10 -10
- package/src/cdn/elements/fields.css +439 -439
- package/src/cdn/elements/fields.ts +165 -164
- package/src/cdn/elements/grids.css +171 -171
- package/src/cdn/elements/icons.css +77 -77
- package/src/cdn/elements/layouts.css +35 -35
- package/src/cdn/elements/lists.css +71 -71
- package/src/cdn/elements/mainLayouts.css +57 -57
- package/src/cdn/elements/media.css +112 -112
- package/src/cdn/elements/menus.css +294 -294
- package/src/cdn/elements/menus.ts +40 -40
- package/src/cdn/elements/navigations.css +462 -460
- package/src/cdn/elements/overlays.css +31 -31
- package/src/cdn/elements/pages.css +41 -41
- package/src/cdn/elements/pages.ts +6 -6
- package/src/cdn/elements/progress.css +207 -207
- package/src/cdn/elements/progress.ts +34 -34
- package/src/cdn/elements/selections.css +256 -256
- package/src/cdn/elements/shapes.css +258 -258
- package/src/cdn/elements/sliders.css +357 -357
- package/src/cdn/elements/sliders.ts +74 -74
- package/src/cdn/elements/snackbars.css +47 -47
- package/src/cdn/elements/snackbars.ts +26 -26
- package/src/cdn/elements/tables.css +65 -65
- package/src/cdn/elements/tabs.css +52 -52
- package/src/cdn/elements/tooltips.css +131 -131
- package/src/cdn/helpers/alignments.css +29 -29
- package/src/cdn/helpers/blurs.css +21 -21
- package/src/cdn/helpers/colors.css +930 -930
- package/src/cdn/helpers/directions.css +28 -28
- package/src/cdn/helpers/elevates.css +16 -16
- package/src/cdn/helpers/forms.css +75 -75
- package/src/cdn/helpers/margins.css +49 -49
- package/src/cdn/helpers/opacities.css +19 -19
- package/src/cdn/helpers/paddings.css +45 -45
- package/src/cdn/helpers/positions.css +45 -45
- package/src/cdn/helpers/reset.css +94 -93
- package/src/cdn/helpers/responsive.css +22 -22
- package/src/cdn/helpers/ripples.css +33 -33
- package/src/cdn/helpers/ripples.ts +30 -30
- package/src/cdn/helpers/scrolls.css +8 -8
- package/src/cdn/helpers/shadows.css +23 -23
- package/src/cdn/helpers/sizes.css +45 -45
- package/src/cdn/helpers/spaces.css +19 -19
- package/src/cdn/helpers/theme.css +186 -186
- package/src/cdn/helpers/theme.ts +83 -83
- package/src/cdn/helpers/typography.css +225 -225
- package/src/cdn/helpers/waves.css +43 -43
- package/src/cdn/helpers/zoom.css +19 -19
- package/src/cdn/interfaces.ts +3 -3
- package/src/cdn/settings/dark.css +38 -38
- package/src/cdn/settings/fonts.css +35 -35
- package/src/cdn/settings/globals.css +18 -18
- package/src/cdn/settings/light.css +39 -39
- package/src/cdn/shapes/arch.svg +3 -3
- package/src/cdn/shapes/arrow.svg +3 -3
- package/src/cdn/shapes/boom.svg +3 -3
- package/src/cdn/shapes/bun.svg +3 -3
- package/src/cdn/shapes/burst.svg +3 -3
- package/src/cdn/shapes/circle.svg +3 -3
- package/src/cdn/shapes/clamshell.svg +3 -3
- package/src/cdn/shapes/diamond.svg +3 -3
- package/src/cdn/shapes/fan.svg +3 -3
- package/src/cdn/shapes/flower.svg +3 -3
- package/src/cdn/shapes/gem.svg +3 -3
- package/src/cdn/shapes/ghost-ish.svg +3 -3
- package/src/cdn/shapes/heart.svg +3 -3
- package/src/cdn/shapes/leaf-clover4.svg +3 -3
- package/src/cdn/shapes/leaf-clover8.svg +3 -3
- package/src/cdn/shapes/loading-indicator.svg +18 -18
- package/src/cdn/shapes/oval.svg +3 -3
- package/src/cdn/shapes/pentagon.svg +3 -3
- package/src/cdn/shapes/pill.svg +3 -3
- package/src/cdn/shapes/pixel-circle.svg +3 -3
- package/src/cdn/shapes/pixel-triangle.svg +3 -3
- package/src/cdn/shapes/puffy-diamond.svg +3 -3
- package/src/cdn/shapes/puffy.svg +3 -3
- package/src/cdn/shapes/semicircle.svg +3 -3
- package/src/cdn/shapes/sided-cookie12.svg +3 -3
- package/src/cdn/shapes/sided-cookie4.svg +3 -3
- package/src/cdn/shapes/sided-cookie6.svg +3 -3
- package/src/cdn/shapes/sided-cookie7.svg +3 -3
- package/src/cdn/shapes/sided-cookie9.svg +3 -3
- package/src/cdn/shapes/slanted.svg +3 -3
- package/src/cdn/shapes/soft-boom.svg +3 -3
- package/src/cdn/shapes/soft-burst.svg +3 -3
- package/src/cdn/shapes/square.svg +3 -3
- package/src/cdn/shapes/sunny.svg +3 -3
- package/src/cdn/shapes/triangle.svg +3 -3
- package/src/cdn/shapes/very-sunny.svg +3 -3
- package/src/cdn/shapes/wavy-circle.svg +3 -3
- package/src/cdn/shapes/wavy.svg +4 -4
- package/src/cdn/utils.ts +154 -154
package/package.json
CHANGED
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
{
|
|
2
|
-
"author": "Everton and Leonardo",
|
|
3
|
-
"description": "Build material design interfaces in record time... without stress for devs.",
|
|
4
|
-
"homepage": "https://www.beercss.com/",
|
|
5
|
-
"version": "3.13.
|
|
6
|
-
"name": "beercss",
|
|
7
|
-
"license": "MIT",
|
|
8
|
-
"type": "module",
|
|
9
|
-
"scripts": {
|
|
10
|
-
"lint": "npm run lint:ts && npm run lint:style",
|
|
11
|
-
"lint:ts": "eslint . --ext .js,.ts,.vue --fix",
|
|
12
|
-
"lint:style": "stylelint --fix \"src/**/*.css\"",
|
|
13
|
-
"dev": "node ./build/dev.js",
|
|
14
|
-
"build": "node ./build/build.js && node ./build/cdn.js",
|
|
15
|
-
"test": "vitest",
|
|
16
|
-
"
|
|
17
|
-
},
|
|
18
|
-
"devDependencies": {
|
|
19
|
-
"@stylistic/stylelint-plugin": "^2.1.2",
|
|
20
|
-
"@types/jsdom": "^21.1.7",
|
|
21
|
-
"@typescript-eslint/eslint-plugin": "^7.11.0",
|
|
22
|
-
"@typescript-eslint/parser": "^7.11.0",
|
|
23
|
-
"@vitejs/plugin-vue": "^5.0.5",
|
|
24
|
-
"@vue/eslint-config-typescript": "^13.0.0",
|
|
25
|
-
"@vue/language-plugin-pug": "^2.2.10",
|
|
26
|
-
"eslint": "^8.57.0",
|
|
27
|
-
"eslint-config-love": "^52.0.0",
|
|
28
|
-
"eslint-plugin-import": "^2.29.1",
|
|
29
|
-
"eslint-plugin-n": "^17.7.0",
|
|
30
|
-
"eslint-plugin-promise": "^6.2.0",
|
|
31
|
-
"eslint-plugin-vue": "^9.26.0",
|
|
32
|
-
"eslint-plugin-vue-pug": "^0.6.2",
|
|
33
|
-
"fs-extra": "^11.2.0",
|
|
34
|
-
"jsdom": "^24.1.3",
|
|
35
|
-
"pug": "^3.0.3",
|
|
36
|
-
"stylelint": "^16.6.1",
|
|
37
|
-
"stylelint-config-standard-scss": "^13.1.0",
|
|
38
|
-
"typescript": "^5.4.5",
|
|
39
|
-
"vite": "^6.2.3",
|
|
40
|
-
"vitest": "^3.0.9",
|
|
41
|
-
"vue": "^3.4.27",
|
|
42
|
-
"vue-eslint-parser": "^9.4.2",
|
|
43
|
-
"vue-eslint-parser-template-tokenizer-pug": "^0.4.11",
|
|
44
|
-
"vue-tsc": "^2.0.19"
|
|
45
|
-
},
|
|
46
|
-
"files": [
|
|
47
|
-
"custom-element",
|
|
48
|
-
"dist/cdn",
|
|
49
|
-
"scoped",
|
|
50
|
-
"src/cdn",
|
|
51
|
-
"index.d.ts",
|
|
52
|
-
"index.js"
|
|
53
|
-
],
|
|
54
|
-
"keywords": [
|
|
55
|
-
"css",
|
|
56
|
-
"material",
|
|
57
|
-
"semantic html",
|
|
58
|
-
"design system",
|
|
59
|
-
"material you",
|
|
60
|
-
"material 3",
|
|
61
|
-
"material design 3",
|
|
62
|
-
"material 3 expressive",
|
|
63
|
-
"class-light"
|
|
64
|
-
],
|
|
65
|
-
"repository": {
|
|
66
|
-
"type": "git",
|
|
67
|
-
"url": "git+https://github.com/beercss/beercss.git"
|
|
68
|
-
},
|
|
69
|
-
"bugs": {
|
|
70
|
-
"url": "https://github.com/beercss/beercss/issues"
|
|
71
|
-
},
|
|
72
|
-
"packageManager": "pnpm@9.1.4+sha512.9df9cf27c91715646c7d675d1c9c8e41f6fce88246f1318c1aa6a1ed1aeb3c4f032fcdf4ba63cc69c4fe6d634279176b5358727d8f2cc1e65b65f43ce2f8bfb0",
|
|
73
|
-
"dependencies": {
|
|
74
|
-
"material-dynamic-colors": "^1.1.2"
|
|
75
|
-
}
|
|
76
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"author": "Everton and Leonardo",
|
|
3
|
+
"description": "Build material design interfaces in record time... without stress for devs.",
|
|
4
|
+
"homepage": "https://www.beercss.com/",
|
|
5
|
+
"version": "3.13.2",
|
|
6
|
+
"name": "beercss",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"type": "module",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"lint": "npm run lint:ts && npm run lint:style",
|
|
11
|
+
"lint:ts": "eslint . --ext .js,.ts,.vue --fix",
|
|
12
|
+
"lint:style": "stylelint --fix \"src/**/*.css\"",
|
|
13
|
+
"dev": "node ./build/dev.js",
|
|
14
|
+
"build": "node ./build/build.js && node ./build/cdn.js",
|
|
15
|
+
"test": "vitest",
|
|
16
|
+
"llms": "node ./build/llms.js"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"@stylistic/stylelint-plugin": "^2.1.2",
|
|
20
|
+
"@types/jsdom": "^21.1.7",
|
|
21
|
+
"@typescript-eslint/eslint-plugin": "^7.11.0",
|
|
22
|
+
"@typescript-eslint/parser": "^7.11.0",
|
|
23
|
+
"@vitejs/plugin-vue": "^5.0.5",
|
|
24
|
+
"@vue/eslint-config-typescript": "^13.0.0",
|
|
25
|
+
"@vue/language-plugin-pug": "^2.2.10",
|
|
26
|
+
"eslint": "^8.57.0",
|
|
27
|
+
"eslint-config-love": "^52.0.0",
|
|
28
|
+
"eslint-plugin-import": "^2.29.1",
|
|
29
|
+
"eslint-plugin-n": "^17.7.0",
|
|
30
|
+
"eslint-plugin-promise": "^6.2.0",
|
|
31
|
+
"eslint-plugin-vue": "^9.26.0",
|
|
32
|
+
"eslint-plugin-vue-pug": "^0.6.2",
|
|
33
|
+
"fs-extra": "^11.2.0",
|
|
34
|
+
"jsdom": "^24.1.3",
|
|
35
|
+
"pug": "^3.0.3",
|
|
36
|
+
"stylelint": "^16.6.1",
|
|
37
|
+
"stylelint-config-standard-scss": "^13.1.0",
|
|
38
|
+
"typescript": "^5.4.5",
|
|
39
|
+
"vite": "^6.2.3",
|
|
40
|
+
"vitest": "^3.0.9",
|
|
41
|
+
"vue": "^3.4.27",
|
|
42
|
+
"vue-eslint-parser": "^9.4.2",
|
|
43
|
+
"vue-eslint-parser-template-tokenizer-pug": "^0.4.11",
|
|
44
|
+
"vue-tsc": "^2.0.19"
|
|
45
|
+
},
|
|
46
|
+
"files": [
|
|
47
|
+
"custom-element",
|
|
48
|
+
"dist/cdn",
|
|
49
|
+
"scoped",
|
|
50
|
+
"src/cdn",
|
|
51
|
+
"index.d.ts",
|
|
52
|
+
"index.js"
|
|
53
|
+
],
|
|
54
|
+
"keywords": [
|
|
55
|
+
"css",
|
|
56
|
+
"material",
|
|
57
|
+
"semantic html",
|
|
58
|
+
"design system",
|
|
59
|
+
"material you",
|
|
60
|
+
"material 3",
|
|
61
|
+
"material design 3",
|
|
62
|
+
"material 3 expressive",
|
|
63
|
+
"class-light"
|
|
64
|
+
],
|
|
65
|
+
"repository": {
|
|
66
|
+
"type": "git",
|
|
67
|
+
"url": "git+https://github.com/beercss/beercss.git"
|
|
68
|
+
},
|
|
69
|
+
"bugs": {
|
|
70
|
+
"url": "https://github.com/beercss/beercss/issues"
|
|
71
|
+
},
|
|
72
|
+
"packageManager": "pnpm@9.1.4+sha512.9df9cf27c91715646c7d675d1c9c8e41f6fce88246f1318c1aa6a1ed1aeb3c4f032fcdf4ba63cc69c4fe6d634279176b5358727d8f2cc1e65b65f43ce2f8bfb0",
|
|
73
|
+
"dependencies": {
|
|
74
|
+
"material-dynamic-colors": "^1.1.2"
|
|
75
|
+
}
|
|
76
|
+
}
|
package/scoped/index.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
interface IBeerCssTheme {
|
|
3
|
-
dark: string,
|
|
4
|
-
light: string,
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
function ui(selector?: string | Element, options?: string | number | IBeerCssTheme): string | IBeerCssTheme | Promise<IBeerCssTheme>;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
declare module "ui";
|
|
11
|
-
|
|
12
|
-
export interface IBeerCssTheme {
|
|
13
|
-
dark: string,
|
|
14
|
-
light: string,
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export function ui(selector?: string | Element, options?: string | number | IBeerCssTheme): string | IBeerCssTheme | Promise<IBeerCssTheme>;
|
|
18
|
-
|
|
1
|
+
declare global {
|
|
2
|
+
interface IBeerCssTheme {
|
|
3
|
+
dark: string,
|
|
4
|
+
light: string,
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
function ui(selector?: string | Element, options?: string | number | IBeerCssTheme): string | IBeerCssTheme | Promise<IBeerCssTheme>;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
declare module "ui";
|
|
11
|
+
|
|
12
|
+
export interface IBeerCssTheme {
|
|
13
|
+
dark: string,
|
|
14
|
+
light: string,
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function ui(selector?: string | Element, options?: string | number | IBeerCssTheme): string | IBeerCssTheme | Promise<IBeerCssTheme>;
|
|
18
|
+
|
|
19
19
|
export default ui;
|
package/scoped/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../dist/cdn/beer.scoped.min.css";
|
|
2
|
-
import { ui } from "../dist/cdn/beer.min.js";
|
|
3
|
-
export {
|
|
4
|
-
ui as default,
|
|
5
|
-
ui,
|
|
6
|
-
};
|
|
1
|
+
import "../dist/cdn/beer.scoped.min.css";
|
|
2
|
+
import { ui } from "../dist/cdn/beer.min.js";
|
|
3
|
+
export {
|
|
4
|
+
ui as default,
|
|
5
|
+
ui,
|
|
6
|
+
};
|
package/src/cdn/beer.css
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
@import "./settings/globals.css";
|
|
2
|
-
@import "./settings/light.css";
|
|
3
|
-
@import "./settings/dark.css";
|
|
4
|
-
@import "./settings/fonts.css";
|
|
5
|
-
@import "./helpers/reset.css";
|
|
6
|
-
@import "./helpers/theme.css";
|
|
7
|
-
@import "./helpers/alignments.css";
|
|
8
|
-
@import "./helpers/blurs.css";
|
|
9
|
-
@import "./helpers/colors.css";
|
|
10
|
-
@import "./helpers/directions.css";
|
|
11
|
-
@import "./helpers/elevates.css";
|
|
12
|
-
@import "./helpers/forms.css";
|
|
13
|
-
@import "./helpers/margins.css";
|
|
14
|
-
@import "./helpers/opacities.css";
|
|
15
|
-
@import "./helpers/paddings.css";
|
|
16
|
-
@import "./helpers/positions.css";
|
|
17
|
-
@import "./helpers/ripples.css";
|
|
18
|
-
@import "./helpers/scrolls.css";
|
|
19
|
-
@import "./helpers/shadows.css";
|
|
20
|
-
@import "./helpers/sizes.css";
|
|
21
|
-
@import "./helpers/spaces.css";
|
|
22
|
-
@import "./helpers/responsive.css";
|
|
23
|
-
@import "./helpers/typography.css";
|
|
24
|
-
@import "./helpers/waves.css";
|
|
25
|
-
@import "./helpers/zoom.css";
|
|
26
|
-
@import "./elements/badges.css";
|
|
27
|
-
@import "./elements/bars.css";
|
|
28
|
-
@import "./elements/buttons.css";
|
|
29
|
-
@import "./elements/cards.css";
|
|
30
|
-
@import "./elements/chips.css";
|
|
31
|
-
@import "./elements/dialogs.css";
|
|
32
|
-
@import "./elements/dividers.css";
|
|
33
|
-
@import "./elements/expansions.css";
|
|
34
|
-
@import "./elements/fields.css";
|
|
35
|
-
@import "./elements/grids.css";
|
|
36
|
-
@import "./elements/icons.css";
|
|
37
|
-
@import "./elements/layouts.css";
|
|
38
|
-
@import "./elements/lists.css";
|
|
39
|
-
@import "./elements/mainLayouts.css";
|
|
40
|
-
@import "./elements/media.css";
|
|
41
|
-
@import "./elements/menus.css";
|
|
42
|
-
@import "./elements/navigations.css";
|
|
43
|
-
@import "./elements/overlays.css";
|
|
44
|
-
@import "./elements/pages.css";
|
|
45
|
-
@import "./elements/progress.css";
|
|
46
|
-
@import "./elements/shapes.css";
|
|
47
|
-
@import "./elements/selections.css";
|
|
48
|
-
@import "./elements/sliders.css";
|
|
49
|
-
@import "./elements/snackbars.css";
|
|
50
|
-
@import "./elements/tables.css";
|
|
51
|
-
@import "./elements/tabs.css";
|
|
52
|
-
@import "./elements/tooltips.css";
|
|
1
|
+
@import "./settings/globals.css";
|
|
2
|
+
@import "./settings/light.css";
|
|
3
|
+
@import "./settings/dark.css";
|
|
4
|
+
@import "./settings/fonts.css";
|
|
5
|
+
@import "./helpers/reset.css";
|
|
6
|
+
@import "./helpers/theme.css";
|
|
7
|
+
@import "./helpers/alignments.css";
|
|
8
|
+
@import "./helpers/blurs.css";
|
|
9
|
+
@import "./helpers/colors.css";
|
|
10
|
+
@import "./helpers/directions.css";
|
|
11
|
+
@import "./helpers/elevates.css";
|
|
12
|
+
@import "./helpers/forms.css";
|
|
13
|
+
@import "./helpers/margins.css";
|
|
14
|
+
@import "./helpers/opacities.css";
|
|
15
|
+
@import "./helpers/paddings.css";
|
|
16
|
+
@import "./helpers/positions.css";
|
|
17
|
+
@import "./helpers/ripples.css";
|
|
18
|
+
@import "./helpers/scrolls.css";
|
|
19
|
+
@import "./helpers/shadows.css";
|
|
20
|
+
@import "./helpers/sizes.css";
|
|
21
|
+
@import "./helpers/spaces.css";
|
|
22
|
+
@import "./helpers/responsive.css";
|
|
23
|
+
@import "./helpers/typography.css";
|
|
24
|
+
@import "./helpers/waves.css";
|
|
25
|
+
@import "./helpers/zoom.css";
|
|
26
|
+
@import "./elements/badges.css";
|
|
27
|
+
@import "./elements/bars.css";
|
|
28
|
+
@import "./elements/buttons.css";
|
|
29
|
+
@import "./elements/cards.css";
|
|
30
|
+
@import "./elements/chips.css";
|
|
31
|
+
@import "./elements/dialogs.css";
|
|
32
|
+
@import "./elements/dividers.css";
|
|
33
|
+
@import "./elements/expansions.css";
|
|
34
|
+
@import "./elements/fields.css";
|
|
35
|
+
@import "./elements/grids.css";
|
|
36
|
+
@import "./elements/icons.css";
|
|
37
|
+
@import "./elements/layouts.css";
|
|
38
|
+
@import "./elements/lists.css";
|
|
39
|
+
@import "./elements/mainLayouts.css";
|
|
40
|
+
@import "./elements/media.css";
|
|
41
|
+
@import "./elements/menus.css";
|
|
42
|
+
@import "./elements/navigations.css";
|
|
43
|
+
@import "./elements/overlays.css";
|
|
44
|
+
@import "./elements/pages.css";
|
|
45
|
+
@import "./elements/progress.css";
|
|
46
|
+
@import "./elements/shapes.css";
|
|
47
|
+
@import "./elements/selections.css";
|
|
48
|
+
@import "./elements/sliders.css";
|
|
49
|
+
@import "./elements/snackbars.css";
|
|
50
|
+
@import "./elements/tables.css";
|
|
51
|
+
@import "./elements/tabs.css";
|
|
52
|
+
@import "./elements/tooltips.css";
|
package/src/cdn/beer.ts
CHANGED
|
@@ -1,120 +1,120 @@
|
|
|
1
|
-
import {updateAllFields} from "./elements/fields";
|
|
2
|
-
import {updateAllSliders} from "./elements/sliders";
|
|
3
|
-
import {updateMode, updateTheme} from "./helpers/theme";
|
|
4
|
-
import {type IBeerCssTheme} from "./interfaces";
|
|
5
|
-
import {addClass, guid, hasClass, hasTag, onWeak, query, queryAll, removeClass, updateAllClickable} from "./utils";
|
|
6
|
-
import {updateDialog} from "./elements/dialogs";
|
|
7
|
-
import {updateMenu} from "./elements/menus";
|
|
8
|
-
import {updateSnackbar} from "./elements/snackbars";
|
|
9
|
-
import {updatePage} from "./elements/pages";
|
|
10
|
-
import {updateAllRipples} from "./helpers/ripples";
|
|
11
|
-
import { updateAllProgress } from "./elements/progress";
|
|
12
|
-
|
|
13
|
-
const _context = globalThis as any;
|
|
14
|
-
let _timeoutMutation: ReturnType<typeof setTimeout>;
|
|
15
|
-
let _mutation: MutationObserver | null;
|
|
16
|
-
|
|
17
|
-
function onMutation() {
|
|
18
|
-
if (_timeoutMutation) clearTimeout(_timeoutMutation);
|
|
19
|
-
_timeoutMutation = setTimeout(async () => await _ui(), 180);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
async function run(from: Element, to: Element | null, options?: any, e?: Event): Promise<void> {
|
|
23
|
-
if (!to) {
|
|
24
|
-
to = query(from.getAttribute("data-ui"));
|
|
25
|
-
if (!to) {
|
|
26
|
-
from.classList.toggle("active");
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
updateAllClickable(from);
|
|
32
|
-
|
|
33
|
-
if (hasTag(to, "dialog")) {
|
|
34
|
-
await updateDialog(from, to as HTMLDialogElement);
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
if (hasTag(to, "menu")) {
|
|
39
|
-
updateMenu(from, to as HTMLMenuElement, e);
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
if (hasClass(to, "snackbar")) {
|
|
44
|
-
updateSnackbar(to, options as number);
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
if (hasClass(to, "page")) {
|
|
49
|
-
updatePage(to);
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
if (hasClass(to, "active")) {
|
|
54
|
-
removeClass(from, "active");
|
|
55
|
-
removeClass(to, "active");
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
addClass(to, "active");
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
function onClickElement(e: Event) {
|
|
63
|
-
void run(e.currentTarget as HTMLElement, null, null, e);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
function onKeydownElement(e: KeyboardEvent) {
|
|
67
|
-
if (e.key === "Enter") void run(e.currentTarget as HTMLElement, null, null, e);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
function setup() {
|
|
71
|
-
if (_context.ui || _mutation || !_context.MutationObserver) return;
|
|
72
|
-
_mutation = new MutationObserver(onMutation);
|
|
73
|
-
_mutation.observe(document.body, { childList: true, subtree: true });
|
|
74
|
-
onMutation();
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
function updateAllDataUis() {
|
|
78
|
-
const elements = queryAll("[data-ui]");
|
|
79
|
-
for (let i = 0, n = elements.length; i < n; i++) {
|
|
80
|
-
onWeak(elements[i], "click", onClickElement);
|
|
81
|
-
if (hasTag(elements[i], "a") && !elements[i].getAttribute("href")) onWeak(elements[i], "keydown", onKeydownElement);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
function _ui(selector?: string | Element, options?: string | number | IBeerCssTheme): string | IBeerCssTheme | Promise<IBeerCssTheme> | undefined {
|
|
86
|
-
if (selector) {
|
|
87
|
-
if (selector === "setup") { setup(); return; }
|
|
88
|
-
if (selector === "guid") return guid();
|
|
89
|
-
if (selector === "mode") return updateMode(options as string);
|
|
90
|
-
if (selector === "theme") return updateTheme(options);
|
|
91
|
-
|
|
92
|
-
const to = query(selector);
|
|
93
|
-
if (!to) return;
|
|
94
|
-
void run(to, to, options);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
updateAllDataUis();
|
|
98
|
-
updateAllFields();
|
|
99
|
-
updateAllSliders();
|
|
100
|
-
updateAllRipples();
|
|
101
|
-
updateAllProgress();
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
function start() {
|
|
105
|
-
if (_context.ui) return;
|
|
106
|
-
|
|
107
|
-
const body = _context.document?.body;
|
|
108
|
-
if (body && !body.classList.contains("dark") && !body.classList.contains("light")) updateMode("auto");
|
|
109
|
-
|
|
110
|
-
setup();
|
|
111
|
-
_context.ui = _ui;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
start();
|
|
115
|
-
|
|
116
|
-
const ui = _context.ui;
|
|
117
|
-
export {
|
|
118
|
-
ui as default,
|
|
119
|
-
ui,
|
|
120
|
-
};
|
|
1
|
+
import {updateAllFields} from "./elements/fields";
|
|
2
|
+
import {updateAllSliders} from "./elements/sliders";
|
|
3
|
+
import {updateMode, updateTheme} from "./helpers/theme";
|
|
4
|
+
import {type IBeerCssTheme} from "./interfaces";
|
|
5
|
+
import {addClass, guid, hasClass, hasTag, onWeak, query, queryAll, removeClass, updateAllClickable} from "./utils";
|
|
6
|
+
import {updateDialog} from "./elements/dialogs";
|
|
7
|
+
import {updateMenu} from "./elements/menus";
|
|
8
|
+
import {updateSnackbar} from "./elements/snackbars";
|
|
9
|
+
import {updatePage} from "./elements/pages";
|
|
10
|
+
import {updateAllRipples} from "./helpers/ripples";
|
|
11
|
+
import { updateAllProgress } from "./elements/progress";
|
|
12
|
+
|
|
13
|
+
const _context = globalThis as any;
|
|
14
|
+
let _timeoutMutation: ReturnType<typeof setTimeout>;
|
|
15
|
+
let _mutation: MutationObserver | null;
|
|
16
|
+
|
|
17
|
+
function onMutation() {
|
|
18
|
+
if (_timeoutMutation) clearTimeout(_timeoutMutation);
|
|
19
|
+
_timeoutMutation = setTimeout(async () => await _ui(), 180);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
async function run(from: Element, to: Element | null, options?: any, e?: Event): Promise<void> {
|
|
23
|
+
if (!to) {
|
|
24
|
+
to = query(from.getAttribute("data-ui"));
|
|
25
|
+
if (!to) {
|
|
26
|
+
from.classList.toggle("active");
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
updateAllClickable(from);
|
|
32
|
+
|
|
33
|
+
if (hasTag(to, "dialog")) {
|
|
34
|
+
await updateDialog(from, to as HTMLDialogElement);
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (hasTag(to, "menu")) {
|
|
39
|
+
updateMenu(from, to as HTMLMenuElement, e);
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if (hasClass(to, "snackbar")) {
|
|
44
|
+
updateSnackbar(to, options as number);
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
if (hasClass(to, "page")) {
|
|
49
|
+
updatePage(to);
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (hasClass(to, "active")) {
|
|
54
|
+
removeClass(from, "active");
|
|
55
|
+
removeClass(to, "active");
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
addClass(to, "active");
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function onClickElement(e: Event) {
|
|
63
|
+
void run(e.currentTarget as HTMLElement, null, null, e);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function onKeydownElement(e: KeyboardEvent) {
|
|
67
|
+
if (e.key === "Enter") void run(e.currentTarget as HTMLElement, null, null, e);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function setup() {
|
|
71
|
+
if (_context.ui || _mutation || !_context.MutationObserver) return;
|
|
72
|
+
_mutation = new MutationObserver(onMutation);
|
|
73
|
+
_mutation.observe(document.body, { childList: true, subtree: true });
|
|
74
|
+
onMutation();
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function updateAllDataUis() {
|
|
78
|
+
const elements = queryAll("[data-ui]");
|
|
79
|
+
for (let i = 0, n = elements.length; i < n; i++) {
|
|
80
|
+
onWeak(elements[i], "click", onClickElement);
|
|
81
|
+
if (hasTag(elements[i], "a") && !elements[i].getAttribute("href")) onWeak(elements[i], "keydown", onKeydownElement);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function _ui(selector?: string | Element, options?: string | number | IBeerCssTheme): string | IBeerCssTheme | Promise<IBeerCssTheme> | undefined {
|
|
86
|
+
if (selector) {
|
|
87
|
+
if (selector === "setup") { setup(); return; }
|
|
88
|
+
if (selector === "guid") return guid();
|
|
89
|
+
if (selector === "mode") return updateMode(options as string);
|
|
90
|
+
if (selector === "theme") return updateTheme(options);
|
|
91
|
+
|
|
92
|
+
const to = query(selector);
|
|
93
|
+
if (!to) return;
|
|
94
|
+
void run(to, to, options);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
updateAllDataUis();
|
|
98
|
+
updateAllFields();
|
|
99
|
+
updateAllSliders();
|
|
100
|
+
updateAllRipples();
|
|
101
|
+
updateAllProgress();
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function start() {
|
|
105
|
+
if (_context.ui) return;
|
|
106
|
+
|
|
107
|
+
const body = _context.document?.body;
|
|
108
|
+
if (body && !body.classList.contains("dark") && !body.classList.contains("light")) updateMode("auto");
|
|
109
|
+
|
|
110
|
+
setup();
|
|
111
|
+
_context.ui = _ui;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
start();
|
|
115
|
+
|
|
116
|
+
const ui = _context.ui;
|
|
117
|
+
export {
|
|
118
|
+
ui as default,
|
|
119
|
+
ui,
|
|
120
|
+
};
|
package/src/cdn/customElement.js
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
class BeerCssCustomElement extends HTMLElement {
|
|
2
|
-
static isCssLoaded = false;
|
|
3
|
-
static isJsLoaded = false;
|
|
4
|
-
|
|
5
|
-
constructor() {
|
|
6
|
-
super();
|
|
7
|
-
this.run();
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
async addJs() {
|
|
11
|
-
if (BeerCssCustomElement.isJsLoaded) return;
|
|
12
|
-
BeerCssCustomElement.isJsLoaded = true;
|
|
13
|
-
|
|
14
|
-
if (window.ui) return;
|
|
15
|
-
return await import("https://cdn.jsdelivr.net/npm/beercss@3.13.
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
async addCss() {
|
|
19
|
-
if (BeerCssCustomElement.isCssLoaded) return;
|
|
20
|
-
BeerCssCustomElement.isCssLoaded = true;
|
|
21
|
-
const isScoped = !!getComputedStyle(document.documentElement).getPropertyValue("--scoped");
|
|
22
|
-
if (isScoped) return;
|
|
23
|
-
|
|
24
|
-
const head = document.querySelector("head");
|
|
25
|
-
const element = document.createElement("link");
|
|
26
|
-
element.setAttribute("href", "https://cdn.jsdelivr.net/npm/beercss@3.13.
|
|
27
|
-
element.setAttribute("rel", "stylesheet");
|
|
28
|
-
head.appendChild(element);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
async run() {
|
|
32
|
-
this.classList.add("beer");
|
|
33
|
-
await Promise.all([this.addJs(), this.addCss()]);
|
|
34
|
-
ui();
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
customElements.define("beer-css", BeerCssCustomElement);
|
|
1
|
+
class BeerCssCustomElement extends HTMLElement {
|
|
2
|
+
static isCssLoaded = false;
|
|
3
|
+
static isJsLoaded = false;
|
|
4
|
+
|
|
5
|
+
constructor() {
|
|
6
|
+
super();
|
|
7
|
+
this.run();
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
async addJs() {
|
|
11
|
+
if (BeerCssCustomElement.isJsLoaded) return;
|
|
12
|
+
BeerCssCustomElement.isJsLoaded = true;
|
|
13
|
+
|
|
14
|
+
if (window.ui) return;
|
|
15
|
+
return await import("https://cdn.jsdelivr.net/npm/beercss@3.13.2/dist/cdn/beer.min.js");
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
async addCss() {
|
|
19
|
+
if (BeerCssCustomElement.isCssLoaded) return;
|
|
20
|
+
BeerCssCustomElement.isCssLoaded = true;
|
|
21
|
+
const isScoped = !!getComputedStyle(document.documentElement).getPropertyValue("--scoped");
|
|
22
|
+
if (isScoped) return;
|
|
23
|
+
|
|
24
|
+
const head = document.querySelector("head");
|
|
25
|
+
const element = document.createElement("link");
|
|
26
|
+
element.setAttribute("href", "https://cdn.jsdelivr.net/npm/beercss@3.13.2/dist/cdn/beer.scoped.min.css");
|
|
27
|
+
element.setAttribute("rel", "stylesheet");
|
|
28
|
+
head.appendChild(element);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
async run() {
|
|
32
|
+
this.classList.add("beer");
|
|
33
|
+
await Promise.all([this.addJs(), this.addCss()]);
|
|
34
|
+
ui();
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
customElements.define("beer-css", BeerCssCustomElement);
|
|
39
39
|
export default BeerCssCustomElement;
|