@elmethis/qwik 0.0.6 → 0.0.8

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 (202) hide show
  1. package/lib/index.qwik.cjs +1678 -0
  2. package/lib/index.qwik.mjs +1678 -0
  3. package/lib/shikiInstance-BxkUyfqr.cjs +79 -0
  4. package/{src/components/code/shikiInstance.ts → lib/shikiInstance-igs7t2fe.js} +11 -8
  5. package/lib-types/components/code/elm-code-block.d.ts +21 -0
  6. package/lib-types/components/code/elm-code-block.stories.d.ts +9 -0
  7. package/lib-types/components/code/elm-katex.d.ts +15 -0
  8. package/lib-types/components/code/elm-katex.stories.d.ts +8 -0
  9. package/lib-types/components/code/elm-shiki-highlighter.d.ts +11 -0
  10. package/lib-types/components/code/elm-shiki-highlighter.stories.d.ts +6 -0
  11. package/lib-types/components/code/shikiInstance.d.ts +2 -0
  12. package/lib-types/components/containments/elm-toggle.d.ts +7 -0
  13. package/lib-types/components/containments/elm-toggle.stories.d.ts +6 -0
  14. package/lib-types/components/fallback/elm-block-fallback.d.ts +5 -0
  15. package/lib-types/components/fallback/elm-block-fallback.stories.d.ts +6 -0
  16. package/lib-types/components/fallback/elm-rectangle-wave.d.ts +4 -0
  17. package/lib-types/components/fallback/elm-rectangle-wave.stories.d.ts +6 -0
  18. package/lib-types/components/icon/elm-dot-loading-icon.d.ts +14 -0
  19. package/lib-types/components/icon/elm-dot-loading-icon.stories.d.ts +6 -0
  20. package/lib-types/components/icon/elm-inline-icon.d.ts +11 -0
  21. package/lib-types/components/icon/elm-inline-icon.stories.d.ts +6 -0
  22. package/lib-types/components/icon/elm-language-icon.d.ts +14 -0
  23. package/lib-types/components/icon/elm-language-icon.stories.d.ts +6 -0
  24. package/lib-types/components/icon/elm-mdi-icon.d.ts +8 -0
  25. package/lib-types/components/icon/elm-mdi-icon.stories.d.ts +6 -0
  26. package/lib-types/components/icon/languages/bash.d.ts +2 -0
  27. package/lib-types/components/icon/languages/c-plus-plus.d.ts +2 -0
  28. package/lib-types/components/icon/languages/c-sharp.d.ts +2 -0
  29. package/lib-types/components/icon/languages/c.d.ts +2 -0
  30. package/lib-types/components/icon/languages/css.d.ts +2 -0
  31. package/lib-types/components/icon/languages/go.d.ts +2 -0
  32. package/lib-types/components/icon/languages/html.d.ts +2 -0
  33. package/lib-types/components/icon/languages/java.d.ts +2 -0
  34. package/lib-types/components/icon/languages/javascript.d.ts +2 -0
  35. package/lib-types/components/icon/languages/json.d.ts +2 -0
  36. package/lib-types/components/icon/languages/kotlin.d.ts +2 -0
  37. package/lib-types/components/icon/languages/language-interface.d.ts +4 -0
  38. package/lib-types/components/icon/languages/lua.d.ts +2 -0
  39. package/lib-types/components/icon/languages/npm.d.ts +2 -0
  40. package/lib-types/components/icon/languages/python.d.ts +2 -0
  41. package/lib-types/components/icon/languages/rust.d.ts +2 -0
  42. package/lib-types/components/icon/languages/sql.d.ts +2 -0
  43. package/lib-types/components/icon/languages/terraform.d.ts +2 -0
  44. package/lib-types/components/icon/languages/typescript.d.ts +2 -0
  45. package/lib-types/components/media/elm-block-image.d.ts +16 -0
  46. package/lib-types/components/media/elm-block-image.stories.d.ts +12 -0
  47. package/lib-types/components/media/elm-file.d.ts +15 -0
  48. package/lib-types/components/media/elm-file.stories.d.ts +7 -0
  49. package/lib-types/components/navigation/elm-bookmark.d.ts +24 -0
  50. package/lib-types/components/navigation/elm-bookmark.stories.d.ts +12 -0
  51. package/lib-types/components/others/elm-jarkup.d.ts +5 -0
  52. package/lib-types/components/others/elm-jarkup.stories.d.ts +6 -0
  53. package/lib-types/components/table/elm-table-body.d.ts +2 -0
  54. package/lib-types/components/table/elm-table-cell.d.ts +12 -0
  55. package/lib-types/components/table/elm-table-header.d.ts +3 -0
  56. package/lib-types/components/table/elm-table-row.d.ts +2 -0
  57. package/lib-types/components/table/elm-table.d.ts +13 -0
  58. package/lib-types/components/table/elm-table.stories.d.ts +6 -0
  59. package/lib-types/components/typography/elm-block-quote.d.ts +4 -0
  60. package/lib-types/components/typography/elm-block-quote.stories.d.ts +6 -0
  61. package/lib-types/components/typography/elm-callout.d.ts +8 -0
  62. package/lib-types/components/typography/elm-callout.stories.d.ts +10 -0
  63. package/lib-types/components/typography/elm-divider.d.ts +8 -0
  64. package/lib-types/components/typography/elm-divider.stories.d.ts +6 -0
  65. package/lib-types/components/typography/elm-fragment-identifier.d.ts +7 -0
  66. package/lib-types/components/typography/elm-fragment-identifier.stories.d.ts +6 -0
  67. package/lib-types/components/typography/elm-heading.d.ts +6 -0
  68. package/lib-types/components/typography/elm-heading.stories.d.ts +7 -0
  69. package/lib-types/components/typography/elm-inline-text.d.ts +54 -0
  70. package/lib-types/components/typography/elm-inline-text.stories.d.ts +13 -0
  71. package/lib-types/components/typography/elm-list.d.ts +4 -0
  72. package/lib-types/components/typography/elm-list.stories.d.ts +8 -0
  73. package/lib-types/components/typography/elm-paragraph.d.ts +5 -0
  74. package/lib-types/components/typography/elm-paragraph.stories.d.ts +9 -0
  75. package/lib-types/entry.dev.d.ts +2 -0
  76. package/{src/entry.ssr.tsx → lib-types/entry.ssr.d.ts} +2 -9
  77. package/lib-types/hooks/useDelayedSignal.d.ts +6 -0
  78. package/lib-types/hooks/useInView.d.ts +6 -0
  79. package/lib-types/index.d.ts +27 -0
  80. package/lib-types/root.d.ts +2 -0
  81. package/package.json +5 -1
  82. package/.prettierignore +0 -6
  83. package/.storybook/main.ts +0 -23
  84. package/.storybook/preview-head.html +0 -4
  85. package/.storybook/preview.tsx +0 -51
  86. package/.storybook/sb.scss +0 -13
  87. package/.storybook/tsconfig.json +0 -24
  88. package/eslint.config.js +0 -79
  89. package/src/assets/bg1.webp +0 -0
  90. package/src/assets/bg2.webp +0 -0
  91. package/src/assets/images/2.svg +0 -4
  92. package/src/assets/images/lamdscape.svg +0 -4
  93. package/src/assets/images/portrait.svg +0 -4
  94. package/src/assets/images/square.svg +0 -4
  95. package/src/assets/vite.svg +0 -1
  96. package/src/assets/vue.svg +0 -1
  97. package/src/components/code/elm-code-block.module.scss +0 -67
  98. package/src/components/code/elm-code-block.stories.tsx +0 -44
  99. package/src/components/code/elm-code-block.tsx +0 -95
  100. package/src/components/code/elm-katex.stories.tsx +0 -28
  101. package/src/components/code/elm-katex.tsx +0 -34
  102. package/src/components/code/elm-shiki-highlighter.global.scss +0 -18
  103. package/src/components/code/elm-shiki-highlighter.stories.tsx +0 -21
  104. package/src/components/code/elm-shiki-highlighter.tsx +0 -44
  105. package/src/components/code/seed/main.rs +0 -24
  106. package/src/components/containments/elm-toggle.module.scss +0 -132
  107. package/src/components/containments/elm-toggle.stories.tsx +0 -34
  108. package/src/components/containments/elm-toggle.tsx +0 -106
  109. package/src/components/fallback/elm-block-fallback.module.scss +0 -8
  110. package/src/components/fallback/elm-block-fallback.stories.tsx +0 -14
  111. package/src/components/fallback/elm-block-fallback.tsx +0 -20
  112. package/src/components/fallback/elm-rectangle-wave.module.scss +0 -42
  113. package/src/components/fallback/elm-rectangle-wave.stories.tsx +0 -28
  114. package/src/components/fallback/elm-rectangle-wave.tsx +0 -11
  115. package/src/components/icon/elm-dot-loading-icon.module.scss +0 -53
  116. package/src/components/icon/elm-dot-loading-icon.stories.tsx +0 -15
  117. package/src/components/icon/elm-dot-loading-icon.tsx +0 -35
  118. package/src/components/icon/elm-inline-icon.module.scss +0 -21
  119. package/src/components/icon/elm-inline-icon.stories.tsx +0 -16
  120. package/src/components/icon/elm-inline-icon.tsx +0 -25
  121. package/src/components/icon/elm-language-icon.stories.tsx +0 -22
  122. package/src/components/icon/elm-language-icon.tsx +0 -167
  123. package/src/components/icon/elm-mdi-icon.module.scss +0 -8
  124. package/src/components/icon/elm-mdi-icon.stories.tsx +0 -25
  125. package/src/components/icon/elm-mdi-icon.tsx +0 -34
  126. package/src/components/icon/languages/bash.module.scss +0 -6
  127. package/src/components/icon/languages/bash.tsx +0 -27
  128. package/src/components/icon/languages/c-plus-plus.tsx +0 -33
  129. package/src/components/icon/languages/c-sharp.tsx +0 -29
  130. package/src/components/icon/languages/c.tsx +0 -27
  131. package/src/components/icon/languages/css.tsx +0 -21
  132. package/src/components/icon/languages/go.tsx +0 -22
  133. package/src/components/icon/languages/html.tsx +0 -30
  134. package/src/components/icon/languages/java.tsx +0 -37
  135. package/src/components/icon/languages/javascript.tsx +0 -22
  136. package/src/components/icon/languages/json.tsx +0 -53
  137. package/src/components/icon/languages/kotlin.tsx +0 -36
  138. package/src/components/icon/languages/language-interface.ts +0 -4
  139. package/src/components/icon/languages/lua.tsx +0 -29
  140. package/src/components/icon/languages/npm.tsx +0 -25
  141. package/src/components/icon/languages/python.tsx +0 -67
  142. package/src/components/icon/languages/rust.tsx +0 -19
  143. package/src/components/icon/languages/sql.tsx +0 -21
  144. package/src/components/icon/languages/terraform.tsx +0 -31
  145. package/src/components/icon/languages/typescript.tsx +0 -22
  146. package/src/components/media/elm-block-image.module.scss +0 -68
  147. package/src/components/media/elm-block-image.stories.tsx +0 -79
  148. package/src/components/media/elm-block-image.tsx +0 -110
  149. package/src/components/media/elm-file.module.scss +0 -43
  150. package/src/components/media/elm-file.stories.tsx +0 -27
  151. package/src/components/media/elm-file.tsx +0 -75
  152. package/src/components/navigation/elm-bookmark.module.scss +0 -100
  153. package/src/components/navigation/elm-bookmark.stories.tsx +0 -87
  154. package/src/components/navigation/elm-bookmark.tsx +0 -72
  155. package/src/components/others/elm-jarkup.module.scss +0 -26
  156. package/src/components/others/elm-jarkup.stories.tsx +0 -18
  157. package/src/components/others/elm-jarkup.tsx +0 -267
  158. package/src/components/table/elm-table-body.tsx +0 -14
  159. package/src/components/table/elm-table-cell.module.scss +0 -41
  160. package/src/components/table/elm-table-cell.tsx +0 -33
  161. package/src/components/table/elm-table-header.module.scss +0 -8
  162. package/src/components/table/elm-table-header.tsx +0 -21
  163. package/src/components/table/elm-table-row.module.scss +0 -28
  164. package/src/components/table/elm-table-row.tsx +0 -15
  165. package/src/components/table/elm-table.module.scss +0 -29
  166. package/src/components/table/elm-table.stories.tsx +0 -67
  167. package/src/components/table/elm-table.tsx +0 -63
  168. package/src/components/typography/elm-block-quote.module.scss +0 -29
  169. package/src/components/typography/elm-block-quote.stories.tsx +0 -22
  170. package/src/components/typography/elm-block-quote.tsx +0 -34
  171. package/src/components/typography/elm-callout.module.scss +0 -36
  172. package/src/components/typography/elm-callout.stories.tsx +0 -47
  173. package/src/components/typography/elm-callout.tsx +0 -52
  174. package/src/components/typography/elm-divider.module.scss +0 -6
  175. package/src/components/typography/elm-divider.stories.tsx +0 -14
  176. package/src/components/typography/elm-divider.tsx +0 -14
  177. package/src/components/typography/elm-fragment-identifier.module.scss +0 -28
  178. package/src/components/typography/elm-fragment-identifier.stories.tsx +0 -14
  179. package/src/components/typography/elm-fragment-identifier.tsx +0 -31
  180. package/src/components/typography/elm-heading.module.scss +0 -120
  181. package/src/components/typography/elm-heading.stories.tsx +0 -42
  182. package/src/components/typography/elm-heading.tsx +0 -40
  183. package/src/components/typography/elm-inline-text.module.scss +0 -114
  184. package/src/components/typography/elm-inline-text.stories.tsx +0 -70
  185. package/src/components/typography/elm-inline-text.tsx +0 -147
  186. package/src/components/typography/elm-list.global.scss +0 -66
  187. package/src/components/typography/elm-list.stories.tsx +0 -61
  188. package/src/components/typography/elm-list.tsx +0 -39
  189. package/src/components/typography/elm-paragraph.module.scss +0 -21
  190. package/src/components/typography/elm-paragraph.stories.tsx +0 -47
  191. package/src/components/typography/elm-paragraph.tsx +0 -31
  192. package/src/entry.dev.tsx +0 -17
  193. package/src/global.d.ts +0 -13
  194. package/src/hooks/useDelayedSignal.ts +0 -27
  195. package/src/hooks/useInView.tsx +0 -23
  196. package/src/index.ts +0 -113
  197. package/src/root.tsx +0 -13
  198. package/src/styles/text.module.scss +0 -17
  199. package/src/vite-env.d.ts +0 -1
  200. package/tsconfig.json +0 -21
  201. package/vite.config.ts +0 -36
  202. /package/{src/components/table/index.ts → lib-types/components/table/index.d.ts} +0 -0
@@ -1,106 +0,0 @@
1
- import { $, component$, Slot, useSignal } from "@builder.io/qwik";
2
-
3
- import styles from "./elm-toggle.module.scss";
4
- import { ElmMdiIcon } from "../icon/elm-mdi-icon";
5
- import { mdiChevronRight, mdiPlus } from "@mdi/js";
6
- import { ElmInlineText } from "../typography/elm-inline-text";
7
-
8
- export interface ElmToggleProps {
9
- /**
10
- * The summary of the toggle.
11
- */
12
- summary?: string;
13
- }
14
-
15
- export const ElmToggle = component$<ElmToggleProps>(({ summary }) => {
16
- const isOpen = useSignal(false);
17
-
18
- const toggle = $(() => {
19
- isOpen.value = !isOpen.value;
20
- });
21
-
22
- return (
23
- <div
24
- class={[
25
- styles["toggle"],
26
- {
27
- [styles["toggle-open"]]: isOpen.value,
28
- [styles["toggle-closed"]]: !isOpen.value,
29
- },
30
- ]}
31
- >
32
- <div
33
- class={[
34
- styles["summary"],
35
- {
36
- [styles["summary-open"]]: isOpen.value,
37
- [styles["summary-closed"]]: !isOpen.value,
38
- },
39
- ]}
40
- onClick$={toggle}
41
- >
42
- <span
43
- class={[
44
- styles["chevron-icon"],
45
- {
46
- [styles["chevron-icon-open"]]: isOpen.value,
47
- [styles["chevron-icon-closed"]]: !isOpen.value,
48
- },
49
- ]}
50
- >
51
- <ElmMdiIcon d={mdiChevronRight} />
52
- </span>
53
-
54
- <span class={styles["summary-text"]}>
55
- {summary ? summary : <Slot name="summary" />}
56
- </span>
57
-
58
- <span
59
- class={[
60
- styles["plus-icon"],
61
- {
62
- [styles["plus-icon-open"]]: isOpen.value,
63
- [styles["plus-icon-closed"]]: !isOpen.value,
64
- },
65
- ]}
66
- >
67
- <ElmMdiIcon
68
- d={mdiPlus}
69
- color={isOpen.value ? "#c56565" : "#59b57c"}
70
- size="1rem"
71
- />
72
- </span>
73
- </div>
74
-
75
- <div
76
- class={[
77
- styles["content"],
78
- {
79
- [styles["content-open"]]: isOpen.value,
80
- [styles["content-closed"]]: !isOpen.value,
81
- },
82
- ]}
83
- >
84
- <Slot />
85
- </div>
86
-
87
- <div class={styles.footer} onClick$={toggle}>
88
- <span class={styles["footer-chevron-icon"]}>
89
- <ElmMdiIcon d={mdiChevronRight} color="gray" />
90
- </span>
91
- <hr class={styles["footer-line"]} />
92
- <span class={styles["footer-cross-icon"]}>
93
- <ElmMdiIcon d={mdiPlus} color="#c56565" />
94
- </span>
95
- <ElmInlineText>CLOSE</ElmInlineText>
96
- <span class={styles["footer-cross-icon"]}>
97
- <ElmMdiIcon d={mdiPlus} color="#c56565" />
98
- </span>
99
- <hr class={styles["footer-line"]} />
100
- <span class={styles["footer-chevron-icon"]}>
101
- <ElmMdiIcon d={mdiChevronRight} color="gray" />
102
- </span>
103
- </div>
104
- </div>
105
- );
106
- });
@@ -1,8 +0,0 @@
1
- .block-fallback {
2
- position: relative;
3
- display: flex;
4
- justify-content: center;
5
- align-items: center;
6
- width: 100%;
7
- height: var(--height);
8
- }
@@ -1,14 +0,0 @@
1
- import type { Meta, StoryObj } from "storybook-framework-qwik";
2
- import { ElmBlockFallback } from "./elm-block-fallback";
3
-
4
- const meta: Meta<typeof ElmBlockFallback> = {
5
- title: "Components/Fallback/elm-block-fallback",
6
- component: ElmBlockFallback,
7
- tags: ["autodocs"],
8
- args: {},
9
- };
10
-
11
- export default meta;
12
- type Story = StoryObj<typeof meta>;
13
-
14
- export const Primary: Story = {};
@@ -1,20 +0,0 @@
1
- import { component$, CSSProperties } from "@builder.io/qwik";
2
-
3
- import styles from "./elm-block-fallback.module.scss";
4
- import { ElmDotLoadingIcon } from "../icon/elm-dot-loading-icon";
5
- import { ElmRectangleWave } from "./elm-rectangle-wave";
6
-
7
- export interface ElmBlockFallbackProps {
8
- height?: CSSProperties["height"];
9
- }
10
-
11
- export const ElmBlockFallback = component$<ElmBlockFallbackProps>(
12
- ({ height = "16rem" }) => {
13
- return (
14
- <div class={styles["block-fallback"]} style={{ "--height": height }}>
15
- <ElmDotLoadingIcon />
16
- <ElmRectangleWave />
17
- </div>
18
- );
19
- },
20
- );
@@ -1,42 +0,0 @@
1
- @keyframes elm-rectangle-wave {
2
- 0% {
3
- transform: scale(0);
4
- opacity: 0;
5
- }
6
-
7
- 30% {
8
- opacity: 0;
9
- }
10
-
11
- 40% {
12
- opacity: 1;
13
- }
14
-
15
- 100% {
16
- transform: scale(1);
17
- opacity: 0;
18
- }
19
- }
20
-
21
- .rectangle-wave {
22
- box-sizing: border-box;
23
- position: absolute;
24
- overflow: hidden;
25
-
26
- margin: 0;
27
- width: 100%;
28
- height: 100%;
29
-
30
- animation-name: elm-rectangle-wave;
31
- animation-duration: 1200ms;
32
- animation-iteration-count: infinite;
33
- animation-fill-mode: both;
34
-
35
- border-style: solid;
36
- border-width: 1px;
37
- border-color: rgba(0, 0, 0, 0.7);
38
-
39
- [data-theme="dark"] & {
40
- border-color: rgba(255, 255, 255, 0.7);
41
- }
42
- }
@@ -1,28 +0,0 @@
1
- import type { Meta, StoryObj } from "storybook-framework-qwik";
2
- import { ElmRectangleWave } from "./elm-rectangle-wave";
3
-
4
- const meta: Meta<typeof ElmRectangleWave> = {
5
- title: "Components/Fallback/elm-rectangle-wave",
6
- component: ElmRectangleWave,
7
- tags: ["autodocs"],
8
- args: {},
9
- render() {
10
- return (
11
- <div
12
- style={{
13
- width: "100%",
14
- aspectRatio: "2/1",
15
- margin: 0,
16
- position: "relative",
17
- }}
18
- >
19
- <ElmRectangleWave />
20
- </div>
21
- );
22
- },
23
- };
24
-
25
- export default meta;
26
- type Story = StoryObj<typeof meta>;
27
-
28
- export const Primary: Story = {};
@@ -1,11 +0,0 @@
1
- import { component$ } from "@builder.io/qwik";
2
-
3
- import styles from "./elm-rectangle-wave.module.scss";
4
-
5
- export interface ElmRectangleWaveProps {
6
- placeholder?: string;
7
- }
8
-
9
- export const ElmRectangleWave = component$<ElmRectangleWaveProps>(() => {
10
- return <div aria-hidden="true" class={styles["rectangle-wave"]}></div>;
11
- });
@@ -1,53 +0,0 @@
1
- @keyframes bounce {
2
- 0% {
3
- transform: translateY(0%) scaleY(0.3) scaleX(1.5);
4
- }
5
-
6
- 10% {
7
- transform: scaleY(0.8) scaleX(1.2);
8
- }
9
-
10
- 100% {
11
- transform: translateY(-400%) scaleY(1.1);
12
- }
13
- }
14
-
15
- .wrapper {
16
- width: var(--size);
17
- height: var(--size);
18
- user-select: none;
19
- position: relative;
20
- display: flex;
21
- justify-content: space-around;
22
- align-items: flex-end;
23
- }
24
-
25
- .dot {
26
- width: 20%;
27
- height: 20%;
28
- border-radius: 50%;
29
- animation-name: bounce;
30
- animation-duration: 0.4s;
31
- animation-iteration-count: infinite;
32
- animation-direction: alternate;
33
- animation-timing-function: ease-out;
34
-
35
- transition: background-color 400ms;
36
- background-color: var(--color, #606875);
37
-
38
- [data-theme="dark"] & {
39
- background-color: #b0b5be;
40
- }
41
-
42
- &:nth-last-of-type(1) {
43
- animation-delay: -100ms;
44
- }
45
-
46
- &:nth-last-of-type(2) {
47
- animation-delay: 0ms;
48
- }
49
-
50
- &:nth-last-of-type(3) {
51
- animation-delay: 100ms;
52
- }
53
- }
@@ -1,15 +0,0 @@
1
- import type { Meta, StoryObj } from "storybook-framework-qwik";
2
- import { ElmDotLoadingIcon } from "./elm-dot-loading-icon";
3
-
4
- const meta: Meta<typeof ElmDotLoadingIcon> = {
5
- title: "Components/Icon/elm-dot-loading-icon",
6
- component: ElmDotLoadingIcon,
7
- tags: ["autodocs"],
8
- argTypes: { color: { control: "color" } },
9
- args: { size: "4em" },
10
- };
11
-
12
- export default meta;
13
- type Story = StoryObj<typeof meta>;
14
-
15
- export const Primary: Story = {};
@@ -1,35 +0,0 @@
1
- import { component$, type CSSProperties } from "@builder.io/qwik";
2
-
3
- import styles from "./elm-dot-loading-icon.module.scss";
4
-
5
- export interface ElmDotLoadingIconProps {
6
- /**
7
- * Specifies the color of the dot.
8
- *
9
- * e.g.) `'red'`, `'#ff0000'`, `'rgba(255, 0, 0, 0.5)'`
10
- */
11
- color?: CSSProperties["backgroundColor"];
12
-
13
- /**
14
- * Specifies the size of the dot.
15
- */
16
- size?: CSSProperties["width"];
17
- }
18
-
19
- export const ElmDotLoadingIcon = component$<ElmDotLoadingIconProps>(
20
- ({ size = "4em", color = "#606875" }) => {
21
- return (
22
- <div
23
- class={styles.wrapper}
24
- style={{
25
- "--size": size,
26
- "--color": color,
27
- }}
28
- >
29
- <div class={styles.dot} aria-hidden="true"></div>
30
- <div class={styles.dot} aria-hidden="true"></div>
31
- <div class={styles.dot} aria-hidden="true"></div>
32
- </div>
33
- );
34
- },
35
- );
@@ -1,21 +0,0 @@
1
- .icon {
2
- margin: 0;
3
- padding: 0;
4
- display: inline-block;
5
- vertical-align: middle;
6
- height: 1em;
7
-
8
- &::selection {
9
- filter: brightness(1000%);
10
- background-color: var(--color, rgba(black, 0.25));
11
- }
12
-
13
- [data-theme="dark"] & {
14
- color: var(--color, rgba(white, 0.7));
15
-
16
- &::selection {
17
- color: rgba(black, 0.7);
18
- background-color: var(--color, rgba(white, 0.25));
19
- }
20
- }
21
- }
@@ -1,16 +0,0 @@
1
- import type { Meta, StoryObj } from "storybook-framework-qwik";
2
- import { ElmInlineIcon } from "./elm-inline-icon";
3
-
4
- const meta: Meta<typeof ElmInlineIcon> = {
5
- title: "Components/Icon/elm-inline-icon",
6
- component: ElmInlineIcon,
7
- tags: ["autodocs"],
8
- args: {
9
- src: "https://rust-lang.org/logos/rust-logo-512x512.png",
10
- },
11
- };
12
-
13
- export default meta;
14
- type Story = StoryObj<typeof meta>;
15
-
16
- export const Primary: Story = {};
@@ -1,25 +0,0 @@
1
- /* eslint-disable qwik/jsx-img */
2
-
3
- import { component$ } from "@builder.io/qwik";
4
-
5
- import styles from "./elm-inline-icon.module.scss";
6
-
7
- export interface ElmInlineIconProps {
8
- /**
9
- * The source URL of the icon.
10
- */
11
- src: string;
12
-
13
- /**
14
- * The alt text for the icon.
15
- */
16
- alt?: string;
17
- }
18
-
19
- export const ElmInlineIcon = component$<ElmInlineIconProps>(({ src, alt }) => {
20
- return (
21
- <div class={styles.icon}>
22
- <img src={src} alt={alt} class={styles.icon} />
23
- </div>
24
- );
25
- });
@@ -1,22 +0,0 @@
1
- import type { Meta, StoryObj } from "storybook-framework-qwik";
2
- import { ElmLanguageIcon, LANGUAGES } from "./elm-language-icon";
3
-
4
- const meta: Meta<typeof ElmLanguageIcon> = {
5
- title: "Components/Icon/elm-language-icon",
6
- component: ElmLanguageIcon,
7
- tags: ["autodocs"],
8
- args: {},
9
- argTypes: {
10
- language: {
11
- control: "radio",
12
- options: LANGUAGES,
13
- },
14
- },
15
- };
16
-
17
- export default meta;
18
- type Story = StoryObj<typeof meta>;
19
-
20
- export const Primary: Story = {
21
- args: { language: "rust" },
22
- };
@@ -1,167 +0,0 @@
1
- import { Component, component$ } from "@builder.io/qwik";
2
-
3
- // import styles from "./elm-language-icon.module.scss";
4
-
5
- import { type CommonLanguageProps } from "./languages/language-interface";
6
-
7
- import { Rust } from "./languages/rust";
8
- import { Javascript } from "./languages/javascript";
9
- import { Typescript } from "./languages/typescript";
10
- import { Bash } from "./languages/bash";
11
- import { Terraform } from "./languages/terraform";
12
- import { Html } from "./languages/html";
13
- import { Css } from "./languages/css";
14
- import { Npm } from "./languages/npm";
15
- import { Java } from "./languages/java";
16
- import { Kotlin } from "./languages/kotlin";
17
- import { Go } from "./languages/go";
18
- import { Python } from "./languages/python";
19
- import { Sql } from "./languages/sql";
20
- import { Json } from "./languages/json";
21
- import { Lua } from "./languages/lua";
22
- import { Csharp } from "./languages/c-sharp";
23
- import { Cplusplus } from "./languages/c-plus-plus";
24
- import { C } from "./languages/c";
25
-
26
- export const LANGUAGES = [
27
- "rust",
28
- "javascript",
29
- "typescript",
30
- "shell",
31
- "terraform",
32
- "html",
33
- "css",
34
- "npm",
35
- "java",
36
- "kotlin",
37
- "go",
38
- "python",
39
- "sql",
40
- "json",
41
- "lua",
42
- "csharp",
43
- "cpp",
44
- "c",
45
- "file",
46
- ] as const;
47
-
48
- export type Language = (typeof LANGUAGES)[number];
49
-
50
- export interface ElmLanguageIconProps {
51
- /**
52
- * The size of the icon.
53
- */
54
- size?: number;
55
-
56
- /**
57
- * The language of the icon.
58
- */
59
- language: Language | string;
60
- }
61
-
62
- const normalizeLanguage = (language: string): Language => {
63
- switch (language) {
64
- case "rust":
65
- case "rs":
66
- return "rust";
67
-
68
- case "javascript":
69
- case "js":
70
- return "javascript";
71
-
72
- case "typescript":
73
- case "ts":
74
- return "typescript";
75
-
76
- case "bash":
77
- case "sh":
78
- case "shell":
79
- return "shell";
80
-
81
- case "tf":
82
- case "terraform":
83
- case "hcl":
84
- return "terraform";
85
-
86
- case "html":
87
- case "html5":
88
- return "html";
89
-
90
- case "css":
91
- case "css3":
92
- return "css";
93
-
94
- case "npm":
95
- return "npm";
96
-
97
- case "java":
98
- return "java";
99
-
100
- case "kotlin":
101
- case "kt":
102
- return "kotlin";
103
-
104
- case "go":
105
- case "golang":
106
- return "go";
107
-
108
- case "python":
109
- case "py":
110
- return "python";
111
-
112
- case "sql":
113
- return "sql";
114
-
115
- case "json":
116
- return "json";
117
-
118
- case "lua":
119
- return "lua";
120
-
121
- case "cs":
122
- case "c#":
123
- case "csharp":
124
- return "csharp";
125
-
126
- case "cpp":
127
- case "c++":
128
- return "cpp";
129
-
130
- case "c":
131
- case "clang":
132
- return "c";
133
-
134
- default:
135
- return "file";
136
- }
137
- };
138
-
139
- const renderMap: Record<Language, Component<CommonLanguageProps>> = {
140
- rust: Rust,
141
- javascript: Javascript,
142
- typescript: Typescript,
143
- shell: Bash,
144
- terraform: Terraform,
145
- html: Html,
146
- css: Css,
147
- npm: Npm,
148
- java: Java,
149
- kotlin: Kotlin,
150
- go: Go,
151
- python: Python,
152
- sql: Sql,
153
- json: Json,
154
- lua: Lua,
155
- csharp: Csharp,
156
- cpp: Cplusplus,
157
- c: C,
158
- file: () => null,
159
- };
160
-
161
- export const ElmLanguageIcon = component$<ElmLanguageIconProps>(
162
- ({ size = 24, language }) => {
163
- const Component = renderMap[normalizeLanguage(language)];
164
-
165
- return <Component size={size} />;
166
- },
167
- );
@@ -1,8 +0,0 @@
1
- .icon {
2
- fill: var(--color, #555b67);
3
- transition: fill 200ms;
4
-
5
- [data-theme="dark"] & {
6
- fill: var(--dark-color, #b0b5be);
7
- }
8
- }
@@ -1,25 +0,0 @@
1
- import { type Meta, type StoryObj } from "storybook-framework-qwik";
2
- import { ElmMdiIcon } from "./elm-mdi-icon";
3
- import { mdiTag } from "@mdi/js";
4
-
5
- const meta: Meta<typeof ElmMdiIcon> = {
6
- title: "Components/Icon/elm-mdi-icon",
7
- component: ElmMdiIcon,
8
- tags: ["autodocs"],
9
- argTypes: {
10
- color: { control: "color" },
11
- lightColor: { control: "color" },
12
- darkColor: { control: "color" },
13
- },
14
- args: {},
15
- };
16
-
17
- export default meta;
18
- type Story = StoryObj<typeof meta>;
19
-
20
- export const Primary: Story = {
21
- args: {
22
- size: "1.25rem",
23
- d: mdiTag,
24
- },
25
- };
@@ -1,34 +0,0 @@
1
- import { component$ } from "@builder.io/qwik";
2
-
3
- import styles from "./elm-mdi-icon.module.scss";
4
-
5
- export interface ElmMdiIconProps {
6
- d: string;
7
- size?: string;
8
- color?: string;
9
- lightColor?: string;
10
- darkColor?: string;
11
- }
12
-
13
- export const ElmMdiIcon = component$<ElmMdiIconProps>(
14
- ({ d, size = "1em", color, lightColor, darkColor }) => {
15
- return (
16
- <svg
17
- class={styles.icon}
18
- style={{
19
- "--color": lightColor ?? color,
20
- "--dark-color": darkColor ?? color,
21
- }}
22
- width={size}
23
- height={size}
24
- viewBox="0 0 24 24"
25
- fill={color}
26
- xmlns="http://www.w3.org/2000/svg"
27
- focusable="false"
28
- role="img"
29
- >
30
- <path d={d} />
31
- </svg>
32
- );
33
- },
34
- );
@@ -1,6 +0,0 @@
1
- .path {
2
- fill: #293138;
3
- [data-theme="dark"] & {
4
- fill: #d2dbe3;
5
- }
6
- }