ngwr 12.0.0 → 12.2.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 (155) hide show
  1. package/README.md +79 -20
  2. package/alert/styles/_index.scss +11 -4
  3. package/badge/styles/_index.scss +30 -0
  4. package/badge/styles/_tag.scss +15 -1
  5. package/descriptions/styles/_index.scss +13 -3
  6. package/drawer/styles/_index.scss +95 -1
  7. package/fesm2022/ngwr-action-sheet.mjs +3 -3
  8. package/fesm2022/ngwr-affix.mjs +3 -3
  9. package/fesm2022/ngwr-alert.mjs +3 -3
  10. package/fesm2022/ngwr-anchor.mjs +3 -3
  11. package/fesm2022/ngwr-aurora.mjs +3 -3
  12. package/fesm2022/ngwr-avatar.mjs +3 -3
  13. package/fesm2022/ngwr-back-top.mjs +3 -3
  14. package/fesm2022/ngwr-badge.mjs +6 -6
  15. package/fesm2022/ngwr-bar-chart.mjs +3 -3
  16. package/fesm2022/ngwr-blur-text.mjs +3 -3
  17. package/fesm2022/ngwr-border-glow.mjs +3 -3
  18. package/fesm2022/ngwr-breadcrumbs.mjs +6 -6
  19. package/fesm2022/ngwr-burger.mjs +3 -3
  20. package/fesm2022/ngwr-button.mjs +6 -6
  21. package/fesm2022/ngwr-calendar-heatmap.mjs +3 -3
  22. package/fesm2022/ngwr-calendar.mjs +3 -3
  23. package/fesm2022/ngwr-card.mjs +9 -9
  24. package/fesm2022/ngwr-carousel.mjs +6 -6
  25. package/fesm2022/ngwr-cascader.mjs +3 -3
  26. package/fesm2022/ngwr-checkbox.mjs +6 -6
  27. package/fesm2022/ngwr-circular-text.mjs +3 -3
  28. package/fesm2022/ngwr-click-spark.mjs +3 -3
  29. package/fesm2022/ngwr-clipboard.mjs +3 -3
  30. package/fesm2022/ngwr-collapse.mjs +9 -9
  31. package/fesm2022/ngwr-color-picker.mjs +6 -6
  32. package/fesm2022/ngwr-color-picker.mjs.map +1 -1
  33. package/fesm2022/ngwr-command-palette.mjs +3 -3
  34. package/fesm2022/ngwr-compare.mjs +3 -3
  35. package/fesm2022/ngwr-confetti.mjs +3 -3
  36. package/fesm2022/ngwr-context-menu.mjs +12 -12
  37. package/fesm2022/ngwr-cookie.mjs +3 -3
  38. package/fesm2022/ngwr-counter.mjs +6 -6
  39. package/fesm2022/ngwr-date-adapters-fns.mjs +3 -3
  40. package/fesm2022/ngwr-date-adapters-luxon.mjs +3 -3
  41. package/fesm2022/ngwr-date-picker.mjs +18 -18
  42. package/fesm2022/ngwr-date.mjs +3 -3
  43. package/fesm2022/ngwr-decrypt-text.mjs +3 -3
  44. package/fesm2022/ngwr-density.mjs +6 -6
  45. package/fesm2022/ngwr-descriptions.mjs +6 -6
  46. package/fesm2022/ngwr-dialog.mjs +15 -15
  47. package/fesm2022/ngwr-directives.mjs +12 -12
  48. package/fesm2022/ngwr-divider.mjs +3 -3
  49. package/fesm2022/ngwr-donut-chart.mjs +3 -3
  50. package/fesm2022/ngwr-drag-drop.mjs +6 -6
  51. package/fesm2022/ngwr-drawer.mjs +24 -18
  52. package/fesm2022/ngwr-drawer.mjs.map +1 -1
  53. package/fesm2022/ngwr-dropdown.mjs +9 -9
  54. package/fesm2022/ngwr-empty.mjs +3 -3
  55. package/fesm2022/ngwr-event-calendar.mjs +6 -6
  56. package/fesm2022/ngwr-falling-text.mjs +3 -3
  57. package/fesm2022/ngwr-file-upload.mjs +3 -3
  58. package/fesm2022/ngwr-form.mjs +9 -9
  59. package/fesm2022/ngwr-fuzzy-text.mjs +3 -3
  60. package/fesm2022/ngwr-gauge.mjs +3 -3
  61. package/fesm2022/ngwr-glitch-text.mjs +3 -3
  62. package/fesm2022/ngwr-gradient-text.mjs +3 -3
  63. package/fesm2022/ngwr-hotkey.mjs +6 -6
  64. package/fesm2022/ngwr-i18n.mjs +9 -9
  65. package/fesm2022/ngwr-icon.mjs +6 -6
  66. package/fesm2022/ngwr-image-cropper.mjs +3 -3
  67. package/fesm2022/ngwr-input-number.mjs +3 -3
  68. package/fesm2022/ngwr-input-otp.mjs +3 -3
  69. package/fesm2022/ngwr-input.mjs +15 -15
  70. package/fesm2022/ngwr-keyboard.mjs +3 -3
  71. package/fesm2022/ngwr-knob.mjs +3 -3
  72. package/fesm2022/ngwr-layout.mjs +15 -15
  73. package/fesm2022/ngwr-lightbox.mjs +3 -3
  74. package/fesm2022/ngwr-line-chart.mjs +3 -3
  75. package/fesm2022/ngwr-list.mjs +6 -6
  76. package/fesm2022/ngwr-loading-bar.mjs +6 -6
  77. package/fesm2022/ngwr-markdown.mjs +6 -6
  78. package/fesm2022/ngwr-marquee.mjs +3 -3
  79. package/fesm2022/ngwr-media.mjs +3 -3
  80. package/fesm2022/ngwr-mention.mjs +6 -6
  81. package/fesm2022/ngwr-meta.mjs +6 -6
  82. package/fesm2022/ngwr-meter-group.mjs +3 -3
  83. package/fesm2022/ngwr-overlay.mjs +6 -6
  84. package/fesm2022/ngwr-page-header.mjs +3 -3
  85. package/fesm2022/ngwr-pagination.mjs +72 -9
  86. package/fesm2022/ngwr-pagination.mjs.map +1 -1
  87. package/fesm2022/ngwr-pipes.mjs +21 -21
  88. package/fesm2022/ngwr-platform.mjs +9 -9
  89. package/fesm2022/ngwr-popconfirm.mjs +6 -6
  90. package/fesm2022/ngwr-popover.mjs +6 -6
  91. package/fesm2022/ngwr-progress.mjs +3 -3
  92. package/fesm2022/ngwr-pull-to-refresh.mjs +3 -3
  93. package/fesm2022/ngwr-qr.mjs +3 -3
  94. package/fesm2022/ngwr-radio.mjs +6 -6
  95. package/fesm2022/ngwr-rating.mjs +3 -3
  96. package/fesm2022/ngwr-result.mjs +12 -12
  97. package/fesm2022/ngwr-rotating-text.mjs +3 -3
  98. package/fesm2022/ngwr-scroll.mjs +3 -3
  99. package/fesm2022/ngwr-segmented-testing.mjs +71 -0
  100. package/fesm2022/ngwr-segmented-testing.mjs.map +1 -1
  101. package/fesm2022/ngwr-segmented.mjs +98 -8
  102. package/fesm2022/ngwr-segmented.mjs.map +1 -1
  103. package/fesm2022/ngwr-select.mjs +22 -12
  104. package/fesm2022/ngwr-select.mjs.map +1 -1
  105. package/fesm2022/ngwr-shiny-text.mjs +6 -6
  106. package/fesm2022/ngwr-sidebar.mjs +3 -3
  107. package/fesm2022/ngwr-skeleton.mjs +3 -3
  108. package/fesm2022/ngwr-slider.mjs +3 -3
  109. package/fesm2022/ngwr-sparkline.mjs +3 -3
  110. package/fesm2022/ngwr-speed-dial.mjs +3 -3
  111. package/fesm2022/ngwr-spinner.mjs +3 -3
  112. package/fesm2022/ngwr-splash-cursor.mjs +3 -3
  113. package/fesm2022/ngwr-split-text.mjs +3 -3
  114. package/fesm2022/ngwr-splitter.mjs +3 -3
  115. package/fesm2022/ngwr-spotlight-card.mjs +6 -6
  116. package/fesm2022/ngwr-squircle.mjs +6 -6
  117. package/fesm2022/ngwr-star-border.mjs +3 -3
  118. package/fesm2022/ngwr-statistic.mjs +9 -9
  119. package/fesm2022/ngwr-stepper.mjs +6 -6
  120. package/fesm2022/ngwr-storage.mjs +3 -3
  121. package/fesm2022/ngwr-switch.mjs +3 -3
  122. package/fesm2022/ngwr-table.mjs +18 -18
  123. package/fesm2022/ngwr-tabs.mjs +6 -6
  124. package/fesm2022/ngwr-textarea.mjs +3 -3
  125. package/fesm2022/ngwr-theme.mjs +3 -3
  126. package/fesm2022/ngwr-tilt-card.mjs +6 -6
  127. package/fesm2022/ngwr-timeline.mjs +6 -6
  128. package/fesm2022/ngwr-toast.mjs +9 -9
  129. package/fesm2022/ngwr-toolbar.mjs +3 -3
  130. package/fesm2022/ngwr-tour.mjs +6 -6
  131. package/fesm2022/ngwr-transfer.mjs +3 -3
  132. package/fesm2022/ngwr-tree.mjs +3 -3
  133. package/fesm2022/ngwr-typewriter.mjs +3 -3
  134. package/fesm2022/ngwr-typography.mjs +3 -3
  135. package/fesm2022/ngwr-version.mjs +1 -1
  136. package/fesm2022/ngwr-version.mjs.map +1 -1
  137. package/fesm2022/ngwr-virtual-scroll.mjs +3 -3
  138. package/fesm2022/ngwr-waves.mjs +3 -3
  139. package/fesm2022/ngwr-window.mjs +12 -12
  140. package/llms-full.txt +1 -1
  141. package/llms.txt +24 -2
  142. package/overlay/styles/_arrow.scss +243 -0
  143. package/package.json +1 -1
  144. package/popconfirm/styles/_index.scss +17 -0
  145. package/popover/styles/_index.scss +49 -207
  146. package/select/styles/_index.scss +30 -4
  147. package/sidebar/styles/_index.scss +4 -1
  148. package/stepper/styles/_index.scss +44 -5
  149. package/theme/styles/_mixins.scss +10 -0
  150. package/tree/styles/_index.scss +10 -2
  151. package/types/ngwr-pagination.d.ts +11 -0
  152. package/types/ngwr-segmented-testing.d.ts +44 -0
  153. package/types/ngwr-segmented.d.ts +86 -4
  154. package/types/ngwr-select.d.ts +12 -2
  155. package/types/ngwr-version.d.ts +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-color-picker.mjs","sources":["../../../projects/lib/color-picker/color/rgb-to-hsv.ts","../../../projects/lib/color-picker/color/hsv-to-rgb.ts","../../../projects/lib/color-picker/color/rgb-to-hsl.ts","../../../projects/lib/color-picker/color/hsl-to-rgb.ts","../../../projects/lib/color-picker/color/parse-hex.ts","../../../projects/lib/color-picker/color/to-hex.ts","../../../projects/lib/color-picker/color/parse-color.ts","../../../projects/lib/color-picker/color/format-color.ts","../../../projects/lib/color-picker/color-picker.ts","../../../projects/lib/color-picker/color-picker.html","../../../projects/lib/color-picker/color-picker-trigger.ts","../../../projects/lib/color-picker/ngwr-color-picker.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport type { WrHsv } from './wr-hsv';\nimport type { WrRgb } from './wr-rgb';\n\n/**\n * Convert sRGB to HSV. Preserves alpha.\n */\nexport function rgbToHsv(rgb: WrRgb): WrHsv {\n const r = rgb.r / 255;\n const g = rgb.g / 255;\n const b = rgb.b / 255;\n const max = Math.max(r, g, b);\n const min = Math.min(r, g, b);\n const d = max - min;\n\n let h = 0;\n if (d !== 0) {\n if (max === r) h = ((g - b) / d) % 6;\n else if (max === g) h = (b - r) / d + 2;\n else h = (r - g) / d + 4;\n h *= 60;\n if (h < 0) h += 360;\n }\n\n const s = max === 0 ? 0 : d / max;\n const v = max;\n\n return { h, s, v, a: rgb.a };\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport type { WrHsv } from './wr-hsv';\nimport type { WrRgb } from './wr-rgb';\n\n/**\n * Convert HSV to sRGB. Preserves alpha. Returns integer channels in `[0, 255]`.\n */\nexport function hsvToRgb(hsv: WrHsv): WrRgb {\n const { h, s, v } = hsv;\n const c = v * s;\n const x = c * (1 - Math.abs(((h / 60) % 2) - 1));\n const m = v - c;\n\n let r = 0;\n let g = 0;\n let b = 0;\n\n if (h < 60) {\n r = c;\n g = x;\n } else if (h < 120) {\n r = x;\n g = c;\n } else if (h < 180) {\n g = c;\n b = x;\n } else if (h < 240) {\n g = x;\n b = c;\n } else if (h < 300) {\n r = x;\n b = c;\n } else {\n r = c;\n b = x;\n }\n\n return {\n r: Math.round((r + m) * 255),\n g: Math.round((g + m) * 255),\n b: Math.round((b + m) * 255),\n a: hsv.a,\n };\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport type { WrHsl } from './wr-hsl';\nimport type { WrRgb } from './wr-rgb';\n\n/**\n * Convert sRGB to HSL. Preserves alpha.\n */\nexport function rgbToHsl(rgb: WrRgb): WrHsl {\n const r = rgb.r / 255;\n const g = rgb.g / 255;\n const b = rgb.b / 255;\n const max = Math.max(r, g, b);\n const min = Math.min(r, g, b);\n const d = max - min;\n const l = (max + min) / 2;\n\n let h = 0;\n let s = 0;\n\n if (d !== 0) {\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n\n if (max === r) h = (g - b) / d + (g < b ? 6 : 0);\n else if (max === g) h = (b - r) / d + 2;\n else h = (r - g) / d + 4;\n\n h *= 60;\n }\n\n return { h, s, l, a: rgb.a };\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport type { WrHsl } from './wr-hsl';\nimport type { WrRgb } from './wr-rgb';\n\nfunction hueToChannel(p: number, q: number, t: number): number {\n let x = t;\n if (x < 0) x += 1;\n if (x > 1) x -= 1;\n if (x < 1 / 6) return p + (q - p) * 6 * x;\n if (x < 1 / 2) return q;\n if (x < 2 / 3) return p + (q - p) * (2 / 3 - x) * 6;\n return p;\n}\n\n/**\n * Convert HSL to sRGB. Preserves alpha. Returns integer channels in `[0, 255]`.\n */\nexport function hslToRgb(hsl: WrHsl): WrRgb {\n const h = hsl.h / 360;\n const { s, l } = hsl;\n\n let r: number;\n let g: number;\n let b: number;\n\n if (s === 0) {\n r = l;\n g = l;\n b = l;\n } else {\n const q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n const p = 2 * l - q;\n r = hueToChannel(p, q, h + 1 / 3);\n g = hueToChannel(p, q, h);\n b = hueToChannel(p, q, h - 1 / 3);\n }\n\n return {\n r: Math.round(r * 255),\n g: Math.round(g * 255),\n b: Math.round(b * 255),\n a: hsl.a,\n };\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport type { WrRgb } from './wr-rgb';\n\n/**\n * Parse a CSS hex colour into {@link WrRgb}. Accepts 3, 4, 6, or 8 digit\n * forms with or without a leading `#`. Returns `null` for anything that\n * isn't a valid hex string.\n *\n * @example\n * ```ts\n * parseHex('#f00'); // { r: 255, g: 0, b: 0, a: 1 }\n * parseHex('3969e2'); // { r: 57, g: 105, b: 226, a: 1 }\n * parseHex('#3969e2ff'); // { r: 57, g: 105, b: 226, a: 1 }\n * parseHex('nope'); // null\n * ```\n */\nexport function parseHex(input: string): WrRgb | null {\n if (typeof input !== 'string') return null;\n\n let str = input.trim().replace(/^#/, '').toLowerCase();\n\n // Expand shorthand: rgb → rrggbb, rgba → rrggbbaa\n if (str.length === 3 || str.length === 4) {\n str = str\n .split('')\n .map(c => c + c)\n .join('');\n }\n\n if (str.length !== 6 && str.length !== 8) return null;\n if (!/^[0-9a-f]+$/.test(str)) return null;\n\n const r = parseInt(str.slice(0, 2), 16);\n const g = parseInt(str.slice(2, 4), 16);\n const b = parseInt(str.slice(4, 6), 16);\n const a = str.length === 8 ? parseInt(str.slice(6, 8), 16) / 255 : 1;\n\n return { r, g, b, a };\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport type { WrRgb } from './wr-rgb';\n\nfunction channelToHex(n: number): string {\n const clamped = Math.max(0, Math.min(255, Math.round(n)));\n return clamped.toString(16).padStart(2, '0');\n}\n\n/**\n * Format a {@link WrRgb} as a CSS hex string with a leading `#`. When\n * `withAlpha` is `true` the result is 8 digits (`#rrggbbaa`); otherwise\n * 6 digits.\n *\n * @example\n * ```ts\n * toHex({ r: 57, g: 105, b: 226, a: 1 }); // '#3969e2'\n * toHex({ r: 57, g: 105, b: 226, a: 0.5 }, true); // '#3969e280'\n * ```\n */\nexport function toHex(rgb: WrRgb, withAlpha = false): string {\n const r = channelToHex(rgb.r);\n const g = channelToHex(rgb.g);\n const b = channelToHex(rgb.b);\n if (withAlpha) {\n const a = channelToHex(rgb.a * 255);\n return `#${r}${g}${b}${a}`;\n }\n return `#${r}${g}${b}`;\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { clamp } from 'ngwr/utils';\n\nimport { hslToRgb } from './hsl-to-rgb';\nimport { parseHex } from './parse-hex';\nimport type { WrRgb } from './wr-rgb';\n\n/**\n * `rgb(…)` / `rgba(…)`, comma- or space-separated, with an optional `/ alpha`.\n * Signs are accepted so an out-of-range channel CLAMPS the way CSS clamps it,\n * rather than failing to parse and reading as black.\n */\nconst RGB_RE = /^rgba?\\(\\s*(-?[\\d.]+)\\s*[,\\s]\\s*(-?[\\d.]+)\\s*[,\\s]\\s*(-?[\\d.]+)\\s*(?:[,/]\\s*(-?[\\d.]+%?)\\s*)?\\)$/i;\n\n/** `hsl(…)` / `hsla(…)`, with `%` optional on saturation and lightness. */\nconst HSL_RE =\n /^hsla?\\(\\s*(-?[\\d.]+)(?:deg)?\\s*[,\\s]\\s*(-?[\\d.]+)%?\\s*[,\\s]\\s*(-?[\\d.]+)%?\\s*(?:[,/]\\s*(-?[\\d.]+%?)\\s*)?\\)$/i;\n\n/** `0.5` and `50%` are the same alpha; anything absent is fully opaque. */\nfunction alphaOf(raw: string | undefined): number {\n if (raw === undefined) return 1;\n const value = raw.endsWith('%') ? Number(raw.slice(0, -1)) / 100 : Number(raw);\n return Number.isFinite(value) ? clamp(value, 0, 1) : 1;\n}\n\nfunction channel(raw: string): number {\n return clamp(Math.round(Number(raw)), 0, 255);\n}\n\n/**\n * Read a colour written in any format `<wr-color-picker>` can emit — hex,\n * `rgb()` / `rgba()`, `hsl()` / `hsla()` — or `null` when it is none of them.\n *\n * The picker emits in whichever format it was given, so a `[(value)]` binding\n * hands its own output straight back on the next external write. Accepting only\n * hex there (which is what it used to do) turned every non-hex value into black.\n *\n * `null` rather than a throw or a black fallback: the caller is often a text\n * field mid-typing, where \"not valid yet\" is the normal state.\n */\nexport function parseColor(input: string): WrRgb | null {\n const value = input.trim();\n if (value === '') return null;\n\n const hex = parseHex(value);\n if (hex) return hex;\n\n const rgb = RGB_RE.exec(value);\n if (rgb) {\n return { r: channel(rgb[1]), g: channel(rgb[2]), b: channel(rgb[3]), a: alphaOf(rgb[4]) };\n }\n\n const hsl = HSL_RE.exec(value);\n if (hsl) {\n return hslToRgb({\n // Normalised here rather than trusted downstream: `hslToRgb` happens to\n // absorb one negative turn inside `hueToChannel`, which is an internal\n // detail this function should not be leaning on.\n h: ((Number(hsl[1]) % 360) + 360) % 360,\n s: clamp(Number(hsl[2]) / 100, 0, 1),\n l: clamp(Number(hsl[3]) / 100, 0, 1),\n a: alphaOf(hsl[4]),\n });\n }\n\n return null;\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport type { WrColorFormat } from '../interfaces';\n\nimport { rgbToHsl } from './rgb-to-hsl';\nimport { toHex } from './to-hex';\nimport type { WrRgb } from './wr-rgb';\n\n/** Alpha with at most two decimals, and no trailing zeroes: `0.5`, not `0.50`. */\nfunction alphaText(a: number): string {\n return String(Math.round(a * 100) / 100);\n}\n\n/**\n * Render a colour in the format a `<wr-color-picker>` was asked for.\n *\n * `withAlpha` follows the picker's own `alpha` input, so each format has an\n * opaque and a translucent spelling — `#3969e2` / `#3969e2ff`,\n * `rgb(…)` / `rgba(…)`, `hsl(…)` / `hsla(…)` — and a picker with the alpha\n * slider turned off never emits a channel the caller cannot see or edit.\n */\nexport function formatColor(rgb: WrRgb, format: WrColorFormat, withAlpha: boolean): string {\n if (format === 'hex') return toHex(rgb, withAlpha);\n\n if (format === 'rgba') {\n const { r, g, b } = rgb;\n return withAlpha ? `rgba(${r}, ${g}, ${b}, ${alphaText(rgb.a)})` : `rgb(${r}, ${g}, ${b})`;\n }\n\n const { h, s, l } = rgbToHsl(rgb);\n const parts = `${Math.round(h)}, ${Math.round(s * 100)}%, ${Math.round(l * 100)}%`;\n return withAlpha ? `hsla(${parts}, ${alphaText(rgb.a)})` : `hsl(${parts})`;\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { DecimalPipe } from '@angular/common';\nimport { Component, ViewEncapsulation, computed, effect, input, model, output, signal } from '@angular/core';\nimport type { FormValueControl } from '@angular/forms/signals';\n\nimport { readI18nText, useI18nFormatter } from 'ngwr/i18n';\nimport { WrSegmented, type WrSegmentedOption } from 'ngwr/segmented';\nimport { clamp } from 'ngwr/utils';\n\nimport {\n formatColor,\n hslToRgb,\n hsvToRgb,\n parseColor,\n parseHex,\n rgbToHsl,\n rgbToHsv,\n toHex,\n type WrHsl,\n type WrRgb,\n} from './color';\nimport type { WrColorFormat } from './interfaces';\n\ntype Tab = 'hex' | 'rgb' | 'hsl';\n\ntype Edges = 'sv' | 'hue' | 'alpha';\n\n/** Arrow step, in each surface's own unit: degrees of hue, percent everywhere else. */\nconst KEY_STEP = 1;\nconst KEY_STEP_COARSE = 10;\n\n/** Whether a hex string carries its own alpha (`#rgba` or `#rrggbbaa`). */\nfunction hasAlphaDigits(hex: string): boolean {\n const digits = hex.trim().replace(/^#/, '').length;\n return digits === 4 || digits === 8;\n}\n\n/**\n * Inline colour picker — HSV canvas, hue slider, optional alpha slider, HEX\n * input.\n *\n * A signal-forms native control: it implements `FormValueControl<string>`, so\n * `[formField]` binds straight to its `value` model — no\n * `ControlValueAccessor` in between. `[(value)]` works standalone. Output is\n * always a hex string.\n *\n * @example\n * ```html\n * <!-- signal forms -->\n * <wr-color-picker [formField]=\"form.brandColor\" />\n *\n * <!-- standalone two-way binding -->\n * <wr-color-picker [(value)]=\"brandColor\" [alpha]=\"false\" />\n * ```\n *\n * @see https://ngwr.dev/reference/components/color-picker\n */\n@Component({\n selector: 'wr-color-picker',\n templateUrl: './color-picker.html',\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class]': 'classes()',\n '[style.--wr-color-picker-hue]': 'hueCss()',\n '[style.--wr-color-picker-rgb]': 'rgbCss()',\n },\n imports: [DecimalPipe, WrSegmented],\n})\nexport class WrColorPicker implements FormValueControl<string> {\n /** Render the alpha slider and emit 8-digit hex / `rgba()`. @default true */\n readonly alpha = input(true, { transform: coerceBooleanProperty });\n\n /** Disable interaction. @default false */\n readonly disabled = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Format the control writes into `value`. See {@link WrColorFormat} — all\n * three are accepted on the way in whichever one is set. @default 'hex'\n */\n readonly format = input<WrColorFormat>('hex');\n\n /** Preset hex colours rendered as a clickable row beneath the inputs. Empty = no row. @default [] */\n readonly swatches = input<readonly string[]>([]);\n\n /** The selected colour as a string. Bound by `[formField]`, or two-way via `[(value)]`. */\n readonly value = model<string>('');\n\n /** Emitted on blur so a bound field can mark itself touched. */\n readonly touch = output<void>();\n\n // Source of truth: HSV + alpha\n\n protected readonly h = signal(0);\n protected readonly s = signal(0);\n protected readonly v = signal(0);\n protected readonly a = signal(1);\n\n // Derived values\n\n /** RGB view of the current colour, computed lazily. */\n protected readonly rgb = computed<WrRgb>(() => hsvToRgb({ h: this.h(), s: this.s(), v: this.v(), a: this.a() }));\n\n /** Canonical hex — what the HEX field shows, whatever `format` emits. */\n protected readonly hex = computed(() => toHex(this.rgb(), this.alpha()));\n\n /** The colour as the consumer asked for it; this is what `value` receives. */\n protected readonly formatted = computed(() => formatColor(this.rgb(), this.format(), this.alpha()));\n\n /** SV canvas background colour (full-saturation hue). */\n protected readonly hueCss = computed(() => `hsl(${this.h()}, 100%, 50%)`);\n\n /** RGB string used for the alpha-slider gradient. */\n protected readonly rgbCss = computed(() => {\n const { r, g, b } = this.rgb();\n return `${r}, ${g}, ${b}`;\n });\n\n /** Thumb positions in % for each surface. */\n protected readonly svThumbX = computed(() => this.s() * 100);\n protected readonly svThumbY = computed(() => (1 - this.v()) * 100);\n protected readonly hueThumbX = computed(() => (this.h() / 360) * 100);\n protected readonly alphaThumbX = computed(() => this.a() * 100);\n\n /** Mirror of the canonical hex, edited by the user via the input field. */\n protected readonly hexInput = signal('');\n\n /** Active tab in the input switcher. */\n protected readonly activeTab = signal<Tab>('hex');\n\n /** HSL view of the current colour, computed lazily. */\n protected readonly hslView = computed<WrHsl>(() => rgbToHsl(this.rgb()));\n\n /** Alpha as integer percent — the numeric tabs and the alpha slider's `aria-valuenow`. */\n protected readonly alphaPercent = computed(() => Math.round(this.a() * 100));\n\n /** Hue in whole degrees, for the hue slider's `aria-valuenow`. */\n protected readonly hueValue = computed(() => Math.round(this.h()));\n\n private readonly areaLabel = useI18nFormatter(\n 'colorPicker.area',\n 'Saturation and brightness, {{saturation}}% and {{brightness}}%'\n );\n\n /** Name of the SV surface, carrying the two values a `role=\"group\"` cannot. */\n protected readonly resolvedAreaLabel = computed(() =>\n this.areaLabel({ saturation: Math.round(this.s() * 100), brightness: Math.round(this.v() * 100) })\n );\n\n protected readonly resolvedHueLabel = readI18nText('colorPicker.hue', 'Hue');\n protected readonly resolvedAlphaLabel = readI18nText('colorPicker.alpha', 'Opacity');\n\n protected readonly tabOptions: readonly WrSegmentedOption<Tab>[] = [\n { value: 'hex', label: 'HEX' },\n { value: 'rgb', label: 'RGB' },\n { value: 'hsl', label: 'HSL' },\n ];\n\n protected readonly classes = computed(() => {\n const parts = ['wr-color-picker'];\n if (this.alpha()) parts.push('wr-color-picker--alpha');\n if (this.disabled()) parts.push('wr-color-picker--disabled');\n return parts.join(' ');\n });\n\n /**\n * The one write we just made, held only until the sync effect has seen it.\n *\n * It exists so a drag keeps its continuous HSV values instead of being\n * re-quantised through its own hex round-trip. It used to be set and never\n * cleared, which turned \"ignore this write\" into \"ignore this STRING,\n * forever\": after the picker emitted `#ff0000` once, an app writing\n * `#ff0000` back — a reset button, a form patch, an undo — was silently\n * dropped for the rest of the component's life, and the surface kept\n * whatever colour the user had dragged to.\n */\n private lastEmitted: string | null = null;\n\n constructor() {\n // External writes (via `[formField]` / `[(value)]`) flow the incoming hex\n // string back into the HSV source of truth. Our own emits are skipped via\n // `lastEmitted` so dragging keeps its continuous (unquantised) values.\n effect(() => {\n const value = this.value();\n if (value === this.lastEmitted) {\n // Ours, and now observed. Release the guard so the NEXT write of the\n // same string — which can only come from outside — is honoured.\n this.lastEmitted = null;\n return;\n }\n const rgb = parseColor(value) ?? { r: 0, g: 0, b: 0, a: 1 };\n const hsv = rgbToHsv(rgb);\n this.h.set(hsv.h);\n this.s.set(hsv.s);\n this.v.set(hsv.v);\n this.a.set(hsv.a);\n this.hexInput.set(toHex(rgb, this.alpha()));\n });\n }\n\n // Drag handlers\n\n protected onPointerDown(event: PointerEvent, surface: Edges): void {\n if (this.disabled()) return;\n // Primary button, primary pointer: a right-click used to open the context\n // menu AND start a drag, and a second finger used to fight the first one.\n if (event.button !== 0 || !event.isPrimary) return;\n event.preventDefault();\n const target = event.currentTarget as HTMLElement;\n target.setPointerCapture(event.pointerId);\n\n const update = (e: PointerEvent): void => this.updateFromEvent(e, target, surface);\n const cleanup = (e: PointerEvent): void => {\n target.releasePointerCapture(e.pointerId);\n target.removeEventListener('pointermove', update);\n target.removeEventListener('pointerup', cleanup);\n target.removeEventListener('pointercancel', cleanup);\n this.touch.emit();\n };\n\n target.addEventListener('pointermove', update);\n target.addEventListener('pointerup', cleanup);\n // `pointercancel` never sends a `pointerup` after it, so without this the\n // move listener outlived the drag: a cancelled gesture left the surface\n // repainting the colour under a pointer that was only hovering.\n target.addEventListener('pointercancel', cleanup);\n this.updateFromEvent(event, target, surface);\n }\n\n // Keyboard handlers\n //\n // The three surfaces used to be bare `<div>`s carrying nothing but\n // `(pointerdown)` — no role, no name, no tab stop, no key handler — so the\n // control the component is built around was operable by pointer only. The\n // numeric HEX / RGB / HSL fields could always reach the same values, which is\n // why this is 4.1.2 rather than a total loss of keyboard access, but a\n // roleless div driving a colour is WCAG F59 either way.\n\n /**\n * Hue and alpha are real one-value sliders, so they take the APG slider keys —\n * the same set `wr-knob` and `wr-slider` implement, including Home / End.\n */\n protected onSliderKeydown(event: KeyboardEvent, surface: 'hue' | 'alpha'): void {\n if (this.disabled()) return;\n const step = event.shiftKey ? KEY_STEP_COARSE : KEY_STEP;\n const max = surface === 'hue' ? 360 : 100;\n const current = surface === 'hue' ? this.h() : this.a() * 100;\n let next: number;\n switch (event.key) {\n case 'ArrowRight':\n case 'ArrowUp':\n next = current + step;\n break;\n case 'ArrowLeft':\n case 'ArrowDown':\n next = current - step;\n break;\n case 'Home':\n next = 0;\n break;\n case 'End':\n next = max;\n break;\n default:\n return;\n }\n event.preventDefault();\n const value = clamp(next, 0, max);\n if (surface === 'hue') this.h.set(value);\n else this.a.set(value / 100);\n this.emit();\n }\n\n /**\n * The SV canvas is two axes at once, so the keys follow the picture: left and\n * right run along saturation, up and down along brightness — the directions\n * the thumb visibly moves. Shift takes ten percent at a time.\n */\n protected onAreaKeydown(event: KeyboardEvent): void {\n if (this.disabled()) return;\n const step = (event.shiftKey ? KEY_STEP_COARSE : KEY_STEP) / 100;\n switch (event.key) {\n case 'ArrowRight':\n this.s.set(clamp(this.s() + step, 0, 1));\n break;\n case 'ArrowLeft':\n this.s.set(clamp(this.s() - step, 0, 1));\n break;\n case 'ArrowUp':\n this.v.set(clamp(this.v() + step, 0, 1));\n break;\n case 'ArrowDown':\n this.v.set(clamp(this.v() - step, 0, 1));\n break;\n default:\n return;\n }\n event.preventDefault();\n this.emit();\n }\n\n /** Leaving a surface is what \"touched\" means, the same as leaving the hex field. */\n protected onSurfaceBlur(): void {\n this.touch.emit();\n }\n\n private updateFromEvent(event: PointerEvent, target: HTMLElement, surface: Edges): void {\n const rect = target.getBoundingClientRect();\n const x = clamp((event.clientX - rect.left) / rect.width, 0, 1);\n\n if (surface === 'sv') {\n const y = clamp((event.clientY - rect.top) / rect.height, 0, 1);\n this.s.set(x);\n this.v.set(1 - y);\n } else if (surface === 'hue') {\n this.h.set(x * 360);\n } else {\n this.a.set(x);\n }\n this.emit();\n }\n\n // Hex input handlers\n\n protected onHexInput(event: Event): void {\n const raw = (event.target as HTMLInputElement).value;\n this.hexInput.set(raw);\n const rgb = parseHex(raw);\n if (!rgb) return;\n const hsv = rgbToHsv(rgb);\n this.h.set(hsv.h);\n this.s.set(hsv.s);\n this.v.set(hsv.v);\n this.a.set(hsv.a);\n this.emitWithoutHexSync();\n }\n\n protected onHexBlur(): void {\n // Re-sync the input with the canonical value (in case the user typed invalid).\n this.hexInput.set(this.hex());\n this.touch.emit();\n }\n\n // Emission\n\n private emit(): void {\n this.emitWithoutHexSync();\n this.hexInput.set(this.hex());\n }\n\n private emitWithoutHexSync(): void {\n const next = this.formatted();\n this.lastEmitted = next;\n this.value.set(next);\n }\n\n // Tab + channel handlers\n\n protected onTabChange(tab: Tab | null): void {\n if (tab) this.activeTab.set(tab);\n }\n\n protected onRgbChannel(channel: 'r' | 'g' | 'b', event: Event): void {\n const n = clamp(Number((event.target as HTMLInputElement).value), 0, 255);\n if (Number.isNaN(n)) return;\n const current = this.rgb();\n const next: WrRgb = { ...current, [channel]: n };\n this.applyRgb(next);\n }\n\n protected onHslChannel(channel: 'h' | 's' | 'l', event: Event): void {\n const n = Number((event.target as HTMLInputElement).value);\n if (Number.isNaN(n)) return;\n const current = this.hslView();\n const next: WrHsl =\n channel === 'h' ? { ...current, h: clamp(n, 0, 360) } : { ...current, [channel]: clamp(n, 0, 100) / 100 };\n this.applyRgb(hslToRgb(next));\n }\n\n protected onAlphaPercent(event: Event): void {\n const n = clamp(Number((event.target as HTMLInputElement).value), 0, 100);\n if (Number.isNaN(n)) return;\n this.a.set(n / 100);\n this.emit();\n }\n\n protected onSwatchClick(hex: string): void {\n if (this.disabled()) return;\n const rgb = parseHex(hex);\n if (!rgb) return;\n // A 6-digit swatch says nothing about alpha, and `parseHex` reports the\n // absence as `1` — so picking a preset used to silently snap a translucent\n // colour back to fully opaque.\n this.applyRgb(hasAlphaDigits(hex) ? rgb : { ...rgb, a: this.a() });\n }\n\n /** Push an RGB triple into the HSV source of truth. */\n private applyRgb(rgb: WrRgb): void {\n const hsv = rgbToHsv(rgb);\n this.h.set(hsv.h);\n this.s.set(hsv.s);\n this.v.set(hsv.v);\n this.a.set(hsv.a);\n this.emit();\n }\n}\n","<!--\n `role=\"group\"` rather than `role=\"slider\"`, because this surface holds TWO\n values and a slider has one `aria-valuenow`; and rather than\n `role=\"application\"`, which would switch the reader out of its own browse mode\n for the whole subtree — the call `wr-image-cropper` already made. A group has\n no value of its own, so the two percentages ride in its accessible name, which\n is where a reader querying the focused element finds them.\n-->\n<div\n class=\"wr-color-picker__sv\"\n role=\"group\"\n [attr.aria-label]=\"resolvedAreaLabel()\"\n [attr.aria-disabled]=\"disabled() || null\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n (pointerdown)=\"onPointerDown($event, 'sv')\"\n (keydown)=\"onAreaKeydown($event)\"\n (blur)=\"onSurfaceBlur()\"\n>\n <span class=\"wr-color-picker__thumb\" [style.left.%]=\"svThumbX()\" [style.top.%]=\"svThumbY()\"></span>\n</div>\n\n<div\n class=\"wr-color-picker__slider wr-color-picker__slider--hue\"\n role=\"slider\"\n aria-valuemin=\"0\"\n aria-valuemax=\"360\"\n [attr.aria-label]=\"resolvedHueLabel()\"\n [attr.aria-valuenow]=\"hueValue()\"\n [attr.aria-disabled]=\"disabled() || null\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n (pointerdown)=\"onPointerDown($event, 'hue')\"\n (keydown)=\"onSliderKeydown($event, 'hue')\"\n (blur)=\"onSurfaceBlur()\"\n>\n <span class=\"wr-color-picker__thumb wr-color-picker__thumb--slider\" [style.left.%]=\"hueThumbX()\"></span>\n</div>\n\n@if (alpha()) {\n <div\n class=\"wr-color-picker__slider wr-color-picker__slider--alpha\"\n role=\"slider\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-label]=\"resolvedAlphaLabel()\"\n [attr.aria-valuenow]=\"alphaPercent()\"\n [attr.aria-valuetext]=\"`${alphaPercent()}%`\"\n [attr.aria-disabled]=\"disabled() || null\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n (pointerdown)=\"onPointerDown($event, 'alpha')\"\n (keydown)=\"onSliderKeydown($event, 'alpha')\"\n (blur)=\"onSurfaceBlur()\"\n >\n <span class=\"wr-color-picker__thumb wr-color-picker__thumb--slider\" [style.left.%]=\"alphaThumbX()\"></span>\n </div>\n}\n\n<div class=\"wr-color-picker__chrome\">\n <span class=\"wr-color-picker__preview\" [style.background]=\"hex()\"></span>\n <wr-segmented\n class=\"wr-color-picker__tabs\"\n [options]=\"tabOptions\"\n [value]=\"activeTab()\"\n (valueChange)=\"onTabChange($event)\"\n />\n</div>\n\n@switch (activeTab()) {\n @case ('hex') {\n <div class=\"wr-color-picker__inputs wr-color-picker__inputs--hex\">\n <label class=\"wr-color-picker__field wr-color-picker__field--wide\">\n <input\n type=\"text\"\n spellcheck=\"false\"\n autocomplete=\"off\"\n [value]=\"hexInput()\"\n [disabled]=\"disabled()\"\n (input)=\"onHexInput($event)\"\n (blur)=\"onHexBlur()\"\n />\n <span class=\"wr-color-picker__field-label\">HEX</span>\n </label>\n </div>\n }\n @case ('rgb') {\n <div class=\"wr-color-picker__inputs\">\n <label class=\"wr-color-picker__field\">\n <input\n type=\"number\"\n min=\"0\"\n max=\"255\"\n [value]=\"rgb().r\"\n [disabled]=\"disabled()\"\n (input)=\"onRgbChannel('r', $event)\"\n />\n <span class=\"wr-color-picker__field-label\">R</span>\n </label>\n <label class=\"wr-color-picker__field\">\n <input\n type=\"number\"\n min=\"0\"\n max=\"255\"\n [value]=\"rgb().g\"\n [disabled]=\"disabled()\"\n (input)=\"onRgbChannel('g', $event)\"\n />\n <span class=\"wr-color-picker__field-label\">G</span>\n </label>\n <label class=\"wr-color-picker__field\">\n <input\n type=\"number\"\n min=\"0\"\n max=\"255\"\n [value]=\"rgb().b\"\n [disabled]=\"disabled()\"\n (input)=\"onRgbChannel('b', $event)\"\n />\n <span class=\"wr-color-picker__field-label\">B</span>\n </label>\n @if (alpha()) {\n <label class=\"wr-color-picker__field\">\n <input\n type=\"number\"\n min=\"0\"\n max=\"100\"\n [value]=\"alphaPercent()\"\n [disabled]=\"disabled()\"\n (input)=\"onAlphaPercent($event)\"\n />\n <span class=\"wr-color-picker__field-label\">A%</span>\n </label>\n }\n </div>\n }\n @case ('hsl') {\n <div class=\"wr-color-picker__inputs\">\n <label class=\"wr-color-picker__field\">\n <input\n type=\"number\"\n min=\"0\"\n max=\"360\"\n [value]=\"hslView().h | number: '1.0-0'\"\n [disabled]=\"disabled()\"\n (input)=\"onHslChannel('h', $event)\"\n />\n <span class=\"wr-color-picker__field-label\">H</span>\n </label>\n <label class=\"wr-color-picker__field\">\n <input\n type=\"number\"\n min=\"0\"\n max=\"100\"\n [value]=\"hslView().s * 100 | number: '1.0-0'\"\n [disabled]=\"disabled()\"\n (input)=\"onHslChannel('s', $event)\"\n />\n <span class=\"wr-color-picker__field-label\">S%</span>\n </label>\n <label class=\"wr-color-picker__field\">\n <input\n type=\"number\"\n min=\"0\"\n max=\"100\"\n [value]=\"hslView().l * 100 | number: '1.0-0'\"\n [disabled]=\"disabled()\"\n (input)=\"onHslChannel('l', $event)\"\n />\n <span class=\"wr-color-picker__field-label\">L%</span>\n </label>\n @if (alpha()) {\n <label class=\"wr-color-picker__field\">\n <input\n type=\"number\"\n min=\"0\"\n max=\"100\"\n [value]=\"alphaPercent()\"\n [disabled]=\"disabled()\"\n (input)=\"onAlphaPercent($event)\"\n />\n <span class=\"wr-color-picker__field-label\">A%</span>\n </label>\n }\n </div>\n }\n}\n\n@if (swatches().length > 0) {\n <div class=\"wr-color-picker__swatches\">\n @for (color of swatches(); track color) {\n <button\n type=\"button\"\n class=\"wr-color-picker__swatch\"\n [style.background]=\"color\"\n [attr.aria-label]=\"color\"\n [disabled]=\"disabled()\"\n (click)=\"onSwatchClick(color)\"\n ></button>\n }\n </div>\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { type OverlayRef, ScrollStrategyOptions } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport {\n DestroyRef,\n Directive,\n ElementRef,\n ViewContainerRef,\n inject,\n input,\n model,\n output,\n signal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\nimport { WR_OVERLAY, WrOutsideClick } from 'ngwr/overlay';\n\nimport { WrColorPicker } from './color-picker';\nimport type { WrColorFormat } from './interfaces';\n\nlet triggerUid = 0;\n\n/**\n * Opens a `<wr-color-picker>` in an overlay anchored to the host element.\n *\n * Apply to any clickable element (typically a button). Two-way binds the\n * current colour through `[(value)]`; forwards `alpha` / `format` /\n * `swatches` / `disabled` to the inner picker.\n *\n * Same overlay isolation as the rest of the lib — uses {@link WR_OVERLAY},\n * not CDK's root container.\n *\n * @example\n * ```html\n * <button wrColorPickerTrigger\n * [(value)]=\"brandColor\"\n * [swatches]=\"palette\">\n * <span class=\"swatch\" [style.background]=\"brandColor\"></span>\n * {{ brandColor }}\n * </button>\n * ```\n *\n * @see https://ngwr.dev/reference/components/color-picker\n */\n@Directive({\n selector: '[wrColorPickerTrigger]',\n host: {\n '(click)': 'toggle()',\n // The same two attributes `<wr-popover>`'s trigger carries: without them the\n // button gave no hint that it opens anything, and never said it was open.\n '[attr.aria-haspopup]': '\"dialog\"',\n '[attr.aria-expanded]': 'isOpen()',\n // Which panel, and only while there is one — the same pairing `[wrPopconfirm]`\n // publishes. Without it nothing on the page connects the trigger to the picker\n // it opened, so a second trigger's panel is indistinguishable from this one's.\n '[attr.aria-controls]': 'isOpen() ? panelId : null',\n // The directive's own `disabled` never reached the DOM: it gates `toggle()` and\n // is forwarded to the inner picker, so the button looked live to a screen\n // reader and did nothing when pressed.\n '[attr.aria-disabled]': 'disabled() ? true : null',\n },\n})\nexport class WrColorPickerTrigger {\n /** Two-way bindable colour value (hex string). */\n readonly value = model<string>('');\n\n /** Forwarded to the inner picker. @default true */\n readonly alpha = input(true, { transform: coerceBooleanProperty });\n\n /** Forwarded to the inner picker. @default 'hex' */\n readonly format = input<WrColorFormat>('hex');\n\n /** Forwarded to the inner picker. @default [] */\n readonly swatches = input<readonly string[]>([]);\n\n /** Disable the trigger entirely. @default false */\n readonly disabled = input(false, { transform: coerceBooleanProperty });\n\n /** Fires after the picker opens. */\n readonly opened = output<void>();\n\n /** Fires after the picker closes. */\n readonly closed = output<void>();\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly overlay = inject(WR_OVERLAY);\n private readonly outsideClick = inject(WrOutsideClick);\n private readonly vcr = inject(ViewContainerRef);\n private readonly scrollStrategies = inject(ScrollStrategyOptions);\n private readonly destroyRef = inject(DestroyRef);\n\n protected readonly isOpen = signal(false);\n private overlayRef: OverlayRef | null = null;\n\n /** @internal Public so the host binding can read it. */\n protected readonly panelId = `wr-color-picker-panel-${++triggerUid}`;\n\n constructor() {\n this.destroyRef.onDestroy(() => this.dispose());\n }\n\n /** Toggle the picker. Open if closed, close if open. */\n toggle(): void {\n if (this.disabled()) return;\n if (this.isOpen()) {\n this.close();\n } else {\n this.open();\n }\n }\n\n /** Open the picker. No-op if already open. */\n open(): void {\n if (this.isOpen() || this.disabled()) return;\n\n const positionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(this.host)\n .withPositions([\n { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: 4 },\n { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', offsetY: -4 },\n { originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top', offsetY: 4 },\n { originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom', offsetY: -4 },\n ])\n .withPush(true);\n\n this.overlayRef = this.overlay.create({\n positionStrategy,\n scrollStrategy: this.scrollStrategies.reposition(),\n panelClass: 'wr-color-picker-overlay',\n });\n this.overlayRef.overlayElement.id = this.panelId;\n\n const portal = new ComponentPortal(WrColorPicker, this.vcr);\n const ref = this.overlayRef.attach(portal);\n\n ref.setInput('alpha', this.alpha());\n ref.setInput('format', this.format());\n ref.setInput('swatches', this.swatches());\n ref.setInput('disabled', this.disabled());\n ref.setInput('value', this.value());\n\n // Bridge the inner picker's `value` model back to our two-way [(value)].\n ref.instance.value.subscribe((next: string) => this.value.set(next));\n\n // Outside-click → close (the source only filters out the overlay pane, so\n // the re-click on our own trigger still arrives here and has to be ignored).\n this.outsideClick\n .outsidePointerEvents(this.overlayRef)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(event => {\n if (this.host.nativeElement.contains(event.target as Node)) return;\n this.close();\n });\n\n // Escape → close.\n this.overlayRef\n .keydownEvents()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(event => {\n if (event.key === 'Escape') {\n event.preventDefault();\n this.close();\n }\n });\n\n this.isOpen.set(true);\n this.opened.emit();\n }\n\n /** Close the picker. No-op if already closed. */\n close(): void {\n if (!this.isOpen()) return;\n this.dispose();\n this.isOpen.set(false);\n this.closed.emit();\n }\n\n private dispose(): void {\n if (this.overlayRef) {\n this.overlayRef.dispose();\n this.overlayRef = null;\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;AAKG;AAKH;;AAEG;AACG,SAAU,QAAQ,CAAC,GAAU,EAAA;AACjC,IAAA,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG;AACrB,IAAA,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG;AACrB,IAAA,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG;AACrB,IAAA,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AAC7B,IAAA,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AAC7B,IAAA,MAAM,CAAC,GAAG,GAAG,GAAG,GAAG;IAEnB,IAAI,CAAC,GAAG,CAAC;AACT,IAAA,IAAI,CAAC,KAAK,CAAC,EAAE;QACX,IAAI,GAAG,KAAK,CA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EAAA,MAAA,EAAA,QAAA,EAAA,MAAA,EAAA,QAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,UAAA,EAAA,EAAA,UAAA,EAAA,EAAA,oBAAA,EAAA,YAAA,EAAA,oBAAA,EAAA,UAAA,EAAA,oBAAA,EAAA,2BAAA,EAAA,oBAAA,EAAA,0BAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAlBhC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,wBAAwB;AAClC,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,UAAU;;;AAGrB,wBAAA,sBAAsB,EAAE,UAAU;AAClC,wBAAA,sBAAsB,EAAE,UAAU;;;;AAIlC,wBAAA,sBAAsB,EAAE,2BAA2B;;;;AAInD,wBAAA,sBAAsB,EAAE,0BAA0B;AACnD,qBAAA;AACF,iBAAA;;;ACrED;;AAEG;;;;"}
1
+ {"version":3,"file":"ngwr-color-picker.mjs","sources":["../../../projects/lib/color-picker/color/rgb-to-hsv.ts","../../../projects/lib/color-picker/color/hsv-to-rgb.ts","../../../projects/lib/color-picker/color/rgb-to-hsl.ts","../../../projects/lib/color-picker/color/hsl-to-rgb.ts","../../../projects/lib/color-picker/color/parse-hex.ts","../../../projects/lib/color-picker/color/to-hex.ts","../../../projects/lib/color-picker/color/parse-color.ts","../../../projects/lib/color-picker/color/format-color.ts","../../../projects/lib/color-picker/color-picker.ts","../../../projects/lib/color-picker/color-picker.html","../../../projects/lib/color-picker/color-picker-trigger.ts","../../../projects/lib/color-picker/ngwr-color-picker.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport type { WrHsv } from './wr-hsv';\nimport type { WrRgb } from './wr-rgb';\n\n/**\n * Convert sRGB to HSV. Preserves alpha.\n */\nexport function rgbToHsv(rgb: WrRgb): WrHsv {\n const r = rgb.r / 255;\n const g = rgb.g / 255;\n const b = rgb.b / 255;\n const max = Math.max(r, g, b);\n const min = Math.min(r, g, b);\n const d = max - min;\n\n let h = 0;\n if (d !== 0) {\n if (max === r) h = ((g - b) / d) % 6;\n else if (max === g) h = (b - r) / d + 2;\n else h = (r - g) / d + 4;\n h *= 60;\n if (h < 0) h += 360;\n }\n\n const s = max === 0 ? 0 : d / max;\n const v = max;\n\n return { h, s, v, a: rgb.a };\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport type { WrHsv } from './wr-hsv';\nimport type { WrRgb } from './wr-rgb';\n\n/**\n * Convert HSV to sRGB. Preserves alpha. Returns integer channels in `[0, 255]`.\n */\nexport function hsvToRgb(hsv: WrHsv): WrRgb {\n const { h, s, v } = hsv;\n const c = v * s;\n const x = c * (1 - Math.abs(((h / 60) % 2) - 1));\n const m = v - c;\n\n let r = 0;\n let g = 0;\n let b = 0;\n\n if (h < 60) {\n r = c;\n g = x;\n } else if (h < 120) {\n r = x;\n g = c;\n } else if (h < 180) {\n g = c;\n b = x;\n } else if (h < 240) {\n g = x;\n b = c;\n } else if (h < 300) {\n r = x;\n b = c;\n } else {\n r = c;\n b = x;\n }\n\n return {\n r: Math.round((r + m) * 255),\n g: Math.round((g + m) * 255),\n b: Math.round((b + m) * 255),\n a: hsv.a,\n };\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport type { WrHsl } from './wr-hsl';\nimport type { WrRgb } from './wr-rgb';\n\n/**\n * Convert sRGB to HSL. Preserves alpha.\n */\nexport function rgbToHsl(rgb: WrRgb): WrHsl {\n const r = rgb.r / 255;\n const g = rgb.g / 255;\n const b = rgb.b / 255;\n const max = Math.max(r, g, b);\n const min = Math.min(r, g, b);\n const d = max - min;\n const l = (max + min) / 2;\n\n let h = 0;\n let s = 0;\n\n if (d !== 0) {\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n\n if (max === r) h = (g - b) / d + (g < b ? 6 : 0);\n else if (max === g) h = (b - r) / d + 2;\n else h = (r - g) / d + 4;\n\n h *= 60;\n }\n\n return { h, s, l, a: rgb.a };\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport type { WrHsl } from './wr-hsl';\nimport type { WrRgb } from './wr-rgb';\n\nfunction hueToChannel(p: number, q: number, t: number): number {\n let x = t;\n if (x < 0) x += 1;\n if (x > 1) x -= 1;\n if (x < 1 / 6) return p + (q - p) * 6 * x;\n if (x < 1 / 2) return q;\n if (x < 2 / 3) return p + (q - p) * (2 / 3 - x) * 6;\n return p;\n}\n\n/**\n * Convert HSL to sRGB. Preserves alpha. Returns integer channels in `[0, 255]`.\n */\nexport function hslToRgb(hsl: WrHsl): WrRgb {\n const h = hsl.h / 360;\n const { s, l } = hsl;\n\n let r: number;\n let g: number;\n let b: number;\n\n if (s === 0) {\n r = l;\n g = l;\n b = l;\n } else {\n const q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n const p = 2 * l - q;\n r = hueToChannel(p, q, h + 1 / 3);\n g = hueToChannel(p, q, h);\n b = hueToChannel(p, q, h - 1 / 3);\n }\n\n return {\n r: Math.round(r * 255),\n g: Math.round(g * 255),\n b: Math.round(b * 255),\n a: hsl.a,\n };\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport type { WrRgb } from './wr-rgb';\n\n/**\n * Parse a CSS hex colour into {@link WrRgb}. Accepts 3, 4, 6, or 8 digit\n * forms with or without a leading `#`. Returns `null` for anything that\n * isn't a valid hex string.\n *\n * @example\n * ```ts\n * parseHex('#f00'); // { r: 255, g: 0, b: 0, a: 1 }\n * parseHex('3969e2'); // { r: 57, g: 105, b: 226, a: 1 }\n * parseHex('#3969e2ff'); // { r: 57, g: 105, b: 226, a: 1 }\n * parseHex('nope'); // null\n * ```\n */\nexport function parseHex(input: string): WrRgb | null {\n if (typeof input !== 'string') return null;\n\n let str = input.trim().replace(/^#/, '').toLowerCase();\n\n // Expand shorthand: rgb → rrggbb, rgba → rrggbbaa\n if (str.length === 3 || str.length === 4) {\n str = str\n .split('')\n .map(c => c + c)\n .join('');\n }\n\n if (str.length !== 6 && str.length !== 8) return null;\n if (!/^[0-9a-f]+$/.test(str)) return null;\n\n const r = parseInt(str.slice(0, 2), 16);\n const g = parseInt(str.slice(2, 4), 16);\n const b = parseInt(str.slice(4, 6), 16);\n const a = str.length === 8 ? parseInt(str.slice(6, 8), 16) / 255 : 1;\n\n return { r, g, b, a };\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport type { WrRgb } from './wr-rgb';\n\nfunction channelToHex(n: number): string {\n const clamped = Math.max(0, Math.min(255, Math.round(n)));\n return clamped.toString(16).padStart(2, '0');\n}\n\n/**\n * Format a {@link WrRgb} as a CSS hex string with a leading `#`. When\n * `withAlpha` is `true` the result is 8 digits (`#rrggbbaa`); otherwise\n * 6 digits.\n *\n * @example\n * ```ts\n * toHex({ r: 57, g: 105, b: 226, a: 1 }); // '#3969e2'\n * toHex({ r: 57, g: 105, b: 226, a: 0.5 }, true); // '#3969e280'\n * ```\n */\nexport function toHex(rgb: WrRgb, withAlpha = false): string {\n const r = channelToHex(rgb.r);\n const g = channelToHex(rgb.g);\n const b = channelToHex(rgb.b);\n if (withAlpha) {\n const a = channelToHex(rgb.a * 255);\n return `#${r}${g}${b}${a}`;\n }\n return `#${r}${g}${b}`;\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { clamp } from 'ngwr/utils';\n\nimport { hslToRgb } from './hsl-to-rgb';\nimport { parseHex } from './parse-hex';\nimport type { WrRgb } from './wr-rgb';\n\n/**\n * `rgb(…)` / `rgba(…)`, comma- or space-separated, with an optional `/ alpha`.\n * Signs are accepted so an out-of-range channel CLAMPS the way CSS clamps it,\n * rather than failing to parse and reading as black.\n */\nconst RGB_RE = /^rgba?\\(\\s*(-?[\\d.]+)\\s*[,\\s]\\s*(-?[\\d.]+)\\s*[,\\s]\\s*(-?[\\d.]+)\\s*(?:[,/]\\s*(-?[\\d.]+%?)\\s*)?\\)$/i;\n\n/** `hsl(…)` / `hsla(…)`, with `%` optional on saturation and lightness. */\nconst HSL_RE =\n /^hsla?\\(\\s*(-?[\\d.]+)(?:deg)?\\s*[,\\s]\\s*(-?[\\d.]+)%?\\s*[,\\s]\\s*(-?[\\d.]+)%?\\s*(?:[,/]\\s*(-?[\\d.]+%?)\\s*)?\\)$/i;\n\n/** `0.5` and `50%` are the same alpha; anything absent is fully opaque. */\nfunction alphaOf(raw: string | undefined): number {\n if (raw === undefined) return 1;\n const value = raw.endsWith('%') ? Number(raw.slice(0, -1)) / 100 : Number(raw);\n return Number.isFinite(value) ? clamp(value, 0, 1) : 1;\n}\n\nfunction channel(raw: string): number {\n return clamp(Math.round(Number(raw)), 0, 255);\n}\n\n/**\n * Read a colour written in any format `<wr-color-picker>` can emit — hex,\n * `rgb()` / `rgba()`, `hsl()` / `hsla()` — or `null` when it is none of them.\n *\n * The picker emits in whichever format it was given, so a `[(value)]` binding\n * hands its own output straight back on the next external write. Accepting only\n * hex there (which is what it used to do) turned every non-hex value into black.\n *\n * `null` rather than a throw or a black fallback: the caller is often a text\n * field mid-typing, where \"not valid yet\" is the normal state.\n */\nexport function parseColor(input: string): WrRgb | null {\n const value = input.trim();\n if (value === '') return null;\n\n const hex = parseHex(value);\n if (hex) return hex;\n\n const rgb = RGB_RE.exec(value);\n if (rgb) {\n return { r: channel(rgb[1]), g: channel(rgb[2]), b: channel(rgb[3]), a: alphaOf(rgb[4]) };\n }\n\n const hsl = HSL_RE.exec(value);\n if (hsl) {\n return hslToRgb({\n // Normalised here rather than trusted downstream: `hslToRgb` happens to\n // absorb one negative turn inside `hueToChannel`, which is an internal\n // detail this function should not be leaning on.\n h: ((Number(hsl[1]) % 360) + 360) % 360,\n s: clamp(Number(hsl[2]) / 100, 0, 1),\n l: clamp(Number(hsl[3]) / 100, 0, 1),\n a: alphaOf(hsl[4]),\n });\n }\n\n return null;\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport type { WrColorFormat } from '../interfaces';\n\nimport { rgbToHsl } from './rgb-to-hsl';\nimport { toHex } from './to-hex';\nimport type { WrRgb } from './wr-rgb';\n\n/** Alpha with at most two decimals, and no trailing zeroes: `0.5`, not `0.50`. */\nfunction alphaText(a: number): string {\n return String(Math.round(a * 100) / 100);\n}\n\n/**\n * Render a colour in the format a `<wr-color-picker>` was asked for.\n *\n * `withAlpha` follows the picker's own `alpha` input, so each format has an\n * opaque and a translucent spelling — `#3969e2` / `#3969e2ff`,\n * `rgb(…)` / `rgba(…)`, `hsl(…)` / `hsla(…)` — and a picker with the alpha\n * slider turned off never emits a channel the caller cannot see or edit.\n */\nexport function formatColor(rgb: WrRgb, format: WrColorFormat, withAlpha: boolean): string {\n if (format === 'hex') return toHex(rgb, withAlpha);\n\n if (format === 'rgba') {\n const { r, g, b } = rgb;\n return withAlpha ? `rgba(${r}, ${g}, ${b}, ${alphaText(rgb.a)})` : `rgb(${r}, ${g}, ${b})`;\n }\n\n const { h, s, l } = rgbToHsl(rgb);\n const parts = `${Math.round(h)}, ${Math.round(s * 100)}%, ${Math.round(l * 100)}%`;\n return withAlpha ? `hsla(${parts}, ${alphaText(rgb.a)})` : `hsl(${parts})`;\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { DecimalPipe } from '@angular/common';\nimport { Component, ViewEncapsulation, computed, effect, input, model, output, signal } from '@angular/core';\nimport type { FormValueControl } from '@angular/forms/signals';\n\nimport { readI18nText, useI18nFormatter } from 'ngwr/i18n';\nimport { WrSegmented, type WrSegmentedOption } from 'ngwr/segmented';\nimport { clamp } from 'ngwr/utils';\n\nimport {\n formatColor,\n hslToRgb,\n hsvToRgb,\n parseColor,\n parseHex,\n rgbToHsl,\n rgbToHsv,\n toHex,\n type WrHsl,\n type WrRgb,\n} from './color';\nimport type { WrColorFormat } from './interfaces';\n\ntype Tab = 'hex' | 'rgb' | 'hsl';\n\ntype Edges = 'sv' | 'hue' | 'alpha';\n\n/** Arrow step, in each surface's own unit: degrees of hue, percent everywhere else. */\nconst KEY_STEP = 1;\nconst KEY_STEP_COARSE = 10;\n\n/** Whether a hex string carries its own alpha (`#rgba` or `#rrggbbaa`). */\nfunction hasAlphaDigits(hex: string): boolean {\n const digits = hex.trim().replace(/^#/, '').length;\n return digits === 4 || digits === 8;\n}\n\n/**\n * Inline colour picker — HSV canvas, hue slider, optional alpha slider, HEX\n * input.\n *\n * A signal-forms native control: it implements `FormValueControl<string>`, so\n * `[formField]` binds straight to its `value` model — no\n * `ControlValueAccessor` in between. `[(value)]` works standalone. Output is\n * always a hex string.\n *\n * @example\n * ```html\n * <!-- signal forms -->\n * <wr-color-picker [formField]=\"form.brandColor\" />\n *\n * <!-- standalone two-way binding -->\n * <wr-color-picker [(value)]=\"brandColor\" [alpha]=\"false\" />\n * ```\n *\n * @see https://ngwr.dev/reference/components/color-picker\n */\n@Component({\n selector: 'wr-color-picker',\n templateUrl: './color-picker.html',\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class]': 'classes()',\n '[style.--wr-color-picker-hue]': 'hueCss()',\n '[style.--wr-color-picker-rgb]': 'rgbCss()',\n },\n imports: [DecimalPipe, WrSegmented],\n})\nexport class WrColorPicker implements FormValueControl<string> {\n /** Render the alpha slider and emit 8-digit hex / `rgba()`. @default true */\n readonly alpha = input(true, { transform: coerceBooleanProperty });\n\n /** Disable interaction. @default false */\n readonly disabled = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Format the control writes into `value`. See {@link WrColorFormat} — all\n * three are accepted on the way in whichever one is set. @default 'hex'\n */\n readonly format = input<WrColorFormat>('hex');\n\n /** Preset hex colours rendered as a clickable row beneath the inputs. Empty = no row. @default [] */\n readonly swatches = input<readonly string[]>([]);\n\n /** The selected colour as a string. Bound by `[formField]`, or two-way via `[(value)]`. */\n readonly value = model<string>('');\n\n /** Emitted on blur so a bound field can mark itself touched. */\n readonly touch = output<void>();\n\n // Source of truth: HSV + alpha\n\n protected readonly h = signal(0);\n protected readonly s = signal(0);\n protected readonly v = signal(0);\n protected readonly a = signal(1);\n\n // Derived values\n\n /** RGB view of the current colour, computed lazily. */\n protected readonly rgb = computed<WrRgb>(() => hsvToRgb({ h: this.h(), s: this.s(), v: this.v(), a: this.a() }));\n\n /** Canonical hex — what the HEX field shows, whatever `format` emits. */\n protected readonly hex = computed(() => toHex(this.rgb(), this.alpha()));\n\n /** The colour as the consumer asked for it; this is what `value` receives. */\n protected readonly formatted = computed(() => formatColor(this.rgb(), this.format(), this.alpha()));\n\n /** SV canvas background colour (full-saturation hue). */\n protected readonly hueCss = computed(() => `hsl(${this.h()}, 100%, 50%)`);\n\n /** RGB string used for the alpha-slider gradient. */\n protected readonly rgbCss = computed(() => {\n const { r, g, b } = this.rgb();\n return `${r}, ${g}, ${b}`;\n });\n\n /** Thumb positions in % for each surface. */\n protected readonly svThumbX = computed(() => this.s() * 100);\n protected readonly svThumbY = computed(() => (1 - this.v()) * 100);\n protected readonly hueThumbX = computed(() => (this.h() / 360) * 100);\n protected readonly alphaThumbX = computed(() => this.a() * 100);\n\n /** Mirror of the canonical hex, edited by the user via the input field. */\n protected readonly hexInput = signal('');\n\n /** Active tab in the input switcher. */\n protected readonly activeTab = signal<Tab>('hex');\n\n /** HSL view of the current colour, computed lazily. */\n protected readonly hslView = computed<WrHsl>(() => rgbToHsl(this.rgb()));\n\n /** Alpha as integer percent — the numeric tabs and the alpha slider's `aria-valuenow`. */\n protected readonly alphaPercent = computed(() => Math.round(this.a() * 100));\n\n /** Hue in whole degrees, for the hue slider's `aria-valuenow`. */\n protected readonly hueValue = computed(() => Math.round(this.h()));\n\n private readonly areaLabel = useI18nFormatter(\n 'colorPicker.area',\n 'Saturation and brightness, {{saturation}}% and {{brightness}}%'\n );\n\n /** Name of the SV surface, carrying the two values a `role=\"group\"` cannot. */\n protected readonly resolvedAreaLabel = computed(() =>\n this.areaLabel({ saturation: Math.round(this.s() * 100), brightness: Math.round(this.v() * 100) })\n );\n\n protected readonly resolvedHueLabel = readI18nText('colorPicker.hue', 'Hue');\n protected readonly resolvedAlphaLabel = readI18nText('colorPicker.alpha', 'Opacity');\n\n protected readonly tabOptions: readonly WrSegmentedOption<Tab>[] = [\n { value: 'hex', label: 'HEX' },\n { value: 'rgb', label: 'RGB' },\n { value: 'hsl', label: 'HSL' },\n ];\n\n protected readonly classes = computed(() => {\n const parts = ['wr-color-picker'];\n if (this.alpha()) parts.push('wr-color-picker--alpha');\n if (this.disabled()) parts.push('wr-color-picker--disabled');\n return parts.join(' ');\n });\n\n /**\n * The one write we just made, held only until the sync effect has seen it.\n *\n * It exists so a drag keeps its continuous HSV values instead of being\n * re-quantised through its own hex round-trip. It used to be set and never\n * cleared, which turned \"ignore this write\" into \"ignore this STRING,\n * forever\": after the picker emitted `#ff0000` once, an app writing\n * `#ff0000` back — a reset button, a form patch, an undo — was silently\n * dropped for the rest of the component's life, and the surface kept\n * whatever colour the user had dragged to.\n */\n private lastEmitted: string | null = null;\n\n constructor() {\n // External writes (via `[formField]` / `[(value)]`) flow the incoming hex\n // string back into the HSV source of truth. Our own emits are skipped via\n // `lastEmitted` so dragging keeps its continuous (unquantised) values.\n effect(() => {\n const value = this.value();\n if (value === this.lastEmitted) {\n // Ours, and now observed. Release the guard so the NEXT write of the\n // same string — which can only come from outside — is honoured.\n this.lastEmitted = null;\n return;\n }\n const rgb = parseColor(value) ?? { r: 0, g: 0, b: 0, a: 1 };\n const hsv = rgbToHsv(rgb);\n this.h.set(hsv.h);\n this.s.set(hsv.s);\n this.v.set(hsv.v);\n this.a.set(hsv.a);\n this.hexInput.set(toHex(rgb, this.alpha()));\n });\n }\n\n // Drag handlers\n\n protected onPointerDown(event: PointerEvent, surface: Edges): void {\n if (this.disabled()) return;\n // Primary button, primary pointer: a right-click used to open the context\n // menu AND start a drag, and a second finger used to fight the first one.\n if (event.button !== 0 || !event.isPrimary) return;\n event.preventDefault();\n const target = event.currentTarget as HTMLElement;\n target.setPointerCapture(event.pointerId);\n\n const update = (e: PointerEvent): void => this.updateFromEvent(e, target, surface);\n const cleanup = (e: PointerEvent): void => {\n target.releasePointerCapture(e.pointerId);\n target.removeEventListener('pointermove', update);\n target.removeEventListener('pointerup', cleanup);\n target.removeEventListener('pointercancel', cleanup);\n this.touch.emit();\n };\n\n target.addEventListener('pointermove', update);\n target.addEventListener('pointerup', cleanup);\n // `pointercancel` never sends a `pointerup` after it, so without this the\n // move listener outlived the drag: a cancelled gesture left the surface\n // repainting the colour under a pointer that was only hovering.\n target.addEventListener('pointercancel', cleanup);\n this.updateFromEvent(event, target, surface);\n }\n\n // Keyboard handlers\n //\n // The three surfaces used to be bare `<div>`s carrying nothing but\n // `(pointerdown)` — no role, no name, no tab stop, no key handler — so the\n // control the component is built around was operable by pointer only. The\n // numeric HEX / RGB / HSL fields could always reach the same values, which is\n // why this is 4.1.2 rather than a total loss of keyboard access, but a\n // roleless div driving a colour is WCAG F59 either way.\n\n /**\n * Hue and alpha are real one-value sliders, so they take the APG slider keys —\n * the same set `wr-knob` and `wr-slider` implement, including Home / End.\n */\n protected onSliderKeydown(event: KeyboardEvent, surface: 'hue' | 'alpha'): void {\n if (this.disabled()) return;\n const step = event.shiftKey ? KEY_STEP_COARSE : KEY_STEP;\n const max = surface === 'hue' ? 360 : 100;\n const current = surface === 'hue' ? this.h() : this.a() * 100;\n let next: number;\n switch (event.key) {\n case 'ArrowRight':\n case 'ArrowUp':\n next = current + step;\n break;\n case 'ArrowLeft':\n case 'ArrowDown':\n next = current - step;\n break;\n case 'Home':\n next = 0;\n break;\n case 'End':\n next = max;\n break;\n default:\n return;\n }\n event.preventDefault();\n const value = clamp(next, 0, max);\n if (surface === 'hue') this.h.set(value);\n else this.a.set(value / 100);\n this.emit();\n }\n\n /**\n * The SV canvas is two axes at once, so the keys follow the picture: left and\n * right run along saturation, up and down along brightness — the directions\n * the thumb visibly moves. Shift takes ten percent at a time.\n */\n protected onAreaKeydown(event: KeyboardEvent): void {\n if (this.disabled()) return;\n const step = (event.shiftKey ? KEY_STEP_COARSE : KEY_STEP) / 100;\n switch (event.key) {\n case 'ArrowRight':\n this.s.set(clamp(this.s() + step, 0, 1));\n break;\n case 'ArrowLeft':\n this.s.set(clamp(this.s() - step, 0, 1));\n break;\n case 'ArrowUp':\n this.v.set(clamp(this.v() + step, 0, 1));\n break;\n case 'ArrowDown':\n this.v.set(clamp(this.v() - step, 0, 1));\n break;\n default:\n return;\n }\n event.preventDefault();\n this.emit();\n }\n\n /** Leaving a surface is what \"touched\" means, the same as leaving the hex field. */\n protected onSurfaceBlur(): void {\n this.touch.emit();\n }\n\n private updateFromEvent(event: PointerEvent, target: HTMLElement, surface: Edges): void {\n const rect = target.getBoundingClientRect();\n const x = clamp((event.clientX - rect.left) / rect.width, 0, 1);\n\n if (surface === 'sv') {\n const y = clamp((event.clientY - rect.top) / rect.height, 0, 1);\n this.s.set(x);\n this.v.set(1 - y);\n } else if (surface === 'hue') {\n this.h.set(x * 360);\n } else {\n this.a.set(x);\n }\n this.emit();\n }\n\n // Hex input handlers\n\n protected onHexInput(event: Event): void {\n const raw = (event.target as HTMLInputElement).value;\n this.hexInput.set(raw);\n const rgb = parseHex(raw);\n if (!rgb) return;\n const hsv = rgbToHsv(rgb);\n this.h.set(hsv.h);\n this.s.set(hsv.s);\n this.v.set(hsv.v);\n this.a.set(hsv.a);\n this.emitWithoutHexSync();\n }\n\n protected onHexBlur(): void {\n // Re-sync the input with the canonical value (in case the user typed invalid).\n this.hexInput.set(this.hex());\n this.touch.emit();\n }\n\n // Emission\n\n private emit(): void {\n this.emitWithoutHexSync();\n this.hexInput.set(this.hex());\n }\n\n private emitWithoutHexSync(): void {\n const next = this.formatted();\n this.lastEmitted = next;\n this.value.set(next);\n }\n\n // Tab + channel handlers\n\n protected onTabChange(tab: Tab | null): void {\n if (tab) this.activeTab.set(tab);\n }\n\n protected onRgbChannel(channel: 'r' | 'g' | 'b', event: Event): void {\n const n = clamp(Number((event.target as HTMLInputElement).value), 0, 255);\n if (Number.isNaN(n)) return;\n const current = this.rgb();\n const next: WrRgb = { ...current, [channel]: n };\n this.applyRgb(next);\n }\n\n protected onHslChannel(channel: 'h' | 's' | 'l', event: Event): void {\n const n = Number((event.target as HTMLInputElement).value);\n if (Number.isNaN(n)) return;\n const current = this.hslView();\n const next: WrHsl =\n channel === 'h' ? { ...current, h: clamp(n, 0, 360) } : { ...current, [channel]: clamp(n, 0, 100) / 100 };\n this.applyRgb(hslToRgb(next));\n }\n\n protected onAlphaPercent(event: Event): void {\n const n = clamp(Number((event.target as HTMLInputElement).value), 0, 100);\n if (Number.isNaN(n)) return;\n this.a.set(n / 100);\n this.emit();\n }\n\n protected onSwatchClick(hex: string): void {\n if (this.disabled()) return;\n const rgb = parseHex(hex);\n if (!rgb) return;\n // A 6-digit swatch says nothing about alpha, and `parseHex` reports the\n // absence as `1` — so picking a preset used to silently snap a translucent\n // colour back to fully opaque.\n this.applyRgb(hasAlphaDigits(hex) ? rgb : { ...rgb, a: this.a() });\n }\n\n /** Push an RGB triple into the HSV source of truth. */\n private applyRgb(rgb: WrRgb): void {\n const hsv = rgbToHsv(rgb);\n this.h.set(hsv.h);\n this.s.set(hsv.s);\n this.v.set(hsv.v);\n this.a.set(hsv.a);\n this.emit();\n }\n}\n","<!--\n `role=\"group\"` rather than `role=\"slider\"`, because this surface holds TWO\n values and a slider has one `aria-valuenow`; and rather than\n `role=\"application\"`, which would switch the reader out of its own browse mode\n for the whole subtree — the call `wr-image-cropper` already made. A group has\n no value of its own, so the two percentages ride in its accessible name, which\n is where a reader querying the focused element finds them.\n-->\n<div\n class=\"wr-color-picker__sv\"\n role=\"group\"\n [attr.aria-label]=\"resolvedAreaLabel()\"\n [attr.aria-disabled]=\"disabled() || null\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n (pointerdown)=\"onPointerDown($event, 'sv')\"\n (keydown)=\"onAreaKeydown($event)\"\n (blur)=\"onSurfaceBlur()\"\n>\n <span class=\"wr-color-picker__thumb\" [style.left.%]=\"svThumbX()\" [style.top.%]=\"svThumbY()\"></span>\n</div>\n\n<div\n class=\"wr-color-picker__slider wr-color-picker__slider--hue\"\n role=\"slider\"\n aria-valuemin=\"0\"\n aria-valuemax=\"360\"\n [attr.aria-label]=\"resolvedHueLabel()\"\n [attr.aria-valuenow]=\"hueValue()\"\n [attr.aria-disabled]=\"disabled() || null\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n (pointerdown)=\"onPointerDown($event, 'hue')\"\n (keydown)=\"onSliderKeydown($event, 'hue')\"\n (blur)=\"onSurfaceBlur()\"\n>\n <span class=\"wr-color-picker__thumb wr-color-picker__thumb--slider\" [style.left.%]=\"hueThumbX()\"></span>\n</div>\n\n@if (alpha()) {\n <div\n class=\"wr-color-picker__slider wr-color-picker__slider--alpha\"\n role=\"slider\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-label]=\"resolvedAlphaLabel()\"\n [attr.aria-valuenow]=\"alphaPercent()\"\n [attr.aria-valuetext]=\"`${alphaPercent()}%`\"\n [attr.aria-disabled]=\"disabled() || null\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n (pointerdown)=\"onPointerDown($event, 'alpha')\"\n (keydown)=\"onSliderKeydown($event, 'alpha')\"\n (blur)=\"onSurfaceBlur()\"\n >\n <span class=\"wr-color-picker__thumb wr-color-picker__thumb--slider\" [style.left.%]=\"alphaThumbX()\"></span>\n </div>\n}\n\n<div class=\"wr-color-picker__chrome\">\n <span class=\"wr-color-picker__preview\" [style.background]=\"hex()\"></span>\n <wr-segmented\n class=\"wr-color-picker__tabs\"\n [options]=\"tabOptions\"\n [value]=\"activeTab()\"\n (valueChange)=\"onTabChange($event)\"\n />\n</div>\n\n@switch (activeTab()) {\n @case ('hex') {\n <div class=\"wr-color-picker__inputs wr-color-picker__inputs--hex\">\n <label class=\"wr-color-picker__field wr-color-picker__field--wide\">\n <input\n type=\"text\"\n spellcheck=\"false\"\n autocomplete=\"off\"\n [value]=\"hexInput()\"\n [disabled]=\"disabled()\"\n (input)=\"onHexInput($event)\"\n (blur)=\"onHexBlur()\"\n />\n <span class=\"wr-color-picker__field-label\">HEX</span>\n </label>\n </div>\n }\n @case ('rgb') {\n <div class=\"wr-color-picker__inputs\">\n <label class=\"wr-color-picker__field\">\n <input\n type=\"number\"\n min=\"0\"\n max=\"255\"\n [value]=\"rgb().r\"\n [disabled]=\"disabled()\"\n (input)=\"onRgbChannel('r', $event)\"\n />\n <span class=\"wr-color-picker__field-label\">R</span>\n </label>\n <label class=\"wr-color-picker__field\">\n <input\n type=\"number\"\n min=\"0\"\n max=\"255\"\n [value]=\"rgb().g\"\n [disabled]=\"disabled()\"\n (input)=\"onRgbChannel('g', $event)\"\n />\n <span class=\"wr-color-picker__field-label\">G</span>\n </label>\n <label class=\"wr-color-picker__field\">\n <input\n type=\"number\"\n min=\"0\"\n max=\"255\"\n [value]=\"rgb().b\"\n [disabled]=\"disabled()\"\n (input)=\"onRgbChannel('b', $event)\"\n />\n <span class=\"wr-color-picker__field-label\">B</span>\n </label>\n @if (alpha()) {\n <label class=\"wr-color-picker__field\">\n <input\n type=\"number\"\n min=\"0\"\n max=\"100\"\n [value]=\"alphaPercent()\"\n [disabled]=\"disabled()\"\n (input)=\"onAlphaPercent($event)\"\n />\n <span class=\"wr-color-picker__field-label\">A%</span>\n </label>\n }\n </div>\n }\n @case ('hsl') {\n <div class=\"wr-color-picker__inputs\">\n <label class=\"wr-color-picker__field\">\n <input\n type=\"number\"\n min=\"0\"\n max=\"360\"\n [value]=\"hslView().h | number: '1.0-0'\"\n [disabled]=\"disabled()\"\n (input)=\"onHslChannel('h', $event)\"\n />\n <span class=\"wr-color-picker__field-label\">H</span>\n </label>\n <label class=\"wr-color-picker__field\">\n <input\n type=\"number\"\n min=\"0\"\n max=\"100\"\n [value]=\"hslView().s * 100 | number: '1.0-0'\"\n [disabled]=\"disabled()\"\n (input)=\"onHslChannel('s', $event)\"\n />\n <span class=\"wr-color-picker__field-label\">S%</span>\n </label>\n <label class=\"wr-color-picker__field\">\n <input\n type=\"number\"\n min=\"0\"\n max=\"100\"\n [value]=\"hslView().l * 100 | number: '1.0-0'\"\n [disabled]=\"disabled()\"\n (input)=\"onHslChannel('l', $event)\"\n />\n <span class=\"wr-color-picker__field-label\">L%</span>\n </label>\n @if (alpha()) {\n <label class=\"wr-color-picker__field\">\n <input\n type=\"number\"\n min=\"0\"\n max=\"100\"\n [value]=\"alphaPercent()\"\n [disabled]=\"disabled()\"\n (input)=\"onAlphaPercent($event)\"\n />\n <span class=\"wr-color-picker__field-label\">A%</span>\n </label>\n }\n </div>\n }\n}\n\n@if (swatches().length > 0) {\n <div class=\"wr-color-picker__swatches\">\n @for (color of swatches(); track color) {\n <button\n type=\"button\"\n class=\"wr-color-picker__swatch\"\n [style.background]=\"color\"\n [attr.aria-label]=\"color\"\n [disabled]=\"disabled()\"\n (click)=\"onSwatchClick(color)\"\n ></button>\n }\n </div>\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { type OverlayRef, ScrollStrategyOptions } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport {\n DestroyRef,\n Directive,\n ElementRef,\n ViewContainerRef,\n inject,\n input,\n model,\n output,\n signal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\nimport { WR_OVERLAY, WrOutsideClick } from 'ngwr/overlay';\n\nimport { WrColorPicker } from './color-picker';\nimport type { WrColorFormat } from './interfaces';\n\nlet triggerUid = 0;\n\n/**\n * Opens a `<wr-color-picker>` in an overlay anchored to the host element.\n *\n * Apply to any clickable element (typically a button). Two-way binds the\n * current colour through `[(value)]`; forwards `alpha` / `format` /\n * `swatches` / `disabled` to the inner picker.\n *\n * Same overlay isolation as the rest of the lib — uses {@link WR_OVERLAY},\n * not CDK's root container.\n *\n * @example\n * ```html\n * <button wrColorPickerTrigger\n * [(value)]=\"brandColor\"\n * [swatches]=\"palette\">\n * <span class=\"swatch\" [style.background]=\"brandColor\"></span>\n * {{ brandColor }}\n * </button>\n * ```\n *\n * @see https://ngwr.dev/reference/components/color-picker\n */\n@Directive({\n selector: '[wrColorPickerTrigger]',\n host: {\n '(click)': 'toggle()',\n // The same two attributes `<wr-popover>`'s trigger carries: without them the\n // button gave no hint that it opens anything, and never said it was open.\n '[attr.aria-haspopup]': '\"dialog\"',\n '[attr.aria-expanded]': 'isOpen()',\n // Which panel, and only while there is one — the same pairing `[wrPopconfirm]`\n // publishes. Without it nothing on the page connects the trigger to the picker\n // it opened, so a second trigger's panel is indistinguishable from this one's.\n '[attr.aria-controls]': 'isOpen() ? panelId : null',\n // The directive's own `disabled` never reached the DOM: it gates `toggle()` and\n // is forwarded to the inner picker, so the button looked live to a screen\n // reader and did nothing when pressed.\n '[attr.aria-disabled]': 'disabled() ? true : null',\n },\n})\nexport class WrColorPickerTrigger {\n /** Two-way bindable colour value (hex string). */\n readonly value = model<string>('');\n\n /** Forwarded to the inner picker. @default true */\n readonly alpha = input(true, { transform: coerceBooleanProperty });\n\n /** Forwarded to the inner picker. @default 'hex' */\n readonly format = input<WrColorFormat>('hex');\n\n /** Forwarded to the inner picker. @default [] */\n readonly swatches = input<readonly string[]>([]);\n\n /** Disable the trigger entirely. @default false */\n readonly disabled = input(false, { transform: coerceBooleanProperty });\n\n /** Fires after the picker opens. */\n readonly opened = output<void>();\n\n /** Fires after the picker closes. */\n readonly closed = output<void>();\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly overlay = inject(WR_OVERLAY);\n private readonly outsideClick = inject(WrOutsideClick);\n private readonly vcr = inject(ViewContainerRef);\n private readonly scrollStrategies = inject(ScrollStrategyOptions);\n private readonly destroyRef = inject(DestroyRef);\n\n protected readonly isOpen = signal(false);\n private overlayRef: OverlayRef | null = null;\n\n /** @internal Public so the host binding can read it. */\n protected readonly panelId = `wr-color-picker-panel-${++triggerUid}`;\n\n constructor() {\n this.destroyRef.onDestroy(() => this.dispose());\n }\n\n /** Toggle the picker. Open if closed, close if open. */\n toggle(): void {\n if (this.disabled()) return;\n if (this.isOpen()) {\n this.close();\n } else {\n this.open();\n }\n }\n\n /** Open the picker. No-op if already open. */\n open(): void {\n if (this.isOpen() || this.disabled()) return;\n\n const positionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(this.host)\n .withPositions([\n { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: 4 },\n { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', offsetY: -4 },\n { originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top', offsetY: 4 },\n { originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom', offsetY: -4 },\n ])\n .withPush(true);\n\n this.overlayRef = this.overlay.create({\n positionStrategy,\n scrollStrategy: this.scrollStrategies.reposition(),\n panelClass: 'wr-color-picker-overlay',\n });\n this.overlayRef.overlayElement.id = this.panelId;\n\n const portal = new ComponentPortal(WrColorPicker, this.vcr);\n const ref = this.overlayRef.attach(portal);\n\n ref.setInput('alpha', this.alpha());\n ref.setInput('format', this.format());\n ref.setInput('swatches', this.swatches());\n ref.setInput('disabled', this.disabled());\n ref.setInput('value', this.value());\n\n // Bridge the inner picker's `value` model back to our two-way [(value)].\n ref.instance.value.subscribe((next: string) => this.value.set(next));\n\n // Outside-click → close (the source only filters out the overlay pane, so\n // the re-click on our own trigger still arrives here and has to be ignored).\n this.outsideClick\n .outsidePointerEvents(this.overlayRef)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(event => {\n if (this.host.nativeElement.contains(event.target as Node)) return;\n this.close();\n });\n\n // Escape → close.\n this.overlayRef\n .keydownEvents()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(event => {\n if (event.key === 'Escape') {\n event.preventDefault();\n this.close();\n }\n });\n\n this.isOpen.set(true);\n this.opened.emit();\n }\n\n /** Close the picker. No-op if already closed. */\n close(): void {\n if (!this.isOpen()) return;\n this.dispose();\n this.isOpen.set(false);\n this.closed.emit();\n }\n\n private dispose(): void {\n if (this.overlayRef) {\n this.overlayRef.dispose();\n this.overlayRef = null;\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;AAKG;AAKH;;AAEG;AACG,SAAU,QAAQ,CAAC,GAAU,EAAA;AACjC,IAAA,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG;AACrB,IAAA,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG;AACrB,IAAA,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG;AACrB,IAAA,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AAC7B,IAAA,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EA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AAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,KAAA,EAAA,aAAA,EAAA,MAAA,EAAA,QAAA,EAAA,MAAA,EAAA,QAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,UAAA,EAAA,EAAA,UAAA,EAAA,EAAA,oBAAA,EAAA,YAAA,EAAA,oBAAA,EAAA,UAAA,EAAA,oBAAA,EAAA,2BAAA,EAAA,oBAAA,EAAA,0BAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAlBhC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,wBAAwB;AAClC,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,UAAU;;;AAGrB,wBAAA,sBAAsB,EAAE,UAAU;AAClC,wBAAA,sBAAsB,EAAE,UAAU;;;;AAIlC,wBAAA,sBAAsB,EAAE,2BAA2B;;;;AAInD,wBAAA,sBAAsB,EAAE,0BAA0B;AACnD,qBAAA;AACF,iBAAA;;;ACrED;;AAEG;;;;"}
@@ -320,10 +320,10 @@ class WrCommandPalette {
320
320
  if (this.closeOnPick())
321
321
  this.close();
322
322
  }
323
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrCommandPalette, deps: [], target: i0.ɵɵFactoryTarget.Component });
324
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.2", type: WrCommandPalette, isStandalone: true, selector: "wr-command-palette", inputs: { paletteLabel: { classPropertyName: "paletteLabel", publicName: "paletteLabel", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, trigger: { classPropertyName: "trigger", publicName: "trigger", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null }, closeOnPick: { classPropertyName: "closeOnPick", publicName: "closeOnPick", isSignal: true, isRequired: false, transformFunction: null }, responsive: { classPropertyName: "responsive", publicName: "responsive", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", picked: "picked" }, viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["input"], descendants: true, isSignal: true }, { propertyName: "panelEl", first: true, predicate: ["panel"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (open()) {\n <div\n class=\"wr-command-palette\"\n [class.wr-command-palette--sheet]=\"presentAsSheet()\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"resolvedPaletteLabel()\"\n >\n <!-- Backdrop captures clicks to close. Not focusable \u2014 keyboard users use\n Esc on the panel below. -->\n\n <div class=\"wr-command-palette__backdrop\" aria-hidden=\"true\" (click)=\"onBackdropClick()\"></div>\n\n <!-- Keydown is delegated from the search input; tabindex enables Esc when\n the input is unfocused. -->\n <div #panel class=\"wr-command-palette__panel\" tabindex=\"-1\" (keydown)=\"onKeydown($event)\">\n <div class=\"wr-command-palette__search\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n <circle cx=\"7\" cy=\"7\" r=\"5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" />\n <path d=\"M11 11 L14 14\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" />\n </svg>\n <input\n #input\n type=\"text\"\n role=\"combobox\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n aria-autocomplete=\"list\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-expanded]=\"true\"\n [attr.aria-activedescendant]=\"activeOptionId() || null\"\n [placeholder]=\"resolvedPlaceholder()\"\n [value]=\"query()\"\n (input)=\"onQueryInput($event)\"\n />\n <kbd class=\"wr-command-palette__hint\">esc</kbd>\n </div>\n\n <!-- The empty row sits OUTSIDE the listbox below, and is a live region.\n A listbox may only own `option` and `group` children \u2014 the same rule\n the buckets already follow \u2014 so this row inside it was an\n `aria-required-children` critical for every query that matched\n nothing, and an empty listbox on its own is not. `role=\"status\"` also\n gets the message spoken while focus stays in the search input. -->\n @if (filtered().length === 0) {\n <div class=\"wr-command-palette__empty\" role=\"status\">{{ resolvedEmpty() }}</div>\n }\n\n <div class=\"wr-command-palette__body\" role=\"listbox\" [attr.id]=\"listboxId\">\n @for (bucket of buckets(); track bucket.title; let groupIndex = $index) {\n <!-- A listbox may only own `option` and `group` children, so a titled\n bucket is a labelled group and an untitled one leaves the tree with\n `role=\"none\"`, promoting its options to the listbox's own. -->\n <div\n class=\"wr-command-palette__group\"\n [attr.role]=\"bucket.title ? 'group' : 'none'\"\n [attr.aria-labelledby]=\"bucket.title ? groupTitleId(groupIndex) : null\"\n >\n @if (bucket.title) {\n <div class=\"wr-command-palette__group-title\" [attr.id]=\"groupTitleId(groupIndex)\">\n {{ bucket.title }}\n </div>\n }\n @for (item of bucket.items; track item.id) {\n <div\n class=\"wr-command-palette__option\"\n role=\"option\"\n [attr.id]=\"optionId(indexOf(item))\"\n [class.wr-command-palette__option--active]=\"indexOf(item) === activeIndex()\"\n [attr.aria-selected]=\"indexOf(item) === activeIndex()\"\n (mouseenter)=\"onItemHover(item)\"\n (mousedown)=\"onItemClick(item, $event)\"\n >\n @if (item.icon) {\n <wr-icon class=\"wr-command-palette__option-icon\" [name]=\"item.icon\" size=\"16\" />\n } @else {\n <span class=\"wr-command-palette__option-icon\" aria-hidden=\"true\"></span>\n }\n <div class=\"wr-command-palette__option-body\">\n <div class=\"wr-command-palette__option-label\">{{ item.label }}</div>\n @if (item.description) {\n <div class=\"wr-command-palette__option-description\">{{ item.description }}</div>\n }\n </div>\n @if (item.shortcut) {\n <kbd class=\"wr-command-palette__option-shortcut\">{{ item.shortcut }}</kbd>\n }\n </div>\n }\n </div>\n }\n </div>\n </div>\n </div>\n}\n", dependencies: [{ kind: "component", type: WrIcon, selector: "wr-icon", inputs: ["name"] }], encapsulation: i0.ViewEncapsulation.None });
323
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrCommandPalette, deps: [], target: i0.ɵɵFactoryTarget.Component });
324
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: WrCommandPalette, isStandalone: true, selector: "wr-command-palette", inputs: { paletteLabel: { classPropertyName: "paletteLabel", publicName: "paletteLabel", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, trigger: { classPropertyName: "trigger", publicName: "trigger", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null }, closeOnPick: { classPropertyName: "closeOnPick", publicName: "closeOnPick", isSignal: true, isRequired: false, transformFunction: null }, responsive: { classPropertyName: "responsive", publicName: "responsive", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", picked: "picked" }, viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["input"], descendants: true, isSignal: true }, { propertyName: "panelEl", first: true, predicate: ["panel"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (open()) {\n <div\n class=\"wr-command-palette\"\n [class.wr-command-palette--sheet]=\"presentAsSheet()\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"resolvedPaletteLabel()\"\n >\n <!-- Backdrop captures clicks to close. Not focusable \u2014 keyboard users use\n Esc on the panel below. -->\n\n <div class=\"wr-command-palette__backdrop\" aria-hidden=\"true\" (click)=\"onBackdropClick()\"></div>\n\n <!-- Keydown is delegated from the search input; tabindex enables Esc when\n the input is unfocused. -->\n <div #panel class=\"wr-command-palette__panel\" tabindex=\"-1\" (keydown)=\"onKeydown($event)\">\n <div class=\"wr-command-palette__search\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n <circle cx=\"7\" cy=\"7\" r=\"5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" />\n <path d=\"M11 11 L14 14\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" />\n </svg>\n <input\n #input\n type=\"text\"\n role=\"combobox\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n aria-autocomplete=\"list\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-expanded]=\"true\"\n [attr.aria-activedescendant]=\"activeOptionId() || null\"\n [placeholder]=\"resolvedPlaceholder()\"\n [value]=\"query()\"\n (input)=\"onQueryInput($event)\"\n />\n <kbd class=\"wr-command-palette__hint\">esc</kbd>\n </div>\n\n <!-- The empty row sits OUTSIDE the listbox below, and is a live region.\n A listbox may only own `option` and `group` children \u2014 the same rule\n the buckets already follow \u2014 so this row inside it was an\n `aria-required-children` critical for every query that matched\n nothing, and an empty listbox on its own is not. `role=\"status\"` also\n gets the message spoken while focus stays in the search input. -->\n @if (filtered().length === 0) {\n <div class=\"wr-command-palette__empty\" role=\"status\">{{ resolvedEmpty() }}</div>\n }\n\n <div class=\"wr-command-palette__body\" role=\"listbox\" [attr.id]=\"listboxId\">\n @for (bucket of buckets(); track bucket.title; let groupIndex = $index) {\n <!-- A listbox may only own `option` and `group` children, so a titled\n bucket is a labelled group and an untitled one leaves the tree with\n `role=\"none\"`, promoting its options to the listbox's own. -->\n <div\n class=\"wr-command-palette__group\"\n [attr.role]=\"bucket.title ? 'group' : 'none'\"\n [attr.aria-labelledby]=\"bucket.title ? groupTitleId(groupIndex) : null\"\n >\n @if (bucket.title) {\n <div class=\"wr-command-palette__group-title\" [attr.id]=\"groupTitleId(groupIndex)\">\n {{ bucket.title }}\n </div>\n }\n @for (item of bucket.items; track item.id) {\n <div\n class=\"wr-command-palette__option\"\n role=\"option\"\n [attr.id]=\"optionId(indexOf(item))\"\n [class.wr-command-palette__option--active]=\"indexOf(item) === activeIndex()\"\n [attr.aria-selected]=\"indexOf(item) === activeIndex()\"\n (mouseenter)=\"onItemHover(item)\"\n (mousedown)=\"onItemClick(item, $event)\"\n >\n @if (item.icon) {\n <wr-icon class=\"wr-command-palette__option-icon\" [name]=\"item.icon\" size=\"16\" />\n } @else {\n <span class=\"wr-command-palette__option-icon\" aria-hidden=\"true\"></span>\n }\n <div class=\"wr-command-palette__option-body\">\n <div class=\"wr-command-palette__option-label\">{{ item.label }}</div>\n @if (item.description) {\n <div class=\"wr-command-palette__option-description\">{{ item.description }}</div>\n }\n </div>\n @if (item.shortcut) {\n <kbd class=\"wr-command-palette__option-shortcut\">{{ item.shortcut }}</kbd>\n }\n </div>\n }\n </div>\n }\n </div>\n </div>\n </div>\n}\n", dependencies: [{ kind: "component", type: WrIcon, selector: "wr-icon", inputs: ["name"] }], encapsulation: i0.ViewEncapsulation.None });
325
325
  }
326
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrCommandPalette, decorators: [{
326
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrCommandPalette, decorators: [{
327
327
  type: Component,
328
328
  args: [{ selector: 'wr-command-palette', encapsulation: ViewEncapsulation.None, imports: [WrIcon], template: "@if (open()) {\n <div\n class=\"wr-command-palette\"\n [class.wr-command-palette--sheet]=\"presentAsSheet()\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"resolvedPaletteLabel()\"\n >\n <!-- Backdrop captures clicks to close. Not focusable \u2014 keyboard users use\n Esc on the panel below. -->\n\n <div class=\"wr-command-palette__backdrop\" aria-hidden=\"true\" (click)=\"onBackdropClick()\"></div>\n\n <!-- Keydown is delegated from the search input; tabindex enables Esc when\n the input is unfocused. -->\n <div #panel class=\"wr-command-palette__panel\" tabindex=\"-1\" (keydown)=\"onKeydown($event)\">\n <div class=\"wr-command-palette__search\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n <circle cx=\"7\" cy=\"7\" r=\"5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" />\n <path d=\"M11 11 L14 14\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" />\n </svg>\n <input\n #input\n type=\"text\"\n role=\"combobox\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n aria-autocomplete=\"list\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-expanded]=\"true\"\n [attr.aria-activedescendant]=\"activeOptionId() || null\"\n [placeholder]=\"resolvedPlaceholder()\"\n [value]=\"query()\"\n (input)=\"onQueryInput($event)\"\n />\n <kbd class=\"wr-command-palette__hint\">esc</kbd>\n </div>\n\n <!-- The empty row sits OUTSIDE the listbox below, and is a live region.\n A listbox may only own `option` and `group` children \u2014 the same rule\n the buckets already follow \u2014 so this row inside it was an\n `aria-required-children` critical for every query that matched\n nothing, and an empty listbox on its own is not. `role=\"status\"` also\n gets the message spoken while focus stays in the search input. -->\n @if (filtered().length === 0) {\n <div class=\"wr-command-palette__empty\" role=\"status\">{{ resolvedEmpty() }}</div>\n }\n\n <div class=\"wr-command-palette__body\" role=\"listbox\" [attr.id]=\"listboxId\">\n @for (bucket of buckets(); track bucket.title; let groupIndex = $index) {\n <!-- A listbox may only own `option` and `group` children, so a titled\n bucket is a labelled group and an untitled one leaves the tree with\n `role=\"none\"`, promoting its options to the listbox's own. -->\n <div\n class=\"wr-command-palette__group\"\n [attr.role]=\"bucket.title ? 'group' : 'none'\"\n [attr.aria-labelledby]=\"bucket.title ? groupTitleId(groupIndex) : null\"\n >\n @if (bucket.title) {\n <div class=\"wr-command-palette__group-title\" [attr.id]=\"groupTitleId(groupIndex)\">\n {{ bucket.title }}\n </div>\n }\n @for (item of bucket.items; track item.id) {\n <div\n class=\"wr-command-palette__option\"\n role=\"option\"\n [attr.id]=\"optionId(indexOf(item))\"\n [class.wr-command-palette__option--active]=\"indexOf(item) === activeIndex()\"\n [attr.aria-selected]=\"indexOf(item) === activeIndex()\"\n (mouseenter)=\"onItemHover(item)\"\n (mousedown)=\"onItemClick(item, $event)\"\n >\n @if (item.icon) {\n <wr-icon class=\"wr-command-palette__option-icon\" [name]=\"item.icon\" size=\"16\" />\n } @else {\n <span class=\"wr-command-palette__option-icon\" aria-hidden=\"true\"></span>\n }\n <div class=\"wr-command-palette__option-body\">\n <div class=\"wr-command-palette__option-label\">{{ item.label }}</div>\n @if (item.description) {\n <div class=\"wr-command-palette__option-description\">{{ item.description }}</div>\n }\n </div>\n @if (item.shortcut) {\n <kbd class=\"wr-command-palette__option-shortcut\">{{ item.shortcut }}</kbd>\n }\n </div>\n }\n </div>\n }\n </div>\n </div>\n </div>\n}\n" }]
329
329
  }], ctorParameters: () => [], propDecorators: { paletteLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "paletteLabel", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], trigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "trigger", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: false }] }], closeOnPick: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnPick", required: false }] }], responsive: [{ type: i0.Input, args: [{ isSignal: true, alias: "responsive", required: false }] }], picked: [{ type: i0.Output, args: ["picked"] }], inputEl: [{ type: i0.ViewChild, args: ['input', { isSignal: true }] }], panelEl: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }] } });
@@ -211,10 +211,10 @@ class WrCompare {
211
211
  inlineFraction(clientX, rect) {
212
212
  return this.rtl() ? (rect.right - clientX) / rect.width : (clientX - rect.left) / rect.width;
213
213
  }
214
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrCompare, deps: [], target: i0.ɵɵFactoryTarget.Component });
215
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.2", type: WrCompare, isStandalone: true, selector: "wr-compare", inputs: { position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, showHandle: { classPropertyName: "showHandle", publicName: "showHandle", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, minPosition: { classPropertyName: "minPosition", publicName: "minPosition", isSignal: true, isRequired: false, transformFunction: null }, maxPosition: { classPropertyName: "maxPosition", publicName: "maxPosition", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { position: "positionChange" }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: "<div\n class=\"wr-compare__surface\"\n role=\"slider\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-orientation]=\"orientation()\"\n [attr.aria-valuemin]=\"minPosition()\"\n [attr.aria-valuemax]=\"maxPosition()\"\n [attr.aria-valuenow]=\"position()\"\n [attr.aria-disabled]=\"disabled() || null\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n (pointerdown)=\"onPointerDown($event)\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerup)=\"onPointerUp($event)\"\n (pointercancel)=\"onPointerUp($event)\"\n (keydown)=\"onKeydown($event)\"\n>\n <div class=\"wr-compare__layers\">\n <div class=\"wr-compare__layer wr-compare__layer--before\">\n <ng-content select=\"[wrCompareBefore]\" />\n </div>\n <div class=\"wr-compare__layer wr-compare__layer--after\" [style.clip-path]=\"clipPath()\">\n <ng-content select=\"[wrCompareAfter]\" />\n </div>\n </div>\n\n <div\n class=\"wr-compare__divider\"\n [style.left.%]=\"orientation() === 'horizontal' ? dividerLeft() : null\"\n [style.top.%]=\"orientation() === 'vertical' ? position() : null\"\n aria-hidden=\"true\"\n >\n @if (showHandle()) {\n <span class=\"wr-compare__handle\">\n @if (orientation() === 'horizontal') {\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n <path\n d=\"M5 4 L1 8 L5 12 M11 4 L15 8 L11 12\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n } @else {\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n <path\n d=\"M4 5 L8 1 L12 5 M4 11 L8 15 L12 11\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n }\n </span>\n }\n </div>\n</div>\n", encapsulation: i0.ViewEncapsulation.None });
214
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrCompare, deps: [], target: i0.ɵɵFactoryTarget.Component });
215
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: WrCompare, isStandalone: true, selector: "wr-compare", inputs: { position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, showHandle: { classPropertyName: "showHandle", publicName: "showHandle", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, minPosition: { classPropertyName: "minPosition", publicName: "minPosition", isSignal: true, isRequired: false, transformFunction: null }, maxPosition: { classPropertyName: "maxPosition", publicName: "maxPosition", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { position: "positionChange" }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: "<div\n class=\"wr-compare__surface\"\n role=\"slider\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-orientation]=\"orientation()\"\n [attr.aria-valuemin]=\"minPosition()\"\n [attr.aria-valuemax]=\"maxPosition()\"\n [attr.aria-valuenow]=\"position()\"\n [attr.aria-disabled]=\"disabled() || null\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n (pointerdown)=\"onPointerDown($event)\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerup)=\"onPointerUp($event)\"\n (pointercancel)=\"onPointerUp($event)\"\n (keydown)=\"onKeydown($event)\"\n>\n <div class=\"wr-compare__layers\">\n <div class=\"wr-compare__layer wr-compare__layer--before\">\n <ng-content select=\"[wrCompareBefore]\" />\n </div>\n <div class=\"wr-compare__layer wr-compare__layer--after\" [style.clip-path]=\"clipPath()\">\n <ng-content select=\"[wrCompareAfter]\" />\n </div>\n </div>\n\n <div\n class=\"wr-compare__divider\"\n [style.left.%]=\"orientation() === 'horizontal' ? dividerLeft() : null\"\n [style.top.%]=\"orientation() === 'vertical' ? position() : null\"\n aria-hidden=\"true\"\n >\n @if (showHandle()) {\n <span class=\"wr-compare__handle\">\n @if (orientation() === 'horizontal') {\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n <path\n d=\"M5 4 L1 8 L5 12 M11 4 L15 8 L11 12\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n } @else {\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n <path\n d=\"M4 5 L8 1 L12 5 M4 11 L8 15 L12 11\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n }\n </span>\n }\n </div>\n</div>\n", encapsulation: i0.ViewEncapsulation.None });
216
216
  }
217
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrCompare, decorators: [{
217
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrCompare, decorators: [{
218
218
  type: Component,
219
219
  args: [{ selector: 'wr-compare', encapsulation: ViewEncapsulation.None, host: { '[class]': 'classes()' }, template: "<div\n class=\"wr-compare__surface\"\n role=\"slider\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-orientation]=\"orientation()\"\n [attr.aria-valuemin]=\"minPosition()\"\n [attr.aria-valuemax]=\"maxPosition()\"\n [attr.aria-valuenow]=\"position()\"\n [attr.aria-disabled]=\"disabled() || null\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n (pointerdown)=\"onPointerDown($event)\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerup)=\"onPointerUp($event)\"\n (pointercancel)=\"onPointerUp($event)\"\n (keydown)=\"onKeydown($event)\"\n>\n <div class=\"wr-compare__layers\">\n <div class=\"wr-compare__layer wr-compare__layer--before\">\n <ng-content select=\"[wrCompareBefore]\" />\n </div>\n <div class=\"wr-compare__layer wr-compare__layer--after\" [style.clip-path]=\"clipPath()\">\n <ng-content select=\"[wrCompareAfter]\" />\n </div>\n </div>\n\n <div\n class=\"wr-compare__divider\"\n [style.left.%]=\"orientation() === 'horizontal' ? dividerLeft() : null\"\n [style.top.%]=\"orientation() === 'vertical' ? position() : null\"\n aria-hidden=\"true\"\n >\n @if (showHandle()) {\n <span class=\"wr-compare__handle\">\n @if (orientation() === 'horizontal') {\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n <path\n d=\"M5 4 L1 8 L5 12 M11 4 L15 8 L11 12\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n } @else {\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" aria-hidden=\"true\">\n <path\n d=\"M4 5 L8 1 L12 5 M4 11 L8 15 L12 11\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n }\n </span>\n }\n </div>\n</div>\n" }]
220
220
  }], ctorParameters: () => [], propDecorators: { position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }, { type: i0.Output, args: ["positionChange"] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], showHandle: [{ type: i0.Input, args: [{ isSignal: true, alias: "showHandle", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], minPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "minPosition", required: false }] }], maxPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxPosition", required: false }] }] } });
@@ -170,10 +170,10 @@ class WrConfetti {
170
170
  this.rafId = null;
171
171
  }
172
172
  }
173
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrConfetti, deps: [], target: i0.ɵɵFactoryTarget.Service });
174
- static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.2", ngImport: i0, type: WrConfetti });
173
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrConfetti, deps: [], target: i0.ɵɵFactoryTarget.Service });
174
+ static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.4", ngImport: i0, type: WrConfetti });
175
175
  }
176
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrConfetti, decorators: [{
176
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrConfetti, decorators: [{
177
177
  type: Service
178
178
  }], ctorParameters: () => [] });
179
179
 
@@ -499,10 +499,10 @@ class WrContextMenuItem {
499
499
  isRtl() {
500
500
  return this.dir?.value === 'rtl';
501
501
  }
502
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrContextMenuItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
503
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.2", type: WrContextMenuItem, isStandalone: true, selector: "wr-context-menu-item", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, submenu: { classPropertyName: "submenu", publicName: "submenu", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "menuitem" }, listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave($event)", "click": "onClick()", "keydown.enter": "activate($event)", "keydown.space": "activate($event)", "keydown.arrowRight": "onArrowRight($event)", "keydown.arrowLeft": "onArrowLeft($event)" }, properties: { "class": "classes()", "attr.tabindex": "-1", "attr.aria-disabled": "disabled() ? true : null", "attr.aria-haspopup": "submenu() ? \"menu\" : null", "attr.aria-expanded": "submenu() ? (submenuOpen ? \"true\" : \"false\") : null", "attr.aria-controls": "submenuId()" } }, ngImport: i0, template: "@if (icon(); as name) {\n <wr-icon class=\"wr-context-menu-item__icon\" [name]=\"name\" size=\"14\" />\n}\n<span class=\"wr-context-menu-item__label\"><ng-content /></span>\n@if (submenu()) {\n <svg\n class=\"wr-icon__svg wr-context-menu-item__chevron\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n}\n", dependencies: [{ kind: "component", type: WrIcon, selector: "wr-icon", inputs: ["name"] }], encapsulation: i0.ViewEncapsulation.None });
502
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrContextMenuItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
503
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: WrContextMenuItem, isStandalone: true, selector: "wr-context-menu-item", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, submenu: { classPropertyName: "submenu", publicName: "submenu", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "menuitem" }, listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave($event)", "click": "onClick()", "keydown.enter": "activate($event)", "keydown.space": "activate($event)", "keydown.arrowRight": "onArrowRight($event)", "keydown.arrowLeft": "onArrowLeft($event)" }, properties: { "class": "classes()", "attr.tabindex": "-1", "attr.aria-disabled": "disabled() ? true : null", "attr.aria-haspopup": "submenu() ? \"menu\" : null", "attr.aria-expanded": "submenu() ? (submenuOpen ? \"true\" : \"false\") : null", "attr.aria-controls": "submenuId()" } }, ngImport: i0, template: "@if (icon(); as name) {\n <wr-icon class=\"wr-context-menu-item__icon\" [name]=\"name\" size=\"14\" />\n}\n<span class=\"wr-context-menu-item__label\"><ng-content /></span>\n@if (submenu()) {\n <svg\n class=\"wr-icon__svg wr-context-menu-item__chevron\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n}\n", dependencies: [{ kind: "component", type: WrIcon, selector: "wr-icon", inputs: ["name"] }], encapsulation: i0.ViewEncapsulation.None });
504
504
  }
505
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrContextMenuItem, decorators: [{
505
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrContextMenuItem, decorators: [{
506
506
  type: Component,
507
507
  args: [{ selector: 'wr-context-menu-item', encapsulation: ViewEncapsulation.None, host: {
508
508
  role: 'menuitem',
@@ -1040,10 +1040,10 @@ class WrContextMenu {
1040
1040
  this.closeOverlay();
1041
1041
  }, WrContextMenu.LEAVE_DELAY);
1042
1042
  }
1043
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrContextMenu, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1044
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.2", type: WrContextMenu, isStandalone: true, selector: "[wrContextMenu]", inputs: { menu: { classPropertyName: "menu", publicName: "wrContextMenu", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "contextmenu": "onContextMenu($event)", "pointerdown": "onPointerDown($event)", "pointermove": "onPointerMove($event)", "pointerup": "onPointerUp()", "pointercancel": "onPointerUp()" }, properties: { "attr.aria-controls": "openMenuId()" }, classAttribute: "wr-context-menu-host" }, ngImport: i0 });
1043
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrContextMenu, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1044
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.4", type: WrContextMenu, isStandalone: true, selector: "[wrContextMenu]", inputs: { menu: { classPropertyName: "menu", publicName: "wrContextMenu", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "contextmenu": "onContextMenu($event)", "pointerdown": "onPointerDown($event)", "pointermove": "onPointerMove($event)", "pointerup": "onPointerUp()", "pointercancel": "onPointerUp()" }, properties: { "attr.aria-controls": "openMenuId()" }, classAttribute: "wr-context-menu-host" }, ngImport: i0 });
1045
1045
  }
1046
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrContextMenu, decorators: [{
1046
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrContextMenu, decorators: [{
1047
1047
  type: Directive,
1048
1048
  args: [{
1049
1049
  selector: '[wrContextMenu]',
@@ -1083,10 +1083,10 @@ class WrContextMenuPanel {
1083
1083
  /** The internal template the directive portals into the overlay. @internal */
1084
1084
  contentTpl = viewChild.required(TemplateRef, /* @ts-ignore */
1085
1085
  ...(ngDevMode ? [{ debugName: "contentTpl" }] : /* istanbul ignore next */ []));
1086
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrContextMenuPanel, deps: [], target: i0.ɵɵFactoryTarget.Component });
1087
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.2", type: WrContextMenuPanel, isStandalone: true, selector: "wr-context-menu", host: { styleAttribute: "display:none" }, viewQueries: [{ propertyName: "contentTpl", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], exportAs: ["wrContextMenu"], ngImport: i0, template: '<ng-template><div class="wr-context-menu" role="menu"><ng-content /></div></ng-template>', isInline: true, encapsulation: i0.ViewEncapsulation.None });
1086
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrContextMenuPanel, deps: [], target: i0.ɵɵFactoryTarget.Component });
1087
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.4", type: WrContextMenuPanel, isStandalone: true, selector: "wr-context-menu", host: { styleAttribute: "display:none" }, viewQueries: [{ propertyName: "contentTpl", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], exportAs: ["wrContextMenu"], ngImport: i0, template: '<ng-template><div class="wr-context-menu" role="menu"><ng-content /></div></ng-template>', isInline: true, encapsulation: i0.ViewEncapsulation.None });
1088
1088
  }
1089
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrContextMenuPanel, decorators: [{
1089
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrContextMenuPanel, decorators: [{
1090
1090
  type: Component,
1091
1091
  args: [{
1092
1092
  selector: 'wr-context-menu',
@@ -1119,10 +1119,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImpor
1119
1119
  * ```
1120
1120
  */
1121
1121
  class WrContextMenuDivider {
1122
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrContextMenuDivider, deps: [], target: i0.ɵɵFactoryTarget.Component });
1123
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.2", type: WrContextMenuDivider, isStandalone: true, selector: "wr-context-menu-divider", host: { attributes: { "role": "separator", "aria-orientation": "horizontal" }, classAttribute: "wr-context-menu-divider" }, ngImport: i0, template: '', isInline: true, encapsulation: i0.ViewEncapsulation.None });
1122
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrContextMenuDivider, deps: [], target: i0.ɵɵFactoryTarget.Component });
1123
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.4", type: WrContextMenuDivider, isStandalone: true, selector: "wr-context-menu-divider", host: { attributes: { "role": "separator", "aria-orientation": "horizontal" }, classAttribute: "wr-context-menu-divider" }, ngImport: i0, template: '', isInline: true, encapsulation: i0.ViewEncapsulation.None });
1124
1124
  }
1125
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrContextMenuDivider, decorators: [{
1125
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrContextMenuDivider, decorators: [{
1126
1126
  type: Component,
1127
1127
  args: [{
1128
1128
  selector: 'wr-context-menu-divider',
@@ -129,10 +129,10 @@ class WrCookie {
129
129
  for (const k of this.keys())
130
130
  this.remove(k);
131
131
  }
132
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrCookie, deps: [], target: i0.ɵɵFactoryTarget.Service });
133
- static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.2", ngImport: i0, type: WrCookie });
132
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrCookie, deps: [], target: i0.ɵɵFactoryTarget.Service });
133
+ static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.4", ngImport: i0, type: WrCookie });
134
134
  }
135
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrCookie, decorators: [{
135
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrCookie, decorators: [{
136
136
  type: Service
137
137
  }] });
138
138
 
@@ -185,10 +185,10 @@ class WrCounter {
185
185
  return Math.floor(mod + 1e-9);
186
186
  return mod;
187
187
  }
188
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrCounter, deps: [], target: i0.ɵɵFactoryTarget.Component });
189
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.2", type: WrCounter, isStandalone: true, selector: "wr-counter", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, duration: { classPropertyName: "duration", publicName: "duration", isSignal: true, isRequired: false, transformFunction: null }, decimals: { classPropertyName: "decimals", publicName: "decimals", isSignal: true, isRequired: false, transformFunction: null }, prefix: { classPropertyName: "prefix", publicName: "prefix", isSignal: true, isRequired: false, transformFunction: null }, suffix: { classPropertyName: "suffix", publicName: "suffix", isSignal: true, isRequired: false, transformFunction: null }, grouping: { classPropertyName: "grouping", publicName: "grouping", isSignal: true, isRequired: false, transformFunction: null }, minIntegerDigits: { classPropertyName: "minIntegerDigits", publicName: "minIntegerDigits", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "wr-counter" }, ngImport: i0, template: "@if (mode() === 'tween') {\n <span class=\"wr-counter__tween\">{{ prefix() }}{{ tweenText() }}{{ suffix() }}</span>\n} @else {\n <span class=\"wr-counter__sr-only\">{{ odoText() }}</span>\n <span class=\"wr-counter__odo\" aria-hidden=\"true\">\n @if (prefix()) {\n <span class=\"wr-counter__static\">{{ prefix() }}</span>\n }\n @for (cell of cells(); track $index) {\n @if (cell.kind === 'digit') {\n <span class=\"wr-counter__digit\">\n <span class=\"wr-counter__strip\" [style.transform]=\"`translateY(-${cell.fraction}em)`\">\n <span>0</span><span>1</span><span>2</span><span>3</span><span>4</span><span>5</span><span>6</span\n ><span>7</span><span>8</span><span>9</span>\n </span>\n </span>\n } @else {\n <span class=\"wr-counter__static\">{{ cell.char }}</span>\n }\n }\n @if (suffix()) {\n <span class=\"wr-counter__static\">{{ suffix() }}</span>\n }\n </span>\n}\n", encapsulation: i0.ViewEncapsulation.None });
188
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrCounter, deps: [], target: i0.ɵɵFactoryTarget.Component });
189
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: WrCounter, isStandalone: true, selector: "wr-counter", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, duration: { classPropertyName: "duration", publicName: "duration", isSignal: true, isRequired: false, transformFunction: null }, decimals: { classPropertyName: "decimals", publicName: "decimals", isSignal: true, isRequired: false, transformFunction: null }, prefix: { classPropertyName: "prefix", publicName: "prefix", isSignal: true, isRequired: false, transformFunction: null }, suffix: { classPropertyName: "suffix", publicName: "suffix", isSignal: true, isRequired: false, transformFunction: null }, grouping: { classPropertyName: "grouping", publicName: "grouping", isSignal: true, isRequired: false, transformFunction: null }, minIntegerDigits: { classPropertyName: "minIntegerDigits", publicName: "minIntegerDigits", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "wr-counter" }, ngImport: i0, template: "@if (mode() === 'tween') {\n <span class=\"wr-counter__tween\">{{ prefix() }}{{ tweenText() }}{{ suffix() }}</span>\n} @else {\n <span class=\"wr-counter__sr-only\">{{ odoText() }}</span>\n <span class=\"wr-counter__odo\" aria-hidden=\"true\">\n @if (prefix()) {\n <span class=\"wr-counter__static\">{{ prefix() }}</span>\n }\n @for (cell of cells(); track $index) {\n @if (cell.kind === 'digit') {\n <span class=\"wr-counter__digit\">\n <span class=\"wr-counter__strip\" [style.transform]=\"`translateY(-${cell.fraction}em)`\">\n <span>0</span><span>1</span><span>2</span><span>3</span><span>4</span><span>5</span><span>6</span\n ><span>7</span><span>8</span><span>9</span>\n </span>\n </span>\n } @else {\n <span class=\"wr-counter__static\">{{ cell.char }}</span>\n }\n }\n @if (suffix()) {\n <span class=\"wr-counter__static\">{{ suffix() }}</span>\n }\n </span>\n}\n", encapsulation: i0.ViewEncapsulation.None });
190
190
  }
191
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrCounter, decorators: [{
191
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrCounter, decorators: [{
192
192
  type: Component,
193
193
  args: [{ selector: 'wr-counter', encapsulation: ViewEncapsulation.None, host: { class: 'wr-counter' }, template: "@if (mode() === 'tween') {\n <span class=\"wr-counter__tween\">{{ prefix() }}{{ tweenText() }}{{ suffix() }}</span>\n} @else {\n <span class=\"wr-counter__sr-only\">{{ odoText() }}</span>\n <span class=\"wr-counter__odo\" aria-hidden=\"true\">\n @if (prefix()) {\n <span class=\"wr-counter__static\">{{ prefix() }}</span>\n }\n @for (cell of cells(); track $index) {\n @if (cell.kind === 'digit') {\n <span class=\"wr-counter__digit\">\n <span class=\"wr-counter__strip\" [style.transform]=\"`translateY(-${cell.fraction}em)`\">\n <span>0</span><span>1</span><span>2</span><span>3</span><span>4</span><span>5</span><span>6</span\n ><span>7</span><span>8</span><span>9</span>\n </span>\n </span>\n } @else {\n <span class=\"wr-counter__static\">{{ cell.char }}</span>\n }\n }\n @if (suffix()) {\n <span class=\"wr-counter__static\">{{ suffix() }}</span>\n }\n </span>\n}\n" }]
194
194
  }], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], duration: [{ type: i0.Input, args: [{ isSignal: true, alias: "duration", required: false }] }], decimals: [{ type: i0.Input, args: [{ isSignal: true, alias: "decimals", required: false }] }], prefix: [{ type: i0.Input, args: [{ isSignal: true, alias: "prefix", required: false }] }], suffix: [{ type: i0.Input, args: [{ isSignal: true, alias: "suffix", required: false }] }], grouping: [{ type: i0.Input, args: [{ isSignal: true, alias: "grouping", required: false }] }], minIntegerDigits: [{ type: i0.Input, args: [{ isSignal: true, alias: "minIntegerDigits", required: false }] }] } });
@@ -444,10 +444,10 @@ class WrCountUp {
444
444
  this.delayTimer = undefined;
445
445
  }
446
446
  }
447
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrCountUp, deps: [], target: i0.ɵɵFactoryTarget.Component });
448
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.2", type: WrCountUp, isStandalone: true, selector: "wr-count-up", inputs: { from: { classPropertyName: "from", publicName: "from", isSignal: true, isRequired: false, transformFunction: null }, to: { classPropertyName: "to", publicName: "to", isSignal: true, isRequired: true, transformFunction: null }, duration: { classPropertyName: "duration", publicName: "duration", isSignal: true, isRequired: false, transformFunction: null }, delay: { classPropertyName: "delay", publicName: "delay", isSignal: true, isRequired: false, transformFunction: null }, easing: { classPropertyName: "easing", publicName: "easing", isSignal: true, isRequired: false, transformFunction: null }, trigger: { classPropertyName: "trigger", publicName: "trigger", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, decimals: { classPropertyName: "decimals", publicName: "decimals", isSignal: true, isRequired: false, transformFunction: null }, prefix: { classPropertyName: "prefix", publicName: "prefix", isSignal: true, isRequired: false, transformFunction: null }, suffix: { classPropertyName: "suffix", publicName: "suffix", isSignal: true, isRequired: false, transformFunction: null }, grouping: { classPropertyName: "grouping", publicName: "grouping", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { started: "started", completed: "completed" }, host: { classAttribute: "wr-count-up" }, ngImport: i0, template: `{{ prefix() }}{{ formatted() }}{{ suffix() }}`, isInline: true, encapsulation: i0.ViewEncapsulation.None });
447
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrCountUp, deps: [], target: i0.ɵɵFactoryTarget.Component });
448
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: WrCountUp, isStandalone: true, selector: "wr-count-up", inputs: { from: { classPropertyName: "from", publicName: "from", isSignal: true, isRequired: false, transformFunction: null }, to: { classPropertyName: "to", publicName: "to", isSignal: true, isRequired: true, transformFunction: null }, duration: { classPropertyName: "duration", publicName: "duration", isSignal: true, isRequired: false, transformFunction: null }, delay: { classPropertyName: "delay", publicName: "delay", isSignal: true, isRequired: false, transformFunction: null }, easing: { classPropertyName: "easing", publicName: "easing", isSignal: true, isRequired: false, transformFunction: null }, trigger: { classPropertyName: "trigger", publicName: "trigger", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, decimals: { classPropertyName: "decimals", publicName: "decimals", isSignal: true, isRequired: false, transformFunction: null }, prefix: { classPropertyName: "prefix", publicName: "prefix", isSignal: true, isRequired: false, transformFunction: null }, suffix: { classPropertyName: "suffix", publicName: "suffix", isSignal: true, isRequired: false, transformFunction: null }, grouping: { classPropertyName: "grouping", publicName: "grouping", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { started: "started", completed: "completed" }, host: { classAttribute: "wr-count-up" }, ngImport: i0, template: `{{ prefix() }}{{ formatted() }}{{ suffix() }}`, isInline: true, encapsulation: i0.ViewEncapsulation.None });
449
449
  }
450
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrCountUp, decorators: [{
450
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: WrCountUp, decorators: [{
451
451
  type: Component,
452
452
  args: [{
453
453
  selector: 'wr-count-up',