@nldd/design-system 0.10.0 → 0.12.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 (267) hide show
  1. package/custom-elements.json +3084 -784
  2. package/dist/components/actions/button/button.d.ts +10 -0
  3. package/dist/components/actions/button/button.d.ts.map +1 -1
  4. package/dist/components/actions/button/button.js +23 -0
  5. package/dist/components/actions/button/button.js.map +1 -1
  6. package/dist/components/actions/button/button.styles.d.ts.map +1 -1
  7. package/dist/components/actions/button/button.styles.js +22 -0
  8. package/dist/components/actions/button/button.styles.js.map +1 -1
  9. package/dist/components/actions/button/button.template.d.ts +1 -0
  10. package/dist/components/actions/button/button.template.d.ts.map +1 -1
  11. package/dist/components/actions/button/button.template.js +20 -2
  12. package/dist/components/actions/button/button.template.js.map +1 -1
  13. package/dist/components/actions/icon-button/icon-button.d.ts +10 -0
  14. package/dist/components/actions/icon-button/icon-button.d.ts.map +1 -1
  15. package/dist/components/actions/icon-button/icon-button.js +23 -0
  16. package/dist/components/actions/icon-button/icon-button.js.map +1 -1
  17. package/dist/components/actions/icon-button/icon-button.template.d.ts.map +1 -1
  18. package/dist/components/actions/icon-button/icon-button.template.js +10 -3
  19. package/dist/components/actions/icon-button/icon-button.template.js.map +1 -1
  20. package/dist/components/actions/menu/menu.styles.js +1 -1
  21. package/dist/components/actions/split-button/split-button.d.ts +8 -0
  22. package/dist/components/actions/split-button/split-button.d.ts.map +1 -1
  23. package/dist/components/actions/split-button/split-button.js +20 -0
  24. package/dist/components/actions/split-button/split-button.js.map +1 -1
  25. package/dist/components/actions/split-button/split-button.template.d.ts.map +1 -1
  26. package/dist/components/actions/split-button/split-button.template.js +4 -0
  27. package/dist/components/actions/split-button/split-button.template.js.map +1 -1
  28. package/dist/components/components.js +2857 -1993
  29. package/dist/components/content/code-viewer/code-viewer.d.ts +14 -1
  30. package/dist/components/content/code-viewer/code-viewer.d.ts.map +1 -1
  31. package/dist/components/content/code-viewer/code-viewer.diff.d.ts +40 -0
  32. package/dist/components/content/code-viewer/code-viewer.diff.d.ts.map +1 -0
  33. package/dist/components/content/code-viewer/code-viewer.diff.js +261 -0
  34. package/dist/components/content/code-viewer/code-viewer.diff.js.map +1 -0
  35. package/dist/components/content/code-viewer/code-viewer.i18n.d.ts +5 -0
  36. package/dist/components/content/code-viewer/code-viewer.i18n.d.ts.map +1 -1
  37. package/dist/components/content/code-viewer/code-viewer.i18n.js +9 -0
  38. package/dist/components/content/code-viewer/code-viewer.i18n.js.map +1 -1
  39. package/dist/components/content/code-viewer/code-viewer.js +98 -6
  40. package/dist/components/content/code-viewer/code-viewer.js.map +1 -1
  41. package/dist/components/content/code-viewer/code-viewer.styles.d.ts.map +1 -1
  42. package/dist/components/content/code-viewer/code-viewer.styles.js +134 -1
  43. package/dist/components/content/code-viewer/code-viewer.styles.js.map +1 -1
  44. package/dist/components/content/code-viewer/code-viewer.template.d.ts.map +1 -1
  45. package/dist/components/content/code-viewer/code-viewer.template.js +5 -4
  46. package/dist/components/content/code-viewer/code-viewer.template.js.map +1 -1
  47. package/dist/components/content/icon/icon-aliases.d.ts.map +1 -1
  48. package/dist/components/content/icon/icon-aliases.js +13 -4
  49. package/dist/components/content/icon/icon-aliases.js.map +1 -1
  50. package/dist/components/content/icon/icon-gallery-status.d.ts.map +1 -1
  51. package/dist/components/content/icon/icon-gallery-status.js +9 -0
  52. package/dist/components/content/icon/icon-gallery-status.js.map +1 -1
  53. package/dist/components/content/icon/icon-registry.d.ts.map +1 -1
  54. package/dist/components/content/icon/icon-registry.js +9 -2
  55. package/dist/components/content/icon/icon-registry.js.map +1 -1
  56. package/dist/components/content/keyboard-shortcut/keyboard-shortcut.d.ts +3 -3
  57. package/dist/components/content/keyboard-shortcut/keyboard-shortcut.d.ts.map +1 -1
  58. package/dist/components/content/keyboard-shortcut/keyboard-shortcut.js +6 -21
  59. package/dist/components/content/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
  60. package/dist/components/content/keyboard-shortcut/keyboard-shortcut.styles.d.ts.map +1 -1
  61. package/dist/components/content/keyboard-shortcut/keyboard-shortcut.styles.js +3 -0
  62. package/dist/components/content/keyboard-shortcut/keyboard-shortcut.styles.js.map +1 -1
  63. package/dist/components/content/rich-text/rich-text.d.ts +10 -0
  64. package/dist/components/content/rich-text/rich-text.d.ts.map +1 -1
  65. package/dist/components/content/rich-text/rich-text.js +10 -0
  66. package/dist/components/content/rich-text/rich-text.js.map +1 -1
  67. package/dist/components/content/tooltip/tooltip.d.ts +14 -0
  68. package/dist/components/content/tooltip/tooltip.d.ts.map +1 -1
  69. package/dist/components/content/tooltip/tooltip.js +45 -6
  70. package/dist/components/content/tooltip/tooltip.js.map +1 -1
  71. package/dist/components/content/tooltip/tooltip.styles.d.ts.map +1 -1
  72. package/dist/components/content/tooltip/tooltip.styles.js +13 -0
  73. package/dist/components/content/tooltip/tooltip.styles.js.map +1 -1
  74. package/dist/components/content/tooltip/tooltip.template.d.ts.map +1 -1
  75. package/dist/components/content/tooltip/tooltip.template.js +18 -2
  76. package/dist/components/content/tooltip/tooltip.template.js.map +1 -1
  77. package/dist/components/{dist-Bo5Jeyfn.js → dist-B5E3q-ea.js} +2 -1
  78. package/dist/components/{dist-DbNhCpS5.js → dist-BFw_yEMS.js} +2 -1
  79. package/dist/components/{dist-DnZmcpbQ.js → dist-BNLAXAyO.js} +2 -1
  80. package/dist/components/{dist-DkqAbJH8.js → dist-BOVSVPSz.js} +1 -1
  81. package/dist/components/{dist-Ch3gNAuT.js → dist-BPB3rWnd.js} +2 -1
  82. package/dist/components/{dist-Bud_7w5g.js → dist-BWlUmyq3.js} +34 -2869
  83. package/dist/components/dist-CC8oiVtm.js +366 -0
  84. package/dist/components/dist-COKR0tYU.js +2860 -0
  85. package/dist/components/{dist-CaxHkqR2.js → dist-Co-tsc9S.js} +4 -3
  86. package/dist/components/{dist-iC2RTM0V.js → dist-D_9ZyZ5v.js} +3 -2
  87. package/dist/components/{dist-BB5mlo7D.js → dist-Dn9pjiud.js} +3 -2
  88. package/dist/components/{dist-B2QcygzG.js → dist-Dz28se9B.js} +2 -1
  89. package/dist/components/{dist-CA0yDFIt.js → dist-IPm8ilWf.js} +3 -2
  90. package/dist/components/{icon-D_ZGezHx.js → icon-DFhgRf3P.js} +19 -7
  91. package/dist/components/{icon-button-BVhiOwX9.js → icon-button-Sxkh5cVr.js} +526 -61
  92. package/dist/components/inputs/code-editor/code-editor.d.ts +4 -54
  93. package/dist/components/inputs/code-editor/code-editor.d.ts.map +1 -1
  94. package/dist/components/inputs/code-editor/code-editor.js +22 -262
  95. package/dist/components/inputs/code-editor/code-editor.js.map +1 -1
  96. package/dist/components/inputs/code-editor/code-editor.styles.d.ts.map +1 -1
  97. package/dist/components/inputs/code-editor/code-editor.styles.js +9 -1
  98. package/dist/components/inputs/code-editor/code-editor.styles.js.map +1 -1
  99. package/dist/components/inputs/date-picker/date-picker.styles.d.ts.map +1 -1
  100. package/dist/components/inputs/date-picker/date-picker.styles.js +29 -5
  101. package/dist/components/inputs/date-picker/date-picker.styles.js.map +1 -1
  102. package/dist/components/inputs/search-field/search-field.d.ts +11 -0
  103. package/dist/components/inputs/search-field/search-field.d.ts.map +1 -1
  104. package/dist/components/inputs/search-field/search-field.js +30 -1
  105. package/dist/components/inputs/search-field/search-field.js.map +1 -1
  106. package/dist/components/inputs/search-field/search-field.styles.d.ts.map +1 -1
  107. package/dist/components/inputs/search-field/search-field.styles.js +18 -0
  108. package/dist/components/inputs/search-field/search-field.styles.js.map +1 -1
  109. package/dist/components/inputs/search-field/search-field.template.d.ts.map +1 -1
  110. package/dist/components/inputs/search-field/search-field.template.js +12 -0
  111. package/dist/components/inputs/search-field/search-field.template.js.map +1 -1
  112. package/dist/components/inputs/segmented-control/segmented-control.d.ts +10 -0
  113. package/dist/components/inputs/segmented-control/segmented-control.d.ts.map +1 -1
  114. package/dist/components/inputs/segmented-control/segmented-control.js +25 -1
  115. package/dist/components/inputs/segmented-control/segmented-control.js.map +1 -1
  116. package/dist/components/inputs/segmented-control/segmented-control.template.d.ts.map +1 -1
  117. package/dist/components/inputs/segmented-control/segmented-control.template.js +20 -3
  118. package/dist/components/inputs/segmented-control/segmented-control.template.js.map +1 -1
  119. package/dist/components/inputs/text-editor/text-editor.annotation-sentinels.d.ts.map +1 -1
  120. package/dist/components/inputs/text-editor/text-editor.annotation-sentinels.js +9 -7
  121. package/dist/components/inputs/text-editor/text-editor.annotation-sentinels.js.map +1 -1
  122. package/dist/components/inputs/text-editor/text-editor.annotations.js +1 -1
  123. package/dist/components/inputs/text-editor/text-editor.annotations.js.map +1 -1
  124. package/dist/components/inputs/text-editor/text-editor.clipboard.d.ts +16 -0
  125. package/dist/components/inputs/text-editor/text-editor.clipboard.d.ts.map +1 -0
  126. package/dist/components/inputs/text-editor/text-editor.clipboard.js +50 -0
  127. package/dist/components/inputs/text-editor/text-editor.clipboard.js.map +1 -0
  128. package/dist/components/inputs/text-editor/text-editor.commands.d.ts.map +1 -1
  129. package/dist/components/inputs/text-editor/text-editor.commands.js +31 -58
  130. package/dist/components/inputs/text-editor/text-editor.commands.js.map +1 -1
  131. package/dist/components/inputs/text-editor/text-editor.d.ts +17 -64
  132. package/dist/components/inputs/text-editor/text-editor.d.ts.map +1 -1
  133. package/dist/components/inputs/text-editor/text-editor.drag.d.ts.map +1 -1
  134. package/dist/components/inputs/text-editor/text-editor.drag.js +2 -1
  135. package/dist/components/inputs/text-editor/text-editor.drag.js.map +1 -1
  136. package/dist/components/inputs/text-editor/text-editor.focus-selection.d.ts +3 -0
  137. package/dist/components/inputs/text-editor/text-editor.focus-selection.d.ts.map +1 -0
  138. package/dist/components/inputs/text-editor/text-editor.focus-selection.js +55 -0
  139. package/dist/components/inputs/text-editor/text-editor.focus-selection.js.map +1 -0
  140. package/dist/components/inputs/text-editor/text-editor.hidden-syntax.d.ts +6 -0
  141. package/dist/components/inputs/text-editor/text-editor.hidden-syntax.d.ts.map +1 -0
  142. package/dist/components/inputs/text-editor/text-editor.hidden-syntax.js +257 -0
  143. package/dist/components/inputs/text-editor/text-editor.hidden-syntax.js.map +1 -0
  144. package/dist/components/inputs/text-editor/text-editor.js +93 -313
  145. package/dist/components/inputs/text-editor/text-editor.js.map +1 -1
  146. package/dist/components/inputs/text-editor/text-editor.keymap.d.ts +6 -0
  147. package/dist/components/inputs/text-editor/text-editor.keymap.d.ts.map +1 -0
  148. package/dist/components/inputs/text-editor/text-editor.keymap.js +38 -0
  149. package/dist/components/inputs/text-editor/text-editor.keymap.js.map +1 -0
  150. package/dist/components/inputs/text-editor/text-editor.links.d.ts.map +1 -1
  151. package/dist/components/inputs/text-editor/text-editor.links.js +11 -9
  152. package/dist/components/inputs/text-editor/text-editor.links.js.map +1 -1
  153. package/dist/components/inputs/text-editor/text-editor.markdown.d.ts +1 -17
  154. package/dist/components/inputs/text-editor/text-editor.markdown.d.ts.map +1 -1
  155. package/dist/components/inputs/text-editor/text-editor.markdown.js +26 -186
  156. package/dist/components/inputs/text-editor/text-editor.markdown.js.map +1 -1
  157. package/dist/components/inputs/text-editor/text-editor.mention.d.ts +52 -0
  158. package/dist/components/inputs/text-editor/text-editor.mention.d.ts.map +1 -0
  159. package/dist/components/inputs/text-editor/text-editor.mention.js +186 -0
  160. package/dist/components/inputs/text-editor/text-editor.mention.js.map +1 -0
  161. package/dist/components/inputs/text-editor/text-editor.mentions.d.ts +0 -16
  162. package/dist/components/inputs/text-editor/text-editor.mentions.d.ts.map +1 -1
  163. package/dist/components/inputs/text-editor/text-editor.mentions.js +1 -41
  164. package/dist/components/inputs/text-editor/text-editor.mentions.js.map +1 -1
  165. package/dist/components/inputs/text-editor/text-editor.selection.d.ts +13 -0
  166. package/dist/components/inputs/text-editor/text-editor.selection.d.ts.map +1 -0
  167. package/dist/components/inputs/text-editor/text-editor.selection.js +62 -0
  168. package/dist/components/inputs/text-editor/text-editor.selection.js.map +1 -0
  169. package/dist/components/inputs/text-editor/text-editor.spellcheck.d.ts.map +1 -1
  170. package/dist/components/inputs/text-editor/text-editor.spellcheck.js +4 -6
  171. package/dist/components/inputs/text-editor/text-editor.spellcheck.js.map +1 -1
  172. package/dist/components/inputs/text-editor/text-editor.styles.d.ts.map +1 -1
  173. package/dist/components/inputs/text-editor/text-editor.styles.js +185 -64
  174. package/dist/components/inputs/text-editor/text-editor.styles.js.map +1 -1
  175. package/dist/components/inputs/text-editor/text-editor.syntax.d.ts +22 -0
  176. package/dist/components/inputs/text-editor/text-editor.syntax.d.ts.map +1 -1
  177. package/dist/components/inputs/text-editor/text-editor.syntax.js +44 -0
  178. package/dist/components/inputs/text-editor/text-editor.syntax.js.map +1 -1
  179. package/dist/components/inputs/toggle-button/toggle-button.d.ts +10 -0
  180. package/dist/components/inputs/toggle-button/toggle-button.d.ts.map +1 -1
  181. package/dist/components/inputs/toggle-button/toggle-button.js +25 -1
  182. package/dist/components/inputs/toggle-button/toggle-button.js.map +1 -1
  183. package/dist/components/inputs/toggle-button/toggle-button.template.d.ts.map +1 -1
  184. package/dist/components/inputs/toggle-button/toggle-button.template.js +21 -7
  185. package/dist/components/inputs/toggle-button/toggle-button.template.js.map +1 -1
  186. package/dist/components/layout/card/card.styles.js +4 -4
  187. package/dist/components/layout/container/container.d.ts +2 -0
  188. package/dist/components/layout/container/container.d.ts.map +1 -1
  189. package/dist/components/layout/container/container.js +9 -0
  190. package/dist/components/layout/container/container.js.map +1 -1
  191. package/dist/components/layout/container/container.styles.d.ts.map +1 -1
  192. package/dist/components/layout/container/container.styles.js +13 -0
  193. package/dist/components/layout/container/container.styles.js.map +1 -1
  194. package/dist/components/lists-and-tables/cells/step-cell/step-cell.styles.d.ts.map +1 -1
  195. package/dist/components/lists-and-tables/cells/step-cell/step-cell.styles.js +9 -5
  196. package/dist/components/lists-and-tables/cells/step-cell/step-cell.styles.js.map +1 -1
  197. package/dist/components/navigation/document-tab-bar/document-tab-bar.styles.d.ts.map +1 -1
  198. package/dist/components/navigation/document-tab-bar/document-tab-bar.styles.js +16 -15
  199. package/dist/components/navigation/document-tab-bar/document-tab-bar.styles.js.map +1 -1
  200. package/dist/components/navigation/menu-bar-item/menu-bar-item.styles.js +2 -2
  201. package/dist/components/navigation/tab-bar/tab-bar.styles.js +9 -9
  202. package/dist/components/status-and-feedback/activity-indicator/activity-indicator.d.ts +16 -9
  203. package/dist/components/status-and-feedback/activity-indicator/activity-indicator.d.ts.map +1 -1
  204. package/dist/components/status-and-feedback/activity-indicator/activity-indicator.js +16 -9
  205. package/dist/components/status-and-feedback/activity-indicator/activity-indicator.js.map +1 -1
  206. package/dist/components/status-and-feedback/activity-indicator/activity-indicator.styles.d.ts.map +1 -1
  207. package/dist/components/status-and-feedback/activity-indicator/activity-indicator.styles.js +23 -18
  208. package/dist/components/status-and-feedback/activity-indicator/activity-indicator.styles.js.map +1 -1
  209. package/dist/components/status-and-feedback/activity-indicator/activity-indicator.template.d.ts.map +1 -1
  210. package/dist/components/status-and-feedback/activity-indicator/activity-indicator.template.js +19 -21
  211. package/dist/components/status-and-feedback/activity-indicator/activity-indicator.template.js.map +1 -1
  212. package/dist/components/status-and-feedback/inline-dialog/inline-dialog.styles.js +1 -1
  213. package/dist/components/status-and-feedback/notification/notification.d.ts +2 -1
  214. package/dist/components/status-and-feedback/notification/notification.d.ts.map +1 -1
  215. package/dist/components/status-and-feedback/notification/notification.js +5 -2
  216. package/dist/components/status-and-feedback/notification/notification.js.map +1 -1
  217. package/dist/components/status-and-feedback/notification/notification.styles.d.ts.map +1 -1
  218. package/dist/components/status-and-feedback/notification/notification.styles.js +19 -1
  219. package/dist/components/status-and-feedback/notification/notification.styles.js.map +1 -1
  220. package/dist/components/status-and-feedback/notification/notifications-area.d.ts.map +1 -1
  221. package/dist/components/status-and-feedback/notification/notifications-area.js +14 -0
  222. package/dist/components/status-and-feedback/notification/notifications-area.js.map +1 -1
  223. package/dist/components/status-and-feedback/progress-bar/progress-bar.styles.js +4 -4
  224. package/dist/components/status-and-feedback/progress-circle/progress-circle.styles.js +3 -3
  225. package/dist/components/status-and-feedback/progress-circle/progress-circle.template.js +1 -1
  226. package/dist/components/status-and-feedback/progress-circle/progress-circle.template.js.map +1 -1
  227. package/dist/components/status-and-feedback/step-bar/step-bar.styles.d.ts.map +1 -1
  228. package/dist/components/status-and-feedback/step-bar/step-bar.styles.js +7 -5
  229. package/dist/components/status-and-feedback/step-bar/step-bar.styles.js.map +1 -1
  230. package/dist/css/rich-text.css +61 -1
  231. package/dist/css/themes/bruin.css +108 -64
  232. package/dist/css/themes/donkerblauw.css +108 -64
  233. package/dist/css/themes/donkerbruin.css +88 -64
  234. package/dist/css/themes/donkergeel.css +149 -94
  235. package/dist/css/themes/donkergroen.css +93 -64
  236. package/dist/css/themes/geel.css +149 -94
  237. package/dist/css/themes/groen.css +108 -64
  238. package/dist/css/themes/hemelblauw.css +108 -64
  239. package/dist/css/themes/lichtblauw.css +111 -64
  240. package/dist/css/themes/mintgroen.css +111 -64
  241. package/dist/css/themes/mosgroen.css +108 -64
  242. package/dist/css/themes/oranje.css +162 -99
  243. package/dist/css/themes/paars.css +115 -64
  244. package/dist/css/themes/robijnrood.css +159 -96
  245. package/dist/css/themes/rood.css +159 -96
  246. package/dist/css/themes/roze.css +118 -64
  247. package/dist/css/themes/violet.css +93 -64
  248. package/dist/css/themes.css +2047 -1247
  249. package/dist/css/variables.css +142 -70
  250. package/dist/nldd.min.js +1468 -998
  251. package/dist/translations/en-US.d.ts.map +1 -1
  252. package/dist/translations/en-US.js +5 -0
  253. package/dist/translations/en-US.js.map +1 -1
  254. package/dist/translations/nl.generated.d.ts +5 -0
  255. package/dist/translations/nl.generated.d.ts.map +1 -1
  256. package/dist/types/vue.d.ts +138 -32
  257. package/dist/utilities/codemirror/codemirror-input.d.ts +90 -0
  258. package/dist/utilities/codemirror/codemirror-input.d.ts.map +1 -0
  259. package/dist/utilities/codemirror/codemirror-input.js +250 -0
  260. package/dist/utilities/codemirror/codemirror-input.js.map +1 -0
  261. package/dist/utilities/codemirror/theme.js +1 -1
  262. package/dist/utilities/codemirror/theme.js.map +1 -1
  263. package/dist/utilities/shortcut.d.ts +50 -0
  264. package/dist/utilities/shortcut.d.ts.map +1 -0
  265. package/dist/utilities/shortcut.js +77 -0
  266. package/dist/utilities/shortcut.js.map +1 -0
  267. package/package.json +2 -1
@@ -40,78 +40,29 @@
40
40
  * @fires change - When the content is committed on blur (detail: { value })
41
41
  */
42
42
  import { type PropertyValues } from 'lit';
43
- import { type FormValue } from '../../../utilities/form-associated-mixin.js';
44
43
  import { type Extension } from '@codemirror/state';
45
- import { NLDDCodeMirrorElement } from '../../../utilities/codemirror/codemirror-element.js';
44
+ import { NLDDCodeMirrorInput } from '../../../utilities/codemirror/codemirror-input.js';
46
45
  export type ResizeMode = 'none' | 'vertical' | 'auto';
47
46
  export type CodeEditorAppearance = 'input-field' | 'simple';
48
- declare const NLDDCodeEditor_base: typeof NLDDCodeMirrorElement & (abstract new (...args: any[]) => NLDDCodeMirrorElement & import("../../../utilities/form-associated-mixin.js").FormAssociatedElement) & (abstract new (...args: any[]) => import("../../../utilities/described-by-mixin.js").DescribedElement);
49
- export declare class NLDDCodeEditor extends NLDDCodeEditor_base {
50
- static shadowRootOptions: {
51
- delegatesFocus: boolean;
52
- clonable?: boolean;
53
- customElementRegistry?: CustomElementRegistry;
54
- mode: ShadowRootMode;
55
- serializable?: boolean;
56
- slotAssignment?: SlotAssignmentMode;
57
- };
47
+ export declare class NLDDCodeEditor extends NLDDCodeMirrorInput {
58
48
  static styles: import("lit").CSSResult;
59
- /** Says this is the control an nldd-form-field is about, so the field can
60
- * find it, name it and move focus into it. See nldd-form-field. */
61
- static isFormInput: boolean;
62
- private _initialValue;
63
- private _valueAtFocus;
64
- private _accessibleLabelWarned;
65
- value: string;
66
- inputId: string;
67
- placeholder: string;
68
- disabled: boolean;
69
- name: string;
70
- readonly: boolean;
71
- required: boolean;
72
49
  wrap: boolean;
73
- rows: number;
74
50
  resize: ResizeMode;
75
51
  appearance: CodeEditorAppearance;
76
52
  language: string;
77
53
  lineNumbers: boolean;
78
- accessibleLabel: string;
79
54
  private _container;
80
- private _editableCompartment;
55
+ protected readonly rowsProperty = "--_code-editor-rows";
81
56
  private _wrapCompartment;
82
57
  private _lineNumbersCompartment;
83
- private _placeholderCompartment;
84
- private _attrsCompartment;
85
58
  private _languageCompartment;
86
- /**
87
- * Marks the control as invalid.
88
- *
89
- * Announced and not drawn. What is wrong belongs in an
90
- * nldd-validation-list, in words: a red ring around a single
91
- * checkbox or radio would say the option is wrong, while it is the question
92
- * that is unanswered. `aria-invalid` still goes on the control, because
93
- * choosing not to show something is not a reason to keep quiet about it.
94
- */
95
- invalid: boolean;
96
59
  protected getEditorParent(): HTMLElement | null | undefined;
97
60
  protected buildExtensions(): Extension[];
98
- private _editableExtension;
99
- private _placeholderExtension;
100
61
  private _lineNumbersExtension;
101
- private _attrsExtension;
102
- firstUpdated(): void;
62
+ protected contentAttributes(): Record<string, string>;
103
63
  protected onEditorMounted(): void;
104
64
  updated(changed: PropertyValues): void;
105
65
  private _applyLanguage;
106
- private _onDocChanged;
107
- private _emitChange;
108
- private _onScrollerPointerDown;
109
- private _checkAccessibleLabel;
110
- formValue(): FormValue;
111
- formResetCallback(): void;
112
- formStateRestoreCallback(state: File | string | FormData | null): void;
113
- /** CodeMirror builds the textbox; the host is only its container. */
114
- describedTarget(): Element | null;
115
66
  render(): import("lit-html").TemplateResult;
116
67
  }
117
68
  declare global {
@@ -119,5 +70,4 @@ declare global {
119
70
  'nldd-code-editor': NLDDCodeEditor;
120
71
  }
121
72
  }
122
- export {};
123
73
  //# sourceMappingURL=code-editor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"code-editor.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/code-editor/code-editor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAEtD,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,6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e;IAEjC,SAAS,CAAC,QAAQ,CAAC,YAAY,yBAAyB;IAGxD,OAAO,CAAC,gBAAgB,CAAqB;IAC7C,OAAO,CAAC,uBAAuB,CAAqB;IACpD,OAAO,CAAC,oBAAoB,CAAqB;IAEjD,SAAS,CAAC,eAAe,IAAI,WAAW,GAAG,IAAI,GAAG,SAAS;IAI3D,SAAS,CAAC,eAAe,IAAI,SAAS,EAAE;IAaxC,OAAO,CAAC,qBAAqB;cAgBV,iBAAiB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;cAM3C,eAAe,IAAI,IAAI;IAKjC,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;YAcjC,cAAc;IAoBnB,MAAM;CAGf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,kBAAkB,EAAE,cAAc,CAAC;KACnC;CACD"}
@@ -4,105 +4,29 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
- /**
8
- * Nederlandse Digitale Dienst Code Editor Component (Lit + TypeScript)
9
- *
10
- * A monospace editor for code, YAML, JSON and other technical content, built
11
- * on CodeMirror 6 (via NLDDCodeMirrorElement). Visually pairs with
12
- * nldd-code-viewer for a matching read-only surface.
13
- *
14
- * Default `appearance="simple"` is a bare, flush editor (no frame, no focus ring)
15
- * for use inside an nldd-form-field or a consumer composition that owns its own
16
- * chrome and focus treatment; the caret is rendered as a prominent accent as
17
- * the focus cue. `appearance="input-field"` adds the framed surface (border ring, tinted
18
- * fill, inner padding, radius) and a focus ring for standalone use.
19
- *
20
- * The simple variant has no surrounding space of its own: let a layout
21
- * container own the spacing and forward clicks with `focusFromPoint()` so
22
- * clicking the padding still starts editing.
23
- *
24
- * Optional `language` enables lazy syntax highlighting; `line-numbers` adds a
25
- * gutter (click a number to move the caret to that line).
26
- *
27
- * @element nldd-code-editor
28
- *
29
- * @attr {string} value - Editor content
30
- * @attr {string} placeholder - Placeholder text shown while empty
31
- * @attr {string} input-id - Sets the id on the editable element. Set automatically by nldd-form-field.
32
- * @attr {boolean} disabled - Disabled state
33
- * @attr {string} name - Field name for form submission
34
- * @attr {boolean} readonly - Readonly state (focusable and selectable, not editable)
35
- * @attr {boolean} required - Required state
36
- * @attr {boolean} wrap - Wrap long lines instead of horizontal scroll
37
- * @attr {number} rows - Minimum visible rows (the floor in every resize mode). Default: 6.
38
- * @attr {string} resize - 'none' (fixed) | 'vertical' (drag) | 'auto' (grow, default)
39
- * @attr {string} appearance - 'simple' (default, bare) | 'input-field' (framed surface)
40
- * @attr {string} language - Highlight grammar (yaml, json, javascript, typescript, css, html, xml, bash, markdown, rust, gherkin, toml, sql, python). Empty disables highlighting.
41
- * @attr {boolean} line-numbers - Show a line-number gutter
42
- * @attr {string} accessible-label - Accessible label forwarded to the editor. Set automatically by nldd-form-field.
43
- * @attr {boolean} invalid - Marks the control as invalid. Announced with aria-invalid; nothing is drawn for it.
44
- *
45
- * @fires input - When the content changes (detail: { value })
46
- * @fires change - When the content is committed on blur (detail: { value })
47
- */
48
- import { LitElement } from 'lit';
49
7
  import { customElement, property, query } from 'lit/decorators.js';
50
- import { FormAssociated } from '../../../utilities/form-associated-mixin.js';
51
8
  import { reflectNonDefault } from '../../../utilities/reflect-non-default.js';
52
- import { EditorView, keymap, drawSelection, lineNumbers as cmLineNumbers, placeholder as cmPlaceholder, } from '@codemirror/view';
53
- import { Compartment, EditorState } from '@codemirror/state';
9
+ import { EditorView, keymap, drawSelection, lineNumbers as cmLineNumbers } from '@codemirror/view';
10
+ import { Compartment } from '@codemirror/state';
54
11
  import { defaultKeymap, history, historyKeymap } from '@codemirror/commands';
55
- import { NLDDCodeMirrorElement } from '../../../utilities/codemirror/codemirror-element.js';
12
+ import { NLDDCodeMirrorInput } from '../../../utilities/codemirror/codemirror-input.js';
56
13
  import { nlddCodeMirrorTheme } from '../../../utilities/codemirror/theme.js';
57
14
  import { loadLanguage } from '../../../utilities/codemirror/languages.js';
58
15
  import { codeEditorStyles } from './code-editor.styles.js';
59
16
  import { codeEditorTemplate } from './code-editor.template.js';
60
- import { DescribedBy } from '../../../utilities/described-by-mixin.js';
61
- let NLDDCodeEditor = class NLDDCodeEditor extends DescribedBy(FormAssociated(NLDDCodeMirrorElement)) {
17
+ let NLDDCodeEditor = class NLDDCodeEditor extends NLDDCodeMirrorInput {
62
18
  constructor() {
63
19
  super(...arguments);
64
- this._initialValue = '';
65
- this._valueAtFocus = '';
66
- this._accessibleLabelWarned = false;
67
- this.value = '';
68
- this.inputId = '';
69
- this.placeholder = '';
70
- this.disabled = false;
71
- this.name = '';
72
- this.readonly = false;
73
- this.required = false;
74
20
  this.wrap = false;
75
- this.rows = 6;
76
21
  this.resize = 'auto';
77
22
  this.appearance = 'simple';
78
23
  this.language = '';
79
24
  this.lineNumbers = false;
80
- this.accessibleLabel = '';
25
+ this.rowsProperty = '--_code-editor-rows';
81
26
  // Compartments let us reconfigure single concerns without rebuilding state.
82
- this._editableCompartment = new Compartment();
83
27
  this._wrapCompartment = new Compartment();
84
28
  this._lineNumbersCompartment = new Compartment();
85
- this._placeholderCompartment = new Compartment();
86
- this._attrsCompartment = new Compartment();
87
29
  this._languageCompartment = new Compartment();
88
- /**
89
- * Marks the control as invalid.
90
- *
91
- * Announced and not drawn. What is wrong belongs in an
92
- * nldd-validation-list, in words: a red ring around a single
93
- * checkbox or radio would say the option is wrong, while it is the question
94
- * that is unanswered. `aria-invalid` still goes on the control, because
95
- * choosing not to show something is not a reason to keep quiet about it.
96
- */
97
- this.invalid = false;
98
- this._onScrollerPointerDown = (event) => {
99
- // Only the scroller's own padding — not the content/gutter inside it.
100
- // pointerdown covers mouse, touch and pen in one event.
101
- if (event.target !== this.view?.scrollDOM)
102
- return;
103
- this.focusFromPoint(event.clientX, event.clientY);
104
- event.preventDefault();
105
- };
106
30
  }
107
31
  getEditorParent() {
108
32
  return this._container;
@@ -113,36 +37,12 @@ let NLDDCodeEditor = class NLDDCodeEditor extends DescribedBy(FormAssociated(NLD
113
37
  history(),
114
38
  drawSelection(),
115
39
  keymap.of([...defaultKeymap, ...historyKeymap]),
116
- this._placeholderCompartment.of(this._placeholderExtension()),
40
+ ...this.inputExtensions(),
117
41
  this._wrapCompartment.of(this.wrap ? EditorView.lineWrapping : []),
118
42
  this._lineNumbersCompartment.of(this._lineNumbersExtension()),
119
- this._editableCompartment.of(this._editableExtension()),
120
- this._attrsCompartment.of(this._attrsExtension()),
121
43
  this._languageCompartment.of([]),
122
- EditorView.updateListener.of((u) => {
123
- if (u.docChanged)
124
- this._onDocChanged();
125
- }),
126
- EditorView.domEventHandlers({
127
- focus: () => {
128
- this._valueAtFocus = this.value;
129
- },
130
- blur: () => {
131
- if (this.value !== this._valueAtFocus)
132
- this._emitChange();
133
- },
134
- }),
135
44
  ];
136
45
  }
137
- _editableExtension() {
138
- // Readonly stays focusable/selectable (read + copy); disabled is inert.
139
- const editable = !this.disabled;
140
- const readOnly = this.disabled || this.readonly;
141
- return [EditorView.editable.of(editable), EditorState.readOnly.of(readOnly)];
142
- }
143
- _placeholderExtension() {
144
- return this.placeholder ? cmPlaceholder(this.placeholder) : [];
145
- }
146
46
  _lineNumbersExtension() {
147
47
  if (!this.lineNumbers)
148
48
  return [];
@@ -157,88 +57,31 @@ let NLDDCodeEditor = class NLDDCodeEditor extends DescribedBy(FormAssociated(NLD
157
57
  },
158
58
  });
159
59
  }
160
- _attrsExtension() {
161
- // CodeMirror's content is a bare contenteditable; give it the textbox
162
- // semantics a native <textarea> had — role, multiline, and the readonly/
163
- // required state — so screen readers announce it correctly (WCAG 4.1.2).
164
- const attrs = {
165
- 'role': 'textbox',
166
- 'aria-multiline': 'true',
167
- };
168
- if (this.accessibleLabel)
169
- attrs['aria-label'] = this.accessibleLabel;
170
- if (this.inputId)
171
- attrs['id'] = this.inputId;
172
- // disabled makes the field inert (contenteditable=false); readonly keeps it
173
- // focusable but non-editable. Either way it's not editable, so reflect
174
- // aria-readonly. aria-required mirrors the required constraint.
175
- if (this.readonly || this.disabled)
176
- attrs['aria-readonly'] = 'true';
177
- if (this.required)
178
- attrs['aria-required'] = 'true';
179
- return EditorView.contentAttributes.of(attrs);
180
- }
181
- firstUpdated() {
182
- this._initialValue = this.value;
183
- this.style.setProperty('--_code-editor-rows', String(this.rows));
184
- this.mountEditor(this.value);
185
- this.onEditorMounted();
60
+ // CodeMirror's content is a bare contenteditable; give it the textbox
61
+ // semantics a native <textarea> had, so screen readers announce it (WCAG 4.1.2).
62
+ contentAttributes() {
63
+ return { 'role': 'textbox', 'aria-multiline': 'true' };
186
64
  }
187
65
  /* Runs on the initial mount and on every re-mount after a detach/reattach
188
- * (e.g. Vue <KeepAlive>): the view — and its scrollDOM — is rebuilt, so the
189
- * padding-click forwarder and language must be (re)applied here. */
66
+ * (e.g. Vue <KeepAlive>): the view is rebuilt, so the language goes on again. */
190
67
  onEditorMounted() {
191
- // A press on the scroller's own padding (outside .cm-content) doesn't
192
- // place a caret; forward it to the nearest line so the padding is
193
- // clickable too. CM attaches its own handlers to the content, not the
194
- // scroller, so this is a plain listener on the scroller element.
195
- this.view?.scrollDOM.addEventListener('pointerdown', this._onScrollerPointerDown);
196
- this.commitFormValue();
68
+ super.onEditorMounted();
197
69
  if (this.language)
198
70
  void this._applyLanguage();
199
- this._checkAccessibleLabel();
200
71
  }
201
72
  updated(changed) {
202
- if (changed.has('rows')) {
203
- this.style.setProperty('--_code-editor-rows', String(this.rows));
73
+ super.updated(changed);
74
+ if (!this.view)
75
+ return;
76
+ if (changed.has('wrap')) {
77
+ this.reconfigure(this._wrapCompartment, this.wrap ? EditorView.lineWrapping : []);
78
+ }
79
+ if (changed.has('lineNumbers')) {
80
+ this.reconfigure(this._lineNumbersCompartment, this._lineNumbersExtension());
204
81
  }
205
- if (this.view) {
206
- if (changed.has('value')) {
207
- const docWas = this.doc;
208
- this.setDoc(this.value);
209
- this.commitFormValue();
210
- // A programmatic value change while focused must not look like a user edit
211
- // on the next blur: if setDoc actually moved the doc (i.e. this wasn't the
212
- // echo of the user's own typing, where the doc already equals value),
213
- // advance the focus-time baseline too.
214
- if (docWas !== this.value)
215
- this._valueAtFocus = this.value;
216
- }
217
- if (changed.has('disabled') || changed.has('readonly')) {
218
- this.reconfigure(this._editableCompartment, this._editableExtension());
219
- }
220
- // readonly/required/disabled also drive the content's aria-readonly/
221
- // aria-required, so refresh the attrs compartment when they change.
222
- if (changed.has('disabled') || changed.has('readonly') || changed.has('required')) {
223
- this.reconfigure(this._attrsCompartment, this._attrsExtension());
224
- }
225
- if (changed.has('wrap')) {
226
- this.reconfigure(this._wrapCompartment, this.wrap ? EditorView.lineWrapping : []);
227
- }
228
- if (changed.has('lineNumbers')) {
229
- this.reconfigure(this._lineNumbersCompartment, this._lineNumbersExtension());
230
- }
231
- if (changed.has('placeholder')) {
232
- this.reconfigure(this._placeholderCompartment, this._placeholderExtension());
233
- }
234
- if (changed.has('accessibleLabel') || changed.has('inputId')) {
235
- this.reconfigure(this._attrsCompartment, this._attrsExtension());
236
- }
237
- if (changed.has('language')) {
238
- void this._applyLanguage();
239
- }
82
+ if (changed.has('language')) {
83
+ void this._applyLanguage();
240
84
  }
241
- this._checkAccessibleLabel();
242
85
  }
243
86
  async _applyLanguage() {
244
87
  const lang = this.language;
@@ -261,91 +104,14 @@ let NLDDCodeEditor = class NLDDCodeEditor extends DescribedBy(FormAssociated(NLD
261
104
  this.reconfigure(this._languageCompartment, []);
262
105
  }
263
106
  }
264
- _onDocChanged() {
265
- const text = this.doc;
266
- if (text === this.value)
267
- return;
268
- this.value = text;
269
- this.commitFormValue();
270
- this.dispatchEvent(new CustomEvent('input', {
271
- detail: { value: text },
272
- bubbles: true,
273
- composed: true,
274
- }));
275
- }
276
- _emitChange() {
277
- this.commitFormValue();
278
- this.dispatchEvent(new CustomEvent('change', {
279
- detail: { value: this.value },
280
- bubbles: true,
281
- composed: true,
282
- }));
283
- }
284
- /* Ran from updated(), not firstUpdated(): a parent nldd-form-field sets
285
- * input-id slightly after our first render, so checking earlier triggers
286
- * a spurious warning for the standard form-field usage. We re-check on
287
- * every update and warn once if the missing label is still missing. */
288
- _checkAccessibleLabel() {
289
- if (this._accessibleLabelWarned)
290
- return;
291
- if (this.accessibleLabel || this.inputId)
292
- return;
293
- this._accessibleLabelWarned = true;
294
- console.warn('<nldd-code-editor>: No accessible-label or input-id provided. Use nldd-form-field for labeled usage, or set accessible-label for screen reader accessibility (WCAG SC 4.1.2).');
295
- }
296
- formValue() {
297
- return this.value;
298
- }
299
- formResetCallback() {
300
- this.value = this._initialValue;
301
- }
302
- formStateRestoreCallback(state) {
303
- if (typeof state === 'string')
304
- this.value = state;
305
- }
306
- /** CodeMirror builds the textbox; the host is only its container. */
307
- describedTarget() {
308
- return this.shadowRoot?.querySelector('.cm-content') ?? null;
309
- }
310
107
  render() {
311
108
  return codeEditorTemplate(this);
312
109
  }
313
110
  };
314
- NLDDCodeEditor.shadowRootOptions = {
315
- ...LitElement.shadowRootOptions,
316
- delegatesFocus: true,
317
- };
318
111
  NLDDCodeEditor.styles = codeEditorStyles;
319
- /** Says this is the control an nldd-form-field is about, so the field can
320
- * find it, name it and move focus into it. See nldd-form-field. */
321
- NLDDCodeEditor.isFormInput = true;
322
- __decorate([
323
- property({ type: String })
324
- ], NLDDCodeEditor.prototype, "value", void 0);
325
- __decorate([
326
- property({ type: String, attribute: 'input-id' })
327
- ], NLDDCodeEditor.prototype, "inputId", void 0);
328
- __decorate([
329
- property({ reflect: true, converter: reflectNonDefault('') })
330
- ], NLDDCodeEditor.prototype, "placeholder", void 0);
331
- __decorate([
332
- property({ type: Boolean, reflect: true })
333
- ], NLDDCodeEditor.prototype, "disabled", void 0);
334
- __decorate([
335
- property({ reflect: true, converter: reflectNonDefault('') })
336
- ], NLDDCodeEditor.prototype, "name", void 0);
337
- __decorate([
338
- property({ type: Boolean, reflect: true })
339
- ], NLDDCodeEditor.prototype, "readonly", void 0);
340
- __decorate([
341
- property({ type: Boolean, reflect: true })
342
- ], NLDDCodeEditor.prototype, "required", void 0);
343
112
  __decorate([
344
113
  property({ type: Boolean, reflect: true })
345
114
  ], NLDDCodeEditor.prototype, "wrap", void 0);
346
- __decorate([
347
- property({ type: Number })
348
- ], NLDDCodeEditor.prototype, "rows", void 0);
349
115
  __decorate([
350
116
  property({ reflect: true, converter: reflectNonDefault('auto') })
351
117
  ], NLDDCodeEditor.prototype, "resize", void 0);
@@ -358,15 +124,9 @@ __decorate([
358
124
  __decorate([
359
125
  property({ type: Boolean, reflect: true, attribute: 'line-numbers' })
360
126
  ], NLDDCodeEditor.prototype, "lineNumbers", void 0);
361
- __decorate([
362
- property({ type: String, attribute: 'accessible-label' })
363
- ], NLDDCodeEditor.prototype, "accessibleLabel", void 0);
364
127
  __decorate([
365
128
  query('.code-editor')
366
129
  ], NLDDCodeEditor.prototype, "_container", void 0);
367
- __decorate([
368
- property({ type: Boolean, reflect: true })
369
- ], NLDDCodeEditor.prototype, "invalid", void 0);
370
130
  NLDDCodeEditor = __decorate([
371
131
  customElement('nldd-code-editor')
372
132
  ], NLDDCodeEditor);
@@ -1 +1 @@
1
- {"version":3,"file":"code-editor.js","sourceRoot":"","sources":["../../../../src/components/inputs/code-editor/code-editor.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,OAAO,EAAE,UAAU,EAAuB,MAAM,KAAK,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,cAAc,EAAkB,MAAM,6CAA6C,CAAC;AAC7F,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EACN,UAAU,EACV,MAAM,EACN,aAAa,EACb,WAAW,IAAI,aAAa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AAG1C;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;4CAC9B;AAGb;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,CAAa,MAAM,CAAC,EAAE,CAAC;8CAClD;AAG5B;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,CAAuB,QAAQ,CAAC,EAAE,CAAC;kDAC9C;AAG5C;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,iBAAiB,CAAS,EAAE,CAAC,EAAE,CAAC;gDACxD;AAGd;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;mDAClD;AAGZ;IADP,KAAK,CAAC,cAAc,CAAC;kDACW;AApBrB,cAAc;IAD1B,aAAa,CAAC,kBAAkB,CAAC;GACrB,cAAc,CA8G1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"code-editor.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/code-editor/code-editor.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,gBAAgB,yBAgI5B,CAAC"}
1
+ {"version":3,"file":"code-editor.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/code-editor/code-editor.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,gBAAgB,yBAwI5B,CAAC"}
@@ -10,6 +10,7 @@ export const codeEditorStyles = css `
10
10
 
11
11
  :host {
12
12
  --_code-editor-caret-width: var(--primitives-border-width-regular);
13
+ --_code-editor-caret-color: var(--components-code-editor-caret-color);
13
14
  --_code-editor-corner-radius: 0;
14
15
  --_code-editor-background-color: transparent;
15
16
  --_code-editor-border-color: transparent;
@@ -77,6 +78,8 @@ export const codeEditorStyles = css `
77
78
  :host([disabled]) .code-editor {
78
79
  opacity: var(--primitives-opacity-disabled);
79
80
  pointer-events: none;
81
+ -webkit-user-select: none;
82
+ user-select: none;
80
83
  }
81
84
 
82
85
  /* Focus ring only on the input-field variant. The simple variant relies on a
@@ -107,10 +110,15 @@ export const codeEditorStyles = css `
107
110
  tab-size: 2;
108
111
  }
109
112
 
113
+ /* Read-only, like a native read-only field: select and copy, but no caret. */
114
+ :host([readonly]) .cm-cursorLayer {
115
+ visibility: hidden;
116
+ }
117
+
110
118
  /* Accent caret. The doubled class is purely for specificity — it outweighs
111
119
  CodeMirror's theme cursor color without depending on an attribute. */
112
120
  :host .cm-cursor.cm-cursor {
113
- border-left-color: var(--primitives-color-accent-600);
121
+ border-left-color: var(--_code-editor-caret-color);
114
122
  border-left-width: var(--_code-editor-caret-width);
115
123
  }
116
124
 
@@ -1 +1 @@
1
- {"version":3,"file":"code-editor.styles.js","sourceRoot":"","sources":["../../../../src/components/inputs/code-editor/code-editor.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAE7E,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;IA2B/B,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqGrB,CAAC"}
1
+ {"version":3,"file":"code-editor.styles.js","sourceRoot":"","sources":["../../../../src/components/inputs/code-editor/code-editor.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAE7E,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA4B/B,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4GrB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"date-picker.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/date-picker/date-picker.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,gBAAgB,yBAqW5B,CAAC"}
1
+ {"version":3,"file":"date-picker.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/date-picker/date-picker.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,gBAAgB,yBA6X5B,CAAC"}
@@ -31,12 +31,17 @@ export const datePickerStyles = css `
31
31
  --_date-picker-day-indicator-inset: var(--primitives-space-2);
32
32
  --_date-picker-day-indicator-size: calc(var(--_date-picker-day-size) - var(--_date-picker-day-indicator-inset) * 2);
33
33
  --_date-picker-day-indicator-corner-radius: var(--_date-picker-day-corner-radius);
34
- --_date-picker-day-is-in-range-background-color: light-dark(var(--primitives-color-accent-50), var(--primitives-color-accent-75));
34
+ --_date-picker-day-is-in-range-background-color: var(--components-date-picker-day-is-in-range-background-color);
35
+ --_date-picker-day-is-in-range-is-hovered-background-color: var(--components-date-picker-day-is-in-range-is-hovered-background-color);
35
36
  --_date-picker-day-is-in-range-content-color: var(--semantics-content-color);
36
37
  --_date-picker-day-is-today-border-color: light-dark(var(--primitives-color-neutral-250), var(--primitives-color-neutral-400));
38
+ --_date-picker-day-is-today-is-in-range-border-color: var(--components-date-picker-day-is-today-is-in-range-border-color);
39
+ --_date-picker-day-is-today-is-selected-border-color: var(--components-date-picker-day-is-today-is-selected-border-color);
37
40
  --_date-picker-day-is-hovered-background-color: light-dark(var(--primitives-color-neutral-100), var(--primitives-color-neutral-150));
38
41
  --_date-picker-day-is-selected-background-color: var(--semantics-controls-is-selected-indicator-color);
39
42
  --_date-picker-day-is-selected-content-color: var(--semantics-controls-is-selected-contrast-color);
43
+ --_date-picker-day-is-selected-is-hovered-background-color: var(--semantics-controls-is-selected-is-hovered-indicator-color);
44
+ --_date-picker-day-is-selected-is-hovered-content-color: var(--semantics-controls-is-selected-is-hovered-contrast-color);
40
45
  --_date-picker-day-is-outside-month-content-color: var(--semantics-content-secondary-color);
41
46
  --_date-picker-day-is-unavailable-content-color: var(--semantics-content-secondary-color);
42
47
 
@@ -257,6 +262,14 @@ export const datePickerStyles = css `
257
262
  border: var(--primitives-border-width-regular) solid var(--_date-picker-day-is-today-border-color);
258
263
  }
259
264
 
265
+ .date-picker__day.is-today.is-in-range .date-picker__day-indicator {
266
+ border-color: var(--_date-picker-day-is-today-is-in-range-border-color);
267
+ }
268
+
269
+ .date-picker__day.is-today.is-selected .date-picker__day-indicator {
270
+ border-color: var(--_date-picker-day-is-today-is-selected-border-color);
271
+ }
272
+
260
273
  /* Touch reports a hover after a tap and keeps it until you touch something
261
274
  else, so a day stays lit long after you picked it. Only pointers that can
262
275
  really hover. */
@@ -264,6 +277,10 @@ export const datePickerStyles = css `
264
277
  .date-picker__day:hover .date-picker__day-indicator {
265
278
  background-color: var(--_date-picker-day-is-hovered-background-color);
266
279
  }
280
+
281
+ .date-picker__day.is-in-range:hover .date-picker__day-indicator {
282
+ background-color: var(--_date-picker-day-is-in-range-is-hovered-background-color);
283
+ }
267
284
  }
268
285
 
269
286
  /* :focus, not :focus-visible. Arrow keys move focus programmatically, and the
@@ -298,13 +315,20 @@ export const datePickerStyles = css `
298
315
  color: var(--_date-picker-day-is-selected-content-color);
299
316
  }
300
317
 
301
- /* Repeated for :hover, which carries a pseudo-class and would otherwise
302
- outweigh the plain selected rule. */
303
- .date-picker__day.is-selected .date-picker__day-indicator,
304
- .date-picker__day.is-selected:hover .date-picker__day-indicator {
318
+ .date-picker__day.is-selected .date-picker__day-indicator {
305
319
  background-color: var(--_date-picker-day-is-selected-background-color);
306
320
  }
307
321
 
322
+ @media (hover: hover) {
323
+ .date-picker__day.is-selected:hover {
324
+ color: var(--_date-picker-day-is-selected-is-hovered-content-color);
325
+ }
326
+
327
+ .date-picker__day.is-selected:hover .date-picker__day-indicator {
328
+ background-color: var(--_date-picker-day-is-selected-is-hovered-background-color);
329
+ }
330
+ }
331
+
308
332
  .date-picker__day.is-unavailable {
309
333
  color: var(--_date-picker-day-is-unavailable-content-color);
310
334
  text-decoration: line-through;
@@ -1 +1 @@
1
- {"version":3,"file":"date-picker.styles.js","sourceRoot":"","sources":["../../../../src/components/inputs/date-picker/date-picker.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAE7E,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAwC/B,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6TrB,CAAC"}
1
+ {"version":3,"file":"date-picker.styles.js","sourceRoot":"","sources":["../../../../src/components/inputs/date-picker/date-picker.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAE7E,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;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