ng-primitives 0.24.0 → 0.26.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 (324) hide show
  1. package/accordion/accordion/accordion.directive.d.ts +4 -2
  2. package/button/index.d.ts +1 -1
  3. package/checkbox/checkbox/checkbox.directive.d.ts +16 -3
  4. package/checkbox/checkbox/checkbox.state.d.ts +41 -0
  5. package/checkbox/checkbox/checkbox.token.d.ts +7 -1
  6. package/checkbox/index.d.ts +2 -1
  7. package/collection.json +15 -0
  8. package/common/index.d.ts +2 -1
  9. package/common/types/orientation.d.ts +1 -0
  10. package/date-picker/date-picker/date-picker.directive.d.ts +29 -4
  11. package/date-picker/date-picker/date-picker.state.d.ts +52 -0
  12. package/date-picker/date-picker/date-picker.token.d.ts +5 -1
  13. package/date-picker/date-picker-date-button/date-picker-date-button.directive.d.ts +8 -1
  14. package/date-picker/date-picker-grid/date-picker-grid.directive.d.ts +4 -0
  15. package/date-picker/date-picker-label/date-picker-label.directive.d.ts +4 -4
  16. package/date-picker/date-picker-label/date-picker-label.token.d.ts +2 -2
  17. package/date-picker/date-picker-next-month/date-picker-next-month.directive.d.ts +4 -0
  18. package/date-picker/date-picker-previous-month/date-picker-previous-month.directive.d.ts +4 -0
  19. package/date-picker/date-picker-row-render/date-picker-row-render.directive.d.ts +1 -1
  20. package/date-picker/index.d.ts +1 -0
  21. package/example-theme/index.css +60 -60
  22. package/fesm2022/ng-primitives-a11y.mjs +0 -1
  23. package/fesm2022/ng-primitives-a11y.mjs.map +1 -1
  24. package/fesm2022/ng-primitives-accordion.mjs +0 -4
  25. package/fesm2022/ng-primitives-accordion.mjs.map +1 -1
  26. package/fesm2022/ng-primitives-autofill.mjs +0 -1
  27. package/fesm2022/ng-primitives-autofill.mjs.map +1 -1
  28. package/fesm2022/ng-primitives-avatar.mjs +0 -3
  29. package/fesm2022/ng-primitives-avatar.mjs.map +1 -1
  30. package/fesm2022/ng-primitives-button.mjs +0 -1
  31. package/fesm2022/ng-primitives-button.mjs.map +1 -1
  32. package/fesm2022/ng-primitives-checkbox.mjs +61 -16
  33. package/fesm2022/ng-primitives-checkbox.mjs.map +1 -1
  34. package/fesm2022/ng-primitives-common.mjs +0 -1
  35. package/fesm2022/ng-primitives-common.mjs.map +1 -1
  36. package/fesm2022/ng-primitives-date-picker.mjs +135 -63
  37. package/fesm2022/ng-primitives-date-picker.mjs.map +1 -1
  38. package/fesm2022/ng-primitives-dialog.mjs +0 -5
  39. package/fesm2022/ng-primitives-dialog.mjs.map +1 -1
  40. package/fesm2022/ng-primitives-file-upload.mjs +0 -1
  41. package/fesm2022/ng-primitives-file-upload.mjs.map +1 -1
  42. package/fesm2022/ng-primitives-focus-trap.mjs +0 -1
  43. package/fesm2022/ng-primitives-focus-trap.mjs.map +1 -1
  44. package/fesm2022/ng-primitives-form-field.mjs +0 -5
  45. package/fesm2022/ng-primitives-form-field.mjs.map +1 -1
  46. package/fesm2022/ng-primitives-input.mjs +0 -1
  47. package/fesm2022/ng-primitives-input.mjs.map +1 -1
  48. package/fesm2022/ng-primitives-interactions.mjs +0 -5
  49. package/fesm2022/ng-primitives-interactions.mjs.map +1 -1
  50. package/fesm2022/ng-primitives-internal.mjs +9 -1
  51. package/fesm2022/ng-primitives-internal.mjs.map +1 -1
  52. package/fesm2022/ng-primitives-listbox.mjs +2 -6
  53. package/fesm2022/ng-primitives-listbox.mjs.map +1 -1
  54. package/fesm2022/ng-primitives-menu.mjs +0 -3
  55. package/fesm2022/ng-primitives-menu.mjs.map +1 -1
  56. package/fesm2022/ng-primitives-pagination.mjs +82 -30
  57. package/fesm2022/ng-primitives-pagination.mjs.map +1 -1
  58. package/fesm2022/ng-primitives-popover.mjs +0 -2
  59. package/fesm2022/ng-primitives-popover.mjs.map +1 -1
  60. package/fesm2022/ng-primitives-progress.mjs +43 -18
  61. package/fesm2022/ng-primitives-progress.mjs.map +1 -1
  62. package/fesm2022/ng-primitives-radio.mjs +90 -39
  63. package/fesm2022/ng-primitives-radio.mjs.map +1 -1
  64. package/fesm2022/ng-primitives-resize.mjs +0 -1
  65. package/fesm2022/ng-primitives-resize.mjs.map +1 -1
  66. package/fesm2022/ng-primitives-roving-focus.mjs +15 -4
  67. package/fesm2022/ng-primitives-roving-focus.mjs.map +1 -1
  68. package/fesm2022/ng-primitives-search.mjs +0 -2
  69. package/fesm2022/ng-primitives-search.mjs.map +1 -1
  70. package/fesm2022/ng-primitives-select.mjs +0 -1
  71. package/fesm2022/ng-primitives-select.mjs.map +1 -1
  72. package/fesm2022/ng-primitives-separator.mjs +90 -0
  73. package/fesm2022/ng-primitives-separator.mjs.map +1 -0
  74. package/fesm2022/ng-primitives-slider.mjs +114 -53
  75. package/fesm2022/ng-primitives-slider.mjs.map +1 -1
  76. package/fesm2022/ng-primitives-state.mjs +71 -0
  77. package/fesm2022/ng-primitives-state.mjs.map +1 -0
  78. package/fesm2022/ng-primitives-switch.mjs +64 -33
  79. package/fesm2022/ng-primitives-switch.mjs.map +1 -1
  80. package/fesm2022/ng-primitives-tabs.mjs +104 -55
  81. package/fesm2022/ng-primitives-tabs.mjs.map +1 -1
  82. package/fesm2022/ng-primitives-textarea.mjs +0 -1
  83. package/fesm2022/ng-primitives-textarea.mjs.map +1 -1
  84. package/fesm2022/ng-primitives-toast.mjs +0 -1
  85. package/fesm2022/ng-primitives-toast.mjs.map +1 -1
  86. package/fesm2022/ng-primitives-toggle-group.mjs +276 -0
  87. package/fesm2022/ng-primitives-toggle-group.mjs.map +1 -0
  88. package/fesm2022/ng-primitives-toggle.mjs +56 -10
  89. package/fesm2022/ng-primitives-toggle.mjs.map +1 -1
  90. package/fesm2022/ng-primitives-toolbar.mjs +67 -0
  91. package/fesm2022/ng-primitives-toolbar.mjs.map +1 -0
  92. package/fesm2022/ng-primitives-tooltip.mjs +0 -2
  93. package/fesm2022/ng-primitives-tooltip.mjs.map +1 -1
  94. package/fesm2022/ng-primitives-utils.mjs +10 -1
  95. package/fesm2022/ng-primitives-utils.mjs.map +1 -1
  96. package/internal/orientation/orientation.d.ts +8 -2
  97. package/listbox/listbox-option/listbox-option.directive.d.ts +1 -1
  98. package/package.json +68 -28
  99. package/pagination/index.d.ts +1 -0
  100. package/pagination/pagination/pagination.directive.d.ts +16 -2
  101. package/pagination/pagination/pagination.state.d.ts +26 -0
  102. package/pagination/pagination/pagination.token.d.ts +2 -1
  103. package/pagination/pagination-button/pagination-button.directive.d.ts +5 -1
  104. package/pagination/pagination-first/pagination-first.directive.d.ts +4 -0
  105. package/pagination/pagination-last/pagination-last.directive.d.ts +4 -0
  106. package/pagination/pagination-next/pagination-next.directive.d.ts +4 -0
  107. package/pagination/pagination-previous/pagination-previous.directive.d.ts +4 -0
  108. package/progress/index.d.ts +2 -0
  109. package/progress/progress/progress.directive.d.ts +7 -2
  110. package/progress/progress/progress.state.d.ts +23 -0
  111. package/progress/progress/progress.token.d.ts +6 -2
  112. package/progress/progress-indicator/progress-indicator.directive.d.ts +4 -0
  113. package/radio/index.d.ts +4 -2
  114. package/radio/radio-group/radio-group.directive.d.ts +15 -5
  115. package/radio/radio-group/radio-group.state.d.ts +27 -0
  116. package/radio/radio-group/radio-group.token.d.ts +6 -3
  117. package/radio/radio-indicator/radio-indicator.directive.d.ts +5 -5
  118. package/radio/radio-item/radio-item.directive.d.ts +8 -0
  119. package/radio/radio-item/radio-item.state.d.ts +18 -0
  120. package/radio/radio-item/radio-item.token.d.ts +5 -2
  121. package/roving-focus/roving-focus-group/roving-focus-group.directive.d.ts +2 -1
  122. package/roving-focus/roving-focus-group/roving-focus-group.token.d.ts +8 -2
  123. package/schematics/ng-add/index.d.ts +2 -0
  124. package/schematics/ng-add/index.js +24 -0
  125. package/schematics/ng-add/index.js.map +1 -0
  126. package/schematics/ng-add/schema.d.ts +2 -0
  127. package/schematics/{init → ng-add}/schema.json +2 -2
  128. package/schematics/ng-generate/__snapshots__/index.spec.ts.snap +82 -0
  129. package/schematics/ng-generate/index.d.ts +3 -0
  130. package/schematics/ng-generate/index.js +54 -0
  131. package/schematics/ng-generate/index.js.map +1 -0
  132. package/schematics/ng-generate/schema.d.ts +52 -0
  133. package/schematics/ng-generate/schema.json +72 -0
  134. package/schematics/ng-generate/templates/accordion/accordion-item.__fileSuffix@dasherize__.ts.template +88 -0
  135. package/schematics/ng-generate/templates/accordion/accordion.__fileSuffix@dasherize__.ts.template +33 -0
  136. package/schematics/ng-generate/templates/avatar/avatar.__fileSuffix@dasherize__.ts.template +56 -0
  137. package/schematics/ng-generate/templates/button/button.__fileSuffix@dasherize__.ts.template +36 -0
  138. package/schematics/ng-generate/templates/checkbox/checkbox.__fileSuffix@dasherize__.ts.template +106 -0
  139. package/schematics/ng-generate/templates/date-picker/date-picker.__fileSuffix@dasherize__.ts.template +241 -0
  140. package/schematics/ng-generate/templates/form-field/form-field.__fileSuffix@dasherize__.ts.template +19 -0
  141. package/schematics/ng-generate/templates/input/input.__fileSuffix@dasherize__.ts.template +30 -0
  142. package/schematics/ng-generate/templates/pagination/pagination.__fileSuffix@dasherize__.ts.template +181 -0
  143. package/schematics/ng-generate/templates/progress/progress.__fileSuffix@dasherize__.ts.template +40 -0
  144. package/schematics/ng-generate/templates/radio/radio-group.__fileSuffix@dasherize__.ts.template +62 -0
  145. package/schematics/ng-generate/templates/radio/radio-item.__fileSuffix@dasherize__.ts.template +90 -0
  146. package/schematics/ng-generate/templates/slider/slider.__fileSuffix@dasherize__.ts.template +115 -0
  147. package/schematics/ng-generate/templates/switch/switch.__fileSuffix@dasherize__.ts.template +103 -0
  148. package/schematics/ng-generate/templates/tabs/tab.__fileSuffix@dasherize__.ts.template +26 -0
  149. package/schematics/ng-generate/templates/tabs/tabs.__fileSuffix@dasherize__.ts.template +80 -0
  150. package/schematics/ng-generate/templates/toggle/toggle.__fileSuffix@dasherize__.ts.template +92 -0
  151. package/schematics/ng-generate/templates/toggle-group/toggle-group-item.__fileSuffix@dasherize__.ts.template +57 -0
  152. package/schematics/ng-generate/templates/toggle-group/toggle-group.__fileSuffix@dasherize__.ts.template +73 -0
  153. package/separator/README.md +3 -0
  154. package/separator/config/separator.config.d.ts +29 -0
  155. package/separator/index.d.ts +3 -0
  156. package/separator/separator/separator.directive.d.ts +12 -0
  157. package/separator/separator/separator.token.d.ts +14 -0
  158. package/slider/index.d.ts +1 -0
  159. package/slider/slider/slider.directive.d.ts +18 -6
  160. package/slider/slider/slider.state.d.ts +39 -0
  161. package/slider/slider/slider.token.d.ts +2 -1
  162. package/slider/slider-range/slider-range.directive.d.ts +4 -0
  163. package/slider/slider-range/slider-range.token.d.ts +2 -1
  164. package/slider/slider-thumb/slider-thumb.directive.d.ts +4 -0
  165. package/slider/slider-thumb/slider-thumb.token.d.ts +2 -1
  166. package/slider/slider-track/slider-track.directive.d.ts +6 -9
  167. package/slider/slider-track/slider-track.token.d.ts +2 -1
  168. package/state/README.md +3 -0
  169. package/state/index.d.ts +1 -0
  170. package/state/state.d.ts +44 -0
  171. package/switch/index.d.ts +2 -1
  172. package/switch/switch/switch.directive.d.ts +11 -2
  173. package/switch/switch/switch.state.d.ts +22 -0
  174. package/switch/switch/switch.token.d.ts +5 -2
  175. package/switch/switch-thumb/switch-thumb.directive.d.ts +2 -2
  176. package/tabs/config/tabs.config.d.ts +2 -1
  177. package/tabs/index.d.ts +3 -2
  178. package/tabs/tab-button/tab-button.directive.d.ts +7 -5
  179. package/tabs/tab-list/tab-list.directive.d.ts +2 -2
  180. package/tabs/tab-panel/tab-panel.directive.d.ts +17 -7
  181. package/tabs/tabset/tabset.directive.d.ts +24 -5
  182. package/tabs/tabset/tabset.state.d.ts +48 -0
  183. package/tabs/tabset/tabset.token.d.ts +5 -2
  184. package/toggle/index.d.ts +2 -0
  185. package/toggle/toggle/toggle.directive.d.ts +11 -2
  186. package/toggle/toggle/toggle.state.d.ts +22 -0
  187. package/toggle/toggle/toggle.token.d.ts +18 -0
  188. package/toggle-group/README.md +3 -0
  189. package/toggle-group/config/toggle-group.config.d.ts +34 -0
  190. package/toggle-group/index.d.ts +7 -0
  191. package/toggle-group/toggle-group/toggle-group.directive.d.ts +59 -0
  192. package/toggle-group/toggle-group/toggle-group.state.d.ts +31 -0
  193. package/toggle-group/toggle-group/toggle-group.token.d.ts +18 -0
  194. package/toggle-group/toggle-group-item/toggle-group-item.directive.d.ts +40 -0
  195. package/toggle-group/toggle-group-item/toggle-group-item.state.d.ts +18 -0
  196. package/toggle-group/toggle-group-item/toggle-group-item.token.d.ts +18 -0
  197. package/toolbar/README.md +3 -0
  198. package/toolbar/index.d.ts +2 -0
  199. package/toolbar/toolbar/toolbar.directive.d.ts +12 -0
  200. package/toolbar/toolbar/toolbar.token.d.ts +18 -0
  201. package/utils/forms/providers.d.ts +6 -0
  202. package/utils/forms/types.d.ts +8 -0
  203. package/utils/index.d.ts +2 -0
  204. package/generators.json +0 -107
  205. package/schematics/accordion/compat.d.ts +0 -2
  206. package/schematics/accordion/compat.js +0 -13
  207. package/schematics/accordion/compat.js.map +0 -1
  208. package/schematics/accordion/files/accordion/__fileName__.component.__style__.template +0 -1
  209. package/schematics/accordion/files/accordion/__fileName__.component.html.template +0 -1
  210. package/schematics/accordion/files/accordion/__fileName__.component.ts.template +0 -26
  211. package/schematics/accordion/files/accordion-item/__fileName__.component.__style__.template +0 -1
  212. package/schematics/accordion/files/accordion-item/__fileName__.component.html.template +0 -1
  213. package/schematics/accordion/files/accordion-item/__fileName__.component.ts.template +0 -32
  214. package/schematics/accordion/generator.d.ts +0 -11
  215. package/schematics/accordion/generator.js +0 -52
  216. package/schematics/accordion/generator.js.map +0 -1
  217. package/schematics/accordion/schema.d.ts +0 -16
  218. package/schematics/accordion/schema.json +0 -39
  219. package/schematics/avatar/compat.d.ts +0 -2
  220. package/schematics/avatar/compat.js +0 -13
  221. package/schematics/avatar/compat.js.map +0 -1
  222. package/schematics/avatar/files/__fileName__.component.__style__.template +0 -1
  223. package/schematics/avatar/files/__fileName__.component.html.template +0 -1
  224. package/schematics/avatar/files/__fileName__.component.ts.template +0 -20
  225. package/schematics/avatar/generator.d.ts +0 -11
  226. package/schematics/avatar/generator.js +0 -36
  227. package/schematics/avatar/generator.js.map +0 -1
  228. package/schematics/avatar/schema.d.ts +0 -16
  229. package/schematics/avatar/schema.json +0 -39
  230. package/schematics/button/compat.d.ts +0 -2
  231. package/schematics/button/compat.js +0 -13
  232. package/schematics/button/compat.js.map +0 -1
  233. package/schematics/button/files/__fileName__.component.__style__.template +0 -11
  234. package/schematics/button/files/__fileName__.component.html.template +0 -1
  235. package/schematics/button/files/__fileName__.component.ts.template +0 -31
  236. package/schematics/button/generator.d.ts +0 -11
  237. package/schematics/button/generator.js +0 -27
  238. package/schematics/button/generator.js.map +0 -1
  239. package/schematics/button/schema.d.ts +0 -16
  240. package/schematics/button/schema.json +0 -39
  241. package/schematics/checkbox/compat.d.ts +0 -2
  242. package/schematics/checkbox/compat.js +0 -13
  243. package/schematics/checkbox/compat.js.map +0 -1
  244. package/schematics/checkbox/files/__fileName__.component.__style__.template +0 -1
  245. package/schematics/checkbox/files/__fileName__.component.html.template +0 -1
  246. package/schematics/checkbox/files/__fileName__.component.ts.template +0 -69
  247. package/schematics/checkbox/generator.d.ts +0 -11
  248. package/schematics/checkbox/generator.js +0 -48
  249. package/schematics/checkbox/generator.js.map +0 -1
  250. package/schematics/checkbox/schema.d.ts +0 -16
  251. package/schematics/checkbox/schema.json +0 -39
  252. package/schematics/file-upload/compat.d.ts +0 -2
  253. package/schematics/file-upload/compat.js +0 -13
  254. package/schematics/file-upload/compat.js.map +0 -1
  255. package/schematics/file-upload/files/__fileName__.component.__style__.template +0 -1
  256. package/schematics/file-upload/files/__fileName__.component.html.template +0 -1
  257. package/schematics/file-upload/files/__fileName__.component.ts.template +0 -28
  258. package/schematics/file-upload/generator.d.ts +0 -11
  259. package/schematics/file-upload/generator.js +0 -37
  260. package/schematics/file-upload/generator.js.map +0 -1
  261. package/schematics/file-upload/schema.d.ts +0 -16
  262. package/schematics/file-upload/schema.json +0 -39
  263. package/schematics/form-field/compat.d.ts +0 -2
  264. package/schematics/form-field/compat.js +0 -13
  265. package/schematics/form-field/compat.js.map +0 -1
  266. package/schematics/form-field/files/__fileName__.component.__style__.template +0 -2
  267. package/schematics/form-field/files/__fileName__.component.html.template +0 -1
  268. package/schematics/form-field/files/__fileName__.component.ts.template +0 -22
  269. package/schematics/form-field/generator.d.ts +0 -11
  270. package/schematics/form-field/generator.js +0 -27
  271. package/schematics/form-field/generator.js.map +0 -1
  272. package/schematics/form-field/schema.d.ts +0 -15
  273. package/schematics/form-field/schema.json +0 -39
  274. package/schematics/init/compat.d.ts +0 -2
  275. package/schematics/init/compat.js +0 -13
  276. package/schematics/init/compat.js.map +0 -1
  277. package/schematics/init/generator.d.ts +0 -14
  278. package/schematics/init/generator.js +0 -24
  279. package/schematics/init/generator.js.map +0 -1
  280. package/schematics/input/compat.d.ts +0 -2
  281. package/schematics/input/compat.js +0 -13
  282. package/schematics/input/compat.js.map +0 -1
  283. package/schematics/input/files/__fileName__.component.__style__.template +0 -8
  284. package/schematics/input/files/__fileName__.component.html.template +0 -0
  285. package/schematics/input/files/__fileName__.component.ts.template +0 -28
  286. package/schematics/input/generator.d.ts +0 -11
  287. package/schematics/input/generator.js +0 -27
  288. package/schematics/input/generator.js.map +0 -1
  289. package/schematics/input/schema.d.ts +0 -15
  290. package/schematics/input/schema.json +0 -39
  291. package/schematics/radio/compat.d.ts +0 -2
  292. package/schematics/radio/compat.js +0 -13
  293. package/schematics/radio/compat.js.map +0 -1
  294. package/schematics/radio/files/radio-group/__fileName__.component.__style__.template +0 -1
  295. package/schematics/radio/files/radio-group/__fileName__.component.html.template +0 -1
  296. package/schematics/radio/files/radio-group/__fileName__.component.ts.template +0 -68
  297. package/schematics/radio/files/radio-item/__fileName__.component.__style__.template +0 -1
  298. package/schematics/radio/files/radio-item/__fileName__.component.html.template +0 -1
  299. package/schematics/radio/files/radio-item/__fileName__.component.ts.template +0 -27
  300. package/schematics/radio/generator.d.ts +0 -11
  301. package/schematics/radio/generator.js +0 -58
  302. package/schematics/radio/generator.js.map +0 -1
  303. package/schematics/radio/schema.d.ts +0 -16
  304. package/schematics/radio/schema.json +0 -39
  305. package/schematics/tabs/compat.d.ts +0 -2
  306. package/schematics/tabs/compat.js +0 -13
  307. package/schematics/tabs/compat.js.map +0 -1
  308. package/schematics/tabs/files/button/__fileName__.component.__style__.template +0 -1
  309. package/schematics/tabs/files/button/__fileName__.component.html.template +0 -1
  310. package/schematics/tabs/files/button/__fileName__.component.ts.template +0 -26
  311. package/schematics/tabs/files/list/__fileName__.component.__style__.template +0 -1
  312. package/schematics/tabs/files/list/__fileName__.component.html.template +0 -1
  313. package/schematics/tabs/files/list/__fileName__.component.ts.template +0 -21
  314. package/schematics/tabs/files/panel/__fileName__.component.__style__.template +0 -1
  315. package/schematics/tabs/files/panel/__fileName__.component.html.template +0 -1
  316. package/schematics/tabs/files/panel/__fileName__.component.ts.template +0 -26
  317. package/schematics/tabs/files/tab/__fileName__.component.__style__.template +0 -1
  318. package/schematics/tabs/files/tab/__fileName__.component.html.template +0 -1
  319. package/schematics/tabs/files/tab/__fileName__.component.ts.template +0 -25
  320. package/schematics/tabs/generator.d.ts +0 -11
  321. package/schematics/tabs/generator.js +0 -75
  322. package/schematics/tabs/generator.js.map +0 -1
  323. package/schematics/tabs/schema.d.ts +0 -16
  324. package/schematics/tabs/schema.json +0 -39
@@ -6,8 +6,10 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
8
  import { BooleanInput } from '@angular/cdk/coercion';
9
+ import { NgpOrientation } from 'ng-primitives/common';
10
+ import { NgpCanOrientate } from 'ng-primitives/internal';
9
11
  import * as i0 from "@angular/core";
10
- export declare class NgpAccordion<T> {
12
+ export declare class NgpAccordion<T> implements NgpCanOrientate {
11
13
  /**
12
14
  * Access the global accordion configuration.
13
15
  */
@@ -31,7 +33,7 @@ export declare class NgpAccordion<T> {
31
33
  /**
32
34
  * The accordion orientation.
33
35
  */
34
- readonly orientation: import("@angular/core").InputSignal<"vertical" | "horizontal">;
36
+ readonly orientation: import("@angular/core").InputSignal<NgpOrientation>;
35
37
  /**
36
38
  * @param value The value to check.
37
39
  * @returns Whether the value is open.
package/button/index.d.ts CHANGED
@@ -6,4 +6,4 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
8
  export { NgpButton } from './button/button.directive';
9
- export { NgpButtonToken, injectButton } from './button/button.token';
9
+ export { injectButton, NgpButtonToken } from './button/button.token';
@@ -19,11 +19,19 @@ export declare class NgpCheckbox implements NgpCanDisable {
19
19
  /**
20
20
  * Defines whether the checkbox is checked.
21
21
  */
22
- readonly checked: import("@angular/core").ModelSignal<boolean>;
22
+ readonly checked: import("@angular/core").InputSignalWithTransform<boolean, BooleanInput>;
23
+ /**
24
+ * The event that is emitted when the checkbox value changes.
25
+ */
26
+ readonly checkedChange: import("@angular/core").OutputEmitterRef<boolean>;
23
27
  /**
24
28
  * Defines whether the checkbox is indeterminate.
25
29
  */
26
- readonly indeterminate: import("@angular/core").ModelSignal<boolean>;
30
+ readonly indeterminate: import("@angular/core").InputSignalWithTransform<boolean, BooleanInput>;
31
+ /**
32
+ * The event that is emitted when the indeterminate value changes.
33
+ */
34
+ readonly indeterminateChange: import("@angular/core").OutputEmitterRef<boolean>;
27
35
  /**
28
36
  * Whether the checkbox is required.
29
37
  */
@@ -32,8 +40,13 @@ export declare class NgpCheckbox implements NgpCanDisable {
32
40
  * Defines whether the checkbox is disabled.
33
41
  */
34
42
  readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, BooleanInput>;
43
+ /**
44
+ * The form control state. This is used to allow communication between the checkbox and the control value access and any
45
+ * components that use this as a host directive.
46
+ */
47
+ protected readonly state: import("dist/packages/ng-primitives/state").State<import("./checkbox.state").NgpCheckboxState>;
35
48
  protected onEnter(event: KeyboardEvent): void;
36
49
  toggle(event?: Event): void;
37
50
  static ɵfac: i0.ɵɵFactoryDeclaration<NgpCheckbox, never>;
38
- static ɵdir: i0.ɵɵDirectiveDeclaration<NgpCheckbox, "[ngpCheckbox]", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "checked": { "alias": "ngpCheckboxChecked"; "required": false; "isSignal": true; }; "indeterminate": { "alias": "ngpCheckboxIndeterminate"; "required": false; "isSignal": true; }; "required": { "alias": "ngpCheckboxRequired"; "required": false; "isSignal": true; }; "disabled": { "alias": "ngpCheckboxDisabled"; "required": false; "isSignal": true; }; }, { "checked": "ngpCheckboxCheckedChange"; "indeterminate": "ngpCheckboxIndeterminateChange"; }, never, never, true, [{ directive: typeof i1.NgpFormControl; inputs: {}; outputs: {}; }, { directive: typeof i2.NgpHover; inputs: {}; outputs: {}; }, { directive: typeof i2.NgpFocusVisible; inputs: {}; outputs: {}; }, { directive: typeof i2.NgpPress; inputs: {}; outputs: {}; }]>;
51
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgpCheckbox, "[ngpCheckbox]", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "checked": { "alias": "ngpCheckboxChecked"; "required": false; "isSignal": true; }; "indeterminate": { "alias": "ngpCheckboxIndeterminate"; "required": false; "isSignal": true; }; "required": { "alias": "ngpCheckboxRequired"; "required": false; "isSignal": true; }; "disabled": { "alias": "ngpCheckboxDisabled"; "required": false; "isSignal": true; }; }, { "checkedChange": "ngpCheckboxCheckedChange"; "indeterminateChange": "ngpCheckboxIndeterminateChange"; }, never, never, true, [{ directive: typeof i1.NgpFormControl; inputs: {}; outputs: {}; }, { directive: typeof i2.NgpHover; inputs: {}; outputs: {}; }, { directive: typeof i2.NgpFocusVisible; inputs: {}; outputs: {}; }, { directive: typeof i2.NgpPress; inputs: {}; outputs: {}; }]>;
39
52
  }
@@ -0,0 +1,41 @@
1
+ import { OutputEmitterRef, Signal } from '@angular/core';
2
+ /**
3
+ * The state for the checkbox primitive.
4
+ */
5
+ export interface NgpCheckboxState {
6
+ /**
7
+ * The id of the checkbox.
8
+ */
9
+ id: Signal<string>;
10
+ /**
11
+ * The checked state of the checkbox.
12
+ */
13
+ checked: Signal<boolean>;
14
+ /**
15
+ * The checked change event of the checkbox.
16
+ */
17
+ checkedChange: OutputEmitterRef<boolean>;
18
+ /**
19
+ * The indeterminate state of the checkbox.
20
+ * @default false
21
+ */
22
+ indeterminate: Signal<boolean>;
23
+ /**
24
+ * The indeterminate change event of the checkbox.
25
+ */
26
+ indeterminateChange: OutputEmitterRef<boolean>;
27
+ /**
28
+ * The required state of the checkbox.
29
+ * @default false
30
+ */
31
+ required: Signal<boolean>;
32
+ /**
33
+ * The disabled state of the checkbox.
34
+ * @default false
35
+ */
36
+ disabled: Signal<boolean>;
37
+ }
38
+ /**
39
+ * The initial state for the checkbox primitive.
40
+ */
41
+ export declare const NgpCheckboxStateToken: import("ng-primitives/state").StateToken<NgpCheckboxState>, provideCheckboxState: import("ng-primitives/state").StateFactory<NgpCheckboxState> & import("ng-primitives/state").StateProvider, injectCheckboxState: import("ng-primitives/state").StateFactory<NgpCheckboxState> & import("ng-primitives/state").StateInjector<NgpCheckboxState>, checkboxState: import("ng-primitives/state").StateFactory<NgpCheckboxState>;
@@ -5,7 +5,7 @@
5
5
  * This source code is licensed under the Apache 2.0 license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
- import { InjectionToken } from '@angular/core';
8
+ import { ExistingProvider, InjectionToken, Type } from '@angular/core';
9
9
  import type { NgpCheckbox } from './checkbox.directive';
10
10
  export declare const NgpCheckboxToken: InjectionToken<NgpCheckbox>;
11
11
  /**
@@ -13,3 +13,9 @@ export declare const NgpCheckboxToken: InjectionToken<NgpCheckbox>;
13
13
  * @returns The Checkbox directive instance
14
14
  */
15
15
  export declare function injectCheckbox(): NgpCheckbox;
16
+ /**
17
+ * Provide the Checkbox directive instance
18
+ * @param checkbox The Checkbox directive
19
+ * @returns The Checkbox directive provider
20
+ */
21
+ export declare function provideCheckbox(checkbox: Type<NgpCheckbox>): ExistingProvider;
@@ -6,4 +6,5 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
8
  export { NgpCheckbox } from './checkbox/checkbox.directive';
9
- export { NgpCheckboxToken, injectCheckbox } from './checkbox/checkbox.token';
9
+ export { injectCheckboxState, provideCheckboxState } from './checkbox/checkbox.state';
10
+ export { injectCheckbox, NgpCheckboxToken } from './checkbox/checkbox.token';
@@ -0,0 +1,15 @@
1
+ {
2
+ "schematics": {
3
+ "ng-add": {
4
+ "description": "Add Angular Primitives to a project.",
5
+ "factory": "./schematics/ng-add/index",
6
+ "schema": "./schematics/ng-add/schema.json",
7
+ "hidden": true
8
+ },
9
+ "primitive": {
10
+ "description": "Add Angular Primitives to a project.",
11
+ "factory": "./schematics/ng-generate/index",
12
+ "schema": "./schematics/ng-generate/schema.json"
13
+ }
14
+ }
15
+ }
package/common/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export { NgpHeader } from './header/header.directive';
2
- export { NgpHeaderToken, injectHeader } from './header/header.token';
2
+ export { injectHeader, NgpHeaderToken } from './header/header.token';
3
+ export { NgpOrientation } from './types/orientation';
@@ -0,0 +1 @@
1
+ export type NgpOrientation = 'horizontal' | 'vertical';
@@ -7,6 +7,7 @@
7
7
  */
8
8
  import { FocusOrigin } from '@angular/cdk/a11y';
9
9
  import { BooleanInput } from '@angular/cdk/coercion';
10
+ import type { NgpDatePickerDateButton } from '../date-picker-date-button/date-picker-date-button.directive';
10
11
  import * as i0 from "@angular/core";
11
12
  export declare class NgpDatePicker<T> {
12
13
  /**
@@ -36,26 +37,50 @@ export declare class NgpDatePicker<T> {
36
37
  /**
37
38
  * The selected value.
38
39
  */
39
- readonly date: import("@angular/core").ModelSignal<T | undefined>;
40
+ readonly date: import("@angular/core").InputSignal<T | undefined>;
41
+ /**
42
+ * Emit when the date changes.
43
+ */
44
+ readonly dateChange: import("@angular/core").OutputEmitterRef<T | undefined>;
40
45
  /**
41
46
  * The focused value.
42
47
  */
43
- readonly focusedDate: import("@angular/core").ModelSignal<T>;
48
+ readonly focusedDate: import("@angular/core").InputSignal<T>;
49
+ /**
50
+ * Emit when the focused date changes.
51
+ */
52
+ readonly focusedDateChange: import("@angular/core").OutputEmitterRef<T>;
44
53
  /**
45
54
  * Detect the label element.
46
55
  * @internal
47
56
  */
48
- readonly label: import("@angular/core").Signal<import("ng-primitives/date-picker").NgpDatePickerLabel | undefined>;
57
+ readonly label: import("@angular/core").Signal<import("ng-primitives/date-picker").NgpDatePickerLabel<unknown> | undefined>;
49
58
  /**
50
59
  * Access all the date picker buttons
51
60
  */
52
61
  private readonly buttons;
62
+ /**
63
+ * The date picker state.
64
+ */
65
+ protected readonly state: import("dist/packages/ng-primitives/state").State<import("./date-picker.state").NgpDatePickerState<T>>;
53
66
  /**
54
67
  * Set the focused date.
55
68
  * @param date The date to focus.
56
69
  * @internal
57
70
  */
58
71
  setFocusedDate(date: T, origin: FocusOrigin | undefined, direction: 'forward' | 'backward'): void;
72
+ /**
73
+ * Register a date button.
74
+ * @param button The date button to register.
75
+ * @internal
76
+ */
77
+ registerButton(button: NgpDatePickerDateButton<T>): void;
78
+ /**
79
+ * Unregister a date button.
80
+ * @param button The date button to unregister.
81
+ * @internal
82
+ */
83
+ unregisterButton(button: NgpDatePickerDateButton<T>): void;
59
84
  static ɵfac: i0.ɵɵFactoryDeclaration<NgpDatePicker<any>, never>;
60
- static ɵdir: i0.ɵɵDirectiveDeclaration<NgpDatePicker<any>, "[ngpDatePicker]", ["ngpDatePicker"], { "min": { "alias": "ngpDatePickerMin"; "required": false; "isSignal": true; }; "max": { "alias": "ngpDatePickerMax"; "required": false; "isSignal": true; }; "disabled": { "alias": "ngpDatePickerDisabled"; "required": false; "isSignal": true; }; "dateDisabled": { "alias": "ngpDatePickerDateDisabled"; "required": false; "isSignal": true; }; "date": { "alias": "ngpDatePickerDate"; "required": false; "isSignal": true; }; "focusedDate": { "alias": "ngpDatePickerFocusedDate"; "required": false; "isSignal": true; }; }, { "date": "ngpDatePickerDateChange"; "focusedDate": "ngpDatePickerFocusedDateChange"; }, ["label", "buttons"], never, true, never>;
85
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgpDatePicker<any>, "[ngpDatePicker]", ["ngpDatePicker"], { "min": { "alias": "ngpDatePickerMin"; "required": false; "isSignal": true; }; "max": { "alias": "ngpDatePickerMax"; "required": false; "isSignal": true; }; "disabled": { "alias": "ngpDatePickerDisabled"; "required": false; "isSignal": true; }; "dateDisabled": { "alias": "ngpDatePickerDateDisabled"; "required": false; "isSignal": true; }; "date": { "alias": "ngpDatePickerDate"; "required": false; "isSignal": true; }; "focusedDate": { "alias": "ngpDatePickerFocusedDate"; "required": false; "isSignal": true; }; }, { "dateChange": "ngpDatePickerDateChange"; "focusedDateChange": "ngpDatePickerFocusedDateChange"; }, ["label"], never, true, never>;
61
86
  }
@@ -0,0 +1,52 @@
1
+ import { OutputEmitterRef, Signal } from '@angular/core';
2
+ import { State } from 'ng-primitives/state';
3
+ /**
4
+ * The state for the date-picker primitive.
5
+ */
6
+ export interface NgpDatePickerState<T> {
7
+ /**
8
+ * The minimum date that can be selected.
9
+ */
10
+ min: Signal<T | undefined>;
11
+ /**
12
+ * The maximum date that can be selected.
13
+ */
14
+ max: Signal<T | undefined>;
15
+ /**
16
+ * Determine if the date picker is disabled.
17
+ */
18
+ disabled: Signal<boolean>;
19
+ /**
20
+ * The currently selected date.
21
+ */
22
+ date: Signal<T | undefined>;
23
+ /**
24
+ * Whether a specific date is disabled.
25
+ */
26
+ dateDisabled: Signal<(date: T) => boolean>;
27
+ /**
28
+ * Emit when the selected date changes.
29
+ */
30
+ dateChange: OutputEmitterRef<T | undefined>;
31
+ /**
32
+ * The currently focused date.
33
+ */
34
+ focusedDate: Signal<T>;
35
+ /**
36
+ * Emit when the focused date changes.
37
+ */
38
+ focusedDateChange: OutputEmitterRef<T>;
39
+ }
40
+ /**
41
+ * The initial state for the date-picker primitive.
42
+ */
43
+ declare const provideDatePickerState: import("ng-primitives/state").StateFactory<NgpDatePickerState<unknown>> & import("ng-primitives/state").StateProvider;
44
+ export { provideDatePickerState };
45
+ /**
46
+ * Inject the date-picker state.
47
+ */
48
+ export declare const injectDatePickerState: <T>() => State<NgpDatePickerState<T>>;
49
+ /**
50
+ * Update the date-picker state.
51
+ */
52
+ export declare const datePickerState: <T>(state: NgpDatePickerState<T>) => State<NgpDatePickerState<T>>;
@@ -5,10 +5,14 @@
5
5
  * This source code is licensed under the Apache 2.0 license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
- import { InjectionToken } from '@angular/core';
8
+ import { ExistingProvider, InjectionToken, Type } from '@angular/core';
9
9
  import type { NgpDatePicker } from './date-picker.directive';
10
10
  export declare const NgpDatePickerToken: InjectionToken<NgpDatePicker<unknown>>;
11
11
  /**
12
12
  * Inject the DatePicker directive instance
13
13
  */
14
14
  export declare function injectDatePicker<T>(): NgpDatePicker<T>;
15
+ /**
16
+ * Provide the DatePicker directive instance
17
+ */
18
+ export declare function provideDatePicker<T>(datePicker: Type<NgpDatePicker<T>>): ExistingProvider;
@@ -1,7 +1,8 @@
1
+ import { OnDestroy } from '@angular/core';
1
2
  import { NgpCanDisable } from 'ng-primitives/internal';
2
3
  import * as i0 from "@angular/core";
3
4
  import * as i1 from "ng-primitives/button";
4
- export declare class NgpDatePickerDateButton<T> implements NgpCanDisable {
5
+ export declare class NgpDatePickerDateButton<T> implements NgpCanDisable, OnDestroy {
5
6
  /**
6
7
  * Access the element ref.
7
8
  */
@@ -14,6 +15,10 @@ export declare class NgpDatePickerDateButton<T> implements NgpCanDisable {
14
15
  * Access the date picker.
15
16
  */
16
17
  private readonly datePicker;
18
+ /**
19
+ * Access the date picker state.
20
+ */
21
+ private readonly state;
17
22
  /**
18
23
  * Access the date adapter.
19
24
  */
@@ -48,6 +53,8 @@ export declare class NgpDatePickerDateButton<T> implements NgpCanDisable {
48
53
  * Determine if the element is a button.
49
54
  */
50
55
  protected readonly isButton: boolean;
56
+ constructor();
57
+ ngOnDestroy(): void;
51
58
  /**
52
59
  * When the button is clicked, select the date.
53
60
  */
@@ -4,6 +4,10 @@ export declare class NgpDatePickerGrid<T> {
4
4
  * Access the date picker.
5
5
  */
6
6
  private readonly datePicker;
7
+ /**
8
+ * Access the date picker state.
9
+ */
10
+ protected readonly state: import("dist/packages/ng-primitives/state").State<import("../date-picker/date-picker.state").NgpDatePickerState<T>>;
7
11
  /**
8
12
  * Determine the id for the label.
9
13
  */
@@ -1,9 +1,9 @@
1
1
  import * as i0 from "@angular/core";
2
- export declare class NgpDatePickerLabel {
2
+ export declare class NgpDatePickerLabel<T> {
3
3
  /**
4
4
  * Access the date picker.
5
5
  */
6
- protected readonly datePicker: import("ng-primitives/date-picker").NgpDatePicker<unknown>;
6
+ protected readonly state: import("dist/packages/ng-primitives/state").State<import("../date-picker/date-picker.state").NgpDatePickerState<T>>;
7
7
  /**
8
8
  * Define a unique id for the label.
9
9
  */
@@ -12,6 +12,6 @@ export declare class NgpDatePickerLabel {
12
12
  * Define the aria live attribute.
13
13
  */
14
14
  readonly ariaLive: import("@angular/core").InputSignal<string>;
15
- static ɵfac: i0.ɵɵFactoryDeclaration<NgpDatePickerLabel, never>;
16
- static ɵdir: i0.ɵɵDirectiveDeclaration<NgpDatePickerLabel, "[ngpDatePickerLabel]", ["ngpDatePickerLabel"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "ariaLive": { "alias": "aria-live"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgpDatePickerLabel<any>, never>;
16
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgpDatePickerLabel<any>, "[ngpDatePickerLabel]", ["ngpDatePickerLabel"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "ariaLive": { "alias": "aria-live"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
17
17
  }
@@ -7,8 +7,8 @@
7
7
  */
8
8
  import { InjectionToken } from '@angular/core';
9
9
  import type { NgpDatePickerLabel } from './date-picker-label.directive';
10
- export declare const NgpDatePickerLabelToken: InjectionToken<NgpDatePickerLabel>;
10
+ export declare const NgpDatePickerLabelToken: InjectionToken<NgpDatePickerLabel<unknown>>;
11
11
  /**
12
12
  * Inject the DatePickerLabel directive instance
13
13
  */
14
- export declare function injectDatePickerLabel(): NgpDatePickerLabel;
14
+ export declare function injectDatePickerLabel<T>(): NgpDatePickerLabel<T>;
@@ -14,6 +14,10 @@ export declare class NgpDatePickerNextMonth<T> implements NgpCanDisable {
14
14
  * Access the date picker.
15
15
  */
16
16
  private readonly datePicker;
17
+ /**
18
+ * Access the date picker state.
19
+ */
20
+ private readonly state;
17
21
  /**
18
22
  * Determine if this is a button element
19
23
  */
@@ -14,6 +14,10 @@ export declare class NgpDatePickerPreviousMonth<T> implements NgpCanDisable {
14
14
  * Access the date picker.
15
15
  */
16
16
  private readonly datePicker;
17
+ /**
18
+ * Access the date picker state.
19
+ */
20
+ private readonly state;
17
21
  /**
18
22
  * Determine if this is a button element
19
23
  */
@@ -15,7 +15,7 @@ export declare class NgpDatePickerRowRender<T> implements OnDestroy {
15
15
  /**
16
16
  * Access the date picker.
17
17
  */
18
- private readonly datePicker;
18
+ private readonly state;
19
19
  /**
20
20
  * Access the template ref for the cell.
21
21
  */
@@ -23,3 +23,4 @@ export { NgpDatePicker } from './date-picker/date-picker.directive';
23
23
  export { NgpDatePickerToken, injectDatePicker } from './date-picker/date-picker.token';
24
24
  export { NgpDatePickerCell } from './date-picker-cell/date-picker-cell.directive';
25
25
  export { NgpDatePickerCellToken, injectDatePickerCell, } from './date-picker-cell/date-picker-cell.token';
26
+ export { provideDatePickerState, injectDatePickerState } from './date-picker/date-picker.state';
@@ -2,83 +2,83 @@
2
2
  * This is a sample theme for the ng-primitives examples. It uses colors from the TailwindCSS palette.
3
3
  */
4
4
  :root {
5
- --white: oklch(1 0.001 0.001);
6
- --black: oklch(0 0.001 0.001);
5
+ --ngp-white: oklch(1 0.001 0.001);
6
+ --ngp-black: oklch(0 0.001 0.001);
7
7
 
8
- --gray-50: oklch(0.985 0 0);
9
- --gray-100: oklch(0.967 0.001 286.375);
10
- --gray-200: oklch(0.92 0.004 286.32);
11
- --gray-300: oklch(0.871 0.006 286.286);
12
- --gray-400: oklch(0.705 0.015 286.067);
13
- --gray-500: oklch(0.552 0.016 285.938);
14
- --gray-600: oklch(0.442 0.017 285.786);
15
- --gray-700: oklch(0.37 0.013 285.805);
16
- --gray-800: oklch(0.274 0.006 286.033);
17
- --gray-900: oklch(0.21 0.006 285.885);
18
- --gray-950: oklch(0.141 0.005 285.823);
8
+ --ngp-gray-50: oklch(0.985 0 0);
9
+ --ngp-gray-100: oklch(0.967 0.001 286.375);
10
+ --ngp-gray-200: oklch(0.92 0.004 286.32);
11
+ --ngp-gray-300: oklch(0.871 0.006 286.286);
12
+ --ngp-gray-400: oklch(0.705 0.015 286.067);
13
+ --ngp-gray-500: oklch(0.552 0.016 285.938);
14
+ --ngp-gray-600: oklch(0.442 0.017 285.786);
15
+ --ngp-gray-700: oklch(0.37 0.013 285.805);
16
+ --ngp-gray-800: oklch(0.274 0.006 286.033);
17
+ --ngp-gray-900: oklch(0.21 0.006 285.885);
18
+ --ngp-gray-950: oklch(0.141 0.005 285.823);
19
19
 
20
- --background: var(--white);
21
- --background-secondary: var(--gray-300);
22
- --background-hover: var(--gray-50);
23
- --background-active: var(--gray-100);
24
- --background-inverse: var(--black);
25
- --background-disabled: var(--gray-100);
26
- --background-blue: #dbeafe;
20
+ --ngp-background: var(--ngp-white);
21
+ --ngp-background-secondary: var(--ngp-gray-300);
22
+ --ngp-background-hover: var(--ngp-gray-50);
23
+ --ngp-background-active: var(--ngp-gray-100);
24
+ --ngp-background-inverse: var(--ngp-black);
25
+ --ngp-background-disabled: var(--ngp-gray-100);
26
+ --ngp-background-blue: #dbeafe;
27
27
 
28
- --border: var(--gray-200);
29
- --border-secondary: var(--gray-300);
30
- --border-blue: #3b82f6;
28
+ --ngp-border: var(--ngp-gray-200);
29
+ --ngp-border-secondary: var(--ngp-gray-300);
30
+ --ngp-border-blue: #3b82f6;
31
31
 
32
- --text-emphasis: var(--black);
33
- --text-primary: var(--gray-900);
34
- --text-secondary: var(--gray-600);
35
- --text-tertiary: var(--gray-500);
36
- --text-disabled: var(--gray-400);
37
- --text-placeholder: var(--gray-400);
38
- --text-inverse: var(--white);
39
- --text-blue: #3b82f6;
40
- --text-red: #ef4444;
32
+ --ngp-text-emphasis: var(--ngp-black);
33
+ --ngp-text-primary: var(--ngp-gray-900);
34
+ --ngp-text-secondary: var(--ngp-gray-600);
35
+ --ngp-text-tertiary: var(--ngp-gray-500);
36
+ --ngp-text-disabled: var(--ngp-gray-400);
37
+ --ngp-text-placeholder: var(--ngp-gray-400);
38
+ --ngp-text-inverse: var(--ngp-white);
39
+ --ngp-text-blue: #3b82f6;
40
+ --ngp-text-red: #ef4444;
41
41
 
42
- --shadow: 0 1px 2px 0 rgba(0 0 0 0.05);
42
+ --ngp-shadow: 0 1px 2px 0 rgba(0 0 0 0.05);
43
43
 
44
- --focus-ring: rgb(59 130 246);
44
+ --ngp-focus-ring: rgb(59 130 246);
45
45
 
46
- --avatar-background: #bae6fd;
47
- --avatar-border: #fff;
46
+ --ngp-avatar-background: #bae6fd;
47
+ --ngp-avatar-border: #fff;
48
48
 
49
- --button-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1),
49
+ --ngp-button-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1),
50
50
  0 0 0 1px rgb(0 0 0 / 0.05);
51
51
 
52
- --input-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(0, 0, 0, 0.1);
52
+ --ngp-input-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(0, 0, 0, 0.1);
53
53
  }
54
54
 
55
55
  .dark {
56
- --background: var(--gray-950);
57
- --background-secondary: var(--gray-700);
58
- --background-hover: var(--gray-900);
59
- --background-active: var(--gray-800);
60
- --background-inverse: var(--white);
61
- --background-disabled: var(--gray-900);
62
- --background-blue: rgba(95, 160, 246, 0.274);
56
+ --ngp-background: var(--ngp-gray-950);
57
+ --ngp-background-secondary: var(--ngp-gray-700);
58
+ --ngp-background-hover: var(--ngp-gray-900);
59
+ --ngp-background-active: var(--ngp-gray-800);
60
+ --ngp-background-inverse: var(--ngp-white);
61
+ --ngp-background-disabled: var(--ngp-gray-900);
62
+ --ngp-background-blue: rgba(95, 160, 246, 0.274);
63
63
 
64
- --border: var(--gray-800);
65
- --border-secondary: var(--gray-700);
66
- --border-blue: #1980ff;
64
+ --ngp-border: var(--ngp-gray-800);
65
+ --ngp-border-secondary: var(--ngp-gray-700);
66
+ --ngp-border-blue: #1980ff;
67
67
 
68
- --text-emphasis: var(--white);
69
- --text-primary: var(--gray-100);
70
- --text-secondary: var(--gray-300);
71
- --text-tertiary: var(--gray-400);
72
- --text-disabled: var(--gray-500);
73
- --text-inverse: var(--black);
74
- --text-blue: #1980ff;
75
- --text-red: #ff4d4d;
68
+ --ngp-text-emphasis: var(--ngp-white);
69
+ --ngp-text-primary: var(--ngp-gray-100);
70
+ --ngp-text-secondary: var(--ngp-gray-300);
71
+ --ngp-text-tertiary: var(--ngp-gray-400);
72
+ --ngp-text-disabled: var(--ngp-gray-500);
73
+ --ngp-text-inverse: var(--ngp-black);
74
+ --ngp-text-blue: #1980ff;
75
+ --ngp-text-red: #ff4d4d;
76
76
 
77
- --avatar-background: #18181b;
78
- --avatar-border: #3f3f46;
77
+ --ngp-avatar-background: #18181b;
78
+ --ngp-avatar-border: #3f3f46;
79
79
 
80
- --input-shadow: 0 1px 2px rgba(255, 255, 255, 0.007), 0 0 0 1px rgba(255, 255, 255, 0.1);
80
+ --ngp-input-shadow: 0 1px 2px rgba(255, 255, 255, 0.007), 0 0 0 1px rgba(255, 255, 255, 0.1);
81
81
 
82
- --button-shadow: 0 1px 3px 0 rgb(255, 255, 255, 0.1), 0 1px 2px -1px rgb(255, 255, 255, 0.1),
82
+ --ngp-button-shadow: 0 1px 3px 0 rgb(255, 255, 255, 0.1), 0 1px 2px -1px rgb(255, 255, 255, 0.1),
83
83
  0 0 0 1px rgb(255, 255, 255, 0.05);
84
84
  }
@@ -64,7 +64,6 @@ class NgpVisuallyHidden {
64
64
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: NgpVisuallyHidden, decorators: [{
65
65
  type: Directive,
66
66
  args: [{
67
- standalone: true,
68
67
  selector: '[ngpVisuallyHidden]',
69
68
  exportAs: 'ngpVisuallyHidden',
70
69
  providers: [{ provide: NgpVisuallyHiddenToken, useExisting: NgpVisuallyHidden }],
@@ -1 +1 @@
1
- {"version":3,"file":"ng-primitives-a11y.mjs","sources":["../../../../packages/ng-primitives/a11y/src/visually-hidden/visually-hidden.token.ts","../../../../packages/ng-primitives/a11y/src/visually-hidden/visually-hidden.directive.ts","../../../../packages/ng-primitives/a11y/src/index.ts","../../../../packages/ng-primitives/a11y/src/ng-primitives-a11y.ts"],"sourcesContent":["/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { InjectionToken, inject } from '@angular/core';\nimport type { NgpVisuallyHidden } from './visually-hidden.directive';\n\nexport const NgpVisuallyHiddenToken = new InjectionToken<NgpVisuallyHidden>(\n 'NgpVisuallyHiddenToken',\n);\n\n/**\n * Inject the VisuallyHidden directive instance\n */\nexport function injectVisuallyHidden(): NgpVisuallyHidden {\n return inject(NgpVisuallyHiddenToken);\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { Directive, computed, signal } from '@angular/core';\nimport { NgpVisuallyHiddenToken } from './visually-hidden.token';\n\n@Directive({\n standalone: true,\n selector: '[ngpVisuallyHidden]',\n exportAs: 'ngpVisuallyHidden',\n providers: [{ provide: NgpVisuallyHiddenToken, useExisting: NgpVisuallyHidden }],\n host: {\n '[style]': 'style()',\n },\n})\nexport class NgpVisuallyHidden {\n /**\n * Whether the element is hidden.\n */\n protected readonly hidden = signal<boolean>(true);\n\n protected readonly style = computed(() => {\n if (!this.hidden()) {\n return {};\n }\n\n return {\n position: 'absolute',\n width: '1px',\n height: '1px',\n margin: '-1px',\n padding: '0',\n overflow: 'hidden',\n clip: 'rect(0, 0, 0, 0)',\n whiteSpace: 'nowrap',\n border: '0',\n wordWrap: 'normal',\n outline: '0',\n '-webkit-appearance': 'none',\n '-moz-appearance': 'none',\n 'inset-inline-start': '0',\n };\n });\n\n /**\n * Set the element visibility.\n * @param visible\n */\n setVisibility(visible: boolean): void {\n this.hidden.set(!visible);\n }\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nexport * from './visually-hidden/visually-hidden.directive';\nexport {\n NgpVisuallyHiddenToken,\n injectVisuallyHidden,\n} from './visually-hidden/visually-hidden.token';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;;;;;;AAMG;MAIU,sBAAsB,GAAG,IAAI,cAAc,CACtD,wBAAwB;AAG1B;;AAEG;SACa,oBAAoB,GAAA;AAClC,IAAA,OAAO,MAAM,CAAC,sBAAsB,CAAC;AACvC;;ACnBA;;;;;;AAMG;MAaU,iBAAiB,CAAA;AAT9B,IAAA,WAAA,GAAA;AAUE;;AAEG;AACgB,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAU,IAAI,CAAC;AAE9B,QAAA,IAAA,CAAA,KAAK,GAAG,QAAQ,CAAC,MAAK;AACvC,YAAA,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE;AAClB,gBAAA,OAAO,EAAE;;YAGX,OAAO;AACL,gBAAA,QAAQ,EAAE,UAAU;AACpB,gBAAA,KAAK,EAAE,KAAK;AACZ,gBAAA,MAAM,EAAE,KAAK;AACb,gBAAA,MAAM,EAAE,MAAM;AACd,gBAAA,OAAO,EAAE,GAAG;AACZ,gBAAA,QAAQ,EAAE,QAAQ;AAClB,gBAAA,IAAI,EAAE,kBAAkB;AACxB,gBAAA,UAAU,EAAE,QAAQ;AACpB,gBAAA,MAAM,EAAE,GAAG;AACX,gBAAA,QAAQ,EAAE,QAAQ;AAClB,gBAAA,OAAO,EAAE,GAAG;AACZ,gBAAA,oBAAoB,EAAE,MAAM;AAC5B,gBAAA,iBAAiB,EAAE,MAAM;AACzB,gBAAA,oBAAoB,EAAE,GAAG;aAC1B;AACH,SAAC,CAAC;AASH;AAPC;;;AAGG;AACH,IAAA,aAAa,CAAC,OAAgB,EAAA;QAC5B,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC;;8GAlChB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAjB,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,qBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,OAAA,EAAA,SAAA,EAAA,EAAA,EAAA,SAAA,EALjB,CAAC,EAAE,OAAO,EAAE,sBAAsB,EAAE,WAAW,EAAE,iBAAiB,EAAE,CAAC,EAAA,QAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAKrE,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAT7B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,qBAAqB;AAC/B,oBAAA,QAAQ,EAAE,mBAAmB;oBAC7B,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,sBAAsB,EAAE,WAAW,EAAmB,iBAAA,EAAE,CAAC;AAChF,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,SAAS;AACrB,qBAAA;AACF,iBAAA;;;AClBD;;;;;;AAMG;;ACNH;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-primitives-a11y.mjs","sources":["../../../../packages/ng-primitives/a11y/src/visually-hidden/visually-hidden.token.ts","../../../../packages/ng-primitives/a11y/src/visually-hidden/visually-hidden.directive.ts","../../../../packages/ng-primitives/a11y/src/index.ts","../../../../packages/ng-primitives/a11y/src/ng-primitives-a11y.ts"],"sourcesContent":["/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { InjectionToken, inject } from '@angular/core';\nimport type { NgpVisuallyHidden } from './visually-hidden.directive';\n\nexport const NgpVisuallyHiddenToken = new InjectionToken<NgpVisuallyHidden>(\n 'NgpVisuallyHiddenToken',\n);\n\n/**\n * Inject the VisuallyHidden directive instance\n */\nexport function injectVisuallyHidden(): NgpVisuallyHidden {\n return inject(NgpVisuallyHiddenToken);\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { Directive, computed, signal } from '@angular/core';\nimport { NgpVisuallyHiddenToken } from './visually-hidden.token';\n\n@Directive({\n selector: '[ngpVisuallyHidden]',\n exportAs: 'ngpVisuallyHidden',\n providers: [{ provide: NgpVisuallyHiddenToken, useExisting: NgpVisuallyHidden }],\n host: {\n '[style]': 'style()',\n },\n})\nexport class NgpVisuallyHidden {\n /**\n * Whether the element is hidden.\n */\n protected readonly hidden = signal<boolean>(true);\n\n protected readonly style = computed(() => {\n if (!this.hidden()) {\n return {};\n }\n\n return {\n position: 'absolute',\n width: '1px',\n height: '1px',\n margin: '-1px',\n padding: '0',\n overflow: 'hidden',\n clip: 'rect(0, 0, 0, 0)',\n whiteSpace: 'nowrap',\n border: '0',\n wordWrap: 'normal',\n outline: '0',\n '-webkit-appearance': 'none',\n '-moz-appearance': 'none',\n 'inset-inline-start': '0',\n };\n });\n\n /**\n * Set the element visibility.\n * @param visible\n */\n setVisibility(visible: boolean): void {\n this.hidden.set(!visible);\n }\n}\n","/**\n * Copyright © 2024 Angular Primitives.\n * https://github.com/ng-primitives/ng-primitives\n *\n * This source code is licensed under the Apache 2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nexport * from './visually-hidden/visually-hidden.directive';\nexport {\n NgpVisuallyHiddenToken,\n injectVisuallyHidden,\n} from './visually-hidden/visually-hidden.token';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;;;;;;AAMG;MAIU,sBAAsB,GAAG,IAAI,cAAc,CACtD,wBAAwB;AAG1B;;AAEG;SACa,oBAAoB,GAAA;AAClC,IAAA,OAAO,MAAM,CAAC,sBAAsB,CAAC;AACvC;;ACnBA;;;;;;AAMG;MAYU,iBAAiB,CAAA;AAR9B,IAAA,WAAA,GAAA;AASE;;AAEG;AACgB,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAU,IAAI,CAAC;AAE9B,QAAA,IAAA,CAAA,KAAK,GAAG,QAAQ,CAAC,MAAK;AACvC,YAAA,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE;AAClB,gBAAA,OAAO,EAAE;;YAGX,OAAO;AACL,gBAAA,QAAQ,EAAE,UAAU;AACpB,gBAAA,KAAK,EAAE,KAAK;AACZ,gBAAA,MAAM,EAAE,KAAK;AACb,gBAAA,MAAM,EAAE,MAAM;AACd,gBAAA,OAAO,EAAE,GAAG;AACZ,gBAAA,QAAQ,EAAE,QAAQ;AAClB,gBAAA,IAAI,EAAE,kBAAkB;AACxB,gBAAA,UAAU,EAAE,QAAQ;AACpB,gBAAA,MAAM,EAAE,GAAG;AACX,gBAAA,QAAQ,EAAE,QAAQ;AAClB,gBAAA,OAAO,EAAE,GAAG;AACZ,gBAAA,oBAAoB,EAAE,MAAM;AAC5B,gBAAA,iBAAiB,EAAE,MAAM;AACzB,gBAAA,oBAAoB,EAAE,GAAG;aAC1B;AACH,SAAC,CAAC;AASH;AAPC;;;AAGG;AACH,IAAA,aAAa,CAAC,OAAgB,EAAA;QAC5B,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC;;8GAlChB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAjB,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,qBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,OAAA,EAAA,SAAA,EAAA,EAAA,EAAA,SAAA,EALjB,CAAC,EAAE,OAAO,EAAE,sBAAsB,EAAE,WAAW,EAAE,iBAAiB,EAAE,CAAC,EAAA,QAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAKrE,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAR7B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,qBAAqB;AAC/B,oBAAA,QAAQ,EAAE,mBAAmB;oBAC7B,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,sBAAsB,EAAE,WAAW,EAAmB,iBAAA,EAAE,CAAC;AAChF,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,SAAS;AACrB,qBAAA;AACF,iBAAA;;;ACjBD;;;;;;AAMG;;ACNH;;AAEG;;;;"}
@@ -78,7 +78,6 @@ class NgpAccordionContent {
78
78
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: NgpAccordionContent, decorators: [{
79
79
  type: Directive,
80
80
  args: [{
81
- standalone: true,
82
81
  selector: '[ngpAccordionContent]',
83
82
  exportAs: 'ngpAccordionContent',
84
83
  providers: [{ provide: NgpAccordionContentToken, useExisting: NgpAccordionContent }],
@@ -154,7 +153,6 @@ class NgpAccordionItem {
154
153
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: NgpAccordionItem, decorators: [{
155
154
  type: Directive,
156
155
  args: [{
157
- standalone: true,
158
156
  selector: '[ngpAccordionItem]',
159
157
  exportAs: 'ngpAccordionItem',
160
158
  providers: [{ provide: NgpAccordionItemToken, useExisting: NgpAccordionItem }],
@@ -203,7 +201,6 @@ class NgpAccordionTrigger {
203
201
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: NgpAccordionTrigger, decorators: [{
204
202
  type: Directive,
205
203
  args: [{
206
- standalone: true,
207
204
  selector: '[ngpAccordionTrigger]',
208
205
  exportAs: 'ngpAccordionTrigger',
209
206
  providers: [{ provide: NgpAccordionTriggerToken, useExisting: NgpAccordionTrigger }],
@@ -331,7 +328,6 @@ class NgpAccordion {
331
328
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: NgpAccordion, decorators: [{
332
329
  type: Directive,
333
330
  args: [{
334
- standalone: true,
335
331
  selector: '[ngpAccordion]',
336
332
  exportAs: 'ngpAccordion',
337
333
  providers: [{ provide: NgpAccordionToken, useExisting: NgpAccordion }],