ngwr 9.1.0 → 10.1.0

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 (276) hide show
  1. package/README.md +23 -8
  2. package/action-sheet/styles/_index.scss +6 -1
  3. package/badge/styles/_index.scss +17 -7
  4. package/badge/styles/_tag.scss +12 -3
  5. package/border-glow/styles/_index.scss +5 -0
  6. package/button/styles/_index.scss +48 -1
  7. package/calendar/styles/_index.scss +9 -1
  8. package/circular-text/styles/_index.scss +6 -1
  9. package/density/styles/_index.scss +3 -1
  10. package/dialog/styles/_index.scss +66 -2
  11. package/drag-drop/styles/_index.scss +20 -7
  12. package/drawer/styles/_index.scss +61 -1
  13. package/event-calendar/styles/_index.scss +284 -0
  14. package/falling-text/styles/_index.scss +5 -0
  15. package/fesm2022/ngwr-action-sheet.mjs +1 -1
  16. package/fesm2022/ngwr-action-sheet.mjs.map +1 -1
  17. package/fesm2022/ngwr-alert.mjs +8 -3
  18. package/fesm2022/ngwr-alert.mjs.map +1 -1
  19. package/fesm2022/ngwr-back-top.mjs +6 -4
  20. package/fesm2022/ngwr-back-top.mjs.map +1 -1
  21. package/fesm2022/ngwr-border-glow.mjs +12 -9
  22. package/fesm2022/ngwr-border-glow.mjs.map +1 -1
  23. package/fesm2022/ngwr-breadcrumbs.mjs +2 -2
  24. package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
  25. package/fesm2022/ngwr-calendar.mjs +5 -3
  26. package/fesm2022/ngwr-calendar.mjs.map +1 -1
  27. package/fesm2022/ngwr-card.mjs +2 -2
  28. package/fesm2022/ngwr-card.mjs.map +1 -1
  29. package/fesm2022/ngwr-carousel.mjs +17 -4
  30. package/fesm2022/ngwr-carousel.mjs.map +1 -1
  31. package/fesm2022/ngwr-cascader.mjs +35 -7
  32. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  33. package/fesm2022/ngwr-checkbox.mjs +12 -3
  34. package/fesm2022/ngwr-checkbox.mjs.map +1 -1
  35. package/fesm2022/ngwr-circular-text.mjs +2 -2
  36. package/fesm2022/ngwr-circular-text.mjs.map +1 -1
  37. package/fesm2022/ngwr-color-picker.mjs +6 -5
  38. package/fesm2022/ngwr-color-picker.mjs.map +1 -1
  39. package/fesm2022/ngwr-command-palette.mjs +7 -3
  40. package/fesm2022/ngwr-command-palette.mjs.map +1 -1
  41. package/fesm2022/ngwr-context-menu.mjs +7 -7
  42. package/fesm2022/ngwr-context-menu.mjs.map +1 -1
  43. package/fesm2022/ngwr-counter.mjs +9 -1
  44. package/fesm2022/ngwr-counter.mjs.map +1 -1
  45. package/fesm2022/ngwr-date-picker.mjs +37 -15
  46. package/fesm2022/ngwr-date-picker.mjs.map +1 -1
  47. package/fesm2022/ngwr-density.mjs +10 -2
  48. package/fesm2022/ngwr-density.mjs.map +1 -1
  49. package/fesm2022/ngwr-descriptions.mjs +5 -4
  50. package/fesm2022/ngwr-descriptions.mjs.map +1 -1
  51. package/fesm2022/ngwr-dialog.mjs +10 -1
  52. package/fesm2022/ngwr-dialog.mjs.map +1 -1
  53. package/fesm2022/ngwr-drag-drop.mjs +2 -2
  54. package/fesm2022/ngwr-drag-drop.mjs.map +1 -1
  55. package/fesm2022/ngwr-drawer.mjs +37 -16
  56. package/fesm2022/ngwr-drawer.mjs.map +1 -1
  57. package/fesm2022/ngwr-dropdown.mjs +8 -3
  58. package/fesm2022/ngwr-dropdown.mjs.map +1 -1
  59. package/fesm2022/ngwr-event-calendar.mjs +723 -0
  60. package/fesm2022/ngwr-event-calendar.mjs.map +1 -0
  61. package/fesm2022/ngwr-falling-text.mjs +2 -2
  62. package/fesm2022/ngwr-falling-text.mjs.map +1 -1
  63. package/fesm2022/ngwr-file-upload.mjs +2 -2
  64. package/fesm2022/ngwr-file-upload.mjs.map +1 -1
  65. package/fesm2022/ngwr-form.mjs +258 -42
  66. package/fesm2022/ngwr-form.mjs.map +1 -1
  67. package/fesm2022/ngwr-fuzzy-text.mjs +15 -1
  68. package/fesm2022/ngwr-fuzzy-text.mjs.map +1 -1
  69. package/fesm2022/ngwr-gauge.mjs +8 -3
  70. package/fesm2022/ngwr-gauge.mjs.map +1 -1
  71. package/fesm2022/ngwr-glitch-text.mjs +2 -2
  72. package/fesm2022/ngwr-glitch-text.mjs.map +1 -1
  73. package/fesm2022/ngwr-gradient-text.mjs +2 -2
  74. package/fesm2022/ngwr-gradient-text.mjs.map +1 -1
  75. package/fesm2022/ngwr-i18n-en.mjs +89 -5
  76. package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
  77. package/fesm2022/ngwr-i18n-ru.mjs +90 -5
  78. package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
  79. package/fesm2022/ngwr-i18n.mjs +94 -3
  80. package/fesm2022/ngwr-i18n.mjs.map +1 -1
  81. package/fesm2022/ngwr-icon.mjs +79 -35
  82. package/fesm2022/ngwr-icon.mjs.map +1 -1
  83. package/fesm2022/ngwr-input-number.mjs +19 -3
  84. package/fesm2022/ngwr-input-number.mjs.map +1 -1
  85. package/fesm2022/ngwr-input.mjs +48 -6
  86. package/fesm2022/ngwr-input.mjs.map +1 -1
  87. package/fesm2022/ngwr-knob.mjs +8 -3
  88. package/fesm2022/ngwr-knob.mjs.map +1 -1
  89. package/fesm2022/ngwr-lightbox.mjs +32 -3
  90. package/fesm2022/ngwr-lightbox.mjs.map +1 -1
  91. package/fesm2022/ngwr-line-chart.mjs +3 -3
  92. package/fesm2022/ngwr-line-chart.mjs.map +1 -1
  93. package/fesm2022/ngwr-list.mjs +2 -2
  94. package/fesm2022/ngwr-list.mjs.map +1 -1
  95. package/fesm2022/ngwr-loading-bar.mjs +2 -2
  96. package/fesm2022/ngwr-loading-bar.mjs.map +1 -1
  97. package/fesm2022/ngwr-marquee.mjs +2 -2
  98. package/fesm2022/ngwr-marquee.mjs.map +1 -1
  99. package/fesm2022/ngwr-media.mjs +3 -0
  100. package/fesm2022/ngwr-media.mjs.map +1 -1
  101. package/fesm2022/ngwr-mention.mjs +166 -10
  102. package/fesm2022/ngwr-mention.mjs.map +1 -1
  103. package/fesm2022/ngwr-meter-group.mjs +14 -3
  104. package/fesm2022/ngwr-meter-group.mjs.map +1 -1
  105. package/fesm2022/ngwr-overlay.mjs +173 -3
  106. package/fesm2022/ngwr-overlay.mjs.map +1 -1
  107. package/fesm2022/ngwr-page-header.mjs +2 -2
  108. package/fesm2022/ngwr-page-header.mjs.map +1 -1
  109. package/fesm2022/ngwr-pagination.mjs +17 -4
  110. package/fesm2022/ngwr-pagination.mjs.map +1 -1
  111. package/fesm2022/ngwr-popconfirm.mjs +4 -3
  112. package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
  113. package/fesm2022/ngwr-popover.mjs +10 -3
  114. package/fesm2022/ngwr-popover.mjs.map +1 -1
  115. package/fesm2022/ngwr-progress.mjs +8 -2
  116. package/fesm2022/ngwr-progress.mjs.map +1 -1
  117. package/fesm2022/ngwr-qr.mjs.map +1 -1
  118. package/fesm2022/ngwr-rating.mjs +6 -4
  119. package/fesm2022/ngwr-rating.mjs.map +1 -1
  120. package/fesm2022/ngwr-result.mjs +19 -12
  121. package/fesm2022/ngwr-result.mjs.map +1 -1
  122. package/fesm2022/ngwr-segmented.mjs +2 -2
  123. package/fesm2022/ngwr-segmented.mjs.map +1 -1
  124. package/fesm2022/ngwr-select.mjs +40 -13
  125. package/fesm2022/ngwr-select.mjs.map +1 -1
  126. package/fesm2022/ngwr-shiny-text.mjs +4 -6
  127. package/fesm2022/ngwr-shiny-text.mjs.map +1 -1
  128. package/fesm2022/ngwr-speed-dial.mjs +11 -3
  129. package/fesm2022/ngwr-speed-dial.mjs.map +1 -1
  130. package/fesm2022/ngwr-spotlight-card.mjs +2 -2
  131. package/fesm2022/ngwr-spotlight-card.mjs.map +1 -1
  132. package/fesm2022/ngwr-squircle.mjs +1 -1
  133. package/fesm2022/ngwr-squircle.mjs.map +1 -1
  134. package/fesm2022/ngwr-star-border.mjs +2 -2
  135. package/fesm2022/ngwr-star-border.mjs.map +1 -1
  136. package/fesm2022/ngwr-switch.mjs +10 -3
  137. package/fesm2022/ngwr-switch.mjs.map +1 -1
  138. package/fesm2022/ngwr-table.mjs +233 -19
  139. package/fesm2022/ngwr-table.mjs.map +1 -1
  140. package/fesm2022/ngwr-tabs.mjs +21 -4
  141. package/fesm2022/ngwr-tabs.mjs.map +1 -1
  142. package/fesm2022/ngwr-textarea.mjs +20 -4
  143. package/fesm2022/ngwr-textarea.mjs.map +1 -1
  144. package/fesm2022/ngwr-theme.mjs +13 -3
  145. package/fesm2022/ngwr-theme.mjs.map +1 -1
  146. package/fesm2022/ngwr-tilt-card.mjs +2 -2
  147. package/fesm2022/ngwr-tilt-card.mjs.map +1 -1
  148. package/fesm2022/ngwr-toolbar.mjs +2 -2
  149. package/fesm2022/ngwr-toolbar.mjs.map +1 -1
  150. package/fesm2022/ngwr-tour.mjs +264 -0
  151. package/fesm2022/ngwr-tour.mjs.map +1 -0
  152. package/fesm2022/ngwr-transfer.mjs +184 -0
  153. package/fesm2022/ngwr-transfer.mjs.map +1 -0
  154. package/fesm2022/ngwr-tree.mjs +27 -9
  155. package/fesm2022/ngwr-tree.mjs.map +1 -1
  156. package/fesm2022/ngwr-typewriter.mjs +2 -2
  157. package/fesm2022/ngwr-typewriter.mjs.map +1 -1
  158. package/fesm2022/ngwr-validators.mjs +118 -2
  159. package/fesm2022/ngwr-validators.mjs.map +1 -1
  160. package/fesm2022/ngwr-version.mjs +2 -2
  161. package/fesm2022/ngwr-version.mjs.map +1 -1
  162. package/fesm2022/ngwr-virtual-scroll.mjs +2 -2
  163. package/fesm2022/ngwr-virtual-scroll.mjs.map +1 -1
  164. package/fesm2022/ngwr-waves.mjs +25 -3
  165. package/fesm2022/ngwr-waves.mjs.map +1 -1
  166. package/form/styles/_index.scss +8 -4
  167. package/glitch-text/styles/_index.scss +5 -0
  168. package/gradient-text/styles/_index.scss +5 -0
  169. package/i18n/en.json +233 -0
  170. package/i18n/ru.json +233 -0
  171. package/icon/styles/_index.scss +15 -1
  172. package/input/styles/_index.scss +16 -0
  173. package/input-number/styles/_index.scss +8 -1
  174. package/keyboard/styles/_index.scss +15 -3
  175. package/llms-full.txt +124 -63
  176. package/llms.txt +29 -8
  177. package/loading-bar/styles/_index.scss +5 -0
  178. package/marquee/styles/_index.scss +7 -2
  179. package/mention/styles/_index.scss +23 -0
  180. package/overlay/styles/_index.scss +5 -0
  181. package/package.json +15 -1
  182. package/pagination/styles/_index.scss +12 -0
  183. package/popover/styles/_index.scss +165 -45
  184. package/pull-to-refresh/styles/_index.scss +5 -0
  185. package/result/styles/_index.scss +3 -3
  186. package/schematics/icon-set/index.js +80 -34
  187. package/schematics/icon-set/schema.json +8 -3
  188. package/schematics/ng-add/index.js +23 -6
  189. package/schematics/package.json +3 -0
  190. package/schematics/page/templates.js +17 -21
  191. package/schematics/provider/index.js +31 -13
  192. package/schematics/provider/schema.json +40 -24
  193. package/schematics/use/index.js +5 -1
  194. package/schematics/use/schema.json +8 -3
  195. package/schematics/use/symbol-map.json +7 -176
  196. package/segmented/styles/_index.scss +1 -1
  197. package/select/styles/_index.scss +20 -3
  198. package/shiny-text/styles/_index.scss +5 -0
  199. package/speed-dial/styles/_index.scss +12 -1
  200. package/splitter/styles/_index.scss +7 -1
  201. package/spotlight-card/styles/_index.scss +5 -0
  202. package/squircle/styles/_index.scss +5 -0
  203. package/star-border/styles/_index.scss +5 -0
  204. package/statistic/styles/_index.scss +2 -2
  205. package/styles/_animations.scss +6 -0
  206. package/styles.scss +3 -0
  207. package/table/styles/_index.scss +128 -12
  208. package/theme/styles/_box-model.scss +29 -0
  209. package/theme/styles/_colors.scss +116 -15
  210. package/theme/styles/_dark.scss +65 -7
  211. package/theme/styles/_focus.scss +2 -8
  212. package/theme/styles/_index.scss +1 -0
  213. package/tilt-card/styles/_index.scss +5 -0
  214. package/toast/styles/_index.scss +6 -3
  215. package/tour/styles/_index.scss +63 -0
  216. package/transfer/styles/_index.scss +105 -0
  217. package/types/ngwr-alert.d.ts +4 -1
  218. package/types/ngwr-avatar.d.ts +1 -1
  219. package/types/ngwr-back-top.d.ts +3 -2
  220. package/types/ngwr-badge.d.ts +1 -1
  221. package/types/ngwr-border-glow.d.ts +0 -1
  222. package/types/ngwr-carousel.d.ts +10 -1
  223. package/types/ngwr-cascader.d.ts +13 -1
  224. package/types/ngwr-checkbox.d.ts +9 -1
  225. package/types/ngwr-color-picker.d.ts +1 -0
  226. package/types/ngwr-command-palette.d.ts +4 -1
  227. package/types/ngwr-context-menu.d.ts +1 -0
  228. package/types/ngwr-date-picker.d.ts +14 -4
  229. package/types/ngwr-density.d.ts +9 -2
  230. package/types/ngwr-dialog.d.ts +9 -0
  231. package/types/ngwr-divider.d.ts +1 -1
  232. package/types/ngwr-drawer.d.ts +20 -4
  233. package/types/ngwr-dropdown.d.ts +1 -0
  234. package/types/ngwr-event-calendar.d.ts +358 -0
  235. package/types/ngwr-form.d.ts +177 -20
  236. package/types/ngwr-fuzzy-text.d.ts +8 -0
  237. package/types/ngwr-gauge.d.ts +4 -1
  238. package/types/ngwr-i18n.d.ts +80 -2
  239. package/types/ngwr-icon.d.ts +11 -19
  240. package/types/ngwr-input-number.d.ts +8 -1
  241. package/types/ngwr-input.d.ts +50 -20
  242. package/types/ngwr-knob.d.ts +4 -1
  243. package/types/ngwr-lightbox.d.ts +7 -1
  244. package/types/ngwr-line-chart.d.ts +1 -1
  245. package/types/ngwr-media.d.ts +1 -1
  246. package/types/ngwr-mention.d.ts +45 -1
  247. package/types/ngwr-meter-group.d.ts +9 -1
  248. package/types/ngwr-overlay.d.ts +80 -2
  249. package/types/ngwr-page-header.d.ts +2 -2
  250. package/types/ngwr-pagination.d.ts +15 -2
  251. package/types/ngwr-popconfirm.d.ts +1 -0
  252. package/types/ngwr-popover.d.ts +1 -0
  253. package/types/ngwr-progress.d.ts +4 -1
  254. package/types/ngwr-rating.d.ts +3 -2
  255. package/types/ngwr-result.d.ts +12 -6
  256. package/types/ngwr-segmented.d.ts +6 -0
  257. package/types/ngwr-select.d.ts +19 -7
  258. package/types/ngwr-shiny-text.d.ts +2 -4
  259. package/types/ngwr-speed-dial.d.ts +7 -1
  260. package/types/ngwr-squircle.d.ts +1 -1
  261. package/types/ngwr-switch.d.ts +7 -1
  262. package/types/ngwr-table.d.ts +126 -6
  263. package/types/ngwr-tabs.d.ts +1 -4
  264. package/types/ngwr-textarea.d.ts +8 -1
  265. package/types/ngwr-theme.d.ts +8 -1
  266. package/types/ngwr-toolbar.d.ts +2 -2
  267. package/types/ngwr-tour.d.ts +132 -0
  268. package/types/ngwr-transfer.d.ts +118 -0
  269. package/types/ngwr-tree.d.ts +11 -2
  270. package/types/ngwr-validators.d.ts +62 -2
  271. package/types/ngwr-version.d.ts +2 -2
  272. package/types/ngwr-waves.d.ts +10 -0
  273. package/typewriter/styles/_index.scss +5 -0
  274. package/typography/styles/_index.scss +3 -3
  275. package/virtual-scroll/styles/_index.scss +6 -1
  276. package/waves/styles/_index.scss +26 -0
package/llms.txt CHANGED
@@ -1,15 +1,15 @@
1
1
  # ngwr
2
2
 
3
3
  > Angular UI library — standalone, signals-first, zoneless, fully tree-shakable.
4
- > 127 entry points — 105 of them components and directives — built on
4
+ > 130 secondary entry points, 188 component and directive classes, built on
5
5
  > `@angular/cdk` primitives. The only runtime dependency is `tslib`. Docs and
6
6
  > live demos: https://ngwr.dev — source: https://github.com/thekhegay/ngwr
7
7
 
8
8
  This file orients AI agents and LLMs that consume ngwr. For exact, current
9
9
  component APIs, read the bundled TypeScript types
10
- (`node_modules/ngwr/types/ngwr-<name>.d.ts`). Note: **ngwr.dev is a single-page
11
- app** — fetching its routes returns a JS shell, not text. Use the
12
- machine-readable resources listed at the bottom instead.
10
+ (`node_modules/ngwr/types/ngwr-<name>.d.ts`). ngwr.dev is prerendered, so
11
+ fetching a route returns real HTML you can read; the machine-readable resources
12
+ listed at the bottom are still the faster path for bulk API lookups.
13
13
 
14
14
  ## Install
15
15
 
@@ -52,10 +52,14 @@ Add from their entry points as needed:
52
52
  - `provideWrDateAdapter(...)` — calendar + date-picker (`ngwr/date-adapter-fns`
53
53
  or `ngwr/date-adapter-luxon`).
54
54
 
55
+ Injected rather than provided: `WrTour` (`ngwr/tour`) runs a guided onboarding
56
+ tour — `tour.start([{ target: '[data-tour="save"]', content: '…' }])` spotlights
57
+ one element at a time; a step whose target is missing is skipped, not floated.
58
+
55
59
  ## Schematics — let `ng` wire it
56
60
 
57
61
  - `ng add ngwr` — installs peers, adds `@use 'ngwr'` to styles, prints provider setup.
58
- - `ng g ngwr:use WrFoo src/app/x.ts` — adds the import + splices `WrFoo` into that
62
+ - `ng g ngwr:use WrFoo --path src/app/x.ts` — adds the import + splices `WrFoo` into that
59
63
  component's `@Component` imports.
60
64
  - `ng g ngwr:provider <overlay|icons|toast|i18n|date-adapter|density|theme|…>` —
61
65
  adds the matching `provideWr*()` to bootstrap.
@@ -81,9 +85,11 @@ before writing your own. Full catalog: https://ngwr.dev/reference/components.
81
85
  `wr-input-number`, `wr-input-otp`, `wr-date-picker` (date/time/datetime) and
82
86
  `wr-date-range-picker` (both in ngwr/date-picker; the range value is
83
87
  `[start, end]`, hence a separate component), `wr-file-upload`,
84
- `wr-form-field`, `wr-color-picker`.
88
+ `wr-form-field`, `wr-color-picker`, `wr-transfer` (dual listbox; the value
89
+ is the RIGHT pane).
85
90
  - **Data** — `wr-table` (column pin/resize/drag-reorder, row selection,
86
- expandable rows, grouping, summary rows, CSV export, virtualized body),
91
+ expandable rows, grouping, tree rows (`childrenKey`), summary rows,
92
+ CSV export, virtualized body),
87
93
  `wr-pagination`, `wr-tree`, `wr-virtual-scroll`, `wr-sortable-list`
88
94
  (drag-to-reorder).
89
95
  - **Feedback** — `wr-alert`, `wr-result`, `wr-empty`, `wr-skeleton`,
@@ -109,19 +115,34 @@ before writing your own. Full catalog: https://ngwr.dev/reference/components.
109
115
  - **Icons** — register via `provideWrIcons`, render `<wr-icon name="check" />`.
110
116
  - **i18n** — `{{ 'key' | wrT }}` (pipe from `ngwr/i18n`).
111
117
  - **Theme** — CSS custom properties `--wr-color-*`, `--wr-border-radius-*`, … set
112
- by `provideWrTheme()`.
118
+ by `provideWrTheme()`. Two contrast tokens per intent, easy to confuse:
119
+ `--wr-color-<intent>-contrast` is the label ON a filled intent;
120
+ `--wr-color-<intent>-ink` is the intent used AS text on a surface or its own
121
+ `-soft` tint. A bare `--wr-color-<intent>` as text fails WCAG AA in light. For
122
+ muted prose use `--wr-color-on-surface-muted`, not the `medium` intent.
113
123
  - **Mobile** — overlays collapse to sheets (`provideWrResponsiveOverlays()`), a
114
124
  `responsive` input reflows layout components, a `touch` density preset enlarges
115
125
  controls, and `WrHaptics` (ngwr/platform) fires vibration feedback.
116
126
  - **Large datasets** — `virtualScroll` is an opt-in input on `wr-table`,
117
127
  `wr-tree` and `wr-select` (search mode), alongside the standalone
118
128
  `wr-virtual-scroll` wrapper.
129
+ - **Scheduling** — `wr-event-calendar` covers month / week / day in one
130
+ component. `events` is an input the calendar never writes to: a drag emits
131
+ `eventChange` with the proposed start / end, and you apply it. Event `end` is
132
+ EXCLUSIVE. `editable` turns on drag and resize; `Alt` + arrows do the same
133
+ from the keyboard.
119
134
 
120
135
  ## Resources (machine-readable)
121
136
 
122
137
  - This quick-ref: https://ngwr.dev/llms.txt
123
138
  - Full reference (every entry point + selector + description):
124
139
  https://ngwr.dev/llms-full.txt
140
+ - **One page as markdown — append `.md` to any docs URL.**
141
+ `https://ngwr.dev/reference/components/select` also serves
142
+ `https://ngwr.dev/reference/components/select.md`: the same page as markdown,
143
+ prose and code samples and API tables, without the site chrome. Prefer it over
144
+ `llms-full.txt` when you already know which component you need. Each HTML page
145
+ advertises its twin as `<link rel="alternate" type="text/markdown">`.
125
146
  - All site URLs (for crawlers): https://ngwr.dev/sitemap.xml
126
147
  - Source, README, per-component `.d.ts` types: https://github.com/thekhegay/ngwr
127
148
  (installed at `node_modules/ngwr/types/ngwr-<name>.d.ts`; the package also
@@ -1,3 +1,8 @@
1
+ // Pull the whole theme so a standalone `@use 'ngwr/<name>'` brings in every
2
+ // design token this stylesheet references. Sass deduplicates `@use` per
3
+ // compilation, so the umbrella sheet still emits the theme only once.
4
+ @use '../../theme/styles' as theme;
5
+
1
6
  .wr-loading-bar {
2
7
  position: fixed;
3
8
  top: 0;
@@ -1,3 +1,8 @@
1
+ // Pull the whole theme so a standalone `@use 'ngwr/<name>'` brings in every
2
+ // design token this stylesheet references. Sass deduplicates `@use` per
3
+ // compilation, so the umbrella sheet still emits the theme only once.
4
+ @use '../../theme/styles' as theme;
5
+
1
6
  // Endless marquee (reactbits LogoLoop port).
2
7
  // Vars driven from component inputs:
3
8
  // --wr-marquee-gap gap between items (px)
@@ -62,7 +67,7 @@
62
67
  image-rendering: -webkit-optimize-contrast;
63
68
  -webkit-user-drag: none;
64
69
  pointer-events: none;
65
- transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
70
+ transition: transform var(--wr-duration-slow) var(--wr-ease-out);
66
71
  }
67
72
 
68
73
  &--scale-hover &__item {
@@ -76,7 +81,7 @@
76
81
  }
77
82
 
78
83
  &--scale-hover &__node {
79
- transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
84
+ transition: transform var(--wr-duration-slow) var(--wr-ease-out);
80
85
  }
81
86
 
82
87
  &__link {
@@ -4,6 +4,25 @@
4
4
  pointer-events: auto;
5
5
  }
6
6
 
7
+ // Polite live region the directive appends to `<body>`. It carries the two
8
+ // things `role="textbox"` cannot express as ARIA state — how many suggestions
9
+ // appeared, and what was inserted on commit — because `aria-expanded` is not a
10
+ // supported state of textbox.
11
+ //
12
+ // Visually hidden rather than `display: none` / `visibility: hidden`, both of
13
+ // which take the element out of the accessibility tree and silence it entirely.
14
+ .wr-mention__status {
15
+ position: absolute;
16
+ width: 1px;
17
+ height: 1px;
18
+ padding: 0;
19
+ margin: -1px;
20
+ overflow: hidden;
21
+ clip: rect(0, 0, 0, 0);
22
+ white-space: nowrap;
23
+ border: 0;
24
+ }
25
+
7
26
  .wr-mention-panel {
8
27
  display: block;
9
28
  min-width: 12rem;
@@ -38,6 +57,10 @@
38
57
  }
39
58
  }
40
59
 
60
+ // Nothing renders this any more — the panel's empty branch was unreachable
61
+ // (`activate()` closes before opening when nothing matches) and has been
62
+ // removed. Kept because `.wr-*` classes are public API and deleting one is a
63
+ // breaking change for no gain; a consumer styling it simply sees no element.
41
64
  &__empty {
42
65
  padding: 0.5rem 0.75rem;
43
66
  color: var(--wr-color-on-surface-muted);
@@ -1,3 +1,8 @@
1
+ // Pull the whole theme so a standalone `@use 'ngwr/<name>'` brings in every
2
+ // design token this stylesheet references. Sass deduplicates `@use` per
3
+ // compilation, so the umbrella sheet still emits the theme only once.
4
+ @use '../../theme/styles' as theme;
5
+
1
6
  // Shared presentation styles for responsive (bottom-sheet) overlays.
2
7
  // Added to a component's overlay panel (`wr-dialog-panel`,
3
8
  // `wr-select-overlay`, …) when `provideWrResponsiveOverlays()` or a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngwr",
3
- "version": "9.1.0",
3
+ "version": "10.1.0",
4
4
  "license": "MIT",
5
5
  "description": "Signals-first Angular UI library: 100+ standalone, zoneless-ready components with native Signal Forms, SSR-safe rendering and CSS-variable theming.",
6
6
  "author": "Roman Khegay <rk@garuna.dev> (https://garuna.dev)",
@@ -68,6 +68,8 @@
68
68
  "migrations": "./schematics/migrations.json"
69
69
  },
70
70
  "exports": {
71
+ "./schematics/*": "./schematics/*",
72
+ "./i18n/*.json": "./i18n/*.json",
71
73
  ".": {
72
74
  "sass": "./styles.scss",
73
75
  "types": "./types/ngwr.d.ts",
@@ -639,6 +641,10 @@
639
641
  "types": "./types/ngwr-directives.d.ts",
640
642
  "default": "./fesm2022/ngwr-directives.mjs"
641
643
  },
644
+ "./event-calendar": {
645
+ "types": "./types/ngwr-event-calendar.d.ts",
646
+ "default": "./fesm2022/ngwr-event-calendar.mjs"
647
+ },
642
648
  "./fuzzy-text": {
643
649
  "types": "./types/ngwr-fuzzy-text.d.ts",
644
650
  "default": "./fesm2022/ngwr-fuzzy-text.mjs"
@@ -691,6 +697,14 @@
691
697
  "types": "./types/ngwr-storage.d.ts",
692
698
  "default": "./fesm2022/ngwr-storage.mjs"
693
699
  },
700
+ "./tour": {
701
+ "types": "./types/ngwr-tour.d.ts",
702
+ "default": "./fesm2022/ngwr-tour.mjs"
703
+ },
704
+ "./transfer": {
705
+ "types": "./types/ngwr-transfer.d.ts",
706
+ "default": "./fesm2022/ngwr-transfer.mjs"
707
+ },
694
708
  "./utils": {
695
709
  "types": "./types/ngwr-utils.d.ts",
696
710
  "default": "./fesm2022/ngwr-utils.mjs"
@@ -2,6 +2,11 @@
2
2
 
3
3
  .wr-pagination {
4
4
  display: block;
5
+ // Breathing room of its own. A pager almost always sits right under a table or
6
+ // list, and with a bare `display: block` and no padding its cells touched the
7
+ // content above and below. Padding rather than margin so it stays inside the
8
+ // component's own box and can't collapse into the consumer's spacing.
9
+ padding-block: 0.5rem;
5
10
 
6
11
  &--disabled {
7
12
  opacity: 0.6;
@@ -80,6 +85,13 @@
80
85
 
81
86
  &__size {
82
87
  min-width: 0;
88
+
89
+ // The 10rem floor on `.wr-select__trigger` is sized for a standalone field.
90
+ // Here the select only ever holds "20 / page", so the pager was reserving
91
+ // 160px for a ~75px label — the single widest thing in the control.
92
+ .wr-select__trigger {
93
+ min-width: 0;
94
+ }
83
95
  }
84
96
 
85
97
  // Size variants — set the cell size; each button gets the matching [size].
@@ -1,8 +1,121 @@
1
+ @use 'sass:list';
2
+
1
3
  @use '../../theme/styles' as theme;
2
4
  @use '../../overlay/styles'; // shared .wr-overlay-sheet / .wr-overlay-backdrop for responsive mode
3
5
 
6
+ // --- Arrow -----------------------------------------------------------------
7
+ //
8
+ // A small square rotated 45°, half tucked under the panel so only the tip shows.
9
+ // Tooltip and popover share the geometry; the popover additionally carries the
10
+ // panel's border on the two outward faces so the outline reads as continuous.
11
+ //
12
+ // Placement is driven by the resolved position modifier the directive puts on the
13
+ // overlay host (`--top` means the panel sits ABOVE the trigger, so the arrow hangs
14
+ // off the panel's BOTTOM edge). All 12 positions are covered — the hand-written
15
+ // tooltip rules this replaces only handled 8, so `top-start` / `top-end` /
16
+ // `bottom-start` / `bottom-end` tooltips have been shipping with no arrow at all.
17
+ $_arrow: 6px;
18
+ $_arrow-half: 3px;
19
+ $_arrow-inset: 0.625rem; // distance from the panel corner for the -start / -end variants
20
+
21
+ // edge = which side of the panel the arrow hangs off; align = where along that side.
22
+ $_arrow-placement: (
23
+ top: (
24
+ bottom,
25
+ center,
26
+ ),
27
+ top-start: (
28
+ bottom,
29
+ start,
30
+ ),
31
+ top-end: (
32
+ bottom,
33
+ end,
34
+ ),
35
+ bottom: (
36
+ top,
37
+ center,
38
+ ),
39
+ bottom-start: (
40
+ top,
41
+ start,
42
+ ),
43
+ bottom-end: (
44
+ top,
45
+ end,
46
+ ),
47
+ left: (
48
+ right,
49
+ center,
50
+ ),
51
+ left-start: (
52
+ right,
53
+ start,
54
+ ),
55
+ left-end: (
56
+ right,
57
+ end,
58
+ ),
59
+ right: (
60
+ left,
61
+ center,
62
+ ),
63
+ right-start: (
64
+ left,
65
+ start,
66
+ ),
67
+ right-end: (
68
+ left,
69
+ end,
70
+ ),
71
+ );
72
+
73
+ /// Positions the arrow against `$edge`, offset outwards by `$pull`.
74
+ @mixin _arrow-at($edge, $align, $pull) {
75
+ #{$edge}: -$pull;
76
+
77
+ @if $edge == bottom or $edge == top {
78
+ @if $align == center {
79
+ left: 50%;
80
+ margin-left: -$_arrow-half;
81
+ } @else if $align == start {
82
+ left: $_arrow-inset;
83
+ } @else {
84
+ right: $_arrow-inset;
85
+ }
86
+ } @else {
87
+ @if $align == center {
88
+ top: 50%;
89
+ margin-top: -$_arrow-half;
90
+ } @else if $align == start {
91
+ top: $_arrow-inset;
92
+ } @else {
93
+ bottom: $_arrow-inset;
94
+ }
95
+ }
96
+ }
97
+
98
+ /// The two faces of the rotated square that stay visible outside the panel.
99
+ @mixin _arrow-border($edge) {
100
+ @if $edge == bottom {
101
+ border-right: 1px solid var(--wr-color-outline);
102
+ border-bottom: 1px solid var(--wr-color-outline);
103
+ } @else if $edge == top {
104
+ border-left: 1px solid var(--wr-color-outline);
105
+ border-top: 1px solid var(--wr-color-outline);
106
+ } @else if $edge == right {
107
+ border-top: 1px solid var(--wr-color-outline);
108
+ border-right: 1px solid var(--wr-color-outline);
109
+ } @else {
110
+ border-bottom: 1px solid var(--wr-color-outline);
111
+ border-left: 1px solid var(--wr-color-outline);
112
+ }
113
+ }
114
+
4
115
  .wr-popover-overlay {
5
116
  > * {
117
+ // Containing block for the arrow below.
118
+ position: relative;
6
119
  display: block;
7
120
  min-width: 8rem;
8
121
  max-width: 22rem;
@@ -14,6 +127,36 @@
14
127
  color: var(--wr-color-on-surface);
15
128
  animation: wr-overlay-in var(--wr-overlay-duration) var(--wr-overlay-ease);
16
129
  transform-origin: top left;
130
+
131
+ &::after {
132
+ content: '';
133
+ position: absolute;
134
+ width: $_arrow;
135
+ height: $_arrow;
136
+ background: var(--wr-color-surface);
137
+ transform: rotate(45deg);
138
+ }
139
+ }
140
+
141
+ // Responsive bottom-sheet mode has no anchor to point at, so no arrow.
142
+ &.wr-overlay-sheet > *::after {
143
+ content: none;
144
+ }
145
+ }
146
+
147
+ @each $position, $spec in $_arrow-placement {
148
+ $edge: list.nth($spec, 1);
149
+ $align: list.nth($spec, 2);
150
+
151
+ // Pulled one extra pixel so the square's own border lines up flush with the
152
+ // panel's, instead of leaving the panel border showing across the arrow's base.
153
+ .wr-popover-overlay--#{$position} > *::after {
154
+ @include _arrow-at($edge, $align, $_arrow-half + 1px);
155
+ @include _arrow-border($edge);
156
+ }
157
+
158
+ .wr-tooltip-overlay--#{$position} .wr-tooltip::after {
159
+ @include _arrow-at($edge, $align, $_arrow-half);
17
160
  }
18
161
  }
19
162
 
@@ -28,12 +171,25 @@
28
171
  }
29
172
 
30
173
  .wr-tooltip {
174
+ // Follows the theme instead of inverting against it: on a dark canvas the
175
+ // tooltip is dark, on a light canvas light. It used to invert (a light chip on
176
+ // dark), which is a common convention but reads as a foreign element here.
177
+ //
178
+ // Both halves are tokens, so an app that wants the inverted look back needs one
179
+ // rule, not an override of every tooltip rule:
180
+ // .wr-tooltip { --wr-tooltip-bg: var(--wr-color-on-surface);
181
+ // --wr-tooltip-color: var(--wr-color-dark-contrast); }
182
+ --wr-tooltip-bg: var(--wr-color-surface);
183
+ --wr-tooltip-color: var(--wr-color-on-surface);
184
+ --wr-tooltip-border: var(--wr-color-outline);
185
+
31
186
  position: relative;
32
187
  display: inline-block;
33
188
  max-width: 18rem;
34
189
  padding: 0.3125rem 0.5rem;
35
- background: var(--wr-color-on-surface);
36
- color: var(--wr-color-dark-contrast);
190
+ background: var(--wr-tooltip-bg);
191
+ color: var(--wr-tooltip-color);
192
+ border: 1px solid var(--wr-tooltip-border);
37
193
  border-radius: var(--wr-border-radius-sm);
38
194
  font-family: var(--wr-font-family-base);
39
195
  font-size: var(--wr-text-xs);
@@ -42,56 +198,20 @@
42
198
  animation: wr-overlay-in var(--wr-overlay-duration) var(--wr-overlay-ease);
43
199
  transform-origin: top left;
44
200
 
45
- // Arrow
201
+ // Arrow — geometry from the shared placement loop at the top of this file.
46
202
  &::after {
47
203
  content: '';
48
204
  position: absolute;
49
- width: 6px;
50
- height: 6px;
51
- background: var(--wr-color-on-surface);
205
+ width: $_arrow;
206
+ height: $_arrow;
207
+ background: var(--wr-tooltip-bg);
52
208
  transform: rotate(45deg);
53
209
  }
54
210
  }
55
211
 
56
- // Arrow placement is dictated by the overlay panel's position modifier
57
- // (the wr-tooltip-overlay--top|bottom|left|right class lives on the
58
- // portal host wrapping the tooltip).
59
- .wr-tooltip-overlay--top .wr-tooltip::after {
60
- left: 50%;
61
- bottom: -3px;
62
- margin-left: -3px;
63
- }
64
- .wr-tooltip-overlay--bottom .wr-tooltip::after {
65
- left: 50%;
66
- top: -3px;
67
- margin-left: -3px;
68
- }
69
- .wr-tooltip-overlay--left .wr-tooltip::after {
70
- top: 50%;
71
- right: -3px;
72
- margin-top: -3px;
73
- }
74
- .wr-tooltip-overlay--left-start .wr-tooltip::after {
75
- top: 0.625rem;
76
- right: -3px;
77
- }
78
- .wr-tooltip-overlay--left-end .wr-tooltip::after {
79
- bottom: 0.625rem;
80
- right: -3px;
81
- }
82
- .wr-tooltip-overlay--right .wr-tooltip::after {
83
- top: 50%;
84
- left: -3px;
85
- margin-top: -3px;
86
- }
87
- .wr-tooltip-overlay--right-start .wr-tooltip::after {
88
- top: 0.625rem;
89
- left: -3px;
90
- }
91
- .wr-tooltip-overlay--right-end .wr-tooltip::after {
92
- bottom: 0.625rem;
93
- left: -3px;
94
- }
212
+ // Arrow placement for both modes is generated from `$_arrow-placement` at the top
213
+ // of this file — the per-position rules that used to live here are emitted there,
214
+ // byte-identical for the 8 positions they covered plus the 4 they missed.
95
215
 
96
216
  @media (prefers-reduced-motion: reduce) {
97
217
  .wr-tooltip {
@@ -1,3 +1,8 @@
1
+ // Pull the whole theme so a standalone `@use 'ngwr/<name>'` brings in every
2
+ // design token this stylesheet references. Sass deduplicates `@use` per
3
+ // compilation, so the umbrella sheet still emits the theme only once.
4
+ @use '../../theme/styles' as theme;
5
+
1
6
  .wr-pull-to-refresh {
2
7
  display: block;
3
8
  position: relative;
@@ -48,15 +48,15 @@
48
48
  }
49
49
 
50
50
  &--success &__icon {
51
- color: var(--wr-color-success);
51
+ color: var(--wr-color-success-ink);
52
52
  }
53
53
 
54
54
  &--warning &__icon {
55
- color: var(--wr-color-warning);
55
+ color: var(--wr-color-warning-ink);
56
56
  }
57
57
 
58
58
  &--error &__icon {
59
- color: var(--wr-color-danger);
59
+ color: var(--wr-color-danger-ink);
60
60
  }
61
61
 
62
62
  &--info &__icon {
@@ -9,27 +9,60 @@ Object.defineProperty(exports, "__esModule", { value: true });
9
9
  const schematics_1 = require("@angular-devkit/schematics");
10
10
  const workspace_1 = require("@schematics/angular/utility/workspace");
11
11
  /**
12
- * Curated common icon sets. Identifiers match `ngwr/icon` exports — kept
13
- * short on purpose so the generated file stays readable.
12
+ * Curated icon sets, as `<name used in templates>` → `<lucide export>`.
13
+ *
14
+ * These used to be bare identifiers imported straight from `ngwr/icon`, which
15
+ * never compiled: that entry point exports only `WrIcon`, `provideWrIcons` and
16
+ * `svgIcon`, never the icons themselves. Icons come from an adapter, so the
17
+ * generated file registers them through `lucideIcons()` — the same wiring
18
+ * `ng add ngwr` produces.
14
19
  */
15
20
  const SETS = {
16
- basic: ['checkmark', 'close', 'add', 'edit', 'trash', 'search', 'copy'],
17
- navigation: [
18
- 'chevronDown',
19
- 'chevronLeft',
20
- 'chevronRight',
21
- 'chevronUp',
22
- 'arrowBack',
23
- 'arrowForward',
24
- 'arrowTop',
25
- 'arrowBottom',
26
- 'menu',
27
- 'dotsHorizontal',
28
- 'dotsVertical',
29
- ],
30
- forms: ['eye', 'eyeOff', 'lock', 'lockOpened', 'calendar', 'time', 'filter', 'checkmark', 'close'],
31
- feedback: ['alert', 'alertCircle', 'infoCircleOutline', 'checkmarkCircle', 'closeCircle', 'warning', 'bell'],
21
+ basic: {
22
+ checkmark: 'Check',
23
+ close: 'X',
24
+ add: 'Plus',
25
+ edit: 'Pencil',
26
+ trash: 'Trash2',
27
+ search: 'Search',
28
+ copy: 'Copy',
29
+ },
30
+ navigation: {
31
+ 'chevron-down': 'ChevronDown',
32
+ 'chevron-left': 'ChevronLeft',
33
+ 'chevron-right': 'ChevronRight',
34
+ 'chevron-up': 'ChevronUp',
35
+ 'arrow-back': 'ArrowLeft',
36
+ 'arrow-forward': 'ArrowRight',
37
+ 'arrow-top': 'ArrowUp',
38
+ 'arrow-bottom': 'ArrowDown',
39
+ menu: 'Menu',
40
+ 'dots-horizontal': 'MoreHorizontal',
41
+ 'dots-vertical': 'MoreVertical',
42
+ },
43
+ forms: {
44
+ eye: 'Eye',
45
+ 'eye-off': 'EyeOff',
46
+ lock: 'Lock',
47
+ 'lock-opened': 'LockOpen',
48
+ calendar: 'Calendar',
49
+ time: 'Clock',
50
+ filter: 'Filter',
51
+ checkmark: 'Check',
52
+ close: 'X',
53
+ },
54
+ feedback: {
55
+ alert: 'TriangleAlert',
56
+ 'alert-circle': 'CircleAlert',
57
+ 'info-circle': 'Info',
58
+ 'checkmark-circle': 'CircleCheck',
59
+ 'close-circle': 'CircleX',
60
+ warning: 'TriangleAlert',
61
+ bell: 'Bell',
62
+ },
32
63
  };
64
+ /** Every icon this schematic knows how to map, merged across the curated sets. */
65
+ const KNOWN_ICONS = Object.values(SETS).reduce((acc, set) => ({ ...acc, ...set }), {});
33
66
  /** Default fallback when neither `set` nor `icons` is supplied. */
34
67
  const DEFAULT_SET = 'basic';
35
68
  function iconSet(options) {
@@ -44,38 +77,54 @@ function iconSet(options) {
44
77
  const dirPath = options.path ?? `${sourceRoot}/app`;
45
78
  const fileName = (options.name ?? 'icons').replace(/\.ts$/, '');
46
79
  const filePath = `${dirPath}/${fileName}.ts`;
47
- // Build the deduped icon list — set + explicit icons, or default fallback.
48
- const fromSet = options.set ? (SETS[options.set] ?? []) : [];
49
- const fromList = options.icons
80
+ // Build the deduped icon map — set + explicit icons, or default fallback.
81
+ const fromSet = options.set ? (SETS[options.set] ?? {}) : {};
82
+ const requested = options.icons
50
83
  ? options.icons
51
84
  .split(',')
52
85
  .map(s => s.trim())
53
86
  .filter(Boolean)
54
87
  : [];
55
- const icons = unique([...fromSet, ...fromList]);
56
- if (icons.length === 0)
57
- icons.push(...SETS[DEFAULT_SET]);
88
+ // schema.json promises unknown names are "flagged but not blocked" — actually do it.
89
+ const unknown = requested.filter(name => !(name in KNOWN_ICONS));
90
+ if (unknown.length > 0) {
91
+ context.logger.warn(`ngwr:icon-set: no lucide mapping for ${unknown.join(', ')} — skipped. ` +
92
+ `Known names: ${Object.keys(KNOWN_ICONS).sort().join(', ')}.`);
93
+ }
94
+ const picked = { ...fromSet };
95
+ for (const name of requested) {
96
+ if (name in KNOWN_ICONS)
97
+ picked[name] = KNOWN_ICONS[name];
98
+ }
99
+ if (Object.keys(picked).length === 0)
100
+ Object.assign(picked, SETS[DEFAULT_SET]);
58
101
  if (tree.exists(filePath)) {
59
102
  context.logger.warn(`ngwr: ${filePath} already exists — skipping. Pass --name to write a different file, or delete it first.`);
60
103
  return tree;
61
104
  }
62
105
  const exportName = options.exportName ?? 'APP_ICONS';
63
- const importList = icons.join(', ');
64
- const arrayList = icons.join(', ');
65
- tree.create(filePath, renderFile(importList, exportName, arrayList));
66
- context.logger.info(`✓ Created ${filePath} with ${icons.length} icons.`);
106
+ tree.create(filePath, renderFile(picked, exportName));
107
+ context.logger.info(`✓ Created ${filePath} with ${Object.keys(picked).length} icons.`);
67
108
  context.logger.info(printWiringHint(fileName, exportName));
68
109
  return tree;
69
110
  };
70
111
  }
71
- function renderFile(importList, exportName, arrayList) {
112
+ function renderFile(icons, exportName) {
113
+ const names = Object.keys(icons);
114
+ // Two icon names can share one glyph (alert / warning), so the import list is
115
+ // deduped while the map keeps both keys.
116
+ const imports = [...new Set(names.map(n => icons[n]))].sort().join(', ');
117
+ const entries = names.map(n => ` '${n}': ${icons[n]},`).join('\n');
72
118
  return `/**
73
119
  * Tree-shaken ngwr icon set. Generated by \`ng g ngwr:icon-set\`.
74
120
  * Edit freely — re-running with --name=<other> writes a separate file.
75
121
  */
76
- import { ${importList} } from 'ngwr/icon';
122
+ import { lucideIcons } from 'ngwr/icon/adapters/lucide';
123
+ import { ${imports} } from 'lucide';
77
124
 
78
- export const ${exportName} = [${arrayList}] as const;
125
+ export const ${exportName} = lucideIcons({
126
+ ${entries}
127
+ });
79
128
  `;
80
129
  }
81
130
  function printWiringHint(fileName, exportName) {
@@ -90,7 +139,4 @@ Next step — wire the set into bootstrap:
90
139
  });
91
140
  `;
92
141
  }
93
- function unique(list) {
94
- return Array.from(new Set(list));
95
- }
96
142
  exports.default = iconSet;