@mhmo91/schmancy 0.2.193 → 0.2.194

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.
Files changed (93) hide show
  1. package/ai/area.md +125 -0
  2. package/ai/autocomplete.md +135 -0
  3. package/ai/avatar.md +178 -0
  4. package/ai/badge.md +100 -0
  5. package/ai/busy.md +195 -0
  6. package/ai/button.md +112 -0
  7. package/ai/card.md +155 -0
  8. package/ai/checkbox.md +108 -0
  9. package/ai/chips.md +180 -0
  10. package/ai/component-relationships.md +93 -0
  11. package/ai/dialog.md +109 -0
  12. package/ai/dropdown.md +238 -0
  13. package/ai/form.md +148 -0
  14. package/ai/icons.md +147 -0
  15. package/ai/index.md +71 -0
  16. package/ai/input.md +167 -0
  17. package/ai/layout.md +166 -0
  18. package/ai/list.md +145 -0
  19. package/ai/menu.md +217 -0
  20. package/ai/notification.md +93 -0
  21. package/ai/radio-group.md +176 -0
  22. package/ai/select.md +174 -0
  23. package/ai/sheet.md +122 -0
  24. package/ai/store.md +235 -0
  25. package/ai/surface.md +221 -0
  26. package/ai/table.md +236 -0
  27. package/ai/tabs.md +71 -0
  28. package/ai/template.md +144 -0
  29. package/ai/textarea.md +147 -0
  30. package/ai/tooltip.md +149 -0
  31. package/ai/tree.md +279 -0
  32. package/ai/typography.md +170 -0
  33. package/dist/ai/area.md +125 -0
  34. package/dist/ai/autocomplete.md +135 -0
  35. package/dist/ai/avatar.md +178 -0
  36. package/dist/ai/badge.md +100 -0
  37. package/dist/ai/busy.md +195 -0
  38. package/dist/ai/button.md +112 -0
  39. package/dist/ai/card.md +155 -0
  40. package/dist/ai/checkbox.md +108 -0
  41. package/dist/ai/chips.md +180 -0
  42. package/dist/ai/component-relationships.md +93 -0
  43. package/dist/ai/dialog.md +109 -0
  44. package/dist/ai/dropdown.md +238 -0
  45. package/dist/ai/form.md +148 -0
  46. package/dist/ai/icons.md +147 -0
  47. package/dist/ai/index.md +71 -0
  48. package/dist/ai/input.md +167 -0
  49. package/dist/ai/layout.md +166 -0
  50. package/dist/ai/list.md +145 -0
  51. package/dist/ai/menu.md +217 -0
  52. package/dist/ai/notification.md +93 -0
  53. package/dist/ai/radio-group.md +176 -0
  54. package/dist/ai/select.md +174 -0
  55. package/dist/ai/sheet.md +122 -0
  56. package/dist/ai/store.md +235 -0
  57. package/dist/ai/surface.md +221 -0
  58. package/dist/ai/table.md +236 -0
  59. package/dist/ai/tabs.md +71 -0
  60. package/dist/ai/template.md +144 -0
  61. package/dist/ai/textarea.md +147 -0
  62. package/dist/ai/tooltip.md +149 -0
  63. package/dist/ai/tree.md +279 -0
  64. package/dist/ai/typography.md +170 -0
  65. package/dist/area.cjs +1 -1
  66. package/dist/area.component-CzFJM7Y4.js +143 -0
  67. package/dist/area.component-CzFJM7Y4.js.map +1 -0
  68. package/dist/area.component-WxccFh1z.cjs +8 -0
  69. package/dist/area.component-WxccFh1z.cjs.map +1 -0
  70. package/dist/area.js +1 -1
  71. package/dist/{avatar-s-2jSsaH.cjs → avatar-Bmg5TXj9.cjs} +2 -2
  72. package/dist/{avatar-s-2jSsaH.cjs.map → avatar-Bmg5TXj9.cjs.map} +1 -1
  73. package/dist/{avatar-WAIlaNJg.js → avatar-CgP1tBZq.js} +2 -2
  74. package/dist/{avatar-WAIlaNJg.js.map → avatar-CgP1tBZq.js.map} +1 -1
  75. package/dist/badge.cjs +1 -1
  76. package/dist/badge.js +1 -1
  77. package/dist/card.cjs +1 -1
  78. package/dist/card.js +1 -1
  79. package/dist/content-drawer.cjs +1 -1
  80. package/dist/content-drawer.js +1 -1
  81. package/dist/index.cjs +1 -1
  82. package/dist/index.js +2 -2
  83. package/dist/nav-drawer.cjs +1 -1
  84. package/dist/nav-drawer.js +1 -1
  85. package/dist/teleport.cjs +1 -1
  86. package/dist/teleport.js +1 -1
  87. package/package.json +2 -1
  88. package/types/src/area/area.service.d.ts +53 -4
  89. package/types/src/area/router.types.d.ts +41 -2
  90. package/dist/area.component-CZELEuMj.js +0 -107
  91. package/dist/area.component-CZELEuMj.js.map +0 -1
  92. package/dist/area.component-grRkXEse.cjs +0 -8
  93. package/dist/area.component-grRkXEse.cjs.map +0 -1
package/ai/chips.md ADDED
@@ -0,0 +1,180 @@
1
+ # Schmancy Chips - AI Reference
2
+
3
+ ```js
4
+ // Single Chip
5
+ <schmancy-chip
6
+ text="Chip Text"
7
+ variant="default|primary|secondary|success|warning|danger|info"
8
+ size="small|medium|large"
9
+ closable?
10
+ disabled?
11
+ @close=${handleClose}
12
+ @click=${handleClick}>
13
+ </schmancy-chip>
14
+
15
+ // Chip with icon
16
+ <schmancy-chip text="JavaScript">
17
+ <schmancy-icon slot="prefix" icon="code"></schmancy-icon>
18
+ </schmancy-chip>
19
+
20
+ // Chip with avatar
21
+ <schmancy-chip text="John Doe">
22
+ <schmancy-avatar slot="prefix" src="path/to/avatar.jpg" size="small"></schmancy-avatar>
23
+ </schmancy-chip>
24
+
25
+ // Chips Container
26
+ <schmancy-chips
27
+ @change=${handleSelectionChange}>
28
+ <schmancy-chip text="Option 1" value="1"></schmancy-chip>
29
+ <schmancy-chip text="Option 2" value="2"></schmancy-chip>
30
+ <schmancy-chip text="Option 3" value="3"></schmancy-chip>
31
+ </schmancy-chips>
32
+
33
+ // Chips Container with selection mode
34
+ <schmancy-chips
35
+ selection="single|multiple|none"
36
+ .value=${selectedValues}
37
+ @change=${handleSelectionChange}>
38
+ <schmancy-chip text="Red" value="red"></schmancy-chip>
39
+ <schmancy-chip text="Green" value="green"></schmancy-chip>
40
+ <schmancy-chip text="Blue" value="blue"></schmancy-chip>
41
+ </schmancy-chips>
42
+
43
+ // Input with chip creation
44
+ <schmancy-chips
45
+ input?
46
+ placeholder="Add tag..."
47
+ @add=${handleAddChip}
48
+ @remove=${handleRemoveChip}>
49
+ <schmancy-chip text="React" closable></schmancy-chip>
50
+ <schmancy-chip text="Vue" closable></schmancy-chip>
51
+ <schmancy-chip text="Angular" closable></schmancy-chip>
52
+ </schmancy-chips>
53
+
54
+ // Chip Properties
55
+ text: string // Text content of the chip
56
+ value: string // Value for selection purposes
57
+ variant: string // Visual style: "default", "primary", "secondary", etc.
58
+ size: string // Size: "small", "medium", "large"
59
+ closable: boolean // Show close button
60
+ disabled: boolean // Disable the chip
61
+ selected: boolean // Whether the chip is selected
62
+
63
+ // Chips Container Properties
64
+ selection: string // Selection mode: "none", "single", "multiple"
65
+ value: string[] // Selected values
66
+ input: boolean // Show input for adding new chips
67
+ placeholder: string // Placeholder for the input
68
+ max: number // Maximum number of chips allowed
69
+ disabled: boolean // Disable the entire container
70
+
71
+ // Chip Events
72
+ @click // Fires when chip is clicked
73
+ @close // Fires when close button is clicked
74
+ @keydown // Fires on keydown events
75
+
76
+ // Chips Container Events
77
+ @change // Fires when selection changes, with { detail: { value } }
78
+ @add // Fires when a chip is added, with { detail: { text, value } }
79
+ @remove // Fires when a chip is removed, with { detail: { text, value } }
80
+
81
+ // Examples
82
+ // Basic chips
83
+ <div>
84
+ <schmancy-chip text="Basic"></schmancy-chip>
85
+ <schmancy-chip text="Primary" variant="primary"></schmancy-chip>
86
+ <schmancy-chip text="Success" variant="success"></schmancy-chip>
87
+ <schmancy-chip text="Warning" variant="warning"></schmancy-chip>
88
+ <schmancy-chip text="Danger" variant="danger"></schmancy-chip>
89
+ </div>
90
+
91
+ // Closable chips
92
+ <div>
93
+ <schmancy-chip
94
+ text="JavaScript"
95
+ closable
96
+ @close=${() => removeTag('javascript')}>
97
+ <schmancy-icon slot="prefix" icon="code"></schmancy-icon>
98
+ </schmancy-chip>
99
+
100
+ <schmancy-chip
101
+ text="TypeScript"
102
+ closable
103
+ @close=${() => removeTag('typescript')}>
104
+ <schmancy-icon slot="prefix" icon="code"></schmancy-icon>
105
+ </schmancy-chip>
106
+ </div>
107
+
108
+ // Single selection chips
109
+ <schmancy-chips
110
+ selection="single"
111
+ .value=${[selectedSize]}
112
+ @change=${(e) => selectedSize = e.detail.value[0]}>
113
+ <schmancy-chip text="Small" value="sm"></schmancy-chip>
114
+ <schmancy-chip text="Medium" value="md"></schmancy-chip>
115
+ <schmancy-chip text="Large" value="lg"></schmancy-chip>
116
+ </schmancy-chips>
117
+
118
+ // Multiple selection chips
119
+ <schmancy-chips
120
+ selection="multiple"
121
+ .value=${selectedToppings}
122
+ @change=${(e) => selectedToppings = e.detail.value}>
123
+ <schmancy-chip text="Cheese" value="cheese"></schmancy-chip>
124
+ <schmancy-chip text="Pepperoni" value="pepperoni"></schmancy-chip>
125
+ <schmancy-chip text="Mushrooms" value="mushrooms"></schmancy-chip>
126
+ <schmancy-chip text="Onions" value="onions"></schmancy-chip>
127
+ <schmancy-chip text="Peppers" value="peppers"></schmancy-chip>
128
+ </schmancy-chips>
129
+
130
+ // Input chips for tags
131
+ <schmancy-chips
132
+ input
133
+ placeholder="Add tag..."
134
+ @add=${(e) => addTag(e.detail.text)}
135
+ @remove=${(e) => removeTag(e.detail.text)}>
136
+ ${tags.map(tag => html`
137
+ <schmancy-chip
138
+ text=${tag}
139
+ closable>
140
+ </schmancy-chip>
141
+ `)}
142
+ </schmancy-chips>
143
+
144
+ // Email recipient chips
145
+ <schmancy-chips
146
+ input
147
+ placeholder="Add recipient..."
148
+ @add=${addRecipient}
149
+ @remove=${removeRecipient}>
150
+ ${recipients.map(recipient => html`
151
+ <schmancy-chip text=${recipient.name} closable>
152
+ <schmancy-avatar
153
+ slot="prefix"
154
+ src=${recipient.avatar}
155
+ size="small">
156
+ </schmancy-avatar>
157
+ </schmancy-chip>
158
+ `)}
159
+ </schmancy-chips>
160
+
161
+ // Filter chips
162
+ <div>
163
+ <div>Filters:</div>
164
+ <schmancy-chips>
165
+ ${filters.map(filter => html`
166
+ <schmancy-chip
167
+ text=${filter.label}
168
+ closable
169
+ @close=${() => removeFilter(filter.id)}>
170
+ </schmancy-chip>
171
+ `)}
172
+
173
+ <schmancy-chip
174
+ text="Add Filter"
175
+ @click=${openFilterDialog}>
176
+ <schmancy-icon slot="prefix" icon="add"></schmancy-icon>
177
+ </schmancy-chip>
178
+ </schmancy-chips>
179
+ </div>
180
+ ```
@@ -0,0 +1,93 @@
1
+ # Schmancy Component Relationships
2
+
3
+ This document maps the relationships between Schmancy components to provide a holistic understanding of the library.
4
+
5
+ ## Component Categories
6
+
7
+ ### Core Infrastructure
8
+ - **Area**: Routing and application area management
9
+ - **Store**: State management system
10
+ - **Teleport**: Component transportation across DOM
11
+ - **RxJS Utils**: Reactive programming utilities
12
+
13
+ ### Layout Components
14
+ - **Layout**: Container layout (flex, grid)
15
+ - **Surface**: Style-able container with consistent theming
16
+ - **Card**: Content containers with various layouts
17
+ - **Divider**: Visual separation element
18
+
19
+ ### Navigation & Structure
20
+ - **Tabs**: Tabbed interface components
21
+ - **Menu**: Dropdown/contextual menus
22
+ - **Nav-Drawer**: Navigation drawer with app bar
23
+ - **Content-Drawer**: Side panel content drawers
24
+ - **Sheet**: Modal slide-up panels
25
+ - **Dialog**: Modal dialog boxes
26
+
27
+ ### Form Controls
28
+ - **Form**: Form container with validation
29
+ - **Input**: Text input fields
30
+ - **Textarea**: Multi-line text input
31
+ - **Select**: Dropdown selection
32
+ - **Autocomplete**: Text input with suggestions
33
+ - **Checkbox**: Boolean selection control
34
+ - **Radio-Group**: Exclusive option selection
35
+ - **Option**: Selection option item
36
+
37
+ ### Interactive Elements
38
+ - **Button**: Action triggers (primary, secondary, tertiary)
39
+ - **Dropdown**: Togglable content containers
40
+ - **Chips**: Compact interactive elements
41
+ - **List**: Interactive list items
42
+ - **Tree**: Hierarchical data display
43
+ - **Table**: Tabular data display
44
+
45
+ ### Feedback & Status
46
+ - **Notification**: Toast messages and alerts
47
+ - **Tooltip**: Contextual information on hover
48
+ - **Badge**: Numeric/status indicators
49
+ - **Busy**: Loading indicators
50
+ - **Avatar**: User/entity visual representation
51
+
52
+ ### Typography & Visual
53
+ - **Typography**: Text styling system
54
+ - **Icons**: Iconography system
55
+ - **Animated-Text**: Text animation utilities
56
+ - **Typewriter**: Typing animation effect
57
+
58
+ ### Utilities
59
+ - **Directives**: DOM behavior extensions
60
+ - **Theme**: Theming system
61
+ - **Theme-Button**: Theme toggle control
62
+ - **Utils**: General utility functions
63
+ - **Types**: TypeScript type definitions
64
+ - **Delay**: Timing utilities
65
+ - **Date-Range**: Date selection utilities
66
+ - **Steps**: Multi-step process visualization
67
+
68
+ ## Key Component Interactions
69
+
70
+ ### Form System Interactions
71
+ - **Form** → Contains and validates: Input, Textarea, Select, Checkbox, Radio-Group
72
+ - **Input/Select/Autocomplete** → Can contain: Icons
73
+ - **Option** → Used by: Select, Autocomplete
74
+
75
+ ### Layout System Interactions
76
+ - **Surface** → Used by: Card, Dialog, Sheet, Table
77
+ - **Layout** → Container for: most visible components
78
+ - **Card** → Contains: Card-Media, Card-Content, Card-Actions
79
+
80
+ ### Navigation System Interactions
81
+ - **Area** → Controls routing for: any component
82
+ - **Tabs** → Contains: Tab components
83
+ - **Nav-Drawer** → Contains: AppBar, Drawer, Content
84
+ - **Content-Drawer** → Specialized Sheet with context
85
+
86
+ ### State Management
87
+ - **Store** → Can be used with: any component
88
+ - **Area** → Manages routing state via reactive observables
89
+
90
+ ### Notification System
91
+ - **Notification** → Uses: Surface
92
+ - **Dialog** → Uses: Surface
93
+ - **Tooltip** → Can attach to: any component
package/ai/dialog.md ADDED
@@ -0,0 +1,109 @@
1
+ # Schmancy Dialog - AI Reference
2
+
3
+ ```js
4
+ // Basic Dialog Component
5
+ <schmancy-dialog>
6
+ <!-- Dialog content goes here -->
7
+ <div>Dialog content</div>
8
+ </schmancy-dialog>
9
+
10
+ // Dialog Component Methods
11
+ dialog.show(position?) -> Promise<boolean> // Show dialog, optionally at a specific position
12
+ dialog.hide(result?) -> void // Hide dialog with optional result (true/false)
13
+
14
+ // Position can be:
15
+ // - Undefined: Centers dialog in viewport
16
+ // - Coordinates: { x: number, y: number }
17
+ // - MouseEvent: Uses click coordinates
18
+ // - TouchEvent: Uses touch coordinates
19
+
20
+ // Dialog Events
21
+ @close // Fires when dialog is closed
22
+
23
+ // Service API (higher-level abstraction with additional components)
24
+ $dialog.confirm({
25
+ title?,
26
+ message?,
27
+ confirmText?,
28
+ cancelText?,
29
+ variant?: "default"|"danger",
30
+ position?: {x,y}|MouseEvent|TouchEvent,
31
+ width?: string,
32
+ content?: TemplateResult|HTMLElement|Function,
33
+ onConfirm?: Function,
34
+ onCancel?: Function
35
+ }) -> Promise<boolean>
36
+
37
+ $dialog.ask(message, event?) -> Promise<boolean>
38
+ $dialog.danger({...options}) -> Promise<boolean>
39
+ $dialog.component(content, options?) -> Promise<boolean>
40
+
41
+ // Examples
42
+ // Basic dialog usage
43
+ const dialog = document.querySelector('schmancy-dialog');
44
+ // Show dialog centered
45
+ const result = await dialog.show();
46
+ // Show dialog at specific coordinates
47
+ const result = await dialog.show({ x: 100, y: 200 });
48
+ // Show dialog at click position
49
+ button.addEventListener('click', async (e) => {
50
+ const result = await dialog.show(e);
51
+ console.log('Dialog result:', result);
52
+ });
53
+
54
+ // Manually hiding dialog
55
+ dialog.hide(true); // Hide with positive result
56
+ dialog.hide(false); // Hide with negative result
57
+
58
+ // Dialog with confirm/cancel buttons
59
+ <schmancy-dialog id="confirmDialog">
60
+ <div style="padding: 16px;">
61
+ <h3>Confirm Action</h3>
62
+ <p>Are you sure you want to proceed?</p>
63
+ <div style="display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px;">
64
+ <schmancy-button variant="text" @click=${() => dialog.hide(false)}>
65
+ Cancel
66
+ </schmancy-button>
67
+ <schmancy-button variant="filled" @click=${() => dialog.hide(true)}>
68
+ Confirm
69
+ </schmancy-button>
70
+ </div>
71
+ </div>
72
+ </schmancy-dialog>
73
+
74
+ // Using the dialog service
75
+ // Simple confirmation
76
+ const confirmed = await $dialog.ask("Save changes?", event);
77
+
78
+ // Confirmation with custom options
79
+ const confirmed = await $dialog.confirm({
80
+ title: "Confirm Deletion",
81
+ message: "Are you sure you want to delete this item? This action cannot be undone.",
82
+ confirmText: "Delete",
83
+ cancelText: "Cancel",
84
+ variant: "danger",
85
+ position: event
86
+ });
87
+
88
+ // Dialog with custom content
89
+ const result = await $dialog.component(html`
90
+ <div>
91
+ <schmancy-input id="nameInput" label="Your Name"></schmancy-input>
92
+ </div>
93
+ `, {
94
+ title: "Enter Name",
95
+ confirmText: "Submit",
96
+ onConfirm: () => {
97
+ const value = document.getElementById("nameInput").value;
98
+ return value ? true : false;
99
+ }
100
+ });
101
+
102
+ // Dialog for dangerous actions
103
+ const confirmed = await $dialog.danger({
104
+ title: "Warning",
105
+ message: "You are about to delete your account. This action is permanent.",
106
+ confirmText: "Delete Account",
107
+ position: event
108
+ });
109
+ ```
package/ai/dropdown.md ADDED
@@ -0,0 +1,238 @@
1
+ # Schmancy Dropdown - AI Reference
2
+
3
+ ```js
4
+ // Basic Dropdown
5
+ <schmancy-dropdown>
6
+ <schmancy-button slot="trigger">
7
+ Open Dropdown
8
+ </schmancy-button>
9
+
10
+ <div slot="content">
11
+ <div>Dropdown content goes here</div>
12
+ </div>
13
+ </schmancy-dropdown>
14
+
15
+ // Dropdown with position
16
+ <schmancy-dropdown
17
+ position="bottom-start|bottom-end|top-start|top-end|left-start|left-end|right-start|right-end">
18
+ <schmancy-button slot="trigger">
19
+ Open Dropdown
20
+ </schmancy-button>
21
+
22
+ <div slot="content">
23
+ <div>Positioned dropdown content</div>
24
+ </div>
25
+ </schmancy-dropdown>
26
+
27
+ // Dropdown with menu items
28
+ <schmancy-dropdown>
29
+ <schmancy-button slot="trigger">
30
+ Options
31
+ </schmancy-button>
32
+
33
+ <schmancy-menu slot="content">
34
+ <schmancy-menu-item @click=${handleEdit}>Edit</schmancy-menu-item>
35
+ <schmancy-menu-item @click=${handleDuplicate}>Duplicate</schmancy-menu-item>
36
+ <schmancy-menu-item @click=${handleArchive}>Archive</schmancy-menu-item>
37
+ <schmancy-menu-item disabled>Share</schmancy-menu-item>
38
+ <schmancy-divider></schmancy-divider>
39
+ <schmancy-menu-item variant="danger" @click=${handleDelete}>Delete</schmancy-menu-item>
40
+ </schmancy-menu>
41
+ </schmancy-dropdown>
42
+
43
+ // Dropdown with custom width and offset
44
+ <schmancy-dropdown
45
+ width="300px"
46
+ offset="5">
47
+ <schmancy-button slot="trigger">
48
+ Wide Dropdown
49
+ </schmancy-button>
50
+
51
+ <div slot="content" style="padding: 16px;">
52
+ <h3>Custom Content</h3>
53
+ <p>This dropdown has custom width and offset.</p>
54
+ </div>
55
+ </schmancy-dropdown>
56
+
57
+ // Dropdown Properties
58
+ position: string // Position relative to trigger: "bottom-start" (default), "top-end", etc.
59
+ width: string // Width of the dropdown content
60
+ offset: number // Distance between trigger and content (pixels)
61
+ open: boolean // Whether the dropdown is open
62
+ disabled: boolean // Disable the dropdown
63
+ closeOnSelect: boolean // Close dropdown when an item inside is selected
64
+ closeOnClickOutside: boolean // Close dropdown when clicking outside
65
+ matchTriggerWidth: boolean // Make content width match trigger width
66
+
67
+ // Dropdown Events
68
+ @open // Fires when dropdown opens
69
+ @close // Fires when dropdown closes
70
+ @select // Fires when an item is selected (if using menu items)
71
+
72
+ // Dropdown Methods
73
+ dropdown.open() -> void // Programmatically open the dropdown
74
+ dropdown.close() -> void // Programmatically close the dropdown
75
+ dropdown.toggle() -> void // Toggle the dropdown state
76
+
77
+ // Examples
78
+ // Basic dropdown menu
79
+ <schmancy-dropdown>
80
+ <schmancy-button slot="trigger">
81
+ <span>Actions</span>
82
+ <schmancy-icon slot="suffix" icon="chevron-down"></schmancy-icon>
83
+ </schmancy-button>
84
+
85
+ <schmancy-menu slot="content">
86
+ <schmancy-menu-item @click=${viewItem}>
87
+ <schmancy-icon slot="prefix" icon="eye"></schmancy-icon>
88
+ View
89
+ </schmancy-menu-item>
90
+
91
+ <schmancy-menu-item @click=${editItem}>
92
+ <schmancy-icon slot="prefix" icon="edit"></schmancy-icon>
93
+ Edit
94
+ </schmancy-menu-item>
95
+
96
+ <schmancy-divider></schmancy-divider>
97
+
98
+ <schmancy-menu-item variant="danger" @click=${deleteItem}>
99
+ <schmancy-icon slot="prefix" icon="trash"></schmancy-icon>
100
+ Delete
101
+ </schmancy-menu-item>
102
+ </schmancy-menu>
103
+ </schmancy-dropdown>
104
+
105
+ // Profile dropdown
106
+ <schmancy-dropdown position="bottom-end">
107
+ <div slot="trigger" style="cursor: pointer;">
108
+ <schmancy-avatar
109
+ src="path/to/avatar.jpg"
110
+ size="medium">
111
+ </schmancy-avatar>
112
+ </div>
113
+
114
+ <div slot="content">
115
+ <div style="padding: 16px; text-align: center;">
116
+ <schmancy-avatar
117
+ src="path/to/avatar.jpg"
118
+ size="large">
119
+ </schmancy-avatar>
120
+ <h3>John Doe</h3>
121
+ <p>john@example.com</p>
122
+ </div>
123
+
124
+ <schmancy-divider></schmancy-divider>
125
+
126
+ <schmancy-menu>
127
+ <schmancy-menu-item @click=${viewProfile}>
128
+ <schmancy-icon slot="prefix" icon="user"></schmancy-icon>
129
+ Profile
130
+ </schmancy-menu-item>
131
+
132
+ <schmancy-menu-item @click=${openSettings}>
133
+ <schmancy-icon slot="prefix" icon="settings"></schmancy-icon>
134
+ Settings
135
+ </schmancy-menu-item>
136
+
137
+ <schmancy-divider></schmancy-divider>
138
+
139
+ <schmancy-menu-item @click=${signOut}>
140
+ <schmancy-icon slot="prefix" icon="logout"></schmancy-icon>
141
+ Sign Out
142
+ </schmancy-menu-item>
143
+ </schmancy-menu>
144
+ </div>
145
+ </schmancy-dropdown>
146
+
147
+ // Dropdown with form
148
+ <schmancy-dropdown>
149
+ <schmancy-button slot="trigger">
150
+ Add User
151
+ </schmancy-button>
152
+
153
+ <div slot="content" style="padding: 16px; width: 300px;">
154
+ <h3>Add User</h3>
155
+ <schmancy-form @submit=${(e) => {
156
+ addUser(e.detail.values);
157
+ dropdown.close();
158
+ }}>
159
+ <schmancy-input
160
+ name="name"
161
+ label="Name"
162
+ required>
163
+ </schmancy-input>
164
+
165
+ <schmancy-input
166
+ name="email"
167
+ label="Email"
168
+ type="email"
169
+ required>
170
+ </schmancy-input>
171
+
172
+ <div style="display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px;">
173
+ <schmancy-button
174
+ type="button"
175
+ variant="tertiary"
176
+ @click=${() => dropdown.close()}>
177
+ Cancel
178
+ </schmancy-button>
179
+
180
+ <schmancy-button
181
+ type="submit"
182
+ variant="primary">
183
+ Add
184
+ </schmancy-button>
185
+ </div>
186
+ </schmancy-form>
187
+ </div>
188
+ </schmancy-dropdown>
189
+
190
+ // Icon button dropdown
191
+ <schmancy-dropdown>
192
+ <schmancy-icon-button
193
+ slot="trigger"
194
+ icon="more-vertical">
195
+ </schmancy-icon-button>
196
+
197
+ <schmancy-menu slot="content">
198
+ <schmancy-menu-item>Option 1</schmancy-menu-item>
199
+ <schmancy-menu-item>Option 2</schmancy-menu-item>
200
+ <schmancy-menu-item>Option 3</schmancy-menu-item>
201
+ </schmancy-menu>
202
+ </schmancy-dropdown>
203
+
204
+ // Filter dropdown
205
+ <schmancy-dropdown>
206
+ <schmancy-button slot="trigger" variant="tertiary">
207
+ <schmancy-icon slot="prefix" icon="filter"></schmancy-icon>
208
+ Filter
209
+ </schmancy-button>
210
+
211
+ <div slot="content" style="padding: 16px; width: 250px;">
212
+ <h3>Filters</h3>
213
+
214
+ <div style="margin-bottom: 16px;">
215
+ <label>Status</label>
216
+ <schmancy-radio-group>
217
+ <schmancy-radio-button value="all" label="All"></schmancy-radio-button>
218
+ <schmancy-radio-button value="active" label="Active"></schmancy-radio-button>
219
+ <schmancy-radio-button value="inactive" label="Inactive"></schmancy-radio-button>
220
+ </schmancy-radio-group>
221
+ </div>
222
+
223
+ <div style="margin-bottom: 16px;">
224
+ <label>Categories</label>
225
+ <schmancy-checkbox label="Products"></schmancy-checkbox>
226
+ <schmancy-checkbox label="Services"></schmancy-checkbox>
227
+ <schmancy-checkbox label="Resources"></schmancy-checkbox>
228
+ </div>
229
+
230
+ <schmancy-button
231
+ variant="primary"
232
+ style="width: 100%;"
233
+ @click=${applyFilters}>
234
+ Apply Filters
235
+ </schmancy-button>
236
+ </div>
237
+ </schmancy-dropdown>
238
+ ```