@design.estate/dees-catalog 3.77.0 → 3.78.1

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.77.0",
3
+ "version": "3.78.1",
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.77.0',
6
+ version: '3.78.1',
7
7
  description: 'A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.'
8
8
  }
@@ -0,0 +1,65 @@
1
+ import { html, css, cssManager } from '@design.estate/dees-element';
2
+ import './dees-settings.js';
3
+ import type { ISettingsField, ISettingsAction } from './dees-settings.js';
4
+
5
+ export const demoFunc = () => {
6
+ const acmeFields: ISettingsField[] = [
7
+ { key: 'email', label: 'Account email', value: 'admin@example.com' },
8
+ { key: 'status', label: 'Status', value: 'enabled' },
9
+ { key: 'mode', label: 'Mode', value: 'production' },
10
+ { key: 'autoRenew', label: 'Auto-renew', value: 'on' },
11
+ { key: 'threshold', label: 'Renewal threshold', value: '30 days' },
12
+ ];
13
+
14
+ const acmeActions: ISettingsAction[] = [
15
+ { name: 'Edit', action: () => console.log('Edit clicked') },
16
+ ];
17
+
18
+ const emptyActions: ISettingsAction[] = [
19
+ { name: 'Configure', action: () => console.log('Configure clicked') },
20
+ ];
21
+
22
+ const multiActions: ISettingsAction[] = [
23
+ { name: 'Reset', action: () => console.log('Reset clicked') },
24
+ { name: 'Edit', action: () => console.log('Edit clicked') },
25
+ ];
26
+
27
+ return html`
28
+ <dees-demowrapper>
29
+ <style>
30
+ ${css`
31
+ .demoBox {
32
+ background: ${cssManager.bdTheme('hsl(0 0% 95%)', 'hsl(0 0% 9%)')};
33
+ padding: 40px;
34
+ display: flex;
35
+ flex-direction: column;
36
+ gap: 24px;
37
+ max-width: 600px;
38
+ }
39
+ `}
40
+ </style>
41
+ <div class="demoBox">
42
+ <dees-settings
43
+ .heading=${'ACME Settings'}
44
+ .settingsFields=${acmeFields}
45
+ .actions=${acmeActions}
46
+ ></dees-settings>
47
+
48
+ <dees-settings
49
+ .heading=${'ACME Settings'}
50
+ .description=${'No ACME configuration yet. Click Configure to set up automated TLS certificate issuance.'}
51
+ .actions=${emptyActions}
52
+ ></dees-settings>
53
+
54
+ <dees-settings
55
+ .heading=${'Server Config'}
56
+ .settingsFields=${[
57
+ { key: 'host', label: 'Hostname', value: 'proxy.example.com' },
58
+ { key: 'port', label: 'Port', value: '443' },
59
+ ]}
60
+ .actions=${multiActions}
61
+ ></dees-settings>
62
+ </div>
63
+ </dees-demowrapper>
64
+ `;
65
+ };
@@ -0,0 +1,196 @@
1
+ import {
2
+ customElement,
3
+ DeesElement,
4
+ html,
5
+ css,
6
+ cssManager,
7
+ property,
8
+ type TemplateResult,
9
+ } from '@design.estate/dees-element';
10
+ import { demoFunc } from './dees-settings.demo.js';
11
+ import { cssGeistFontFamily } from '../../00fonts.js';
12
+ import { themeDefaultStyles } from '../../00theme.js';
13
+ import '../../00group-layout/dees-tile/dees-tile.js';
14
+
15
+ declare global {
16
+ interface HTMLElementTagNameMap {
17
+ 'dees-settings': DeesSettings;
18
+ }
19
+ }
20
+
21
+ export interface ISettingsField {
22
+ key: string;
23
+ label: string;
24
+ value: string | TemplateResult;
25
+ }
26
+
27
+ export interface ISettingsAction {
28
+ name: string;
29
+ action: () => void | Promise<void>;
30
+ }
31
+
32
+ /**
33
+ * dees-settings — a read-only settings display tile with modal-style footer actions.
34
+ *
35
+ * Renders a dees-tile with a heading, a grid of label/value fields,
36
+ * and a footer action bar. When an action is clicked the component
37
+ * dispatches a `settings-action` CustomEvent with the action name.
38
+ */
39
+ @customElement('dees-settings')
40
+ export class DeesSettings extends DeesElement {
41
+ public static demo = demoFunc;
42
+ public static demoGroups = ['Layout'];
43
+
44
+ @property({ type: String })
45
+ accessor heading: string = '';
46
+
47
+ @property({ type: String })
48
+ accessor description: string = '';
49
+
50
+ @property({ attribute: false })
51
+ accessor settingsFields: ISettingsField[] = [];
52
+
53
+ @property({ attribute: false })
54
+ accessor actions: ISettingsAction[] = [];
55
+
56
+ public static styles = [
57
+ themeDefaultStyles,
58
+ cssManager.defaultStyles,
59
+ css`
60
+ :host {
61
+ display: block;
62
+ font-family: ${cssGeistFontFamily};
63
+ }
64
+
65
+ .settingsGrid {
66
+ display: grid;
67
+ grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
68
+ gap: 12px 24px;
69
+ padding: 16px;
70
+ }
71
+
72
+ .settingsField {
73
+ display: flex;
74
+ flex-direction: column;
75
+ gap: 2px;
76
+ }
77
+
78
+ .fieldLabel {
79
+ font-size: 11px;
80
+ text-transform: uppercase;
81
+ letter-spacing: 0.03em;
82
+ color: var(--dees-color-text-muted);
83
+ }
84
+
85
+ .fieldValue {
86
+ font-size: 13px;
87
+ color: var(--dees-color-text-primary);
88
+ }
89
+
90
+ .settingsDescription {
91
+ padding: 16px;
92
+ font-size: 13px;
93
+ line-height: 1.5;
94
+ color: var(--dees-color-text-muted);
95
+ }
96
+
97
+ .bottomButtons {
98
+ display: flex;
99
+ flex-direction: row;
100
+ justify-content: flex-end;
101
+ align-items: center;
102
+ gap: 0;
103
+ height: 36px;
104
+ width: 100%;
105
+ box-sizing: border-box;
106
+ }
107
+
108
+ .bottomButtons .bottomButton {
109
+ padding: 0 16px;
110
+ height: 100%;
111
+ text-align: center;
112
+ font-size: 12px;
113
+ font-weight: 500;
114
+ cursor: pointer;
115
+ user-select: none;
116
+ transition: all 0.15s ease;
117
+ background: transparent;
118
+ border: none;
119
+ border-left: 1px solid var(--dees-color-border-subtle);
120
+ color: var(--dees-color-text-muted);
121
+ white-space: nowrap;
122
+ display: flex;
123
+ align-items: center;
124
+ }
125
+
126
+ .bottomButtons .bottomButton:first-child {
127
+ border-left: none;
128
+ }
129
+
130
+ .bottomButtons .bottomButton:hover {
131
+ background: var(--dees-color-hover);
132
+ color: var(--dees-color-text-primary);
133
+ }
134
+
135
+ .bottomButtons .bottomButton:active {
136
+ background: ${cssManager.bdTheme('hsl(0 0% 92%)', 'hsl(0 0% 13%)')};
137
+ }
138
+
139
+ .bottomButtons .bottomButton.primary {
140
+ color: ${cssManager.bdTheme('hsl(217.2 91.2% 59.8%)', 'hsl(213.1 93.9% 67.8%)')};
141
+ font-weight: 600;
142
+ }
143
+
144
+ .bottomButtons .bottomButton.primary:hover {
145
+ background: ${cssManager.bdTheme('hsl(217.2 91.2% 59.8% / 0.08)', 'hsl(213.1 93.9% 67.8% / 0.08)')};
146
+ color: ${cssManager.bdTheme('hsl(217.2 91.2% 50%)', 'hsl(213.1 93.9% 75%)')};
147
+ }
148
+
149
+ .bottomButtons .bottomButton.primary:active {
150
+ background: ${cssManager.bdTheme('hsl(217.2 91.2% 59.8% / 0.15)', 'hsl(213.1 93.9% 67.8% / 0.15)')};
151
+ }
152
+ `,
153
+ ];
154
+
155
+ public render(): TemplateResult {
156
+ const hasFields = this.settingsFields.length > 0;
157
+ const hasActions = this.actions.length > 0;
158
+
159
+ return html`
160
+ <dees-tile .heading=${this.heading}>
161
+ ${hasFields
162
+ ? html`
163
+ <div class="settingsGrid">
164
+ ${this.settingsFields.map(
165
+ (field) => html`
166
+ <div class="settingsField">
167
+ <span class="fieldLabel">${field.label}</span>
168
+ <span class="fieldValue">${field.value}</span>
169
+ </div>
170
+ `,
171
+ )}
172
+ </div>
173
+ `
174
+ : html`
175
+ <div class="settingsDescription">${this.description}</div>
176
+ `}
177
+ ${hasActions
178
+ ? html`
179
+ <div slot="footer" class="bottomButtons">
180
+ ${this.actions.map(
181
+ (actionArg, index) => html`
182
+ <div
183
+ class="bottomButton ${index === this.actions.length - 1 ? 'primary' : ''}"
184
+ @click=${() => actionArg.action()}
185
+ >
186
+ ${actionArg.name}
187
+ </div>
188
+ `,
189
+ )}
190
+ </div>
191
+ `
192
+ : ''}
193
+ </dees-tile>
194
+ `;
195
+ }
196
+ }
@@ -0,0 +1 @@
1
+ export * from './dees-settings.js';
@@ -5,5 +5,6 @@ export * from './dees-heading/index.js';
5
5
  export * from './dees-label/index.js';
6
6
  export * from './dees-pagination/index.js';
7
7
  export * from './dees-panel/index.js';
8
+ export * from './dees-settings/index.js';
8
9
  export * from './dees-stepper/index.js';
9
10
  export * from './dees-tile/index.js';
@@ -10,6 +10,7 @@ import {
10
10
  css,
11
11
  } from '@design.estate/dees-element';
12
12
  import { themeDefaultStyles } from '../../00theme.js';
13
+ import '../../00group-layout/dees-tile/dees-tile.js';
13
14
 
14
15
  declare global {
15
16
  interface HTMLElementTagNameMap {
@@ -90,24 +91,25 @@ export class DeesSimpleLogin extends DeesElement {
90
91
  color: var(--dees-color-text-muted);
91
92
  }
92
93
 
93
- .login-card {
94
- background: var(--dees-color-bg-primary);
95
- border: 1px solid var(--dees-color-border-default);
96
- border-radius: 8px;
94
+ dees-tile {
95
+ width: 100%;
96
+ }
97
+
98
+ dees-tile::part(content) {
97
99
  padding: 24px;
98
100
  }
99
101
 
100
- .login-card dees-form {
102
+ dees-tile dees-form {
101
103
  display: flex;
102
104
  flex-direction: column;
103
105
  gap: 16px;
104
106
  }
105
107
 
106
- .login-card dees-input-text {
108
+ dees-tile dees-input-text {
107
109
  width: 100%;
108
110
  }
109
111
 
110
- .login-card dees-form-submit {
112
+ dees-tile dees-form-submit {
111
113
  margin-top: 8px;
112
114
  width: 100%;
113
115
  }
@@ -122,13 +124,13 @@ export class DeesSimpleLogin extends DeesElement {
122
124
  <div class="header">Sign in</div>
123
125
  <div class="subheader">Enter your credentials to access ${this.name}</div>
124
126
  </div>
125
- <div class="login-card">
127
+ <dees-tile .heading=${'Credentials'}>
126
128
  <dees-form>
127
129
  <dees-input-text key="username" label="Username" required></dees-input-text>
128
130
  <dees-input-text key="password" label="Password" isPasswordBool required></dees-input-text>
129
131
  <dees-form-submit>Sign in</dees-form-submit>
130
132
  </dees-form>
131
- </div>
133
+ </dees-tile>
132
134
  </div>
133
135
  </div>
134
136
  <div class="slotContainer">