@runwisp/ui 0.4.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 (108) hide show
  1. package/LICENSE +215 -0
  2. package/README.md +20 -0
  3. package/package.json +128 -0
  4. package/src/app.d.ts +8 -0
  5. package/src/app.html +12 -0
  6. package/src/astro/CTABand.astro +32 -0
  7. package/src/astro/Hero.astro +58 -0
  8. package/src/astro/SiteFooter.astro +47 -0
  9. package/src/astro/SiteHeader.astro +46 -0
  10. package/src/lib/actions/portal.ts +16 -0
  11. package/src/lib/assets/runwisp-logo.svg +16 -0
  12. package/src/lib/components/Accordion.svelte +20 -0
  13. package/src/lib/components/AccordionItem.svelte +74 -0
  14. package/src/lib/components/Alert.svelte +107 -0
  15. package/src/lib/components/AlertDialog.svelte +63 -0
  16. package/src/lib/components/Avatar.svelte +88 -0
  17. package/src/lib/components/Badge.svelte +131 -0
  18. package/src/lib/components/Breadcrumb.svelte +58 -0
  19. package/src/lib/components/Button.svelte +69 -0
  20. package/src/lib/components/Card.svelte +70 -0
  21. package/src/lib/components/Checkbox.svelte +90 -0
  22. package/src/lib/components/CodeBlock.svelte +66 -0
  23. package/src/lib/components/CronInput.svelte +130 -0
  24. package/src/lib/components/DataGrid.svelte +368 -0
  25. package/src/lib/components/Drawer.svelte +156 -0
  26. package/src/lib/components/Dropdown.svelte +195 -0
  27. package/src/lib/components/DurationInput.svelte +170 -0
  28. package/src/lib/components/EmptyState.svelte +46 -0
  29. package/src/lib/components/ErrorState.svelte +73 -0
  30. package/src/lib/components/FeatureCard.svelte +35 -0
  31. package/src/lib/components/FeatureGrid.svelte +37 -0
  32. package/src/lib/components/FormField.svelte +53 -0
  33. package/src/lib/components/Heading.svelte +46 -0
  34. package/src/lib/components/Input.svelte +114 -0
  35. package/src/lib/components/Kbd.svelte +31 -0
  36. package/src/lib/components/Link.svelte +56 -0
  37. package/src/lib/components/LinkButton.svelte +55 -0
  38. package/src/lib/components/LogConsole.svelte +424 -0
  39. package/src/lib/components/Logo.svelte +34 -0
  40. package/src/lib/components/Modal.svelte +138 -0
  41. package/src/lib/components/PageContainer.svelte +38 -0
  42. package/src/lib/components/Pagination.svelte +96 -0
  43. package/src/lib/components/Popover.svelte +130 -0
  44. package/src/lib/components/Progress.svelte +68 -0
  45. package/src/lib/components/Prose.svelte +43 -0
  46. package/src/lib/components/Radio.svelte +82 -0
  47. package/src/lib/components/RadioGroup.svelte +53 -0
  48. package/src/lib/components/Select.svelte +454 -0
  49. package/src/lib/components/Separator.svelte +30 -0
  50. package/src/lib/components/Skeleton.svelte +75 -0
  51. package/src/lib/components/Sparkline.svelte +58 -0
  52. package/src/lib/components/Spinner.svelte +44 -0
  53. package/src/lib/components/StatusIndicator.svelte +203 -0
  54. package/src/lib/components/Table.svelte +19 -0
  55. package/src/lib/components/TableBody.svelte +17 -0
  56. package/src/lib/components/TableCell.svelte +34 -0
  57. package/src/lib/components/TableHead.svelte +19 -0
  58. package/src/lib/components/TableRow.svelte +22 -0
  59. package/src/lib/components/Tabs.svelte +148 -0
  60. package/src/lib/components/Text.svelte +57 -0
  61. package/src/lib/components/Textarea.svelte +81 -0
  62. package/src/lib/components/ThemeToggle.svelte +47 -0
  63. package/src/lib/components/TimezoneSelect.svelte +127 -0
  64. package/src/lib/components/ToastContainer.svelte +84 -0
  65. package/src/lib/components/Toggle.svelte +84 -0
  66. package/src/lib/components/Tooltip.svelte +56 -0
  67. package/src/lib/components/button-styles.ts +51 -0
  68. package/src/lib/components/dashboard/RunDetailPanel.svelte +252 -0
  69. package/src/lib/components/dashboard/RunsList.svelte +331 -0
  70. package/src/lib/components/dashboard/run-helpers.ts +12 -0
  71. package/src/lib/components/dashboard/status-config.ts +141 -0
  72. package/src/lib/components/dashboard/types.ts +35 -0
  73. package/src/lib/index.ts +122 -0
  74. package/src/lib/log-console/LogCache.svelte.ts +93 -0
  75. package/src/lib/log-console/LogFetcher.svelte.ts +179 -0
  76. package/src/lib/log-console/types.ts +24 -0
  77. package/src/lib/theme-tokens.css +235 -0
  78. package/src/lib/theme.css +276 -0
  79. package/src/lib/utils/error.ts +18 -0
  80. package/src/lib/utils/format.ts +76 -0
  81. package/src/lib/utils/id.ts +6 -0
  82. package/src/lib/utils/toast.svelte.ts +87 -0
  83. package/src/lib/utils/toast.ts +60 -0
  84. package/src/routes/+layout.svelte +10 -0
  85. package/src/routes/+page.svelte +5 -0
  86. package/src/routes/layout.css +3 -0
  87. package/src/stories/Alert.stories.svelte +64 -0
  88. package/src/stories/Avatar.stories.svelte +76 -0
  89. package/src/stories/Badge.stories.svelte +76 -0
  90. package/src/stories/Breadcrumb.stories.svelte +64 -0
  91. package/src/stories/Button.stories.svelte +101 -0
  92. package/src/stories/Card.stories.svelte +106 -0
  93. package/src/stories/Checkbox.stories.svelte +77 -0
  94. package/src/stories/DataGrid.stories.svelte +130 -0
  95. package/src/stories/Dropdown.stories.svelte +81 -0
  96. package/src/stories/EmptyState.stories.svelte +74 -0
  97. package/src/stories/Input.stories.svelte +88 -0
  98. package/src/stories/Logo.stories.svelte +82 -0
  99. package/src/stories/Modal.stories.svelte +101 -0
  100. package/src/stories/Progress.stories.svelte +65 -0
  101. package/src/stories/Select.stories.svelte +158 -0
  102. package/src/stories/Tabs.stories.svelte +103 -0
  103. package/src/stories/Textarea.stories.svelte +45 -0
  104. package/src/stories/Toggle.stories.svelte +74 -0
  105. package/src/stories/Tooltip.stories.svelte +77 -0
  106. package/src/stories/Welcome.mdx +241 -0
  107. package/src/stories/assets/runwisp_c.svg +16 -0
  108. package/src/svelte-shims.d.ts +18 -0
package/LICENSE ADDED
@@ -0,0 +1,215 @@
1
+ Copyright PoppyCake, s.r.o.
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
+ limitations under the License.
14
+
15
+ Apache License
16
+ Version 2.0, January 2004
17
+ http://www.apache.org/licenses/
18
+
19
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
20
+
21
+ 1. Definitions.
22
+
23
+ "License" shall mean the terms and conditions for use, reproduction,
24
+ and distribution as defined by Sections 1 through 9 of this document.
25
+
26
+ "Licensor" shall mean the copyright owner or entity authorized by
27
+ the copyright owner that is granting the License.
28
+
29
+ "Legal Entity" shall mean the union of the acting entity and all
30
+ other entities that control, are controlled by, or are under common
31
+ control with that entity. For the purposes of this definition,
32
+ "control" means (i) the power, direct or indirect, to cause the
33
+ direction or management of such entity, whether by contract or
34
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
35
+ outstanding shares, or (iii) beneficial ownership of such entity.
36
+
37
+ "You" (or "Your") shall mean an individual or Legal Entity
38
+ exercising permissions granted by this License.
39
+
40
+ "Source" form shall mean the preferred form for making modifications,
41
+ including but not limited to software source code, documentation
42
+ source, and configuration files.
43
+
44
+ "Object" form shall mean any form resulting from mechanical
45
+ transformation or translation of a Source form, including but
46
+ not limited to compiled object code, generated documentation,
47
+ and conversions to other media types.
48
+
49
+ "Work" shall mean the work of authorship, whether in Source or
50
+ Object form, made available under the License, as indicated by a
51
+ copyright notice that is included in or attached to the work
52
+ (an example is provided in the Appendix below).
53
+
54
+ "Derivative Works" shall mean any work, whether in Source or Object
55
+ form, that is based on (or derived from) the Work and for which the
56
+ editorial revisions, annotations, elaborations, or other modifications
57
+ represent, as a whole, an original work of authorship. For the purposes
58
+ of this License, Derivative Works shall not include works that remain
59
+ separable from, or merely link (or bind by name) to the interfaces of,
60
+ the Work and Derivative Works thereof.
61
+
62
+ "Contribution" shall mean any work of authorship, including
63
+ the original version of the Work and any modifications or additions
64
+ to that Work or Derivative Works thereof, that is intentionally
65
+ submitted to Licensor for inclusion in the Work by the copyright owner
66
+ or by an individual or Legal Entity authorized to submit on behalf of
67
+ the copyright owner. For the purposes of this definition, "submitted"
68
+ means any form of electronic, verbal, or written communication sent
69
+ to the Licensor or its representatives, including but not limited to
70
+ communication on electronic mailing lists, source code control systems,
71
+ and issue tracking systems that are managed by, or on behalf of, the
72
+ Licensor for the purpose of discussing and improving the Work, but
73
+ excluding communication that is conspicuously marked or otherwise
74
+ designated in writing by the copyright owner as "Not a Contribution."
75
+
76
+ "Contributor" shall mean Licensor and any individual or Legal Entity
77
+ on behalf of whom a Contribution has been received by Licensor and
78
+ subsequently incorporated within the Work.
79
+
80
+ 2. Grant of Copyright License. Subject to the terms and conditions of
81
+ this License, each Contributor hereby grants to You a perpetual,
82
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
83
+ copyright license to reproduce, prepare Derivative Works of,
84
+ publicly display, publicly perform, sublicense, and distribute the
85
+ Work and such Derivative Works in Source or Object form.
86
+
87
+ 3. Grant of Patent License. Subject to the terms and conditions of
88
+ this License, each Contributor hereby grants to You a perpetual,
89
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
90
+ (except as stated in this section) patent license to make, have made,
91
+ use, offer to sell, sell, import, and otherwise transfer the Work,
92
+ where such license applies only to those patent claims licensable
93
+ by such Contributor that are necessarily infringed by their
94
+ Contribution(s) alone or by combination of their Contribution(s)
95
+ with the Work to which such Contribution(s) was submitted. If You
96
+ institute patent litigation against any entity (including a
97
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
98
+ or a Contribution incorporated within the Work constitutes direct
99
+ or contributory patent infringement, then any patent licenses
100
+ granted to You under this License for that Work shall terminate
101
+ as of the date such litigation is filed.
102
+
103
+ 4. Redistribution. You may reproduce and distribute copies of the
104
+ Work or Derivative Works thereof in any medium, with or without
105
+ modifications, and in Source or Object form, provided that You
106
+ meet the following conditions:
107
+
108
+ (a) You must give any other recipients of the Work or
109
+ Derivative Works a copy of this License; and
110
+
111
+ (b) You must cause any modified files to carry prominent notices
112
+ stating that You changed the files; and
113
+
114
+ (c) You must retain, in the Source form of any Derivative Works
115
+ that You distribute, all copyright, patent, trademark, and
116
+ attribution notices from the Source form of the Work,
117
+ excluding those notices that do not pertain to any part of
118
+ the Derivative Works; and
119
+
120
+ (d) If the Work includes a "NOTICE" text file as part of its
121
+ distribution, then any Derivative Works that You distribute must
122
+ include a readable copy of the attribution notices contained
123
+ within such NOTICE file, excluding those notices that do not
124
+ pertain to any part of the Derivative Works, in at least one
125
+ of the following places: within a NOTICE text file distributed
126
+ as part of the Derivative Works; within the Source form or
127
+ documentation, if provided along with the Derivative Works; or,
128
+ within a display generated by the Derivative Works, if and
129
+ wherever such third-party notices normally appear. The contents
130
+ of the NOTICE file are for informational purposes only and
131
+ do not modify the License. You may add Your own attribution
132
+ notices within Derivative Works that You distribute, alongside
133
+ or as an addendum to the NOTICE text from the Work, provided
134
+ that such additional attribution notices cannot be construed
135
+ as modifying the License.
136
+
137
+ You may add Your own copyright statement to Your modifications and
138
+ may provide additional or different license terms and conditions
139
+ for use, reproduction, or distribution of Your modifications, or
140
+ for any such Derivative Works as a whole, provided Your use,
141
+ reproduction, and distribution of the Work otherwise complies with
142
+ the conditions stated in this License.
143
+
144
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
145
+ any Contribution intentionally submitted for inclusion in the Work
146
+ by You to the Licensor shall be under the terms and conditions of
147
+ this License, without any additional terms or conditions.
148
+ Notwithstanding the above, nothing herein shall supersede or modify
149
+ the terms of any separate license agreement you may have executed
150
+ with Licensor regarding such Contributions.
151
+
152
+ 6. Trademarks. This License does not grant permission to use the trade
153
+ names, trademarks, service marks, or product names of the Licensor,
154
+ except as required for reasonable and customary use in describing the
155
+ origin of the Work and reproducing the content of the NOTICE file.
156
+
157
+ 7. Disclaimer of Warranty. Unless required by applicable law or
158
+ agreed to in writing, Licensor provides the Work (and each
159
+ Contributor provides its Contributions) on an "AS IS" BASIS,
160
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
161
+ implied, including, without limitation, any warranties or conditions
162
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
163
+ PARTICULAR PURPOSE. You are solely responsible for determining the
164
+ appropriateness of using or redistributing the Work and assume any
165
+ risks associated with Your exercise of permissions under this License.
166
+
167
+ 8. Limitation of Liability. In no event and under no legal theory,
168
+ whether in tort (including negligence), contract, or otherwise,
169
+ unless required by applicable law (such as deliberate and grossly
170
+ negligent acts) or agreed to in writing, shall any Contributor be
171
+ liable to You for damages, including any direct, indirect, special,
172
+ incidental, or consequential damages of any character arising as a
173
+ result of this License or out of the use or inability to use the
174
+ Work (including but not limited to damages for loss of goodwill,
175
+ work stoppage, computer failure or malfunction, or any and all
176
+ other commercial damages or losses), even if such Contributor
177
+ has been advised of the possibility of such damages.
178
+
179
+ 9. Accepting Warranty or Additional Liability. While redistributing
180
+ the Work or Derivative Works thereof, You may choose to offer,
181
+ and charge a fee for, acceptance of support, warranty, indemnity,
182
+ or other liability obligations and/or rights consistent with this
183
+ License. However, in accepting such obligations, You may act only
184
+ on Your own behalf and on Your sole responsibility, not on behalf
185
+ of any other Contributor, and only if You agree to indemnify,
186
+ defend, and hold each Contributor harmless for any liability
187
+ incurred by, or claims asserted against, such Contributor by reason
188
+ of your accepting any such warranty or additional liability.
189
+
190
+ END OF TERMS AND CONDITIONS
191
+
192
+ APPENDIX: How to apply the Apache License to your work.
193
+
194
+ To apply the Apache License to your work, attach the following
195
+ boilerplate notice, with the fields enclosed by brackets "[]"
196
+ replaced with your own identifying information. (Don't include
197
+ the brackets!) The text should be enclosed in the appropriate
198
+ comment syntax for the file format. We also recommend that a
199
+ file or class name and description of purpose be included on the
200
+ same "printed page" as the copyright notice for easier
201
+ identification within third-party archives.
202
+
203
+ Copyright [yyyy] [name of copyright owner]
204
+
205
+ Licensed under the Apache License, Version 2.0 (the "License");
206
+ you may not use this file except in compliance with the License.
207
+ You may obtain a copy of the License at
208
+
209
+ http://www.apache.org/licenses/LICENSE-2.0
210
+
211
+ Unless required by applicable law or agreed to in writing, software
212
+ distributed under the License is distributed on an "AS IS" BASIS,
213
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
214
+ See the License for the specific language governing permissions and
215
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,20 @@
1
+ # @runwisp/ui
2
+
3
+ Svelte 5 UI component library for RunWisp dashboards and admin interfaces.
4
+
5
+ Built with [Svelte 5 runes](https://svelte.dev/docs/svelte/what-are-runes), [Tailwind CSS v4](https://tailwindcss.com/), and [Storybook](https://storybook.js.org/) for interactive component development.
6
+
7
+ ## Development
8
+
9
+ From the repository root:
10
+
11
+ ```bash
12
+ bun install
13
+ bun run theme # starts Storybook on port 6006
14
+ ```
15
+
16
+ Components live in `src/lib/`. Routes in `src/routes/` serve as a preview/showcase app for development.
17
+
18
+ ## License
19
+
20
+ [Apache-2.0](LICENSE)
package/package.json ADDED
@@ -0,0 +1,128 @@
1
+ {
2
+ "name": "@runwisp/ui",
3
+ "description": "Svelte 5 UI component library for RunWisp dashboards and admin interfaces.",
4
+ "version": "0.4.0",
5
+ "license": "Apache-2.0",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/runwisp/runwisp.git",
9
+ "directory": "packages/ui"
10
+ },
11
+ "homepage": "https://github.com/runwisp/runwisp/tree/main/packages/ui#readme",
12
+ "bugs": {
13
+ "url": "https://github.com/runwisp/runwisp/issues"
14
+ },
15
+ "publishConfig": {
16
+ "access": "public"
17
+ },
18
+ "scripts": {
19
+ "dev": "storybook dev -p 6006 --no-open",
20
+ "build": "echo '@runwisp/ui: no build step (raw source)'",
21
+ "check": "svelte-check --tsconfig ./tsconfig.json && prettier --check . && eslint .",
22
+ "format": "prettier --write ."
23
+ },
24
+ "nx": {
25
+ "targets": {
26
+ "build": {
27
+ "cache": true,
28
+ "inputs": [
29
+ "production"
30
+ ],
31
+ "outputs": []
32
+ }
33
+ }
34
+ },
35
+ "files": [
36
+ "src"
37
+ ],
38
+ "sideEffects": [
39
+ "**/*.css"
40
+ ],
41
+ "svelte": "./src/lib/index.ts",
42
+ "types": "./src/lib/index.ts",
43
+ "type": "module",
44
+ "exports": {
45
+ ".": {
46
+ "types": "./src/lib/index.ts",
47
+ "svelte": "./src/lib/index.ts",
48
+ "default": "./src/lib/index.ts"
49
+ },
50
+ "./theme.css": {
51
+ "style": "./src/lib/theme.css",
52
+ "default": "./src/lib/theme.css"
53
+ },
54
+ "./theme-tokens.css": {
55
+ "style": "./src/lib/theme-tokens.css",
56
+ "default": "./src/lib/theme-tokens.css"
57
+ },
58
+ "./src/lib/theme.css": "./src/lib/theme.css",
59
+ "./assets/*": "./src/lib/assets/*",
60
+ "./astro/*": "./src/astro/*",
61
+ "./*": "./src/lib/*"
62
+ },
63
+ "peerDependencies": {
64
+ "svelte": "^5.0.0"
65
+ },
66
+ "devDependencies": {
67
+ "@chromatic-com/storybook": "^4.1.3",
68
+ "@eslint/compat": "^1.4.0",
69
+ "@eslint/js": "^9.39.1",
70
+ "@runwisp/eslint-config": "0.4.0",
71
+ "@runwisp/typescript-config": "0.4.0",
72
+ "@storybook/addon-a11y": "^10.1.9",
73
+ "@storybook/addon-docs": "^10.1.9",
74
+ "@storybook/addon-svelte-csf": "^5.0.10",
75
+ "@storybook/addon-vitest": "^10.1.9",
76
+ "@storybook/sveltekit": "^10.1.9",
77
+ "@sveltejs/kit": "^2.49.1",
78
+ "@sveltejs/vite-plugin-svelte": "^6.2.1",
79
+ "@tailwindcss/forms": "^0.5.10",
80
+ "@tailwindcss/typography": "^0.5.19",
81
+ "@tailwindcss/vite": "^4.1.17",
82
+ "@types/dlv": "^1.1.5",
83
+ "@types/ms": "^2.1.0",
84
+ "@types/node": "^24",
85
+ "@vitest/browser-playwright": "^4.0.15",
86
+ "@vitest/coverage-v8": "^4.0.15",
87
+ "eslint": "^9.39.1",
88
+ "eslint-config-prettier": "^10.1.8",
89
+ "eslint-plugin-sonarjs": "^4.0.0",
90
+ "eslint-plugin-storybook": "^10.1.9",
91
+ "eslint-plugin-svelte": "^3.13.1",
92
+ "globals": "^16.5.0",
93
+ "playwright": "^1.57.0",
94
+ "prettier": "^3.7.4",
95
+ "prettier-plugin-svelte": "^3.4.0",
96
+ "prettier-plugin-tailwindcss": "^0.7.2",
97
+ "storybook": "^10.1.9",
98
+ "svelte": "^5.45.6",
99
+ "svelte-check": "^4.3.4",
100
+ "tailwindcss": "^4.1.17",
101
+ "typescript": "5.9.2",
102
+ "typescript-eslint": "^8.48.1",
103
+ "vite": "^7.2.6",
104
+ "vitest": "^4.0.15"
105
+ },
106
+ "keywords": [
107
+ "svelte",
108
+ "svelte5",
109
+ "ui-components",
110
+ "dashboard",
111
+ "cron",
112
+ "tailwindcss",
113
+ "runwisp"
114
+ ],
115
+ "dependencies": {
116
+ "@floating-ui/dom": "^1.7.4",
117
+ "@fontsource/tasa-orbiter": "^5.2.2",
118
+ "@lucide/svelte": "^0.561.0",
119
+ "@runwisp/common": "0.4.0",
120
+ "ansi-to-html": "^0.7.2",
121
+ "cron-parser": "^5.4.0",
122
+ "cronstrue": "^3.9.0",
123
+ "date-fns": "^4.1.0",
124
+ "dlv": "^1.1.3",
125
+ "fuse.js": "^7.1.0",
126
+ "ms": "^2.1.3"
127
+ }
128
+ }
package/src/app.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ // SPDX-FileCopyrightText: PoppyCake, s.r.o.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ declare global {
5
+ namespace App {}
6
+ }
7
+
8
+ export {};
package/src/app.html ADDED
@@ -0,0 +1,12 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <link rel="icon" href="%sveltekit.assets%/favicon.svg" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
7
+ %sveltekit.head%
8
+ </head>
9
+ <body data-sveltekit-preload-data="hover">
10
+ <div style="display: contents">%sveltekit.body%</div>
11
+ </body>
12
+ </html>
@@ -0,0 +1,32 @@
1
+ ---
2
+ // SPDX-FileCopyrightText: PoppyCake, s.r.o.
3
+ // SPDX-License-Identifier: Apache-2.0
4
+
5
+ interface Props {
6
+ heading: string;
7
+ sub?: string;
8
+ tone?: "default" | "primary";
9
+ class?: string;
10
+ }
11
+
12
+ const { heading, sub, tone = "default", class: className = "" } = Astro.props;
13
+
14
+ const surface =
15
+ tone === "primary" ? "bg-primary text-on-primary" : "bg-surface-sunken text-on-surface";
16
+ const subTone = tone === "primary" ? "text-on-primary/80" : "text-on-surface-muted";
17
+ const hasCtas = Astro.slots.has("ctas");
18
+ ---
19
+
20
+ <section class:list={[surface, className]}>
21
+ <div class="mx-auto max-w-5xl px-6 py-16 text-center sm:py-20">
22
+ <h2 class="text-3xl font-bold tracking-tight sm:text-4xl">{heading}</h2>
23
+ {sub && <p class:list={[subTone, "mt-4 text-lg"]}>{sub}</p>}
24
+ {
25
+ hasCtas && (
26
+ <div class="mt-8 flex flex-wrap items-center justify-center gap-3">
27
+ <slot name="ctas" />
28
+ </div>
29
+ )
30
+ }
31
+ </div>
32
+ </section>
@@ -0,0 +1,58 @@
1
+ ---
2
+ // SPDX-FileCopyrightText: PoppyCake, s.r.o.
3
+ // SPDX-License-Identifier: Apache-2.0
4
+
5
+ interface Props {
6
+ headline: string;
7
+ sub?: string;
8
+ eyebrow?: string;
9
+ align?: "left" | "center";
10
+ size?: "md" | "lg";
11
+ class?: string;
12
+ }
13
+
14
+ const { headline, sub, eyebrow, align = "left", size = "lg", class: className = "" } = Astro.props;
15
+
16
+ const padding = size === "lg" ? "py-20 sm:py-24 lg:py-32" : "py-14 sm:py-16 lg:py-20";
17
+ const headlineSize =
18
+ size === "lg" ? "text-4xl sm:text-5xl lg:text-6xl" : "text-3xl sm:text-4xl lg:text-5xl";
19
+ const hasMedia = Astro.slots.has("media");
20
+ const hasCtas = Astro.slots.has("ctas");
21
+ const layout = hasMedia ? "grid items-center gap-12 lg:grid-cols-2 lg:gap-16" : "mx-auto max-w-3xl";
22
+ const textAlign = align === "center" && !hasMedia ? "text-center" : "";
23
+ const ctaAlign = align === "center" && !hasMedia ? "justify-center" : "";
24
+ ---
25
+
26
+ <section class:list={["relative isolate overflow-hidden", className]}>
27
+ <div class:list={["mx-auto max-w-6xl px-6", padding]}>
28
+ <div class={layout}>
29
+ <div class={textAlign}>
30
+ {
31
+ eyebrow && (
32
+ <p class="text-primary-soft-text mb-4 text-sm font-semibold tracking-wider uppercase">
33
+ {eyebrow}
34
+ </p>
35
+ )
36
+ }
37
+ <h1 class:list={["text-on-surface font-bold tracking-tight", headlineSize]}>
38
+ {headline}
39
+ </h1>
40
+ {sub && <p class="text-on-surface-muted mt-6 text-lg sm:text-xl">{sub}</p>}
41
+ {
42
+ hasCtas && (
43
+ <div class:list={["mt-8 flex flex-wrap items-center gap-3", ctaAlign]}>
44
+ <slot name="ctas" />
45
+ </div>
46
+ )
47
+ }
48
+ </div>
49
+ {
50
+ hasMedia && (
51
+ <div class="lg:justify-self-end">
52
+ <slot name="media" />
53
+ </div>
54
+ )
55
+ }
56
+ </div>
57
+ </div>
58
+ </section>
@@ -0,0 +1,47 @@
1
+ ---
2
+ // SPDX-FileCopyrightText: PoppyCake, s.r.o.
3
+ // SPDX-License-Identifier: Apache-2.0
4
+
5
+ interface Props {
6
+ tagline?: string;
7
+ class?: string;
8
+ }
9
+
10
+ const { tagline = "Apache-2.0 · Built by operators, for operators.", class: className = "" } =
11
+ Astro.props;
12
+
13
+ const hasTeaser = Astro.slots.has("teaser");
14
+ const hasColumns = Astro.slots.has("columns");
15
+ const hasBadges = Astro.slots.has("badges");
16
+ ---
17
+
18
+ <footer class:list={["bg-surface-sunken border-t border-outline", className]}>
19
+ <div class="mx-auto max-w-6xl px-6 py-12">
20
+ {
21
+ hasTeaser && (
22
+ <div class="bg-surface-raised mb-10 rounded-2xl border border-outline p-6">
23
+ <slot name="teaser" />
24
+ </div>
25
+ )
26
+ }
27
+ {
28
+ hasColumns && (
29
+ <div class="grid gap-8 sm:grid-cols-2 lg:grid-cols-4">
30
+ <slot name="columns" />
31
+ </div>
32
+ )
33
+ }
34
+ <div
35
+ class="text-on-surface-muted mt-10 flex flex-col items-start justify-between gap-4 border-t border-outline-faint pt-6 text-sm sm:flex-row sm:items-center"
36
+ >
37
+ <p>{tagline}</p>
38
+ {
39
+ hasBadges && (
40
+ <div class="flex flex-wrap items-center gap-3">
41
+ <slot name="badges" />
42
+ </div>
43
+ )
44
+ }
45
+ </div>
46
+ </div>
47
+ </footer>
@@ -0,0 +1,46 @@
1
+ ---
2
+ // SPDX-FileCopyrightText: PoppyCake, s.r.o.
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ import { Logo } from "@runwisp/ui";
5
+
6
+ interface Props {
7
+ homeHref?: string;
8
+ wordmark?: string;
9
+ class?: string;
10
+ }
11
+
12
+ const { homeHref = "/", wordmark = "RunWisp", class: className = "" } = Astro.props;
13
+
14
+ const hasNav = Astro.slots.has("nav");
15
+ const hasActions = Astro.slots.has("actions");
16
+ ---
17
+
18
+ <header class:list={["rw-bg-glass sticky top-0 z-40 border-b border-outline-faint", className]}>
19
+ <div class="mx-auto flex max-w-6xl items-center justify-between gap-6 px-6 py-3">
20
+ <a
21
+ href={homeHref}
22
+ class="text-on-surface flex items-center gap-2"
23
+ aria-label={`${wordmark} home`}
24
+ >
25
+ <Logo size="md" />
26
+ <span class="font-bold tracking-tight">{wordmark}</span>
27
+ </a>
28
+ {
29
+ hasNav && (
30
+ <nav
31
+ class="text-on-surface-muted hidden gap-6 text-sm font-medium sm:flex"
32
+ aria-label="Primary"
33
+ >
34
+ <slot name="nav" />
35
+ </nav>
36
+ )
37
+ }
38
+ {
39
+ hasActions && (
40
+ <div class="flex items-center gap-2">
41
+ <slot name="actions" />
42
+ </div>
43
+ )
44
+ }
45
+ </div>
46
+ </header>
@@ -0,0 +1,16 @@
1
+ // SPDX-FileCopyrightText: PoppyCake, s.r.o.
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ /**
5
+ * Svelte Action for portaling an element to the body
6
+ */
7
+ export function portal(node: HTMLElement) {
8
+ document.body.appendChild(node);
9
+ return {
10
+ destroy() {
11
+ if (node.parentNode) {
12
+ node.parentNode.removeChild(node);
13
+ }
14
+ },
15
+ };
16
+ }
@@ -0,0 +1,16 @@
1
+ <svg width="512" height="512" version="1.1" viewBox="0 0 5120 5120" xmlns="http://www.w3.org/2000/svg">
2
+ <defs>
3
+ <linearGradient id="b">
4
+ <stop stop-color="#526ee3" offset="0"/>
5
+ <stop stop-color="#009371" offset="1"/>
6
+ </linearGradient>
7
+ <radialGradient id="a" cx="2375.3" cy="3240.7" r="1333.9" gradientTransform="matrix(1.01 -.012494 .026846 2.1701 -110.74 -3341.2)" gradientUnits="userSpaceOnUse" href="#b"/>
8
+ </defs>
9
+ <g fill="currentColor">
10
+ <g transform="matrix(1.1828 0 0 1.1828 -308.66 -422.68)" fill="url(#a)" stroke-width=".69118">
11
+ <path d="m1337.7 3078.1c-148.18-155.91-250.14-363.35-245.9-581.62-4.9405-143.31 33.544-285.11 105.17-408.87 53.884-96.655 144.6-165.07 216.94-247.17 183.01-186.28 363.71-375.11 552.07-555.94 29.831 190.66 135.62 362.63 276.82 491.77 29.939 18.759-21.226 37.649-30.616 56.472-195.88 199.8-397.96 393.69-588.19 598.91-152.46 182.9-237.05 424.04-218.75 662.75 5.6183 42.874 1.3956 73.556-30.679 24.283-12.387-13.436-24.662-26.974-36.862-40.58z"/>
12
+ <path d="m2283.9 4565.5c51.838-97.456 67.044-158.97 68.426-264.03 0-96.074-14.515-161.74-55.985-239.84-34.559-66.353-81.559-117.5-336.6-371.16-237.76-236.38-268.18-273.01-310.34-371.16-33.868-79.485-46.309-134.09-51.147-224.63-6.9117-134.09 20.735-260.57 84.324-386.37 108.51-213.57 334.53-427.84 532.9-504.56 138.24-53.221 255.74-54.603 351.81-4.8382l27.647 14.515-26.265 5.5294c-76.721 16.588-123.72 80.176-111.97 152.06 5.5294 33.176 40.088 79.485 72.574 96.074 69.809 37.324 169.34-8.9853 184.54-85.706 5.5294-26.265 13.132-16.588 25.574 33.176 12.441 45.618 13.824 123.72 4.1471 165.88-3.4559 15.206-4.8383 28.338-4.1471 29.721 1.3824 0.6912 17.279-13.824 35.941-33.176 116.12-120.96 142.38-281.31 70.5-428.53-18.662-39.397-55.294-79.485-305.5-331.76-246.75-249.51-288.22-293.75-315.87-342.13-100.22-172.79-121.65-355.26-63.588-539.12 46.309-145.84 134.09-274.4 273.71-398.81 58.75-51.838 163.12-129.94 174.18-129.94 2.0736 0-2.0735 8.9853-10.368 20.735-27.647 38.706-69.118 136.16-83.632 197.68-31.103 127.18-16.588 248.13 43.544 364.94 26.956 52.53 46.309 73.265 296.51 325.54 283.38 285.46 311.03 318.63 351.12 419.54 40.088 101.6 45.618 130.63 44.926 257.81 0 106.44-1.3824 124.41-18.662 186.62-24.191 89.162-87.779 217.72-147.91 297.21-94 125.79-230.85 245.37-347.66 304.12-95.382 47.691-163.12 66.353-259.19 70.5-76.721 3.4559-87.088 2.0735-137.54-14.515-64.971-22.118-98.147-43.544-151.37-99.529-66.353-69.809-92.618-145.84-85.706-248.82 2.0735-31.794 0.6911-56.676-2.0736-55.294-13.824 5.5294-71.191 80.868-93.309 123.72-59.441 113.35-56.676 246.06 7.603 358.03 11.059 17.971 135.47 149.99 293.06 308.26 150.68 152.06 283.38 290.29 295.13 307.57 86.397 127.87 129.25 300.66 112.66 449.96-10.368 92.618-29.721 157.59-72.574 244.68-66.353 134.78-161.74 243.29-314.49 357.34-40.088 29.721-74.647 53.912-77.412 53.912s11.75-31.794 32.485-71.191z"/>
13
+ <path d="m2881.7 3745.7c-31.13-173.6-122.18-331.84-246.22-455.86-14.352-19.305-55.137-38.918-18.602-57.632 207.7-210.04 420.06-415.65 622.16-631.1 146.07-182.43 225.82-418.38 206.48-652.47-4.5024-33.687-4.181-60.898 26.761-25.766 148.94 150.92 277.41 342.97 283.4 561.68 11.697 142.68-4.4537 290.19-73.137 417.9-34.008 81.467-90.87 148.51-154.3 208.53-213.07 217.42-425.06 436.12-643.78 647.84l-1.9007-3.7151z"/>
14
+ </g>
15
+ </g>
16
+ </svg>
@@ -0,0 +1,20 @@
1
+ <!-- SPDX-FileCopyrightText: PoppyCake, s.r.o. -->
2
+ <!-- SPDX-License-Identifier: Apache-2.0 -->
3
+
4
+ <script lang="ts">
5
+ import type { Snippet } from "svelte";
6
+
7
+ interface Props {
8
+ type?: "single" | "multiple";
9
+ children?: Snippet;
10
+ class?: string;
11
+ }
12
+
13
+ let { type = "multiple", children, class: className = "" }: Props = $props();
14
+ </script>
15
+
16
+ <div class="divide-y divide-outline {className}" role="presentation" data-accordion-type={type}>
17
+ {#if children}
18
+ {@render children()}
19
+ {/if}
20
+ </div>