fulldev-ui 0.3.0-beta.3 → 0.3.3

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 (91) hide show
  1. package/.astro/settings.json +1 -1
  2. package/package.json +10 -5
  3. package/src/components/_Block.astro +0 -5
  4. package/src/components/_Component.astro +10 -8
  5. package/src/components/_archive/Body.astro +2 -2
  6. package/src/components/_archive/Nav.astro +12 -0
  7. package/src/components/_todo/Form.astro +1 -1
  8. package/src/components/_todo/Prose.astro +7 -7
  9. package/src/components/base/Badge.astro +20 -16
  10. package/src/components/base/Button.astro +21 -34
  11. package/src/components/base/Icon.astro +7 -7
  12. package/src/components/base/Image.astro +116 -42
  13. package/src/components/base/Logo.astro +2 -3
  14. package/src/components/base/Rating.astro +30 -29
  15. package/src/components/base/checkbox/Checkbox.astro +52 -0
  16. package/src/components/base/checkbox/CheckboxElement.astro +31 -0
  17. package/src/components/base/input/Input.astro +79 -0
  18. package/src/components/base/input/InputElement.astro +60 -0
  19. package/src/components/base/radio/Radio.astro +66 -0
  20. package/src/components/base/radio/RadioElement.astro +34 -0
  21. package/src/components/base/select/Select.astro +90 -0
  22. package/src/components/base/select/SelectElement.astro +56 -0
  23. package/src/components/base/select/SelectOption.astro +32 -0
  24. package/src/components/base/switch/Switch.astro +55 -0
  25. package/src/components/base/{Switch.astro → switch/SwitchElement.astro} +15 -13
  26. package/src/components/base/table/Table.astro +55 -0
  27. package/src/components/base/table/TableBody.astro +39 -0
  28. package/src/components/base/table/TableCell.astro +30 -0
  29. package/src/components/base/table/TableFooter.astro +48 -0
  30. package/src/components/base/table/TableHead.astro +31 -0
  31. package/src/components/base/table/TableHeader.astro +44 -0
  32. package/src/components/base/table/TableRow.astro +46 -0
  33. package/src/components/base/textarea/Textarea.astro +79 -0
  34. package/src/components/base/textarea/TextareaElement.astro +61 -0
  35. package/src/components/segment/Card.astro +42 -19
  36. package/src/components/segment/Footer.astro +88 -0
  37. package/src/components/segment/Header.astro +48 -19
  38. package/src/components/segment/Section.astro +66 -32
  39. package/src/components/segment/_regels.md +32 -0
  40. package/src/components/structure/Bento.astro +38 -0
  41. package/src/components/structure/Box.astro +30 -0
  42. package/src/components/structure/Carousel.astro +55 -0
  43. package/src/components/structure/Column.astro +46 -0
  44. package/src/components/structure/Grid.astro +33 -0
  45. package/src/components/structure/Masonry.astro +42 -0
  46. package/src/components/structure/Row.astro +44 -0
  47. package/src/components/structure/Split.astro +54 -0
  48. package/src/components/structure/Spread.astro +45 -0
  49. package/src/components/structure/Wrap.astro +44 -0
  50. package/src/components/typography/Heading.astro +37 -28
  51. package/src/components/typography/Label.astro +4 -8
  52. package/src/components/typography/Link.astro +40 -12
  53. package/src/components/typography/List.astro +12 -13
  54. package/src/components/typography/ListItem.astro +11 -10
  55. package/src/components/typography/Paragraph.astro +4 -9
  56. package/src/components/typography/Tagline.astro +11 -10
  57. package/src/components/typography/Text.astro +5 -9
  58. package/src/content/config.ts +1 -1
  59. package/src/css/color.scss +289 -0
  60. package/src/css/size.scss +293 -0
  61. package/src/css/space.scss +94 -0
  62. package/src/css/styles.css +1 -2
  63. package/src/index.ts +30 -12
  64. package/src/integration/tailwind.ts +34 -0
  65. package/src/integration/unocss.ts +38 -0
  66. package/src/schemas/schemas.ts +45 -0
  67. package/src/components/_archive/Row.astro +0 -26
  68. package/src/components/_todo/Footer.astro +0 -66
  69. package/src/components/_todo/todo.md +0 -10
  70. package/src/components/base/Checkbox.astro +0 -41
  71. package/src/components/base/Input.astro +0 -59
  72. package/src/components/base/Radio.astro +0 -39
  73. package/src/components/base/Select.astro +0 -69
  74. package/src/components/base/SelectOption.astro +0 -27
  75. package/src/components/base/Textarea.astro +0 -34
  76. package/src/components/base/todo.md +0 -7
  77. package/src/components/segment/Box.astro +0 -41
  78. package/src/components/segment/Deck.astro +0 -40
  79. package/src/components/segment/Group.astro +0 -29
  80. package/src/components/typography/todo.md +0 -3
  81. package/src/css/color.css +0 -88
  82. package/src/css/props/align.scss +0 -20
  83. package/src/css/props/frame.scss +0 -153
  84. package/src/css/props/mask +0 -1
  85. package/src/css/props/position.scss +0 -33
  86. package/src/css/props/ratio +0 -1
  87. package/src/css/props/structure.scss +0 -228
  88. package/src/css/props/variant.scss +0 -130
  89. package/src/css/radix.css +0 -281
  90. package/src/css/size.css +0 -334
  91. /package/src/schemas/{collection.ts → collection-old-schemas.ts} +0 -0
package/src/index.ts CHANGED
@@ -1,21 +1,31 @@
1
1
  // Schemas and utils
2
- export * from './schemas/collection'
2
+ export * from './schemas/schemas'
3
3
 
4
4
  // Base components
5
5
  export { default as Badge } from './components/base/Badge.astro'
6
6
  export { default as Button } from './components/base/Button.astro'
7
- export { default as Checkbox } from './components/base/Checkbox.astro'
8
7
  export { default as Icon } from './components/base/Icon.astro'
9
8
  export { default as Image } from './components/base/Image.astro'
10
- export { default as Input } from './components/base/Input.astro'
11
9
  export { default as Logo } from './components/base/Logo.astro'
12
- export { default as Radio } from './components/base/Radio.astro'
13
10
  export { default as Rating } from './components/base/Rating.astro'
14
- export { default as Select } from './components/base/Select.astro'
15
- export { default as SelectOption } from './components/base/SelectOption.astro'
16
- export { default as Switch } from './components/base/Switch.astro'
17
- export { default as Textarea } from './components/base/Textarea.astro'
18
11
  export { default as Video } from './components/base/Video.astro'
12
+ export { default as Checkbox } from './components/base/checkbox/Checkbox.astro'
13
+ export { default as Input } from './components/base/input/Input.astro'
14
+ export { default as InputElement } from './components/base/input/InputElement.astro'
15
+ export { default as Radio } from './components/base/radio/Radio.astro'
16
+ export { default as Select } from './components/base/select/Select.astro'
17
+ export { default as SelectElement } from './components/base/select/SelectElement.astro'
18
+ export { default as SelectOption } from './components/base/select/SelectOption.astro'
19
+ export { default as Switch } from './components/base/switch/Switch.astro'
20
+ export { default as Table } from './components/base/table/Table.astro'
21
+ export { default as TableBody } from './components/base/table/TableBody.astro'
22
+ export { default as TableCell } from './components/base/table/TableCell.astro'
23
+ export { default as TableFooter } from './components/base/table/TableFooter.astro'
24
+ export { default as TableHead } from './components/base/table/TableHead.astro'
25
+ export { default as TableHeader } from './components/base/table/TableHeader.astro'
26
+ export { default as TableRow } from './components/base/table/TableRow.astro'
27
+ export { default as Textarea } from './components/base/textarea/Textarea.astro'
28
+ export { default as TextareaElement } from './components/base/textarea/TextareaElement.astro'
19
29
 
20
30
  // Typography components
21
31
  export { default as Heading } from './components/typography/Heading.astro'
@@ -31,17 +41,25 @@ export { default as Text } from './components/typography/Text.astro'
31
41
  export { default as Body } from './components/_archive/Body.astro'
32
42
  export { default as Main } from './components/_archive/Main.astro'
33
43
  export { default as Nav } from './components/_archive/Nav.astro'
34
- export { default as Footer } from './components/_todo/Footer.astro'
35
44
  export { default as Form } from './components/_todo/Form.astro'
36
45
  export { default as Prose } from './components/_todo/Prose.astro'
37
46
  export { default as Writeup } from './components/_todo/Writeup.astro'
38
- export { default as Box } from './components/segment/Box.astro'
39
47
  export { default as Card } from './components/segment/Card.astro'
40
- export { default as Deck } from './components/segment/Deck.astro'
41
- export { default as Group } from './components/segment/Group.astro'
48
+ export { default as Footer } from './components/segment/Footer.astro'
42
49
  export { default as Header } from './components/segment/Header.astro'
43
50
  export { default as Section } from './components/segment/Section.astro'
44
51
 
52
+ // Structure components
53
+ export { default as Bento } from './components/structure/Bento.astro'
54
+ export { default as Carousel } from './components/structure/Carousel.astro'
55
+ export { default as Column } from './components/structure/Column.astro'
56
+ export { default as Grid } from './components/structure/Grid.astro'
57
+ export { default as Masonry } from './components/structure/Masonry.astro'
58
+ export { default as Row } from './components/structure/Row.astro'
59
+ export { default as Split } from './components/structure/Split.astro'
60
+ export { default as Spread } from './components/structure/Spread.astro'
61
+ export { default as Wrap } from './components/structure/Wrap.astro'
62
+
45
63
  // Utility components
46
64
  export { default as Block } from './components/_Block.astro'
47
65
  export { default as Blocks } from './components/_Blocks.astro'
@@ -0,0 +1,34 @@
1
+ import plugin from 'tailwindcss/plugin'
2
+
3
+ export default plugin(() => {}, {
4
+ theme: {
5
+ spacing: {
6
+ 'space-1': 'var(--space-1)',
7
+ 'space-2': 'var(--space-2)',
8
+ 'space-3': 'var(--space-3)',
9
+ 'space-4': 'var(--space-4)',
10
+ 'space-5': 'var(--space-5)',
11
+ 'space-6': 'var(--space-6)',
12
+ 'space-7': 'var(--space-7)',
13
+ },
14
+ borderRadius: {
15
+ 1: 'var(--radius-1)',
16
+ 2: 'var(--radius-2)',
17
+ 3: 'var(--radius-3)',
18
+ },
19
+ fontSize: {
20
+ 1: 'var(--text-1)',
21
+ 2: 'var(--text-2)',
22
+ 3: 'var(--text-3)',
23
+ 4: 'var(--text-4)',
24
+ 5: 'var(--text-5)',
25
+ 6: 'var(--text-6)',
26
+ 7: 'var(--text-7)',
27
+ },
28
+ colors: {
29
+ background: 'var(--background)',
30
+ text: 'var(--text)',
31
+ border: 'var(--border)',
32
+ },
33
+ },
34
+ })
@@ -0,0 +1,38 @@
1
+ import { definePreset, presetUno } from 'unocss'
2
+
3
+ export default definePreset((options?: any) => {
4
+ return {
5
+ name: 'fullUI',
6
+ presets: [presetUno()],
7
+ theme: {
8
+ spacing: {
9
+ 'space-1': 'var(--space-1)',
10
+ 'space-2': 'var(--space-2)',
11
+ 'space-3': 'var(--space-3)',
12
+ 'space-4': 'var(--space-4)',
13
+ 'space-5': 'var(--space-5)',
14
+ 'space-6': 'var(--space-6)',
15
+ 'space-7': 'var(--space-7)',
16
+ },
17
+ borderRadius: {
18
+ 1: 'var(--radius-1)',
19
+ 2: 'var(--radius-2)',
20
+ 3: 'var(--radius-3)',
21
+ },
22
+ fontSize: {
23
+ 1: 'var(--text-1)',
24
+ 2: 'var(--text-2)',
25
+ 3: 'var(--text-3)',
26
+ 4: 'var(--text-4)',
27
+ 5: 'var(--text-5)',
28
+ 6: 'var(--text-6)',
29
+ 7: 'var(--text-7)',
30
+ },
31
+ colors: {
32
+ background: 'var(--background)',
33
+ text: 'var(--text)',
34
+ border: 'var(--border)',
35
+ },
36
+ },
37
+ }
38
+ })
@@ -0,0 +1,45 @@
1
+ import { z } from 'astro/zod'
2
+
3
+ export const pathSchema = z.string().transform((value) => {
4
+ const path = value.split(`content`).pop()
5
+ const slug = path?.split('/').pop()?.split('.').shift()
6
+ return slug
7
+ })
8
+
9
+ export const buttonSchema = z.object({
10
+ text: z.string(),
11
+ html: z.string(),
12
+ href: z.string(),
13
+ })
14
+
15
+ const baseSchema = z.object({
16
+ image: z.string(),
17
+ images: z.string().array(),
18
+ icon: z.string(),
19
+ rating: z.number(),
20
+ badge: z.string(),
21
+ tagline: z.string(),
22
+ heading: z.string(),
23
+ text: z.string(),
24
+ list: z.string().array(),
25
+ price: z.string().or(z.number()),
26
+ button: buttonSchema,
27
+ buttons: buttonSchema.array(),
28
+ })
29
+
30
+ export const blockSchema = baseSchema.extend({
31
+ card: baseSchema,
32
+ cards: baseSchema.array(),
33
+ })
34
+
35
+ export const pageSchema = baseSchema.extend({
36
+ title: z.string(),
37
+ description: z.string(),
38
+ head: z
39
+ .object({
40
+ title: z.string(),
41
+ description: z.string(),
42
+ image: z.string().optional(),
43
+ })
44
+ .partial(),
45
+ })
@@ -1,26 +0,0 @@
1
- ---
2
- import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
3
- import Component from '../_Component.astro'
4
-
5
- type Props<As extends HTMLTag = 'div'> = Polymorphic<{ as: As }> &
6
- ComponentProps<typeof Component>
7
-
8
- const { ...rest } = Astro.props
9
- ---
10
-
11
- <Component
12
- class:list={['row']}
13
- {...rest}
14
- >
15
- <slot />
16
- </Component>
17
-
18
- <style is:global lang="scss">
19
- @import '../../css/utils.scss';
20
-
21
- @include component('row') {
22
- display: flex;
23
- align-items: center;
24
- gap: var(--space-4);
25
- }
26
- </style>
@@ -1,66 +0,0 @@
1
- ---
2
- import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
3
- import Component from '../_Component.astro'
4
-
5
- type Props<As extends HTMLTag = 'footer'> = Polymorphic<{ as: As }> &
6
- ComponentProps<typeof Component> & {
7
- structure?: 'spread'
8
- position?: 'relative' | 'sticky' | 'fixed' | 'absolute'
9
- variant?: 'base' | 'raised'
10
- frame?: 'wrapper' | 'container' | 'panel'
11
- align?: 'start' | 'center' | 'end'
12
- }
13
-
14
- const {
15
- as = 'footer',
16
- density = 'base',
17
- frame = 'wrapper',
18
- ...rest
19
- } = Astro.props
20
- ---
21
-
22
- <Component
23
- class:list={['footer']}
24
- {as}
25
- {density}
26
- {frame}
27
- {...rest}
28
- >
29
- <slot />
30
- </Component>
31
-
32
- <style is:global lang="scss">
33
- @import '../../css/utils.scss';
34
-
35
- @include component('footer') {
36
- --inner: var(--element-3);
37
-
38
- display: flex;
39
- top: 0;
40
- right: 0;
41
- left: 0;
42
- justify-content: space-between;
43
- align-items: center;
44
- z-index: 10;
45
- background: var(--background);
46
- padding-top: var(--element-3);
47
- padding-bottom: var(--element-3);
48
- width: 100%;
49
-
50
- // &.panel {
51
- // margin-top: var(--inner);
52
- // }
53
-
54
- &.position-fixed {
55
- position: fixed;
56
- }
57
-
58
- &.position-absolute {
59
- position: absolute;
60
- }
61
-
62
- &.position-sticky {
63
- position: sticky;
64
- }
65
- }
66
- </style>
@@ -1,10 +0,0 @@
1
- # Chores
2
-
3
- # New components
4
- - Footer
5
- - Header
6
- - Nav
7
- - Prose
8
- - Writeup
9
- - Join
10
- - Pile
@@ -1,41 +0,0 @@
1
- ---
2
- import type { ComponentProps } from 'astro/types'
3
-
4
- type Props = ComponentProps<typeof Component>
5
-
6
- const { as = 'input', type = 'checkbox', name, ...rest } = Astro.props
7
- ---
8
-
9
- <Component
10
- class:list={['checkbox']}
11
- if={true}
12
- {as}
13
- type="checkbox"
14
- {...rest}
15
- />
16
-
17
- <style is:global lang="scss">
18
- @import '../../css/utils.scss';
19
-
20
- @include component('checkbox') {
21
- display: block;
22
- border-width: var(--border-width);
23
- border-color: var(--border-color);
24
- border-radius: var(--full-border-radius-2);
25
- background: var(--background);
26
- min-width: var(--element-2);
27
- color: var(--color);
28
- accent-color: var(--10);
29
- font-size: var(--text-body);
30
-
31
- &:hover {
32
- border: var(--border-color-hover);
33
- background: var(--background-hover);
34
- }
35
-
36
- &:active {
37
- border: var(--border-color-active);
38
- background: var(--background-active);
39
- }
40
- }
41
- </style>
@@ -1,59 +0,0 @@
1
- ---
2
- import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
3
- import Component from '../_Component.astro'
4
-
5
- type Props<As extends HTMLTag = 'input'> = Polymorphic<{ as: As }> &
6
- ComponentProps<typeof Component> & {
7
- variant?: 'outline'
8
- }
9
-
10
- const { as = 'input', variant = 'outline', ...rest } = Astro.props
11
- ---
12
-
13
- <Component
14
- class:list={['input']}
15
- if={true}
16
- {as}
17
- {variant}
18
- {...rest}
19
- />
20
-
21
- <style is:global lang="scss">
22
- @import '../../css/utils.scss';
23
-
24
- @include component('input') {
25
- display: flex;
26
- position: relative;
27
- align-items: center;
28
- outline: none;
29
- box-shadow: inset 0 0 0 var(--border-width) var(--border-outline);
30
- border: 0px;
31
- border-radius: var(--radius-1);
32
- background-color: var(--input-background);
33
- padding: var(--element-2);
34
- width: 100%;
35
- min-width: var(--element-2);
36
- height: calc(var(--text-label) + 2 * var(--element-3));
37
- color: var(--foreground);
38
- font-weight: var(--font-weight);
39
- font-size: var(--text-label);
40
- line-height: 1.25;
41
- font-family: var(--font-family);
42
-
43
- &:hover {
44
- outline: none;
45
- box-shadow: inset 0 0 0 1px var(--border-hover);
46
- }
47
-
48
- &:focus {
49
- outline: none;
50
- box-shadow: inset 0 0 0 3px var(--border-hover);
51
- }
52
-
53
- &:disabled {
54
- opacity: 50%;
55
- cursor: not-allowed;
56
- pointer-events: none;
57
- }
58
- }
59
- </style>
@@ -1,39 +0,0 @@
1
- ---
2
- import type { ComponentProps } from 'astro/types'
3
-
4
- type Props = ComponentProps<typeof Component>
5
-
6
- const { as = 'input', type = 'radio', name, ...rest } = Astro.props
7
- ---
8
-
9
- <Component
10
- class:list={['radio']}
11
- if={true}
12
- {as}
13
- type="radio"
14
- {...rest}
15
- />
16
-
17
- <style is:global lang="scss">
18
- @import '../../css/utils.scss';
19
-
20
- @include component('radio') {
21
- border-width: var(--border-width);
22
- border-color: var(--border-color);
23
- border-radius: var(--full-border-radius-2);
24
- background: var(--background);
25
- min-width: var(--element-2);
26
- accent-color: var(--10);
27
- font-size: var(--text-body);
28
-
29
- &:hover {
30
- border: var(--border-color-hover);
31
- background: var(--background-hover);
32
- }
33
-
34
- &:active {
35
- border: var(--border-color-active);
36
- background: var(--background-active);
37
- }
38
- }
39
- </style>
@@ -1,69 +0,0 @@
1
- ---
2
- // TODO clean up the styling. Since before every component in Fullui was just one element, we should decide how we are going to handle situation like this where extra elements are needed.
3
- // I think we should split it up into multiple components, like SelectIcon etc. gr Sil
4
- import type { ComponentProps, Polymorphic } from 'astro/types'
5
- import { isObject } from 'radash'
6
- import Component from '../_Component.astro'
7
- import Icon from './Icon.astro'
8
- import SelectOption from './SelectOption.astro'
9
-
10
- type Props<As extends 'select'> = Polymorphic<{ as: As }> &
11
- ComponentProps<typeof Component> & {
12
- options?: (ComponentProps<typeof SelectOption> | string)[]
13
- }
14
-
15
- const { as = 'select', options, ...rest } = Astro.props
16
- ---
17
-
18
- <Component
19
- as="div"
20
- class:list="select-wrapper"
21
- {...rest}
22
- >
23
- <Component
24
- as="select"
25
- if={options}
26
- class:list={['select input']}
27
- {...rest}
28
- >
29
- <slot name="before" />
30
- {
31
- options?.map((option: any) => {
32
- if (isObject(option)) return <SelectOption {...option} />
33
- else return <SelectOption text={option} />
34
- })
35
- }
36
- <slot />
37
- </Component>
38
- <div class="select-icon-wrapper">
39
- <Icon
40
- class="select-icon"
41
- name="chevron-down"
42
- />
43
- </div>
44
- </Component>
45
-
46
- <style is:global lang="scss">
47
- @import '../../css/utils.scss';
48
-
49
- @include component('select') {
50
- appearance: none;
51
- }
52
-
53
- .select-icon-wrapper {
54
- display: flex;
55
- position: absolute;
56
- top: 0;
57
- right: var(--element-2);
58
- align-items: center;
59
- margin: 0 !important;
60
- padding: 0;
61
- height: 100%;
62
- pointer-events: none;
63
- }
64
-
65
- .full.select-wrapper {
66
- position: relative;
67
- width: 100%;
68
- }
69
- </style>
@@ -1,27 +0,0 @@
1
- ---
2
- import type { HTMLAttributes } from 'astro/types'
3
-
4
- type Props = Omit<HTMLAttributes<'option'>, 'slot'> & {
5
- text?: string
6
- }
7
-
8
- const { text, ...rest } = Astro.props
9
- ---
10
-
11
- <option
12
- class:list={['option']}
13
- {...rest}
14
- >
15
- {text}
16
- <slot />
17
- </option>
18
-
19
- <style>
20
- .full.option {
21
- color: var(--foreground);
22
- font-weight: var(--font-weight);
23
- font-size: var(--text-label);
24
- line-height: 1;
25
- font-family: var(--font-family);
26
- }
27
- </style>
@@ -1,34 +0,0 @@
1
- ---
2
- import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
3
- import Component from '../_Component.astro'
4
-
5
- type Props<As extends HTMLTag = 'textarea'> = Polymorphic<{ as: As }> &
6
- ComponentProps<typeof Component>
7
-
8
- const {
9
- as = 'textarea',
10
- rows = '5',
11
- variant = 'outline',
12
- name,
13
- ...rest
14
- } = Astro.props
15
- ---
16
-
17
- <Component
18
- class:list={['textarea input']}
19
- if={true}
20
- {rows}
21
- {variant}
22
- {as}
23
- {...rest}
24
- />
25
-
26
- <style is:global lang="scss">
27
- @import '../../css/utils.scss';
28
-
29
- @include component('textarea') {
30
- height: calc((var(--text-1) + 2 * var(--element-3)) * 2);
31
- min-height: calc((var(--text-1) + 2 * var(--element-3)) * 1);
32
- resize: vertical;
33
- }
34
- </style>
@@ -1,7 +0,0 @@
1
- # Chores
2
-
3
- # New components
4
- - Stat (for displaying a number with a label)
5
- - Spinner (for loading states)
6
- - Bubble (for whatsapp chat bubbles etc)
7
- - Divider (for separating with a light border)
@@ -1,41 +0,0 @@
1
- ---
2
- import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
3
- import Component from '../_Component.astro'
4
-
5
- type Props<As extends HTMLTag = 'section'> = Polymorphic<{ as: As }> &
6
- ComponentProps<typeof Component> & {
7
- scheme?: 'light' | 'dark'
8
- color?: 'base' | 'brand'
9
- size?: 'sm' | 'md' | 'lg'
10
- compact?: boolean
11
- frame?: 'container' | 'wrapper' | 'panel' | 'viewport' | 'none'
12
- variant?: 'fill' | 'subtle' | 'outline' | 'soft' | 'solid' | 'surface'
13
- align?: 'start' | 'center' | 'end' | 'stretch'
14
- structure?:
15
- | 'row'
16
- | 'column'
17
- | 'split'
18
- | 'spread'
19
- | 'grid'
20
- | 'bento'
21
- | 'masonry'
22
- | 'carousel'
23
- }
24
-
25
- const { ...rest } = Astro.props
26
- ---
27
-
28
- <Component
29
- class:list={['box']}
30
- {...rest}
31
- >
32
- <slot />
33
- </Component>
34
-
35
- <style is:global lang="scss">
36
- @import '../../css/utils.scss';
37
-
38
- @include component('box') {
39
- position: relative;
40
- }
41
- </style>
@@ -1,40 +0,0 @@
1
- ---
2
- import type { HTMLTag, Polymorphic } from 'astro/types'
3
- import Component from '../_Component.astro'
4
-
5
- type Props<As extends HTMLTag = 'div'> = Polymorphic<{ as: As }> & {
6
- scheme?: 'light' | 'dark'
7
- color?: 'base' | 'brand'
8
- compact?: boolean
9
- size?: 'sm' | 'md' | 'lg' | 'xl'
10
- structure?: 'grid' | 'carousel' | 'masonry' | 'bento' | 'row' | 'split'
11
- frame?: 'wrapper' | 'container'
12
- }
13
-
14
- const { as = 'div', structure = 'grid', ...rest } = Astro.props
15
- ---
16
-
17
- <Component
18
- class:list={['deck']}
19
- {as}
20
- {structure}
21
- {...rest}
22
- >
23
- <slot />
24
- </Component>
25
-
26
- <style is:global lang="scss">
27
- @import '../../css/utils.scss';
28
-
29
- @include component('deck') {
30
- position: relative;
31
- width: 100%;
32
-
33
- // &.frame-fill {
34
- // margin-right: calc(var(--space-gutter) * -1);
35
- // margin-left: calc(var(--space-gutter) * -1);
36
- // padding: 0 var(--space-gutter) var(--space-3);
37
- // width: calc(100% + var(--space-gutter) * 2);
38
- // }
39
- }
40
- </style>