@mhmo91/schmancy 0.9.4 → 0.9.5

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 (217) hide show
  1. package/.claude-plugin/plugin.json +13 -0
  2. package/README.md +14 -4
  3. package/dist/.claude-plugin/plugin.json +13 -0
  4. package/dist/skills/SKILL.md +120 -0
  5. package/dist/skills/schmancy/SKILL.md +120 -0
  6. package/package.json +3 -3
  7. package/skills/schmancy/INDEX.md +72 -0
  8. package/skills/schmancy/SKILL.md +120 -0
  9. package/skills/schmancy/animation.md +64 -0
  10. package/skills/schmancy/area.md +141 -0
  11. package/skills/schmancy/audio.md +69 -0
  12. package/skills/schmancy/autocomplete.md +53 -0
  13. package/skills/schmancy/avatar.md +47 -0
  14. package/skills/schmancy/badge.md +41 -0
  15. package/skills/schmancy/boat.md +47 -0
  16. package/skills/schmancy/busy.md +36 -0
  17. package/skills/schmancy/button.md +59 -0
  18. package/skills/schmancy/card.md +53 -0
  19. package/skills/schmancy/charts.md +93 -0
  20. package/skills/schmancy/checkbox.md +36 -0
  21. package/skills/schmancy/chips.md +87 -0
  22. package/skills/schmancy/code-highlight.md +47 -0
  23. package/skills/schmancy/connectivity.md +36 -0
  24. package/skills/schmancy/content-drawer.md +65 -0
  25. package/skills/schmancy/date-range-inline.md +44 -0
  26. package/skills/schmancy/date-range.md +50 -0
  27. package/skills/schmancy/delay.md +50 -0
  28. package/skills/schmancy/details.md +66 -0
  29. package/skills/schmancy/dialog.md +69 -0
  30. package/skills/schmancy/directives.md +298 -0
  31. package/skills/schmancy/discovery.md +67 -0
  32. package/skills/schmancy/divider.md +31 -0
  33. package/skills/schmancy/dropdown.md +47 -0
  34. package/skills/schmancy/expand.md +63 -0
  35. package/skills/schmancy/extra.md +59 -0
  36. package/skills/schmancy/float.md +14 -0
  37. package/skills/schmancy/form.md +49 -0
  38. package/skills/schmancy/icons.md +44 -0
  39. package/skills/schmancy/iframe.md +44 -0
  40. package/skills/schmancy/input.md +56 -0
  41. package/skills/schmancy/json.md +33 -0
  42. package/skills/schmancy/layout.md +63 -0
  43. package/skills/schmancy/lightbox.md +36 -0
  44. package/skills/schmancy/list.md +67 -0
  45. package/skills/schmancy/mailbox.md +102 -0
  46. package/skills/schmancy/map.md +55 -0
  47. package/skills/schmancy/menu.md +39 -0
  48. package/skills/schmancy/mixins.md +99 -0
  49. package/skills/schmancy/nav-drawer.md +52 -0
  50. package/skills/schmancy/navigation-bar.md +48 -0
  51. package/skills/schmancy/navigation-rail.md +62 -0
  52. package/skills/schmancy/notification.md +60 -0
  53. package/skills/schmancy/option.md +43 -0
  54. package/skills/schmancy/page.md +42 -0
  55. package/skills/schmancy/progress.md +30 -0
  56. package/skills/schmancy/qr-scanner.md +51 -0
  57. package/skills/schmancy/radio-group.md +50 -0
  58. package/skills/schmancy/range.md +47 -0
  59. package/skills/schmancy/rxjs-utils.md +60 -0
  60. package/skills/schmancy/select.md +49 -0
  61. package/skills/schmancy/sheet.md +76 -0
  62. package/skills/schmancy/slider.md +43 -0
  63. package/skills/schmancy/steps.md +53 -0
  64. package/skills/schmancy/store.md +126 -0
  65. package/skills/schmancy/surface.md +86 -0
  66. package/skills/schmancy/table.md +60 -0
  67. package/skills/schmancy/tabs.md +49 -0
  68. package/skills/schmancy/teleport.md +55 -0
  69. package/skills/schmancy/textarea.md +48 -0
  70. package/skills/schmancy/theme-button.md +26 -0
  71. package/skills/schmancy/theme.md +58 -0
  72. package/skills/schmancy/tooltip.md +38 -0
  73. package/skills/schmancy/tree.md +53 -0
  74. package/skills/schmancy/typewriter.md +46 -0
  75. package/skills/schmancy/typography.md +53 -0
  76. package/skills/schmancy/utils.md +95 -0
  77. package/skills/schmancy/window.md +67 -0
  78. /package/{ai → dist/skills}/INDEX.md +0 -0
  79. /package/{ai → dist/skills}/animation.md +0 -0
  80. /package/{ai → dist/skills}/area.md +0 -0
  81. /package/{ai → dist/skills}/audio.md +0 -0
  82. /package/{ai → dist/skills}/autocomplete.md +0 -0
  83. /package/{ai → dist/skills}/avatar.md +0 -0
  84. /package/{ai → dist/skills}/badge.md +0 -0
  85. /package/{ai → dist/skills}/boat.md +0 -0
  86. /package/{ai → dist/skills}/busy.md +0 -0
  87. /package/{ai → dist/skills}/button.md +0 -0
  88. /package/{ai → dist/skills}/card.md +0 -0
  89. /package/{ai → dist/skills}/charts.md +0 -0
  90. /package/{ai → dist/skills}/checkbox.md +0 -0
  91. /package/{ai → dist/skills}/chips.md +0 -0
  92. /package/{ai → dist/skills}/code-highlight.md +0 -0
  93. /package/{ai → dist/skills}/connectivity.md +0 -0
  94. /package/{ai → dist/skills}/content-drawer.md +0 -0
  95. /package/{ai → dist/skills}/date-range-inline.md +0 -0
  96. /package/{ai → dist/skills}/date-range.md +0 -0
  97. /package/{ai → dist/skills}/delay.md +0 -0
  98. /package/{ai → dist/skills}/details.md +0 -0
  99. /package/{ai → dist/skills}/dialog.md +0 -0
  100. /package/{ai → dist/skills}/directives.md +0 -0
  101. /package/{ai → dist/skills}/discovery.md +0 -0
  102. /package/{ai → dist/skills}/divider.md +0 -0
  103. /package/{ai → dist/skills}/dropdown.md +0 -0
  104. /package/{ai → dist/skills}/expand.md +0 -0
  105. /package/{ai → dist/skills}/extra.md +0 -0
  106. /package/{ai → dist/skills}/float.md +0 -0
  107. /package/{ai → dist/skills}/form.md +0 -0
  108. /package/{ai → dist/skills}/icons.md +0 -0
  109. /package/{ai → dist/skills}/iframe.md +0 -0
  110. /package/{ai → dist/skills}/input.md +0 -0
  111. /package/{ai → dist/skills}/json.md +0 -0
  112. /package/{ai → dist/skills}/layout.md +0 -0
  113. /package/{ai → dist/skills}/lightbox.md +0 -0
  114. /package/{ai → dist/skills}/list.md +0 -0
  115. /package/{ai → dist/skills}/mailbox.md +0 -0
  116. /package/{ai → dist/skills}/map.md +0 -0
  117. /package/{ai → dist/skills}/menu.md +0 -0
  118. /package/{ai → dist/skills}/mixins.md +0 -0
  119. /package/{ai → dist/skills}/nav-drawer.md +0 -0
  120. /package/{ai → dist/skills}/navigation-bar.md +0 -0
  121. /package/{ai → dist/skills}/navigation-rail.md +0 -0
  122. /package/{ai → dist/skills}/notification.md +0 -0
  123. /package/{ai → dist/skills}/option.md +0 -0
  124. /package/{ai → dist/skills}/page.md +0 -0
  125. /package/{ai → dist/skills}/progress.md +0 -0
  126. /package/{ai → dist/skills}/qr-scanner.md +0 -0
  127. /package/{ai → dist/skills}/radio-group.md +0 -0
  128. /package/{ai → dist/skills}/range.md +0 -0
  129. /package/{ai → dist/skills}/rxjs-utils.md +0 -0
  130. /package/dist/{ai → skills/schmancy}/INDEX.md +0 -0
  131. /package/dist/{ai → skills/schmancy}/animation.md +0 -0
  132. /package/dist/{ai → skills/schmancy}/area.md +0 -0
  133. /package/dist/{ai → skills/schmancy}/audio.md +0 -0
  134. /package/dist/{ai → skills/schmancy}/autocomplete.md +0 -0
  135. /package/dist/{ai → skills/schmancy}/avatar.md +0 -0
  136. /package/dist/{ai → skills/schmancy}/badge.md +0 -0
  137. /package/dist/{ai → skills/schmancy}/boat.md +0 -0
  138. /package/dist/{ai → skills/schmancy}/busy.md +0 -0
  139. /package/dist/{ai → skills/schmancy}/button.md +0 -0
  140. /package/dist/{ai → skills/schmancy}/card.md +0 -0
  141. /package/dist/{ai → skills/schmancy}/charts.md +0 -0
  142. /package/dist/{ai → skills/schmancy}/checkbox.md +0 -0
  143. /package/dist/{ai → skills/schmancy}/chips.md +0 -0
  144. /package/dist/{ai → skills/schmancy}/code-highlight.md +0 -0
  145. /package/dist/{ai → skills/schmancy}/connectivity.md +0 -0
  146. /package/dist/{ai → skills/schmancy}/content-drawer.md +0 -0
  147. /package/dist/{ai → skills/schmancy}/date-range-inline.md +0 -0
  148. /package/dist/{ai → skills/schmancy}/date-range.md +0 -0
  149. /package/dist/{ai → skills/schmancy}/delay.md +0 -0
  150. /package/dist/{ai → skills/schmancy}/details.md +0 -0
  151. /package/dist/{ai → skills/schmancy}/dialog.md +0 -0
  152. /package/dist/{ai → skills/schmancy}/directives.md +0 -0
  153. /package/dist/{ai → skills/schmancy}/discovery.md +0 -0
  154. /package/dist/{ai → skills/schmancy}/divider.md +0 -0
  155. /package/dist/{ai → skills/schmancy}/dropdown.md +0 -0
  156. /package/dist/{ai → skills/schmancy}/expand.md +0 -0
  157. /package/dist/{ai → skills/schmancy}/extra.md +0 -0
  158. /package/dist/{ai → skills/schmancy}/float.md +0 -0
  159. /package/dist/{ai → skills/schmancy}/form.md +0 -0
  160. /package/dist/{ai → skills/schmancy}/icons.md +0 -0
  161. /package/dist/{ai → skills/schmancy}/iframe.md +0 -0
  162. /package/dist/{ai → skills/schmancy}/input.md +0 -0
  163. /package/dist/{ai → skills/schmancy}/json.md +0 -0
  164. /package/dist/{ai → skills/schmancy}/layout.md +0 -0
  165. /package/dist/{ai → skills/schmancy}/lightbox.md +0 -0
  166. /package/dist/{ai → skills/schmancy}/list.md +0 -0
  167. /package/dist/{ai → skills/schmancy}/mailbox.md +0 -0
  168. /package/dist/{ai → skills/schmancy}/map.md +0 -0
  169. /package/dist/{ai → skills/schmancy}/menu.md +0 -0
  170. /package/dist/{ai → skills/schmancy}/mixins.md +0 -0
  171. /package/dist/{ai → skills/schmancy}/nav-drawer.md +0 -0
  172. /package/dist/{ai → skills/schmancy}/navigation-bar.md +0 -0
  173. /package/dist/{ai → skills/schmancy}/navigation-rail.md +0 -0
  174. /package/dist/{ai → skills/schmancy}/notification.md +0 -0
  175. /package/dist/{ai → skills/schmancy}/option.md +0 -0
  176. /package/dist/{ai → skills/schmancy}/page.md +0 -0
  177. /package/dist/{ai → skills/schmancy}/progress.md +0 -0
  178. /package/dist/{ai → skills/schmancy}/qr-scanner.md +0 -0
  179. /package/dist/{ai → skills/schmancy}/radio-group.md +0 -0
  180. /package/dist/{ai → skills/schmancy}/range.md +0 -0
  181. /package/dist/{ai → skills/schmancy}/rxjs-utils.md +0 -0
  182. /package/{ai → dist/skills/schmancy}/select.md +0 -0
  183. /package/{ai → dist/skills/schmancy}/sheet.md +0 -0
  184. /package/{ai → dist/skills/schmancy}/slider.md +0 -0
  185. /package/{ai → dist/skills/schmancy}/steps.md +0 -0
  186. /package/{ai → dist/skills/schmancy}/store.md +0 -0
  187. /package/{ai → dist/skills/schmancy}/surface.md +0 -0
  188. /package/{ai → dist/skills/schmancy}/table.md +0 -0
  189. /package/{ai → dist/skills/schmancy}/tabs.md +0 -0
  190. /package/{ai → dist/skills/schmancy}/teleport.md +0 -0
  191. /package/{ai → dist/skills/schmancy}/textarea.md +0 -0
  192. /package/{ai → dist/skills/schmancy}/theme-button.md +0 -0
  193. /package/{ai → dist/skills/schmancy}/theme.md +0 -0
  194. /package/{ai → dist/skills/schmancy}/tooltip.md +0 -0
  195. /package/{ai → dist/skills/schmancy}/tree.md +0 -0
  196. /package/{ai → dist/skills/schmancy}/typewriter.md +0 -0
  197. /package/{ai → dist/skills/schmancy}/typography.md +0 -0
  198. /package/{ai → dist/skills/schmancy}/utils.md +0 -0
  199. /package/{ai → dist/skills/schmancy}/window.md +0 -0
  200. /package/dist/{ai → skills}/select.md +0 -0
  201. /package/dist/{ai → skills}/sheet.md +0 -0
  202. /package/dist/{ai → skills}/slider.md +0 -0
  203. /package/dist/{ai → skills}/steps.md +0 -0
  204. /package/dist/{ai → skills}/store.md +0 -0
  205. /package/dist/{ai → skills}/surface.md +0 -0
  206. /package/dist/{ai → skills}/table.md +0 -0
  207. /package/dist/{ai → skills}/tabs.md +0 -0
  208. /package/dist/{ai → skills}/teleport.md +0 -0
  209. /package/dist/{ai → skills}/textarea.md +0 -0
  210. /package/dist/{ai → skills}/theme-button.md +0 -0
  211. /package/dist/{ai → skills}/theme.md +0 -0
  212. /package/dist/{ai → skills}/tooltip.md +0 -0
  213. /package/dist/{ai → skills}/tree.md +0 -0
  214. /package/dist/{ai → skills}/typewriter.md +0 -0
  215. /package/dist/{ai → skills}/typography.md +0 -0
  216. /package/dist/{ai → skills}/utils.md +0 -0
  217. /package/dist/{ai → skills}/window.md +0 -0
@@ -0,0 +1,87 @@
1
+ # Chips
2
+
3
+ > Four chip types: filter (toggleable), input (removable), suggestion (action), assist (action + elevated). Filter chips have embedded `magnetic` directive and selection glow.
4
+
5
+ ## Chip Types
6
+
7
+ | Element | Purpose | Selected state | Default elevated |
8
+ |---------|---------|---------------|-----------------|
9
+ | `schmancy-filter-chip` | Toggle filters on/off | Yes (persists) | No |
10
+ | `schmancy-input-chip` | Display user input, removable | No | No |
11
+ | `schmancy-suggestion-chip` | Contextual recommendations | No | No |
12
+ | `schmancy-assist-chip` | Prompt user actions | No | Yes |
13
+
14
+ ## Properties (schmancy-filter-chip)
15
+ | Property | Type | Default | Description |
16
+ |----------|------|---------|-------------|
17
+ | `value` | `string` | `''` | Unique identifier |
18
+ | `selected` | `boolean` | `false` | Toggle state |
19
+ | `removable` | `boolean` | `false` | Show remove button |
20
+ | `disabled` | `boolean` | `false` | Disabled state |
21
+ | `elevated` | `boolean` | `false` | Add shadow elevation |
22
+
23
+ ## Properties (schmancy-input-chip)
24
+ | Property | Type | Default | Description |
25
+ |----------|------|---------|-------------|
26
+ | `value` | `string` | `''` | Unique identifier |
27
+ | `icon` | `string` | `''` | Material icon name |
28
+ | `avatar` | `string` | `''` | Avatar image URL |
29
+ | `removable` | `boolean` | `true` | Show remove button |
30
+ | `disabled` | `boolean` | `false` | Disabled state |
31
+
32
+ ## Properties (schmancy-suggestion-chip / schmancy-assist-chip)
33
+ | Property | Type | Default | Description |
34
+ |----------|------|---------|-------------|
35
+ | `value` | `string` | `''` | Unique identifier |
36
+ | `icon` | `string` | `''` | Material icon name |
37
+ | `href` | `string` | `''` | Navigation URL |
38
+ | `target` | `string` | `''` | Link target |
39
+ | `disabled` | `boolean` | `false` | Disabled state |
40
+ | `elevated` | `boolean` | `false` (suggestion) / `true` (assist) | Shadow elevation |
41
+
42
+ ## Events
43
+ | Event | Chip types | Detail | Description |
44
+ |-------|-----------|--------|-------------|
45
+ | `change` | filter | `{ value, selected }` | Selection toggled |
46
+ | `remove` | filter, input | `{ value }` | Remove button clicked |
47
+ | `action` | suggestion, assist | `{ value }` | Chip clicked |
48
+
49
+ ## Physics
50
+ - **magnetic** directive on filter chips (strength: 2, radius: 40)
51
+ - Filter selected: secondary glow shadow (20% intensity)
52
+ - Hover: luminous glow shadow (primary, 15%)
53
+ - Active: spring press `scale(0.95)` with 100ms transition
54
+
55
+ ## Examples
56
+ ```html
57
+ <!-- Filter chips for categories -->
58
+ ${repeat(categories, c => c.id, c => html`
59
+ <schmancy-filter-chip
60
+ value=${c.id}
61
+ ?selected=${selectedIds.has(c.id)}
62
+ @change=${(e: CustomEvent) => this.toggleFilter(e.detail)}
63
+ >
64
+ ${c.name}
65
+ </schmancy-filter-chip>
66
+ `)}
67
+
68
+ <!-- Input chips for tags -->
69
+ ${repeat(tags, t => t, t => html`
70
+ <schmancy-input-chip
71
+ value=${t}
72
+ @remove=${(e: CustomEvent) => this.removeTag(e.detail.value)}
73
+ >
74
+ ${t}
75
+ </schmancy-input-chip>
76
+ `)}
77
+
78
+ <!-- Suggestion chips -->
79
+ <schmancy-suggestion-chip value="nearby" icon="location_on">
80
+ Nearby
81
+ </schmancy-suggestion-chip>
82
+
83
+ <!-- Assist chip with navigation -->
84
+ <schmancy-assist-chip value="calendar" icon="event" href="/calendar">
85
+ Open Calendar
86
+ </schmancy-assist-chip>
87
+ ```
@@ -0,0 +1,47 @@
1
+ # schmancy-code
2
+
3
+ > Syntax-highlighted code block with line numbers, copy button, and collapsible display.
4
+
5
+ ## Usage
6
+ ```html
7
+ <schmancy-code language="typescript" .code=${'const x = 42'}></schmancy-code>
8
+ ```
9
+
10
+ ## Properties
11
+ | Property | Type | Default | Description |
12
+ |----------|------|---------|-------------|
13
+ | code | string | `''` | Code content to highlight |
14
+ | language | string | `'javascript'` | Language for syntax highlighting |
15
+ | filename | string | `undefined` | Filename shown in header |
16
+ | lineNumbers | boolean | `false` | Show line numbers |
17
+ | copyButton | boolean | `true` | Show copy-to-clipboard button |
18
+ | highlightLines | string | `undefined` | Lines to highlight (e.g., `'1-3,5,7-9'`) |
19
+ | maxHeight | string | `undefined` | Max height before scrolling |
20
+
21
+ ## Supported Languages
22
+ javascript, typescript, html, xml, markdown, bash
23
+
24
+ ## Examples
25
+ ```html
26
+ <!-- TypeScript with line numbers and highlighted lines -->
27
+ <schmancy-code
28
+ language="typescript"
29
+ lineNumbers
30
+ highlightLines="2-3"
31
+ .code=${`import { html } from 'lit'
32
+ const greeting = 'Hello'
33
+ console.log(greeting)`}>
34
+ </schmancy-code>
35
+
36
+ <!-- Bash with filename -->
37
+ <schmancy-code language="bash" filename="install.sh"
38
+ .code=${'npm install @mhmo91/schmancy'}>
39
+ </schmancy-code>
40
+
41
+ <!-- With max height -->
42
+ <schmancy-code language="javascript" maxHeight="300px"
43
+ .code=${longCodeString}>
44
+ </schmancy-code>
45
+ ```
46
+
47
+ Renders inside a collapsible `schmancy-details` with a macOS-style header (colored dots + language label). Uses highlight.js with schmancy color tokens.
@@ -0,0 +1,36 @@
1
+ # schmancy-connectivity-status
2
+
3
+ > App-wide online/offline banner. Mount once near the root and forget it.
4
+
5
+ ## Usage
6
+ ```html
7
+ <!-- In your app shell -->
8
+ <schmancy-connectivity-status></schmancy-connectivity-status>
9
+ ```
10
+
11
+ ## Properties
12
+ None — it's entirely self-driven from `window` online/offline events.
13
+
14
+ ## Behavior
15
+ - Listens to `window` `online` / `offline` events via RxJS `merge`.
16
+ - `distinctUntilChanged` prevents duplicate banners.
17
+ - Animated slide-down banner with spring-style easing when state changes.
18
+ - Offline: error-colored banner with pulsing icon.
19
+ - Online (after offline): success-colored banner with bouncing icon, auto-dismisses after a short timer.
20
+ - Plays matching sounds from the `$sounds` audio service (skipped on initial load).
21
+ - Respects `prefers-reduced-motion` implicitly via CSS.
22
+
23
+ ## Setup
24
+ Place it once at the root — typically just inside your main `schmancy-theme` or app shell:
25
+
26
+ ```html
27
+ <schmancy-theme>
28
+ <schmancy-connectivity-status></schmancy-connectivity-status>
29
+ <schmancy-page>
30
+ <!-- rest of app -->
31
+ </schmancy-page>
32
+ </schmancy-theme>
33
+ ```
34
+
35
+ ## See Also
36
+ - [audio.md](./audio.md) — the `$sounds` service used for feedback tones.
@@ -0,0 +1,65 @@
1
+ # schmancy-content-drawer
2
+
3
+ > Responsive content drawer that switches between side panel (push) and bottom sheet (overlay) based on viewport.
4
+
5
+ ## Usage
6
+ ```html
7
+ <schmancy-content-drawer>
8
+ <schmancy-content-drawer-main>
9
+ <!-- Primary content -->
10
+ </schmancy-content-drawer-main>
11
+ <schmancy-content-drawer-sheet>
12
+ <div slot="placeholder">Select an item</div>
13
+ </schmancy-content-drawer-sheet>
14
+ </schmancy-content-drawer>
15
+ ```
16
+
17
+ ## Properties (schmancy-content-drawer)
18
+ | Property | Type | Default | Description |
19
+ |----------|------|---------|-------------|
20
+ | open | `'open'\|'close'` | auto | Sheet state |
21
+
22
+ ## Properties (schmancy-content-drawer-main)
23
+ | Property | Type | Default | Description |
24
+ |----------|------|---------|-------------|
25
+ | minWidth | number | `360` | Minimum width in pixels |
26
+
27
+ ## Properties (schmancy-content-drawer-sheet)
28
+ | Property | Type | Default | Description |
29
+ |----------|------|---------|-------------|
30
+ | minWidth | number | `576` | Minimum width in pixels |
31
+
32
+ ## Rendering Content to Sheet
33
+ ```typescript
34
+ // Dispatch event to render component in the sheet
35
+ window.dispatchEvent(new CustomEvent('schmancy-content-drawer-render', {
36
+ detail: {
37
+ component: myElement,
38
+ state: {},
39
+ params: {},
40
+ props: {}
41
+ }
42
+ }))
43
+ ```
44
+
45
+ ## Behavior
46
+ - When `main.minWidth + sheet.minWidth <= viewport`: push mode (side-by-side)
47
+ - When viewport is smaller: overlay mode (bottom sheet)
48
+ - Sheet content is routed via an internal `schmancy-area`
49
+
50
+ ## Examples
51
+ ```html
52
+ <schmancy-content-drawer>
53
+ <schmancy-content-drawer-main minWidth="400">
54
+ <div class="p-4">
55
+ <h2>List View</h2>
56
+ <!-- List items that open detail in sheet -->
57
+ </div>
58
+ </schmancy-content-drawer-main>
59
+ <schmancy-content-drawer-sheet minWidth="500">
60
+ <div slot="placeholder">
61
+ <p>Select an item to view details</p>
62
+ </div>
63
+ </schmancy-content-drawer-sheet>
64
+ </schmancy-content-drawer>
65
+ ```
@@ -0,0 +1,44 @@
1
+ # schmancy-date-range-inline
2
+
3
+ > Smart inline from/to date picker with validation, auto-correction, and gap constraints. Simpler surface than the full `schmancy-date-range` popover.
4
+
5
+ ## Usage
6
+ ```html
7
+ <schmancy-date-range-inline
8
+ .dateFrom=${{ label: 'Check-in', value: '2026-05-01' }}
9
+ .dateTo=${{ label: 'Check-out', value: '2026-05-05' }}
10
+ min-date="2026-01-01"
11
+ max-date="2026-12-31"
12
+ .minGap=${1}
13
+ .maxGap=${30}
14
+ @change=${e => this.handleRange(e.detail)}
15
+ ></schmancy-date-range-inline>
16
+ ```
17
+
18
+ ## Properties
19
+ | Property | Type | Default | Description |
20
+ |----------|------|---------|-------------|
21
+ | `type` | `'date' \| 'datetime-local'` | `'date'` | Underlying input type |
22
+ | `dateFrom` | `{ label, value }` | `{ label: 'From', value: '' }` | From-date configuration |
23
+ | `dateTo` | `{ label, value }` | `{ label: 'To', value: '' }` | To-date configuration |
24
+ | `minDate` | string | — | Minimum selectable date (ISO string) |
25
+ | `maxDate` | string | — | Maximum selectable date (ISO string) |
26
+ | `compact` | boolean | `false` | Tighter UI spacing |
27
+ | `autoCorrect` | boolean | `true` | Auto-fix invalid ranges (e.g. swap if from > to) |
28
+ | `minGap` | number | `0` | Minimum days between from and to |
29
+ | `maxGap` | number | — | Maximum days between from and to |
30
+ | `defaultGap` | number | `1` | Default gap when seeding the second date |
31
+ | `allowSameDate` | boolean | `false` | Permit from === to |
32
+
33
+ ## Events
34
+ | Event | Detail | When |
35
+ |-------|--------|------|
36
+ | `change` | `{ dateFrom, dateTo, isValid }` | Either input changes |
37
+
38
+ ## Behavior
39
+ - Extends `SchmancyFormField()` — integrates with `schmancy-form` validation.
40
+ - Auto-correction: invalid ranges flip, or the second date shifts to respect `minGap`/`maxGap`.
41
+ - Inline (not a popover) — always visible, good for filters and trip-planning UIs.
42
+
43
+ ## Prefer full picker
44
+ For a popup calendar with presets and visual selection, use [`schmancy-date-range`](./date-range.md).
@@ -0,0 +1,50 @@
1
+ # schmancy-date-range
2
+
3
+ > Date range selector with preset ranges, step navigation, and mobile sheet support.
4
+
5
+ ## Usage
6
+ ```html
7
+ <schmancy-date-range
8
+ .dateFrom=${{label: 'From', value: '2024-01-01'}}
9
+ .dateTo=${{label: 'To', value: '2024-12-31'}}
10
+ @change=${(e) => handleRange(e.detail)}>
11
+ </schmancy-date-range>
12
+ ```
13
+
14
+ ## Properties
15
+ | Property | Type | Default | Description |
16
+ |----------|------|---------|-------------|
17
+ | type | `'date'\|'datetime-local'` | `'date'` | Date input type |
18
+ | dateFrom | `{label: string, value: string}` | `{label:'From',value:''}` | Start date |
19
+ | dateTo | `{label: string, value: string}` | `{label:'To',value:''}` | End date |
20
+ | minDate | string | `undefined` | Minimum selectable date |
21
+ | maxDate | string | `undefined` | Maximum selectable date |
22
+ | step | `'day'\|'week'\|'month'\|'year'\|number` | `undefined` | Navigation step size |
23
+ | placeholder | string | `'Select date range'` | Display placeholder |
24
+ | disabled | boolean | `false` | Whether disabled |
25
+ | required | boolean | `false` | Whether required |
26
+ | clearable | boolean | `true` | Allow clearing selection |
27
+ | collapse | boolean | `false` | Icon-only on mobile |
28
+ | customPresets | array | `[]` | Additional preset ranges |
29
+ | format | string | auto | Date format string |
30
+
31
+ ## Events
32
+ | Event | Detail | Description |
33
+ |-------|--------|-------------|
34
+ | change | `{ dateFrom: string, dateTo: string }` | When date range changes |
35
+
36
+ ## Examples
37
+ ```html
38
+ <!-- With step navigation (arrows shift by week) -->
39
+ <schmancy-date-range step="week"
40
+ .dateFrom=${{label:'From', value:'2024-03-01'}}
41
+ .dateTo=${{label:'To', value:'2024-03-07'}}>
42
+ </schmancy-date-range>
43
+
44
+ <!-- Collapsed on mobile, custom presets -->
45
+ <schmancy-date-range collapse
46
+ .customPresets=${[{label:'Q1',dateFrom:'2024-01-01',dateTo:'2024-03-31'}]}>
47
+ </schmancy-date-range>
48
+ ```
49
+
50
+ Built-in presets include Today, Yesterday, This Week, This Month, This Year, and more.
@@ -0,0 +1,50 @@
1
+ # schmancy-delay
2
+
3
+ > Defers rendering of children by a duration, with an entrance motion. Siblings auto-stagger without manual delay math.
4
+
5
+ ## Usage
6
+ ```html
7
+ <schmancy-delay delay="200">
8
+ <h1>Appears after 200ms</h1>
9
+ </schmancy-delay>
10
+
11
+ <!-- Auto-staggered list: each child inherits + stacks its own delay -->
12
+ <schmancy-delay delay="100">
13
+ <schmancy-delay delay="100"><div>Step 1</div></schmancy-delay>
14
+ <schmancy-delay delay="100"><div>Step 2</div></schmancy-delay>
15
+ <schmancy-delay delay="100"><div>Step 3</div></schmancy-delay>
16
+ </schmancy-delay>
17
+ ```
18
+
19
+ ## Properties
20
+ | Property | Type | Default | Description |
21
+ |----------|------|---------|-------------|
22
+ | `delay` | number | `0` | Ms to wait before rendering this node |
23
+ | `motion` | `'flyBelow' \| 'flyAbove' \| 'fadeIn'` | `'flyBelow'` | `@lit-labs/motion` entrance animation |
24
+ | `once` | boolean | `true` | Skip delay on subsequent renders within the same session (keyed on content hash) |
25
+
26
+ ## Context
27
+ - Consumes parent `delayContext` and adds its own delay.
28
+ - Walks previous siblings that are also `schmancy-delay` and accumulates their delays.
29
+ - Provides the resulting `effectiveDelay` down to descendants via context.
30
+
31
+ Result: nested `schmancy-delay` nodes produce natural staggered entrances without manual math.
32
+
33
+ ## Session Caching
34
+ - When `once=true`, the content is hashed on first render and cached in `sessionStorage`.
35
+ - On subsequent component mounts (route revisits), the delay is skipped — content appears instantly.
36
+ - Set `once=false` to always replay the delay.
37
+
38
+ ## Example — hero reveal
39
+ ```html
40
+ <schmancy-delay delay="0" motion="fadeIn">
41
+ <schmancy-delay delay="300"><h1>Welcome</h1></schmancy-delay>
42
+ <schmancy-delay delay="200"><p>Subtitle…</p></schmancy-delay>
43
+ <schmancy-delay delay="200">
44
+ <schmancy-button variant="filled">Get started</schmancy-button>
45
+ </schmancy-delay>
46
+ </schmancy-delay>
47
+ ```
48
+
49
+ ## See Also
50
+ - Use [`gravity`](./directives.md#gravity--elements-fall-into-place-with-mass-based-bounce) directive for mass-based staggered reveal on lists — often simpler than nested `schmancy-delay`.
@@ -0,0 +1,66 @@
1
+ # schmancy-details
2
+
3
+ > Expandable disclosure with spring-animated indicator, magnetic summary, and CSS grid collapse animation.
4
+
5
+ ## Usage
6
+ ```html
7
+ <schmancy-details summary="Show more">
8
+ <p>Expandable content here</p>
9
+ </schmancy-details>
10
+ ```
11
+
12
+ ## Properties
13
+ | Property | Type | Default | Description |
14
+ |----------|------|---------|-------------|
15
+ | `summary` | `string` | `''` | Summary text (or use `summary` slot) |
16
+ | `open` | `boolean` | `false` | Expanded state |
17
+ | `type` | SurfaceMixin type | `'solid'` | Surface type for the container |
18
+ | `rounded` | SurfaceMixin rounded | `'all'` | Corner rounding |
19
+ | `locked` | `boolean` | `false` | Prevents open/close interaction |
20
+ | `overlay` | `boolean` | `false` | Content overlays below instead of pushing |
21
+ | `indicator-placement` | `'start' \| 'end'` | `'end'` | Chevron indicator position |
22
+ | `hide-indicator` | `boolean` | `false` | Hide the expand/collapse indicator |
23
+ | `indicator-rotate` | `number` | `90` | Indicator rotation degrees when open |
24
+ | `summary-padding` | `string` | `'p-3'` | Tailwind padding class for summary |
25
+ | `content-padding` | `string` | `'p-3'` | Tailwind padding class for content |
26
+
27
+ ## Events
28
+ | Event | Detail | Description |
29
+ |-------|--------|-------------|
30
+ | `toggle` | `{ open: boolean }` | Fired when open state changes |
31
+
32
+ ## Slots
33
+ | Slot | Description |
34
+ |------|-------------|
35
+ | (default) | Content revealed on expand |
36
+ | `summary` | Custom summary content (overrides `summary` prop) |
37
+ | `indicator` | Custom expand/collapse indicator |
38
+ | `actions` | Action buttons in the summary bar (click does not toggle) |
39
+ | `details` | Additional content slot |
40
+
41
+ ## Physics
42
+ - **magnetic** directive on summary (strength: 2, radius: 50) when not locked
43
+ - Spring-animated chevron indicator using Web Animations API
44
+ - CSS grid transition for smooth height animation (400ms spring easing)
45
+ - Luminous elevation glow when open
46
+ - Lazy rendering: content is not rendered until first opened
47
+
48
+ ## Examples
49
+ ```html
50
+ <!-- Basic expandable -->
51
+ <schmancy-details summary="Advanced Settings" indicator-placement="start">
52
+ <div>Settings content</div>
53
+ </schmancy-details>
54
+
55
+ <!-- Overlay mode (content floats over siblings) -->
56
+ <schmancy-details summary="Quick preview" overlay>
57
+ <div>Preview content overlays below</div>
58
+ </schmancy-details>
59
+
60
+ <!-- With custom summary and actions -->
61
+ <schmancy-details>
62
+ <span slot="summary">Custom title</span>
63
+ <schmancy-icon-button slot="actions" icon="edit"></schmancy-icon-button>
64
+ <div>Detail content</div>
65
+ </schmancy-details>
66
+ ```
@@ -0,0 +1,69 @@
1
+ # schmancy-dialog / $dialog
2
+
3
+ > Dialog with glass surface, cursorGlow, and mobile bottom-sheet adaptation. Use `$dialog` service for imperative usage.
4
+
5
+ ## Usage
6
+ ```typescript
7
+ import { $dialog } from '@mhmo91/schmancy'
8
+
9
+ // Confirm dialog
10
+ const confirmed = await $dialog.confirm({
11
+ title: 'Delete item?',
12
+ message: 'This cannot be undone.',
13
+ confirmText: 'Delete',
14
+ cancelText: 'Cancel',
15
+ variant: 'danger',
16
+ })
17
+
18
+ // Component dialog (renders any template/element)
19
+ await $dialog.component(html`<my-editor .data=${item}></my-editor>`)
20
+ ```
21
+
22
+ ## $dialog API
23
+ | Method | Returns | Description |
24
+ |--------|---------|-------------|
25
+ | `confirm(options)` | `Promise<boolean>` | Show confirm dialog with title/message/buttons |
26
+ | `ask(message, event?)` | `Promise<boolean>` | Quick confirm with just a message |
27
+ | `danger(options)` | `Promise<boolean>` | Confirm with danger variant |
28
+ | `component(content, options?)` | `Promise<boolean>` | Show any template/element as dialog |
29
+ | `prompt(options)` | `Promise<string \| null>` | Input dialog, returns value or null |
30
+ | `dismiss()` | `boolean` | Dismiss topmost dialog |
31
+
32
+ ## Confirm Options
33
+ | Option | Type | Default | Description |
34
+ |--------|------|---------|-------------|
35
+ | `title` | `string` | `undefined` | Dialog title |
36
+ | `subtitle` | `string` | `undefined` | Subtitle below title |
37
+ | `message` | `string` | `undefined` | Body message |
38
+ | `confirmText` | `string` | `'Confirm'` | Confirm button label |
39
+ | `cancelText` | `string` | `'Cancel'` | Cancel button label |
40
+ | `variant` | `'default' \| 'danger'` | `'default'` | Button color scheme |
41
+ | `position` | `{x,y} \| MouseEvent` | Last click | Animation origin |
42
+ | `content` | `TemplateResult \| HTMLElement` | `undefined` | Custom content in body |
43
+
44
+ ## Physics
45
+ - **cursorGlow** on dialog surface (radius: 250, intensity: 0.1)
46
+ - Glass surface with `backdrop-blur-lg` and `backdrop-saturate-150`
47
+ - Luminous glow shadow around dialog container
48
+ - Mobile: renders as bottom sheet with drag handle and swipe dismiss
49
+
50
+ ## Examples
51
+ ```typescript
52
+ // Quick ask
53
+ if (await $dialog.ask('Remove this entry?', event)) {
54
+ removeEntry()
55
+ }
56
+
57
+ // Prompt for input
58
+ const name = await $dialog.prompt({
59
+ title: 'Rename',
60
+ label: 'New name',
61
+ defaultValue: currentName,
62
+ })
63
+
64
+ // Custom component dialog
65
+ await $dialog.component(
66
+ html`<user-profile-editor .user=${user}></user-profile-editor>`,
67
+ { position: event }
68
+ )
69
+ ```