edu-webcomponents 1.20.0 → 1.21.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,17 @@ 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.21.0](https://github.com/eduardocruzpalacios/edu-webcomponents/compare/v1.20.0...v1.21.0)
8
+
9
+ - feat: add edu-divider component [`8f3f11b`](https://github.com/eduardocruzpalacios/edu-webcomponents/commit/8f3f11bc870afffff30438eea32036ff5f02f2b4)
10
+ - feat: add edu-divider component [`eb8dc7d`](https://github.com/eduardocruzpalacios/edu-webcomponents/commit/eb8dc7dfb2579ed8cca86fbc1f2bcbeafaeac142)
11
+
7
12
  #### [v1.20.0](https://github.com/eduardocruzpalacios/edu-webcomponents/compare/v1.19.24...v1.20.0)
8
13
 
9
- - feat: add edu-loading-button component [`ae19314`](https://github.com/eduardocruzpalacios/edu-webcomponents/commit/ae19314aefc2bf5112b743854fbb44bc53c98b52)
14
+ > 6 January 2026
15
+
16
+ - feat: add edu-loading-button component [`5532533`](https://github.com/eduardocruzpalacios/edu-webcomponents/commit/55325337b53a8ccd1f03d39cc7594ab56bdcdd0d)
17
+ - chore: release v1.20.0 [`7fe2f7c`](https://github.com/eduardocruzpalacios/edu-webcomponents/commit/7fe2f7c9b1ad12a8c28f7d983ef7047ea9a49bc1)
10
18
 
11
19
  #### [v1.19.24](https://github.com/eduardocruzpalacios/edu-webcomponents/compare/v1.19.23...v1.19.24)
12
20
 
package/index.js CHANGED
@@ -1,4 +1,5 @@
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';
4
5
  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.21.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);
@@ -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
  }