beercss 3.9.6 → 3.10.0

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.
Files changed (47) hide show
  1. package/README.md +47 -42
  2. package/custom-element/index.js +7 -0
  3. package/dist/cdn/beer.css +476 -543
  4. package/dist/cdn/beer.custom-element.js +38 -0
  5. package/dist/cdn/beer.custom-element.min.js +1 -0
  6. package/dist/cdn/beer.js +77 -150
  7. package/dist/cdn/beer.min.css +1 -1
  8. package/dist/cdn/beer.min.js +1 -1
  9. package/dist/cdn/beer.scoped.css +4348 -0
  10. package/dist/cdn/beer.scoped.min.css +1 -0
  11. package/dist/cdn/material-symbols-subset.woff2 +0 -0
  12. package/package.json +5 -3
  13. package/scoped/index.js +6 -0
  14. package/src/cdn/beer.css +3 -3
  15. package/src/cdn/beer.ts +1 -1
  16. package/src/cdn/customElement.js +38 -0
  17. package/src/cdn/elements/badges.css +7 -21
  18. package/src/cdn/elements/buttons.css +7 -16
  19. package/src/cdn/elements/cards.css +2 -1
  20. package/src/cdn/elements/chips.css +5 -8
  21. package/src/cdn/elements/dialogs.css +52 -26
  22. package/src/cdn/elements/fields.css +25 -36
  23. package/src/cdn/elements/fields.ts +1 -1
  24. package/src/cdn/elements/grids.css +7 -7
  25. package/src/cdn/elements/icons.css +13 -13
  26. package/src/cdn/elements/layouts.css +17 -30
  27. package/src/cdn/elements/mainLayouts.css +163 -0
  28. package/src/cdn/elements/media.css +24 -46
  29. package/src/cdn/elements/menus.css +27 -27
  30. package/src/cdn/elements/navigations.css +31 -11
  31. package/src/cdn/elements/pages.css +6 -7
  32. package/src/cdn/elements/selections.css +13 -13
  33. package/src/cdn/elements/sliders.css +12 -13
  34. package/src/cdn/elements/sliders.ts +4 -4
  35. package/src/cdn/elements/tables.css +1 -0
  36. package/src/cdn/elements/tabs.css +1 -0
  37. package/src/cdn/elements/tooltips.css +10 -11
  38. package/src/cdn/helpers/blurs.css +7 -7
  39. package/src/cdn/helpers/forms.css +17 -56
  40. package/src/cdn/helpers/margins.css +11 -11
  41. package/src/cdn/helpers/paddings.css +10 -10
  42. package/src/cdn/helpers/ripples.css +4 -4
  43. package/src/cdn/helpers/shadows.css +4 -4
  44. package/src/cdn/helpers/spaces.css +4 -4
  45. package/src/cdn/settings/fonts.css +4 -4
  46. package/src/cdn/utils.ts +2 -2
  47. package/src/cdn/elements/containers.css +0 -176
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  <p align="center">
5
5
  <a href="https://github.com/beercss/beercss/blob/main/LICENSE"><img src="https://img.shields.io/github/license/beercss/beercss" alt="License"></a>
6
6
  <a href="https://github.com/beercss/beercss"><img src="https://img.shields.io/jsdelivr/npm/hy/beercss" alt="Downloads"></a>
7
- <a href="https://bundlephobia.com/package/beercss" target="_blank"><img src="https://img.shields.io/bundlephobia/minzip/beercss" alt="minzipped size"></a>
7
+ <a href="https://bundlephobia.com/package/beercss@3.10.0" target="_blank"><img src="https://img.shields.io/bundlephobia/minzip/beercss@3.10.0" alt="minzipped size"></a>
8
8
  <a href="https://www.npmjs.com/package/beercss"><img src="https://img.shields.io/npm/v/beercss" alt="Version"></a>
9
9
  <a href="https://github.com/beercss/beercss/pulls"><img src="https://img.shields.io/github/issues-pr/beercss/beercss" alt="Pull Request"></a>
10
10
  <a href="https://github.com/beercss/beercss/issues"><img src="https://img.shields.io/github/issues/beercss/beercss" alt="Issues"></a>
@@ -22,19 +22,15 @@ Cheers, www.beercss.com
22
22
 
23
23
  Beer CSS is an MIT-licensed open source project with its ongoing development made possible entirely by the support of these awesome sponsors and backers. If you'd like to join them, please consider sponsoring Beer CSS's development.
24
24
 
25
- ### Open Collective sponsors
26
- <p><a href="https://opencollective.com/beercss#support"><img src="https://opencollective.com/beercss/sponsors.svg?avatarHeight=56&button=false" alt="Sponsors"></a></p>
27
- <p><a href="https://opencollective.com/beercss#support"><img src="https://opencollective.com/beercss/backers.svg?avatarHeight=40&button=false" alt="Backers"></a></p>
28
-
29
- ### Github sponsors
30
- <p>
31
- <a href="https://github.com/sponsors/beercss">
32
- <img src="https://avatars.githubusercontent.com/u/74856856?s=40&v=4" alt="Sponsors">
33
- <img src="https://avatars.githubusercontent.com/u/419690?s=40&v=4" alt="Sponsors">
34
- <img src="https://avatars.githubusercontent.com/u/181576?s=40&v=4 alt="Sponsors">
35
- <img src="https://avatars.githubusercontent.com/u/797439?s=40&v=4 alt="Sponsors">
36
- <img src="https://avatars.githubusercontent.com/u/3647943?s=40&v=4 alt="Sponsors">
37
- </a>
25
+ <p align="center">
26
+ <img src="https://opencollective.com/beercss/sponsors.svg?avatarHeight=56&button=false" alt="Sponsors">
27
+ <img src="https://opencollective.com/beercss/backers.svg?avatarHeight=56&button=false" alt="Sponsors">
28
+ <img src="https://images.weserv.nl/?url=avatars.githubusercontent.com/u/40445940?s=56&v=4&mask=circle&maxage=7d" alt="Sponsors">
29
+ <img src="https://images.weserv.nl/?url=avatars.githubusercontent.com/u/74856856?s=56&v=4&mask=circle&maxage=7d" alt="Sponsors">
30
+ <img src="https://images.weserv.nl/?url=avatars.githubusercontent.com/u/419690?s=56&v=4&mask=circle&maxage=7d" alt="Sponsors">
31
+ <img src="https://images.weserv.nl/?url=avatars.githubusercontent.com/u/181576?s=56&v=4&mask=circle&maxage=7d" alt="Sponsors">
32
+ <img src="https://images.weserv.nl/?url=avatars.githubusercontent.com/u/797439?s=56&v=4&mask=circle&maxage=7d" alt="Sponsors">
33
+ <img src="https://images.weserv.nl/?url=avatars.githubusercontent.com/u/3647943?s=56&v=4&mask=circle&maxage=7d" alt="Sponsors">
38
34
  </p>
39
35
 
40
36
  # Why?
@@ -43,11 +39,17 @@ Beer CSS is an MIT-licensed open source project with its ongoing development mad
43
39
  - ⬇️ 10x smaller than others CSS frameworks based on Material Design.
44
40
  - 🧙‍♂️ Translates Material Design to HTML semantic standard.
45
41
  - 🤓 Ready to use with any JS framework.
46
- - 🪄 Highly focused on DX.
42
+ - 🎯 Highly focused on DX.
47
43
  - 🚫 No build steps, configurations or dependencies.
48
44
  - ✨ Build modern interfaces without any custom CSS.
49
45
 
50
- # Applying "the beer way" in css?
46
+ # A lightweight beer
47
+
48
+ Let's be honest, in the ever-evolving world of web development, we're all looking for that sweet spot: powerful functionality without the bloat. We want speed, efficiency, and something that doesn't feel like lugging around a digital elephant. And if you're looking at the chart below, you're probably thinking, "Wow, XYZ is huge!". You're not wrong. But look all the way to the top. See that? That's Beer CSS.
49
+
50
+ ![image](https://github.com/user-attachments/assets/23df0121-7716-4114-9751-38b1e519cfcd)
51
+
52
+ # The principles
51
53
 
52
54
  This project was guided by the **"Germany Beer Purity Law"** or **"Reinheitsgebot"** created in 1516. This law states that beer should only be brewed with the following ingredients: **water**, **barley malt** and **hops**. Only 3 ingredients. Exciting, right? So we thinking about It and our 3 ingredients are: **settings**, **elements** and **helpers**. This sounds weird at first time, because It's not BEM, OOCSS, SMACSS, ITCSS, "Utility first" or any other approach. Our approach doesn't avoid some bad practices, but is lightweight, tasty and pure like a beer. Just try it and feel it! 😁
53
55
 
@@ -127,60 +129,63 @@ This project was guided by the **"Germany Beer Purity Law"** or **"Reinheitsgebo
127
129
 
128
130
  ### CDN
129
131
 
130
- From jsdelivr.net.
132
+ **Default version**
131
133
 
132
134
  ```html
133
- // with html
134
- <link href="https://cdn.jsdelivr.net/npm/beercss@3.9.6/dist/cdn/beer.min.css" rel="stylesheet" />
135
- <script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.9.6/dist/cdn/beer.min.js"></script>
135
+ <link href="https://cdn.jsdelivr.net/npm/beercss@3.10.0/dist/cdn/beer.min.css" rel="stylesheet" />
136
+ <script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.10.0/dist/cdn/beer.min.js"></script>
136
137
  <script type="module" src="https://cdn.jsdelivr.net/npm/material-dynamic-colors@1.1.2/dist/cdn/material-dynamic-colors.min.js"></script>
137
138
  ```
138
139
 
139
- ```css
140
- // with css
141
- @import "https://cdn.jsdelivr.net/npm/beercss@3.9.6/dist/cdn/beer.min.css";
140
+ **Scoped version** applied on child elements of `<* class="beer">...</*>`.
141
+
142
+ ```html
143
+ <link href="https://cdn.jsdelivr.net/npm/beercss@3.10.0/dist/cdn/beer.scoped.min.css" rel="stylesheet" />
144
+ <script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.10.0/dist/cdn/beer.min.js"></script>
145
+ <script type="module" src="https://cdn.jsdelivr.net/npm/material-dynamic-colors@1.1.2/dist/cdn/material-dynamic-colors.min.js"></script>
142
146
  ```
143
147
 
144
- ```js
145
- // with javascript
146
- import "https://cdn.jsdelivr.net/npm/beercss@3.9.6/dist/cdn/beer.min.js";
147
- import "https://cdn.jsdelivr.net/npm/material-dynamic-colors@1.1.2/dist/cdn/material-dynamic-colors.min.js";
148
+ **Custom element version** applied on child elements of `<beer-css>...</beer-css>`.
149
+
150
+ ```html
151
+ <script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.10.0/dist/cdn/beer.custom-element.min.js"></script>
152
+ <script type="module" src="https://cdn.jsdelivr.net/npm/material-dynamic-colors@1.1.2/dist/cdn/material-dynamic-colors.min.js"></script>
148
153
  ```
149
154
 
155
+
150
156
  ### NPM
151
157
 
152
- You can get the latest release using NPM. This release contains source files as well as the compiled CSS and JavaScript files.
158
+ **Install**
153
159
 
154
160
  ```js
155
- // installing
156
161
  npm i beercss
157
162
  npm i material-dynamic-colors
158
163
  ```
159
164
 
165
+ **Default version**
166
+
160
167
  ```js
161
- // importing as window.beercss and window.materialDynamicColors
162
168
  import "beercss";
163
169
  import "material-dynamic-colors";
164
170
  ```
165
171
 
166
172
  ```js
167
- // importing as beercss and materialDynamicColors
168
173
  import beercss from "beercss";
169
174
  import materialDynamicColors from "material-dynamic-colors";
170
175
  ```
171
176
 
177
+ **Scoped version** applied on child elements of `<* class="beer">...</*>`.
178
+
172
179
  ```js
173
- // importing manually from dist
174
- import "beercss/dist/cdn/beer.min.css";
175
- import beercss from "beercss/dist/cdn/beer.min.js";
176
- import materialDynamicColors from "material-dynamic-colors/dist/cdn/material-dynamic-colors.min.js";
180
+ import "beercss/scoped";
181
+ import "material-dynamic-colors";
177
182
  ```
178
183
 
184
+ **Custom element version** applied on child elements of `<beer-css>...</beer-css>`.
185
+
179
186
  ```js
180
- // importing manually from src
181
- import "beercss/src/cdn/beer.css";
182
- import beercss from "beercss/src/cdn/beer.ts";
183
- import materialDynamicColors from "material-dynamic-colors/src/cdn/material-dynamic-colors.js";
187
+ import "beercss/custom-element";
188
+ import "material-dynamic-colors";
184
189
  ```
185
190
 
186
191
  ### HTML
@@ -195,8 +200,8 @@ You can use this html to setup your project. See on [Codepen](https://codepen.io
195
200
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
196
201
  <meta name="google" content="notranslate">
197
202
  <title>Hello world</title>
198
- <link href="https://cdn.jsdelivr.net/npm/beercss@3.9.6/dist/cdn/beer.min.css" rel="stylesheet">
199
- <script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.9.6/dist/cdn/beer.min.js"></script>
203
+ <link href="https://cdn.jsdelivr.net/npm/beercss@3.10.0/dist/cdn/beer.min.css" rel="stylesheet">
204
+ <script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.10.0/dist/cdn/beer.min.js"></script>
200
205
  <script type="module" src="https://cdn.jsdelivr.net/npm/material-dynamic-colors@1.1.2/dist/cdn/material-dynamic-colors.min.js"></script>
201
206
  </head>
202
207
  <body class="dark">
@@ -285,7 +290,7 @@ You can use this html to setup your project. See on [Codepen](https://codepen.io
285
290
  </html>
286
291
  ```
287
292
 
288
- **We recommend use the material-dynamic-colors only when your app needs to change theme at runtime.**
293
+ **We recommend using the material-dynamic-colors only when your app needs to change theme at runtime.**
289
294
 
290
295
  # Documentation
291
296
 
@@ -0,0 +1,7 @@
1
+ import "./dist/cdn/beer.scoped.min.css";
2
+ import "./dist/cdn/beer.custom-element.min.js";
3
+ import { ui } from "./dist/cdn/beer.min.js";
4
+ export {
5
+ ui as default,
6
+ ui,
7
+ };