@design.estate/dees-catalog 3.68.0 → 3.69.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@design.estate/dees-catalog",
3
- "version": "3.68.0",
3
+ "version": "3.69.0",
4
4
  "private": false,
5
5
  "description": "A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.",
6
6
  "main": "dist_ts_web/index.js",
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@design.estate/dees-catalog',
6
- version: '3.68.0',
6
+ version: '3.69.0',
7
7
  description: 'A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.'
8
8
  }
@@ -8,7 +8,9 @@ export function demoFunc() {
8
8
  <dees-heading level="4">This is a H4 heading</dees-heading>
9
9
  <dees-heading level="5">This is a H5 heading</dees-heading>
10
10
  <dees-heading level="6">This is a H6 heading</dees-heading>
11
- <dees-heading level="hr">This is an hr heading</dees-heading>
12
- <dees-heading level="hr-small">This is an hr small heading</dees-heading>
11
+ <dees-heading level="hr">This is an hr heading (level="hr")</dees-heading>
12
+ <dees-heading level="7">This is an hr heading (level="7")</dees-heading>
13
+ <dees-heading level="hr-small">This is an hr-small heading (level="hr-small")</dees-heading>
14
+ <dees-heading level="8">This is an hr-small heading (level="8")</dees-heading>
13
15
  `;
14
16
  }
@@ -27,68 +27,91 @@ export class DeesHeading extends DeesElement {
27
27
 
28
28
  // properties
29
29
  /**
30
- * Heading level: 1-6 for h1-h6, or 'hr' for horizontal rule style
30
+ * Heading level:
31
+ * '1'-'6' → <h1>..<h6>
32
+ * '7'|'hr' → horizontal-rule style heading
33
+ * '8'|'hr-small' → small horizontal-rule style heading
31
34
  */
32
35
  @property({ type: String, reflect: true })
33
- accessor level: '1' | '2' | '3' | '4' | '5' | '6' | 'hr' | 'hr-small' = '1';
36
+ accessor level: '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | 'hr' | 'hr-small' = '1';
34
37
 
35
38
  // STATIC STYLES
36
39
  public static styles: CSSResult[] = [
37
40
  themeDefaultStyles,
38
41
  cssManager.defaultStyles,
39
42
  css`
40
- /* TODO: Migrate hardcoded values to --dees-* CSS variables */
43
+ :host {
44
+ display: block;
45
+ }
46
+
41
47
  /* Heading styles */
42
48
  h1, h2, h3, h4, h5, h6 {
43
- margin: 16px 0 8px;
44
49
  font-weight: 600;
45
- color: ${cssManager.bdTheme('#000', '#fff')};
50
+ color: var(--dees-color-text-primary);
51
+ }
52
+
53
+ /* Per-level typography + spacing.
54
+ * Margin scales with importance: h1 gets the most breathing room,
55
+ * h6 the least. Top margin > bottom margin so headings group with
56
+ * the content that follows them. */
57
+ h1 {
58
+ font-size: 32px;
59
+ font-family: ${cssCalSansFontFamily};
60
+ letter-spacing: 0.025em;
61
+ margin: var(--dees-spacing-2xl) 0 var(--dees-spacing-lg);
62
+ }
63
+ h2 {
64
+ font-size: 28px;
65
+ margin: var(--dees-spacing-xl) 0 var(--dees-spacing-md);
46
66
  }
47
- h1 { font-size: 32px; font-family: ${cssCalSansFontFamily}; letter-spacing: 0.025em;}
48
- h2 { font-size: 28px; }
49
- h3 { font-size: 24px; }
50
- h4 { font-size: 20px; }
51
- h5 { font-size: 16px; }
52
- h6 { font-size: 14px; }
67
+ h3 {
68
+ font-size: 24px;
69
+ margin: var(--dees-spacing-xl) 0 var(--dees-spacing-md);
70
+ }
71
+ h4 {
72
+ font-size: 20px;
73
+ margin: var(--dees-spacing-lg) 0 var(--dees-spacing-sm);
74
+ }
75
+ h5 {
76
+ font-size: 16px;
77
+ margin: var(--dees-spacing-md) 0 var(--dees-spacing-sm);
78
+ }
79
+ h6 {
80
+ font-size: 14px;
81
+ margin: var(--dees-spacing-md) 0 var(--dees-spacing-xs);
82
+ }
83
+
53
84
  /* Horizontal rule style heading */
54
85
  .heading-hr {
55
86
  display: flex;
56
87
  align-items: center;
57
88
  text-align: center;
58
- margin: 16px 0;
59
- color: ${cssManager.bdTheme('#999', '#555')};
89
+ margin: var(--dees-spacing-lg) 0;
90
+ color: var(--dees-color-text-muted);
60
91
  }
61
92
  /* Fade lines toward and away from text for hr style */
62
93
  .heading-hr::before {
63
94
  content: '';
64
95
  flex: 1;
65
96
  height: 1px;
66
- /* fade in toward center */
67
- background: ${cssManager.bdTheme(
68
- 'linear-gradient(to right, transparent, #ccc)',
69
- 'linear-gradient(to right, transparent, #333)'
70
- )};
71
- margin: 0 8px;
97
+ background: linear-gradient(to right, transparent, var(--dees-color-border-strong));
98
+ margin: 0 var(--dees-spacing-sm);
72
99
  }
73
100
  .heading-hr::after {
74
101
  content: '';
75
102
  flex: 1;
76
103
  height: 1px;
77
- /* fade out away from center */
78
- background: ${cssManager.bdTheme(
79
- 'linear-gradient(to right, #ccc, transparent)',
80
- 'linear-gradient(to right, #333, transparent)'
81
- )};
82
- margin: 0 8px;
104
+ background: linear-gradient(to right, var(--dees-color-border-strong), transparent);
105
+ margin: 0 var(--dees-spacing-sm);
83
106
  }
84
107
  /* Small hr variant with reduced margins */
85
108
  .heading-hr.heading-hr-small {
86
- margin: 8px 0;
109
+ margin: var(--dees-spacing-sm) 0;
87
110
  font-size: 12px;
88
111
  }
89
112
  .heading-hr.heading-hr-small::before,
90
113
  .heading-hr.heading-hr-small::after {
91
- margin: 0 8px;
114
+ margin: 0 var(--dees-spacing-sm);
92
115
  }
93
116
  `,
94
117
  ];
@@ -109,8 +132,10 @@ export class DeesHeading extends DeesElement {
109
132
  return html`<h5><slot></slot></h5>`;
110
133
  case '6':
111
134
  return html`<h6><slot></slot></h6>`;
135
+ case '7':
112
136
  case 'hr':
113
137
  return html`<div class="heading-hr"><slot></slot></div>`;
138
+ case '8':
114
139
  case 'hr-small':
115
140
  return html`<div class="heading-hr heading-hr-small"><slot></slot></div>`;
116
141
  default: