fulldev-ui 0.3.35 → 0.4.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/.github/ISSUE_TEMPLATE/bug_report.yml +57 -0
- package/.github/ISSUE_TEMPLATE/config.yml +5 -0
- package/.github/ISSUE_TEMPLATE/feature_request.yml +39 -0
- package/.github/pull_request_template.md +23 -0
- package/.github/workflows/github-releases-to-discord.yml +21 -0
- package/.prettierignore +15 -0
- package/.prettierrc.yaml +34 -0
- package/.vscode/extensions.json +4 -0
- package/.vscode/launch.json +11 -0
- package/.vscode/settings.json +23 -0
- package/CHANGELOG.md +100 -0
- package/CONTRIBUTING.md +102 -0
- package/LICENCE +21 -0
- package/README.md +9 -6
- package/astro.config.ts +44 -0
- package/package.json +41 -27
- package/pnpm-lock.yaml +6229 -0
- 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/browserconfig.xml +9 -0
- package/public/favicon/favicon-16x16.png +0 -0
- package/public/favicon/favicon-32x32.png +0 -0
- package/public/favicon/favicon.ico +0 -0
- package/public/favicon/mstile-150x150.png +0 -0
- package/public/favicon/safari-pinned-tab.svg +17 -0
- package/public/favicon/site.webmanifest +19 -0
- package/public/images/avatar-placeholder.jpg +0 -0
- package/public/images/avatars/1.jpeg +0 -0
- package/public/images/avatars/2.jpeg +0 -0
- package/public/images/avatars/3.jpeg +0 -0
- package/public/images/avatars/300/1.jpeg +0 -0
- package/public/images/avatars/300/2.jpeg +0 -0
- package/public/images/avatars/300/3.jpeg +0 -0
- package/public/images/avatars/300/4.jpeg +0 -0
- package/public/images/avatars/4.jpeg +0 -0
- package/public/images/avatars/5.jpeg +0 -0
- package/public/images/avatars/500/1.jpeg +0 -0
- package/public/images/avatars/500/2.jpeg +0 -0
- package/public/images/avatars/500/3.jpeg +0 -0
- package/public/images/avatars/500/4.jpeg +0 -0
- package/public/images/avatars/6.jpeg +0 -0
- package/public/images/avatars/7.jpeg +0 -0
- package/public/images/avatars/8.jpeg +0 -0
- package/public/images/block-code.png +0 -0
- package/public/images/blocks/colleagues.png +0 -0
- package/public/images/blocks/content.png +0 -0
- package/public/images/blocks/cta.png +0 -0
- package/public/images/blocks/features.png +0 -0
- package/public/images/blocks/footer.png +0 -0
- package/public/images/blocks/header.png +0 -0
- package/public/images/blocks/hero.png +0 -0
- package/public/images/blocks/intro.png +0 -0
- package/public/images/blocks/posts.png +0 -0
- package/public/images/blocks/prices.png +0 -0
- package/public/images/blocks/reviews.png +0 -0
- package/public/images/component-code.png +0 -0
- package/public/images/logo-placeholder.svg +1 -0
- package/public/images/placeholder-center.webp +0 -0
- package/public/images/placeholder-landscape-dark.png +0 -0
- package/public/images/placeholder-landscape.webp +0 -0
- package/public/images/placeholder-portrait.webp +0 -0
- package/public/images/placeholder-right.webp +0 -0
- package/public/images/placeholder.webp +0 -0
- package/siteicon.png +0 -0
- package/src/blocks/Categories.astro +12 -0
- package/src/blocks/Colleagues.astro +12 -0
- package/src/blocks/Contact.astro +152 -0
- package/src/blocks/Content.astro +12 -0
- package/src/blocks/Cta.astro +14 -0
- package/src/blocks/Features.astro +11 -0
- package/src/blocks/Footer.astro +7 -0
- package/src/blocks/Header.astro +7 -0
- package/src/blocks/Hero.astro +16 -0
- package/src/blocks/Intro.astro +19 -0
- package/src/blocks/Jobs.astro +12 -0
- package/src/blocks/Posts.astro +11 -0
- package/src/blocks/Prices.astro +22 -0
- package/src/blocks/Product.astro +64 -0
- package/src/blocks/Products.astro +11 -0
- package/src/blocks/Reviews.astro +13 -0
- package/src/components/{base/Avatar.astro → Avatar.astro} +7 -11
- package/src/components/{base/Badge.astro → Badge.astro} +36 -22
- package/src/components/{structure/Bento.astro → Bento.astro} +6 -9
- package/src/components/Block.astro +157 -0
- package/src/components/Blocks.astro +5 -0
- package/src/components/Box.astro +60 -0
- package/src/components/Button.astro +140 -0
- package/src/components/Card.astro +212 -0
- package/src/components/{structure/Carousel.astro → Carousel.astro} +13 -16
- package/src/components/Checkbox.astro +63 -0
- package/src/components/{structure/Column.astro → Column.astro} +18 -9
- package/src/components/Dialog.astro +65 -0
- package/src/components/Drawer.astro +99 -0
- package/src/components/Footer.astro +144 -0
- package/src/components/{structure/Grid.astro → Grid.astro} +7 -10
- package/src/components/Head.astro +85 -0
- package/src/components/Header.astro +204 -0
- package/src/components/Heading.astro +79 -0
- package/src/components/{base/Icon.astro → Icon.astro} +7 -9
- package/src/components/{base/Image.astro → Image.astro} +32 -30
- package/src/components/Input.astro +119 -0
- package/src/components/{typography/Label.astro → Label.astro} +12 -12
- package/src/components/{typography/Link.astro → Link.astro} +15 -13
- package/src/components/List.astro +41 -0
- package/src/components/{structure/Masonry.astro → Masonry.astro} +9 -11
- package/src/components/Rating.astro +82 -0
- package/src/components/{_Component.astro → Root.astro} +9 -11
- package/src/components/{structure/Row.astro → Row.astro} +6 -9
- package/src/components/Search.astro +62 -0
- package/src/components/Section.astro +274 -0
- package/src/components/Select.astro +144 -0
- package/src/components/Sidebar.astro +71 -0
- package/src/components/{structure/Split.astro → Split.astro} +6 -9
- package/src/components/{structure/Spread.astro → Spread.astro} +6 -9
- package/src/components/Switch.astro +114 -0
- package/src/components/Table.astro +121 -0
- package/src/components/Tagline.astro +35 -0
- package/src/components/Text.astro +43 -0
- package/src/components/Textarea.astro +105 -0
- package/src/components/Toc.astro +52 -0
- package/src/components/{structure/Wrap.astro → Wrap.astro} +5 -10
- package/src/components/docs/DecorativeBox.astro +15 -0
- package/src/components/docs/PropsTable.astro +95 -0
- package/src/components/experimental/Channel.astro +15 -10
- package/src/components/experimental/Form.astro +34 -0
- package/src/components/experimental/Gallery.astro +180 -0
- package/src/components/experimental/GalleryVertical.astro +161 -0
- package/src/components/{base → experimental}/Logo.astro +3 -5
- package/src/components/experimental/Price.astro +17 -15
- package/src/components/experimental/Prose.astro +154 -0
- package/src/components/{base → experimental}/Video.astro +1 -1
- package/src/components/experimental/Window.astro +173 -0
- package/src/content/config.ts +16 -13
- package/src/content/pages/_changelog.mdx +10 -0
- package/src/content/pages/_segment/footer.mdx +244 -0
- package/src/content/pages/_segment/header.mdx +210 -0
- package/src/content/pages/base/_dialog.mdx +17 -0
- package/src/content/pages/base/_drawer.mdx +17 -0
- package/src/content/pages/base/_image.mdx +14 -0
- package/src/content/pages/base/_switch.mdx +33 -0
- package/src/content/pages/base/badge.mdx +70 -0
- package/src/content/pages/base/button.mdx +71 -0
- package/src/content/pages/base/card.mdx +114 -0
- package/src/content/pages/base/checkbox.mdx +43 -0
- package/src/content/pages/base/icon.mdx +54 -0
- package/src/content/pages/base/input.mdx +67 -0
- package/src/content/pages/base/rating.mdx +66 -0
- package/src/content/pages/base/section.mdx +79 -0
- package/src/content/pages/base/select.mdx +77 -0
- package/src/content/pages/base/table.mdx +133 -0
- package/src/content/pages/base/textarea.mdx +73 -0
- package/src/content/pages/blocks/_banner.mdx +13 -0
- package/src/content/pages/blocks/_categories.mdx +149 -0
- package/src/content/pages/blocks/_jobs.mdx +37 -0
- package/src/content/pages/blocks/_product.mdx +29 -0
- package/src/content/pages/blocks/_products.mdx +55 -0
- package/src/content/pages/blocks/_stats.mdx +34 -0
- package/src/content/pages/blocks/colleagues.mdx +42 -0
- package/src/content/pages/blocks/content.mdx +101 -0
- package/src/content/pages/blocks/cta.mdx +192 -0
- package/src/content/pages/blocks/features.mdx +134 -0
- package/src/content/pages/blocks/footer.mdx +71 -0
- package/src/content/pages/blocks/header.mdx +192 -0
- package/src/content/pages/blocks/hero.mdx +97 -0
- package/src/content/pages/blocks/intro.mdx +132 -0
- package/src/content/pages/blocks/posts.mdx +40 -0
- package/src/content/pages/blocks/prices.mdx +126 -0
- package/src/content/pages/blocks/reviews.mdx +249 -0
- package/src/content/pages/blocks.mdx +10 -0
- package/src/content/pages/index.mdx +65 -0
- package/src/content/pages/overview/frameworks.mdx +180 -0
- package/src/content/pages/overview/installation.mdx +20 -0
- package/src/content/pages/overview/integration.mdx +37 -0
- package/src/content/pages/overview/introduction.mdx +20 -0
- package/src/content/pages/overview/theming.mdx +83 -0
- package/src/content/pages/structure/_row.mdx +23 -0
- package/src/content/pages/structure/_wrap.mdx +25 -0
- package/src/content/pages/structure/carousel.mdx +31 -0
- package/src/content/pages/structure/column.mdx +21 -0
- package/src/content/pages/structure/grid.mdx +26 -0
- package/src/content/pages/structure/masonry.mdx +32 -0
- package/src/content/pages/structure/split.mdx +21 -0
- package/src/content/pages/structure/spread.mdx +21 -0
- package/src/content/pages/typography/_tagline.mdx +36 -0
- package/src/content/pages/typography/heading.mdx +74 -0
- package/src/content/pages/typography/label.mdx +42 -0
- package/src/content/pages/typography/link.mdx +63 -0
- package/src/content/pages/typography/list.mdx +52 -0
- package/src/content/pages/typography/text.mdx +62 -0
- package/src/content/records/record.yml +1 -0
- package/src/content/settings/base.yml +48 -0
- package/src/content/settings/components.yml +27 -0
- package/src/css/color.css +6 -67
- package/src/css/custom.css +59 -0
- package/src/css/size.css +130 -0
- package/src/css/space.css +47 -26
- package/src/css/styles.css +4 -2
- package/src/env.d.ts +1 -1
- package/src/integration/generate-colors.ts +637 -0
- package/src/integration/index.ts +158 -0
- package/src/integration/tailwind-plugin.ts +80 -0
- package/src/integration/unocss-preset.ts +84 -0
- package/src/layouts/BlockLayout.astro +24 -0
- package/src/layouts/BlockOverviewLayout.astro +39 -0
- package/src/layouts/ComponentLayout.astro +23 -0
- package/src/layouts/JobsLayout.astro +40 -0
- package/src/layouts/Layout.astro +168 -0
- package/src/layouts/OverviewLayout.astro +45 -0
- package/src/layouts/PageLayout.astro +32 -0
- package/src/layouts/PostLayout.astro +32 -0
- package/src/layouts/ProductLayout.astro +31 -0
- package/src/pages/[...page].astro +41 -0
- package/src/schemas/base.ts +81 -0
- package/src/schemas/block.ts +15 -0
- package/src/schemas/card.ts +3 -0
- package/src/schemas/page.ts +43 -0
- package/src/schemas/utils.ts +22 -0
- package/src/utils/mergeEntries.ts +28 -0
- package/tsconfig.json +10 -1
- package/.astro/settings.json +0 -5
- package/.astro/types.d.ts +0 -147
- package/.env +0 -1
- package/astro.config.mjs +0 -6
- package/src/components/_Block.astro +0 -20
- package/src/components/_Blocks.astro +0 -11
- package/src/components/_Children.astro +0 -31
- package/src/components/_archive/Body.astro +0 -37
- package/src/components/_archive/Main.astro +0 -28
- package/src/components/_archive/Nav.astro +0 -50
- package/src/components/_todo/Form.astro +0 -36
- package/src/components/_todo/Prose.astro +0 -139
- package/src/components/_todo/Writeup.astro +0 -24
- package/src/components/base/Button.astro +0 -123
- package/src/components/base/Rating.astro +0 -47
- package/src/components/base/checkbox/Checkbox.astro +0 -52
- package/src/components/base/checkbox/CheckboxElement.astro +0 -31
- package/src/components/base/input/Input.astro +0 -79
- package/src/components/base/input/InputElement.astro +0 -69
- package/src/components/base/radio/Radio.astro +0 -66
- package/src/components/base/radio/RadioElement.astro +0 -34
- package/src/components/base/select/Select.astro +0 -90
- package/src/components/base/select/SelectElement.astro +0 -56
- package/src/components/base/select/SelectOption.astro +0 -32
- package/src/components/base/switch/Switch.astro +0 -55
- package/src/components/base/switch/SwitchElement.astro +0 -84
- package/src/components/base/table/Table.astro +0 -57
- package/src/components/base/table/TableBody.astro +0 -38
- package/src/components/base/table/TableCell.astro +0 -30
- package/src/components/base/table/TableFooter.astro +0 -48
- package/src/components/base/table/TableHead.astro +0 -31
- package/src/components/base/table/TableHeader.astro +0 -44
- package/src/components/base/table/TableRow.astro +0 -46
- package/src/components/base/textarea/Textarea.astro +0 -79
- package/src/components/base/textarea/TextareaElement.astro +0 -68
- package/src/components/segment/Box.astro +0 -46
- package/src/components/segment/Card.astro +0 -114
- package/src/components/segment/Footer.astro +0 -94
- package/src/components/segment/Header.astro +0 -100
- package/src/components/segment/Section.astro +0 -103
- package/src/components/segment/_regels.md +0 -32
- package/src/components/typography/Heading.astro +0 -66
- package/src/components/typography/List.astro +0 -47
- package/src/components/typography/ListItem.astro +0 -36
- package/src/components/typography/Paragraph.astro +0 -36
- package/src/components/typography/Tagline.astro +0 -36
- package/src/components/typography/Text.astro +0 -37
- package/src/components/utility/Head.astro +0 -83
- package/src/components/utility/Layout.astro +0 -46
- package/src/content/pages/index.md +0 -2
- package/src/css/color.scss +0 -289
- package/src/css/size.scss +0 -296
- package/src/css/utils.scss +0 -16
- package/src/index.ts +0 -71
- package/src/integration/integration.ts +0 -88
- package/src/integration/tailwind.ts +0 -34
- package/src/integration/unocss.ts +0 -38
- /package/src/{_archive → utils/_archive}/Childmorphic.ts +0 -0
- /package/src/{_archive → utils/_archive}/getAllCollections.ts +0 -0
- /package/src/{_archive → utils/_archive}/getCollectionCascade.ts +0 -0
- /package/src/{_archive → utils/_archive}/getPathname.ts +0 -0
- /package/src/{_archive → utils/_archive}/staticPageSchema.ts +0 -0
- /package/src/{_archive → utils/_archive}/transform/transform.ts +0 -0
- /package/src/{_archive → utils/_archive}/transform/transformCasing.ts +0 -0
- /package/src/{_archive → utils/_archive}/transform/transformReferences.ts +0 -0
- /package/src/{_archive → utils/_archive}/transform/transformSelfs.ts +0 -0
- /package/src/{_archive → utils/_archive}/transform/transformUnderscores.ts +0 -0
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type {
|
|
3
|
-
ComponentProps,
|
|
4
|
-
HTMLAttributes,
|
|
5
|
-
HTMLTag,
|
|
6
|
-
Polymorphic,
|
|
7
|
-
} from 'astro/types'
|
|
8
|
-
import Component from '../../_Component.astro'
|
|
9
|
-
import Label from '../../typography/Label.astro'
|
|
10
|
-
import Icon from '../Icon.astro'
|
|
11
|
-
import { default as SelectElement } from './SelectElement.astro'
|
|
12
|
-
import SelectOption from './SelectOption.astro'
|
|
13
|
-
|
|
14
|
-
type Props<As extends HTMLTag = 'div'> = Polymorphic<{ as: As }> &
|
|
15
|
-
Pick<ComponentProps<typeof SelectElement>, 'name' | 'required' | 'disabled'> &
|
|
16
|
-
HTMLAttributes<'select'> & {
|
|
17
|
-
color?: 'base' | 'brand'
|
|
18
|
-
label?: string
|
|
19
|
-
placeholder?: string
|
|
20
|
-
options?: string[]
|
|
21
|
-
value?: string
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const {
|
|
25
|
-
as = 'div',
|
|
26
|
-
label,
|
|
27
|
-
placeholder,
|
|
28
|
-
options,
|
|
29
|
-
value,
|
|
30
|
-
// select attributes
|
|
31
|
-
name,
|
|
32
|
-
required,
|
|
33
|
-
disabled,
|
|
34
|
-
...rest
|
|
35
|
-
} = Astro.props
|
|
36
|
-
---
|
|
37
|
-
|
|
38
|
-
<Component
|
|
39
|
-
class:list={['select']}
|
|
40
|
-
{as}
|
|
41
|
-
{...rest}
|
|
42
|
-
>
|
|
43
|
-
<Label
|
|
44
|
-
for={name}
|
|
45
|
-
text={label}
|
|
46
|
-
/>
|
|
47
|
-
<SelectElement
|
|
48
|
-
id={name}
|
|
49
|
-
{name}
|
|
50
|
-
{required}
|
|
51
|
-
{disabled}
|
|
52
|
-
>
|
|
53
|
-
<SelectOption
|
|
54
|
-
text={placeholder}
|
|
55
|
-
disabled
|
|
56
|
-
selected
|
|
57
|
-
/>
|
|
58
|
-
{
|
|
59
|
-
options?.map((option: any) => (
|
|
60
|
-
<SelectOption
|
|
61
|
-
selected={value === option}
|
|
62
|
-
text={option}
|
|
63
|
-
value={option}
|
|
64
|
-
/>
|
|
65
|
-
))
|
|
66
|
-
}
|
|
67
|
-
<slot />
|
|
68
|
-
</SelectElement>
|
|
69
|
-
<Icon name="chevron-down" />
|
|
70
|
-
</Component>
|
|
71
|
-
|
|
72
|
-
<style is:global lang="scss">
|
|
73
|
-
@import '../../../css/utils.scss';
|
|
74
|
-
|
|
75
|
-
@include component('select') {
|
|
76
|
-
display: flex;
|
|
77
|
-
position: relative;
|
|
78
|
-
flex-direction: column;
|
|
79
|
-
gap: var(--space-1);
|
|
80
|
-
width: 100%;
|
|
81
|
-
|
|
82
|
-
.icon {
|
|
83
|
-
position: absolute;
|
|
84
|
-
right: var(--space-4);
|
|
85
|
-
bottom: var(--space-4);
|
|
86
|
-
width: var(--text-1);
|
|
87
|
-
height: var(--text-1);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
</style>
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { HTMLAttributes } from 'astro/types'
|
|
3
|
-
import Component from '../../_Component.astro'
|
|
4
|
-
|
|
5
|
-
type Props = HTMLAttributes<'select'>
|
|
6
|
-
|
|
7
|
-
const { ...rest } = Astro.props
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
<Component
|
|
11
|
-
class:list={['select-element']}
|
|
12
|
-
as="select"
|
|
13
|
-
{...rest}
|
|
14
|
-
>
|
|
15
|
-
<slot />
|
|
16
|
-
</Component>
|
|
17
|
-
|
|
18
|
-
<style is:global lang="scss">
|
|
19
|
-
@import '../../../css/utils.scss';
|
|
20
|
-
|
|
21
|
-
@include component('select-element') {
|
|
22
|
-
display: flex;
|
|
23
|
-
position: relative;
|
|
24
|
-
align-items: center;
|
|
25
|
-
appearance: none;
|
|
26
|
-
appearance: none;
|
|
27
|
-
outline: none;
|
|
28
|
-
border: 1px solid var(--border);
|
|
29
|
-
border-radius: var(--radius-1);
|
|
30
|
-
background-color: var(--background);
|
|
31
|
-
padding: var(--space-3);
|
|
32
|
-
width: 100%;
|
|
33
|
-
min-width: var(--space-3);
|
|
34
|
-
height: calc(var(--text-1) + 2 * var(--space-4));
|
|
35
|
-
color: var(--text);
|
|
36
|
-
font-weight: var(--font-weight);
|
|
37
|
-
font-size: var(--text-1);
|
|
38
|
-
line-height: 1.25;
|
|
39
|
-
font-family: var(--font-family);
|
|
40
|
-
|
|
41
|
-
&:hover {
|
|
42
|
-
outline: none;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
&:focus {
|
|
46
|
-
outline: none;
|
|
47
|
-
box-shadow: inset 0 0 0 2px var(--border);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
&:disabled {
|
|
51
|
-
opacity: 50%;
|
|
52
|
-
cursor: not-allowed;
|
|
53
|
-
pointer-events: none;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
</style>
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { HTMLAttributes } from 'astro/types'
|
|
3
|
-
import Component from '../../_Component.astro'
|
|
4
|
-
|
|
5
|
-
type Props = HTMLAttributes<'option'> & {
|
|
6
|
-
text?: string
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
const { value, text, ...rest } = Astro.props
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
<Component
|
|
13
|
-
class:list={['select-option']}
|
|
14
|
-
as="option"
|
|
15
|
-
value={value ?? text}
|
|
16
|
-
text={text ?? value}
|
|
17
|
-
{...rest}
|
|
18
|
-
>
|
|
19
|
-
<slot />
|
|
20
|
-
</Component>
|
|
21
|
-
|
|
22
|
-
<style is:global lang="scss">
|
|
23
|
-
@import '../../../css/utils.scss';
|
|
24
|
-
|
|
25
|
-
@include component('select-option') {
|
|
26
|
-
color: var(--text);
|
|
27
|
-
font-weight: var(--font-weight);
|
|
28
|
-
font-size: var(--text-1);
|
|
29
|
-
line-height: 1;
|
|
30
|
-
font-family: var(--font-family);
|
|
31
|
-
}
|
|
32
|
-
</style>
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { ComponentProps, Polymorphic } from 'astro/types'
|
|
3
|
-
import Component from '../../_Component.astro'
|
|
4
|
-
import Label from '../../typography/Label.astro'
|
|
5
|
-
import SwitchElement from './SwitchElement.astro'
|
|
6
|
-
|
|
7
|
-
type Props<As extends 'div'> = Polymorphic<{ as: As }> &
|
|
8
|
-
Pick<ComponentProps<typeof SwitchElement>, 'name' | 'checked'> & {
|
|
9
|
-
color?: 'base' | 'brand'
|
|
10
|
-
true?: string
|
|
11
|
-
false?: string
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const {
|
|
15
|
-
as = 'div',
|
|
16
|
-
name,
|
|
17
|
-
checked,
|
|
18
|
-
trueLabel,
|
|
19
|
-
falseLabel,
|
|
20
|
-
...rest
|
|
21
|
-
} = Astro.props
|
|
22
|
-
---
|
|
23
|
-
|
|
24
|
-
<Component
|
|
25
|
-
structure="row"
|
|
26
|
-
class:list={['switch']}
|
|
27
|
-
{as}
|
|
28
|
-
{...rest}
|
|
29
|
-
>
|
|
30
|
-
<Label
|
|
31
|
-
for={name}
|
|
32
|
-
text={falseLabel}
|
|
33
|
-
/>
|
|
34
|
-
<SwitchElement
|
|
35
|
-
id={name}
|
|
36
|
-
{name}
|
|
37
|
-
{checked}
|
|
38
|
-
/>
|
|
39
|
-
<Label
|
|
40
|
-
for={name}
|
|
41
|
-
text={trueLabel}
|
|
42
|
-
/>
|
|
43
|
-
</Component>
|
|
44
|
-
|
|
45
|
-
<style is:global lang="scss">
|
|
46
|
-
@import '../../../css/utils.scss';
|
|
47
|
-
|
|
48
|
-
@include component('switch') {
|
|
49
|
-
position: relative;
|
|
50
|
-
align-items: center;
|
|
51
|
-
gap: var(--space-1);
|
|
52
|
-
|
|
53
|
-
width: 100%;
|
|
54
|
-
}
|
|
55
|
-
</style>
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { HTMLAttributes } from 'astro/types'
|
|
3
|
-
import Component from '../../_Component.astro'
|
|
4
|
-
|
|
5
|
-
type Props = HTMLAttributes<'input'> & {
|
|
6
|
-
name?: string
|
|
7
|
-
color?: 'base' | 'brand'
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const { name, checked, ...rest } = Astro.props
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
<Component
|
|
14
|
-
as="label"
|
|
15
|
-
for={name}
|
|
16
|
-
class:list="switch-element"
|
|
17
|
-
if={true}
|
|
18
|
-
{...rest}
|
|
19
|
-
>
|
|
20
|
-
<input
|
|
21
|
-
{checked}
|
|
22
|
-
name={name}
|
|
23
|
-
type="checkbox"
|
|
24
|
-
class="checkbox"
|
|
25
|
-
/>
|
|
26
|
-
<div class="checkmark"></div>
|
|
27
|
-
</Component>
|
|
28
|
-
|
|
29
|
-
<style is:global lang="scss">
|
|
30
|
-
@import '../../../css/utils.scss';
|
|
31
|
-
|
|
32
|
-
@include component('switch-element') {
|
|
33
|
-
display: block;
|
|
34
|
-
position: relative;
|
|
35
|
-
transition: var(--transition);
|
|
36
|
-
cursor: pointer;
|
|
37
|
-
box-sizing: border-box;
|
|
38
|
-
border: 1px solid var(--border);
|
|
39
|
-
border-radius: 999px;
|
|
40
|
-
background-color: var(--background);
|
|
41
|
-
padding: var(--space-1);
|
|
42
|
-
width: fit-content;
|
|
43
|
-
min-width: calc(
|
|
44
|
-
(var(--text-1) + 2 * var(--space-2) * 2) + 2 * var(--space-1)
|
|
45
|
-
);
|
|
46
|
-
height: calc(var(--text-1) + 2 * var(--space-2));
|
|
47
|
-
|
|
48
|
-
.checkbox {
|
|
49
|
-
position: absolute;
|
|
50
|
-
opacity: 0;
|
|
51
|
-
width: 0;
|
|
52
|
-
height: 0;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.checkmark {
|
|
56
|
-
transform: 0%;
|
|
57
|
-
transition: var(--transition);
|
|
58
|
-
border-radius: 999px;
|
|
59
|
-
background-color: var(--border);
|
|
60
|
-
width: 50%;
|
|
61
|
-
height: 100%;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.checkbox:checked ~ .checkmark {
|
|
65
|
-
transform: translateX(100%);
|
|
66
|
-
background-color: var(--color-12);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
&:hover {
|
|
70
|
-
background-color: var(--hover);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
&:focus-visible {
|
|
74
|
-
outline: 2px solid var(--focus) !important;
|
|
75
|
-
outline-offset: 2px;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
&:disabled {
|
|
79
|
-
opacity: 0.5;
|
|
80
|
-
cursor: not-allowed;
|
|
81
|
-
pointer-events: none;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
</style>
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { ComponentProps, HTMLAttributes } from 'astro/types'
|
|
3
|
-
import Component from '../../_Component.astro'
|
|
4
|
-
import TableBody from './TableBody.astro'
|
|
5
|
-
import TableFooter from './TableFooter.astro'
|
|
6
|
-
import TableHeader from './TableHeader.astro'
|
|
7
|
-
|
|
8
|
-
type Props = HTMLAttributes<'table'> & {
|
|
9
|
-
color?: 'base' | 'brand'
|
|
10
|
-
size?: 'sm' | 'md' | 'lg'
|
|
11
|
-
header?:
|
|
12
|
-
| ComponentProps<typeof TableHeader>
|
|
13
|
-
| ComponentProps<typeof TableHeader>['cells']
|
|
14
|
-
body?:
|
|
15
|
-
| ComponentProps<typeof TableBody>
|
|
16
|
-
| ComponentProps<typeof TableBody>['rows']
|
|
17
|
-
footer?:
|
|
18
|
-
| ComponentProps<typeof TableFooter>
|
|
19
|
-
| ComponentProps<typeof TableFooter>['cells']
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const { header, body, footer, ...rest } = Astro.props
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
<Component
|
|
26
|
-
class:list={['table']}
|
|
27
|
-
as="table"
|
|
28
|
-
{...rest}
|
|
29
|
-
>
|
|
30
|
-
<TableHeader {...Array.isArray(header) ? { cells: header } : header} />
|
|
31
|
-
|
|
32
|
-
{Array.isArray(body) ? <TableBody rows={body} /> : <TableBody {...body} />}
|
|
33
|
-
|
|
34
|
-
{
|
|
35
|
-
Array.isArray(footer) ? (
|
|
36
|
-
<TableFooter cells={footer} />
|
|
37
|
-
) : (
|
|
38
|
-
<TableFooter {...footer} />
|
|
39
|
-
)
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
<slot />
|
|
43
|
-
</Component>
|
|
44
|
-
|
|
45
|
-
<style is:global lang="scss">
|
|
46
|
-
@import '../../../css/utils.scss';
|
|
47
|
-
|
|
48
|
-
@include component('table') {
|
|
49
|
-
display: table;
|
|
50
|
-
box-shadow: 0 0 0 1px var(--border);
|
|
51
|
-
border-radius: var(--radius-1);
|
|
52
|
-
border-collapse: collapse;
|
|
53
|
-
width: 100%;
|
|
54
|
-
caption-side: bottom;
|
|
55
|
-
overflow: hidden;
|
|
56
|
-
}
|
|
57
|
-
</style>
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { ComponentProps, HTMLAttributes } from 'astro/types'
|
|
3
|
-
import Component from '../../_Component.astro'
|
|
4
|
-
import TableRow from './TableRow.astro'
|
|
5
|
-
|
|
6
|
-
type Props = HTMLAttributes<'tbody'> & {
|
|
7
|
-
rows?: (
|
|
8
|
-
| ComponentProps<typeof TableRow>
|
|
9
|
-
| ComponentProps<typeof TableRow>['cells']
|
|
10
|
-
)[]
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const { rows, ...rest } = Astro.props
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
<Component
|
|
17
|
-
class:list={['table-body']}
|
|
18
|
-
as="tbody"
|
|
19
|
-
{...rest}
|
|
20
|
-
>
|
|
21
|
-
{
|
|
22
|
-
rows?.map((row) => {
|
|
23
|
-
if (Array.isArray(row)) return <TableRow cells={row} />
|
|
24
|
-
else return <TableRow {...row} />
|
|
25
|
-
})
|
|
26
|
-
}
|
|
27
|
-
<slot />
|
|
28
|
-
</Component>
|
|
29
|
-
|
|
30
|
-
<style is:global lang="scss">
|
|
31
|
-
@import '../../../css/utils.scss';
|
|
32
|
-
|
|
33
|
-
@include component('table-body') {
|
|
34
|
-
display: table-row-group;
|
|
35
|
-
vertical-align: middle;
|
|
36
|
-
unicode-bidi: isolate;
|
|
37
|
-
}
|
|
38
|
-
</style>
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { HTMLAttributes } from 'astro/types'
|
|
3
|
-
import Component from '../../_Component.astro'
|
|
4
|
-
|
|
5
|
-
type Props = HTMLAttributes<'td'> & {
|
|
6
|
-
html?: string
|
|
7
|
-
text?: string
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const { ...rest } = Astro.props
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
<Component
|
|
14
|
-
class:list={['table-cell']}
|
|
15
|
-
as="td"
|
|
16
|
-
{...rest}
|
|
17
|
-
>
|
|
18
|
-
<slot />
|
|
19
|
-
</Component>
|
|
20
|
-
|
|
21
|
-
<style is:global lang="scss">
|
|
22
|
-
@import '../../../css/utils.scss';
|
|
23
|
-
|
|
24
|
-
@include component('table-cell') {
|
|
25
|
-
vertical-align: middle;
|
|
26
|
-
padding: var(--space-3) var(--space-4);
|
|
27
|
-
color: var(--color-11);
|
|
28
|
-
font-size: var(--text-1);
|
|
29
|
-
}
|
|
30
|
-
</style>
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { ComponentProps, HTMLAttributes } from 'astro/types'
|
|
3
|
-
import Component from '../../_Component.astro'
|
|
4
|
-
import TableCell from './TableCell.astro'
|
|
5
|
-
import TableRow from './TableRow.astro'
|
|
6
|
-
|
|
7
|
-
type Props = HTMLAttributes<'tfoot'> & {
|
|
8
|
-
cells?: (
|
|
9
|
-
| ComponentProps<typeof TableCell>
|
|
10
|
-
| ComponentProps<typeof TableCell>['html']
|
|
11
|
-
)[]
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const { cells, ...rest } = Astro.props
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
<Component
|
|
18
|
-
class:list={['table-footer']}
|
|
19
|
-
as="tfoot"
|
|
20
|
-
{...rest}
|
|
21
|
-
>
|
|
22
|
-
{
|
|
23
|
-
cells && (
|
|
24
|
-
<TableRow>
|
|
25
|
-
{cells?.map((cell) => {
|
|
26
|
-
if (typeof cell === 'string') return <TableCell html={cell} />
|
|
27
|
-
else return <TableCell {...cell} />
|
|
28
|
-
})}
|
|
29
|
-
</TableRow>
|
|
30
|
-
)
|
|
31
|
-
}
|
|
32
|
-
<slot />
|
|
33
|
-
</Component>
|
|
34
|
-
|
|
35
|
-
<style is:global lang="scss">
|
|
36
|
-
@import '../../../css/utils.scss';
|
|
37
|
-
|
|
38
|
-
@include component('table-footer') {
|
|
39
|
-
display: table-footer-group;
|
|
40
|
-
border-top: 1px solid var(--border);
|
|
41
|
-
background-color: var(--color-3);
|
|
42
|
-
color: var(--color-12);
|
|
43
|
-
|
|
44
|
-
&:last-child {
|
|
45
|
-
border-bottom: none;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
</style>
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { HTMLAttributes } from 'astro/types'
|
|
3
|
-
import Component from '../../_Component.astro'
|
|
4
|
-
|
|
5
|
-
type Props = HTMLAttributes<'th'> & {
|
|
6
|
-
html?: string
|
|
7
|
-
text?: string
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const { ...rest } = Astro.props
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
<Component
|
|
14
|
-
class:list={['table-head']}
|
|
15
|
-
as="th"
|
|
16
|
-
{...rest}
|
|
17
|
-
>
|
|
18
|
-
<slot />
|
|
19
|
-
</Component>
|
|
20
|
-
|
|
21
|
-
<style is:global lang="scss">
|
|
22
|
-
@import '../../../css/utils.scss';
|
|
23
|
-
|
|
24
|
-
@include component('table-head') {
|
|
25
|
-
vertical-align: middle;
|
|
26
|
-
padding: var(--space-3) var(--space-4);
|
|
27
|
-
color: var(--color-12);
|
|
28
|
-
font-size: var(--text-1);
|
|
29
|
-
text-align: left;
|
|
30
|
-
}
|
|
31
|
-
</style>
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { ComponentProps, HTMLAttributes } from 'astro/types'
|
|
3
|
-
import Component from '../../_Component.astro'
|
|
4
|
-
import TableHead from './TableHead.astro'
|
|
5
|
-
import TableRow from './TableRow.astro'
|
|
6
|
-
|
|
7
|
-
type Props = HTMLAttributes<'thead'> & {
|
|
8
|
-
cells?: (
|
|
9
|
-
| ComponentProps<typeof TableHead>
|
|
10
|
-
| ComponentProps<typeof TableHead>['html']
|
|
11
|
-
)[]
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const { cells, ...rest } = Astro.props
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
<Component
|
|
18
|
-
class:list={['table-header']}
|
|
19
|
-
as="thead"
|
|
20
|
-
{...rest}
|
|
21
|
-
>
|
|
22
|
-
<TableRow>
|
|
23
|
-
{
|
|
24
|
-
cells?.map((cell) => {
|
|
25
|
-
if (typeof cell === 'string') return <TableHead html={cell} />
|
|
26
|
-
else return <TableHead {...cell} />
|
|
27
|
-
})
|
|
28
|
-
}
|
|
29
|
-
</TableRow>
|
|
30
|
-
<slot />
|
|
31
|
-
</Component>
|
|
32
|
-
|
|
33
|
-
<style is:global lang="scss">
|
|
34
|
-
@import '../../../css/utils.scss';
|
|
35
|
-
|
|
36
|
-
@include component('table-header') {
|
|
37
|
-
border-bottom: 1px solid var(--color-6);
|
|
38
|
-
background-color: var(--color-3);
|
|
39
|
-
|
|
40
|
-
&:last-child {
|
|
41
|
-
border-bottom: none;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
</style>
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { ComponentProps, HTMLAttributes } from 'astro/types'
|
|
3
|
-
import Component from '../../_Component.astro'
|
|
4
|
-
import TableCell from './TableCell.astro'
|
|
5
|
-
|
|
6
|
-
type Props = HTMLAttributes<'tr'> & {
|
|
7
|
-
cells?: (
|
|
8
|
-
| ComponentProps<typeof TableCell>
|
|
9
|
-
| ComponentProps<typeof TableCell>['text']
|
|
10
|
-
)[]
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const { cells, ...rest } = Astro.props
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
<Component
|
|
17
|
-
class:list={['table-row']}
|
|
18
|
-
{...rest}
|
|
19
|
-
as="tr"
|
|
20
|
-
>
|
|
21
|
-
{
|
|
22
|
-
cells?.map((cel) => {
|
|
23
|
-
if (typeof cel === 'string') return <TableCell text={cel} />
|
|
24
|
-
else return <TableCell {...cel} />
|
|
25
|
-
})
|
|
26
|
-
}
|
|
27
|
-
<slot />
|
|
28
|
-
</Component>
|
|
29
|
-
|
|
30
|
-
<style is:global lang="scss">
|
|
31
|
-
@import '../../../css/utils.scss';
|
|
32
|
-
|
|
33
|
-
@include component('table-row') {
|
|
34
|
-
border-bottom: 1px solid var(--color-6);
|
|
35
|
-
background-color: var(--color-2);
|
|
36
|
-
|
|
37
|
-
&:is(.table-header > &),
|
|
38
|
-
&:is(.table-footer > &) {
|
|
39
|
-
background-color: var(--color-3);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
&:last-child {
|
|
43
|
-
border-bottom: none;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
</style>
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { ComponentProps, Polymorphic } from 'astro/types'
|
|
3
|
-
import Component from '../../_Component.astro'
|
|
4
|
-
import Label from '../../typography/Label.astro'
|
|
5
|
-
import Icon from '../Icon.astro'
|
|
6
|
-
import TextareaElement from './TextareaElement.astro'
|
|
7
|
-
|
|
8
|
-
type Props<As extends 'div'> = Polymorphic<{ as: As }> &
|
|
9
|
-
Pick<
|
|
10
|
-
ComponentProps<typeof TextareaElement>,
|
|
11
|
-
| 'variant'
|
|
12
|
-
| 'placeholder'
|
|
13
|
-
| 'name'
|
|
14
|
-
| 'value'
|
|
15
|
-
| 'disabled'
|
|
16
|
-
| 'required'
|
|
17
|
-
| 'rows'
|
|
18
|
-
> & {
|
|
19
|
-
color?: 'base' | 'brand'
|
|
20
|
-
label?: string
|
|
21
|
-
icon?: string
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const {
|
|
25
|
-
as = 'div',
|
|
26
|
-
label,
|
|
27
|
-
icon,
|
|
28
|
-
variant,
|
|
29
|
-
// textarea attributes
|
|
30
|
-
name,
|
|
31
|
-
rows,
|
|
32
|
-
placeholder,
|
|
33
|
-
value,
|
|
34
|
-
disabled,
|
|
35
|
-
required,
|
|
36
|
-
...rest
|
|
37
|
-
} = Astro.props
|
|
38
|
-
---
|
|
39
|
-
|
|
40
|
-
<Component
|
|
41
|
-
class:list={['textarea']}
|
|
42
|
-
{as}
|
|
43
|
-
{...rest}
|
|
44
|
-
>
|
|
45
|
-
<Label
|
|
46
|
-
for={name}
|
|
47
|
-
text={label}
|
|
48
|
-
/>
|
|
49
|
-
<TextareaElement
|
|
50
|
-
id={name}
|
|
51
|
-
{name}
|
|
52
|
-
{variant}
|
|
53
|
-
{placeholder}
|
|
54
|
-
{value}
|
|
55
|
-
{disabled}
|
|
56
|
-
{required}
|
|
57
|
-
{rows}
|
|
58
|
-
/>
|
|
59
|
-
<Icon name={icon} />
|
|
60
|
-
</Component>
|
|
61
|
-
|
|
62
|
-
<style is:global lang="scss">
|
|
63
|
-
@import '../../../css/utils.scss';
|
|
64
|
-
|
|
65
|
-
@include component('textarea') {
|
|
66
|
-
display: flex;
|
|
67
|
-
position: relative;
|
|
68
|
-
flex-direction: column;
|
|
69
|
-
gap: var(--space-1);
|
|
70
|
-
width: 100%;
|
|
71
|
-
|
|
72
|
-
.icon {
|
|
73
|
-
position: absolute;
|
|
74
|
-
top: 50%;
|
|
75
|
-
right: var(--space-3);
|
|
76
|
-
transform: translateY(-50%);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
</style>
|