edu-webcomponents 1.20.0 → 1.22.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.
package/CHANGELOG.md CHANGED
@@ -4,9 +4,23 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
 
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
+ #### [v1.22.0](https://github.com/eduardocruzpalacios/edu-webcomponents/compare/v1.21.0...v1.22.0)
8
+
9
+ - feat: add edu-skeleton-text component [`0003c11`](https://github.com/eduardocruzpalacios/edu-webcomponents/commit/0003c1130e907cafd720e847fa994c16f88d0741)
10
+
11
+ #### [v1.21.0](https://github.com/eduardocruzpalacios/edu-webcomponents/compare/v1.20.0...v1.21.0)
12
+
13
+ > 6 January 2026
14
+
15
+ - feat: add edu-divider component [`8f3f11b`](https://github.com/eduardocruzpalacios/edu-webcomponents/commit/8f3f11bc870afffff30438eea32036ff5f02f2b4)
16
+ - chore: release v1.21.0 [`72e538e`](https://github.com/eduardocruzpalacios/edu-webcomponents/commit/72e538e588f92a60871c5b4c80a651e5c5c88a60)
17
+
7
18
  #### [v1.20.0](https://github.com/eduardocruzpalacios/edu-webcomponents/compare/v1.19.24...v1.20.0)
8
19
 
9
- - feat: add edu-loading-button component [`ae19314`](https://github.com/eduardocruzpalacios/edu-webcomponents/commit/ae19314aefc2bf5112b743854fbb44bc53c98b52)
20
+ > 6 January 2026
21
+
22
+ - feat: add edu-loading-button component [`5532533`](https://github.com/eduardocruzpalacios/edu-webcomponents/commit/55325337b53a8ccd1f03d39cc7594ab56bdcdd0d)
23
+ - chore: release v1.20.0 [`7fe2f7c`](https://github.com/eduardocruzpalacios/edu-webcomponents/commit/7fe2f7c9b1ad12a8c28f7d983ef7047ea9a49bc1)
10
24
 
11
25
  #### [v1.19.24](https://github.com/eduardocruzpalacios/edu-webcomponents/compare/v1.19.23...v1.19.24)
12
26
 
package/index.js CHANGED
@@ -1,4 +1,6 @@
1
1
  export { EduButton } from './src/edu-button/index.js';
2
+ export { EduDivider } from './src/edu-divider/index.js';
2
3
  export { EduLoadingSpinner } from './src/edu-loading-spinner/index.js';
3
4
  export { EduProgressBar } from './src/edu-progress-bar/index.js';
5
+ export { EduSkeletonText } from './src/edu-skeleton-text/index.js';
4
6
  export { EduTooltip } from './src/edu-tooltip/index.js';
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  ],
12
12
  "license": "MIT",
13
13
  "author": "edu-webcomponents",
14
- "version": "1.20.0",
14
+ "version": "1.22.0",
15
15
  "repository": {
16
16
  "type": "git",
17
17
  "url": "https://github.com/eduardocruzpalacios/edu-webcomponents"
@@ -0,0 +1,39 @@
1
+ import { html } from 'lit';
2
+ import './index.js';
3
+
4
+ export default {
5
+ title: 'Edu web components/EduDivider',
6
+ tags: ['autodocs'],
7
+ };
8
+
9
+ const createStory = args => {
10
+ const story = ({ label } = args) => html`
11
+ <div style="width: 400px;">
12
+ <edu-divider .label=${label}></edu-divider>
13
+ </div>
14
+ `;
15
+ story.parameters = {
16
+ controls: { expanded: true },
17
+ docs: { source: { type: 'code' } },
18
+ };
19
+ story.argTypes = {
20
+ label: {
21
+ control: 'text',
22
+ description: 'Optional label text to display in the divider',
23
+ name: 'label',
24
+ },
25
+ };
26
+ story.args = args;
27
+ return story;
28
+ };
29
+
30
+ const defaultArgs = {
31
+ label: '',
32
+ };
33
+
34
+ export const Default = createStory({ ...defaultArgs });
35
+
36
+ export const WithLabel = createStory({
37
+ ...defaultArgs,
38
+ label: 'Section Label',
39
+ });
@@ -0,0 +1,3 @@
1
+ import { EduDivider } from './src/EduDivider.js';
2
+
3
+ export { EduDivider };
@@ -0,0 +1,50 @@
1
+ import { LitElement, html, css } from 'lit';
2
+ import { colorsConstants } from '../../stylesConstants.js';
3
+
4
+ export class EduDivider extends LitElement {
5
+ static properties = {
6
+ label: { type: String },
7
+ };
8
+
9
+ constructor() {
10
+ super();
11
+ this.label = '';
12
+ }
13
+
14
+ static styles = [
15
+ colorsConstants,
16
+ css`
17
+ .divider {
18
+ display: flex;
19
+ flex-direction: row;
20
+ align-items: center;
21
+ color: var(--greyDark);
22
+ font-size: 0.875rem;
23
+ width: 100%;
24
+ }
25
+
26
+ .line {
27
+ flex: 1;
28
+ height: 2px;
29
+ background-color: var(--greyDark);
30
+ }
31
+
32
+ .label {
33
+ padding: 0 0.75rem;
34
+ white-space: nowrap;
35
+ }
36
+ `,
37
+ ];
38
+
39
+ render() {
40
+ return html`
41
+ <div class="divider" role="separator" aria-orientation="horizontal">
42
+ <div class="line"></div>
43
+ ${this.label ? html`<span class="label">${this.label}</span>` : null}
44
+ <div class="line"></div>
45
+ </div>
46
+ `;
47
+ }
48
+ }
49
+
50
+ customElements.define('edu-divider', EduDivider);
@@ -0,0 +1,71 @@
1
+ import { html } from 'lit';
2
+ import './index.js';
3
+
4
+ export default {
5
+ title: 'Edu web components/EduSkeletonText',
6
+ tags: ['autodocs'],
7
+ };
8
+
9
+ const createStory = args => {
10
+ const story = ({ width, lineHeight, lines } = args) => html`
11
+ <edu-skeleton-text
12
+ .width=${width}
13
+ .lineHeight=${lineHeight}
14
+ .lines=${lines}
15
+ ></edu-skeleton-text>
16
+ `;
17
+ story.parameters = {
18
+ controls: { expanded: true },
19
+ docs: { source: { type: 'code' } },
20
+ };
21
+ story.argTypes = {
22
+ width: {
23
+ control: 'text',
24
+ description: 'Width of the skeleton lines',
25
+ name: 'width',
26
+ },
27
+ lineHeight: {
28
+ control: 'text',
29
+ description: 'Height of each skeleton line',
30
+ name: 'lineHeight',
31
+ },
32
+ lines: {
33
+ control: 'number',
34
+ description: 'Number of skeleton lines to display',
35
+ name: 'lines',
36
+ },
37
+ };
38
+ story.args = args;
39
+ return story;
40
+ };
41
+
42
+ const defaultArgs = {
43
+ width: '100%',
44
+ lineHeight: '1em',
45
+ lines: 1,
46
+ };
47
+
48
+ export const Default = createStory({ ...defaultArgs });
49
+
50
+ export const CustomLines = createStory({
51
+ ...defaultArgs,
52
+ lines: 3,
53
+ });
54
+
55
+ export const CustomWidth = createStory({
56
+ ...defaultArgs,
57
+ width: '50%',
58
+ lines: 2,
59
+ });
60
+
61
+ export const CustomLineHeight = createStory({
62
+ ...defaultArgs,
63
+ lineHeight: '2em',
64
+ lines: 2,
65
+ });
66
+
67
+ export const CustomLinesAndLineHeight = createStory({
68
+ ...defaultArgs,
69
+ lines: 5,
70
+ lineHeight: '1.2em',
71
+ });
@@ -0,0 +1,3 @@
1
+ import { EduSkeletonText } from './src/EduSkeletonText.js';
2
+
3
+ export { EduSkeletonText };
@@ -0,0 +1,60 @@
1
+ import { LitElement, html, css } from 'lit';
2
+
3
+ export class EduSkeletonText extends LitElement {
4
+ static properties = {
5
+ width: { type: String },
6
+ lineHeight: { type: String },
7
+ lines: { type: Number },
8
+ };
9
+
10
+ constructor() {
11
+ super();
12
+ this.width = '100%';
13
+ this.lineHeight = '1em';
14
+ this.lines = 1;
15
+ }
16
+
17
+ static styles = css`
18
+ :host {
19
+ display: grid;
20
+ gap: 0.5em;
21
+ }
22
+
23
+ .line {
24
+ border-radius: 4px;
25
+ background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 37%, #e0e0e0 63%);
26
+ background-size: 400% 100%;
27
+ animation: shimmer 1.4s ease infinite;
28
+ }
29
+
30
+ @keyframes shimmer {
31
+ 0% {
32
+ background-position: 100% 0;
33
+ }
34
+ 100% {
35
+ background-position: -100% 0;
36
+ }
37
+ }
38
+
39
+ @media (prefers-reduced-motion: reduce) {
40
+ .line {
41
+ animation: none;
42
+ }
43
+ }
44
+ `;
45
+
46
+ render() {
47
+ return html`
48
+ ${Array.from(
49
+ { length: this.lines },
50
+ () =>
51
+ html`<div
52
+ class="line"
53
+ style="width:${this.width}; height:${this.lineHeight};"
54
+ ></div>`
55
+ )}
56
+ `;
57
+ }
58
+ }
59
+
60
+ window.customElements.define('edu-skeleton-text', EduSkeletonText);
@@ -8,7 +8,8 @@ export const colorsConstants = css`
8
8
 
9
9
  --blackLight: #333;
10
10
 
11
- --greyLight: #eee;
11
+ --greyLight: #ddd;
12
+ --greyDark: #aaa;
12
13
 
13
14
  --disabled: #ccc;
14
15
  }