fulldev-ui 0.3.36 → 0.4.0-beta.1

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 (287) hide show
  1. package/.github/ISSUE_TEMPLATE/bug_report.yml +57 -0
  2. package/.github/ISSUE_TEMPLATE/config.yml +5 -0
  3. package/.github/ISSUE_TEMPLATE/feature_request.yml +39 -0
  4. package/.github/pull_request_template.md +23 -0
  5. package/.github/workflows/github-releases-to-discord.yml +21 -0
  6. package/.prettierignore +15 -0
  7. package/.prettierrc.yaml +34 -0
  8. package/.vscode/extensions.json +4 -0
  9. package/.vscode/launch.json +11 -0
  10. package/.vscode/settings.json +23 -0
  11. package/CHANGELOG.md +100 -0
  12. package/CONTRIBUTING.md +102 -0
  13. package/LICENCE +21 -0
  14. package/README.md +9 -7
  15. package/astro.config.ts +44 -0
  16. package/package.json +42 -27
  17. package/pnpm-lock.yaml +5515 -0
  18. package/public/favicon/android-chrome-192x192.png +0 -0
  19. package/public/favicon/android-chrome-512x512.png +0 -0
  20. package/public/favicon/apple-touch-icon.png +0 -0
  21. package/public/favicon/browserconfig.xml +9 -0
  22. package/public/favicon/favicon-16x16.png +0 -0
  23. package/public/favicon/favicon-32x32.png +0 -0
  24. package/public/favicon/favicon.ico +0 -0
  25. package/public/favicon/mstile-150x150.png +0 -0
  26. package/public/favicon/safari-pinned-tab.svg +17 -0
  27. package/public/favicon/site.webmanifest +19 -0
  28. package/public/images/avatar-placeholder.jpg +0 -0
  29. package/public/images/avatars/1.jpeg +0 -0
  30. package/public/images/avatars/2.jpeg +0 -0
  31. package/public/images/avatars/3.jpeg +0 -0
  32. package/public/images/avatars/300/1.jpeg +0 -0
  33. package/public/images/avatars/300/2.jpeg +0 -0
  34. package/public/images/avatars/300/3.jpeg +0 -0
  35. package/public/images/avatars/300/4.jpeg +0 -0
  36. package/public/images/avatars/4.jpeg +0 -0
  37. package/public/images/avatars/5.jpeg +0 -0
  38. package/public/images/avatars/500/1.jpeg +0 -0
  39. package/public/images/avatars/500/2.jpeg +0 -0
  40. package/public/images/avatars/500/3.jpeg +0 -0
  41. package/public/images/avatars/500/4.jpeg +0 -0
  42. package/public/images/avatars/6.jpeg +0 -0
  43. package/public/images/avatars/7.jpeg +0 -0
  44. package/public/images/avatars/8.jpeg +0 -0
  45. package/public/images/block-code.png +0 -0
  46. package/public/images/blocks/colleagues.png +0 -0
  47. package/public/images/blocks/content.png +0 -0
  48. package/public/images/blocks/cta.png +0 -0
  49. package/public/images/blocks/features.png +0 -0
  50. package/public/images/blocks/footer.png +0 -0
  51. package/public/images/blocks/header.png +0 -0
  52. package/public/images/blocks/hero.png +0 -0
  53. package/public/images/blocks/intro.png +0 -0
  54. package/public/images/blocks/posts.png +0 -0
  55. package/public/images/blocks/prices.png +0 -0
  56. package/public/images/blocks/reviews.png +0 -0
  57. package/public/images/component-code.png +0 -0
  58. package/public/images/logo-placeholder.svg +1 -0
  59. package/public/images/placeholder-center.webp +0 -0
  60. package/public/images/placeholder-landscape-dark.png +0 -0
  61. package/public/images/placeholder-landscape.webp +0 -0
  62. package/public/images/placeholder-portrait.webp +0 -0
  63. package/public/images/placeholder-right.webp +0 -0
  64. package/public/images/placeholder.webp +0 -0
  65. package/siteicon.png +0 -0
  66. package/src/blocks/Categories.astro +12 -0
  67. package/src/blocks/Colleagues.astro +12 -0
  68. package/src/blocks/Contact.astro +152 -0
  69. package/src/blocks/Content.astro +12 -0
  70. package/src/blocks/Cta.astro +14 -0
  71. package/src/blocks/Features.astro +11 -0
  72. package/src/blocks/Footer.astro +7 -0
  73. package/src/blocks/Header.astro +7 -0
  74. package/src/blocks/Hero.astro +16 -0
  75. package/src/blocks/Intro.astro +19 -0
  76. package/src/blocks/Jobs.astro +12 -0
  77. package/src/blocks/Posts.astro +11 -0
  78. package/src/blocks/Prices.astro +22 -0
  79. package/src/blocks/Product.astro +64 -0
  80. package/src/blocks/Products.astro +11 -0
  81. package/src/blocks/Reviews.astro +13 -0
  82. package/src/components/{base/Avatar.astro → Avatar.astro} +7 -11
  83. package/src/components/{base/Badge.astro → Badge.astro} +36 -22
  84. package/src/components/{structure/Bento.astro → Bento.astro} +6 -9
  85. package/src/components/Block.astro +157 -0
  86. package/src/components/Blocks.astro +5 -0
  87. package/src/components/Box.astro +60 -0
  88. package/src/components/Button.astro +140 -0
  89. package/src/components/Card.astro +212 -0
  90. package/src/components/{structure/Carousel.astro → Carousel.astro} +13 -16
  91. package/src/components/Checkbox.astro +63 -0
  92. package/src/components/{structure/Column.astro → Column.astro} +14 -9
  93. package/src/components/Dialog.astro +65 -0
  94. package/src/components/Drawer.astro +99 -0
  95. package/src/components/Footer.astro +144 -0
  96. package/src/components/{structure/Grid.astro → Grid.astro} +7 -10
  97. package/src/components/Head.astro +85 -0
  98. package/src/components/Header.astro +204 -0
  99. package/src/components/Heading.astro +79 -0
  100. package/src/components/{base/Icon.astro → Icon.astro} +7 -9
  101. package/src/components/{base/Image.astro → Image.astro} +32 -30
  102. package/src/components/Input.astro +119 -0
  103. package/src/components/{typography/Label.astro → Label.astro} +12 -12
  104. package/src/components/{typography/Link.astro → Link.astro} +15 -13
  105. package/src/components/List.astro +41 -0
  106. package/src/components/{structure/Masonry.astro → Masonry.astro} +9 -11
  107. package/src/components/Rating.astro +82 -0
  108. package/src/components/{_Component.astro → Root.astro} +7 -11
  109. package/src/components/{structure/Row.astro → Row.astro} +6 -9
  110. package/src/components/Search.astro +62 -0
  111. package/src/components/Section.astro +274 -0
  112. package/src/components/Select.astro +144 -0
  113. package/src/components/Sidebar.astro +71 -0
  114. package/src/components/{structure/Split.astro → Split.astro} +6 -9
  115. package/src/components/{structure/Spread.astro → Spread.astro} +6 -9
  116. package/src/components/Switch.astro +114 -0
  117. package/src/components/Table.astro +121 -0
  118. package/src/components/Tagline.astro +35 -0
  119. package/src/components/Text.astro +43 -0
  120. package/src/components/Textarea.astro +105 -0
  121. package/src/components/Toc.astro +52 -0
  122. package/src/components/{structure/Wrap.astro → Wrap.astro} +5 -10
  123. package/src/components/docs/DecorativeBox.astro +15 -0
  124. package/src/components/docs/PropsTable.astro +95 -0
  125. package/src/components/experimental/Channel.astro +15 -10
  126. package/src/components/experimental/Form.astro +34 -0
  127. package/src/components/experimental/Gallery.astro +180 -0
  128. package/src/components/experimental/GalleryVertical.astro +161 -0
  129. package/src/components/{base → experimental}/Logo.astro +3 -5
  130. package/src/components/experimental/Price.astro +17 -17
  131. package/src/components/experimental/Prose.astro +154 -0
  132. package/src/components/{base → experimental}/Video.astro +1 -1
  133. package/src/components/experimental/Window.astro +173 -0
  134. package/src/content/config.ts +16 -13
  135. package/src/content/pages/_changelog.mdx +10 -0
  136. package/src/content/pages/_segment/footer.mdx +244 -0
  137. package/src/content/pages/_segment/header.mdx +210 -0
  138. package/src/content/pages/base/_dialog.mdx +17 -0
  139. package/src/content/pages/base/_drawer.mdx +17 -0
  140. package/src/content/pages/base/_image.mdx +14 -0
  141. package/src/content/pages/base/_switch.mdx +33 -0
  142. package/src/content/pages/base/badge.mdx +70 -0
  143. package/src/content/pages/base/button.mdx +71 -0
  144. package/src/content/pages/base/card.mdx +114 -0
  145. package/src/content/pages/base/checkbox.mdx +43 -0
  146. package/src/content/pages/base/icon.mdx +54 -0
  147. package/src/content/pages/base/input.mdx +67 -0
  148. package/src/content/pages/base/rating.mdx +66 -0
  149. package/src/content/pages/base/section.mdx +79 -0
  150. package/src/content/pages/base/select.mdx +77 -0
  151. package/src/content/pages/base/table.mdx +133 -0
  152. package/src/content/pages/base/textarea.mdx +73 -0
  153. package/src/content/pages/blocks/_banner.mdx +13 -0
  154. package/src/content/pages/blocks/_categories.mdx +149 -0
  155. package/src/content/pages/blocks/_jobs.mdx +37 -0
  156. package/src/content/pages/blocks/_product.mdx +29 -0
  157. package/src/content/pages/blocks/_products.mdx +55 -0
  158. package/src/content/pages/blocks/_stats.mdx +34 -0
  159. package/src/content/pages/blocks/colleagues.mdx +42 -0
  160. package/src/content/pages/blocks/content.mdx +101 -0
  161. package/src/content/pages/blocks/cta.mdx +192 -0
  162. package/src/content/pages/blocks/features.mdx +134 -0
  163. package/src/content/pages/blocks/footer.mdx +71 -0
  164. package/src/content/pages/blocks/header.mdx +192 -0
  165. package/src/content/pages/blocks/hero.mdx +97 -0
  166. package/src/content/pages/blocks/intro.mdx +132 -0
  167. package/src/content/pages/blocks/posts.mdx +40 -0
  168. package/src/content/pages/blocks/prices.mdx +126 -0
  169. package/src/content/pages/blocks/reviews.mdx +249 -0
  170. package/src/content/pages/blocks.mdx +10 -0
  171. package/src/content/pages/index.mdx +65 -0
  172. package/src/content/pages/overview/frameworks.mdx +180 -0
  173. package/src/content/pages/overview/installation.mdx +20 -0
  174. package/src/content/pages/overview/integration.mdx +37 -0
  175. package/src/content/pages/overview/introduction.mdx +20 -0
  176. package/src/content/pages/overview/theming.mdx +83 -0
  177. package/src/content/pages/structure/_row.mdx +23 -0
  178. package/src/content/pages/structure/_wrap.mdx +25 -0
  179. package/src/content/pages/structure/carousel.mdx +31 -0
  180. package/src/content/pages/structure/column.mdx +21 -0
  181. package/src/content/pages/structure/grid.mdx +26 -0
  182. package/src/content/pages/structure/masonry.mdx +32 -0
  183. package/src/content/pages/structure/split.mdx +21 -0
  184. package/src/content/pages/structure/spread.mdx +21 -0
  185. package/src/content/pages/typography/_tagline.mdx +36 -0
  186. package/src/content/pages/typography/heading.mdx +74 -0
  187. package/src/content/pages/typography/label.mdx +42 -0
  188. package/src/content/pages/typography/link.mdx +63 -0
  189. package/src/content/pages/typography/list.mdx +52 -0
  190. package/src/content/pages/typography/text.mdx +62 -0
  191. package/src/content/records/record.yml +1 -0
  192. package/src/content/settings/base.yml +48 -0
  193. package/src/content/settings/components.yml +27 -0
  194. package/src/css/color.css +6 -67
  195. package/src/css/custom.css +59 -0
  196. package/src/css/size.css +130 -0
  197. package/src/css/space.css +47 -26
  198. package/src/css/styles.css +4 -2
  199. package/src/env.d.ts +1 -1
  200. package/src/integration/generate-colors.ts +637 -0
  201. package/src/integration/index.ts +158 -0
  202. package/src/integration/tailwind-plugin.ts +80 -0
  203. package/src/integration/unocss-preset.ts +84 -0
  204. package/src/layouts/BlockLayout.astro +24 -0
  205. package/src/layouts/BlockOverviewLayout.astro +39 -0
  206. package/src/layouts/ComponentLayout.astro +23 -0
  207. package/src/layouts/JobsLayout.astro +40 -0
  208. package/src/layouts/Layout.astro +168 -0
  209. package/src/layouts/OverviewLayout.astro +45 -0
  210. package/src/layouts/PageLayout.astro +32 -0
  211. package/src/layouts/PostLayout.astro +32 -0
  212. package/src/layouts/ProductLayout.astro +31 -0
  213. package/src/pages/[...page].astro +41 -0
  214. package/src/schemas/base.ts +81 -0
  215. package/src/schemas/block.ts +15 -0
  216. package/src/schemas/card.ts +3 -0
  217. package/src/schemas/page.ts +43 -0
  218. package/src/schemas/utils.ts +22 -0
  219. package/src/utils/mergeEntries.ts +28 -0
  220. package/tsconfig.json +10 -1
  221. package/.astro/settings.json +0 -5
  222. package/.astro/types.d.ts +0 -147
  223. package/.env +0 -1
  224. package/astro.config.mjs +0 -6
  225. package/src/components/_Block.astro +0 -20
  226. package/src/components/_Blocks.astro +0 -11
  227. package/src/components/_Children.astro +0 -31
  228. package/src/components/_archive/Body.astro +0 -37
  229. package/src/components/_archive/Main.astro +0 -28
  230. package/src/components/_archive/Nav.astro +0 -50
  231. package/src/components/_todo/Form.astro +0 -36
  232. package/src/components/_todo/Prose.astro +0 -139
  233. package/src/components/_todo/Writeup.astro +0 -24
  234. package/src/components/base/Button.astro +0 -123
  235. package/src/components/base/Rating.astro +0 -47
  236. package/src/components/base/checkbox/Checkbox.astro +0 -52
  237. package/src/components/base/checkbox/CheckboxElement.astro +0 -31
  238. package/src/components/base/input/Input.astro +0 -79
  239. package/src/components/base/input/InputElement.astro +0 -69
  240. package/src/components/base/radio/Radio.astro +0 -66
  241. package/src/components/base/radio/RadioElement.astro +0 -34
  242. package/src/components/base/select/Select.astro +0 -90
  243. package/src/components/base/select/SelectElement.astro +0 -56
  244. package/src/components/base/select/SelectOption.astro +0 -32
  245. package/src/components/base/switch/Switch.astro +0 -55
  246. package/src/components/base/switch/SwitchElement.astro +0 -84
  247. package/src/components/base/table/Table.astro +0 -57
  248. package/src/components/base/table/TableBody.astro +0 -38
  249. package/src/components/base/table/TableCell.astro +0 -30
  250. package/src/components/base/table/TableFooter.astro +0 -48
  251. package/src/components/base/table/TableHead.astro +0 -31
  252. package/src/components/base/table/TableHeader.astro +0 -44
  253. package/src/components/base/table/TableRow.astro +0 -46
  254. package/src/components/base/textarea/Textarea.astro +0 -79
  255. package/src/components/base/textarea/TextareaElement.astro +0 -68
  256. package/src/components/segment/Box.astro +0 -46
  257. package/src/components/segment/Card.astro +0 -114
  258. package/src/components/segment/Footer.astro +0 -94
  259. package/src/components/segment/Header.astro +0 -100
  260. package/src/components/segment/Section.astro +0 -103
  261. package/src/components/segment/_regels.md +0 -32
  262. package/src/components/typography/Heading.astro +0 -66
  263. package/src/components/typography/List.astro +0 -47
  264. package/src/components/typography/ListItem.astro +0 -36
  265. package/src/components/typography/Paragraph.astro +0 -36
  266. package/src/components/typography/Tagline.astro +0 -36
  267. package/src/components/typography/Text.astro +0 -37
  268. package/src/components/utility/Head.astro +0 -83
  269. package/src/components/utility/Layout.astro +0 -46
  270. package/src/content/pages/index.md +0 -2
  271. package/src/css/color.scss +0 -289
  272. package/src/css/size.scss +0 -296
  273. package/src/css/utils.scss +0 -16
  274. package/src/index.ts +0 -71
  275. package/src/integration/integration.ts +0 -88
  276. package/src/integration/tailwind.ts +0 -34
  277. package/src/integration/unocss.ts +0 -38
  278. /package/src/{_archive → utils/_archive}/Childmorphic.ts +0 -0
  279. /package/src/{_archive → utils/_archive}/getAllCollections.ts +0 -0
  280. /package/src/{_archive → utils/_archive}/getCollectionCascade.ts +0 -0
  281. /package/src/{_archive → utils/_archive}/getPathname.ts +0 -0
  282. /package/src/{_archive → utils/_archive}/staticPageSchema.ts +0 -0
  283. /package/src/{_archive → utils/_archive}/transform/transform.ts +0 -0
  284. /package/src/{_archive → utils/_archive}/transform/transformCasing.ts +0 -0
  285. /package/src/{_archive → utils/_archive}/transform/transformReferences.ts +0 -0
  286. /package/src/{_archive → utils/_archive}/transform/transformSelfs.ts +0 -0
  287. /package/src/{_archive → utils/_archive}/transform/transformUnderscores.ts +0 -0
@@ -1,29 +1,26 @@
1
1
  ---
2
2
  import type { HTMLTag, Polymorphic } from 'astro/types'
3
- import Component from '../_Component.astro'
3
+ import Root from 'fulldev-ui/components/Root.astro'
4
4
 
5
5
  type Props<As extends HTMLTag = 'div'> = Polymorphic<{ as: As }> & {
6
6
  color?: 'base' | 'brand'
7
- size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
8
- compact?: boolean
7
+ size?: 'sm' | 'md' | 'lg'
9
8
  position?: 'inset'
10
9
  }
11
10
 
12
11
  const { ...rest } = Astro.props
13
12
  ---
14
13
 
15
- <Component
16
- class:list={['carousel']}
14
+ <Root
15
+ class:list="carousel"
17
16
  {...rest}
18
17
  >
19
18
  <slot />
20
- </Component>
19
+ </Root>
21
20
 
22
21
  <style is:global lang="scss">
23
- @import '../../css/utils.scss';
24
-
25
- @include component('carousel') {
26
- --column-width: calc(16 * var(--space-4));
22
+ .carousel {
23
+ --column-width: calc(21 * var(--space-4));
27
24
 
28
25
  display: flex;
29
26
  position: relative;
@@ -37,7 +34,7 @@ const { ...rest } = Astro.props
37
34
  scroll-behavior: smooth;
38
35
  scroll-snap-type: x mandatory;
39
36
 
40
- > .full {
37
+ > .root {
41
38
  flex-grow: 0;
42
39
  flex-shrink: 0;
43
40
  width: var(--column-width);
@@ -45,11 +42,11 @@ const { ...rest } = Astro.props
45
42
  }
46
43
 
47
44
  &.position-inset {
48
- margin-right: calc(var(--inner-x) * -1);
49
- margin-left: calc(var(--inner-x) * -1);
50
- padding-right: var(--inner-x);
51
- padding-left: var(--inner-x);
52
- width: calc(100% + var(--inner-x) * 2);
45
+ margin-right: calc(var(--inset-right) * -1);
46
+ margin-left: calc(var(--inset-left) * -1);
47
+ padding-right: var(--inset-right);
48
+ padding-left: var(--inset-left);
49
+ width: calc(100% + var(--inset-left) + var(--inset-right));
53
50
  }
54
51
  }
55
52
  </style>
@@ -0,0 +1,63 @@
1
+ ---
2
+ import type { HTMLAttributes } from 'astro/types'
3
+ import Label from 'fulldev-ui/components/Label.astro'
4
+ import Root from 'fulldev-ui/components/Root.astro'
5
+
6
+ type Props = Omit<HTMLAttributes<'input'>, 'type'> & {
7
+ label?: string
8
+ color?: 'base' | 'brand'
9
+ contrast?: boolean
10
+ icon?: string
11
+ }
12
+
13
+ const {
14
+ label,
15
+ contrast,
16
+ icon,
17
+ name,
18
+ placeholder,
19
+ value,
20
+ disabled,
21
+ checked,
22
+ required,
23
+ ...rest
24
+ } = Astro.props
25
+ ---
26
+
27
+ <Root
28
+ structure="row"
29
+ class:list="checkbox"
30
+ {...rest}
31
+ >
32
+ <Root
33
+ as="input"
34
+ type="checkbox"
35
+ id={name}
36
+ if={name}
37
+ {disabled}
38
+ {required}
39
+ {checked}
40
+ {name}
41
+ {...rest}
42
+ />
43
+ <Label
44
+ for={name}
45
+ html={label}
46
+ {contrast}
47
+ />
48
+ </Root>
49
+
50
+ <style>
51
+ .checkbox {
52
+ align-items: center;
53
+ gap: var(--space-1);
54
+
55
+ input {
56
+ display: block;
57
+ width: var(--text-2);
58
+ height: var(--text-2);
59
+ accent-color: var(--color-9);
60
+ color-scheme: dark;
61
+ }
62
+ }
63
+ </style>
@@ -1,11 +1,10 @@
1
1
  ---
2
2
  import type { HTMLTag, Polymorphic } from 'astro/types'
3
- import Component from '../_Component.astro'
3
+ import Root from 'fulldev-ui/components/Root.astro'
4
4
 
5
5
  type Props<As extends HTMLTag = 'div'> = Polymorphic<{ as: As }> & {
6
6
  color?: 'base' | 'brand'
7
- size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
8
- compact?: boolean
7
+ size?: 'sm' | 'md' | 'lg'
9
8
  align?: 'start' | 'center' | 'end'
10
9
  space?: 'none' | 'auto'
11
10
  }
@@ -13,19 +12,17 @@ type Props<As extends HTMLTag = 'div'> = Polymorphic<{ as: As }> & {
13
12
  const { space = 'auto', align = 'start', ...rest } = Astro.props
14
13
  ---
15
14
 
16
- <Component
17
- class:list={['column']}
15
+ <Root
16
+ class:list="column"
18
17
  {align}
19
18
  {space}
20
19
  {...rest}
21
20
  >
22
21
  <slot />
23
- </Component>
22
+ </Root>
24
23
 
25
24
  <style is:global lang="scss">
26
- @import '../../css/utils.scss';
27
-
28
- @include component('column') {
25
+ .column {
29
26
  display: flex;
30
27
  position: relative;
31
28
  flex-direction: column;
@@ -48,10 +45,18 @@ const { space = 'auto', align = 'start', ...rest } = Astro.props
48
45
  align-items: flex-end;
49
46
  }
50
47
 
48
+ &.justify-start {
49
+ justify-content: center;
50
+ }
51
+
51
52
  &.justify-center {
52
53
  justify-content: center;
53
54
  }
54
55
 
56
+ &.justify-end {
57
+ justify-content: flex-end;
58
+ }
59
+
55
60
  &.space-auto {
56
61
  > * + * {
57
62
  margin-top: var(--space-auto);
@@ -0,0 +1,65 @@
1
+ ---
2
+ import type { ComponentProps, HTMLTag } from 'astro/types'
3
+ import Button from './Button.astro'
4
+ import Card from './Card.astro'
5
+
6
+ type Props<As extends HTMLTag = 'a'> = ComponentProps<typeof Card<As>> & {
7
+ label?: string
8
+ icon?: string
9
+ }
10
+
11
+ const {
12
+ variant = 'secondary',
13
+ label,
14
+ icon,
15
+ id = 'dialog',
16
+ ...rest
17
+ } = Astro.props
18
+ ---
19
+
20
+ <Button
21
+ as="button"
22
+ type="button"
23
+ id={`${id}-button`}
24
+ html={label}
25
+ icon={icon}
26
+ variant="secondary"
27
+ onclick={`document.getElementById('${id}').showModal()`}
28
+ />
29
+
30
+ <dialog
31
+ class="dialog"
32
+ {id}
33
+ onclick={`event.target === this && this.close()`}
34
+ >
35
+ <Card
36
+ as="div"
37
+ {...rest}
38
+ >
39
+ <slot />
40
+ </Card>
41
+ </dialog>
42
+
43
+ <style lang="scss" is:global>
44
+ .dialog {
45
+ margin: auto !important;
46
+ outline: 0;
47
+ border: 0;
48
+ background: none;
49
+ padding: var(--space-7) var(--gutter);
50
+ max-width: 768px;
51
+ max-height: 80vh;
52
+ overflow: hidden;
53
+
54
+ &::backdrop {
55
+ background: rgba(0, 0, 0, 0.5);
56
+ }
57
+
58
+ .card {
59
+ width: 100%;
60
+ height: 100%;
61
+ max-height: 80vh !important;
62
+ overflow: auto !important;
63
+ }
64
+ }
65
+ </style>
@@ -0,0 +1,99 @@
1
+ ---
2
+ import type { ComponentProps, HTMLTag } from 'astro/types'
3
+ import Box from './Box.astro'
4
+ import Button from './Button.astro'
5
+ import Card from './Card.astro'
6
+ import Root from './Root.astro'
7
+
8
+ type Props<As extends HTMLTag = 'a'> = ComponentProps<typeof Card<As>> & {
9
+ label?: string
10
+ icon?: string
11
+ position?: 'left' | 'right'
12
+ }
13
+
14
+ const {
15
+ id = 'drawer',
16
+ frame = 'fill',
17
+ position = 'left',
18
+ label,
19
+ icon,
20
+ ...rest
21
+ } = Astro.props
22
+ ---
23
+
24
+ <Button
25
+ class:list="drawer-button"
26
+ as="button"
27
+ variant="secondary"
28
+ type="button"
29
+ id={`${id}-button`}
30
+ html={label}
31
+ icon={icon}
32
+ onclick={`document.getElementById('${id}').showModal()`}
33
+ />
34
+
35
+ <Root
36
+ as="dialog"
37
+ class="drawer"
38
+ {id}
39
+ {position}
40
+ onclick={`event.target === this && this.close()`}
41
+ >
42
+ <Box
43
+ class:list={[`frame-${frame}`, `position-${position}`]}
44
+ {...rest}
45
+ >
46
+ <slot />
47
+ </Box>
48
+ </Root>
49
+
50
+ <style lang="scss" is:global>
51
+ .drawer {
52
+ flex-shrink: 0;
53
+ align-items: stretch;
54
+ box-sizing: border-box;
55
+ margin: 0 !important;
56
+ outline: 0;
57
+ border: 0;
58
+ background: var(--color-2);
59
+ padding: 0;
60
+ padding: var(--space-7) var(--space-7) var(--space-7) var(--gutter);
61
+ max-width: 360px;
62
+ height: 100vh;
63
+ max-height: 100vh;
64
+
65
+ &::backdrop {
66
+ background: rgba(0, 0, 0, 0.5);
67
+ }
68
+
69
+ &.position-left {
70
+ margin-right: 0;
71
+ }
72
+
73
+ &.position-right {
74
+ right: 0;
75
+ }
76
+
77
+ .box {
78
+ padding: calc(var(--space-5) * 2) calc(var(--space-7) * 3);
79
+ min-width: calc(var(--space-7) * 14);
80
+ height: 100vh;
81
+ overflow-x: hidden;
82
+ overflow-y: auto;
83
+
84
+ &.position-left {
85
+ border-right: 1px solid var(--color-a6);
86
+ padding-left: var(--gutter);
87
+ }
88
+
89
+ &.position-right {
90
+ border-left: 1px solid var(--color-a6);
91
+ padding-right: var(--gutter);
92
+ }
93
+
94
+ &.frame-fill {
95
+ background-color: var(--color-2);
96
+ }
97
+ }
98
+ }
99
+ </style>
@@ -0,0 +1,144 @@
1
+ ---
2
+ import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
3
+ import Column from 'fulldev-ui/components/Column.astro'
4
+ import Heading from 'fulldev-ui/components/Heading.astro'
5
+ import Link from 'fulldev-ui/components/Link.astro'
6
+ import Root from 'fulldev-ui/components/Root.astro'
7
+ import Text from 'fulldev-ui/components/Text.astro'
8
+ import Logo from 'fulldev-ui/components/experimental/Logo.astro'
9
+
10
+ type Props<As extends HTMLTag = 'footer'> = Polymorphic<{ as: As }> & {
11
+ structure?: 'spread' | 'row' | 'split' | 'column'
12
+ variant?: 'base' | 'ghost' | 'subtle' | 'soft' | 'surface' | 'outline'
13
+ frame?: 'fill' | 'panel' | 'contain'
14
+ align?: 'start' | 'center' | 'end'
15
+ size?: 'sm' | 'md' | 'lg'
16
+ theme?: 'light' | 'dark'
17
+ color?: 'base' | 'brand'
18
+ space?: 'none' | 'auto'
19
+ logo?: string
20
+ heading?: string
21
+ title?: string
22
+ description?: string
23
+ text?: string
24
+ html?: string
25
+ columns?: [
26
+ {
27
+ heading: string
28
+ links: ComponentProps<typeof Link<'a'>>[]
29
+ },
30
+ ]
31
+ }
32
+
33
+ const {
34
+ as = 'footer',
35
+ space = 'auto',
36
+ variant = 'subtle',
37
+ frame = 'fill',
38
+ structure = 'grid',
39
+ size = 'sm',
40
+ logo,
41
+ heading,
42
+ columns,
43
+ text,
44
+ title,
45
+ description,
46
+ html,
47
+ ...rest
48
+ } = Astro.props
49
+ ---
50
+
51
+ <Root
52
+ class:list="footer"
53
+ {structure}
54
+ {as}
55
+ {variant}
56
+ {frame}
57
+ {space}
58
+ {size}
59
+ {...rest}
60
+ >
61
+ <Column>
62
+ <Column
63
+ style={{ textDecoration: 'none' }}
64
+ as="a"
65
+ href="/"
66
+ >
67
+ <Logo src={logo} />
68
+ <Heading
69
+ level={4}
70
+ color="base"
71
+ html={heading || title}
72
+ />
73
+ </Column>
74
+ <Text
75
+ color="base"
76
+ html={html || text || description}
77
+ />
78
+ </Column>
79
+
80
+ {
81
+ columns?.map(({ heading, links }) => (
82
+ <Column>
83
+ <Heading
84
+ html={heading}
85
+ level={4}
86
+ />
87
+ {links.map((link) => (
88
+ <Link {...link} />
89
+ ))}
90
+ </Column>
91
+ ))
92
+ }
93
+ </Root>
94
+
95
+ <style is:global lang="scss">
96
+ .footer {
97
+ --inset-top: var(--space-7);
98
+ --inset-left: var(--gutter-left);
99
+ --inset-right: var(--gutter-right);
100
+ --inset-bottom: var(--space-7);
101
+
102
+ margin-top: auto;
103
+ width: 100%;
104
+
105
+ &.frame-none {
106
+ border-top: 1px solid var(--base-a6);
107
+ padding: var(--space-7) var(--gutter);
108
+ }
109
+
110
+ &.frame-fill {
111
+ border-top: 1px solid var(--base-a6);
112
+ background-color: var(--color-2);
113
+ padding: var(--space-7) var(--gutter);
114
+ }
115
+
116
+ &.frame-panel {
117
+ margin: var(--space-7) var(--gutter);
118
+ border: 1px solid var(--base-a6);
119
+ border-radius: var(--radius-2);
120
+ background-color: var(--color-2);
121
+ padding: var(--space-6) min(var(--gutter), var(--space-7));
122
+ max-width: calc(100vw - 2 * var(--gutter));
123
+ overflow: hidden;
124
+
125
+ @media (min-width: 1024px) {
126
+ padding-top: var(--space-7);
127
+ padding-bottom: var(--space-7);
128
+ }
129
+ }
130
+
131
+ &.align-start {
132
+ align-items: flex-start;
133
+ text-align: left;
134
+ }
135
+
136
+ &.align-center {
137
+ align-items: center;
138
+ }
139
+
140
+ &.align-end {
141
+ align-items: flex-end;
142
+ }
143
+ }
144
+ </style>
@@ -1,28 +1,25 @@
1
1
  ---
2
2
  import type { HTMLTag, Polymorphic } from 'astro/types'
3
- import Component from '../_Component.astro'
3
+ import Root from 'fulldev-ui/components/Root.astro'
4
4
 
5
5
  type Props<As extends HTMLTag = 'div'> = Polymorphic<{ as: As }> & {
6
6
  color?: 'base' | 'brand'
7
- size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
8
- compact?: boolean
7
+ size?: 'sm' | 'md' | 'lg'
9
8
  }
10
9
 
11
10
  const { ...rest } = Astro.props
12
11
  ---
13
12
 
14
- <Component
15
- class:list={['grid']}
13
+ <Root
14
+ class:list="grid"
16
15
  {...rest}
17
16
  >
18
17
  <slot />
19
- </Component>
18
+ </Root>
20
19
 
21
20
  <style is:global lang="scss">
22
- @import '../../css/utils.scss';
23
-
24
- @include component('grid') {
25
- --column-width: calc(15 * var(--space-4));
21
+ .grid {
22
+ --column-width: calc(21 * var(--space-4));
26
23
 
27
24
  display: grid;
28
25
  position: relative;
@@ -0,0 +1,85 @@
1
+ ---
2
+ import { AstroSeo } from '@astrolib/seo'
3
+ import type { CollectionEntry } from 'astro:content'
4
+ import { ViewTransitions } from 'astro:transitions'
5
+
6
+ type Props = Partial<CollectionEntry<'pages'>>
7
+
8
+ const { data, render } = Astro.props
9
+ const { title, description, image, seo, code } = data || {}
10
+
11
+ const renderTitle = render && (await render()).headings[0]?.text
12
+ const mergedTitle = seo?.title || title || renderTitle
13
+ const mergedDescription = seo?.description || description
14
+ const mergedImage = (seo?.image || image)?.startsWith('/')
15
+ ? (Astro.url.origin ?? '' + (seo?.image || image) ?? '')
16
+ : seo?.image || image
17
+ ---
18
+
19
+ <head>
20
+ <meta charset="utf-8" />
21
+ <meta
22
+ content="width=device-width, initial-scale=1, viewport-fit=cover"
23
+ name="viewport"
24
+ />
25
+ <meta
26
+ name="generator"
27
+ content={Astro.generator}
28
+ />
29
+ <ViewTransitions />
30
+ <AstroSeo
31
+ title={mergedTitle}
32
+ description={mergedDescription}
33
+ openGraph={{
34
+ title: mergedTitle,
35
+ description: mergedDescription,
36
+ images: mergedImage
37
+ ? [
38
+ {
39
+ url: mergedImage,
40
+ alt: mergedTitle,
41
+ },
42
+ ]
43
+ : undefined,
44
+ }}
45
+ />
46
+ <link
47
+ rel="apple-touch-icon"
48
+ sizes="76x76"
49
+ href="/favicon/apple-touch-icon.png"
50
+ />
51
+ <link
52
+ rel="icon"
53
+ type="image/png"
54
+ sizes="32x32"
55
+ href="/favicon/favicon-32x32.png"
56
+ />
57
+ <link
58
+ rel="icon"
59
+ type="image/png"
60
+ sizes="16x16"
61
+ href="/favicon/favicon-16x16.png"
62
+ />
63
+ <link
64
+ rel="manifest"
65
+ href="/favicon/site.webmanifest"
66
+ />
67
+ <link
68
+ rel="mask-icon"
69
+ href="/favicon/safari-pinned-tab.svg"
70
+ />
71
+ <link
72
+ rel="shortcut icon"
73
+ href="/favicon/favicon.ico"
74
+ />
75
+ <meta
76
+ name="msapplication-config"
77
+ content="/favicon/browserconfig.xml"
78
+ />
79
+ <meta
80
+ name="theme-color"
81
+ content="#000000"
82
+ />
83
+ <slot name="head" />
84
+ <Fragment set:html={code?.head} />
85
+ </head>