@supersoniks/concorde 5.0.3 → 5.0.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 (151) hide show
  1. package/.agents/skills/concorde-component-docs/SKILL.md +194 -0
  2. package/.agents/skills/concorde-component-docs/template.md +45 -0
  3. package/ai/cursor/rules/concorde-theme.mdc +1 -1
  4. package/ai/cursor/rules/concorde.mdc +1 -1
  5. package/ai/skills/concorde/SKILL.md +1 -1
  6. package/ai/skills/concorde-theme/SKILL.md +21 -10
  7. package/build-infos.json +1 -1
  8. package/concorde-core.bundle.js +515 -521
  9. package/concorde-core.es.js +5151 -5056
  10. package/dist/concorde-core.bundle.js +515 -521
  11. package/dist/concorde-core.es.js +5151 -5056
  12. package/dist/docs-mock-api-sw.js +2 -0
  13. package/dist/docs-mock-api-sw.js.map +2 -2
  14. package/docs/assets/index-CD4WyL6o.css +1 -0
  15. package/docs/assets/{index-BnK6OS7w.js → index-wVZpLVYW.js} +815 -808
  16. package/docs/crawl/core/components/ui/alert/alert.html +76 -5
  17. package/docs/crawl/core/components/ui/alert-messages/alert-messages.html +113 -5
  18. package/docs/crawl/core/components/ui/badge/badge.html +57 -8
  19. package/docs/crawl/core/components/ui/captcha/captcha.html +90 -8
  20. package/docs/crawl/core/components/ui/card/card.html +122 -12
  21. package/docs/crawl/core/components/ui/divider/divider.html +117 -31
  22. package/docs/crawl/core/components/ui/form/fieldset/fieldset.html +232 -101
  23. package/docs/crawl/core/components/ui/form/form-actions/form-actions.html +95 -52
  24. package/docs/crawl/core/components/ui/form/form-layout/form-layout.html +97 -38
  25. package/docs/crawl/core/components/ui/group/group.html +60 -38
  26. package/docs/crawl/core/components/ui/icon/icon.html +136 -47
  27. package/docs/crawl/core/components/ui/image/image.html +118 -6
  28. package/docs/crawl/core/components/ui/link/link.html +65 -7
  29. package/docs/crawl/core/components/ui/loader/loader.html +97 -23
  30. package/docs/crawl/core/components/ui/menu/menu.html +162 -90
  31. package/docs/crawl/core/components/ui/modal/modal.html +275 -50
  32. package/docs/crawl/core/components/ui/pop/pop.html +242 -124
  33. package/docs/crawl/core/components/ui/progress/progress.html +103 -30
  34. package/docs/crawl/core/components/ui/table/table.html +303 -171
  35. package/docs/crawl/core/components/ui/theme/theme.html +131 -0
  36. package/docs/crawl/core/components/ui/toast/toast.html +170 -59
  37. package/docs/crawl/core/components/ui/tooltip/tooltip.html +90 -29
  38. package/docs/crawl/docs/_decorators/ancestor-attribute.html +3 -2
  39. package/docs/crawl/docs/_getting-started/start.html +1 -1
  40. package/docs/crawl/docs/_getting-started/theming.html +311 -63
  41. package/docs/crawl/hubs/form-components.html +71 -49
  42. package/docs/crawl/index.html +7 -6
  43. package/docs/docs-mock-api-sw.js +2 -0
  44. package/docs/docs-mock-api-sw.js.map +2 -2
  45. package/docs/index.html +6 -4
  46. package/docs/llms-full.txt +1468 -405
  47. package/docs/llms.txt +23 -30
  48. package/docs/sitemap.xml +3 -0
  49. package/docs/src/core/components/ui/alert/alert.md +21 -2
  50. package/docs/src/core/components/ui/alert-messages/alert-messages.md +85 -0
  51. package/docs/src/core/components/ui/badge/badge.md +19 -6
  52. package/docs/src/core/components/ui/captcha/captcha.md +65 -6
  53. package/docs/src/core/components/ui/card/card.md +73 -10
  54. package/docs/src/core/components/ui/divider/divider.md +107 -13
  55. package/docs/src/core/components/ui/form/fieldset/fieldset.md +175 -99
  56. package/docs/src/core/components/ui/form/form-actions/form-actions.md +75 -52
  57. package/docs/src/core/components/ui/form/form-layout/form-layout.md +109 -34
  58. package/docs/src/core/components/ui/group/group.md +36 -36
  59. package/docs/src/core/components/ui/icon/icon.md +132 -43
  60. package/docs/src/core/components/ui/image/image.md +35 -3
  61. package/docs/src/core/components/ui/link/link.md +43 -5
  62. package/docs/src/core/components/ui/loader/loader.md +79 -22
  63. package/docs/src/core/components/ui/menu/menu.md +133 -92
  64. package/docs/src/core/components/ui/modal/modal.md +163 -47
  65. package/docs/src/core/components/ui/pop/pop.md +217 -123
  66. package/docs/src/core/components/ui/progress/progress.md +76 -30
  67. package/docs/src/core/components/ui/table/table.md +147 -171
  68. package/docs/src/core/components/ui/theme/theme.md +122 -0
  69. package/docs/src/core/components/ui/toast/toast.md +108 -58
  70. package/docs/src/core/components/ui/tooltip/tooltip.md +68 -26
  71. package/docs/src/docs/_decorators/ancestor-attribute.md +3 -2
  72. package/docs/src/docs/_getting-started/start.md +1 -1
  73. package/docs/src/docs/_getting-started/theming.md +223 -61
  74. package/docs/src/docs/search/docs-search.json +2504 -399
  75. package/docs/src/tsconfig.json +18 -0
  76. package/index.html +4 -2
  77. package/package.json +7 -1
  78. package/public/docs-mock-api-sw.js +2 -0
  79. package/public/docs-mock-api-sw.js.map +2 -2
  80. package/src/core/components/ui/_css/align.ts +1 -0
  81. package/src/core/components/ui/_css/type.ts +86 -8
  82. package/src/core/components/ui/_i18n/ui-aria-labels.ts +8 -0
  83. package/src/core/components/ui/alert/alert.md +21 -2
  84. package/src/core/components/ui/alert-messages/alert-messages.md +85 -0
  85. package/src/core/components/ui/badge/badge.md +19 -6
  86. package/src/core/components/ui/badge/badge.ts +8 -9
  87. package/src/core/components/ui/button/button.ts +5 -15
  88. package/src/core/components/ui/captcha/captcha.md +65 -6
  89. package/src/core/components/ui/card/card.md +73 -10
  90. package/src/core/components/ui/card/card.ts +24 -22
  91. package/src/core/components/ui/divider/divider.md +107 -13
  92. package/src/core/components/ui/divider/divider.ts +40 -33
  93. package/src/core/components/ui/form/fieldset/fieldset.md +175 -99
  94. package/src/core/components/ui/form/fieldset/fieldset.ts +15 -28
  95. package/src/core/components/ui/form/fieldset/legend.ts +13 -13
  96. package/src/core/components/ui/form/form-actions/form-actions.md +75 -52
  97. package/src/core/components/ui/form/form-actions/form-actions.ts +7 -5
  98. package/src/core/components/ui/form/form-layout/form-layout.md +109 -34
  99. package/src/core/components/ui/form/form-layout/form-layout.ts +27 -24
  100. package/src/core/components/ui/form/textarea/textarea.ts +4 -3
  101. package/src/core/components/ui/group/group.md +36 -36
  102. package/src/core/components/ui/group/group.ts +5 -10
  103. package/src/core/components/ui/icon/icon.md +132 -43
  104. package/src/core/components/ui/image/image.md +35 -3
  105. package/src/core/components/ui/link/link.md +43 -5
  106. package/src/core/components/ui/loader/loader.md +79 -22
  107. package/src/core/components/ui/loader/loader.ts +67 -27
  108. package/src/core/components/ui/loader/styles/fixed.ts +6 -11
  109. package/src/core/components/ui/menu/menu.md +133 -92
  110. package/src/core/components/ui/menu/menu.ts +53 -58
  111. package/src/core/components/ui/modal/modal.md +163 -47
  112. package/src/core/components/ui/modal/modal.ts +2 -4
  113. package/src/core/components/ui/pop/pop.md +217 -123
  114. package/src/core/components/ui/pop/pop.ts +0 -1
  115. package/src/core/components/ui/progress/progress.md +76 -30
  116. package/src/core/components/ui/progress/progress.ts +25 -56
  117. package/src/core/components/ui/table/table-caption.ts +2 -2
  118. package/src/core/components/ui/table/table-tbody.ts +3 -3
  119. package/src/core/components/ui/table/table-td.ts +23 -18
  120. package/src/core/components/ui/table/table-th.ts +8 -8
  121. package/src/core/components/ui/table/table-tr.ts +4 -4
  122. package/src/core/components/ui/table/table.md +147 -171
  123. package/src/core/components/ui/table/table.ts +20 -19
  124. package/src/core/components/ui/theme/theme-collection/auto.ts +15 -0
  125. package/src/core/components/ui/theme/theme-collection/core-variables.ts +8 -31
  126. package/src/core/components/ui/theme/theme-collection/dark.ts +1 -7
  127. package/src/core/components/ui/theme/theme-collection/light.ts +30 -26
  128. package/src/core/components/ui/theme/theme.md +122 -0
  129. package/src/core/components/ui/theme/theme.ts +30 -7
  130. package/src/core/components/ui/toast/toast-item.ts +6 -9
  131. package/src/core/components/ui/toast/toast.md +108 -58
  132. package/src/core/components/ui/toast/types.ts +1 -1
  133. package/src/core/components/ui/tooltip/tooltip.md +68 -26
  134. package/src/core/decorators/subscriber/ancestorAttribute.spec.ts +26 -0
  135. package/src/core/decorators/subscriber/ancestorAttribute.ts +3 -4
  136. package/src/core/utils/AncestorAttributeObserver.ts +183 -70
  137. package/src/docs/_decorators/ancestor-attribute.md +3 -2
  138. package/src/docs/_getting-started/start.md +1 -1
  139. package/src/docs/_getting-started/theming.md +223 -61
  140. package/src/docs/code.ts +125 -58
  141. package/src/docs/header/header.ts +62 -54
  142. package/src/docs/mock-api/router.ts +2 -0
  143. package/src/docs/navigation/navigation.ts +6 -3
  144. package/src/docs/search/docs-search.json +2504 -399
  145. package/src/docs/search/markdown-renderer.ts +6 -6
  146. package/src/docs/search/search.ts +4 -4
  147. package/src/docs/tailwind/css/tailwind.css +6 -5
  148. package/src/tsconfig.json +18 -0
  149. package/src/tsconfig.tsbuildinfo +1 -1
  150. package/tailwind.config.js +19 -0
  151. package/docs/assets/index--GpD7R7a.css +0 -1
@@ -1,104 +1,169 @@
1
1
  # Pop
2
2
 
3
- ## Placement
3
+ **`sonic-pop`** anchors floating panels to a trigger: put the control in the **default slot** and the panel in **`slot="content"`** (menus, forms, custom markup). Click toggles open/closed unless **`manual`** is set; default **`placement`** is **`bottom`** (start-aligned). Position updates while open and flips inside the viewport when space is tight.
4
+
5
+ ## Basic example
6
+
4
7
  <sonic-code>
5
8
  <template>
6
- <sonic-pop class="inline-block" placement="left">
7
- <sonic-button>Left</sonic-button>
8
- <sonic-menu slot="content">
9
- <sonic-menu-item><sonic-icon library="iconoir" name="bell-notification" slot="prefix"></sonic-icon>Notifications</sonic-menu-item>
10
- </sonic-menu>
11
- </sonic-pop>
12
- <sonic-pop class="inline-block" placement="right">
13
- <sonic-button>Right</sonic-button>
14
- <sonic-menu slot="content">
15
- <sonic-menu-item><sonic-icon library="iconoir" name="bell-notification" slot="prefix"></sonic-icon>Notifications</sonic-menu-item>
16
- </sonic-menu>
17
- </sonic-pop>
18
- <sonic-pop class="inline-block" placement="top">
19
- <sonic-button>Top</sonic-button>
20
- <sonic-menu slot="content">
21
- <sonic-menu-item><sonic-icon library="iconoir" name="bell-notification" slot="prefix"></sonic-icon>Notifications</sonic-menu-item>
22
- </sonic-menu>
23
- </sonic-pop>
24
- <sonic-pop class="inline-block" placement="bottom">
25
- <sonic-button>Bottom</sonic-button>
9
+ <sonic-pop class="inline-block">
10
+ <sonic-button>Notifications</sonic-button>
26
11
  <sonic-menu slot="content">
27
- <sonic-menu-item><sonic-icon library="iconoir" name="bell-notification" slot="prefix"></sonic-icon>Notifications</sonic-menu-item>
12
+ <sonic-menu-item>
13
+ <sonic-icon library="iconoir" name="bell-notification" slot="prefix"></sonic-icon>
14
+ Notifications
15
+ </sonic-menu-item>
16
+ <sonic-menu-item>
17
+ <sonic-icon library="iconoir" name="settings" slot="prefix"></sonic-icon>
18
+ Settings
19
+ </sonic-menu-item>
28
20
  </sonic-menu>
29
21
  </sonic-pop>
30
22
  </template>
31
23
  </sonic-code>
32
24
 
33
- Default placement is `bottom`. Placement is written `side-align`, like `sonic-tooltip`: `side` is `top`, `right`, `bottom` or `left`, `align` is `start`, `center` or `end`. Without `align`, content is aligned on the start of the trigger. If there is not enough room, content flips to the opposite side and stays inside the viewport.
25
+ ## Placement
34
26
 
35
- The former space syntax (`placement="bottom center"`) still works but is deprecated.
27
+ Use **`top`** · **`bottom`** · **`left`** · **`right`** for the main axis. Add **`-start`** · **`-center`** · **`-end`** to align along the trigger edge. With no align suffix, content aligns to **`start`**. Legacy space syntax (`placement="bottom center"`) still works but is deprecated—prefer **`bottom-center`**.
36
28
 
37
29
  <sonic-code>
38
30
  <template>
39
- <sonic-pop class="inline-block" placement="bottom-center">
40
- <sonic-button>Bottom center</sonic-button>
41
- <sonic-menu slot="content">
42
- <sonic-menu-item><sonic-icon library="iconoir" name="bell-notification" slot="prefix"></sonic-icon>Notifications</sonic-menu-item>
43
- </sonic-menu>
44
- </sonic-pop>
45
- <sonic-pop class="inline-block" placement="top-center">
46
- <sonic-button>Top center</sonic-button>
47
- <sonic-menu slot="content">
48
- <sonic-menu-item><sonic-icon library="iconoir" name="bell-notification" slot="prefix"></sonic-icon>Notifications</sonic-menu-item>
49
- </sonic-menu>
50
- </sonic-pop>
51
- <sonic-pop class="inline-block" placement="left-center">
52
- <sonic-button>Left center</sonic-button>
53
- <sonic-menu slot="content">
54
- <sonic-menu-item><sonic-icon library="iconoir" name="bell-notification" slot="prefix"></sonic-icon>Notifications</sonic-menu-item>
55
- </sonic-menu>
56
- </sonic-pop>
57
- <sonic-pop class="inline-block" placement="right-center">
58
- <sonic-button>Right center</sonic-button>
59
- <sonic-menu slot="content">
60
- <sonic-menu-item><sonic-icon library="iconoir" name="bell-notification" slot="prefix"></sonic-icon>Notifications</sonic-menu-item>
61
- </sonic-menu>
62
- </sonic-pop>
31
+ <div class="flex flex-wrap gap-2">
32
+ <sonic-pop class="inline-block" placement="left">
33
+ <sonic-button>Left</sonic-button>
34
+ <sonic-menu slot="content">
35
+ <sonic-menu-item>
36
+ <sonic-icon library="iconoir" name="bell-notification" slot="prefix"></sonic-icon>
37
+ Notifications
38
+ </sonic-menu-item>
39
+ </sonic-menu>
40
+ </sonic-pop>
41
+ <sonic-pop class="inline-block" placement="right">
42
+ <sonic-button>Right</sonic-button>
43
+ <sonic-menu slot="content">
44
+ <sonic-menu-item>
45
+ <sonic-icon library="iconoir" name="bell-notification" slot="prefix"></sonic-icon>
46
+ Notifications
47
+ </sonic-menu-item>
48
+ </sonic-menu>
49
+ </sonic-pop>
50
+ <sonic-pop class="inline-block" placement="top">
51
+ <sonic-button>Top</sonic-button>
52
+ <sonic-menu slot="content">
53
+ <sonic-menu-item>
54
+ <sonic-icon library="iconoir" name="bell-notification" slot="prefix"></sonic-icon>
55
+ Notifications
56
+ </sonic-menu-item>
57
+ </sonic-menu>
58
+ </sonic-pop>
59
+ <sonic-pop class="inline-block" placement="bottom">
60
+ <sonic-button>Bottom</sonic-button>
61
+ <sonic-menu slot="content">
62
+ <sonic-menu-item>
63
+ <sonic-icon library="iconoir" name="bell-notification" slot="prefix"></sonic-icon>
64
+ Notifications
65
+ </sonic-menu-item>
66
+ </sonic-menu>
67
+ </sonic-pop>
68
+ </div>
69
+ </template>
70
+ </sonic-code>
71
+
72
+ ### Center-aligned sides
73
+
74
+ <sonic-code>
75
+ <template>
76
+ <div class="flex flex-wrap gap-2">
77
+ <sonic-pop class="inline-block" placement="bottom-center">
78
+ <sonic-button>Bottom center</sonic-button>
79
+ <sonic-menu slot="content">
80
+ <sonic-menu-item>
81
+ <sonic-icon library="iconoir" name="bell-notification" slot="prefix"></sonic-icon>
82
+ Notifications
83
+ </sonic-menu-item>
84
+ </sonic-menu>
85
+ </sonic-pop>
86
+ <sonic-pop class="inline-block" placement="top-center">
87
+ <sonic-button>Top center</sonic-button>
88
+ <sonic-menu slot="content">
89
+ <sonic-menu-item>
90
+ <sonic-icon library="iconoir" name="bell-notification" slot="prefix"></sonic-icon>
91
+ Notifications
92
+ </sonic-menu-item>
93
+ </sonic-menu>
94
+ </sonic-pop>
95
+ <sonic-pop class="inline-block" placement="left-center">
96
+ <sonic-button>Left center</sonic-button>
97
+ <sonic-menu slot="content">
98
+ <sonic-menu-item>
99
+ <sonic-icon library="iconoir" name="bell-notification" slot="prefix"></sonic-icon>
100
+ Notifications
101
+ </sonic-menu-item>
102
+ </sonic-menu>
103
+ </sonic-pop>
104
+ <sonic-pop class="inline-block" placement="right-center">
105
+ <sonic-button>Right center</sonic-button>
106
+ <sonic-menu slot="content">
107
+ <sonic-menu-item>
108
+ <sonic-icon library="iconoir" name="bell-notification" slot="prefix"></sonic-icon>
109
+ Notifications
110
+ </sonic-menu-item>
111
+ </sonic-menu>
112
+ </sonic-pop>
113
+ </div>
63
114
  </template>
64
115
  </sonic-code>
65
116
 
66
117
  ## Shadow
67
118
 
68
- Default shadow is `lg`.
119
+ Default **`shadow`** is **`lg`**. The shadow applies to the floating **`content`** panel.
69
120
 
70
121
  <sonic-code>
71
122
  <template>
72
- <sonic-pop class="inline-block" shadow="none" placement='top' >
73
- <sonic-button>None</sonic-button>
74
- <sonic-menu slot="content">
75
- <sonic-menu-item><sonic-icon library="iconoir" name="bell-notification" slot="prefix"></sonic-icon>Notifications</sonic-menu-item>
76
- </sonic-menu>
77
- </sonic-pop>
78
- <sonic-pop class="inline-block" shadow="sm" placement='top'>
79
- <sonic-button>Small</sonic-button>
80
- <sonic-menu slot="content">
81
- <sonic-menu-item><sonic-icon library="iconoir" name="bell-notification" slot="prefix"></sonic-icon>Notifications</sonic-menu-item>
82
- </sonic-menu>
83
- </sonic-pop>
84
- <sonic-pop class="inline-block" shadow="md" placement='top'>
85
- <sonic-button>Medium</sonic-button>
86
- <sonic-menu slot="content">
87
- <sonic-menu-item><sonic-icon library="iconoir" name="bell-notification" slot="prefix"></sonic-icon>Notifications</sonic-menu-item>
88
- </sonic-menu>
89
- </sonic-pop>
90
- <sonic-pop class="inline-block" shadow="lg" placement='top'>
91
- <sonic-button>Large</sonic-button>
92
- <sonic-menu slot="content">
93
- <sonic-menu-item><sonic-icon library="iconoir" name="bell-notification" slot="prefix"></sonic-icon>Notifications</sonic-menu-item>
94
- </sonic-menu>
95
- </sonic-pop>
123
+ <div class="flex flex-wrap gap-2">
124
+ <sonic-pop class="inline-block" shadow="none" placement="top">
125
+ <sonic-button>None</sonic-button>
126
+ <sonic-menu slot="content">
127
+ <sonic-menu-item>
128
+ <sonic-icon library="iconoir" name="bell-notification" slot="prefix"></sonic-icon>
129
+ Notifications
130
+ </sonic-menu-item>
131
+ </sonic-menu>
132
+ </sonic-pop>
133
+ <sonic-pop class="inline-block" shadow="sm" placement="top">
134
+ <sonic-button>Small</sonic-button>
135
+ <sonic-menu slot="content">
136
+ <sonic-menu-item>
137
+ <sonic-icon library="iconoir" name="bell-notification" slot="prefix"></sonic-icon>
138
+ Notifications
139
+ </sonic-menu-item>
140
+ </sonic-menu>
141
+ </sonic-pop>
142
+ <sonic-pop class="inline-block" shadow="md" placement="top">
143
+ <sonic-button>Medium</sonic-button>
144
+ <sonic-menu slot="content">
145
+ <sonic-menu-item>
146
+ <sonic-icon library="iconoir" name="bell-notification" slot="prefix"></sonic-icon>
147
+ Notifications
148
+ </sonic-menu-item>
149
+ </sonic-menu>
150
+ </sonic-pop>
151
+ <sonic-pop class="inline-block" shadow="lg" placement="top">
152
+ <sonic-button>Large</sonic-button>
153
+ <sonic-menu slot="content">
154
+ <sonic-menu-item>
155
+ <sonic-icon library="iconoir" name="bell-notification" slot="prefix"></sonic-icon>
156
+ Notifications
157
+ </sonic-menu-item>
158
+ </sonic-menu>
159
+ </sonic-pop>
160
+ </div>
96
161
  </template>
97
162
  </sonic-code>
98
163
 
99
164
  ## Inline
100
165
 
101
- By default, pop is vertically aligned to the middle. Use `inline` to align it on the text baseline, e.g. inside a sentence.
166
+ By default the host is middle-aligned with siblings. Set **`inline`** to baseline-align the trigger inside running text.
102
167
 
103
168
  <sonic-code>
104
169
  <template>
@@ -116,35 +181,50 @@ By default, pop is vertically aligned to the middle. Use `inline` to align it on
116
181
  </template>
117
182
  </sonic-code>
118
183
 
119
- ## noToggle
184
+ ## No toggle
185
+
186
+ With **`noToggle`**, a click on the trigger still opens the pop but does not close it when it is already open. Use **`hide()`** or an outside click to dismiss.
187
+
120
188
  <sonic-code>
121
189
  <template>
122
- <sonic-pop class="inline-block" noToggle>
123
- <sonic-button>No toggle on click</sonic-button>
124
- <sonic-menu slot="content">
125
- <sonic-menu-item><sonic-icon library="iconoir" name="bell-notification" slot="prefix"></sonic-icon>Notifications</sonic-menu-item>
126
- </sonic-menu>
127
- </sonic-pop>
128
- <sonic-pop class="inline-block" >
129
- <sonic-button>Default toggle on click</sonic-button>
130
- <sonic-menu slot="content">
131
- <sonic-menu-item><sonic-icon library="iconoir" name="bell-notification" slot="prefix"></sonic-icon>Notifications</sonic-menu-item>
132
- </sonic-menu>
133
- </sonic-pop>
190
+ <div class="flex flex-wrap gap-2">
191
+ <sonic-pop class="inline-block" noToggle>
192
+ <sonic-button>No toggle on click</sonic-button>
193
+ <sonic-menu slot="content">
194
+ <sonic-menu-item>
195
+ <sonic-icon library="iconoir" name="bell-notification" slot="prefix"></sonic-icon>
196
+ Notifications
197
+ </sonic-menu-item>
198
+ </sonic-menu>
199
+ </sonic-pop>
200
+ <sonic-pop class="inline-block">
201
+ <sonic-button>Default toggle on click</sonic-button>
202
+ <sonic-menu slot="content">
203
+ <sonic-menu-item>
204
+ <sonic-icon library="iconoir" name="bell-notification" slot="prefix"></sonic-icon>
205
+ Notifications
206
+ </sonic-menu-item>
207
+ </sonic-menu>
208
+ </sonic-pop>
209
+ </div>
134
210
  </template>
135
211
  </sonic-code>
136
212
 
213
+ ## Manual control
214
+
215
+ Set **`manual`** to disable built-in click and keyboard toggle on the trigger. Call **`show()`** and **`hide()`** on the element instead. The pop dispatches **`show`** when it opens and **`hide`** when it closes.
216
+
217
+ Click **Click to open pop** to open the panel programmatically.
137
218
 
138
- ## manual
139
219
  <sonic-code>
140
220
  <template>
141
221
  <sonic-pop class="inline-block" manual id="manualPop">
142
- <sonic-button onclick="alert('customAction without opening Pop content')">Manual doesn't open on click</sonic-button>
222
+ <sonic-button onclick="alert('Custom action without opening the pop')">Manual trigger</sonic-button>
143
223
  <sonic-menu slot="content">
144
- <sonic-menu-item>Hourra !</sonic-menu-item>
224
+ <sonic-menu-item>It worked!</sonic-menu-item>
145
225
  </sonic-menu>
146
226
  </sonic-pop>
147
- <sonic-button onclick="document.getElementById('manualPop').show()" class="ml-5" variant="outline">
227
+ <sonic-button onclick="document.getElementById('manualPop').show()" class="ml-5" variant="outline">
148
228
  <sonic-icon name="sparkles" library="custom"></sonic-icon>
149
229
  Click to open pop
150
230
  </sonic-button>
@@ -153,48 +233,62 @@ By default, pop is vertically aligned to the middle. Use `inline` to align it on
153
233
 
154
234
  ## Keep open on select
155
235
 
156
- By default, a click inside the content closes the pop, as well as a click outside. Add `data-on-select="keep"` on the content, or on any of its elements, to keep the pop open when interacting with it.
236
+ By default, a click inside **`content`** closes the pop (same as an outside click). Set **`data-on-select="keep"`** on the panel or a descendant to keep it open while selecting checkboxes, toggles, or menu items.
157
237
 
158
238
  <sonic-code>
159
239
  <template>
160
- <sonic-pop class="inline-block">
161
- <sonic-button>Closes on select</sonic-button>
162
- <div slot="content" class="grid gap-2 p-3">
163
- <sonic-checkbox>Option A</sonic-checkbox>
164
- <sonic-checkbox>Option B</sonic-checkbox>
165
- </div>
166
- </sonic-pop>
167
- <sonic-pop class="inline-block">
168
- <sonic-button>Stays open on select</sonic-button>
169
- <div slot="content" class="grid gap-2 p-3" data-on-select="keep">
170
- <sonic-checkbox>Option A</sonic-checkbox>
171
- <sonic-checkbox>Option B</sonic-checkbox>
172
- </div>
173
- </sonic-pop>
240
+ <div class="flex flex-wrap gap-2">
241
+ <sonic-pop class="inline-block">
242
+ <sonic-button>Closes on select</sonic-button>
243
+ <div slot="content" class="grid gap-2 p-3">
244
+ <sonic-checkbox>Option A</sonic-checkbox>
245
+ <sonic-checkbox>Option B</sonic-checkbox>
246
+ </div>
247
+ </sonic-pop>
248
+ <sonic-pop class="inline-block">
249
+ <sonic-button>Stays open on select</sonic-button>
250
+ <div slot="content" class="grid gap-2 p-3" data-on-select="keep">
251
+ <sonic-checkbox>Option A</sonic-checkbox>
252
+ <sonic-checkbox>Option B</sonic-checkbox>
253
+ </div>
254
+ </sonic-pop>
255
+ </div>
174
256
  </template>
175
257
  </sonic-code>
176
258
 
177
- ## Keyboard
259
+ ## Keyboard and dismissal
178
260
 
179
- - `ArrowDown` on the trigger opens the pop.
180
- - `Escape` closes the last opened pop and gives focus back to its trigger.
261
+ **`ArrowDown`** on the trigger opens the pop when it is closed. **`Escape`** closes the most recently opened pop (capture phase, before ancestors such as **`sonic-modal`**) and returns focus to that trigger. Multiple pops on the page stack in open order for Escape.
262
+
263
+ <sonic-code>
264
+ <template>
265
+ <sonic-pop class="inline-block">
266
+ <sonic-button>Focus me — ArrowDown opens, Escape closes</sonic-button>
267
+ <sonic-menu slot="content">
268
+ <sonic-menu-item>First item</sonic-menu-item>
269
+ <sonic-menu-item>Second item</sonic-menu-item>
270
+ </sonic-menu>
271
+ </sonic-pop>
272
+ </template>
273
+ </sonic-code>
181
274
 
182
- ## Methods and events
275
+ ## API reference
183
276
 
184
- `show()` and `hide()` open and close the pop programmatically (see `manual` above). The pop dispatches a `show` event when it opens and a `hide` event when it closes.
277
+ | Attribute | Values | Description |
278
+ |----------|---------|-------------|
279
+ | `placement` | `bottom` (default) · `top` · `left` · `right` · `top-start` · `top-center` · `top-end` · `bottom-start` · `bottom-center` · `bottom-end` · `left-start` · `left-center` · `left-end` · `right-start` · `right-center` · `right-end` | Side and alignment relative to the trigger; repositions while open and flips within the viewport |
280
+ | `shadow` | `none` · `sm` · `md` · `lg` (default `lg`) | Box shadow on the **`content`** panel |
281
+ | `inline` | boolean | Baseline-align the host for inline triggers |
282
+ | `noToggle` | boolean | When open, trigger click does not close the pop |
283
+ | `manual` | boolean | Disable default trigger toggle; use **`show()`** / **`hide()`** |
185
284
 
186
- ```js
187
- const pop = document.querySelector("sonic-pop");
188
- pop.addEventListener("hide", () => console.log("pop closed"));
189
- pop.show();
190
- ```
285
+ | Slot | Description |
286
+ |------|-------------|
287
+ | *(default)* | Trigger; listens for **`click`** and **`keydown`** (`ArrowDown` opens when closed) unless **`manual`** |
288
+ | `content` | Floating panel; receives focus **`tabindex="0"`** while open |
191
289
 
192
- ## Styling
290
+ **Methods:** **`show()`** · **`hide()`** on the host element.
193
291
 
194
- The content can be styled from outside with `::part(content)`.
292
+ **Events:** **`show`** · **`hide`** (non-bubbling **`CustomEvent`**).
195
293
 
196
- ```css
197
- sonic-pop::part(content) {
198
- border-radius: 0;
199
- }
200
- ```
294
+ **Content attribute:** **`data-on-select="keep"`** on **`content`** or descendants prevents close-on-click inside the panel.
@@ -354,7 +354,6 @@ export class Pop extends LitElement {
354
354
  name="content"
355
355
  popover=${ifDefined(Pop.supportsPopover ? "manual" : undefined)}
356
356
  tabindex="-1"
357
- part="content"
358
357
  style="display: none;"
359
358
  class="shadowable
360
359
  ${this.open ? "is-open" : ""}"
@@ -1,63 +1,109 @@
1
- # Progress bar
1
+ # Progress
2
2
 
3
- Displays an indicator showing the completion progress of a task.
3
+ Shows **task completion** on a **`value`** / **`max`** scale via a native `<progress>` bar. Omit **`value`** for an **indeterminate** loading animation. Put primary copy in the default slot and optional secondary text in **`remaining`**; set **`invert`** when the bar sits on a colored surface such as **`sonic-card`**.
4
4
 
5
- ## Indeterminate
5
+ ## Basic example
6
+
7
+ Set **`value`** from `0` to **`max`** (default `100`). Label text uses the type color.
6
8
 
7
9
  <sonic-code>
8
10
  <template>
9
- <sonic-progress></sonic-progress>
11
+ <sonic-progress value="50">50%</sonic-progress>
10
12
  </template>
11
13
  </sonic-code>
12
14
 
15
+ ## Indeterminate
13
16
 
14
- ## Remaining
17
+ With no **`value`**, the bar animates until progress is known.
15
18
 
16
19
  <sonic-code>
17
20
  <template>
18
- <sonic-progress type="danger" value="80">
19
- 80% Used <span slot="remaining">20% left</span>
20
- </sonic-progress>
21
+ <sonic-progress></sonic-progress>
21
22
  </template>
22
23
  </sonic-code>
23
24
 
24
- ## Sizes
25
+ ## Type
26
+
27
+ Semantic color follows **`type`**. With no **`type`**, behavior is `default`.
25
28
 
26
29
  <sonic-code>
27
30
  <template>
28
- <div class="grid gap-3">
29
- <sonic-progress size="2xs" value="25">25%</sonic-progress>
30
- <sonic-progress size="xs" value="25">25%</sonic-progress>
31
- <sonic-progress size="sm" value="25">25%</sonic-progress>
32
- <sonic-progress size="md" value="25">25%</sonic-progress>
33
- <sonic-progress size="lg" value="25">25%</sonic-progress>
34
- <sonic-progress size="xl" value="25">25%</sonic-progress>
35
- <sonic-progress size="2xl" value="25">25%</sonic-progress>
36
- </div>
31
+ <div class="grid gap-3">
32
+ <sonic-progress value="50">50%</sonic-progress>
33
+ <sonic-progress type="primary" value="50">50%</sonic-progress>
34
+ <sonic-progress type="neutral" value="50">50%</sonic-progress>
35
+ <sonic-progress type="info" value="50">50%</sonic-progress>
36
+ <sonic-progress type="warning" value="50">50%</sonic-progress>
37
+ <sonic-progress type="success" value="50">50%</sonic-progress>
38
+ <sonic-progress type="danger" value="50">50%</sonic-progress>
39
+ </div>
37
40
  </template>
38
41
  </sonic-code>
39
42
 
40
- ## Type
43
+ ## Size
44
+
45
+ Bar height scales with typography via **`size`**. With no **`size`**, font size matches **`md`** (`1rem`).
41
46
 
42
47
  <sonic-code>
43
48
  <template>
44
- <div class="grid gap-3">
45
- <sonic-progress value="50">50%</sonic-progress>
46
- <sonic-progress type="info" value="50">50%</sonic-progress>
47
- <sonic-progress type="warning" value="50">50%</sonic-progress>
48
- <sonic-progress type="success" value="50">50%</sonic-progress>
49
- <sonic-progress type="danger" value="50">50%</sonic-progress>
50
- </div>
51
- </template>
49
+ <div class="grid gap-3">
50
+ <sonic-progress size="2xs" value="25">25%</sonic-progress>
51
+ <sonic-progress size="xs" value="25">25%</sonic-progress>
52
+ <sonic-progress size="sm" value="25">25%</sonic-progress>
53
+ <sonic-progress size="md" value="25">25%</sonic-progress>
54
+ <sonic-progress size="lg" value="25">25%</sonic-progress>
55
+ <sonic-progress size="xl" value="25">25%</sonic-progress>
56
+ <sonic-progress size="2xl" value="25">25%</sonic-progress>
57
+ </div>
58
+ </template>
52
59
  </sonic-code>
53
60
 
61
+ ## Default and remaining slots
62
+
63
+ The default slot is the main label (left). **`remaining`** is right-aligned with lighter weight—use it for “left to complete” copy.
64
+
65
+ <sonic-code>
66
+ <template>
67
+ <sonic-progress type="danger" value="80">
68
+ 80% Used <span slot="remaining">20% left</span>
69
+ </sonic-progress>
70
+ </template>
71
+ </sonic-code>
54
72
 
55
73
  ## Invert
56
74
 
75
+ On tinted backgrounds, **`invert`** adjusts track and fill tokens so the bar stays readable (pair with matching **`type`** on **`sonic-card`** or similar).
76
+
57
77
  <sonic-code>
58
78
  <template>
59
- <div class="bg-neutral-900 p-4 rounded-md">
60
- <sonic-progress type="invert" value="50">50%</sonic-progress>
61
- </div>
79
+ <div class="grid gap-3">
80
+ <sonic-card type="info">
81
+ <sonic-progress invert type="info" value="50">50%</sonic-progress>
82
+ </sonic-card>
83
+ <sonic-card type="warning">
84
+ <sonic-progress invert type="warning" value="50">50%</sonic-progress>
85
+ </sonic-card>
86
+ <sonic-card type="success">
87
+ <sonic-progress invert type="success" value="50">50%</sonic-progress>
88
+ </sonic-card>
89
+ <sonic-card type="danger">
90
+ <sonic-progress invert type="danger" value="50">50%</sonic-progress>
91
+ </sonic-card>
92
+ </div>
62
93
  </template>
63
94
  </sonic-code>
95
+
96
+ ## API reference
97
+
98
+ | Attribute | Values | Description |
99
+ |----------|---------|-------------|
100
+ | `value` | number | Completion amount; omit for indeterminate state |
101
+ | `max` | number (default `100`) | Upper bound for **`value`** |
102
+ | `type` | `default` (default) · `primary` · `neutral` · `warning` · `info` · `success` · `danger` | Semantic bar and label color |
103
+ | `size` | `2xs` · `xs` · `sm` · `md` · `lg` · `xl` · `2xl` · `inherit` | Typography scale (bar height follows `em`) |
104
+ | `invert` | boolean | High-contrast tokens on colored backgrounds |
105
+
106
+ | Slot | Description |
107
+ |------|-------------|
108
+ | *(default)* | Primary label below the bar (left) |
109
+ | `remaining` | Secondary label below the bar (right) |