@santi020k/lumen-astro 1.3.0 → 1.4.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.
@@ -0,0 +1,35 @@
1
+ ---
2
+ import type { HTMLAttributes } from 'astro/types'
3
+
4
+ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
5
+
6
+ interface Props extends HTMLAttributes<'div'> {
7
+ class?: string | null
8
+ className?: string
9
+ intensity?: 'medium' | 'strong' | 'subtle'
10
+ tone?: 'accent' | 'brand' | 'neutral'
11
+ variant?: 'aurora' | 'dots' | 'grid' | 'rays'
12
+ }
13
+
14
+ const {
15
+ class: classProp = '',
16
+ className = '',
17
+ intensity = 'medium',
18
+ tone = 'brand',
19
+ variant = 'aurora',
20
+ ...rest
21
+ } = Astro.props
22
+
23
+ const { classList, passthrough } = resolveLumenAstroProps(rest, [
24
+ 'ui-backdrop',
25
+ `ui-backdrop--${variant}`,
26
+ `ui-backdrop--${tone}`,
27
+ `ui-backdrop--${intensity}`
28
+ ], classProp, className)
29
+ ---
30
+
31
+ <div class:list={classList} {...passthrough}>
32
+ <div class="ui-backdrop__content">
33
+ <slot />
34
+ </div>
35
+ </div>
@@ -0,0 +1,43 @@
1
+ ---
2
+ import type { HTMLAttributes } from 'astro/types'
3
+
4
+ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
5
+
6
+ interface Props extends HTMLAttributes<'div'> {
7
+ class?: string | null
8
+ className?: string
9
+ label?: string
10
+ size?: 'lg' | 'md' | 'sm'
11
+ tone?: 'accent' | 'brand' | 'neutral'
12
+ variant?: 'glow' | 'grid' | 'orbit'
13
+ }
14
+
15
+ const {
16
+ class: classProp = '',
17
+ className = '',
18
+ label,
19
+ size = 'md',
20
+ tone = 'brand',
21
+ variant = 'orbit',
22
+ ...rest
23
+ } = Astro.props
24
+
25
+ const { classList, passthrough } = resolveLumenAstroProps(rest, [
26
+ 'ui-graphic',
27
+ `ui-graphic--${variant}`,
28
+ `ui-graphic--${tone}`,
29
+ `ui-graphic--${size}`
30
+ ], classProp, className)
31
+ ---
32
+
33
+ <div
34
+ aria-hidden={label ? undefined : 'true'}
35
+ aria-label={label}
36
+ class:list={classList}
37
+ role={label ? 'img' : undefined}
38
+ {...passthrough}
39
+ >
40
+ <div class="ui-graphic__content">
41
+ <slot />
42
+ </div>
43
+ </div>
@@ -0,0 +1,67 @@
1
+ ---
2
+ import type { HTMLAttributes } from 'astro/types'
3
+
4
+ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
5
+
6
+ interface Props extends HTMLAttributes<'span'> {
7
+ class?: string | null
8
+ className?: string
9
+ label?: string
10
+ size?: 'lg' | 'md' | 'sm'
11
+ tone?: 'accent' | 'auto' | 'brand' | 'neutral'
12
+ variant?: 'empty' | 'error' | 'offline' | 'success'
13
+ }
14
+
15
+ const {
16
+ class: classProp = '',
17
+ className = '',
18
+ label,
19
+ size = 'md',
20
+ tone = 'auto',
21
+ variant = 'empty',
22
+ ...rest
23
+ } = Astro.props
24
+
25
+ const { classList, passthrough } = resolveLumenAstroProps(rest, [
26
+ 'ui-illustration',
27
+ `ui-illustration--${variant}`,
28
+ `ui-illustration--${tone}`,
29
+ `ui-illustration--${size}`
30
+ ], classProp, className)
31
+ ---
32
+
33
+ <span
34
+ aria-hidden={label ? undefined : 'true'}
35
+ aria-label={label}
36
+ class:list={classList}
37
+ role={label ? 'img' : undefined}
38
+ {...passthrough}
39
+ >
40
+ <svg aria-hidden="true" fill="none" viewBox="0 0 120 120">
41
+ <circle class="ui-illustration__wash" cx="60" cy="60" r="48" />
42
+ {variant === 'empty' && (
43
+ <g>
44
+ <path d="M32 48h56l-7 35H39l-7-35Z" />
45
+ <path d="M43 48 49 36h22l6 12M47 66h26" />
46
+ </g>
47
+ )}
48
+ {variant === 'success' && (
49
+ <g>
50
+ <circle cx="60" cy="60" r="28" />
51
+ <path d="m45 60 10 10 21-23" />
52
+ </g>
53
+ )}
54
+ {variant === 'error' && (
55
+ <g>
56
+ <circle cx="60" cy="60" r="28" />
57
+ <path d="m49 49 22 22m0-22L49 71" />
58
+ </g>
59
+ )}
60
+ {variant === 'offline' && (
61
+ <g>
62
+ <path d="M37 74h44a14 14 0 0 0 1-28 23 23 0 0 0-42-4 16 16 0 0 0-3 32Z" />
63
+ <path d="m38 34 44 52" />
64
+ </g>
65
+ )}
66
+ </svg>
67
+ </span>
package/index.ts CHANGED
@@ -11,6 +11,7 @@ export { default as AspectRatio } from './components/AspectRatio.astro'
11
11
  export { default as Attachment } from './components/Attachment.astro'
12
12
  export { default as Autocomplete } from './components/Autocomplete.astro'
13
13
  export { default as Avatar } from './components/Avatar.astro'
14
+ export { default as Backdrop } from './components/Backdrop.astro'
14
15
  export { default as BackToTop } from './components/BackToTop.astro'
15
16
  export { default as Badge } from './components/Badge.astro'
16
17
  export { default as BarChart } from './components/BarChart.astro'
@@ -65,9 +66,11 @@ export { default as FloatingBadge } from './components/FloatingBadge.astro'
65
66
  export { default as Form } from './components/Form.astro'
66
67
  export { default as FormattedDate } from './components/FormattedDate.astro'
67
68
  export { default as GradientDivider } from './components/GradientDivider.astro'
69
+ export { default as Graphic } from './components/Graphic.astro'
68
70
  export { default as Grid } from './components/Grid.astro'
69
71
  export { default as HoverCard } from './components/HoverCard.astro'
70
72
  export { default as Icon } from './components/Icon.astro'
73
+ export { default as Illustration } from './components/Illustration.astro'
71
74
  export { default as Image } from './components/Image.astro'
72
75
  export { default as Input } from './components/Input.astro'
73
76
  export { default as InputGroup } from './components/InputGroup.astro'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@santi020k/lumen-astro",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -37,8 +37,8 @@
37
37
  ],
38
38
  "dependencies": {
39
39
  "uqr": "^0.1.3",
40
- "@santi020k/lumen": "^1.3.0",
41
- "@santi020k/lumen-core": "^1.3.0"
40
+ "@santi020k/lumen": "^1.4.0",
41
+ "@santi020k/lumen-core": "^1.4.0"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@astrojs/ts-plugin": "^1.10.10",