@dsn-starter-kit/components-web 1.0.2 → 3.0.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 (129) hide show
  1. package/dist/index.cjs +929 -0
  2. package/dist/index.cjs.map +1 -0
  3. package/dist/index.d.cts +258 -0
  4. package/dist/index.d.cts.map +1 -0
  5. package/dist/index.d.mts +258 -0
  6. package/dist/index.d.mts.map +1 -0
  7. package/dist/index.mjs +914 -0
  8. package/dist/index.mjs.map +1 -0
  9. package/package.json +21 -13
  10. package/dist/button/Button.d.ts +0 -50
  11. package/dist/button/Button.d.ts.map +0 -1
  12. package/dist/button/Button.js +0 -247
  13. package/dist/button/Button.js.map +0 -1
  14. package/dist/button/Button.test.d.ts +0 -2
  15. package/dist/button/Button.test.d.ts.map +0 -1
  16. package/dist/button/Button.test.js +0 -299
  17. package/dist/button/Button.test.js.map +0 -1
  18. package/dist/button/button-styles.generated.d.ts +0 -2
  19. package/dist/button/button-styles.generated.d.ts.map +0 -1
  20. package/dist/button/button-styles.generated.js +0 -4
  21. package/dist/button/button-styles.generated.js.map +0 -1
  22. package/dist/button/index.d.ts +0 -3
  23. package/dist/button/index.d.ts.map +0 -1
  24. package/dist/button/index.js +0 -2
  25. package/dist/button/index.js.map +0 -1
  26. package/dist/heading/Heading.d.ts +0 -30
  27. package/dist/heading/Heading.d.ts.map +0 -1
  28. package/dist/heading/Heading.js +0 -79
  29. package/dist/heading/Heading.js.map +0 -1
  30. package/dist/heading/Heading.test.d.ts +0 -2
  31. package/dist/heading/Heading.test.d.ts.map +0 -1
  32. package/dist/heading/Heading.test.js +0 -157
  33. package/dist/heading/Heading.test.js.map +0 -1
  34. package/dist/heading/heading-styles.generated.d.ts +0 -2
  35. package/dist/heading/heading-styles.generated.d.ts.map +0 -1
  36. package/dist/heading/heading-styles.generated.js +0 -4
  37. package/dist/heading/heading-styles.generated.js.map +0 -1
  38. package/dist/heading/index.d.ts +0 -3
  39. package/dist/heading/index.d.ts.map +0 -1
  40. package/dist/heading/index.js +0 -2
  41. package/dist/heading/index.js.map +0 -1
  42. package/dist/icon/Icon.d.ts +0 -31
  43. package/dist/icon/Icon.d.ts.map +0 -1
  44. package/dist/icon/Icon.js +0 -110
  45. package/dist/icon/Icon.js.map +0 -1
  46. package/dist/icon/Icon.test.d.ts +0 -2
  47. package/dist/icon/Icon.test.d.ts.map +0 -1
  48. package/dist/icon/Icon.test.js +0 -193
  49. package/dist/icon/Icon.test.js.map +0 -1
  50. package/dist/icon/icon-paths.generated.d.ts +0 -2
  51. package/dist/icon/icon-paths.generated.d.ts.map +0 -1
  52. package/dist/icon/icon-paths.generated.js +0 -56
  53. package/dist/icon/icon-paths.generated.js.map +0 -1
  54. package/dist/icon/icon-styles.generated.d.ts +0 -2
  55. package/dist/icon/icon-styles.generated.d.ts.map +0 -1
  56. package/dist/icon/icon-styles.generated.js +0 -4
  57. package/dist/icon/icon-styles.generated.js.map +0 -1
  58. package/dist/icon/index.d.ts +0 -3
  59. package/dist/icon/index.d.ts.map +0 -1
  60. package/dist/icon/index.js +0 -2
  61. package/dist/icon/index.js.map +0 -1
  62. package/dist/index.d.ts +0 -52
  63. package/dist/index.d.ts.map +0 -1
  64. package/dist/index.js +0 -71
  65. package/dist/index.js.map +0 -1
  66. package/dist/link/Link.d.ts +0 -52
  67. package/dist/link/Link.d.ts.map +0 -1
  68. package/dist/link/Link.js +0 -260
  69. package/dist/link/Link.js.map +0 -1
  70. package/dist/link/Link.test.d.ts +0 -2
  71. package/dist/link/Link.test.d.ts.map +0 -1
  72. package/dist/link/Link.test.js +0 -256
  73. package/dist/link/Link.test.js.map +0 -1
  74. package/dist/link/index.d.ts +0 -3
  75. package/dist/link/index.d.ts.map +0 -1
  76. package/dist/link/index.js +0 -2
  77. package/dist/link/index.js.map +0 -1
  78. package/dist/link/link-styles.generated.d.ts +0 -2
  79. package/dist/link/link-styles.generated.d.ts.map +0 -1
  80. package/dist/link/link-styles.generated.js +0 -4
  81. package/dist/link/link-styles.generated.js.map +0 -1
  82. package/dist/ordered-list/OrderedList.d.ts +0 -32
  83. package/dist/ordered-list/OrderedList.d.ts.map +0 -1
  84. package/dist/ordered-list/OrderedList.js +0 -72
  85. package/dist/ordered-list/OrderedList.js.map +0 -1
  86. package/dist/ordered-list/OrderedList.test.d.ts +0 -2
  87. package/dist/ordered-list/OrderedList.test.d.ts.map +0 -1
  88. package/dist/ordered-list/OrderedList.test.js +0 -82
  89. package/dist/ordered-list/OrderedList.test.js.map +0 -1
  90. package/dist/ordered-list/index.d.ts +0 -2
  91. package/dist/ordered-list/index.d.ts.map +0 -1
  92. package/dist/ordered-list/index.js +0 -2
  93. package/dist/ordered-list/index.js.map +0 -1
  94. package/dist/ordered-list/ordered-list-styles.generated.d.ts +0 -2
  95. package/dist/ordered-list/ordered-list-styles.generated.d.ts.map +0 -1
  96. package/dist/ordered-list/ordered-list-styles.generated.js +0 -4
  97. package/dist/ordered-list/ordered-list-styles.generated.js.map +0 -1
  98. package/dist/paragraph/Paragraph.d.ts +0 -26
  99. package/dist/paragraph/Paragraph.d.ts.map +0 -1
  100. package/dist/paragraph/Paragraph.js +0 -60
  101. package/dist/paragraph/Paragraph.js.map +0 -1
  102. package/dist/paragraph/Paragraph.test.d.ts +0 -2
  103. package/dist/paragraph/Paragraph.test.d.ts.map +0 -1
  104. package/dist/paragraph/Paragraph.test.js +0 -121
  105. package/dist/paragraph/Paragraph.test.js.map +0 -1
  106. package/dist/paragraph/index.d.ts +0 -3
  107. package/dist/paragraph/index.d.ts.map +0 -1
  108. package/dist/paragraph/index.js +0 -2
  109. package/dist/paragraph/index.js.map +0 -1
  110. package/dist/paragraph/paragraph-styles.generated.d.ts +0 -2
  111. package/dist/paragraph/paragraph-styles.generated.d.ts.map +0 -1
  112. package/dist/paragraph/paragraph-styles.generated.js +0 -4
  113. package/dist/paragraph/paragraph-styles.generated.js.map +0 -1
  114. package/dist/unordered-list/UnorderedList.d.ts +0 -22
  115. package/dist/unordered-list/UnorderedList.d.ts.map +0 -1
  116. package/dist/unordered-list/UnorderedList.js +0 -42
  117. package/dist/unordered-list/UnorderedList.js.map +0 -1
  118. package/dist/unordered-list/UnorderedList.test.d.ts +0 -2
  119. package/dist/unordered-list/UnorderedList.test.d.ts.map +0 -1
  120. package/dist/unordered-list/UnorderedList.test.js +0 -56
  121. package/dist/unordered-list/UnorderedList.test.js.map +0 -1
  122. package/dist/unordered-list/index.d.ts +0 -2
  123. package/dist/unordered-list/index.d.ts.map +0 -1
  124. package/dist/unordered-list/index.js +0 -2
  125. package/dist/unordered-list/index.js.map +0 -1
  126. package/dist/unordered-list/unordered-list-styles.generated.d.ts +0 -2
  127. package/dist/unordered-list/unordered-list-styles.generated.d.ts.map +0 -1
  128. package/dist/unordered-list/unordered-list-styles.generated.js +0 -4
  129. package/dist/unordered-list/unordered-list-styles.generated.js.map +0 -1
@@ -1,56 +0,0 @@
1
- // Auto-generated — do not edit manually.
2
- // Run: node scripts/build-css.js
3
- export const iconPaths = {
4
- 'alert-triangle': ["M0 0h24v24H0z", "M12 9v4", "M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0", "M12 16h.01"],
5
- 'archive': ["M0 0h24v24H0z", "M3 6a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2", "M5 8v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-10", "M10 12l4 0"],
6
- 'arrow-down': ["M0 0h24v24H0z", "M12 5l0 14", "M18 13l-6 6", "M6 13l6 6"],
7
- 'arrow-left': ["M5 12l14 0", "M5 12l6 6", "M5 12l6 -6"],
8
- 'arrow-narrow-down': ["M0 0h24v24H0z", "M12 5l0 14", "M16 15l-4 4", "M8 15l4 4"],
9
- 'arrow-narrow-up': ["M0 0h24v24H0z", "M12 5l0 14", "M16 9l-4 -4", "M8 9l4 -4"],
10
- 'arrow-right': ["M5 12l14 0", "M13 18l6 -6", "M13 6l6 6"],
11
- 'arrow-up': ["M0 0h24v24H0z", "M12 5l0 14", "M18 11l-6 -6", "M6 11l6 -6"],
12
- 'arrows-sort': ["M0 0h24v24H0z", "M3 9l4 -4l4 4m-4 -4v14", "M21 15l-4 4l-4 -4m4 4v-14"],
13
- 'bell': ["M0 0h24v24H0z", "M10 5a2 2 0 1 1 4 0a7 7 0 0 1 4 6v3a4 4 0 0 0 2 3h-16a4 4 0 0 0 2 -3v-3a7 7 0 0 1 4 -6", "M9 17v1a3 3 0 0 0 6 0v-1"],
14
- 'calendar-event': ["M0 0h24v24H0z", "M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12", "M16 3l0 4", "M8 3l0 4", "M4 11l16 0", "M8 15h2v2h-2l0 -2"],
15
- 'check': ["M5 12l5 5l10 -10"],
16
- 'chevron-down': ["M6 9l6 6l6 -6"],
17
- 'chevron-left': ["M15 6l-6 6l6 6"],
18
- 'chevron-right': ["M9 6l6 6l-6 6"],
19
- 'chevron-up': ["M6 15l6 -6l6 6"],
20
- 'circle-check': ["M0 0h24v24H0z", "M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0", "M9 12l2 2l4 -4"],
21
- 'clock': ["M0 0h24v24H0z", "M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0", "M12 7v5l3 3"],
22
- 'dots-vertical': ["M0 0h24v24H0z", "M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", "M11 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", "M11 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"],
23
- 'download': ["M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2", "M7 11l5 5l5 -5", "M12 4l0 12"],
24
- 'edit': ["M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1", "M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415z", "M16 5l3 3"],
25
- 'exclamation-circle': ["M0 0h24v24H0z", "M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0", "M12 9v4", "M12 16v.01"],
26
- 'external-link': ["M0 0h24v24H0z", "M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6", "M11 13l9 -9", "M15 4h5v5"],
27
- 'eye': ["M0 0h24v24H0z", "M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0", "M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6"],
28
- 'file-description': ["M0 0h24v24H0z", "M14 3v4a1 1 0 0 0 1 1h4", "M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2", "M9 17h6", "M9 13h6"],
29
- 'folder': ["M0 0h24v24H0z", "M5 4h4l3 3h7a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2"],
30
- 'heart-filled': ["M0 0h24v24H0z", "M6.979 3.074a6 6 0 0 1 4.988 1.425l.037 .033l.034 -.03a6 6 0 0 1 4.733 -1.44l.246 .036a6 6 0 0 1 3.364 10.008l-.18 .185l-.048 .041l-7.45 7.379a1 1 0 0 1 -1.313 .082l-.094 -.082l-7.493 -7.422a6 6 0 0 1 3.176 -10.215z"],
31
- 'heart': ["M0 0h24v24H0z", "M19.5 12.572l-7.5 7.428l-7.5 -7.428a5 5 0 1 1 7.5 -6.566a5 5 0 1 1 7.5 6.572"],
32
- 'home': ["M5 12l-2 0l9 -9l9 9l-2 0", "M5 12v7a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-7", "M9 21v-6a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v6"],
33
- 'info-circle': ["M0 0h24v24H0z", "M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0", "M12 9h.01", "M11 12h1v4h1"],
34
- 'loader': ["M0 0h24v24H0z", "M12 6l0 -3", "M16.25 7.75l2.15 -2.15", "M18 12l3 0", "M16.25 16.25l2.15 2.15", "M12 18l0 3", "M7.75 16.25l-2.15 2.15", "M6 12l-3 0", "M7.75 7.75l-2.15 -2.15"],
35
- 'mail': ["M0 0h24v24H0z", "M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10", "M3 7l9 6l9 -6"],
36
- 'menu': ["M4 6l16 0", "M4 12l16 0", "M4 18l16 0"],
37
- 'message-circle': ["M0 0h24v24H0z", "M3 20l1.3 -3.9c-2.324 -3.437 -1.426 -7.872 2.1 -10.374c3.526 -2.501 8.59 -2.296 11.845 .48c3.255 2.777 3.695 7.266 1.029 10.501c-2.666 3.235 -7.615 4.215 -11.574 2.293l-4.7 1"],
38
- 'minus': ["M5 12l14 0"],
39
- 'paperclip': ["M0 0h24v24H0z", "M15 7l-6.5 6.5a1.5 1.5 0 0 0 3 3l6.5 -6.5a3 3 0 0 0 -6 -6l-6.5 6.5a4.5 4.5 0 0 0 9 9l6.5 -6.5"],
40
- 'pencil': ["M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4", "M13.5 6.5l4 4"],
41
- 'photo': ["M0 0h24v24H0z", "M15 8h.01", "M3 6a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3v-12", "M3 16l5 -5c.928 -.893 2.072 -.893 3 0l5 5", "M14 14l1 -1c.928 -.893 2.072 -.893 3 0l3 3"],
42
- 'plus': ["M12 5l0 14", "M5 12l14 0"],
43
- 'printer': ["M0 0h24v24H0z", "M17 17h2a2 2 0 0 0 2 -2v-4a2 2 0 0 0 -2 -2h-14a2 2 0 0 0 -2 2v4a2 2 0 0 0 2 2h2", "M17 9v-4a2 2 0 0 0 -2 -2h-6a2 2 0 0 0 -2 2v4", "M7 15a2 2 0 0 1 2 -2h6a2 2 0 0 1 2 2v4a2 2 0 0 1 -2 2h-6a2 2 0 0 1 -2 -2l0 -4"],
44
- 'search': ["M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0", "M21 21l-6 -6"],
45
- 'selector': ["M0 0h24v24H0z", "M8 9l4 -4l4 4", "M16 15l-4 4l-4 -4"],
46
- 'settings': ["M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z", "M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0"],
47
- 'sort-ascending': ["M0 0h24v24H0z", "M4 6l7 0", "M4 12l7 0", "M4 18l9 0", "M15 9l3 -3l3 3", "M18 6l0 12"],
48
- 'sort-descending': ["M0 0h24v24H0z", "M4 6l9 0", "M4 12l7 0", "M4 18l7 0", "M15 15l3 3l3 -3", "M18 6l0 12"],
49
- 'star-filled': ["M0 0h24v24H0z", "M8.243 7.34l-6.38 .925l-.113 .023a1 1 0 0 0 -.44 1.684l4.622 4.499l-1.09 6.355l-.013 .11a1 1 0 0 0 1.464 .944l5.706 -3l5.693 3l.1 .046a1 1 0 0 0 1.352 -1.1l-1.091 -6.355l4.624 -4.5l.078 -.085a1 1 0 0 0 -.633 -1.62l-6.38 -.926l-2.852 -5.78a1 1 0 0 0 -1.794 0l-2.853 5.78z"],
50
- 'star': ["M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873z"],
51
- 'trash': ["M4 7l16 0", "M10 11l0 6", "M14 11l0 6", "M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12", "M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"],
52
- 'upload': ["M0 0h24v24H0z", "M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2", "M7 9l5 -5l5 5", "M12 4l0 12"],
53
- 'user': ["M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0", "M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"],
54
- 'x': ["M18 6l-12 12", "M6 6l12 12"],
55
- };
56
- //# sourceMappingURL=icon-paths.generated.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"icon-paths.generated.js","sourceRoot":"","sources":["../../src/icon/icon-paths.generated.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,iCAAiC;AACjC,MAAM,CAAC,MAAM,SAAS,GAA6B;IACjD,gBAAgB,EAAE,CAAC,eAAe,EAAC,SAAS,EAAC,0IAA0I,EAAC,YAAY,CAAC;IACrM,SAAS,EAAE,CAAC,eAAe,EAAC,yEAAyE,EAAC,6CAA6C,EAAC,YAAY,CAAC;IACjK,YAAY,EAAE,CAAC,eAAe,EAAC,YAAY,EAAC,aAAa,EAAC,WAAW,CAAC;IACtE,YAAY,EAAE,CAAC,YAAY,EAAC,WAAW,EAAC,YAAY,CAAC;IACrD,mBAAmB,EAAE,CAAC,eAAe,EAAC,YAAY,EAAC,aAAa,EAAC,WAAW,CAAC;IAC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EAAC,UAAU,EAAC,WAAW,EAAC,WAAW,EAAC,gBAAgB,EAAC,YAAY,CAAC;IACpG,iBAAiB,EAAE,CAAC,eAAe,EAAC,UAAU,EAAC,WAAW,EAAC,WAAW,EAAC,iBAAiB,EAAC,YAAY,CAAC;IACtG,aAAa,EAAE,CAAC,eAAe,EAAC,gRAAgR,CAAC;IACjT,MAAM,EAAE,CAAC,2GAA2G,CAAC;IACrH,OAAO,EAAE,CAAC,WAAW,EAAC,YAAY,EAAC,YAAY,EAAC,gDAAgD,EAAC,0CAA0C,CAAC;IAC5I,QAAQ,EAAE,CAAC,eAAe,EAAC,4CAA4C,EAAC,eAAe,EAAC,YAAY,CAAC;IACrG,MAAM,EAAE,CAAC,mCAAmC,EAAC,2CAA2C,CAAC;IACzF,GAAG,EAAE,CAAC,cAAc,EAAC,YAAY,CAAC;CACnC,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const iconStyles = "/**\n * Shadow DOM wrapper styles for the Icon Web Component.\n * The core icon styles are imported from the shared HTML/CSS source.\n */\n\n:host {\n display: inline-block;\n vertical-align: middle;\n line-height: 0;\n}\n\n/* Shared icon styles - single source of truth */\n/**\n * Icon Component Styles\n * Uses design tokens for sizing (coupled to typography)\n *\n * Usage:\n * <svg class=\"dsn-icon dsn-icon--lg\" ...>\n * <use href=\"...\" />\n * </svg>\n */\n\n.dsn-icon {\n /* Base styles */\n display: inline-block;\n vertical-align: middle;\n flex-shrink: 0;\n\n /* Default size (md) */\n width: var(--dsn-icon-size-md);\n height: var(--dsn-icon-size-md);\n}\n\n/* Size Variants - Using design tokens */\n.dsn-icon--sm {\n width: var(--dsn-icon-size-sm);\n height: var(--dsn-icon-size-sm);\n}\n\n.dsn-icon--lg {\n width: var(--dsn-icon-size-lg);\n height: var(--dsn-icon-size-lg);\n}\n\n.dsn-icon--xl {\n width: var(--dsn-icon-size-xl);\n height: var(--dsn-icon-size-xl);\n}\n\n.dsn-icon--2xl {\n width: var(--dsn-icon-size-2xl);\n height: var(--dsn-icon-size-2xl);\n}\n\n.dsn-icon--3xl {\n width: var(--dsn-icon-size-3xl);\n height: var(--dsn-icon-size-3xl);\n}\n\n.dsn-icon--4xl {\n width: var(--dsn-icon-size-4xl);\n height: var(--dsn-icon-size-4xl);\n}\n\n";
2
- //# sourceMappingURL=icon-styles.generated.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"icon-styles.generated.d.ts","sourceRoot":"","sources":["../../src/icon/icon-styles.generated.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,yxCAAyxC,CAAC"}
@@ -1,4 +0,0 @@
1
- // Auto-generated — do not edit manually.
2
- // Source: icon.shadow.css + components-html source
3
- export const iconStyles = "/**\n * Shadow DOM wrapper styles for the Icon Web Component.\n * The core icon styles are imported from the shared HTML/CSS source.\n */\n\n:host {\n display: inline-block;\n vertical-align: middle;\n line-height: 0;\n}\n\n/* Shared icon styles - single source of truth */\n/**\n * Icon Component Styles\n * Uses design tokens for sizing (coupled to typography)\n *\n * Usage:\n * <svg class=\"dsn-icon dsn-icon--lg\" ...>\n * <use href=\"...\" />\n * </svg>\n */\n\n.dsn-icon {\n /* Base styles */\n display: inline-block;\n vertical-align: middle;\n flex-shrink: 0;\n\n /* Default size (md) */\n width: var(--dsn-icon-size-md);\n height: var(--dsn-icon-size-md);\n}\n\n/* Size Variants - Using design tokens */\n.dsn-icon--sm {\n width: var(--dsn-icon-size-sm);\n height: var(--dsn-icon-size-sm);\n}\n\n.dsn-icon--lg {\n width: var(--dsn-icon-size-lg);\n height: var(--dsn-icon-size-lg);\n}\n\n.dsn-icon--xl {\n width: var(--dsn-icon-size-xl);\n height: var(--dsn-icon-size-xl);\n}\n\n.dsn-icon--2xl {\n width: var(--dsn-icon-size-2xl);\n height: var(--dsn-icon-size-2xl);\n}\n\n.dsn-icon--3xl {\n width: var(--dsn-icon-size-3xl);\n height: var(--dsn-icon-size-3xl);\n}\n\n.dsn-icon--4xl {\n width: var(--dsn-icon-size-4xl);\n height: var(--dsn-icon-size-4xl);\n}\n\n";
4
- //# sourceMappingURL=icon-styles.generated.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"icon-styles.generated.js","sourceRoot":"","sources":["../../src/icon/icon-styles.generated.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,mDAAmD;AACnD,MAAM,CAAC,MAAM,UAAU,GAAG,sxCAAsxC,CAAC"}
@@ -1,3 +0,0 @@
1
- export { DsnIcon, defineIcon } from './Icon';
2
- export type { IconSize, IconName } from './Icon';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/icon/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAC7C,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC"}
@@ -1,2 +0,0 @@
1
- export { DsnIcon, defineIcon } from './Icon';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/icon/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC"}
package/dist/index.d.ts DELETED
@@ -1,52 +0,0 @@
1
- /**
2
- * @dsn-starter-kit/components-web
3
- * Web Components for the design system
4
- *
5
- * This package exports Web Components that can be registered manually or all at once.
6
- * Components are NOT auto-registered on import - you must explicitly register them.
7
- *
8
- * @example Register all components at once
9
- * ```ts
10
- * import { defineAllComponents } from '@dsn-starter-kit/components-web';
11
- * defineAllComponents();
12
- * ```
13
- *
14
- * @example Register specific components
15
- * ```ts
16
- * import { defineButton, defineIcon } from '@dsn-starter-kit/components-web';
17
- * defineButton();
18
- * defineIcon();
19
- * ```
20
- *
21
- * @example Register with custom tag names
22
- * ```ts
23
- * import { defineButton } from '@dsn-starter-kit/components-web';
24
- * defineButton('my-custom-button');
25
- * ```
26
- */
27
- export { DsnButton, defineButton } from './button';
28
- export type { ButtonVariant, ButtonSize } from './button';
29
- export { DsnIcon, defineIcon } from './icon';
30
- export type { IconSize, IconName } from './icon';
31
- export { DsnParagraph, defineParagraph } from './paragraph';
32
- export type { ParagraphVariant } from './paragraph';
33
- export { DsnHeading, defineHeading } from './heading';
34
- export type { HeadingLevel, HeadingAppearance } from './heading';
35
- export { DsnLink, defineLink } from './link';
36
- export { DsnUnorderedList, defineUnorderedList } from './unordered-list';
37
- export { DsnOrderedList, defineOrderedList } from './ordered-list';
38
- /**
39
- * Register all components with their default tag names.
40
- * Call this once in your application entry point.
41
- *
42
- * Default tag names:
43
- * - dsn-button
44
- * - dsn-icon
45
- * - dsn-paragraph
46
- * - dsn-heading
47
- * - dsn-link
48
- * - dsn-unordered-list
49
- * - dsn-ordered-list
50
- */
51
- export declare function defineAllComponents(): void;
52
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAYH,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACnD,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAG1D,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAC7C,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAGjD,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC5D,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGpD,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AACtD,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAGjE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAG7C,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAGzE,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnE;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAQ1C"}
package/dist/index.js DELETED
@@ -1,71 +0,0 @@
1
- /**
2
- * @dsn-starter-kit/components-web
3
- * Web Components for the design system
4
- *
5
- * This package exports Web Components that can be registered manually or all at once.
6
- * Components are NOT auto-registered on import - you must explicitly register them.
7
- *
8
- * @example Register all components at once
9
- * ```ts
10
- * import { defineAllComponents } from '@dsn-starter-kit/components-web';
11
- * defineAllComponents();
12
- * ```
13
- *
14
- * @example Register specific components
15
- * ```ts
16
- * import { defineButton, defineIcon } from '@dsn-starter-kit/components-web';
17
- * defineButton();
18
- * defineIcon();
19
- * ```
20
- *
21
- * @example Register with custom tag names
22
- * ```ts
23
- * import { defineButton } from '@dsn-starter-kit/components-web';
24
- * defineButton('my-custom-button');
25
- * ```
26
- */
27
- // Internal imports for defineAllComponents
28
- import { defineButton as _defineButton } from './button';
29
- import { defineIcon as _defineIcon } from './icon';
30
- import { defineParagraph as _defineParagraph } from './paragraph';
31
- import { defineHeading as _defineHeading } from './heading';
32
- import { defineLink as _defineLink } from './link';
33
- import { defineUnorderedList as _defineUnorderedList } from './unordered-list';
34
- import { defineOrderedList as _defineOrderedList } from './ordered-list';
35
- // Button
36
- export { DsnButton, defineButton } from './button';
37
- // Icon
38
- export { DsnIcon, defineIcon } from './icon';
39
- // Paragraph
40
- export { DsnParagraph, defineParagraph } from './paragraph';
41
- // Heading
42
- export { DsnHeading, defineHeading } from './heading';
43
- // Link
44
- export { DsnLink, defineLink } from './link';
45
- // Unordered List
46
- export { DsnUnorderedList, defineUnorderedList } from './unordered-list';
47
- // Ordered List
48
- export { DsnOrderedList, defineOrderedList } from './ordered-list';
49
- /**
50
- * Register all components with their default tag names.
51
- * Call this once in your application entry point.
52
- *
53
- * Default tag names:
54
- * - dsn-button
55
- * - dsn-icon
56
- * - dsn-paragraph
57
- * - dsn-heading
58
- * - dsn-link
59
- * - dsn-unordered-list
60
- * - dsn-ordered-list
61
- */
62
- export function defineAllComponents() {
63
- _defineButton();
64
- _defineIcon();
65
- _defineParagraph();
66
- _defineHeading();
67
- _defineLink();
68
- _defineUnorderedList();
69
- _defineOrderedList();
70
- }
71
- //# sourceMappingURL=index.js.map
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,2CAA2C;AAC3C,OAAO,EAAE,YAAY,IAAI,aAAa,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,EAAE,UAAU,IAAI,WAAW,EAAE,MAAM,QAAQ,CAAC;AACnD,OAAO,EAAE,eAAe,IAAI,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,aAAa,IAAI,cAAc,EAAE,MAAM,WAAW,CAAC;AAC5D,OAAO,EAAE,UAAU,IAAI,WAAW,EAAE,MAAM,QAAQ,CAAC;AACnD,OAAO,EAAE,mBAAmB,IAAI,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC/E,OAAO,EAAE,iBAAiB,IAAI,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEzE,SAAS;AACT,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAGnD,OAAO;AACP,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAG7C,YAAY;AACZ,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAG5D,UAAU;AACV,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAGtD,OAAO;AACP,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAE7C,iBAAiB;AACjB,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEzE,eAAe;AACf,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnE;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,mBAAmB;IACjC,aAAa,EAAE,CAAC;IAChB,WAAW,EAAE,CAAC;IACd,gBAAgB,EAAE,CAAC;IACnB,cAAc,EAAE,CAAC;IACjB,WAAW,EAAE,CAAC;IACd,oBAAoB,EAAE,CAAC;IACvB,kBAAkB,EAAE,CAAC;AACvB,CAAC"}
@@ -1,52 +0,0 @@
1
- /**
2
- * DSN Link Web Component
3
- *
4
- * A custom element that provides a styled anchor link with icon support.
5
- * Uses the same CSS classes and design tokens as the HTML and React link components.
6
- *
7
- * @example
8
- * ```html
9
- * <dsn-link href="/about">About us</dsn-link>
10
- * <dsn-link href="https://example.com" external>External (opens in new tab)</dsn-link>
11
- * <dsn-link href="/dashboard" current>Dashboard</dsn-link>
12
- * <dsn-link disabled>Unavailable</dsn-link>
13
- * <dsn-link size="small" href="/small">Small link</dsn-link>
14
- * <dsn-link size="large" href="/large">Large link</dsn-link>
15
- * ```
16
- */
17
- export type LinkSize = 'small' | 'default' | 'large';
18
- export declare class DsnLink extends HTMLElement {
19
- static get observedAttributes(): string[];
20
- private _anchor;
21
- private _hintNode;
22
- private _hrefBackup;
23
- constructor();
24
- connectedCallback(): void;
25
- attributeChangedCallback(name: string): void;
26
- private _updateClasses;
27
- private _updateHref;
28
- private _updateTarget;
29
- private _updateRel;
30
- private _updateDisabled;
31
- private _updateCurrent;
32
- private _updateExternal;
33
- get href(): string | null;
34
- set href(value: string | null);
35
- get target(): string | null;
36
- set target(value: string | null);
37
- get rel(): string | null;
38
- set rel(value: string | null);
39
- get disabled(): boolean;
40
- set disabled(value: boolean);
41
- get current(): boolean;
42
- set current(value: boolean);
43
- get external(): boolean;
44
- set external(value: boolean);
45
- get size(): LinkSize;
46
- set size(value: LinkSize);
47
- focus(options?: FocusOptions): void;
48
- blur(): void;
49
- click(): void;
50
- }
51
- export declare function defineLink(tagName?: string): void;
52
- //# sourceMappingURL=Link.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../src/link/Link.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;AAKrD,qBAAa,OAAQ,SAAQ,WAAW;IACtC,MAAM,KAAK,kBAAkB,IAAI,MAAM,EAAE,CAExC;IAED,OAAO,CAAC,OAAO,CAAoB;IACnC,OAAO,CAAC,SAAS,CAAqB;IACtC,OAAO,CAAC,WAAW,CAAuB;;IAoB1C,iBAAiB,IAAI,IAAI;IAUzB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IA0B5C,OAAO,CAAC,cAAc;IAatB,OAAO,CAAC,WAAW;IAUnB,OAAO,CAAC,aAAa;IASrB,OAAO,CAAC,UAAU;IASlB,OAAO,CAAC,eAAe;IAmBvB,OAAO,CAAC,cAAc;IAQtB,OAAO,CAAC,eAAe;IAyBvB,IAAI,IAAI,IAAI,MAAM,GAAG,IAAI,CAExB;IAED,IAAI,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAM5B;IAGD,IAAI,MAAM,IAAI,MAAM,GAAG,IAAI,CAE1B;IAED,IAAI,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAM9B;IAGD,IAAI,GAAG,IAAI,MAAM,GAAG,IAAI,CAEvB;IAED,IAAI,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAM3B;IAGD,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED,IAAI,QAAQ,CAAC,KAAK,EAAE,OAAO,EAM1B;IAGD,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,IAAI,OAAO,CAAC,KAAK,EAAE,OAAO,EAMzB;IAGD,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED,IAAI,QAAQ,CAAC,KAAK,EAAE,OAAO,EAM1B;IAGD,IAAI,IAAI,IAAI,QAAQ,CAEnB;IAED,IAAI,IAAI,CAAC,KAAK,EAAE,QAAQ,EAEvB;IAGD,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,IAAI;IAInC,IAAI,IAAI,IAAI;IAIZ,KAAK,IAAI,IAAI;CAGd;AAGD,wBAAgB,UAAU,CAAC,OAAO,SAAa,GAAG,IAAI,CAIrD"}
package/dist/link/Link.js DELETED
@@ -1,260 +0,0 @@
1
- /**
2
- * DSN Link Web Component
3
- *
4
- * A custom element that provides a styled anchor link with icon support.
5
- * Uses the same CSS classes and design tokens as the HTML and React link components.
6
- *
7
- * @example
8
- * ```html
9
- * <dsn-link href="/about">About us</dsn-link>
10
- * <dsn-link href="https://example.com" external>External (opens in new tab)</dsn-link>
11
- * <dsn-link href="/dashboard" current>Dashboard</dsn-link>
12
- * <dsn-link disabled>Unavailable</dsn-link>
13
- * <dsn-link size="small" href="/small">Small link</dsn-link>
14
- * <dsn-link size="large" href="/large">Large link</dsn-link>
15
- * ```
16
- */
17
- // Auto-generated CSS from shared source — run `node scripts/build-css.js` to regenerate
18
- import { linkStyles } from './link-styles.generated';
19
- export class DsnLink extends HTMLElement {
20
- static get observedAttributes() {
21
- return ['href', 'target', 'rel', 'disabled', 'current', 'size', 'external'];
22
- }
23
- constructor() {
24
- super();
25
- this._hintNode = null;
26
- this._hrefBackup = null;
27
- this.attachShadow({ mode: 'open' });
28
- // Create the internal anchor element
29
- this._anchor = document.createElement('a');
30
- this._anchor.classList.add('dsn-link');
31
- this._anchor.innerHTML =
32
- '<slot name="icon-start"></slot><slot></slot><slot name="icon-end"></slot>';
33
- // Create style element with embedded CSS
34
- const style = document.createElement('style');
35
- style.textContent = linkStyles;
36
- this.shadowRoot.appendChild(style);
37
- this.shadowRoot.appendChild(this._anchor);
38
- }
39
- connectedCallback() {
40
- this._updateClasses();
41
- this._updateHref();
42
- this._updateTarget();
43
- this._updateRel();
44
- this._updateDisabled();
45
- this._updateCurrent();
46
- this._updateExternal();
47
- }
48
- attributeChangedCallback(name) {
49
- switch (name) {
50
- case 'href':
51
- this._updateHref();
52
- break;
53
- case 'target':
54
- this._updateTarget();
55
- break;
56
- case 'rel':
57
- this._updateRel();
58
- break;
59
- case 'disabled':
60
- this._updateDisabled();
61
- break;
62
- case 'current':
63
- this._updateCurrent();
64
- break;
65
- case 'size':
66
- this._updateClasses();
67
- break;
68
- case 'external':
69
- this._updateExternal();
70
- break;
71
- }
72
- }
73
- _updateClasses() {
74
- const classes = ['dsn-link'];
75
- // Only add size class when explicitly set via attribute.
76
- // Without a size attribute, the link inherits font from its parent,
77
- // which is the expected behavior for inline usage in paragraphs.
78
- if (this.hasAttribute('size')) {
79
- classes.push(`dsn-link--size-${this.size}`);
80
- }
81
- this._anchor.className = classes.join(' ');
82
- }
83
- _updateHref() {
84
- if (this.disabled)
85
- return;
86
- const href = this.getAttribute('href');
87
- if (href) {
88
- this._anchor.setAttribute('href', href);
89
- }
90
- else {
91
- this._anchor.removeAttribute('href');
92
- }
93
- }
94
- _updateTarget() {
95
- const target = this.getAttribute('target');
96
- if (target) {
97
- this._anchor.setAttribute('target', target);
98
- }
99
- else {
100
- this._anchor.removeAttribute('target');
101
- }
102
- }
103
- _updateRel() {
104
- const rel = this.getAttribute('rel');
105
- if (rel) {
106
- this._anchor.setAttribute('rel', rel);
107
- }
108
- else {
109
- this._anchor.removeAttribute('rel');
110
- }
111
- }
112
- _updateDisabled() {
113
- if (this.disabled) {
114
- this._hrefBackup = this._anchor.getAttribute('href');
115
- this._anchor.removeAttribute('href');
116
- this._anchor.setAttribute('aria-disabled', 'true');
117
- this._anchor.setAttribute('tabindex', '-1');
118
- }
119
- else {
120
- this._anchor.removeAttribute('aria-disabled');
121
- this._anchor.removeAttribute('tabindex');
122
- // Restore href
123
- if (this._hrefBackup) {
124
- this._anchor.setAttribute('href', this._hrefBackup);
125
- this._hrefBackup = null;
126
- }
127
- else {
128
- this._updateHref();
129
- }
130
- }
131
- }
132
- _updateCurrent() {
133
- if (this.current) {
134
- this._anchor.setAttribute('aria-current', 'page');
135
- }
136
- else {
137
- this._anchor.removeAttribute('aria-current');
138
- }
139
- }
140
- _updateExternal() {
141
- if (this.external) {
142
- // Set target and rel if not explicitly provided
143
- if (!this.getAttribute('target')) {
144
- this._anchor.setAttribute('target', '_blank');
145
- }
146
- if (!this.getAttribute('rel')) {
147
- this._anchor.setAttribute('rel', 'noopener noreferrer');
148
- }
149
- // Add visible hint text
150
- if (!this._hintNode) {
151
- this._hintNode = document.createTextNode(' (opens in new tab)');
152
- }
153
- this._anchor.appendChild(this._hintNode);
154
- }
155
- else {
156
- if (this._hintNode && this._hintNode.parentNode) {
157
- this._hintNode.remove();
158
- }
159
- // Restore target/rel to attribute values
160
- this._updateTarget();
161
- this._updateRel();
162
- }
163
- }
164
- // Property: href
165
- get href() {
166
- return this.getAttribute('href');
167
- }
168
- set href(value) {
169
- if (value) {
170
- this.setAttribute('href', value);
171
- }
172
- else {
173
- this.removeAttribute('href');
174
- }
175
- }
176
- // Property: target
177
- get target() {
178
- return this.getAttribute('target');
179
- }
180
- set target(value) {
181
- if (value) {
182
- this.setAttribute('target', value);
183
- }
184
- else {
185
- this.removeAttribute('target');
186
- }
187
- }
188
- // Property: rel
189
- get rel() {
190
- return this.getAttribute('rel');
191
- }
192
- set rel(value) {
193
- if (value) {
194
- this.setAttribute('rel', value);
195
- }
196
- else {
197
- this.removeAttribute('rel');
198
- }
199
- }
200
- // Property: disabled
201
- get disabled() {
202
- return this.hasAttribute('disabled');
203
- }
204
- set disabled(value) {
205
- if (value) {
206
- this.setAttribute('disabled', '');
207
- }
208
- else {
209
- this.removeAttribute('disabled');
210
- }
211
- }
212
- // Property: current
213
- get current() {
214
- return this.hasAttribute('current');
215
- }
216
- set current(value) {
217
- if (value) {
218
- this.setAttribute('current', '');
219
- }
220
- else {
221
- this.removeAttribute('current');
222
- }
223
- }
224
- // Property: external
225
- get external() {
226
- return this.hasAttribute('external');
227
- }
228
- set external(value) {
229
- if (value) {
230
- this.setAttribute('external', '');
231
- }
232
- else {
233
- this.removeAttribute('external');
234
- }
235
- }
236
- // Property: size
237
- get size() {
238
- return this.getAttribute('size') || 'default';
239
- }
240
- set size(value) {
241
- this.setAttribute('size', value);
242
- }
243
- // Focus delegation
244
- focus(options) {
245
- this._anchor.focus(options);
246
- }
247
- blur() {
248
- this._anchor.blur();
249
- }
250
- click() {
251
- this._anchor.click();
252
- }
253
- }
254
- // Register the custom element
255
- export function defineLink(tagName = 'dsn-link') {
256
- if (!customElements.get(tagName)) {
257
- customElements.define(tagName, DsnLink);
258
- }
259
- }
260
- //# sourceMappingURL=Link.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Link.js","sourceRoot":"","sources":["../../src/link/Link.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,wFAAwF;AACxF,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC,MAAM,KAAK,kBAAkB;QAC3B,OAAO,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;IAC9E,CAAC;IAMD;QACE,KAAK,EAAE,CAAC;QAJF,cAAS,GAAgB,IAAI,CAAC;QAC9B,gBAAW,GAAkB,IAAI,CAAC;QAIxC,IAAI,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;QAEpC,qCAAqC;QACrC,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;QAC3C,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,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C;IACH,CAAC;IAED,iBAAiB;IACjB,IAAI,IAAI;QACN,OAAQ,IAAI,CAAC,YAAY,CAAC,MAAM,CAAc,IAAI,SAAS,CAAC;IAC9D,CAAC;IAED,IAAI,IAAI,CAAC,KAAe;QACtB,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACnC,CAAC;IAED,mBAAmB;IACnB,KAAK,CAAC,OAAsB;QAC1B,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC9B,CAAC;IAED,IAAI;QACF,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;IACtB,CAAC;IAED,KAAK;QACH,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;IACvB,CAAC;CACF;AAED,8BAA8B;AAC9B,MAAM,UAAU,UAAU,CAAC,OAAO,GAAG,UAAU;IAC7C,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;QACjC,cAAc,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC1C,CAAC;AACH,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=Link.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Link.test.d.ts","sourceRoot":"","sources":["../../src/link/Link.test.ts"],"names":[],"mappings":""}