@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/busy.md ADDED
@@ -0,0 +1,195 @@
1
+ # Schmancy Busy - AI Reference
2
+
3
+ ```js
4
+ // Basic Busy Indicator
5
+ <schmancy-busy
6
+ active?
7
+ size="small|medium|large"
8
+ type="spinner|dots|bar"
9
+ label="Loading..."
10
+ overlay?
11
+ fullscreen?>
12
+ </schmancy-busy>
13
+
14
+ // Spinner Component
15
+ <schmancy-spinner
16
+ size="small|medium|large"
17
+ color="primary|secondary|tertiary|currentColor">
18
+ </schmancy-spinner>
19
+
20
+ // Busy overlaying content
21
+ <div style="position: relative; height: 200px;">
22
+ <div>
23
+ Content that will be overlaid when loading
24
+ </div>
25
+
26
+ <schmancy-busy
27
+ active=${isLoading}
28
+ overlay>
29
+ </schmancy-busy>
30
+ </div>
31
+
32
+ // Fullscreen busy indicator
33
+ <schmancy-busy
34
+ active=${isLoading}
35
+ fullscreen
36
+ label="Loading application...">
37
+ </schmancy-busy>
38
+
39
+ // Busy Properties
40
+ active: boolean // Whether the busy indicator is displayed
41
+ size: string // Size: "small", "medium", "large"
42
+ type: string // Indicator type: "spinner", "dots", "bar"
43
+ label: string // Text to display
44
+ overlay: boolean // Show as overlay on parent container
45
+ fullscreen: boolean // Show as fullscreen overlay
46
+ color: string // Color of the indicator
47
+ opacity: number // Background opacity for overlay
48
+ persistent: boolean // Prevent closing with escape key
49
+ delay: number // Delay in ms before showing (to prevent flashing)
50
+ minDuration: number // Minimum duration in ms to show
51
+
52
+ // Spinner Properties
53
+ size: string // Size: "small" (16px), "medium" (24px), "large" (48px), or custom size
54
+ color: string // Color: "primary", "secondary", "tertiary", "currentColor" or CSS color
55
+ thickness: number // Thickness of the spinner stroke
56
+
57
+ // Examples
58
+ // Basic usage
59
+ <schmancy-busy active=${loading} label="Loading..."></schmancy-busy>
60
+
61
+ // Spinner with custom size and color
62
+ <schmancy-spinner size="32px" color="#ff5722"></schmancy-spinner>
63
+
64
+ // Busy indicator in a button
65
+ <schmancy-button ?disabled=${loading}>
66
+ ${loading ? html`
67
+ <schmancy-spinner size="small" slot="prefix"></schmancy-spinner>
68
+ Loading...
69
+ ` : html`
70
+ Submit
71
+ `}
72
+ </schmancy-button>
73
+
74
+ // Overlay on a card
75
+ <schmancy-card>
76
+ <schmancy-card-content>
77
+ <h3>User Details</h3>
78
+ <div>
79
+ <!-- User details content -->
80
+ </div>
81
+ </schmancy-card-content>
82
+
83
+ <schmancy-busy
84
+ active=${loadingUser}
85
+ overlay
86
+ label="Loading user...">
87
+ </schmancy-busy>
88
+ </schmancy-card>
89
+
90
+ // Delayed busy indicator to prevent flashing for fast operations
91
+ <schmancy-busy
92
+ active=${loading}
93
+ delay="300"
94
+ min-duration="500"
95
+ label="Processing...">
96
+ </schmancy-busy>
97
+
98
+ // Busy indicator with different types
99
+ <div>
100
+ <div>
101
+ <h4>Spinner</h4>
102
+ <schmancy-busy active type="spinner"></schmancy-busy>
103
+ </div>
104
+
105
+ <div>
106
+ <h4>Dots</h4>
107
+ <schmancy-busy active type="dots"></schmancy-busy>
108
+ </div>
109
+
110
+ <div>
111
+ <h4>Bar</h4>
112
+ <schmancy-busy active type="bar"></schmancy-busy>
113
+ </div>
114
+ </div>
115
+
116
+ // Table with loading state
117
+ <div style="position: relative;">
118
+ <schmancy-table>
119
+ <!-- Table content -->
120
+ </schmancy-table>
121
+
122
+ <schmancy-busy
123
+ active=${loadingData}
124
+ overlay
125
+ opacity="0.7"
126
+ label="Loading data...">
127
+ </schmancy-busy>
128
+ </div>
129
+
130
+ // Form with busy state
131
+ <schmancy-form @submit=${handleSubmit}>
132
+ <schmancy-input
133
+ name="username"
134
+ label="Username"
135
+ required
136
+ ?disabled=${submitting}>
137
+ </schmancy-input>
138
+
139
+ <schmancy-input
140
+ name="password"
141
+ label="Password"
142
+ type="password"
143
+ required
144
+ ?disabled=${submitting}>
145
+ </schmancy-input>
146
+
147
+ <schmancy-button
148
+ type="submit"
149
+ ?disabled=${submitting}>
150
+ ${submitting ? html`
151
+ <schmancy-spinner slot="prefix" size="small"></schmancy-spinner>
152
+ Signing In...
153
+ ` : html`
154
+ Sign In
155
+ `}
156
+ </schmancy-button>
157
+
158
+ <schmancy-busy
159
+ active=${submitting}
160
+ overlay
161
+ opacity="0.3">
162
+ </schmancy-busy>
163
+ </schmancy-form>
164
+
165
+ // Fullscreen loading with custom styling
166
+ <schmancy-busy
167
+ active=${initialLoading}
168
+ fullscreen
169
+ label="Loading application..."
170
+ style="--busy-backdrop-color: var(--color-primary); --busy-label-color: white;">
171
+ </schmancy-busy>
172
+
173
+ // Programmatic usage (service API)
174
+ import { $busy } from 'schmancy';
175
+
176
+ // Show busy indicator
177
+ $busy.show({
178
+ label: 'Loading data...',
179
+ fullscreen: true
180
+ });
181
+
182
+ // Hide busy indicator
183
+ $busy.hide();
184
+
185
+ // For async operations
186
+ async function fetchData() {
187
+ $busy.show({ label: 'Fetching data...' });
188
+
189
+ try {
190
+ await api.getData();
191
+ } finally {
192
+ $busy.hide();
193
+ }
194
+ }
195
+ ```
package/ai/button.md ADDED
@@ -0,0 +1,112 @@
1
+ # Schmancy Button - AI Reference
2
+
3
+ ```js
4
+ // Basic Button
5
+ <schmancy-button
6
+ variant="elevated|filled|filled tonal|outlined|text"
7
+ width="full|auto"
8
+ type="button|submit|reset"
9
+ disabled?
10
+ href?
11
+ @click>
12
+ Button Text
13
+ </schmancy-button>
14
+
15
+ // Icon Button
16
+ <schmancy-icon-button
17
+ variant="elevated|filled|filled tonal|outlined|text"
18
+ size="sm|md|lg"
19
+ width="full|auto"
20
+ type="button|submit|reset"
21
+ disabled?
22
+ href?
23
+ @click>
24
+ <!-- Icon content goes directly in the slot -->
25
+ <svg>...</svg>
26
+ </schmancy-icon-button>
27
+
28
+ // Button with Icon
29
+ <schmancy-button>
30
+ <schmancy-icon slot="prefix" icon="check"></schmancy-icon>
31
+ With Prefix Icon
32
+ </schmancy-button>
33
+
34
+ <schmancy-button>
35
+ With Suffix Icon
36
+ <schmancy-icon slot="suffix" icon="arrow-right"></schmancy-icon>
37
+ </schmancy-button>
38
+
39
+ // Button Properties
40
+ variant: string // "elevated", "filled", "filled tonal", "outlined", "text" (default: "text")
41
+ width: string // "full", "auto" (default: "auto")
42
+ type: string // "button", "submit", "reset" (default: "button")
43
+ disabled: boolean // Whether the button is disabled
44
+ href: string // If provided, renders as an anchor (<a>) element
45
+ ariaLabel: string // Accessible label for the button
46
+
47
+ // Icon Button Properties
48
+ variant: string // "elevated", "filled", "filled tonal", "outlined", "text" (default: "text")
49
+ size: string // "sm", "md", "lg" (default: "md")
50
+ width: string // "full", "auto" (default: "auto")
51
+ type: string // "button", "submit", "reset" (default: "button")
52
+ disabled: boolean // Whether the button is disabled
53
+ href: string // If provided, renders as an anchor (<a>) element
54
+ ariaLabel: string // Accessible label for the button
55
+
56
+ // Button Methods
57
+ focus(options?) -> void // Sets focus on the button
58
+ blur() -> void // Removes focus from the button
59
+ click() -> void // Programmatically clicks the button
60
+
61
+ // Examples
62
+ <schmancy-button variant="filled" @click=${() => console.log('clicked')}>
63
+ Filled Button
64
+ </schmancy-button>
65
+
66
+ <schmancy-button variant="outlined" disabled>
67
+ Disabled Button
68
+ </schmancy-button>
69
+
70
+ <schmancy-button variant="elevated">
71
+ Elevated Button
72
+ </schmancy-button>
73
+
74
+ <schmancy-button variant="text">
75
+ Text Button
76
+ </schmancy-button>
77
+
78
+ <schmancy-button variant="filled tonal">
79
+ Tonal Button
80
+ </schmancy-button>
81
+
82
+ <schmancy-button href="https://example.com" variant="outlined">
83
+ Link Button
84
+ </schmancy-button>
85
+
86
+ <schmancy-button width="full" variant="filled">
87
+ Full Width Button
88
+ </schmancy-button>
89
+
90
+ <schmancy-icon-button variant="filled" size="md">
91
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
92
+ <path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"></path>
93
+ <path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"></path>
94
+ </svg>
95
+ </schmancy-icon-button>
96
+
97
+ <schmancy-icon-button variant="text" size="sm">
98
+ <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
99
+ <circle cx="18" cy="6" r="3"></circle>
100
+ <circle cx="6" cy="18" r="3"></circle>
101
+ <line x1="13" y1="6" x2="6" y2="14"></line>
102
+ </svg>
103
+ </schmancy-icon-button>
104
+
105
+ // Form submission button
106
+ <schmancy-form @submit=${handleSubmit}>
107
+ <schmancy-input name="email" type="email" required></schmancy-input>
108
+ <schmancy-button type="submit" variant="filled">
109
+ Submit Form
110
+ </schmancy-button>
111
+ </schmancy-form>
112
+ ```
package/ai/card.md ADDED
@@ -0,0 +1,155 @@
1
+ # Schmancy Card - AI Reference
2
+
3
+ ```js
4
+ // Basic Card
5
+ <schmancy-card>
6
+ <div>Card content goes here</div>
7
+ </schmancy-card>
8
+
9
+ // Card with title and content
10
+ <schmancy-card>
11
+ <schmancy-card-content>
12
+ <h2>Card Title</h2>
13
+ <p>Card description text goes here.</p>
14
+ </schmancy-card-content>
15
+ </schmancy-card>
16
+
17
+ // Card with media
18
+ <schmancy-card>
19
+ <schmancy-card-media
20
+ image="path/to/image.jpg"
21
+ alt="Image description"
22
+ height="200px">
23
+ </schmancy-card-media>
24
+
25
+ <schmancy-card-content>
26
+ <h2>Card with Media</h2>
27
+ <p>Card content below the image.</p>
28
+ </schmancy-card-content>
29
+ </schmancy-card>
30
+
31
+ // Card with actions
32
+ <schmancy-card>
33
+ <schmancy-card-content>
34
+ <h2>Card Title</h2>
35
+ <p>Card content with action buttons.</p>
36
+ </schmancy-card-content>
37
+
38
+ <schmancy-card-actions>
39
+ <schmancy-button>Action 1</schmancy-button>
40
+ <schmancy-button>Action 2</schmancy-button>
41
+ </schmancy-card-actions>
42
+ </schmancy-card>
43
+
44
+ // Complete card with all components
45
+ <schmancy-card>
46
+ <schmancy-card-media
47
+ image="path/to/image.jpg"
48
+ alt="Image description">
49
+ </schmancy-card-media>
50
+
51
+ <schmancy-card-content>
52
+ <h2>Card Title</h2>
53
+ <p>Card description text goes here. This can contain any content.</p>
54
+ </schmancy-card-content>
55
+
56
+ <schmancy-card-actions>
57
+ <schmancy-button kind="tertiary">Cancel</schmancy-button>
58
+ <schmancy-button kind="primary">Submit</schmancy-button>
59
+ </schmancy-card-actions>
60
+ </schmancy-card>
61
+
62
+ // Card Properties
63
+ outlined: boolean // Shows an outline instead of elevation
64
+ elevation: number // Shadow elevation level (1-5)
65
+ interactive: boolean // Enables hover and click effects
66
+
67
+ // Card Media Properties
68
+ image: string // URL of the image
69
+ alt: string // Alt text for the image
70
+ height: string // Height of the media area
71
+ title: string // Title to display over the media
72
+
73
+ // Card Actions Properties
74
+ align: string // Alignment of actions: "start", "end", "space-between", "center"
75
+ direction: string // Direction of actions: "row", "column"
76
+
77
+ // Examples
78
+ // Basic card with content
79
+ <schmancy-card>
80
+ <schmancy-card-content>
81
+ <h2>Welcome to Schmancy</h2>
82
+ <p>A modern component library for web applications.</p>
83
+ </schmancy-card-content>
84
+ </schmancy-card>
85
+
86
+ // Interactive card
87
+ <schmancy-card
88
+ interactive
89
+ @click=${handleCardClick}>
90
+ <schmancy-card-content>
91
+ <h3>Click Me</h3>
92
+ <p>This entire card is clickable.</p>
93
+ </schmancy-card-content>
94
+ </schmancy-card>
95
+
96
+ // Outlined card
97
+ <schmancy-card outlined>
98
+ <schmancy-card-content>
99
+ <h3>Outlined Card</h3>
100
+ <p>This card has an outline instead of elevation.</p>
101
+ </schmancy-card-content>
102
+ </schmancy-card>
103
+
104
+ // Product card
105
+ <schmancy-card>
106
+ <schmancy-card-media
107
+ image="/products/headphones.jpg"
108
+ alt="Wireless Headphones"
109
+ height="180px">
110
+ </schmancy-card-media>
111
+
112
+ <schmancy-card-content>
113
+ <h3>Wireless Headphones</h3>
114
+ <p>Premium sound quality with noise cancellation.</p>
115
+ <p><strong>$149.99</strong></p>
116
+ </schmancy-card-content>
117
+
118
+ <schmancy-card-actions>
119
+ <schmancy-button kind="tertiary">Details</schmancy-button>
120
+ <schmancy-button kind="primary">Add to Cart</schmancy-button>
121
+ </schmancy-card-actions>
122
+ </schmancy-card>
123
+
124
+ // Card grid layout
125
+ <schmancy-grid
126
+ columns="1"
127
+ columns-md="2"
128
+ columns-lg="3"
129
+ gap="16px">
130
+
131
+ ${products.map(product => html`
132
+ <schmancy-card>
133
+ <schmancy-card-media
134
+ image=${product.image}
135
+ alt=${product.name}>
136
+ </schmancy-card-media>
137
+
138
+ <schmancy-card-content>
139
+ <h3>${product.name}</h3>
140
+ <p>${product.description}</p>
141
+ <p><strong>${product.price}</strong></p>
142
+ </schmancy-card-content>
143
+
144
+ <schmancy-card-actions>
145
+ <schmancy-button @click=${() => viewProduct(product)}>
146
+ View
147
+ </schmancy-button>
148
+ <schmancy-button kind="primary" @click=${() => addToCart(product)}>
149
+ Add to Cart
150
+ </schmancy-button>
151
+ </schmancy-card-actions>
152
+ </schmancy-card>
153
+ `)}
154
+ </schmancy-grid>
155
+ ```
package/ai/checkbox.md ADDED
@@ -0,0 +1,108 @@
1
+ # Schmancy Checkbox - AI Reference
2
+
3
+ ```js
4
+ // Basic Checkbox
5
+ <schmancy-checkbox
6
+ name="checkbox-name"
7
+ label="Checkbox Label"
8
+ value="checkbox-value"
9
+ checked?
10
+ indeterminate?
11
+ disabled?
12
+ required?
13
+ @change=${handleChange}>
14
+ </schmancy-checkbox>
15
+
16
+ // Checkbox with helper text
17
+ <schmancy-checkbox
18
+ label="Subscribe to newsletter"
19
+ helper-text="You'll receive weekly updates">
20
+ </schmancy-checkbox>
21
+
22
+ // Checkbox with error
23
+ <schmancy-checkbox
24
+ label="Accept terms"
25
+ error="You must accept the terms to continue"
26
+ required>
27
+ </schmancy-checkbox>
28
+
29
+ // Checkbox Methods
30
+ checkbox.check() -> void // Programmatically check
31
+ checkbox.uncheck() -> void // Programmatically uncheck
32
+ checkbox.toggle() -> void // Toggle current state
33
+ checkbox.focus() -> void // Focus the checkbox
34
+ checkbox.blur() -> void // Remove focus
35
+ checkbox.validate() -> boolean // Validate and show error if invalid
36
+
37
+ // Checkbox Properties
38
+ checked: boolean // The checked state
39
+ indeterminate: boolean // Indeterminate state (neither checked nor unchecked)
40
+ value: string // The value attribute of the checkbox
41
+ name: string // The name attribute
42
+ disabled: boolean // Whether the checkbox is disabled
43
+ required: boolean // Whether the checkbox is required
44
+ error: string // Error message to display
45
+
46
+ // Checkbox Events
47
+ @change // Fires when checked state changes, with { detail: { checked, value } }
48
+ @input // Fires when value changes during interaction
49
+ @focus // Fires when checkbox gains focus
50
+ @blur // Fires when checkbox loses focus
51
+
52
+ // Examples
53
+ // Basic usage
54
+ <schmancy-checkbox
55
+ name="agree"
56
+ label="I agree to the terms and conditions"
57
+ required
58
+ @change=${(e) => console.log('Agreed:', e.detail.checked)}>
59
+ </schmancy-checkbox>
60
+
61
+ // Indeterminate state example
62
+ <schmancy-checkbox
63
+ label="Select all"
64
+ .indeterminate=${someChecked && !allChecked}
65
+ .checked=${allChecked}
66
+ @change=${selectAll}>
67
+ </schmancy-checkbox>
68
+
69
+ // Checkbox group
70
+ <div>
71
+ <schmancy-checkbox
72
+ name="roles"
73
+ value="admin"
74
+ label="Admin"
75
+ .checked=${roles.includes('admin')}
76
+ @change=${updateRoles}>
77
+ </schmancy-checkbox>
78
+
79
+ <schmancy-checkbox
80
+ name="roles"
81
+ value="editor"
82
+ label="Editor"
83
+ .checked=${roles.includes('editor')}
84
+ @change=${updateRoles}>
85
+ </schmancy-checkbox>
86
+
87
+ <schmancy-checkbox
88
+ name="roles"
89
+ value="viewer"
90
+ label="Viewer"
91
+ .checked=${roles.includes('viewer')}
92
+ @change=${updateRoles}>
93
+ </schmancy-checkbox>
94
+ </div>
95
+
96
+ // Usage in a form
97
+ <schmancy-form @submit=${handleSubmit}>
98
+ <schmancy-input name="name" label="Name" required></schmancy-input>
99
+
100
+ <schmancy-checkbox
101
+ name="subscribe"
102
+ label="Subscribe to newsletter"
103
+ value="yes">
104
+ </schmancy-checkbox>
105
+
106
+ <schmancy-button type="submit">Submit</schmancy-button>
107
+ </schmancy-form>
108
+ ```