@santi020k/lumen-astro 0.1.0 → 0.3.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/README.md +28 -0
- package/components/Accordion.astro +8 -2
- package/components/Affix.astro +1 -1
- package/components/Agenda.astro +1 -1
- package/components/Alert.astro +1 -1
- package/components/AlertDialog.astro +1 -1
- package/components/Anchor.astro +1 -1
- package/components/AnimatedLogo.astro +1 -1
- package/components/AnimatedNumber.astro +1 -1
- package/components/AnimatedPortrait.astro +1 -1
- package/components/AspectRatio.astro +1 -1
- package/components/Attachment.astro +1 -1
- package/components/Autocomplete.astro +1 -1
- package/components/Avatar.astro +1 -1
- package/components/BackToTop.astro +1 -1
- package/components/Badge.astro +1 -1
- package/components/Breadcrumb.astro +1 -1
- package/components/Bubble.astro +1 -1
- package/components/Button.astro +1 -1
- package/components/ButtonGroup.astro +1 -1
- package/components/ButtonLink.astro +5 -4
- package/components/Calendar.astro +1 -1
- package/components/Callout.astro +1 -1
- package/components/Card.astro +3 -2
- package/components/Carousel.astro +1 -1
- package/components/Cascader.astro +1 -1
- package/components/Chart.astro +1 -1
- package/components/Checkbox.astro +1 -1
- package/components/Code.astro +5 -2
- package/components/CodeTabs.astro +92 -0
- package/components/Collapsible.astro +1 -1
- package/components/ColorPicker.astro +1 -1
- package/components/Combobox.astro +1 -1
- package/components/Command.astro +1 -1
- package/components/ContextMenu.astro +1 -1
- package/components/CoverImage.astro +1 -1
- package/components/DataTable.astro +1 -1
- package/components/DatePicker.astro +1 -1
- package/components/DateRangePicker.astro +1 -1
- package/components/Descriptions.astro +1 -1
- package/components/Dialog.astro +5 -1
- package/components/Direction.astro +1 -1
- package/components/Drawer.astro +1 -1
- package/components/DropdownMenu.astro +1 -1
- package/components/Empty.astro +1 -1
- package/components/Eyebrow.astro +1 -1
- package/components/Field.astro +1 -1
- package/components/FileUpload.astro +1 -1
- package/components/FloatingBadge.astro +1 -1
- package/components/FormattedDate.astro +1 -1
- package/components/GradientDivider.astro +1 -1
- package/components/HoverCard.astro +1 -1
- package/components/Icon.astro +5 -1
- package/components/Image.astro +1 -1
- package/components/Input.astro +1 -1
- package/components/InputGroup.astro +1 -1
- package/components/InputOTP.astro +1 -1
- package/components/Item.astro +1 -1
- package/components/Kbd.astro +1 -1
- package/components/Label.astro +1 -1
- package/components/LanguageToggle.astro +1 -1
- package/components/Link.astro +16 -2
- package/components/Marker.astro +1 -1
- package/components/Mentions.astro +1 -1
- package/components/Menubar.astro +1 -1
- package/components/Message.astro +1 -1
- package/components/MessageScroller.astro +1 -1
- package/components/NativeSelect.astro +1 -1
- package/components/NavigationMenu.astro +5 -1
- package/components/NumberField.astro +1 -1
- package/components/Pagination.astro +1 -1
- package/components/Particles.astro +1 -1
- package/components/PhoneInput.astro +1 -1
- package/components/Pill.astro +13 -8
- package/components/Popconfirm.astro +1 -1
- package/components/Popover.astro +1 -1
- package/components/Progress.astro +1 -1
- package/components/Prose.astro +1 -1
- package/components/QRCode.astro +1 -1
- package/components/RadioGroup.astro +1 -1
- package/components/Resizable.astro +1 -1
- package/components/RevealGroup.astro +1 -1
- package/components/RichTextEditor.astro +1 -1
- package/components/Schedule.astro +1 -1
- package/components/ScrollArea.astro +1 -1
- package/components/ScrollReveal.astro +1 -1
- package/components/SearchField.astro +1 -1
- package/components/Segmented.astro +1 -1
- package/components/Select.astro +1 -1
- package/components/Separator.astro +1 -1
- package/components/Sheet.astro +1 -1
- package/components/Sidebar.astro +5 -1
- package/components/Skeleton.astro +1 -1
- package/components/SkipLink.astro +1 -1
- package/components/Slider.astro +1 -1
- package/components/Sonner.astro +1 -1
- package/components/SpeedDial.astro +1 -1
- package/components/Spinner.astro +1 -1
- package/components/Stat.astro +1 -1
- package/components/Stepper.astro +1 -1
- package/components/Switch.astro +1 -1
- package/components/Table.astro +1 -1
- package/components/Tabs.astro +7 -1
- package/components/TagGroup.astro +1 -1
- package/components/Textarea.astro +1 -1
- package/components/ThemeBuilder.astro +1 -1
- package/components/ThemeToggle.astro +13 -1
- package/components/TimeField.astro +1 -1
- package/components/Toast.astro +1 -1
- package/components/Toggle.astro +12 -4
- package/components/ToggleGroup.astro +1 -1
- package/components/Toolbar.astro +1 -1
- package/components/Tooltip.astro +1 -1
- package/components/Tour.astro +1 -1
- package/components/Transfer.astro +1 -1
- package/components/Tree.astro +1 -1
- package/components/TreeGrid.astro +1 -1
- package/components/TreeSelect.astro +1 -1
- package/components/Typography.astro +1 -1
- package/components/VirtualList.astro +1 -1
- package/components/Watermark.astro +1 -1
- package/index.d.ts +1 -0
- package/index.ts +1 -0
- package/package.json +5 -4
- package/runtime/UIPrimitives.astro +255 -146
- package/runtime/controllers/motion.ts +145 -0
- package/styles/layers.css +1 -0
package/README.md
CHANGED
|
@@ -21,6 +21,7 @@ enhances all matching Lumen markup on the page.
|
|
|
21
21
|
With Tailwind, keep the Lumen import in the same shared CSS entry:
|
|
22
22
|
|
|
23
23
|
```css
|
|
24
|
+
@import "@santi020k/lumen-astro/layers.css";
|
|
24
25
|
@import "tailwindcss";
|
|
25
26
|
@import "@santi020k/lumen-astro/styles.css";
|
|
26
27
|
```
|
|
@@ -60,6 +61,33 @@ import { Button, Icon } from '@santi020k/lumen-astro'
|
|
|
60
61
|
<Icon name="search" label="Search" />
|
|
61
62
|
```
|
|
62
63
|
|
|
64
|
+
Lucide intentionally excludes brand marks. For GitHub and other project-specific icons, put the
|
|
65
|
+
SVG in the default slot instead of passing an unsupported `name`; Astro warns about unknown named
|
|
66
|
+
icons during development.
|
|
67
|
+
|
|
68
|
+
## Code tabs
|
|
69
|
+
|
|
70
|
+
Use `CodeTabs` for related install commands, language variants, or configuration examples. Each
|
|
71
|
+
item supplies a stable value, visible label, code string, and optional language. A shared
|
|
72
|
+
`storageKey` keeps matching instances synchronized and remembers the reader's selection.
|
|
73
|
+
|
|
74
|
+
```astro
|
|
75
|
+
---
|
|
76
|
+
import { CodeTabs } from '@santi020k/lumen-astro'
|
|
77
|
+
|
|
78
|
+
const installCommands = [
|
|
79
|
+
{ value: 'pnpm', label: 'pnpm', code: 'pnpm add @santi020k/lumen-astro', language: 'bash' },
|
|
80
|
+
{ value: 'npm', label: 'npm', code: 'npm install @santi020k/lumen-astro', language: 'bash' }
|
|
81
|
+
]
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
<CodeTabs
|
|
85
|
+
ariaLabel="Package manager"
|
|
86
|
+
items={installCommands}
|
|
87
|
+
storageKey="preferred-package-manager"
|
|
88
|
+
/>
|
|
89
|
+
```
|
|
90
|
+
|
|
63
91
|
## Optimized images
|
|
64
92
|
|
|
65
93
|
Lumen's Astro `Image` delegates to `astro:assets`, so imported image metadata, responsive layouts,
|
|
@@ -3,24 +3,30 @@ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
|
|
|
3
3
|
|
|
4
4
|
import type { HTMLAttributes } from 'astro/types'
|
|
5
5
|
|
|
6
|
+
type AccordionVariant = 'default' | 'flush'
|
|
7
|
+
|
|
6
8
|
interface Props extends HTMLAttributes<'div'> {
|
|
7
|
-
class?: string
|
|
9
|
+
class?: string | null
|
|
8
10
|
className?: string
|
|
11
|
+
variant?: AccordionVariant
|
|
9
12
|
}
|
|
10
13
|
|
|
11
14
|
const {
|
|
12
15
|
class: classProp = '',
|
|
13
16
|
className = '',
|
|
17
|
+
variant = 'default',
|
|
14
18
|
...rest
|
|
15
19
|
} = Astro.props
|
|
16
20
|
|
|
17
21
|
const { classList, passthrough } = resolveLumenAstroProps(rest, [
|
|
18
|
-
'ui-accordion'
|
|
22
|
+
'ui-accordion',
|
|
23
|
+
variant === 'flush' && 'ui-accordion--flush'
|
|
19
24
|
], classProp, className)
|
|
20
25
|
---
|
|
21
26
|
|
|
22
27
|
<div
|
|
23
28
|
class:list={classList}
|
|
29
|
+
data-variant={variant}
|
|
24
30
|
{...passthrough}
|
|
25
31
|
>
|
|
26
32
|
<slot />
|
package/components/Affix.astro
CHANGED
|
@@ -4,7 +4,7 @@ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
|
|
|
4
4
|
import type { HTMLAttributes } from 'astro/types'
|
|
5
5
|
|
|
6
6
|
interface Props extends HTMLAttributes<'div'> {
|
|
7
|
-
class?: string
|
|
7
|
+
class?: string | null
|
|
8
8
|
className?: string
|
|
9
9
|
offset?: number
|
|
10
10
|
offsetBottom?: number
|
package/components/Agenda.astro
CHANGED
|
@@ -4,7 +4,7 @@ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
|
|
|
4
4
|
import type { HTMLAttributes } from 'astro/types'
|
|
5
5
|
|
|
6
6
|
interface Props extends HTMLAttributes<'section'> {
|
|
7
|
-
class?: string
|
|
7
|
+
class?: string | null
|
|
8
8
|
className?: string
|
|
9
9
|
glass?: boolean | 'subtle' | 'strong'
|
|
10
10
|
}
|
package/components/Alert.astro
CHANGED
|
@@ -4,7 +4,7 @@ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
|
|
|
4
4
|
import type { HTMLAttributes } from 'astro/types'
|
|
5
5
|
|
|
6
6
|
interface Props extends HTMLAttributes<'aside'> {
|
|
7
|
-
class?: string
|
|
7
|
+
class?: string | null
|
|
8
8
|
className?: string
|
|
9
9
|
glass?: boolean | 'subtle' | 'strong'
|
|
10
10
|
variant?: 'default' | 'destructive' | 'success' | 'warning'
|
|
@@ -4,7 +4,7 @@ import { resolveLumenAstroProps, resolveLumenGlass } from '@santi020k/lumen-core
|
|
|
4
4
|
import type { HTMLAttributes } from 'astro/types'
|
|
5
5
|
|
|
6
6
|
interface Props extends HTMLAttributes<'dialog'> {
|
|
7
|
-
class?: string
|
|
7
|
+
class?: string | null
|
|
8
8
|
className?: string
|
|
9
9
|
glass?: boolean | 'subtle' | 'strong'
|
|
10
10
|
/**
|
package/components/Anchor.astro
CHANGED
|
@@ -4,7 +4,7 @@ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
|
|
|
4
4
|
import type { HTMLAttributes } from 'astro/types'
|
|
5
5
|
|
|
6
6
|
interface Props extends Omit<HTMLAttributes<'span'>, 'prefix'> {
|
|
7
|
-
class?: string
|
|
7
|
+
class?: string | null
|
|
8
8
|
className?: string
|
|
9
9
|
decimals?: number
|
|
10
10
|
duration?: 'fast' | 'standard' | 'slow'
|
|
@@ -4,7 +4,7 @@ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
|
|
|
4
4
|
import type { HTMLAttributes } from 'astro/types'
|
|
5
5
|
|
|
6
6
|
interface Props extends HTMLAttributes<'article'> {
|
|
7
|
-
class?: string
|
|
7
|
+
class?: string | null
|
|
8
8
|
className?: string
|
|
9
9
|
glass?: boolean | 'subtle' | 'strong'
|
|
10
10
|
href?: string
|
package/components/Avatar.astro
CHANGED
package/components/Badge.astro
CHANGED
|
@@ -4,7 +4,7 @@ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
|
|
|
4
4
|
import type { HTMLAttributes } from 'astro/types'
|
|
5
5
|
|
|
6
6
|
interface Props extends HTMLAttributes<'span'> {
|
|
7
|
-
class?: string
|
|
7
|
+
class?: string | null
|
|
8
8
|
className?: string
|
|
9
9
|
variant?: 'default' | 'secondary' | 'outline' | 'destructive' | 'success' | 'warning'
|
|
10
10
|
}
|
package/components/Bubble.astro
CHANGED
|
@@ -4,7 +4,7 @@ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
|
|
|
4
4
|
import type { HTMLAttributes } from 'astro/types'
|
|
5
5
|
|
|
6
6
|
interface Props extends HTMLAttributes<'article'> {
|
|
7
|
-
class?: string
|
|
7
|
+
class?: string | null
|
|
8
8
|
className?: string
|
|
9
9
|
from?: 'user' | 'assistant'
|
|
10
10
|
glass?: boolean | 'subtle' | 'strong'
|
package/components/Button.astro
CHANGED
|
@@ -4,7 +4,7 @@ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
|
|
|
4
4
|
import type { HTMLAttributes } from 'astro/types'
|
|
5
5
|
|
|
6
6
|
interface Props extends HTMLAttributes<'button'> {
|
|
7
|
-
class?: string
|
|
7
|
+
class?: string | null
|
|
8
8
|
className?: string
|
|
9
9
|
loading?: boolean
|
|
10
10
|
size?: 'default' | 'sm' | 'lg' | 'icon'
|
|
@@ -6,13 +6,13 @@ import type { HTMLAttributes } from 'astro/types'
|
|
|
6
6
|
|
|
7
7
|
interface Props extends HTMLAttributes<'a'> {
|
|
8
8
|
ariaLabel?: string
|
|
9
|
-
class?: string
|
|
9
|
+
class?: string | null
|
|
10
10
|
className?: string
|
|
11
11
|
href: string
|
|
12
12
|
newTab?: boolean
|
|
13
13
|
shape?: 'default' | 'icon'
|
|
14
14
|
showArrow?: boolean
|
|
15
|
-
variant?: 'ghost' | 'inline' | 'primary' | 'secondary'
|
|
15
|
+
variant?: 'ghost' | 'inline' | 'primary' | 'secondary' | 'unstyled'
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
const {
|
|
@@ -29,12 +29,13 @@ const {
|
|
|
29
29
|
|
|
30
30
|
const { classList, passthrough } = resolveLumenAstroProps(rest, [
|
|
31
31
|
'ui-button-link',
|
|
32
|
-
'group inline-flex cursor-pointer items-center justify-center gap-2 text-sm font-semibold tracking-[0.01em]',
|
|
33
|
-
variant !== 'inline' && 'min-h-11 rounded-full border',
|
|
32
|
+
variant !== 'unstyled' && 'group inline-flex cursor-pointer items-center justify-center gap-2 text-sm font-semibold tracking-[0.01em]',
|
|
33
|
+
variant !== 'inline' && variant !== 'unstyled' && 'min-h-11 rounded-full border',
|
|
34
34
|
variant === 'primary' && 'ui-button ui-button--primary',
|
|
35
35
|
variant === 'secondary' && 'ui-button ui-button--secondary',
|
|
36
36
|
variant === 'ghost' && 'ui-button ui-button--ghost',
|
|
37
37
|
variant === 'inline' && 'ui-button ui-button--inline',
|
|
38
|
+
variant === 'unstyled' && 'ui-button-link--unstyled',
|
|
38
39
|
shape === 'icon' && variant !== 'inline' && 'ui-button-link--icon'
|
|
39
40
|
], classProp, className)
|
|
40
41
|
---
|
|
@@ -4,7 +4,7 @@ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
|
|
|
4
4
|
import type { HTMLAttributes } from 'astro/types'
|
|
5
5
|
|
|
6
6
|
interface Props extends Omit<HTMLAttributes<'div'>, 'value'> {
|
|
7
|
-
class?: string
|
|
7
|
+
class?: string | null
|
|
8
8
|
className?: string
|
|
9
9
|
disabled?: boolean
|
|
10
10
|
glass?: boolean | 'subtle' | 'strong'
|
package/components/Callout.astro
CHANGED
package/components/Card.astro
CHANGED
|
@@ -5,10 +5,10 @@ import type { HTMLAttributes } from 'astro/types'
|
|
|
5
5
|
|
|
6
6
|
interface Props extends HTMLAttributes<'div'> {
|
|
7
7
|
as?: 'article' | 'div' | 'section'
|
|
8
|
-
class?: string
|
|
8
|
+
class?: string | null
|
|
9
9
|
className?: string
|
|
10
10
|
glass?: boolean | 'subtle' | 'strong'
|
|
11
|
-
variant?: 'default' | 'glass' | 'interactive' | 'muted'
|
|
11
|
+
variant?: 'default' | 'glass' | 'interactive' | 'muted' | 'unstyled'
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
const {
|
|
@@ -23,6 +23,7 @@ const {
|
|
|
23
23
|
const isGlass = glass || variant === 'glass'
|
|
24
24
|
const { classList, passthrough } = resolveLumenAstroProps(rest, [
|
|
25
25
|
'ui-card',
|
|
26
|
+
variant === 'unstyled' && 'ui-card--unstyled',
|
|
26
27
|
variant === 'muted' && 'ui-card--muted',
|
|
27
28
|
variant === 'interactive' && 'ui-card--interactive',
|
|
28
29
|
isGlass && 'ui-card--glass',
|
|
@@ -4,7 +4,7 @@ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
|
|
|
4
4
|
import type { HTMLAttributes } from 'astro/types'
|
|
5
5
|
|
|
6
6
|
interface Props extends HTMLAttributes<'section'> {
|
|
7
|
-
class?: string
|
|
7
|
+
class?: string | null
|
|
8
8
|
className?: string
|
|
9
9
|
glass?: boolean | 'subtle' | 'strong'
|
|
10
10
|
}
|
package/components/Chart.astro
CHANGED
|
@@ -4,7 +4,7 @@ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
|
|
|
4
4
|
import type { HTMLAttributes } from 'astro/types'
|
|
5
5
|
|
|
6
6
|
interface Props extends HTMLAttributes<'figure'> {
|
|
7
|
-
class?: string
|
|
7
|
+
class?: string | null
|
|
8
8
|
className?: string
|
|
9
9
|
glass?: boolean | 'subtle' | 'strong'
|
|
10
10
|
}
|
package/components/Code.astro
CHANGED
|
@@ -7,7 +7,7 @@ type CodeTheme = 'auto' | 'lumen' | 'santi020k'
|
|
|
7
7
|
type CodeVariant = 'block' | 'inline'
|
|
8
8
|
|
|
9
9
|
interface Props extends HTMLAttributes<'code'> {
|
|
10
|
-
class?: string
|
|
10
|
+
class?: string | null
|
|
11
11
|
className?: string
|
|
12
12
|
code?: string
|
|
13
13
|
copy?: boolean
|
|
@@ -16,6 +16,7 @@ interface Props extends HTMLAttributes<'code'> {
|
|
|
16
16
|
language?: string
|
|
17
17
|
theme?: CodeTheme
|
|
18
18
|
variant?: CodeVariant
|
|
19
|
+
wrap?: boolean
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
const {
|
|
@@ -28,12 +29,14 @@ const {
|
|
|
28
29
|
language,
|
|
29
30
|
theme = 'auto',
|
|
30
31
|
variant = 'inline',
|
|
32
|
+
wrap = false,
|
|
31
33
|
...rest
|
|
32
34
|
} = Astro.props
|
|
33
35
|
|
|
34
36
|
const { classList: blockClassList, passthrough } = resolveLumenAstroProps(rest, [
|
|
35
37
|
'ui-code',
|
|
36
|
-
'ui-code--block'
|
|
38
|
+
'ui-code--block',
|
|
39
|
+
wrap && 'ui-code--wrap'
|
|
37
40
|
], classProp, className)
|
|
38
41
|
const { classList: inlineClassList } = resolveLumenAstroProps(rest, [
|
|
39
42
|
'ui-code',
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
import { resolveLumenAstroProps } from '@santi020k/lumen-core'
|
|
3
|
+
|
|
4
|
+
import type { HTMLAttributes } from 'astro/types'
|
|
5
|
+
|
|
6
|
+
import Code from './Code.astro'
|
|
7
|
+
import Tabs from './Tabs.astro'
|
|
8
|
+
|
|
9
|
+
type CodeTheme = 'auto' | 'lumen' | 'santi020k'
|
|
10
|
+
|
|
11
|
+
export interface CodeTabItem {
|
|
12
|
+
code: string
|
|
13
|
+
label: string
|
|
14
|
+
language?: string
|
|
15
|
+
value: string
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
interface Props extends HTMLAttributes<'div'> {
|
|
19
|
+
ariaLabel?: string
|
|
20
|
+
class?: string | null
|
|
21
|
+
className?: string
|
|
22
|
+
copy?: boolean
|
|
23
|
+
initialValue?: string
|
|
24
|
+
items: readonly CodeTabItem[]
|
|
25
|
+
storageKey?: string
|
|
26
|
+
theme?: CodeTheme
|
|
27
|
+
wrap?: boolean
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const {
|
|
31
|
+
ariaLabel = 'Code examples',
|
|
32
|
+
class: classProp = '',
|
|
33
|
+
className = '',
|
|
34
|
+
copy = true,
|
|
35
|
+
initialValue,
|
|
36
|
+
items,
|
|
37
|
+
storageKey,
|
|
38
|
+
theme = 'auto',
|
|
39
|
+
wrap = true,
|
|
40
|
+
...rest
|
|
41
|
+
} = Astro.props
|
|
42
|
+
|
|
43
|
+
const selectedValue = initialValue ?? items[0]?.value
|
|
44
|
+
const tabsStateProps = {
|
|
45
|
+
...(selectedValue === undefined ? {} : { initialValue: selectedValue }),
|
|
46
|
+
...(storageKey === undefined ? {} : { storageKey })
|
|
47
|
+
}
|
|
48
|
+
const { classList, passthrough } = resolveLumenAstroProps(
|
|
49
|
+
rest,
|
|
50
|
+
['ui-code-tabs'],
|
|
51
|
+
classProp ?? '',
|
|
52
|
+
className
|
|
53
|
+
)
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
<Tabs
|
|
57
|
+
class:list={classList}
|
|
58
|
+
{...tabsStateProps}
|
|
59
|
+
{...passthrough}
|
|
60
|
+
>
|
|
61
|
+
<div class="ui-code-tabs__list" role="tablist" aria-label={ariaLabel}>
|
|
62
|
+
{items.map(item => (
|
|
63
|
+
<button
|
|
64
|
+
aria-selected={item.value === selectedValue ? 'true' : 'false'}
|
|
65
|
+
class="ui-code-tabs__tab"
|
|
66
|
+
data-value={item.value}
|
|
67
|
+
role="tab"
|
|
68
|
+
type="button"
|
|
69
|
+
>
|
|
70
|
+
{item.label}
|
|
71
|
+
</button>
|
|
72
|
+
))}
|
|
73
|
+
</div>
|
|
74
|
+
|
|
75
|
+
{items.map(item => (
|
|
76
|
+
<div
|
|
77
|
+
class="ui-code-tabs__panel"
|
|
78
|
+
data-value={item.value}
|
|
79
|
+
hidden={item.value !== selectedValue}
|
|
80
|
+
role="tabpanel"
|
|
81
|
+
>
|
|
82
|
+
<Code
|
|
83
|
+
code={item.code}
|
|
84
|
+
copy={copy}
|
|
85
|
+
{...(item.language === undefined ? {} : { language: item.language })}
|
|
86
|
+
theme={theme}
|
|
87
|
+
variant="block"
|
|
88
|
+
wrap={wrap}
|
|
89
|
+
/>
|
|
90
|
+
</div>
|
|
91
|
+
))}
|
|
92
|
+
</Tabs>
|
package/components/Command.astro
CHANGED
|
@@ -4,7 +4,7 @@ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
|
|
|
4
4
|
import type { HTMLAttributes } from 'astro/types'
|
|
5
5
|
|
|
6
6
|
interface Props extends HTMLAttributes<'div'> {
|
|
7
|
-
class?: string
|
|
7
|
+
class?: string | null
|
|
8
8
|
className?: string
|
|
9
9
|
glass?: boolean | 'subtle' | 'strong'
|
|
10
10
|
}
|
|
@@ -4,7 +4,7 @@ import { resolveLumenAstroProps, resolveLumenGlass } from '@santi020k/lumen-core
|
|
|
4
4
|
import type { HTMLAttributes } from 'astro/types'
|
|
5
5
|
|
|
6
6
|
interface Props extends HTMLAttributes<'menu'> {
|
|
7
|
-
class?: string
|
|
7
|
+
class?: string | null
|
|
8
8
|
className?: string
|
|
9
9
|
glass?: boolean | 'subtle' | 'strong'
|
|
10
10
|
/**
|
|
@@ -5,7 +5,7 @@ import Calendar from './Calendar.astro'
|
|
|
5
5
|
import type { HTMLAttributes } from 'astro/types'
|
|
6
6
|
|
|
7
7
|
interface Props extends HTMLAttributes<'input'> {
|
|
8
|
-
class?: string
|
|
8
|
+
class?: string | null
|
|
9
9
|
className?: string
|
|
10
10
|
glass?: boolean | 'subtle' | 'strong'
|
|
11
11
|
placeholder?: string
|
|
@@ -6,7 +6,7 @@ import type { HTMLAttributes } from 'astro/types'
|
|
|
6
6
|
type DescriptionItem = { label: string; value: string }
|
|
7
7
|
|
|
8
8
|
interface Props extends HTMLAttributes<'dl'> {
|
|
9
|
-
class?: string
|
|
9
|
+
class?: string | null
|
|
10
10
|
className?: string
|
|
11
11
|
columns?: number
|
|
12
12
|
items?: DescriptionItem[]
|
package/components/Dialog.astro
CHANGED
|
@@ -4,9 +4,10 @@ import { resolveLumenAstroProps, resolveLumenGlass } from '@santi020k/lumen-core
|
|
|
4
4
|
import type { HTMLAttributes } from 'astro/types'
|
|
5
5
|
|
|
6
6
|
interface Props extends HTMLAttributes<'dialog'> {
|
|
7
|
-
class?: string
|
|
7
|
+
class?: string | null
|
|
8
8
|
className?: string
|
|
9
9
|
glass?: boolean | 'subtle' | 'strong'
|
|
10
|
+
layout?: 'centered' | 'fullscreen'
|
|
10
11
|
/**
|
|
11
12
|
* @deprecated Use `glass` instead. `surface="glass"` maps to `glass={true}`.
|
|
12
13
|
*/
|
|
@@ -17,6 +18,7 @@ const {
|
|
|
17
18
|
class: classProp = '',
|
|
18
19
|
className = '',
|
|
19
20
|
glass = false,
|
|
21
|
+
layout = 'centered',
|
|
20
22
|
surface = 'default',
|
|
21
23
|
...rest
|
|
22
24
|
} = Astro.props
|
|
@@ -24,6 +26,7 @@ const {
|
|
|
24
26
|
const resolvedGlass = resolveLumenGlass(glass, surface)
|
|
25
27
|
const { classList, passthrough } = resolveLumenAstroProps(rest, [
|
|
26
28
|
'ui-dialog',
|
|
29
|
+
layout === 'fullscreen' && 'ui-dialog--fullscreen',
|
|
27
30
|
resolvedGlass && 'ui-dialog--glass',
|
|
28
31
|
glass === 'subtle' && 'ui-glass-subtle',
|
|
29
32
|
glass === 'strong' && 'ui-glass-strong'
|
|
@@ -32,6 +35,7 @@ const { classList, passthrough } = resolveLumenAstroProps(rest, [
|
|
|
32
35
|
|
|
33
36
|
<dialog
|
|
34
37
|
data-surface={resolvedGlass ? 'glass' : 'default'}
|
|
38
|
+
data-layout={layout}
|
|
35
39
|
data-ui-dialog
|
|
36
40
|
class:list={classList}
|
|
37
41
|
{...passthrough}
|
package/components/Drawer.astro
CHANGED
|
@@ -4,7 +4,7 @@ import { resolveLumenAstroProps, resolveLumenGlass } from '@santi020k/lumen-core
|
|
|
4
4
|
import type { HTMLAttributes } from 'astro/types'
|
|
5
5
|
|
|
6
6
|
interface Props extends HTMLAttributes<'dialog'> {
|
|
7
|
-
class?: string
|
|
7
|
+
class?: string | null
|
|
8
8
|
className?: string
|
|
9
9
|
glass?: boolean | 'subtle' | 'strong'
|
|
10
10
|
/**
|