spoko-design-system 0.0.1 → 0.0.2

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 (99) hide show
  1. package/.astro/icon.d.ts +2199 -2192
  2. package/.github/workflows/deploy.yml +39 -39
  3. package/.stackblitzrc +5 -5
  4. package/.vscode/extensions.json +4 -4
  5. package/.vscode/launch.json +11 -11
  6. package/LICENSE +21 -21
  7. package/Layout/Header.astro +111 -89
  8. package/README.md +69 -69
  9. package/astro-i18next.config.mjs +17 -17
  10. package/astro-i18next.config.ts +10 -10
  11. package/astro.config.mjs +45 -42
  12. package/index.ts +6 -6
  13. package/package.json +75 -71
  14. package/public/astro-design-system-logo.svg +10 -10
  15. package/public/fonts/lg.svg +53 -53
  16. package/public/fonts/vwhead-bold-demo.html +549 -549
  17. package/public/fonts/vwhead-regular-demo.html +549 -549
  18. package/public/fonts/vwtext-bold-demo.html +549 -549
  19. package/public/fonts/vwtext-regular-demo.html +549 -549
  20. package/public/github.svg +3 -3
  21. package/public/grid_dot.svg +4 -4
  22. package/public/linkedin.svg +44 -44
  23. package/public/locales/en/translation.json +5 -5
  24. package/public/locales/pl/translation.json +5 -5
  25. package/public/make-scrollable-code-focusable.js +3 -3
  26. package/public/polo.blue.svg +29 -0
  27. package/public/spoko.space.svg +71 -0
  28. package/public/twitter.svg +46 -46
  29. package/sandbox.config.json +11 -11
  30. package/src/MyComponent.astro +8 -8
  31. package/src/components/Badge.vue +19 -19
  32. package/src/components/Badges.vue +24 -23
  33. package/src/components/Breadcrumbs.vue +108 -111
  34. package/src/components/Button.vue +28 -0
  35. package/src/components/CategoryLink.astro +18 -0
  36. package/src/components/Copyright.astro +11 -11
  37. package/src/components/Date.astro +7 -0
  38. package/src/components/FuckRussia.vue +65 -65
  39. package/src/components/HandDrive.astro +30 -30
  40. package/src/components/HeadCommon.astro +40 -40
  41. package/src/components/HeadSEO.astro +41 -41
  42. package/src/components/Header/AstroLogo.astro +7 -27
  43. package/src/components/Header/Header.astro +44 -48
  44. package/src/components/Header/SkipToContent.astro +1 -1
  45. package/src/components/Headline.vue +28 -0
  46. package/src/components/Jumbatron.vue +31 -31
  47. package/src/components/LeftSidebar.astro +44 -44
  48. package/src/components/MainColors.vue +29 -29
  49. package/src/components/MainInput.vue +18 -18
  50. package/src/components/MainTable.vue +40 -45
  51. package/src/components/Modal.astro +30 -0
  52. package/src/components/PageContent.astro +14 -14
  53. package/src/components/PostHeader.astro +104 -0
  54. package/src/components/RightSidebar.astro +15 -11
  55. package/src/components/SlimBanner.vue +59 -59
  56. package/src/components/TableOfContents.astro +11 -11
  57. package/src/components/Translations.vue +27 -0
  58. package/src/components/flags/FlagPL.vue +2 -2
  59. package/src/components/flags/FlagUA.vue +2 -2
  60. package/src/components/layout/Header.astro +50 -69
  61. package/src/config.ts +47 -42
  62. package/src/design.config.ts +73 -92
  63. package/src/env.d.ts +1 -1
  64. package/src/flag-poland.svg +1 -0
  65. package/src/flag-uk.svg +1 -0
  66. package/src/layouts/Layout.astro +51 -0
  67. package/src/layouts/MainLayout.astro +68 -50
  68. package/src/pages/components/badges.mdx +37 -35
  69. package/src/pages/components/breadcrumbs.mdx +100 -103
  70. package/src/pages/components/buttons.mdx +62 -60
  71. package/src/pages/components/copyright.mdx +41 -24
  72. package/src/pages/components/flags.mdx +40 -26
  73. package/src/pages/components/fuck-russia.mdx +39 -16
  74. package/src/pages/components/hand-drive.mdx +33 -27
  75. package/src/pages/components/headline.mdx +129 -0
  76. package/src/pages/components/icons.astro +52 -45
  77. package/src/pages/components/input.mdx +45 -14
  78. package/src/pages/components/jumbatron.mdx +48 -48
  79. package/src/pages/components/modal.mdx +58 -0
  80. package/src/pages/components/post-header.mdx +36 -0
  81. package/src/pages/components/slimbanner.mdx +29 -27
  82. package/src/pages/components/table.mdx +20 -20
  83. package/src/pages/core/colors.mdx +8 -8
  84. package/src/pages/core/introduction.mdx +74 -68
  85. package/src/pages/core/shadows.astro +20 -20
  86. package/src/pages/core/typography.astro +46 -46
  87. package/src/pages/index.astro +67 -52
  88. package/src/pages/patterns/introduction.mdx +60 -61
  89. package/src/styles/_variables.scss +75 -75
  90. package/src/styles/base/_base.scss +158 -158
  91. package/src/styles/base/_typography.scss +147 -147
  92. package/src/styles/content.scss +51 -72
  93. package/src/styles/main.scss +22 -22
  94. package/tailwind.config.cjs +8 -8
  95. package/tsconfig.json +11 -11
  96. package/uno.config.ts +227 -227
  97. package/src/components/MainButton.vue +0 -26
  98. package/src/components/MainStatusPill.vue +0 -32
  99. package/src/pages/components/status-pill.mdx +0 -22
@@ -1,41 +1,41 @@
1
- ---
2
- import { SITE, OPEN_GRAPH } from '../config';
3
- export interface Props {
4
- content: any;
5
- site: any;
6
- canonicalURL: URL | string;
7
- }
8
- const { content = {}, canonicalURL } = Astro.props;
9
- const formattedContentTitle = content.title ? `${content.title} 🚀 ${SITE.title}` : SITE.title;
10
- // const imageSrc = content?.image?.src ?? OPEN_GRAPH.image.src;
11
- // const canonicalImageSrc = new URL(imageSrc, Astro.site);
12
- const imageAlt = content?.image?.alt ?? OPEN_GRAPH.image.alt;
13
- ---
14
-
15
- <!-- Page Metadata -->
16
- <link rel="canonical" href={canonicalURL} />
17
-
18
- <!-- OpenGraph Tags -->
19
- <meta property="og:title" content={formattedContentTitle} />
20
- <meta property="og:type" content="article" />
21
- <meta property="og:url" content={canonicalURL} />
22
- <meta property="og:locale" content={content.ogLocale ?? SITE.defaultLanguage} />
23
- <!-- <meta property="og:image" content={canonicalImageSrc} /> -->
24
- <meta property="og:image:alt" content={imageAlt} />
25
- <meta name="description" property="og:description" content={content.description ? content.description : SITE.description} />
26
- <meta property="og:site_name" content={SITE.title} />
27
-
28
- <!-- Twitter Tags -->
29
- <meta name="twitter:card" content="summary_large_image" />
30
- <meta name="twitter:site" content={OPEN_GRAPH.twitter} />
31
- <meta name="twitter:title" content={formattedContentTitle} />
32
- <meta name="twitter:description" content={content.description ? content.description : SITE.description} />
33
- <!-- <meta name="twitter:image" content={canonicalImageSrc} /> -->
34
- <meta name="twitter:image:alt" content={imageAlt} />
35
-
36
- <!--
37
- TODO: Add json+ld data, maybe https://schema.org/APIReference makes sense?
38
- Docs: https://developers.google.com/search/docs/advanced/structured-data/intro-structured-data
39
- https://www.npmjs.com/package/schema-dts seems like a great resource for implementing this.
40
- Even better, there's a React component that integrates with `schema-dts`: https://github.com/google/react-schemaorg
41
- -->
1
+ ---
2
+ import { SITE, OPEN_GRAPH } from '../config';
3
+ export interface Props {
4
+ content: any;
5
+ site: any;
6
+ canonicalURL: URL | string;
7
+ }
8
+ const { content = {}, canonicalURL } = Astro.props;
9
+ const formattedContentTitle = content.title ? `${content.title} 🚀 ${SITE.title}` : SITE.title;
10
+ // const imageSrc = content?.image?.src ?? OPEN_GRAPH.image.src;
11
+ // const canonicalImageSrc = new URL(imageSrc, Astro.site);
12
+ const imageAlt = content?.image?.alt ?? OPEN_GRAPH.image.alt;
13
+ ---
14
+
15
+ <!-- Page Metadata -->
16
+ <link rel="canonical" href={canonicalURL} />
17
+
18
+ <!-- OpenGraph Tags -->
19
+ <meta property="og:title" content={formattedContentTitle} />
20
+ <meta property="og:type" content="article" />
21
+ <meta property="og:url" content={canonicalURL} />
22
+ <meta property="og:locale" content={content.ogLocale ?? SITE.defaultLanguage} />
23
+ <!-- <meta property="og:image" content={canonicalImageSrc} /> -->
24
+ <meta property="og:image:alt" content={imageAlt} />
25
+ <meta name="description" property="og:description" content={content.description ? content.description : SITE.description} />
26
+ <meta property="og:site_name" content={SITE.title} />
27
+
28
+ <!-- Twitter Tags -->
29
+ <meta name="twitter:card" content="summary_large_image" />
30
+ <meta name="twitter:site" content={OPEN_GRAPH.twitter} />
31
+ <meta name="twitter:title" content={formattedContentTitle} />
32
+ <meta name="twitter:description" content={content.description ? content.description : SITE.description} />
33
+ <!-- <meta name="twitter:image" content={canonicalImageSrc} /> -->
34
+ <meta name="twitter:image:alt" content={imageAlt} />
35
+
36
+ <!--
37
+ TODO: Add json+ld data, maybe https://schema.org/APIReference makes sense?
38
+ Docs: https://developers.google.com/search/docs/advanced/structured-data/intro-structured-data
39
+ https://www.npmjs.com/package/schema-dts seems like a great resource for implementing this.
40
+ Even better, there's a React component that integrates with `schema-dts`: https://github.com/google/react-schemaorg
41
+ -->
@@ -1,27 +1,7 @@
1
- ---
2
- const { size } = Astro.props;
3
- ---
4
-
5
- <svg class="logo" width={size} height={size} viewBox="0 0 256 256" fill="none" xmlns="http://www.w3.org/2000/svg">
6
- <style>
7
- #flame {
8
- fill: var(--theme-text-accent);
9
- }
10
- #a {
11
- fill: var(--theme-text-accent);
12
- }
13
- </style>
14
- <title>Logo</title>
15
- <path
16
- id="a"
17
- fill-rule="evenodd"
18
- clip-rule="evenodd"
19
- d="M163.008 18.929c1.944 2.413 2.935 5.67 4.917 12.181l43.309 142.27a180.277 180.277 0 00-51.778-17.53l-28.198-95.29a3.67 3.67 0 00-7.042.01l-27.857 95.232a180.225 180.225 0 00-52.01 17.557l43.52-142.281c1.99-6.502 2.983-9.752 4.927-12.16a15.999 15.999 0 016.484-4.798c2.872-1.154 6.271-1.154 13.07-1.154h31.085c6.807 0 10.211 0 13.086 1.157a16.004 16.004 0 016.487 4.806z"
20
- ></path>
21
- <path
22
- id="flame"
23
- fill-rule="evenodd"
24
- clip-rule="evenodd"
25
- d="M168.19 180.151c-7.139 6.105-21.39 10.268-37.804 10.268-20.147 0-37.033-6.272-41.513-14.707-1.602 4.835-1.961 10.367-1.961 13.902 0 0-1.056 17.355 11.015 29.426 0-6.268 5.081-11.349 11.349-11.349 10.743 0 10.731 9.373 10.721 16.977v.679c0 11.542 7.054 21.436 17.086 25.606a23.27 23.27 0 01-2.339-10.2c0-11.008 6.463-15.107 13.974-19.87 5.976-3.79 12.616-8.001 17.192-16.449a31.024 31.024 0 003.743-14.82c0-3.299-.513-6.479-1.463-9.463z"
26
- ></path>
27
- </svg>
1
+ ---
2
+ import { Icon } from "astro-icon/components";
3
+
4
+ const { size } = Astro.props;
5
+ ---
6
+
7
+ <Icon name="noto-v1:letter-s" />
@@ -1,48 +1,44 @@
1
- ---
2
- import { SITE } from '../../config';
3
- import SkipToContent from './SkipToContent.astro';
4
-
5
- const { currentPage } = Astro.props;
6
- ---
7
-
8
- <header class="p-3 bg-slate-100 bg-opacity-80 backdrop-blur-md border-b text-slate-900">
9
- <SkipToContent />
10
- <nav title="Top Navigation" class="max-w-7xl mx-auto flex justify-between items-center px-4">
11
- <div>
12
- <a class="text-lg font-medium" href="/">
13
- <h1>
14
- {SITE.title ?? "Documentation"}
15
- </h1>
16
- </a>
17
- </div>
18
- <div class="flex gap-2">
19
-
20
- <!-- <button onclick="toggleDarkMode()">theme</button> -->
21
- { SITE.twitter &&
22
- (<a title="Twitter" class="opacity-90 hover:opacity-100 hover:bg-blue-100 p-2 rounded-full transition-colors" href={'https://twitter.com/'+SITE.twitter}>
23
- <img class="h-7" src="/twitter.svg" alt="twitter logo">
24
- </a>)
25
- }
26
- {
27
- SITE.github &&
28
- (<a title="Github" class="opacity-80 hover:opacity-100 hover:bg-slate-200 p-2 rounded-full transition-colors" href={'https://github.com/'+SITE.github}>
29
- <img class="h-7" src="/github.svg" alt="github logo">
30
- </a>)
31
- }
32
- {
33
- SITE.linkedin &&
34
- (<a title="linkedin" class="opacity-80 hover:opacity-100 hover:bg-blue-50 p-2 rounded-full transition-colors" href={'https://linkedin.com/in/'+SITE.linkedin}>
35
- <img class="h-7" src="/linkedin.svg" alt="linkedin logo">
36
- </a>)
37
- }
38
- </div>
39
- </nav>
40
- </header>
41
-
42
- <script is:inline>
43
- // function toggleDarkMode() {
44
- // const body = document.body;
45
- // body.classList.toggle('dark');
46
- // console.log('dark mode toggled');
47
- // }
48
- </script>
1
+ ---
2
+ import { SITE } from "../../config";
3
+ import SkipToContent from "./SkipToContent.astro";
4
+ import { MenuIcon } from "astro-navbar";
5
+ ---
6
+
7
+ <header
8
+ class="p-3 bg-blue-600 bg-opacity-10 backdrop-blur-md border-b text-slate-900"
9
+ >
10
+ <SkipToContent />
11
+ <nav
12
+ title="Top Navigation"
13
+ class="mx-auto flex justify-between items-center px-4"
14
+ >
15
+ <div class="flex flex-nowrap">
16
+ <MenuIcon class="w-4 h-4 text-gray-800 sm:hidden mr-4" />
17
+ <a class="text-2xl font-medium block font-textbold" href="/"> SDS</a>
18
+ </div>
19
+ <div class="flex gap-2">
20
+ {
21
+ SITE.github && (
22
+ <a
23
+ title="Github"
24
+ class="opacity-80 hover:opacity-100 hover:bg-slate-200 p-2 rounded-full transition-colors"
25
+ href={"https://github.com/" + SITE.github}
26
+ >
27
+ <img class="h-7" src="/github.svg" alt="github logo" />
28
+ </a>
29
+ )
30
+ }
31
+ {
32
+ SITE.linkedin && (
33
+ <a
34
+ title="linkedin"
35
+ class="opacity-80 hover:opacity-100 hover:bg-blue-50 p-2 rounded-full transition-colors"
36
+ href={"https://linkedin.com/in/" + SITE.linkedin}
37
+ >
38
+ <img class="h-7" src="/linkedin.svg" alt="linkedin logo" />
39
+ </a>
40
+ )
41
+ }
42
+ </div>
43
+ </nav>
44
+ </header>
@@ -1 +1 @@
1
- <a href="#article" class="sr-only focus:not-sr-only skiplink"><span>Skip to Content</span></a>
1
+ <a href="#article" class="sr-only focus:not-sr-only skiplink"><span>Skip to Content</span></a>
@@ -0,0 +1,28 @@
1
+ <script setup lang="ts">
2
+ import type { PropType } from 'vue'
3
+
4
+
5
+ const props = defineProps({
6
+ as: {
7
+ type: String as PropType<'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'div' | 'span'>,
8
+ default: null,
9
+ required: true,
10
+ },
11
+ textSize: {
12
+ type: String as PropType<'xs' | 'sm' | 'base' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | '7xl' | '8xl' | '9xl'>,
13
+ required: false,
14
+ default: null
15
+ }
16
+ })
17
+
18
+ </script>
19
+
20
+ <template>
21
+ <component
22
+ :is="props.as" class="mb-2.5 flex sm:block md:flex items-center leading-none" :class="props.textSize ? `text-${props.textSize}` : 'text-xl'"
23
+ >
24
+ <!-- default -->
25
+ <slot />
26
+
27
+ </component>
28
+ </template>
@@ -1,31 +1,31 @@
1
- <template>
2
- <div class="relative bg-vw md:min-h-md">
3
- <div class="max-w-7xl mx-auto">
4
- <div
5
- class=" pb-8 sm:pb-16 md:pb-20 lg:w-full lg:pb-28 xl:pb-32"
6
- >
7
- <header
8
- class="mx-auto max-w-7xl px-4 sm:pt-12 sm:px-6 md:pt-16 lg:pt-20 lg:px-8 xl:pt-28"
9
- >
10
- <div class="text-center">
11
- <h1
12
- class="text-2xl pt-6 sm:pt-0 sm:text-5xl md:text-6xl tracking-tight font-headlight text-white"
13
- >
14
- <slot name="intro" />
15
- <!-- <span v-html="t('home.intro')"></span> -->
16
- <!-- <small class="block text-2xl">aaa</small> -->
17
- </h1>
18
- <slot name="subtitle" />
19
- <div
20
- class="mt-5 sm:mt-8 sm:flex sm:justify-center"
21
- >
22
- <div>
23
- <slot name="cta" />
24
- </div>
25
- </div>
26
- </div>
27
- </header>
28
- </div>
29
- </div>
30
- </div>
31
- </template>
1
+ <template>
2
+ <div class="relative bg-vw md:min-h-md">
3
+ <div class="max-w-7xl mx-auto">
4
+ <div class=" pb-8 sm:pb-16 md:pb-20 lg:w-full lg:pb-28 xl:pb-32">
5
+ <header class="mx-auto max-w-7xl px-4 sm:pt-12 sm:px-6 md:pt-16 lg:pt-20 lg:px-8 xl:pt-28">
6
+ <div class="text-center">
7
+ <h1 class="text-2xl pt-6 sm:pt-0 sm:text-5xl md:text-6xl tracking-tight font-headlight text-white">
8
+ <slot name="intro" />
9
+ <!-- <span v-html="t('home.intro')"></span> -->
10
+ <!-- <small class="block text-2xl">aaa</small> -->
11
+ </h1>
12
+ <slot name="subtitle" />
13
+ <div class="mt-5 sm:mt-8 sm:flex sm:justify-center">
14
+ <div>
15
+ <slot name="cta" />
16
+ </div>
17
+ </div>
18
+ </div>
19
+ </header>
20
+ </div>
21
+ </div>
22
+ </div>
23
+ </template>
24
+ <style lang="scss">
25
+ .bg-vw {
26
+ background: radial-gradient(
27
+ circle at 50% 85%,
28
+ #00437A 0%,
29
+ #001E50 100%
30
+ )}
31
+ </style>
@@ -1,44 +1,44 @@
1
- ---
2
- import { SIDEBAR } from '../config';
3
- const { currentPage } = Astro.props;
4
- const currentPageMatch = currentPage.slice(1);
5
-
6
- const isCurrentPage = (item) => {
7
- if (item.link) {
8
- return item.link.includes(currentPageMatch);
9
- }
10
- return false;
11
- };
12
-
13
- const getLinkClasses = (link) => {
14
- const baseClasses = "block py-2 px-6 my-1 transition-colors border-l hover:border-slate-400 text-slate-500 hover:text-slate-900"
15
-
16
- if (isCurrentPage(link)) {
17
- return baseClasses + " border-slate-500 text-slate-900";
18
- } else {
19
- return baseClasses;
20
- }
21
- }
22
- ---
23
- <aside title="Site Navigation">
24
- <!-- <Debug content={navigation} /> -->
25
- <nav aria-labelledby="grid-left" class="w-64 p-4 border-r">
26
- <ul>
27
- {SIDEBAR.map(item => (item.header ?
28
- <h2 class="mt-4 font-semibold text-slate-700">{item.text}</h2> :
29
- <li class={getLinkClasses(item)}>
30
- <a href={item.link}>{item.text}</a>
31
- </li>))}
32
- </ul>
33
- </nav>
34
- </aside>
35
-
36
- <script is:inline>
37
- window.addEventListener('DOMContentLoaded', (event) => {
38
- var target = document.querySelector('[aria-current="page"]');
39
- if (target && target.offsetTop > window.innerHeight - 100) {
40
- document.querySelector('.nav-groups').scrollTop = target.offsetTop;
41
- }
42
- });
43
- </script>
44
-
1
+ ---
2
+ import { SIDEBAR } from '../config';
3
+ const { currentPage } = Astro.props;
4
+ const currentPageMatch = currentPage.slice(1);
5
+
6
+ const isCurrentPage = (item) => {
7
+ if (item.link) {
8
+ return item.link.includes(currentPageMatch);
9
+ }
10
+ return false;
11
+ };
12
+
13
+ const getLinkClasses = (link) => {
14
+ const baseClasses = "block py-2 px-6 my-1 transition-colors border-l hover:border-slate-400 text-slate-500 hover:text-slate-900"
15
+
16
+ if (isCurrentPage(link)) {
17
+ return baseClasses + " border-slate-500 text-slate-900";
18
+ } else {
19
+ return baseClasses;
20
+ }
21
+ }
22
+ ---
23
+ <aside title="Site Navigation">
24
+ <!-- <Debug content={navigation} /> -->
25
+ <nav aria-labelledby="grid-left" class="w-64 px-4 border-r pb-3">
26
+ <ul>
27
+ {SIDEBAR.map(item => (item.header ?
28
+ <h2 class="mt-4 font-semibold text-slate-700">{item.text}</h2> :
29
+ <li class={getLinkClasses(item)}>
30
+ <a href={item.link}>{item.text}</a>
31
+ </li>))}
32
+ </ul>
33
+ </nav>
34
+ </aside>
35
+
36
+ <script is:inline>
37
+ window.addEventListener('DOMContentLoaded', (event) => {
38
+ var target = document.querySelector('[aria-current="page"]');
39
+ if (target && target.offsetTop > window.innerHeight - 100) {
40
+ document.querySelector('.nav-groups').scrollTop = target.offsetTop;
41
+ }
42
+ });
43
+ </script>
44
+
@@ -1,29 +1,29 @@
1
- <template>
2
- <div class="flex flex-col space-y-12">
3
- <div v-for="name in colorNames" :key="name">
4
- <h3 class="capitalize">{{ name }}</h3>
5
- <div class="grid grid-cols-5 md:grid-cols-10">
6
- <div v-for="color in COLORS[name]" :key="color">
7
- <div
8
- class="h-12 transition-all"
9
- :style="`background: ${color.value}`"
10
- ></div>
11
- <div
12
- class="text-sm flex flex-col text-center font-mono text-slate-500"
13
- >
14
- <span>{{ color.name }}</span>
15
- <span class="uppercase text-xs">{{ color.value }}</span>
16
- </div>
17
- </div>
18
- </div>
19
- </div>
20
- </div>
21
- </template>
22
-
23
- <script setup lang="ts">
24
- import { COLORS } from "../design.config";
25
-
26
- const colorNames = Object.keys(COLORS);
27
- </script>
28
-
29
- <style scoped></style>
1
+ <template>
2
+ <div class="flex flex-col space-y-12">
3
+ <div v-for="name in colorNames" :key="name">
4
+ <h3 class="capitalize">{{ name }}</h3>
5
+ <div class="grid grid-cols-3 md:grid-cols-9">
6
+ <div v-for="color in COLORS[name]" :key="color" class="mb-6">
7
+ <div
8
+ class="h-12 transition-all"
9
+ :style="`background: ${color.value}`"
10
+ ></div>
11
+ <div
12
+ class="text-sm flex flex-col text-center font-mono text-slate-500"
13
+ >
14
+ <span>{{ color.name }}</span>
15
+ <span class="uppercase text-xs">{{ color.value }}</span>
16
+ </div>
17
+ </div>
18
+ </div>
19
+ </div>
20
+ </div>
21
+ </template>
22
+
23
+ <script setup lang="ts">
24
+ import { COLORS } from "../design.config";
25
+
26
+ const colorNames = Object.keys(COLORS);
27
+ </script>
28
+
29
+ <style scoped></style>
@@ -1,18 +1,18 @@
1
- <template>
2
- <label class="group text-left w-full max-w-xs flex flex-col">
3
- <span
4
- class="group-hover:text-blue-600 ml-2 text-slate-600 text-sm group-focus-within:text-blue-600"
5
- >{{ label }}</span
6
- >
7
- <input
8
- class="group-hover:border-blue-500 border px-4 py-2 transition-colors rounded-md w-full focus:ring focus:outline-none focus:border-blue-600"
9
- type="text"
10
- />
11
- </label>
12
- </template>
13
-
14
- <script setup lang="ts">
15
- const props = defineProps<{
16
- label: string;
17
- }>();
18
- </script>
1
+ <template>
2
+ <label class="group text-left w-full max-w-xs flex flex-col">
3
+ <span
4
+ class="group-hover:text-blue-600 ml-2 text-slate-600 text-sm group-focus-within:text-blue-600"
5
+ >{{ label }}</span
6
+ >
7
+ <input
8
+ class="group-hover:border-blue-500 border px-4 py-2 transition-colors rounded-md w-full focus:ring focus:outline-none focus:border-blue-600"
9
+ type="text"
10
+ />
11
+ </label>
12
+ </template>
13
+
14
+ <script setup lang="ts">
15
+ const props = defineProps<{
16
+ label: string;
17
+ }>();
18
+ </script>
@@ -1,45 +1,40 @@
1
- <template>
2
- <table class="table-auto text-left border bg-white shadow-md">
3
- <thead class="bg-slate-800 text-white">
4
- <tr class="border">
5
- <th class="px-4 py-2">id</th>
6
- <th class="px-4 py-2">Name</th>
7
- <th class="px-4 py-2">Email</th>
8
- </tr>
9
- </thead>
10
- <tbody>
11
- <tr class="border" v-for="row in tableData" :key="row">
12
- <td class="px-4 py-2" v-for="key in Object.keys(row)" :key="key">
13
- {{ row[key] }}
14
- </td>
15
- </tr>
16
- </tbody>
17
- </table>
18
- </template>
19
-
20
- <script setup lang="ts">
21
- const tableData = [
22
- {
23
- id: 1,
24
- name: "John Doe",
25
- email: "john@email.com",
26
- },
27
- {
28
- id: 2,
29
- name: "Jane Doe",
30
- email: "jane@email.com",
31
- },
32
- {
33
- id: 3,
34
- name: "Jack Doe",
35
- email: "jack@email.com",
36
- },
37
- {
38
- id: 4,
39
- name: "Jill Doe",
40
- email: "jill@email.com",
41
- },
42
- ];
43
- </script>
44
-
45
- <style scoped></style>
1
+ <template>
2
+ <table class="table-auto text-left border bg-white shadow-md">
3
+ <thead class="bg-slate-800 text-white">
4
+ <tr class="border">
5
+ <th class="px-4 py-2">id</th>
6
+ <th class="px-4 py-2">Name</th>
7
+ <th class="px-4 py-2">Email</th>
8
+ </tr>
9
+ </thead>
10
+ <tbody>
11
+ <tr class="border" v-for="row in tableData" :key="row">
12
+ <td class="px-4 py-2" v-for="key in Object.keys(row)" :key="key">
13
+ {{ row[key] }}
14
+ </td>
15
+ </tr>
16
+ </tbody>
17
+ </table>
18
+ </template>
19
+
20
+ <script setup lang="ts">
21
+ const tableData = [
22
+ {
23
+ id: 1,
24
+ name: "Lorem Ipsum",
25
+ email: "lorem@email.com",
26
+ },
27
+ {
28
+ id: 2,
29
+ name: "Chuck Norris",
30
+ email: "ipsum@email.com",
31
+ },
32
+ {
33
+ id: 3,
34
+ name: "Ipsum Lorem",
35
+ email: "lorem@email.com",
36
+ }
37
+ ];
38
+ </script>
39
+
40
+ <style scoped></style>
@@ -0,0 +1,30 @@
1
+ ---
2
+ const {id, open} = Astro.props;
3
+ import Button from '../components/Button.vue'
4
+ ---
5
+ <style lang="scss">
6
+ dialog {
7
+ @apply fixed top-0 left-0 right-0 bottom-0;
8
+ // position: fixed;
9
+ // left: 50%;
10
+ // top: 50%;
11
+ // transform: translate(-50%, -50%);
12
+ &::backdrop {
13
+ @apply bg-gray-500/50 fixed;
14
+ top: 0px;
15
+ right: 0px;
16
+ bottom: 0px;
17
+ left: 0px;
18
+
19
+ }
20
+ }
21
+ </style>
22
+
23
+ <Button primary onclick={`window.${id}.showModal()`}>{open}</Button>
24
+
25
+ <dialog id={id} class="p-6">
26
+ <slot name="main" />
27
+ <form method="dialog">
28
+ <slot name="close" />
29
+ </form>
30
+ </dialog>
@@ -1,14 +1,14 @@
1
- ---
2
- const { content, githubEditUrl } = Astro.props;
3
- const title = content.title;
4
- // const headers = content.astro.headers;
5
- ---
6
-
7
- <article id="article" class="content">
8
- <section class="main-section">
9
- <nav class="block sm:hidden">
10
- </nav>
11
- <slot />
12
- </section>
13
- </article>
14
-
1
+ ---
2
+ const { content, githubEditUrl } = Astro.props;
3
+ const title = content.title;
4
+ // const headers = content.astro.headers;
5
+ ---
6
+
7
+ <article id="article" class="content">
8
+ <section class="main-section">
9
+ <nav class="block sm:hidden">
10
+ </nav>
11
+ <slot />
12
+ </section>
13
+ </article>
14
+