@elmethis/core 1.0.0-alpha.189 → 1.0.0-alpha.190

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 (154) hide show
  1. package/dist/components/badge/ElmTag.vue2.mjs +1 -1
  2. package/dist/components/code/ElmCodeBlock.stories.d.ts +2 -0
  3. package/dist/components/code/ElmCodeBlock.vue.d.ts +22 -1
  4. package/dist/components/code/ElmCodeBlock.vue.mjs +2 -2
  5. package/dist/components/code/ElmCodeBlock.vue2.mjs +13 -5
  6. package/dist/components/containments/ElmModal.vue.d.ts +1 -1
  7. package/dist/components/containments/ElmModal.vue.mjs +2 -2
  8. package/dist/components/containments/ElmSnackbar.vue2.mjs +1 -1
  9. package/dist/components/containments/ElmSnackbarContainer.vue.mjs +2 -2
  10. package/dist/components/containments/ElmToggle.vue.d.ts +9 -5
  11. package/dist/components/containments/ElmToggle.vue.mjs +2 -2
  12. package/dist/components/containments/ElmToggle.vue2.mjs +35 -3
  13. package/dist/components/containments/ElmToggle.vue3.mjs +10 -6
  14. package/dist/components/containments/ElmTooltip.vue.mjs +2 -2
  15. package/dist/components/containments/useSnackbarState.d.ts +1 -1
  16. package/dist/components/data/ElmStatusMessage.vue.d.ts +1 -1
  17. package/dist/components/data/ElmStatusMessage.vue.mjs +2 -2
  18. package/dist/components/data/ElmStatusMessage.vue2.mjs +1 -1
  19. package/dist/components/{headings/ElmHeading4.stories.d.ts → fallback/ElmUnsupportedBlock.stories.d.ts} +2 -2
  20. package/dist/components/fallback/ElmUnsupportedBlock.vue.d.ts +5 -0
  21. package/dist/components/fallback/ElmUnsupportedBlock.vue.mjs +10 -0
  22. package/dist/components/fallback/ElmUnsupportedBlock.vue2.mjs +46 -0
  23. package/dist/components/fallback/ElmUnsupportedBlock.vue3.mjs +29 -0
  24. package/dist/components/form/ElmButton.vue.mjs +2 -2
  25. package/dist/components/form/ElmCheckbox.vue2.mjs +1 -1
  26. package/dist/components/form/ElmTextField.vue2.mjs +1 -1
  27. package/dist/components/icon/ElmArrowIcon.vue.d.ts +1 -1
  28. package/dist/components/icon/ElmBookmarkIcon.vue2.mjs +1 -1
  29. package/dist/components/{inline → icon}/ElmInlineIcon.vue.d.ts +6 -0
  30. package/dist/components/icon/ElmInlineIcon.vue2.mjs +27 -0
  31. package/dist/components/icon/ElmInlineIcon.vue3.mjs +20 -0
  32. package/dist/components/icon/ElmLanguageIcon.vue.mjs +2 -2
  33. package/dist/components/icon/ElmLoginIcon.vue2.mjs +1 -1
  34. package/dist/components/media/ElmBlockImage.vue.mjs +2 -2
  35. package/dist/components/media/ElmBlockImage.vue2.mjs +14 -5
  36. package/dist/components/media/ElmBlockImage.vue3.mjs +10 -9
  37. package/dist/components/media/ElmFile.vue2.mjs +1 -1
  38. package/dist/components/media/ElmFile.vue3.mjs +6 -6
  39. package/dist/components/media/ElmImage.vue.mjs +2 -2
  40. package/dist/components/media/ElmImage.vue2.mjs +1 -1
  41. package/dist/components/navigation/ElmBookmark.vue.d.ts +1 -1
  42. package/dist/components/navigation/ElmBookmark.vue2.mjs +1 -1
  43. package/dist/components/navigation/ElmBreadcrumb.vue2.mjs +1 -1
  44. package/dist/components/navigation/ElmPagetop.vue.d.ts +1 -1
  45. package/dist/components/navigation/ElmTableOfContents.vue2.mjs +1 -1
  46. package/dist/components/others/ElmColorSample.vue.mjs +2 -2
  47. package/dist/components/others/ElmJsonComponentRenderer.stories.d.ts +23 -0
  48. package/dist/components/others/ElmJsonComponentRenderer.vue.d.ts +6 -0
  49. package/dist/components/others/ElmJsonComponentRenderer.vue.mjs +10 -0
  50. package/dist/components/others/ElmJsonComponentRenderer.vue2.mjs +217 -0
  51. package/dist/components/others/ElmJsonComponentRenderer.vue3.mjs +21 -0
  52. package/dist/components/table/ElmTable.vue.d.ts +21 -2
  53. package/dist/components/table/ElmTable.vue.mjs +5 -14
  54. package/dist/components/table/ElmTable.vue2.mjs +40 -5
  55. package/dist/components/table/ElmTable.vue3.mjs +27 -0
  56. package/dist/components/table/ElmTableBody.vue.d.ts +5 -2
  57. package/dist/components/table/ElmTableCell.vue.d.ts +5 -2
  58. package/dist/components/table/ElmTableCell.vue.mjs +2 -2
  59. package/dist/components/table/ElmTableHeader.vue.d.ts +5 -2
  60. package/dist/components/table/ElmTableHeader.vue3.mjs +1 -1
  61. package/dist/components/table/ElmTableRow.vue.d.ts +5 -2
  62. package/dist/components/table/ElmTableRow.vue.mjs +5 -2
  63. package/dist/components/typography/ElmBlockQuote.vue.d.ts +1 -0
  64. package/dist/components/typography/ElmBlockQuote.vue2.mjs +41 -4
  65. package/dist/components/typography/ElmBlockQuote.vue3.mjs +10 -4
  66. package/dist/components/typography/ElmCallout.vue.d.ts +1 -1
  67. package/dist/components/typography/ElmCallout.vue2.mjs +1 -1
  68. package/dist/components/{headings/ElmHeading1.stories.d.ts → typography/ElmHeading.stories.d.ts} +3 -2
  69. package/dist/components/typography/ElmHeading.vue.d.ts +49 -0
  70. package/dist/components/typography/ElmHeading.vue.mjs +10 -0
  71. package/dist/components/typography/ElmHeading.vue2.mjs +72 -0
  72. package/dist/components/typography/ElmHeading.vue3.mjs +39 -0
  73. package/dist/components/{inline → typography}/ElmInlineText.stories.d.ts +2 -0
  74. package/dist/components/{inline → typography}/ElmInlineText.vue.d.ts +12 -0
  75. package/dist/components/typography/ElmInlineText.vue2.mjs +95 -0
  76. package/dist/components/typography/ElmInlineText.vue3.mjs +29 -0
  77. package/dist/components/typography/ElmList.stories.d.ts +8 -0
  78. package/dist/components/typography/ElmList.vue.d.ts +31 -0
  79. package/dist/components/typography/ElmList.vue.mjs +36 -0
  80. package/dist/components/typography/ElmList.vue3.mjs +17 -0
  81. package/dist/hooks/useTyping.d.ts +1 -1
  82. package/dist/index.d.ts +12 -28
  83. package/dist/index.mjs +72 -89
  84. package/dist/node_modules/.pnpm/@mdi_js@7.4.47/node_modules/@mdi/js/mdi.mjs +14 -0
  85. package/package.json +8 -6
  86. package/dist/components/headings/ElmHeading1.vue.d.ts +0 -28
  87. package/dist/components/headings/ElmHeading1.vue.mjs +0 -10
  88. package/dist/components/headings/ElmHeading1.vue2.mjs +0 -43
  89. package/dist/components/headings/ElmHeading1.vue3.mjs +0 -20
  90. package/dist/components/headings/ElmHeading2.stories.d.ts +0 -6
  91. package/dist/components/headings/ElmHeading2.vue.d.ts +0 -28
  92. package/dist/components/headings/ElmHeading2.vue.mjs +0 -10
  93. package/dist/components/headings/ElmHeading2.vue2.mjs +0 -49
  94. package/dist/components/headings/ElmHeading2.vue3.mjs +0 -23
  95. package/dist/components/headings/ElmHeading3.stories.d.ts +0 -6
  96. package/dist/components/headings/ElmHeading3.vue.d.ts +0 -28
  97. package/dist/components/headings/ElmHeading3.vue.mjs +0 -10
  98. package/dist/components/headings/ElmHeading3.vue2.mjs +0 -39
  99. package/dist/components/headings/ElmHeading3.vue3.mjs +0 -20
  100. package/dist/components/headings/ElmHeading4.vue.d.ts +0 -26
  101. package/dist/components/headings/ElmHeading4.vue.mjs +0 -10
  102. package/dist/components/headings/ElmHeading4.vue2.mjs +0 -31
  103. package/dist/components/headings/ElmHeading4.vue3.mjs +0 -20
  104. package/dist/components/headings/ElmHeading5.stories.d.ts +0 -6
  105. package/dist/components/headings/ElmHeading5.vue.d.ts +0 -26
  106. package/dist/components/headings/ElmHeading5.vue.mjs +0 -10
  107. package/dist/components/headings/ElmHeading5.vue2.mjs +0 -31
  108. package/dist/components/headings/ElmHeading5.vue3.mjs +0 -20
  109. package/dist/components/headings/ElmHeading6.stories.d.ts +0 -6
  110. package/dist/components/headings/ElmHeading6.vue.d.ts +0 -26
  111. package/dist/components/headings/ElmHeading6.vue.mjs +0 -10
  112. package/dist/components/headings/ElmHeading6.vue2.mjs +0 -31
  113. package/dist/components/headings/ElmHeading6.vue3.mjs +0 -20
  114. package/dist/components/inline/ElmInlineIcon.vue2.mjs +0 -21
  115. package/dist/components/inline/ElmInlineIcon.vue3.mjs +0 -20
  116. package/dist/components/inline/ElmInlineLink.stories.d.ts +0 -9
  117. package/dist/components/inline/ElmInlineLink.vue.d.ts +0 -38
  118. package/dist/components/inline/ElmInlineLink.vue.mjs +0 -10
  119. package/dist/components/inline/ElmInlineLink.vue2.mjs +0 -55
  120. package/dist/components/inline/ElmInlineLink.vue3.mjs +0 -23
  121. package/dist/components/inline/ElmInlineRuby.stories.d.ts +0 -6
  122. package/dist/components/inline/ElmInlineRuby.vue.d.ts +0 -19
  123. package/dist/components/inline/ElmInlineRuby.vue.mjs +0 -29
  124. package/dist/components/inline/ElmInlineRuby.vue2.mjs +0 -4
  125. package/dist/components/inline/ElmInlineText.vue2.mjs +0 -57
  126. package/dist/components/inline/ElmInlineText.vue3.mjs +0 -23
  127. package/dist/components/renderer/ElmJsonRenderer.stories.d.ts +0 -20
  128. package/dist/components/renderer/ElmJsonRenderer.vue.d.ts +0 -200
  129. package/dist/components/renderer/ElmJsonRenderer.vue.mjs +0 -150
  130. package/dist/components/renderer/ElmJsonRenderer.vue2.mjs +0 -4
  131. package/dist/components/typography/ElmBulletedList.stories.d.ts +0 -7
  132. package/dist/components/typography/ElmBulletedList.vue.d.ts +0 -23
  133. package/dist/components/typography/ElmBulletedList.vue.mjs +0 -27
  134. package/dist/components/typography/ElmBulletedList.vue3.mjs +0 -17
  135. package/dist/components/typography/ElmListItem.stories.d.ts +0 -6
  136. package/dist/components/typography/ElmListItem.vue.d.ts +0 -19
  137. package/dist/components/typography/ElmListItem.vue.mjs +0 -10
  138. package/dist/components/typography/ElmListItem.vue2.mjs +0 -16
  139. package/dist/components/typography/ElmListItem.vue3.mjs +0 -20
  140. package/dist/components/typography/ElmNumberedList.stories.d.ts +0 -7
  141. package/dist/components/typography/ElmNumberedList.vue.d.ts +0 -23
  142. package/dist/components/typography/ElmNumberedList.vue.mjs +0 -27
  143. package/dist/components/typography/ElmNumberedList.vue3.mjs +0 -17
  144. /package/dist/components/{inline → icon}/ElmInlineIcon.stories.d.ts +0 -0
  145. /package/dist/components/{inline → icon}/ElmInlineIcon.vue.mjs +0 -0
  146. /package/dist/components/others/{ElmTemplate.stories.d.ts → ElmTyping.stories.d.ts} +0 -0
  147. /package/dist/components/{headings → typography}/ElmFragmentIdentifier.stories.d.ts +0 -0
  148. /package/dist/components/{headings → typography}/ElmFragmentIdentifier.vue.d.ts +0 -0
  149. /package/dist/components/{headings → typography}/ElmFragmentIdentifier.vue.mjs +0 -0
  150. /package/dist/components/{headings → typography}/ElmFragmentIdentifier.vue2.mjs +0 -0
  151. /package/dist/components/{headings → typography}/ElmFragmentIdentifier.vue3.mjs +0 -0
  152. /package/dist/components/{inline → typography}/ElmInlineText.vue.mjs +0 -0
  153. /package/dist/components/{inline → typography}/ElmTypingAnimation.stories.d.ts +0 -0
  154. /package/dist/components/{inline → typography}/ElmTypingAnimation.vue.d.ts +0 -0
@@ -1,19 +1,54 @@
1
- import { defineComponent, createElementBlock, openBlock, normalizeStyle, renderSlot } from "vue";
1
+ import { defineComponent, useSlots, createElementBlock, openBlock, normalizeStyle, normalizeClass, createCommentVNode, renderSlot, createElementVNode, createVNode, unref } from "vue";
2
+ import ElmInlineText from "../typography/ElmInlineText.vue.mjs";
3
+ import { mdiTable } from "../../node_modules/.pnpm/@mdi_js@7.4.47/node_modules/@mdi/js/mdi.mjs";
4
+ const _hoisted_1 = { key: 0 };
5
+ const _hoisted_2 = {
6
+ viewBox: "0 0 24 24",
7
+ width: "1rem",
8
+ height: "1rem"
9
+ };
10
+ const _hoisted_3 = ["d"];
2
11
  const _sfc_main = /* @__PURE__ */ defineComponent({
3
12
  __name: "ElmTable",
4
13
  props: {
5
- margin: {}
14
+ margin: {},
15
+ caption: {}
6
16
  },
7
17
  setup(__props) {
18
+ const slots = useSlots();
8
19
  return (_ctx, _cache) => {
9
20
  return openBlock(), createElementBlock("table", {
10
- class: "table",
21
+ class: normalizeClass(_ctx.$style.table),
11
22
  style: normalizeStyle({
12
23
  "--margin-block": _ctx.margin
13
24
  })
14
25
  }, [
15
- renderSlot(_ctx.$slots, "default", {}, void 0, true)
16
- ], 4);
26
+ _ctx.caption != null ? (openBlock(), createElementBlock("caption", _hoisted_1, [
27
+ createElementVNode("span", {
28
+ class: normalizeClass(_ctx.$style["caption"])
29
+ }, [
30
+ createElementVNode("span", {
31
+ class: normalizeClass(_ctx.$style.spacing)
32
+ }, null, 2),
33
+ createElementVNode("span", {
34
+ class: normalizeClass(_ctx.$style["caption-inner"])
35
+ }, [
36
+ (openBlock(), createElementBlock("svg", _hoisted_2, [
37
+ createElementVNode("path", {
38
+ d: unref(mdiTable),
39
+ fill: "#6987b8"
40
+ }, null, 8, _hoisted_3)
41
+ ])),
42
+ createVNode(ElmInlineText, { text: _ctx.caption }, null, 8, ["text"])
43
+ ], 2),
44
+ createElementVNode("span", {
45
+ class: normalizeClass(_ctx.$style.spacing)
46
+ }, null, 2)
47
+ ], 2)
48
+ ])) : createCommentVNode("", true),
49
+ slots.header != null ? renderSlot(_ctx.$slots, "header", { key: 1 }) : createCommentVNode("", true),
50
+ renderSlot(_ctx.$slots, "body")
51
+ ], 6);
17
52
  };
18
53
  }
19
54
  });
@@ -0,0 +1,27 @@
1
+ (function() {
2
+ "use strict";
3
+ try {
4
+ if (typeof document != "undefined") {
5
+ var elementStyle = document.createElement("style");
6
+ elementStyle.appendChild(document.createTextNode("._table_zpzea_1{margin-block:var(--margin-block);border-collapse:collapse;border-spacing:0;box-shadow:0 0 .125rem #0003;overflow:hidden;border-radius:.125rem;color:#000000b3}[data-theme=dark] ._table_zpzea_1{color:#ffffffb3}._caption_zpzea_14{position:relative;width:100%;display:inline-flex;justify-content:center;align-items:center;gap:1rem;margin-block-end:1rem}._caption-inner_zpzea_24{display:inline-flex;justify-content:center;align-items:center;gap:.25rem}._spacing_zpzea_31{flex-grow:1;height:1px;background-color:#80808033}"));
7
+ document.head.appendChild(elementStyle);
8
+ }
9
+ } catch (e) {
10
+ console.error("vite-plugin-css-injected-by-js", e);
11
+ }
12
+ })();
13
+ const table = "_table_zpzea_1";
14
+ const caption = "_caption_zpzea_14";
15
+ const spacing = "_spacing_zpzea_31";
16
+ const style0 = {
17
+ table,
18
+ caption,
19
+ "caption-inner": "_caption-inner_zpzea_24",
20
+ spacing
21
+ };
22
+ export {
23
+ caption,
24
+ style0 as default,
25
+ spacing,
26
+ table
27
+ };
@@ -1,9 +1,12 @@
1
+ import { default as ElmTableRow } from './ElmTableRow.vue';
1
2
  export interface ElmTableBodyProps {
2
3
  }
3
4
  declare function __VLS_template(): {
4
5
  attrs: Partial<{}>;
5
- slots: {
6
- default?(_: {}): any;
6
+ slots: Readonly<{
7
+ default: InstanceType<typeof ElmTableRow>[];
8
+ }> & {
9
+ default: InstanceType<typeof ElmTableRow>[];
7
10
  };
8
11
  refs: {};
9
12
  rootEl: HTMLTableSectionElement;
@@ -1,3 +1,4 @@
1
+ import { VNodeChild } from 'vue';
1
2
  export interface ElmTableCellProps {
2
3
  /**
3
4
  * Whether the cell is a header cell.
@@ -11,8 +12,10 @@ export interface ElmTableCellProps {
11
12
  }
12
13
  declare function __VLS_template(): {
13
14
  attrs: Partial<{}>;
14
- slots: {
15
- default?(_: {}): any;
15
+ slots: Readonly<{
16
+ default: VNodeChild;
17
+ }> & {
18
+ default: VNodeChild;
16
19
  };
17
20
  refs: {};
18
21
  rootEl: any;
@@ -3,7 +3,7 @@
3
3
  try {
4
4
  if (typeof document != "undefined") {
5
5
  var elementStyle = document.createElement("style");
6
- elementStyle.appendChild(document.createTextNode("td.cell[data-v-7bedd3ac]{padding:.75rem 1rem;border-bottom:solid 1px rgba(0,0,0,.15);border-right:dotted 1px rgba(0,0,0,.1)}[data-theme=dark] td.cell[data-v-7bedd3ac]{border-bottom-color:#ffffff26;border-right-color:#ffffff1a}th.cell[data-v-7bedd3ac]{padding:.75rem 1rem;border-right:dotted 1px rgba(255,255,255,.25)}[data-theme=dark] th.cell[data-v-7bedd3ac]{border-right:dotted 1px rgba(0,0,0,.25)}"));
6
+ elementStyle.appendChild(document.createTextNode("td.cell[data-v-43a0650e]{padding:.75rem 1rem;border-top:1px solid rgba(0,0,0,.15);border-right:1px dotted rgba(0,0,0,.1)}[data-theme=dark] td.cell[data-v-43a0650e]{border-top-color:#ffffff26;border-right-color:#ffffff1a}th.cell[data-v-43a0650e]{padding:.75rem 1rem;border-right:1px dotted rgba(0,0,0,.15)}[data-theme=dark] th.cell[data-v-43a0650e]{border-right:1px dotted rgba(255,255,255,.15)}"));
7
7
  document.head.appendChild(elementStyle);
8
8
  }
9
9
  } catch (e) {
@@ -13,7 +13,7 @@
13
13
  import _sfc_main from "./ElmTableCell.vue2.mjs";
14
14
 
15
15
  import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
16
- const ElmTableCell = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7bedd3ac"]]);
16
+ const ElmTableCell = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-43a0650e"]]);
17
17
  export {
18
18
  ElmTableCell as default
19
19
  };
@@ -1,9 +1,12 @@
1
+ import { default as ElmTableRow } from './ElmTableRow.vue';
1
2
  export interface ElmTableHeaderProps {
2
3
  }
3
4
  declare function __VLS_template(): {
4
5
  attrs: Partial<{}>;
5
- slots: {
6
- default?(_: {}): any;
6
+ slots: Readonly<{
7
+ default: InstanceType<typeof ElmTableRow>;
8
+ }> & {
9
+ default: InstanceType<typeof ElmTableRow>;
7
10
  };
8
11
  refs: {};
9
12
  rootEl: HTMLTableSectionElement;
@@ -3,7 +3,7 @@
3
3
  try {
4
4
  if (typeof document != "undefined") {
5
5
  var elementStyle = document.createElement("style");
6
- elementStyle.appendChild(document.createTextNode(".elmethis-table-header-thead{text-align:left;background-color:#000c;color:#fffc;transition:background-color .4s,color .4s}[data-theme=dark] .elmethis-table-header-thead{background-color:#fffc;color:#000c}.elmethis-table-header-thead tr td,.elmethis-table-header-thead tr th{color:#ffffffb3}[data-theme=dark] .elmethis-table-header-thead tr td,[data-theme=dark] .elmethis-table-header-thead tr th{color:#000000b3}.elmethis-table-header-thead tr td::-moz-selection,.elmethis-table-header-thead tr th::-moz-selection{color:#000000b3;background-color:#ffffffb3;background-color:var(--color, rgba(255, 255, 255, .7))}.elmethis-table-header-thead tr td::selection,.elmethis-table-header-thead tr th::selection{color:#000000b3;background-color:#ffffffb3;background-color:var(--color, rgba(255, 255, 255, .7))}[data-theme=dark] .elmethis-table-header-thead tr td::-moz-selection,[data-theme=dark] .elmethis-table-header-thead tr th::-moz-selection{color:#ffffffb3;background-color:#000000b3;background-color:var(--color, rgba(0, 0, 0, .7))}[data-theme=dark] .elmethis-table-header-thead tr td::selection,[data-theme=dark] .elmethis-table-header-thead tr th::selection{color:#ffffffb3;background-color:#000000b3;background-color:var(--color, rgba(0, 0, 0, .7))}"));
6
+ elementStyle.appendChild(document.createTextNode(".elmethis-table-header-thead{text-align:left;transition:background-color .4s,color .4s;border-bottom:2px solid rgba(128,128,128,.5)}.elmethis-table-header-thead tr td::-moz-selection,.elmethis-table-header-thead tr th::-moz-selection{color:#000000b3;background-color:#ffffffb3;background-color:var(--color, rgba(255, 255, 255, .7))}.elmethis-table-header-thead tr td::selection,.elmethis-table-header-thead tr th::selection{color:#000000b3;background-color:#ffffffb3;background-color:var(--color, rgba(255, 255, 255, .7))}[data-theme=dark] .elmethis-table-header-thead tr td::-moz-selection,[data-theme=dark] .elmethis-table-header-thead tr th::-moz-selection{color:#ffffffb3;background-color:#000000b3;background-color:var(--color, rgba(0, 0, 0, .7))}[data-theme=dark] .elmethis-table-header-thead tr td::selection,[data-theme=dark] .elmethis-table-header-thead tr th::selection{color:#ffffffb3;background-color:#000000b3;background-color:var(--color, rgba(0, 0, 0, .7))}"));
7
7
  document.head.appendChild(elementStyle);
8
8
  }
9
9
  } catch (e) {
@@ -1,9 +1,12 @@
1
+ import { default as ElmTableCell } from './ElmTableCell.vue';
1
2
  export interface ElmTableRowProps {
2
3
  }
3
4
  declare function __VLS_template(): {
4
5
  attrs: Partial<{}>;
5
- slots: {
6
- default?(_: {}): any;
6
+ slots: Readonly<{
7
+ default: InstanceType<typeof ElmTableCell>[];
8
+ }> & {
9
+ default: InstanceType<typeof ElmTableCell>[];
7
10
  };
8
11
  refs: {};
9
12
  rootEl: HTMLTableRowElement;
@@ -1,10 +1,13 @@
1
- import { defineComponent, createElementBlock, openBlock, renderSlot } from "vue";
1
+ import { defineComponent, useSlots, createElementBlock, openBlock, Fragment, renderList, createVNode, resolveDynamicComponent } from "vue";
2
2
  const _sfc_main = /* @__PURE__ */ defineComponent({
3
3
  __name: "ElmTableRow",
4
4
  setup(__props) {
5
+ const slots = useSlots();
5
6
  return (_ctx, _cache) => {
6
7
  return openBlock(), createElementBlock("tr", null, [
7
- renderSlot(_ctx.$slots, "default")
8
+ (openBlock(), createElementBlock(Fragment, null, renderList(slots, (cell) => {
9
+ return createVNode(resolveDynamicComponent(cell));
10
+ }), 64))
8
11
  ]);
9
12
  };
10
13
  }
@@ -1,4 +1,5 @@
1
1
  export interface ElmBlockQuoteProps {
2
+ cite?: string;
2
3
  }
3
4
  declare function __VLS_template(): {
4
5
  attrs: Partial<{}>;
@@ -1,7 +1,15 @@
1
- import { defineComponent, ref, createElementBlock, openBlock, normalizeStyle, normalizeClass, renderSlot } from "vue";
1
+ import { defineComponent, ref, createElementBlock, openBlock, normalizeStyle, normalizeClass, renderSlot, createCommentVNode, createElementVNode, toDisplayString, unref } from "vue";
2
2
  import { useIntersectionObserver } from "@vueuse/core";
3
+ import { mdiFormatQuoteOpen, mdiFormatQuoteClose } from "../../node_modules/.pnpm/@mdi_js@7.4.47/node_modules/@mdi/js/mdi.mjs";
4
+ const _hoisted_1 = ["cite"];
5
+ const _hoisted_2 = ["href"];
6
+ const _hoisted_3 = ["d"];
7
+ const _hoisted_4 = ["d"];
3
8
  const _sfc_main = /* @__PURE__ */ defineComponent({
4
9
  __name: "ElmBlockQuote",
10
+ props: {
11
+ cite: {}
12
+ },
5
13
  setup(__props) {
6
14
  const target = ref(null);
7
15
  const targetIsVisible = ref(false);
@@ -15,10 +23,39 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
15
23
  class: normalizeClass(_ctx.$style.blockquote),
16
24
  style: normalizeStyle({
17
25
  "--opacity": targetIsVisible.value ? 1 : 0
18
- })
26
+ }),
27
+ cite: _ctx.cite
19
28
  }, [
20
- renderSlot(_ctx.$slots, "default")
21
- ], 6);
29
+ renderSlot(_ctx.$slots, "default"),
30
+ _ctx.cite ? (openBlock(), createElementBlock("cite", {
31
+ key: 0,
32
+ class: normalizeClass(_ctx.$style.cite)
33
+ }, [
34
+ createElementVNode("a", {
35
+ href: _ctx.cite,
36
+ target: "_blank",
37
+ rel: "noopener noreferrer"
38
+ }, toDisplayString(_ctx.cite), 9, _hoisted_2)
39
+ ], 2)) : createCommentVNode("", true),
40
+ (openBlock(), createElementBlock("svg", {
41
+ class: normalizeClass(_ctx.$style.icon),
42
+ style: { "top": "0.25rem", "left": "0.25rem" },
43
+ viewBox: "0 0 24 24",
44
+ width: "1rem",
45
+ height: "1rem"
46
+ }, [
47
+ createElementVNode("path", { d: unref(mdiFormatQuoteOpen) }, null, 8, _hoisted_3)
48
+ ], 2)),
49
+ (openBlock(), createElementBlock("svg", {
50
+ class: normalizeClass(_ctx.$style.icon),
51
+ style: { "bottom": "0.25rem", "right": "0.25rem" },
52
+ viewBox: "0 0 24 24",
53
+ width: "1rem",
54
+ height: "1rem"
55
+ }, [
56
+ createElementVNode("path", { d: unref(mdiFormatQuoteClose) }, null, 8, _hoisted_4)
57
+ ], 2))
58
+ ], 14, _hoisted_1);
22
59
  };
23
60
  }
24
61
  });
@@ -3,18 +3,24 @@
3
3
  try {
4
4
  if (typeof document != "undefined") {
5
5
  var elementStyle = document.createElement("style");
6
- elementStyle.appendChild(document.createTextNode("._blockquote_1oj4b_1{margin-block:2rem;opacity:var(--opacity);transition:opacity .8s;box-sizing:border-box;margin:0;padding:.125rem 1.5rem;border-left:4px solid rgba(0,0,0,.2)}[data-theme=dark] ._blockquote_1oj4b_1{border-left-color:#fff3}"));
6
+ elementStyle.appendChild(document.createTextNode("._blockquote_jhmbg_1{position:relative;margin-block:2rem;opacity:var(--opacity);transition:opacity .8s;box-sizing:border-box;margin:0;padding:1.5rem .5rem 1.5rem 1.5rem;background-color:#868e9c0d;border-left:4px solid rgba(0,0,0,.2)}[data-theme=dark] ._blockquote_jhmbg_1{border-left-color:#fff3}._cite_jhmbg_16{position:absolute;font-size:.75rem;line-height:.75rem;bottom:.5rem;right:2rem}._cite_jhmbg_16 a{all:unset;color:#6987b8;padding:0 .25rem;border-radius:.125rem;cursor:pointer;transition:background-color .1s}._cite_jhmbg_16 a:hover{background-color:#6987b826}._icon_jhmbg_35{position:absolute;padding:0;margin:0;width:1rem;height:1rem;fill:#868e9c}"));
7
7
  document.head.appendChild(elementStyle);
8
8
  }
9
9
  } catch (e) {
10
10
  console.error("vite-plugin-css-injected-by-js", e);
11
11
  }
12
12
  })();
13
- const blockquote = "_blockquote_1oj4b_1";
13
+ const blockquote = "_blockquote_jhmbg_1";
14
+ const cite = "_cite_jhmbg_16";
15
+ const icon = "_icon_jhmbg_35";
14
16
  const style0 = {
15
- blockquote
17
+ blockquote,
18
+ cite,
19
+ icon
16
20
  };
17
21
  export {
18
22
  blockquote,
19
- style0 as default
23
+ cite,
24
+ style0 as default,
25
+ icon
20
26
  };
@@ -1,4 +1,4 @@
1
- export type AlertType = 'note' | 'tip' | 'important' | 'warning' | 'caution';
1
+ export type AlertType = "note" | "tip" | "important" | "warning" | "caution";
2
2
  export interface ElmCalloutProps {
3
3
  /**
4
4
  * Type of alert
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, ref, createElementBlock, openBlock, normalizeStyle, normalizeClass, unref, createElementVNode, createVNode, renderSlot } from "vue";
2
2
  import { Icon } from "@iconify/vue";
3
- import ElmInlineText from "../inline/ElmInlineText.vue.mjs";
3
+ import ElmInlineText from "./ElmInlineText.vue.mjs";
4
4
  import { rgba } from "polished";
5
5
  import { useIntersectionObserver } from "@vueuse/core";
6
6
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -1,6 +1,7 @@
1
1
  import { Meta, StoryObj } from '@storybook/vue3';
2
- import { default as ElmHeading1 } from './ElmHeading1.vue';
3
- declare const meta: Meta<typeof ElmHeading1>;
2
+ import { default as ElmHeading } from './ElmHeading.vue';
3
+ declare const meta: Meta<typeof ElmHeading>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof meta>;
6
6
  export declare const Primary: Story;
7
+ export declare const Slot: Story;
@@ -0,0 +1,49 @@
1
+ import { Property } from 'csstype';
2
+ import { VNode } from 'vue';
3
+ export interface ElmHeadingProps {
4
+ /**
5
+ * Text to display
6
+ */
7
+ text?: string;
8
+ /**
9
+ * Font size of the text. Default is `'1.5rem'`.
10
+ */
11
+ size?: Property.FontSize;
12
+ /**
13
+ * ID of the heading element.
14
+ * Default is kebab-cased `text`. (using lodash)
15
+ */
16
+ id?: string;
17
+ /**
18
+ * Whether to disable fragment identifier.
19
+ * Default is `false`.
20
+ */
21
+ disableFragmentIdentifier?: boolean;
22
+ level?: 1 | 2 | 3 | 4 | 5 | 6;
23
+ }
24
+ declare function __VLS_template(): {
25
+ attrs: Partial<{}>;
26
+ slots: Readonly<{
27
+ default?: () => VNode[];
28
+ }> & {
29
+ default?: () => VNode[];
30
+ };
31
+ refs: {
32
+ target: unknown;
33
+ };
34
+ rootEl: any;
35
+ };
36
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
37
+ declare const __VLS_component: import('vue').DefineComponent<ElmHeadingProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ElmHeadingProps> & Readonly<{}>, {
38
+ disableFragmentIdentifier: boolean;
39
+ level: 1 | 2 | 3 | 4 | 5 | 6;
40
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
41
+ target: unknown;
42
+ }, any>;
43
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
44
+ export default _default;
45
+ type __VLS_WithTemplateSlots<T, S> = T & {
46
+ new (): {
47
+ $slots: S;
48
+ };
49
+ };
@@ -0,0 +1,10 @@
1
+ import _sfc_main from "./ElmHeading.vue2.mjs";
2
+ import style0 from "./ElmHeading.vue3.mjs";
3
+ import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
4
+ const cssModules = {
5
+ "$style": style0
6
+ };
7
+ const ElmHeading = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules]]);
8
+ export {
9
+ ElmHeading as default
10
+ };
@@ -0,0 +1,72 @@
1
+ import { defineComponent, ref, useSlots, createElementBlock, openBlock, Fragment, createBlock, createCommentVNode, resolveDynamicComponent, normalizeStyle, unref, normalizeClass, withCtx, h } from "vue";
2
+ import { useIntersectionObserver } from "@vueuse/core";
3
+ import { kebabCase } from "lodash-es";
4
+ import ElmFragmentIdentifier from "./ElmFragmentIdentifier.vue.mjs";
5
+ const _sfc_main = /* @__PURE__ */ defineComponent({
6
+ __name: "ElmHeading",
7
+ props: {
8
+ text: {},
9
+ size: {},
10
+ id: {},
11
+ disableFragmentIdentifier: { type: Boolean, default: false },
12
+ level: { default: 1 }
13
+ },
14
+ setup(__props) {
15
+ const SIZE_MAP = Object.freeze({
16
+ 1: 1.5,
17
+ 2: 1.4,
18
+ 3: 1.3,
19
+ 4: 1.2,
20
+ 5: 1.15,
21
+ 6: 1.1
22
+ });
23
+ const props = __props;
24
+ const target = ref(null);
25
+ const targetIsVisible = ref(false);
26
+ useIntersectionObserver(target, ([{ isIntersecting }], _) => {
27
+ targetIsVisible.value = isIntersecting;
28
+ });
29
+ const slots = useSlots();
30
+ const renderSlots = () => {
31
+ if (props.text != null) {
32
+ return h("span", {}, props.text);
33
+ } else if (slots.default != null) {
34
+ return slots.default();
35
+ } else {
36
+ return h("span");
37
+ }
38
+ };
39
+ return (_ctx, _cache) => {
40
+ return openBlock(), createElementBlock(Fragment, null, [
41
+ (openBlock(), createBlock(resolveDynamicComponent(`h${_ctx.level}`), {
42
+ ref_key: "target",
43
+ ref: target,
44
+ class: normalizeClass([_ctx.$style[`h${_ctx.level}`], _ctx.$style["heading-common"]]),
45
+ id: _ctx.id ?? unref(kebabCase)(_ctx.text),
46
+ style: normalizeStyle({
47
+ "--font-size": _ctx.size ?? `${unref(SIZE_MAP)[_ctx.level]}rem`,
48
+ "--scale": targetIsVisible.value ? 1 : 0,
49
+ "--opacity": targetIsVisible.value ? 1 : 0
50
+ })
51
+ }, {
52
+ default: withCtx(() => [
53
+ (openBlock(), createBlock(resolveDynamicComponent(() => renderSlots()))),
54
+ _ctx.level === 2 ? (openBlock(), createElementBlock("span", {
55
+ key: 0,
56
+ class: normalizeClass(_ctx.$style["h2__underline"]),
57
+ "aria-hidden": ""
58
+ }, null, 2)) : createCommentVNode("", true)
59
+ ]),
60
+ _: 1
61
+ }, 8, ["class", "id", "style"])),
62
+ !_ctx.disableFragmentIdentifier ? (openBlock(), createBlock(ElmFragmentIdentifier, {
63
+ key: 0,
64
+ id: _ctx.id ?? unref(kebabCase)(_ctx.text)
65
+ }, null, 8, ["id"])) : createCommentVNode("", true)
66
+ ], 64);
67
+ };
68
+ }
69
+ });
70
+ export {
71
+ _sfc_main as default
72
+ };
@@ -0,0 +1,39 @@
1
+ (function() {
2
+ "use strict";
3
+ try {
4
+ if (typeof document != "undefined") {
5
+ var elementStyle = document.createElement("style");
6
+ elementStyle.appendChild(document.createTextNode('._heading-common_6xtyu_1{margin-block-start:1.5rem;position:relative;font-size:var(--font-size);line-height:var(--font-size);opacity:var(--opacity);transition:color .4s,opacity .8s;color:#000c}._heading-common_6xtyu_1::-moz-selection{color:#fffc;background-color:#000c}._heading-common_6xtyu_1::selection{color:#fffc;background-color:#000c}[data-theme=dark] ._heading-common_6xtyu_1{color:#fffc}[data-theme=dark] ._heading-common_6xtyu_1::-moz-selection{color:#000c;background-color:#fffc}[data-theme=dark] ._heading-common_6xtyu_1::selection{color:#000c;background-color:#fffc}._h1_6xtyu_22{margin-block-start:.5rem}._h1_6xtyu_22:after{position:absolute;content:"";bottom:-10px;left:0;width:100%;height:.25px;background-color:#00000080;transition:transform .8s;transform:scaleX(var(--scale))}[data-theme=dark] ._h1_6xtyu_22:after{background-color:#ffffff80}._h1_6xtyu_22:before{position:absolute;content:"";bottom:-12px;left:45%;width:10%;height:2px;background-color:#0009;transition:transform .8s;transform:scaleY(var(--scale));transform-origin:top}[data-theme=dark] ._h1_6xtyu_22:before{background-color:#fff9}._h2_6xtyu_55:after{position:absolute;content:"";right:2px;bottom:-4px;width:6px;height:8px;opacity:.8;transform:skew(-25deg);background-color:#000c}[data-theme=dark] ._h2_6xtyu_55:after{background-color:#fffc}._h2_6xtyu_55:before{position:absolute;content:"";right:10px;bottom:-4px;width:6px;height:8px;opacity:.8;transform:skew(-25deg);background-color:#000c}[data-theme=dark] ._h2_6xtyu_55:before{background-color:#fffc}._h2__underline_6xtyu_83{overflow:hidden;position:absolute;content:"";bottom:-6px;left:0;width:100%;height:.25px;background-color:#00000080;transition:transform .8s;transform:scaleX(var(--scale));transform-origin:left}[data-theme=dark] ._h2__underline_6xtyu_83{background-color:#ffffff80}._h3_6xtyu_100{box-sizing:border-box;padding-left:.75rem}._h3_6xtyu_100:after{position:absolute;content:"";width:3px;height:50%;top:25%;left:0;background-color:#000c}[data-theme=dark] ._h3_6xtyu_100:after{background-color:#fffc}._h4_6xtyu_117,._h5_6xtyu_121,._h6_6xtyu_125{position:relative}'));
7
+ document.head.appendChild(elementStyle);
8
+ }
9
+ } catch (e) {
10
+ console.error("vite-plugin-css-injected-by-js", e);
11
+ }
12
+ })();
13
+ const h1 = "_h1_6xtyu_22";
14
+ const h2 = "_h2_6xtyu_55";
15
+ const h2__underline = "_h2__underline_6xtyu_83";
16
+ const h3 = "_h3_6xtyu_100";
17
+ const h4 = "_h4_6xtyu_117";
18
+ const h5 = "_h5_6xtyu_121";
19
+ const h6 = "_h6_6xtyu_125";
20
+ const style0 = {
21
+ "heading-common": "_heading-common_6xtyu_1",
22
+ h1,
23
+ h2,
24
+ h2__underline,
25
+ h3,
26
+ h4,
27
+ h5,
28
+ h6
29
+ };
30
+ export {
31
+ style0 as default,
32
+ h1,
33
+ h2,
34
+ h2__underline,
35
+ h3,
36
+ h4,
37
+ h5,
38
+ h6
39
+ };
@@ -6,3 +6,5 @@ type Story = StoryObj<typeof meta>;
6
6
  export declare const Primary: Story;
7
7
  export declare const Colored: Story;
8
8
  export declare const Background: Story;
9
+ export declare const Ruby: Story;
10
+ export declare const Link: Story;
@@ -38,10 +38,22 @@ export interface ElmInlineTextProps {
38
38
  * Specifies the background color of the text.
39
39
  */
40
40
  backgroundColor?: Property.BackgroundColor;
41
+ /**
42
+ * The ruby text to display.
43
+ */
44
+ ruby?: string;
45
+ /**
46
+ * The URL to navigate to.
47
+ *
48
+ * e.g. `https://example.com`
49
+ */
50
+ href?: string;
51
+ favicon?: string;
41
52
  }
42
53
  declare const _default: import('vue').DefineComponent<ElmInlineTextProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ElmInlineTextProps> & Readonly<{}>, {
43
54
  code: boolean;
44
55
  bold: boolean;
56
+ size: Property.FontSize;
45
57
  italic: boolean;
46
58
  underline: boolean;
47
59
  strikethrough: boolean;
@@ -0,0 +1,95 @@
1
+ import { defineComponent, useCssModule, createElementBlock, createBlock, openBlock, normalizeStyle, normalizeClass, createCommentVNode, createTextVNode, createVNode, toDisplayString, unref, resolveDynamicComponent, h } from "vue";
2
+ import { Icon } from "@iconify/vue";
3
+ import { getLuminance } from "polished";
4
+ import ElmInlineIcon from "../icon/ElmInlineIcon.vue.mjs";
5
+ const _hoisted_1 = ["href"];
6
+ const _sfc_main = /* @__PURE__ */ defineComponent({
7
+ __name: "ElmInlineText",
8
+ props: {
9
+ text: {},
10
+ color: {},
11
+ size: { default: "1em" },
12
+ bold: { type: Boolean, default: false },
13
+ italic: { type: Boolean, default: false },
14
+ underline: { type: Boolean, default: false },
15
+ strikethrough: { type: Boolean, default: false },
16
+ code: { type: Boolean, default: false },
17
+ backgroundColor: {},
18
+ ruby: {},
19
+ href: {},
20
+ favicon: {}
21
+ },
22
+ setup(__props) {
23
+ const props = __props;
24
+ const style = useCssModule();
25
+ const render = () => {
26
+ const backgroundColor = props.backgroundColor != null ? getLuminance(props.backgroundColor) < 0.5 ? "rgba(255, 255, 255, 0.7)" : "rgba(0, 0, 0, 0.7)" : void 0;
27
+ let vnode = h(
28
+ "span",
29
+ {
30
+ class: style.text,
31
+ style: {
32
+ "--color": props.color ?? backgroundColor,
33
+ "--font-size": props.size,
34
+ "--background-color": props.backgroundColor
35
+ }
36
+ },
37
+ props.text
38
+ );
39
+ if (props.strikethrough) {
40
+ vnode = h("del", {}, vnode);
41
+ }
42
+ if (props.italic) {
43
+ vnode = h("em", {}, vnode);
44
+ }
45
+ if (props.underline) {
46
+ vnode = h("ins", {}, vnode);
47
+ }
48
+ if (props.bold) {
49
+ vnode = h("strong", {}, vnode);
50
+ }
51
+ if (props.code) {
52
+ vnode = h("code", { class: style.code }, vnode);
53
+ }
54
+ if (props.ruby) {
55
+ vnode = h(
56
+ "ruby",
57
+ {
58
+ class: style.text,
59
+ style: {
60
+ "--color": props.color ?? backgroundColor,
61
+ "--font-size": props.size,
62
+ "--background-color": props.backgroundColor
63
+ }
64
+ },
65
+ [h("span", {}, vnode), h("rt", {}, props.ruby)]
66
+ );
67
+ }
68
+ return vnode;
69
+ };
70
+ return (_ctx, _cache) => {
71
+ return _ctx.href ? (openBlock(), createElementBlock("a", {
72
+ key: 0,
73
+ class: normalizeClass(_ctx.$style.link),
74
+ href: _ctx.href,
75
+ style: normalizeStyle({ "--font-size": _ctx.size }),
76
+ target: "_blank",
77
+ rel: "noopener noreferrer"
78
+ }, [
79
+ _ctx.favicon ? (openBlock(), createBlock(ElmInlineIcon, {
80
+ key: 0,
81
+ src: _ctx.favicon,
82
+ alt: "favicon"
83
+ }, null, 8, ["src"])) : createCommentVNode("", true),
84
+ createTextVNode(" " + toDisplayString(_ctx.text ?? _ctx.href) + " ", 1),
85
+ createVNode(unref(Icon), {
86
+ icon: "mdi:external-link",
87
+ class: normalizeClass(_ctx.$style.icon)
88
+ }, null, 8, ["class"])
89
+ ], 14, _hoisted_1)) : (openBlock(), createBlock(resolveDynamicComponent(render()), { key: 1 }));
90
+ };
91
+ }
92
+ });
93
+ export {
94
+ _sfc_main as default
95
+ };