-
{
- this.shadowRoot.querySelector('input').focus();
- }}>
-
No tags yet
+
`;
}
+
+ private addTag(tag: string) {
+ if (!this.value.includes(tag)) {
+ this.value = [...this.value, tag];
+ this.inputValue = '';
+ this.changeSubject.next(this);
+ }
+ }
+
+ private removeTag(tag: string) {
+ this.value = this.value.filter((t) => t !== tag);
+ this.changeSubject.next(this);
+ }
+
+ public getValue(): string[] {
+ return this.value;
+ }
+
+ public setValue(value: string[]): void {
+ this.value = value;
+ }
}
diff --git a/ts_web/elements/dees-panel.demo.ts b/ts_web/elements/dees-panel.demo.ts
new file mode 100644
index 0000000..d29ebbd
--- /dev/null
+++ b/ts_web/elements/dees-panel.demo.ts
@@ -0,0 +1,81 @@
+import { html, css, cssManager } from '@design.estate/dees-element';
+
+export const demoFunc = () => html`
+
+
+
+
+
+ The panel component automatically follows the theme and provides consistent styling for grouped content.
+ It's perfect for creating sections in your application with proper spacing and borders.
+
+
+
+ Panels can have both a title and subtitle to provide more context.
+ The subtitle appears in a smaller, muted text below the title.
+
+
+
+
+ Grid layouts work great with panels for creating dashboards and feature sections.
+ Action
+
+
+
+ Each panel maintains consistent spacing and styling.
+ Another Action
+
+
+
+
+ Nested Elements
+ Panels can contain any type of content:
+
+ - Text and paragraphs
+ - Lists and tables
+ - Form inputs
+ - Other components
+
+
+
+
+
+ Submit
+
+
+
+
+ Panels work great even without a title for simple content grouping.
+ They provide visual separation and consistent padding.
+
+
+
+`;
\ No newline at end of file
diff --git a/ts_web/elements/dees-panel.ts b/ts_web/elements/dees-panel.ts
new file mode 100644
index 0000000..8979a56
--- /dev/null
+++ b/ts_web/elements/dees-panel.ts
@@ -0,0 +1,77 @@
+import {
+ customElement,
+ DeesElement,
+ html,
+ css,
+ cssManager,
+ property,
+ type TemplateResult,
+} from '@design.estate/dees-element';
+import { demoFunc } from './dees-panel.demo.js';
+
+declare global {
+ interface HTMLElementTagNameMap {
+ 'dees-panel': DeesPanel;
+ }
+}
+
+@customElement('dees-panel')
+export class DeesPanel extends DeesElement {
+ public static demo = demoFunc;
+
+ @property({ type: String })
+ public title: string = '';
+
+ @property({ type: String })
+ public subtitle: string = '';
+
+ public static styles = [
+ cssManager.defaultStyles,
+ css`
+ :host {
+ display: block;
+ background: ${cssManager.bdTheme('#ffffff', '#1a1a1a')};
+ border-radius: 8px;
+ padding: 24px;
+ box-shadow: 0 2px 4px ${cssManager.bdTheme('rgba(0,0,0,0.1)', 'rgba(0,0,0,0.3)')};
+ border: 1px solid ${cssManager.bdTheme('rgba(0,0,0,0.1)', 'rgba(255,255,255,0.1)')};
+ }
+
+ .title {
+ margin: 0 0 16px 0;
+ font-size: 18px;
+ font-weight: 500;
+ color: ${cssManager.bdTheme('#0069f2', '#0099ff')};
+ }
+
+ .subtitle {
+ margin: -12px 0 16px 0;
+ font-size: 14px;
+ color: ${cssManager.bdTheme('#666', '#999')};
+ }
+
+ .content {
+ color: ${cssManager.bdTheme('#333', '#ccc')};
+ }
+
+ /* Remove margins from first and last children */
+ .content ::slotted(*:first-child) {
+ margin-top: 0;
+ }
+
+ .content ::slotted(*:last-child) {
+ margin-bottom: 0;
+ }
+ `,
+ ];
+
+ public render(): TemplateResult {
+ return html`
+ ${this.title ? html`
${this.title}
` : ''}
+ ${this.subtitle ? html`
${this.subtitle}
` : ''}
+
+
+
+ `;
+ }
+}
\ No newline at end of file
diff --git a/ts_web/elements/dees-simple-appdash.demo.ts b/ts_web/elements/dees-simple-appdash.demo.ts
index 91ddc51..bf227d0 100644
--- a/ts_web/elements/dees-simple-appdash.demo.ts
+++ b/ts_web/elements/dees-simple-appdash.demo.ts
@@ -3,6 +3,8 @@ import type { IView } from './dees-simple-appdash.js';
import './dees-form.js';
import './dees-input-text.js';
import './dees-input-checkbox.js';
+import './dees-input-dropdown.js';
+import './dees-input-radio.js';
import './dees-form-submit.js';
import './dees-statsgrid.js';
import type { IStatsTile } from './dees-statsgrid.js';
@@ -157,6 +159,12 @@ class DemoViewSettings extends DeesElement {
margin: 0 0 15px 0;
color: ${cssManager.bdTheme('#333', '#ccc')};
}
+ .horizontal-form-section {
+ background: ${cssManager.bdTheme('#f5f5f5', '#1a1a1a')};
+ padding: 20px;
+ border-radius: 8px;
+ margin: 15px 0;
+ }
`
];
@@ -170,8 +178,68 @@ class DemoViewSettings extends DeesElement {
+
- Save Settings
+
+ Save General Settings
+
+
+
+
+
Display Preferences
+
+
+
+
+
Notification Settings
+
+
+
Email Frequency:
+
+
+
+
+
+
+
+ Update Notifications
`;
diff --git a/ts_web/elements/index.ts b/ts_web/elements/index.ts
index 5d9026b..7a37d75 100644
--- a/ts_web/elements/index.ts
+++ b/ts_web/elements/index.ts
@@ -39,6 +39,7 @@ export * from './dees-label.js';
export * from './dees-mobilenavigation.js';
export * from './dees-modal.js';
export * from './dees-input-multitoggle.js';
+export * from './dees-panel.js';
export * from './dees-pdf.js';
export * from './dees-searchbar.js';
export * from './dees-simple-appdash.js';