fulldev-ui 0.5.0-beta.8 → 0.6.0-beta.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.
- package/.env.example +3 -0
- package/.prettierrc.yaml +1 -0
- package/astro.config.ts +6 -32
- package/package.json +21 -30
- package/pnpm-lock.yaml +696 -2176
- package/public/favicon/android-chrome-192x192.png +0 -0
- package/public/favicon/android-chrome-512x512.png +0 -0
- package/public/favicon/apple-touch-icon.png +0 -0
- package/public/favicon/manifest.webmanifest +7 -3
- package/public/favicon/mstile-150x150.png +0 -0
- package/src/blocks/Banner.astro +6 -19
- package/src/blocks/Colleagues.astro +0 -1
- package/src/blocks/Contact.astro +75 -74
- package/src/blocks/Content.astro +124 -6
- package/src/blocks/Cta.astro +0 -2
- package/src/blocks/Excerpt.astro +0 -2
- package/src/blocks/Footer.astro +107 -3
- package/src/blocks/Hero.astro +238 -9
- package/src/blocks/Intro.astro +89 -11
- package/src/blocks/Prices.astro +1 -1
- package/src/blocks/Product.astro +51 -68
- package/src/blocks/Products.astro +114 -5
- package/src/blocks/Reviews.astro +0 -1
- package/src/blocks/_Contact.astro +112 -0
- package/src/components/Avatar.astro +28 -9
- package/src/components/Avatars.astro +36 -0
- package/src/components/Badge.astro +73 -26
- package/src/components/Badges.astro +16 -23
- package/src/components/Breadcrumb.astro +58 -0
- package/src/components/Button.astro +56 -112
- package/src/components/Buttons.astro +23 -13
- package/src/components/Card.astro +129 -115
- package/src/components/Cards.astro +33 -35
- package/src/components/Carousel.astro +106 -0
- package/src/components/Cart.astro +1 -1
- package/src/components/CartForm.astro +9 -9
- package/src/components/CartList.astro +11 -28
- package/src/components/CartSummary.astro +11 -13
- package/src/components/Channel.astro +40 -22
- package/src/components/Channels.astro +20 -6
- package/src/components/Checkbox.astro +52 -27
- package/src/components/Code.astro +52 -0
- package/src/components/Dialog.astro +2 -2
- package/src/components/Drawer.astro +34 -64
- package/src/components/Element.astro +16 -8
- package/src/components/Form.astro +14 -13
- package/src/components/Gallery.astro +172 -0
- package/src/components/Head.astro +52 -1
- package/src/components/Header.astro +73 -83
- package/src/components/Heading.astro +74 -30
- package/src/components/Icon.astro +25 -30
- package/src/components/Image.astro +23 -38
- package/src/components/Input.astro +59 -53
- package/src/components/Label.astro +20 -15
- package/src/components/Lead.astro +46 -0
- package/src/components/Link.astro +51 -26
- package/src/components/Links.astro +42 -0
- package/src/components/List.astro +41 -16
- package/src/components/LocaleSwitcher.astro +2 -2
- package/src/components/Logo.astro +45 -0
- package/src/components/Menu.astro +21 -17
- package/src/components/Paragraph.astro +38 -0
- package/src/components/Price.astro +1 -1
- package/src/components/Prose.astro +169 -0
- package/src/components/Rating.astro +50 -38
- package/src/components/Search.astro +1 -1
- package/src/components/Section.astro +196 -158
- package/src/components/Select.astro +44 -55
- package/src/components/Sidebar.astro +31 -38
- package/src/components/Social.astro +3 -8
- package/src/components/Socials.astro +9 -5
- package/src/components/Subheader.astro +59 -0
- package/src/components/Switch.astro +72 -29
- package/src/components/Table.astro +1 -1
- package/src/components/Tagline.astro +40 -12
- package/src/components/Text.astro +4 -4
- package/src/components/Textarea.astro +40 -50
- package/src/components/Themer.astro +76 -0
- package/src/components/Toc.astro +24 -32
- package/src/components/Writeup.astro +26 -8
- package/src/components/docs/PropsTable.astro +38 -264
- package/src/components/experimental/Window.astro +5 -57
- package/src/components/sections.astro +1 -1
- package/src/content/pages/blocks/_categories.mdx +1 -1
- package/src/content/pages/blocks/_footer.mdx +1 -1
- package/src/content/pages/blocks/_header.mdx +1 -3
- package/src/content/pages/blocks/_jobs.mdx +1 -1
- package/src/content/pages/blocks/_prices.mdx +1 -1
- package/src/content/pages/blocks/_product.mdx +1 -1
- package/src/content/pages/blocks/_products.mdx +1 -1
- package/src/content/pages/blocks/_stats.mdx +1 -1
- package/src/content/pages/blocks/banner.mdx +1 -1
- package/src/content/pages/blocks/colleagues.mdx +1 -2
- package/src/content/pages/blocks/contact.mdx +1 -1
- package/src/content/pages/blocks/content.mdx +1 -5
- package/src/content/pages/blocks/cta.mdx +1 -9
- package/src/content/pages/blocks/features.mdx +1 -4
- package/src/content/pages/blocks/hero.mdx +1 -4
- package/src/content/pages/blocks/intro.mdx +1 -4
- package/src/content/pages/blocks/posts.mdx +1 -1
- package/src/content/pages/blocks/reviews.mdx +1 -2
- package/src/content/pages/docs/_internationalization.mdx +55 -0
- package/src/content/pages/docs/_using-blocks.mdx +33 -0
- package/src/content/pages/docs/_using-presets.mdx +49 -0
- package/src/content/pages/docs/blocks.mdx +33 -0
- package/src/content/pages/docs/collections/images.mdx +100 -0
- package/src/content/pages/docs/collections/pages.mdx +119 -0
- package/src/content/pages/docs/collections/presets.mdx +60 -0
- package/src/content/pages/docs/collections.mdx +42 -0
- package/src/content/pages/{base/card.mdx → docs/components/_card.mdx} +1 -3
- package/src/content/pages/{base → docs/components}/_switch.mdx +2 -2
- package/src/content/pages/{typography → docs/components}/_tagline.mdx +2 -2
- package/src/content/pages/docs/components/_toggle.mdx +31 -0
- package/src/content/pages/docs/components/avatar.mdx +35 -0
- package/src/content/pages/{base → docs/components}/badge.mdx +27 -8
- package/src/content/pages/docs/components/badges.mdx +47 -0
- package/src/content/pages/{base → docs/components}/button.mdx +29 -10
- package/src/content/pages/docs/components/buttons.mdx +52 -0
- package/src/content/pages/docs/components/channel.mdx +92 -0
- package/src/content/pages/docs/components/channels.mdx +90 -0
- package/src/content/pages/{base → docs/components}/checkbox.mdx +10 -17
- package/src/content/pages/docs/components/code.mdx +46 -0
- package/src/content/pages/docs/components/heading.mdx +60 -0
- package/src/content/pages/docs/components/icon.mdx +49 -0
- package/src/content/pages/docs/components/image.mdx +26 -0
- package/src/content/pages/docs/components/input.mdx +41 -0
- package/src/content/pages/{typography → docs/components}/label.mdx +8 -4
- package/src/content/pages/docs/components/lead.mdx +51 -0
- package/src/content/pages/{typography → docs/components}/link.mdx +23 -8
- package/src/content/pages/docs/components/links.mdx +100 -0
- package/src/content/pages/docs/components/list.mdx +45 -0
- package/src/content/pages/docs/components/logo.mdx +37 -0
- package/src/content/pages/docs/components/menu.mdx +90 -0
- package/src/content/pages/docs/components/paragraph.mdx +51 -0
- package/src/content/pages/docs/components/prose.mdx +37 -0
- package/src/content/pages/docs/components/rating.mdx +77 -0
- package/src/content/pages/{base → docs/components}/section.mdx +1 -1
- package/src/content/pages/{base → docs/components}/select.mdx +0 -9
- package/src/content/pages/docs/components/social.mdx +95 -0
- package/src/content/pages/docs/components/socials.mdx +103 -0
- package/src/content/pages/docs/components/switch.mdx +35 -0
- package/src/content/pages/{base → docs/components}/table.mdx +0 -2
- package/src/content/pages/docs/components/tagline.mdx +47 -0
- package/src/content/pages/docs/components/textarea.mdx +35 -0
- package/src/content/pages/docs/components/themer.mdx +50 -0
- package/src/content/pages/docs/components.mdx +40 -0
- package/src/content/pages/docs/customization.mdx +151 -0
- package/src/content/pages/docs/frameworks.mdx +29 -0
- package/src/content/pages/docs/generating-pages.mdx +129 -0
- package/src/content/pages/docs/index.mdx +23 -0
- package/src/content/pages/docs/installation.mdx +50 -0
- package/src/content/pages/docs/layouts.mdx +33 -0
- package/src/content/pages/index.mdx +11 -9
- package/src/content/pages/showcase.mdx +4 -2
- package/src/content/presets/base.yml +80 -63
- package/src/content/presets/docs.yml +2 -2
- package/src/css/color.css +0 -10
- package/src/css/custom.css +10 -12
- package/src/css/size.css +2 -11
- package/src/css/theme.css +93 -0
- package/src/images/logo-1.svg +11 -0
- package/src/images/logo-2.svg +13 -0
- package/src/images/logo-basic.svg +10 -0
- package/src/images/logo-simple.svg +13 -0
- package/src/images/logo-thin.svg +15 -0
- package/src/images/logo.svg +14 -0
- package/src/images/logofat.svg +11 -0
- package/src/integration/index.ts +71 -144
- package/src/layouts/CategoryLayout.astro +135 -0
- package/src/layouts/Layout.astro +62 -117
- package/src/layouts/PageLayout.astro +26 -0
- package/src/layouts/PostLayout.astro +13 -8
- package/src/layouts/ProductLayout.astro +94 -10
- package/src/pages/[...page].astro +14 -22
- package/src/pages/test.astro +20 -0
- package/src/schemas/components/button.ts +21 -13
- package/src/schemas/components/card.ts +36 -18
- package/src/schemas/components/footer.ts +2 -10
- package/src/schemas/components/global.ts +16 -0
- package/src/schemas/components/header.ts +8 -0
- package/src/schemas/components/image.ts +8 -3
- package/src/schemas/components/link.ts +16 -0
- package/src/schemas/components/links.ts +4 -0
- package/src/schemas/components/menu.ts +2 -0
- package/src/schemas/components/sidebar.ts +2 -2
- package/src/schemas/components/subheader.ts +9 -0
- package/src/schemas/components/themer.ts +3 -0
- package/src/schemas/pageSchema.ts +14 -21
- package/src/utils/cart.ts +1 -10
- package/src/utils/getDeepReferenceChildren.ts +14 -0
- package/src/utils/getReferenceChildren.ts +1 -1
- package/src/utils/setTheme.ts +18 -0
- package/src/utils/slugify.ts +6 -0
- package/tailwind.config.ts +67 -0
- package/src/blocks/Article.astro +0 -40
- package/src/components/Footer.astro +0 -193
- package/src/components/ThemeSelect.astro +0 -41
- package/src/components/experimental/Form.astro +0 -53
- package/src/components/experimental/Gallery.astro +0 -104
- package/src/components/experimental/Logo.astro +0 -38
- package/src/components/experimental/Prose.astro +0 -192
- package/src/content/pages/base/icon.mdx +0 -55
- package/src/content/pages/base/image.mdx +0 -42
- package/src/content/pages/base/input.mdx +0 -56
- package/src/content/pages/base/rating.mdx +0 -55
- package/src/content/pages/base/textarea.mdx +0 -58
- package/src/content/pages/base/theme-select.mdx +0 -15
- package/src/content/pages/layouts/_layout.mdx +0 -14
- package/src/content/pages/layouts/docslayout.mdx +0 -14
- package/src/content/pages/overview/components.mdx +0 -75
- package/src/content/pages/overview/content-collections.mdx +0 -139
- package/src/content/pages/overview/frameworks.mdx +0 -198
- package/src/content/pages/overview/installation.mdx +0 -53
- package/src/content/pages/overview/introduction.mdx +0 -30
- package/src/content/pages/overview/theming.mdx +0 -69
- package/src/content/pages/schemas/page.mdx +0 -17
- package/src/content/pages/schemas/preset.mdx +0 -9
- package/src/content/pages/showcase/record.md +0 -3
- package/src/content/pages/typography/heading.mdx +0 -73
- package/src/content/pages/typography/list.mdx +0 -51
- package/src/content/pages/typography/text.mdx +0 -61
- package/src/content/presets/blocks.yml +0 -1
- package/src/css/space.css +0 -77
- package/src/css/styles.css +0 -0
- package/src/images/avatar-1.yml +0 -1
- package/src/integration/generate-colors.ts +0 -639
- package/src/integration/tailwind-plugin.ts +0 -80
- package/src/integration/unocss-preset.ts +0 -84
- package/src/layouts/BlockLayout.astro +0 -19
- package/src/layouts/ContactLayout.astro +0 -21
- package/src/layouts/DocsLayout.astro +0 -73
- package/src/layouts/OverviewLayout.astro +0 -42
- /package/src/content/pages/{base → docs/components}/_dialog.mdx +0 -0
- /package/src/content/pages/{base → docs/components}/_drawer.mdx +0 -0
- /package/src/content/pages/{base → docs/components}/_localeswitcher.mdx +0 -0
- /package/src/schemas/utils/{parents.ts → categories.ts} +0 -0
|
@@ -1,72 +1,116 @@
|
|
|
1
1
|
---
|
|
2
|
-
import type { HTMLAttributes } from 'astro/types'
|
|
2
|
+
import type { HTMLAttributes, HTMLTag } from 'astro/types'
|
|
3
3
|
import Element from 'fulldev-ui/components/Element.astro'
|
|
4
4
|
import type { GlobalProps } from 'fulldev-ui/types/global-props'
|
|
5
|
+
import { slugify } from 'fulldev-ui/utils/slugify'
|
|
5
6
|
|
|
6
|
-
interface Props
|
|
7
|
-
|
|
8
|
-
HTMLAttributes<'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'> {
|
|
7
|
+
interface Props extends GlobalProps, HTMLAttributes<'h2'> {
|
|
8
|
+
as?: HTMLTag
|
|
9
9
|
level?: 1 | 2 | 3 | 4 | 5 | 6 | undefined
|
|
10
10
|
text?: string | undefined
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
const {
|
|
14
|
-
contrast = true,
|
|
15
|
-
color = 'base',
|
|
16
|
-
level = 2,
|
|
17
14
|
text,
|
|
15
|
+
id = text ? slugify(text) : undefined,
|
|
16
|
+
size = 'md',
|
|
17
|
+
level = 2,
|
|
18
|
+
as = `h${level}`,
|
|
18
19
|
...rest
|
|
19
20
|
} = Astro.props
|
|
20
21
|
---
|
|
21
22
|
|
|
22
23
|
<Element
|
|
23
24
|
class:list="heading"
|
|
24
|
-
|
|
25
|
-
{
|
|
26
|
-
{color}
|
|
25
|
+
{id}
|
|
26
|
+
{as}
|
|
27
27
|
{level}
|
|
28
|
+
{size}
|
|
28
29
|
{...rest}
|
|
29
30
|
>
|
|
31
|
+
<Fragment set:html={text} />
|
|
30
32
|
<slot />
|
|
31
|
-
<Fragment set:text={text} />
|
|
32
33
|
</Element>
|
|
33
34
|
|
|
34
|
-
<style is:global
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
35
|
+
<style is:global>
|
|
36
|
+
.heading {
|
|
37
|
+
@apply scroll-mt-20 font-bold tracking-tight text-foreground;
|
|
38
|
+
|
|
39
|
+
&.size-sm {
|
|
40
|
+
&.level-1 {
|
|
41
|
+
@apply text-3xl;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&.level-2 {
|
|
45
|
+
@apply text-2xl;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&.level-3 {
|
|
49
|
+
@apply text-xl;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&.level-4 {
|
|
53
|
+
@apply text-lg;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&.level-5 {
|
|
57
|
+
@apply text-base;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&.level-6 {
|
|
61
|
+
@apply text-sm;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&.size-md {
|
|
66
|
+
&.level-1 {
|
|
67
|
+
@apply text-4xl;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&.level-2 {
|
|
71
|
+
@apply text-3xl;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&.level-3 {
|
|
75
|
+
@apply text-2xl;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&.level-4 {
|
|
79
|
+
@apply text-xl;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&.level-5 {
|
|
83
|
+
@apply text-lg;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&.level-6 {
|
|
87
|
+
@apply text-base;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
46
90
|
|
|
91
|
+
&.size-lg {
|
|
47
92
|
&.level-1 {
|
|
48
|
-
|
|
49
|
-
text-wrap: balance;
|
|
93
|
+
@apply text-5xl lg:text-6xl;
|
|
50
94
|
}
|
|
51
95
|
|
|
52
96
|
&.level-2 {
|
|
53
|
-
|
|
97
|
+
@apply text-4xl;
|
|
54
98
|
}
|
|
55
99
|
|
|
56
100
|
&.level-3 {
|
|
57
|
-
|
|
101
|
+
@apply text-3xl;
|
|
58
102
|
}
|
|
59
103
|
|
|
60
104
|
&.level-4 {
|
|
61
|
-
|
|
105
|
+
@apply text-2xl;
|
|
62
106
|
}
|
|
63
107
|
|
|
64
108
|
&.level-5 {
|
|
65
|
-
|
|
109
|
+
@apply text-xl;
|
|
66
110
|
}
|
|
67
111
|
|
|
68
112
|
&.level-6 {
|
|
69
|
-
|
|
113
|
+
@apply text-lg;
|
|
70
114
|
}
|
|
71
115
|
}
|
|
72
116
|
}
|
|
@@ -5,10 +5,10 @@ import Element from 'fulldev-ui/components/Element.astro'
|
|
|
5
5
|
import type { GlobalProps } from 'fulldev-ui/types/global-props'
|
|
6
6
|
|
|
7
7
|
interface Props extends GlobalProps, HTMLAttributes<'i'> {
|
|
8
|
-
name?:
|
|
8
|
+
name?: keyof typeof tablerIcons.icons | undefined
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
const { name, ...rest } = Astro.props
|
|
11
|
+
const { size = 'md', name, ...rest } = Astro.props
|
|
12
12
|
|
|
13
13
|
const trimmedName = name?.trim() as string | undefined
|
|
14
14
|
const icon = trimmedName
|
|
@@ -18,38 +18,33 @@ const icon = trimmedName
|
|
|
18
18
|
|
|
19
19
|
<Element
|
|
20
20
|
class:list="icon"
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
22
|
+
viewBox="0 0 24 24"
|
|
23
|
+
as="svg"
|
|
24
|
+
{size}
|
|
23
25
|
{...rest}
|
|
24
26
|
>
|
|
25
|
-
{
|
|
26
|
-
icon && (
|
|
27
|
-
<svg
|
|
28
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
29
|
-
viewBox="0 0 24 24"
|
|
30
|
-
set:html={icon}
|
|
31
|
-
/>
|
|
32
|
-
)
|
|
33
|
-
}
|
|
27
|
+
<Fragment set:html={icon} />
|
|
34
28
|
</Element>
|
|
35
29
|
|
|
36
|
-
<style is:global
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
30
|
+
<style is:global>
|
|
31
|
+
.icon {
|
|
32
|
+
@apply inline-flex h-[1em] w-[1em];
|
|
33
|
+
|
|
34
|
+
* {
|
|
35
|
+
stroke-width: 1.6;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&.size-sm {
|
|
39
|
+
@apply text-lg;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&.size-md {
|
|
43
|
+
@apply text-xl;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&.size-lg {
|
|
47
|
+
@apply text-2xl;
|
|
53
48
|
}
|
|
54
49
|
}
|
|
55
50
|
</style>
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
---
|
|
2
|
+
// @ts-nocheck
|
|
2
3
|
import type { ImageMetadata } from 'astro'
|
|
3
4
|
import type { HTMLAttributes } from 'astro/types'
|
|
4
5
|
import { Image as AstroImage } from 'astro:assets'
|
|
5
|
-
import type { CollectionEntry } from 'astro:content'
|
|
6
6
|
import { getEntry } from 'astro:content'
|
|
7
7
|
|
|
8
8
|
interface Props extends HTMLAttributes<'img'> {
|
|
9
|
-
|
|
9
|
+
size?: 'sm' | 'md' | 'lg' | undefined
|
|
10
|
+
id?: any
|
|
10
11
|
position?: 'background' | 'cover' | 'inset' | undefined
|
|
11
|
-
id?: CollectionEntry<'images'>['id'] | undefined
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
const { id } = Astro.props
|
|
@@ -20,10 +20,11 @@ const {
|
|
|
20
20
|
position,
|
|
21
21
|
src,
|
|
22
22
|
alt,
|
|
23
|
+
size,
|
|
23
24
|
...rest
|
|
24
25
|
} = {
|
|
25
|
-
...Astro.props,
|
|
26
26
|
...entry,
|
|
27
|
+
...Astro.props,
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
function getAltBySrc() {
|
|
@@ -39,55 +40,39 @@ const image = images[src as keyof typeof images]
|
|
|
39
40
|
---
|
|
40
41
|
|
|
41
42
|
{
|
|
42
|
-
image && (
|
|
43
|
+
(image || src) && (
|
|
43
44
|
<AstroImage
|
|
44
|
-
class:list={[
|
|
45
|
+
class:list={[
|
|
46
|
+
'image',
|
|
47
|
+
{
|
|
48
|
+
[`size-${size}`]: size,
|
|
49
|
+
[`position-${position}`]: position,
|
|
50
|
+
},
|
|
51
|
+
]}
|
|
45
52
|
alt={alt || getAltBySrc()}
|
|
46
53
|
src={image ? image() : src}
|
|
47
|
-
width={width}
|
|
48
|
-
height={height}
|
|
49
|
-
{...
|
|
54
|
+
width={width ? Number(width) : undefined}
|
|
55
|
+
height={height ? Number(height) : undefined}
|
|
56
|
+
{...rest}
|
|
50
57
|
/>
|
|
51
58
|
)
|
|
52
59
|
}
|
|
53
60
|
|
|
54
|
-
<style is:global
|
|
61
|
+
<style is:global>
|
|
55
62
|
@layer fulldev {
|
|
56
63
|
.image {
|
|
57
|
-
|
|
58
|
-
width: 100%;
|
|
59
|
-
height: auto;
|
|
64
|
+
@apply block;
|
|
60
65
|
|
|
61
|
-
&.position-
|
|
62
|
-
|
|
63
|
-
top: 0;
|
|
64
|
-
right: 0;
|
|
65
|
-
bottom: 0;
|
|
66
|
-
left: 0;
|
|
67
|
-
margin: 0 !important;
|
|
68
|
-
border-radius: 0;
|
|
69
|
-
width: 100%;
|
|
70
|
-
max-width: none;
|
|
71
|
-
height: 100%;
|
|
72
|
-
max-height: 100%;
|
|
73
|
-
object-fit: cover;
|
|
66
|
+
&.position-contain {
|
|
67
|
+
@apply h-auto w-full object-contain;
|
|
74
68
|
}
|
|
75
69
|
|
|
76
70
|
&.position-cover {
|
|
77
|
-
|
|
78
|
-
height: 100%;
|
|
79
|
-
object-fit: cover;
|
|
71
|
+
@apply h-full w-full object-cover;
|
|
80
72
|
}
|
|
81
73
|
|
|
82
|
-
&.position-
|
|
83
|
-
|
|
84
|
-
margin-right: calc(var(--inset-right) * -1);
|
|
85
|
-
margin-bottom: calc(var(--inset-bottom) * -1);
|
|
86
|
-
margin-left: calc(var(--inset-left) * -1);
|
|
87
|
-
width: calc(100% + var(--inset-left) + var(--inset-right));
|
|
88
|
-
max-width: none;
|
|
89
|
-
height: calc(100% + var(--inset-top) + var(--inset-bottom));
|
|
90
|
-
object-fit: cover;
|
|
74
|
+
&.position-background {
|
|
75
|
+
@apply absolute inset-0 h-full max-h-none w-full max-w-none object-cover opacity-30;
|
|
91
76
|
}
|
|
92
77
|
}
|
|
93
78
|
}
|
|
@@ -12,96 +12,102 @@ interface Props extends GlobalProps, HTMLAttributes<'input'> {
|
|
|
12
12
|
|
|
13
13
|
const {
|
|
14
14
|
label,
|
|
15
|
-
icon,
|
|
16
|
-
value,
|
|
17
|
-
disabled,
|
|
18
|
-
required,
|
|
19
15
|
placeholder,
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
name = label || placeholder,
|
|
17
|
+
id = name,
|
|
22
18
|
type = 'text',
|
|
19
|
+
size = 'md',
|
|
20
|
+
icon,
|
|
23
21
|
...rest
|
|
24
22
|
} = Astro.props
|
|
25
23
|
---
|
|
26
24
|
|
|
27
25
|
<Element
|
|
28
26
|
class:list="input"
|
|
29
|
-
|
|
27
|
+
as="label"
|
|
28
|
+
for={id}
|
|
29
|
+
{size}
|
|
30
30
|
>
|
|
31
31
|
<Label
|
|
32
32
|
for={name}
|
|
33
33
|
text={label}
|
|
34
|
+
{size}
|
|
34
35
|
/>
|
|
36
|
+
<Icon name={icon} />
|
|
35
37
|
<Element
|
|
38
|
+
class:list="input-input"
|
|
36
39
|
as="input"
|
|
37
40
|
if={name}
|
|
38
41
|
id={name}
|
|
39
42
|
{name}
|
|
40
43
|
{placeholder}
|
|
41
44
|
{type}
|
|
42
|
-
{
|
|
43
|
-
{disabled}
|
|
44
|
-
{required}
|
|
45
|
-
{readonly}
|
|
45
|
+
{...rest}
|
|
46
46
|
/>
|
|
47
|
-
<Icon name={icon} />
|
|
48
47
|
</Element>
|
|
49
48
|
|
|
50
|
-
<style is:global
|
|
49
|
+
<style is:global>
|
|
51
50
|
@layer fulldev {
|
|
52
51
|
.input {
|
|
53
|
-
|
|
54
|
-
position: relative;
|
|
55
|
-
flex-direction: column;
|
|
56
|
-
gap: var(--space-1);
|
|
57
|
-
width: 100%;
|
|
52
|
+
@apply relative flex flex-col gap-1.5;
|
|
58
53
|
|
|
59
54
|
.icon {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
55
|
+
@apply pointer-events-none absolute;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.input-input {
|
|
59
|
+
@apply flex w-full rounded-md border border-input bg-background text-sm ring-offset-background;
|
|
60
|
+
@apply file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground;
|
|
61
|
+
@apply focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2;
|
|
62
|
+
@apply disabled:pointer-events-none disabled:opacity-50;
|
|
63
|
+
@apply [&[readonly]]:pointer-events-none;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
border: 1px solid var(--color-6);
|
|
72
|
-
border-radius: var(--radius-1);
|
|
73
|
-
background-color: transparent;
|
|
74
|
-
padding: var(--space-4);
|
|
75
|
-
padding-right: calc(var(--text-2) + 2 * var(--space-4));
|
|
76
|
-
width: 100%;
|
|
77
|
-
min-width: var(--space-4);
|
|
78
|
-
height: calc(var(--text-2) + 2 * var(--space-4));
|
|
79
|
-
color: var(--text);
|
|
80
|
-
font-size: var(--text-2);
|
|
81
|
-
line-height: 1.25;
|
|
82
|
-
|
|
83
|
-
&::placeholder {
|
|
84
|
-
color: var(--color-11);
|
|
66
|
+
&.size-sm {
|
|
67
|
+
@apply gap-1;
|
|
68
|
+
|
|
69
|
+
.input-input {
|
|
70
|
+
@apply h-9 px-2.5 py-1.5 text-xs;
|
|
85
71
|
}
|
|
86
72
|
|
|
87
|
-
|
|
88
|
-
|
|
73
|
+
.icon {
|
|
74
|
+
@apply bottom-2 right-2;
|
|
89
75
|
}
|
|
90
76
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
77
|
+
.icon + .input-input {
|
|
78
|
+
@apply pr-9;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&.size-md {
|
|
83
|
+
@apply gap-1.5;
|
|
84
|
+
|
|
85
|
+
.input-input {
|
|
86
|
+
@apply h-10 px-3 py-2 text-sm;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.icon {
|
|
90
|
+
@apply bottom-2.5 right-2.5;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.icon + .input-input {
|
|
94
|
+
@apply pr-10;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&.size-lg {
|
|
99
|
+
@apply gap-2;
|
|
100
|
+
|
|
101
|
+
.input-input {
|
|
102
|
+
@apply h-12 px-3.5 py-2.5 text-base;
|
|
95
103
|
}
|
|
96
104
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
cursor: not-allowed;
|
|
100
|
-
pointer-events: none;
|
|
105
|
+
.icon {
|
|
106
|
+
@apply bottom-3.5 right-3.5;
|
|
101
107
|
}
|
|
102
108
|
|
|
103
|
-
|
|
104
|
-
|
|
109
|
+
.icon + .input-input {
|
|
110
|
+
@apply pr-11;
|
|
105
111
|
}
|
|
106
112
|
}
|
|
107
113
|
}
|
|
@@ -1,37 +1,42 @@
|
|
|
1
1
|
---
|
|
2
|
-
import type { HTMLAttributes } from 'astro/types'
|
|
2
|
+
import type { HTMLAttributes, HTMLTag } from 'astro/types'
|
|
3
3
|
import Element from 'fulldev-ui/components/Element.astro'
|
|
4
4
|
import type { GlobalProps } from 'fulldev-ui/types/global-props'
|
|
5
5
|
|
|
6
6
|
interface Props extends GlobalProps, HTMLAttributes<'label'> {
|
|
7
|
-
|
|
8
|
-
color?: 'base' | 'brand' | undefined
|
|
9
|
-
contrast?: boolean | undefined
|
|
7
|
+
as?: HTMLTag
|
|
10
8
|
text?: string | undefined
|
|
11
9
|
}
|
|
12
10
|
|
|
13
|
-
const { text, ...rest } = Astro.props
|
|
11
|
+
const { as = 'label', size = 'md', text, ...rest } = Astro.props
|
|
14
12
|
---
|
|
15
13
|
|
|
16
14
|
<Element
|
|
17
15
|
class:list="label"
|
|
18
|
-
as
|
|
16
|
+
{as}
|
|
17
|
+
{size}
|
|
19
18
|
{...rest}
|
|
20
19
|
>
|
|
20
|
+
<Fragment set:html={text} />
|
|
21
21
|
<slot />
|
|
22
|
-
<Fragment set:text={text} />
|
|
23
22
|
</Element>
|
|
24
23
|
|
|
25
|
-
<style is:global
|
|
24
|
+
<style is:global>
|
|
26
25
|
@layer fulldev {
|
|
27
26
|
.label {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
27
|
+
@apply font-medium leading-none;
|
|
28
|
+
|
|
29
|
+
&.size-sm {
|
|
30
|
+
@apply text-xs;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&.size-md {
|
|
34
|
+
@apply text-sm;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&.size-lg {
|
|
38
|
+
@apply text-base;
|
|
39
|
+
}
|
|
35
40
|
}
|
|
36
41
|
}
|
|
37
42
|
</style>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { HTMLAttributes, HTMLTag } from 'astro/types'
|
|
3
|
+
import Element from 'fulldev-ui/components/Element.astro'
|
|
4
|
+
import type { GlobalProps } from 'fulldev-ui/types/global-props'
|
|
5
|
+
|
|
6
|
+
interface Props extends GlobalProps, HTMLAttributes<'p'> {
|
|
7
|
+
as?: HTMLTag
|
|
8
|
+
text?: string | undefined
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const { as = 'p', text, ...rest } = Astro.props
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
<Element
|
|
15
|
+
class:list="lead"
|
|
16
|
+
{as}
|
|
17
|
+
{...rest}
|
|
18
|
+
>
|
|
19
|
+
<slot />
|
|
20
|
+
<Fragment set:html={text} />
|
|
21
|
+
</Element>
|
|
22
|
+
|
|
23
|
+
<style is:global>
|
|
24
|
+
@layer fulldev {
|
|
25
|
+
.lead,
|
|
26
|
+
.prose-content h1 + p {
|
|
27
|
+
@apply text-muted-foreground;
|
|
28
|
+
|
|
29
|
+
&.size-sm {
|
|
30
|
+
@apply text-sm;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&.size-md {
|
|
34
|
+
@apply text-base;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&.size-lg {
|
|
38
|
+
@apply text-lg;
|
|
39
|
+
|
|
40
|
+
&:is(h1 + p) {
|
|
41
|
+
@apply text-xl;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
</style>
|
|
@@ -1,52 +1,77 @@
|
|
|
1
1
|
---
|
|
2
|
-
import type { HTMLAttributes } from 'astro/types'
|
|
2
|
+
import type { ComponentProps, HTMLAttributes, HTMLTag } from 'astro/types'
|
|
3
3
|
import type { CollectionEntry } from 'astro:content'
|
|
4
4
|
import { getEntry } from 'astro:content'
|
|
5
5
|
import Element from 'fulldev-ui/components/Element.astro'
|
|
6
|
+
import Icon from 'fulldev-ui/components/Icon.astro'
|
|
6
7
|
import type { GlobalProps } from 'fulldev-ui/types/global-props'
|
|
7
8
|
|
|
8
9
|
interface Props extends GlobalProps, HTMLAttributes<'a'> {
|
|
10
|
+
as?: HTMLTag
|
|
11
|
+
href?: string | null | undefined
|
|
9
12
|
slug?: CollectionEntry<'pages'>['slug'] | undefined
|
|
13
|
+
icon?: ComponentProps<typeof Icon>['name']
|
|
14
|
+
variant?: 'primary' | 'muted' | undefined
|
|
10
15
|
text?: string | undefined
|
|
16
|
+
current?: boolean | undefined
|
|
11
17
|
}
|
|
12
18
|
|
|
13
|
-
const {
|
|
14
|
-
|
|
15
|
-
|
|
19
|
+
const {
|
|
20
|
+
slug,
|
|
21
|
+
href = slug === 'index' ? '/' : slug ? `/${slug}/` : undefined,
|
|
22
|
+
text = slug ? (await getEntry('pages', slug)).data.title : undefined,
|
|
23
|
+
target = href?.startsWith('http') ? '_blank' : undefined,
|
|
24
|
+
current = Astro.url.pathname === href,
|
|
25
|
+
as = 'a',
|
|
26
|
+
variant = 'primary',
|
|
27
|
+
icon,
|
|
28
|
+
...rest
|
|
29
|
+
} = Astro.props
|
|
16
30
|
---
|
|
17
31
|
|
|
18
32
|
<Element
|
|
19
33
|
class:list="link"
|
|
20
|
-
|
|
21
|
-
as
|
|
34
|
+
{href}
|
|
35
|
+
{as}
|
|
36
|
+
{target}
|
|
37
|
+
{variant}
|
|
38
|
+
{current}
|
|
22
39
|
{...rest}
|
|
23
40
|
>
|
|
41
|
+
<Fragment set:html={text} />
|
|
24
42
|
<slot />
|
|
25
|
-
<
|
|
43
|
+
<Icon name={icon} />
|
|
26
44
|
</Element>
|
|
27
45
|
|
|
28
|
-
<style is:global
|
|
46
|
+
<style is:global>
|
|
29
47
|
@layer fulldev {
|
|
30
|
-
.link
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
48
|
+
.link,
|
|
49
|
+
.prose-content > *:not(.prose-footer) > a {
|
|
50
|
+
@apply ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2;
|
|
51
|
+
|
|
52
|
+
&.variant-primary,
|
|
53
|
+
&:is(.prose-content > *:not(.prose-footer) > a) {
|
|
54
|
+
@apply text-primary underline underline-offset-4;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&.variant-muted {
|
|
58
|
+
@apply text-muted-foreground hover:text-foreground;
|
|
59
|
+
|
|
60
|
+
&.current {
|
|
61
|
+
@apply text-foreground;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&.size-sm {
|
|
66
|
+
@apply text-sm;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&.size-lg {
|
|
70
|
+
@apply text-lg;
|
|
46
71
|
}
|
|
47
72
|
|
|
48
|
-
|
|
49
|
-
|
|
73
|
+
.icon {
|
|
74
|
+
@apply mb-0.5;
|
|
50
75
|
}
|
|
51
76
|
}
|
|
52
77
|
}
|