@santi020k/lumen-astro 0.1.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.
Files changed (131) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +142 -0
  3. package/components/Accordion.astro +27 -0
  4. package/components/Affix.astro +41 -0
  5. package/components/Agenda.astro +19 -0
  6. package/components/Alert.astro +38 -0
  7. package/components/AlertDialog.astro +41 -0
  8. package/components/Anchor.astro +43 -0
  9. package/components/AnimatedLogo.astro +30 -0
  10. package/components/AnimatedNumber.astro +56 -0
  11. package/components/AnimatedPortrait.astro +124 -0
  12. package/components/AspectRatio.astro +39 -0
  13. package/components/Attachment.astro +46 -0
  14. package/components/Autocomplete.astro +24 -0
  15. package/components/Avatar.astro +36 -0
  16. package/components/BackToTop.astro +30 -0
  17. package/components/Badge.astro +36 -0
  18. package/components/Breadcrumb.astro +28 -0
  19. package/components/Bubble.astro +36 -0
  20. package/components/Button.astro +52 -0
  21. package/components/ButtonGroup.astro +27 -0
  22. package/components/ButtonLink.astro +58 -0
  23. package/components/Calendar.astro +197 -0
  24. package/components/Callout.astro +27 -0
  25. package/components/Card.astro +40 -0
  26. package/components/Carousel.astro +33 -0
  27. package/components/Cascader.astro +109 -0
  28. package/components/Chart.astro +32 -0
  29. package/components/Checkbox.astro +22 -0
  30. package/components/Code.astro +96 -0
  31. package/components/Collapsible.astro +28 -0
  32. package/components/ColorPicker.astro +16 -0
  33. package/components/Combobox.astro +67 -0
  34. package/components/Command.astro +33 -0
  35. package/components/ContextMenu.astro +44 -0
  36. package/components/CoverImage.astro +180 -0
  37. package/components/DataTable.astro +122 -0
  38. package/components/DatePicker.astro +108 -0
  39. package/components/DateRangePicker.astro +18 -0
  40. package/components/Descriptions.astro +41 -0
  41. package/components/Dialog.astro +40 -0
  42. package/components/Direction.astro +30 -0
  43. package/components/Drawer.astro +40 -0
  44. package/components/DropdownMenu.astro +40 -0
  45. package/components/Empty.astro +32 -0
  46. package/components/Eyebrow.astro +27 -0
  47. package/components/Field.astro +42 -0
  48. package/components/FileUpload.astro +44 -0
  49. package/components/FloatingBadge.astro +27 -0
  50. package/components/FormattedDate.astro +27 -0
  51. package/components/GradientDivider.astro +24 -0
  52. package/components/HoverCard.astro +40 -0
  53. package/components/Icon.astro +50 -0
  54. package/components/Image.astro +33 -0
  55. package/components/Input.astro +24 -0
  56. package/components/InputGroup.astro +27 -0
  57. package/components/InputOTP.astro +60 -0
  58. package/components/Item.astro +32 -0
  59. package/components/Kbd.astro +27 -0
  60. package/components/Label.astro +18 -0
  61. package/components/LanguageToggle.astro +30 -0
  62. package/components/Link.astro +27 -0
  63. package/components/Marker.astro +33 -0
  64. package/components/Mentions.astro +47 -0
  65. package/components/Menubar.astro +40 -0
  66. package/components/Message.astro +32 -0
  67. package/components/MessageScroller.astro +32 -0
  68. package/components/Meter.astro +31 -0
  69. package/components/NativeSelect.astro +37 -0
  70. package/components/NavigationMenu.astro +40 -0
  71. package/components/Note.astro +23 -0
  72. package/components/NumberField.astro +16 -0
  73. package/components/Pagination.astro +28 -0
  74. package/components/Particles.astro +31 -0
  75. package/components/PhoneInput.astro +86 -0
  76. package/components/Pill.astro +30 -0
  77. package/components/Popconfirm.astro +40 -0
  78. package/components/Popover.astro +40 -0
  79. package/components/Progress.astro +30 -0
  80. package/components/Prose.astro +27 -0
  81. package/components/QRCode.astro +44 -0
  82. package/components/RadioGroup.astro +28 -0
  83. package/components/Rating.astro +42 -0
  84. package/components/Resizable.astro +55 -0
  85. package/components/RevealGroup.astro +54 -0
  86. package/components/RichTextEditor.astro +19 -0
  87. package/components/Schedule.astro +19 -0
  88. package/components/ScrollArea.astro +32 -0
  89. package/components/ScrollReveal.astro +50 -0
  90. package/components/SearchField.astro +16 -0
  91. package/components/Segmented.astro +56 -0
  92. package/components/Select.astro +120 -0
  93. package/components/Separator.astro +31 -0
  94. package/components/Sheet.astro +40 -0
  95. package/components/Sidebar.astro +39 -0
  96. package/components/Skeleton.astro +36 -0
  97. package/components/SkipLink.astro +27 -0
  98. package/components/Slider.astro +20 -0
  99. package/components/Sonner.astro +38 -0
  100. package/components/SpeedDial.astro +77 -0
  101. package/components/Spinner.astro +36 -0
  102. package/components/Stat.astro +34 -0
  103. package/components/Stepper.astro +57 -0
  104. package/components/Switch.astro +23 -0
  105. package/components/Table.astro +32 -0
  106. package/components/Tabs.astro +33 -0
  107. package/components/TagGroup.astro +18 -0
  108. package/components/Textarea.astro +17 -0
  109. package/components/ThemeBuilder.astro +19 -0
  110. package/components/ThemeToggle.astro +41 -0
  111. package/components/TimeField.astro +16 -0
  112. package/components/Timeline.astro +12 -0
  113. package/components/TimelineItem.astro +19 -0
  114. package/components/Toast.astro +50 -0
  115. package/components/Toggle.astro +25 -0
  116. package/components/ToggleGroup.astro +28 -0
  117. package/components/Toolbar.astro +36 -0
  118. package/components/Tooltip.astro +27 -0
  119. package/components/Tour.astro +52 -0
  120. package/components/Transfer.astro +70 -0
  121. package/components/Tree.astro +19 -0
  122. package/components/TreeGrid.astro +19 -0
  123. package/components/TreeSelect.astro +69 -0
  124. package/components/Typography.astro +27 -0
  125. package/components/VirtualList.astro +19 -0
  126. package/components/Watermark.astro +60 -0
  127. package/index.d.ts +125 -0
  128. package/index.ts +125 -0
  129. package/package.json +74 -0
  130. package/runtime/UIPrimitives.astro +4649 -0
  131. package/styles/lumen.css +5 -0
@@ -0,0 +1,23 @@
1
+ ---
2
+ import type { HTMLAttributes } from 'astro/types'
3
+ import { composeClassName } from '@santi020k/lumen-core'
4
+
5
+ export interface Props extends HTMLAttributes<'div'> {
6
+ label?: string
7
+ borderPosition?: 'left' | 'right' | 'none'
8
+ }
9
+
10
+ const { class: className, label, borderPosition = 'left', ...props } = Astro.props
11
+
12
+ const borderClass = `ui-note--border-${borderPosition}`
13
+ ---
14
+
15
+ <div
16
+ class={composeClassName('ui-note', borderClass, className)}
17
+ {...props}
18
+ >
19
+ {label && <p class="ui-note__label">{label}</p>}
20
+ <div class="ui-note__content">
21
+ <slot />
22
+ </div>
23
+ </div>
@@ -0,0 +1,16 @@
1
+ ---
2
+ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
3
+
4
+ import type { HTMLAttributes } from 'astro/types'
5
+
6
+ interface Props extends HTMLAttributes<'input'> {
7
+ class?: string
8
+ className?: string
9
+ }
10
+
11
+ const { class: classProp = '', className = '', type = 'number', ...rest } = Astro.props
12
+ const { classList, passthrough } = resolveLumenAstroProps(rest, ['ui-input', 'ui-number-field'
13
+ ], classProp, className)
14
+ ---
15
+
16
+ <input class:list={classList} type={type} {...passthrough} />
@@ -0,0 +1,28 @@
1
+ ---
2
+ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
3
+
4
+ import type { HTMLAttributes } from 'astro/types'
5
+
6
+ interface Props extends HTMLAttributes<'nav'> {
7
+ class?: string
8
+ className?: string
9
+ }
10
+
11
+ const {
12
+ class: classProp = '',
13
+ className = '',
14
+ ...rest
15
+ } = Astro.props
16
+
17
+ const { classList, passthrough } = resolveLumenAstroProps(rest, [
18
+ 'ui-pagination'
19
+ ], classProp, className)
20
+ ---
21
+
22
+ <nav
23
+ aria-label="Pagination"
24
+ class:list={classList}
25
+ {...passthrough}
26
+ >
27
+ <slot />
28
+ </nav>
@@ -0,0 +1,31 @@
1
+ ---
2
+ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
3
+
4
+ import type { HTMLAttributes } from 'astro/types'
5
+
6
+ interface Props extends HTMLAttributes<'div'> {
7
+ class?: string
8
+ className?: string
9
+ density?: 'low' | 'medium' | 'high'
10
+ }
11
+
12
+ const {
13
+ class: classProp = '',
14
+ className = '',
15
+ density = 'medium',
16
+ ...rest
17
+ } = Astro.props
18
+
19
+ const { classList, passthrough } = resolveLumenAstroProps(rest, [
20
+ 'ui-particles'
21
+ ], classProp, className)
22
+ ---
23
+
24
+ <div
25
+ aria-hidden="true"
26
+ class:list={classList}
27
+ data-ui-particles={density}
28
+ {...passthrough}
29
+ >
30
+ <slot />
31
+ </div>
@@ -0,0 +1,86 @@
1
+ ---
2
+ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
3
+
4
+ import type { HTMLAttributes } from 'astro/types'
5
+
6
+ interface CountryOption {
7
+ disabled?: boolean
8
+ label: string
9
+ value: string
10
+ }
11
+
12
+ type Country = CountryOption | string
13
+
14
+ interface Props extends Omit<HTMLAttributes<'div'>, 'size'> {
15
+ class?: string
16
+ className?: string
17
+ countries?: Country[]
18
+ countryLabel?: string
19
+ countryName?: string
20
+ countryValue?: string
21
+ name?: string
22
+ placeholder?: string
23
+ size?: 'default' | 'lg' | 'sm'
24
+ value?: string
25
+ }
26
+
27
+ const {
28
+ class: classProp = '',
29
+ className = '',
30
+ countries = [],
31
+ countryLabel = 'Country code',
32
+ countryName = 'country',
33
+ countryValue,
34
+ name = 'phone',
35
+ placeholder = 'Phone number',
36
+ size = 'default',
37
+ value,
38
+ ...rest
39
+ } = Astro.props
40
+
41
+ const normalizedCountries = countries.map(country =>
42
+ typeof country === 'string' ? { label: country, value: country } : country
43
+ )
44
+
45
+ const hasCountryValue = countryValue !== undefined
46
+
47
+ const { classList, passthrough } = resolveLumenAstroProps(rest, [
48
+ 'ui-phone-input',
49
+ 'ui-input-group'
50
+ ], classProp, className)
51
+ ---
52
+
53
+ <div class:list={classList} {...passthrough}>
54
+ <select
55
+ aria-label={countryLabel}
56
+ class:list={[
57
+ 'ui-select',
58
+ 'ui-phone-input__country',
59
+ size === 'sm' && 'ui-select--sm',
60
+ size === 'lg' && 'ui-select--lg'
61
+ ]}
62
+ name={countryName}
63
+ >
64
+ {normalizedCountries.map(country => (
65
+ <option
66
+ disabled={country.disabled}
67
+ selected={hasCountryValue && country.value === countryValue}
68
+ value={country.value}
69
+ >{country.label}</option>
70
+ ))}
71
+ </select>
72
+ <input
73
+ autocomplete="tel"
74
+ class:list={[
75
+ 'ui-input',
76
+ 'ui-phone-input__number',
77
+ size === 'sm' && 'ui-input--sm',
78
+ size === 'lg' && 'ui-input--lg'
79
+ ]}
80
+ inputmode="tel"
81
+ name={name}
82
+ placeholder={placeholder}
83
+ type="tel"
84
+ value={value}
85
+ />
86
+ </div>
@@ -0,0 +1,30 @@
1
+ ---
2
+ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
3
+
4
+ import type { HTMLAttributes } from 'astro/types'
5
+
6
+ interface Props extends HTMLAttributes<'span'> {
7
+ class?: string
8
+ className?: string
9
+ count?: number | string
10
+ }
11
+
12
+ const {
13
+ class: classProp = '',
14
+ className = '',
15
+ count,
16
+ ...rest
17
+ } = Astro.props
18
+
19
+ const { classList, passthrough } = resolveLumenAstroProps(rest, [
20
+ 'ui-pill'
21
+ ], classProp, className)
22
+ ---
23
+
24
+ <span
25
+ class:list={classList}
26
+ {...passthrough}
27
+ >
28
+ <slot />
29
+ {count != null && <span class="ui-pill__count">{count}</span>}
30
+ </span>
@@ -0,0 +1,40 @@
1
+ ---
2
+ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
3
+
4
+ import type { HTMLAttributes } from 'astro/types'
5
+
6
+ interface Props extends HTMLAttributes<'div'> {
7
+ cancelLabel?: string
8
+ class?: string
9
+ className?: string
10
+ confirmLabel?: string
11
+ title?: string
12
+ }
13
+
14
+ const {
15
+ cancelLabel = 'Cancel',
16
+ class: classProp = '',
17
+ className = '',
18
+ confirmLabel = 'Confirm',
19
+ title = 'Are you sure?',
20
+ ...rest
21
+ } = Astro.props
22
+
23
+ const { classList, passthrough } = resolveLumenAstroProps(rest, [
24
+ 'ui-popover',
25
+ 'ui-popconfirm'
26
+ ], classProp, className)
27
+ ---
28
+
29
+ <div class:list={classList} data-surface="default" data-ui-popconfirm data-ui-popover {...passthrough}>
30
+ <span aria-expanded="false" aria-haspopup="dialog" class="ui-popconfirm__trigger" data-ui-trigger>
31
+ <slot />
32
+ </span>
33
+ <div class="ui-popover__panel ui-popconfirm__panel" data-ui-panel hidden role="dialog">
34
+ <p class="ui-popconfirm__message">{title}</p>
35
+ <div class="ui-popconfirm__actions">
36
+ <button class="ui-button ui-button--ghost ui-button--sm" data-ui-popconfirm-cancel type="button">{cancelLabel}</button>
37
+ <button class="ui-button ui-button--destructive ui-button--sm" data-ui-popconfirm-confirm type="button">{confirmLabel}</button>
38
+ </div>
39
+ </div>
40
+ </div>
@@ -0,0 +1,40 @@
1
+ ---
2
+ import { resolveLumenAstroProps, resolveLumenGlass } from '@santi020k/lumen-core'
3
+
4
+ import type { HTMLAttributes } from 'astro/types'
5
+
6
+ interface Props extends HTMLAttributes<'div'> {
7
+ class?: string
8
+ className?: string
9
+ glass?: boolean | 'subtle' | 'strong'
10
+ /**
11
+ * @deprecated Use `glass` instead. `surface="glass"` maps to `glass={true}`.
12
+ */
13
+ surface?: 'default' | 'glass'
14
+ }
15
+
16
+ const {
17
+ class: classProp = '',
18
+ className = '',
19
+ glass = false,
20
+ surface = 'default',
21
+ ...rest
22
+ } = Astro.props
23
+
24
+ const resolvedGlass = resolveLumenGlass(glass, surface)
25
+ const { classList, passthrough } = resolveLumenAstroProps(rest, [
26
+ 'ui-popover',
27
+ resolvedGlass && 'ui-popover--glass',
28
+ glass === 'subtle' && 'ui-glass-subtle',
29
+ glass === 'strong' && 'ui-glass-strong'
30
+ ], classProp, className)
31
+ ---
32
+
33
+ <div
34
+ data-surface={resolvedGlass ? 'glass' : 'default'}
35
+ data-ui-popover
36
+ class:list={classList}
37
+ {...passthrough}
38
+ >
39
+ <slot />
40
+ </div>
@@ -0,0 +1,30 @@
1
+ ---
2
+ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
3
+
4
+ import type { HTMLAttributes } from 'astro/types'
5
+
6
+ interface Props extends HTMLAttributes<'div'> {
7
+ class?: string
8
+ className?: string
9
+ max?: number
10
+ value?: number
11
+ }
12
+
13
+ const { class: classProp = '', className = '', max = 100, value = 0, ...rest } = Astro.props
14
+ const safeMax = max > 0 ? max : 100
15
+ const safeValue = Math.min(safeMax, Math.max(0, value))
16
+ const percentage = (safeValue / safeMax) * 100
17
+ const { classList, passthrough } = resolveLumenAstroProps(rest, ['ui-progress'
18
+ ], classProp, className)
19
+ ---
20
+
21
+ <div
22
+ aria-valuemax={safeMax}
23
+ aria-valuemin="0"
24
+ aria-valuenow={safeValue}
25
+ class:list={classList}
26
+ role="progressbar"
27
+ {...passthrough}
28
+ >
29
+ <span class="ui-progress__bar" style={`width: ${percentage}%`}></span>
30
+ </div>
@@ -0,0 +1,27 @@
1
+ ---
2
+ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
3
+
4
+ import type { HTMLAttributes } from 'astro/types'
5
+
6
+ interface Props extends HTMLAttributes<'div'> {
7
+ class?: string
8
+ className?: string
9
+ }
10
+
11
+ const {
12
+ class: classProp = '',
13
+ className = '',
14
+ ...rest
15
+ } = Astro.props
16
+
17
+ const { classList, passthrough } = resolveLumenAstroProps(rest, [
18
+ 'ui-prose'
19
+ ], classProp, className)
20
+ ---
21
+
22
+ <div
23
+ class:list={classList}
24
+ {...passthrough}
25
+ >
26
+ <slot />
27
+ </div>
@@ -0,0 +1,44 @@
1
+ ---
2
+ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
3
+ import { renderSVG } from 'uqr'
4
+
5
+ import type { HTMLAttributes } from 'astro/types'
6
+
7
+ interface Props extends HTMLAttributes<'figure'> {
8
+ class?: string
9
+ className?: string
10
+ size?: number
11
+ src?: string
12
+ value?: string
13
+ }
14
+
15
+ const {
16
+ class: classProp = '',
17
+ className = '',
18
+ size = 160,
19
+ src,
20
+ value,
21
+ ...rest
22
+ } = Astro.props
23
+
24
+ const { classList, passthrough } = resolveLumenAstroProps(rest, [
25
+ 'ui-qr-code'
26
+ ], classProp, className)
27
+
28
+ const qrSvg = !src && value ? renderSVG(value) : null
29
+ const qrSrc = qrSvg ? `data:image/svg+xml;utf8,${encodeURIComponent(qrSvg)}` : src
30
+ ---
31
+
32
+ <figure
33
+ class:list={classList}
34
+ data-ui-qr-code
35
+ style={`--ui-qr-code-size:${size}px`}
36
+ {...passthrough}
37
+ >
38
+ <div class="ui-qr-code__frame">
39
+ {qrSrc
40
+ ? <img alt={value ? `QR code for ${value}` : 'QR code'} class="ui-qr-code__image" height={size} src={qrSrc} width={size} />
41
+ : <slot />}
42
+ </div>
43
+ {value && <figcaption class="ui-qr-code__value">{value}</figcaption>}
44
+ </figure>
@@ -0,0 +1,28 @@
1
+ ---
2
+ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
3
+
4
+ import type { HTMLAttributes } from 'astro/types'
5
+
6
+ interface Props extends HTMLAttributes<'fieldset'> {
7
+ class?: string
8
+ className?: string
9
+ }
10
+
11
+ const {
12
+ class: classProp = '',
13
+ className = '',
14
+ ...rest
15
+ } = Astro.props
16
+
17
+ const { classList, passthrough } = resolveLumenAstroProps(rest, [
18
+ 'ui-radio-group'
19
+ ], classProp, className)
20
+ ---
21
+
22
+ <fieldset
23
+ data-ui-radio-group
24
+ class:list={classList}
25
+ {...passthrough}
26
+ >
27
+ <slot />
28
+ </fieldset>
@@ -0,0 +1,42 @@
1
+ ---
2
+ import type { HTMLAttributes } from 'astro/types'
3
+ import { composeClassName } from '@santi020k/lumen-core'
4
+ import Icon from './Icon.astro'
5
+
6
+ export interface Props extends HTMLAttributes<'div'> {
7
+ value?: number
8
+ max?: number
9
+ readonly?: boolean
10
+ }
11
+
12
+ const {
13
+ class: className,
14
+ value = 0,
15
+ max = 5,
16
+ readonly = false,
17
+ ...props
18
+ } = Astro.props
19
+
20
+ const stars = Array.from({ length: max }, (_, i) => i + 1)
21
+ ---
22
+
23
+ <lumen-rating
24
+ class={composeClassName('ui-rating', readonly && 'ui-rating--readonly', className)}
25
+ data-ui-rating
26
+ data-value={value}
27
+ data-max={max}
28
+ data-readonly={readonly ? 'true' : 'false'}
29
+ {...props}
30
+ >
31
+ {stars.map((star) => (
32
+ <button
33
+ type="button"
34
+ class="ui-rating__star"
35
+ data-active={star <= value ? 'true' : 'false'}
36
+ disabled={readonly}
37
+ aria-label={`Rate ${star} out of ${max}`}
38
+ >
39
+ <Icon name="star" />
40
+ </button>
41
+ ))}
42
+ </lumen-rating>
@@ -0,0 +1,55 @@
1
+ ---
2
+ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
3
+
4
+ import type { HTMLAttributes } from 'astro/types'
5
+
6
+ interface Props extends HTMLAttributes<'div'> {
7
+ class?: string
8
+ className?: string
9
+ defaultSizes?: number[]
10
+ direction?: 'horizontal' | 'vertical'
11
+ maxSize?: number | number[]
12
+ minSize?: number | number[]
13
+ resetOnDoubleClick?: boolean
14
+ }
15
+
16
+ const {
17
+ class: classProp = '',
18
+ className = '',
19
+ defaultSizes,
20
+ direction = 'horizontal',
21
+ maxSize,
22
+ minSize,
23
+ resetOnDoubleClick = true,
24
+ ...rest
25
+ } = Astro.props
26
+
27
+ const { classList, passthrough } = resolveLumenAstroProps(rest, [
28
+ 'ui-resizable',
29
+ direction === 'vertical' && 'ui-resizable--vertical'
30
+ ], classProp, className)
31
+ const serializeSize = (value: number | number[] | undefined) =>
32
+ Array.isArray(value) ? value.join(',') : value
33
+ ---
34
+
35
+ <div
36
+ class:list={classList}
37
+ data-orientation={direction}
38
+ data-ui-resizable
39
+ data-ui-resizable-default-sizes={defaultSizes?.join(',')}
40
+ data-ui-resizable-max-size={serializeSize(maxSize)}
41
+ data-ui-resizable-min-size={serializeSize(minSize)}
42
+ data-ui-resizable-reset={resetOnDoubleClick ? 'true' : undefined}
43
+ {...passthrough}
44
+ >
45
+ <slot />
46
+ <template data-ui-resizable-handle-template>
47
+ <button
48
+ class="ui-resizable__handle"
49
+ data-ui-resizable-handle
50
+ role="separator"
51
+ tabindex="0"
52
+ type="button"
53
+ ></button>
54
+ </template>
55
+ </div>
@@ -0,0 +1,54 @@
1
+ ---
2
+ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
3
+
4
+ import type { HTMLAttributes } from 'astro/types'
5
+
6
+ interface Props extends HTMLAttributes<'div'> {
7
+ animation?: 'fade' | 'slide-up' | 'scale'
8
+ class?: string
9
+ className?: string
10
+ delay?: number
11
+ duration?: 'fast' | 'standard' | 'slow'
12
+ once?: boolean
13
+ stagger?: number
14
+ threshold?: number
15
+ }
16
+
17
+ const {
18
+ animation = 'slide-up',
19
+ class: classProp = '',
20
+ className = '',
21
+ delay = 0,
22
+ duration = 'slow',
23
+ once = true,
24
+ stagger = 80,
25
+ style,
26
+ threshold = 0.15,
27
+ ...rest
28
+ } = Astro.props
29
+
30
+ const safeDelay = Math.max(0, delay)
31
+ const safeStagger = Math.max(0, stagger)
32
+ const safeThreshold = Math.min(1, Math.max(0, threshold))
33
+ const motionStyle = [
34
+ typeof style === 'string' ? style : '',
35
+ `--ui-reveal-delay:${safeDelay}ms`,
36
+ `--ui-reveal-stagger:${safeStagger}ms`
37
+ ].filter(Boolean).join(';')
38
+ const { classList, passthrough } = resolveLumenAstroProps(rest, [
39
+ 'ui-reveal-group',
40
+ `ui-reveal-group-${animation}`,
41
+ `ui-motion-duration-${duration}`
42
+ ], classProp, className)
43
+ ---
44
+
45
+ <div
46
+ class:list={classList}
47
+ data-ui-reveal-group
48
+ data-ui-reveal-once={String(once)}
49
+ data-ui-reveal-threshold={safeThreshold}
50
+ style={motionStyle}
51
+ {...passthrough}
52
+ >
53
+ <slot />
54
+ </div>
@@ -0,0 +1,19 @@
1
+ ---
2
+ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
3
+
4
+ import type { HTMLAttributes } from 'astro/types'
5
+
6
+ interface Props extends HTMLAttributes<'section'> {
7
+ class?: string
8
+ className?: string
9
+ glass?: boolean | 'subtle' | 'strong'
10
+ }
11
+
12
+ const { class: classProp = '', className = '', glass = false, ...rest } = Astro.props
13
+ const { classList, passthrough } = resolveLumenAstroProps(rest, ['ui-rich-text-editor', glass && 'ui-rich-text-editor--glass', glass === 'subtle' && 'ui-glass-subtle', glass === 'strong' && 'ui-glass-strong'
14
+ ], classProp, className)
15
+ ---
16
+
17
+ <section class:list={classList} data-ui-rich-text-editor {...passthrough}>
18
+ <slot />
19
+ </section>
@@ -0,0 +1,19 @@
1
+ ---
2
+ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
3
+
4
+ import type { HTMLAttributes } from 'astro/types'
5
+
6
+ interface Props extends HTMLAttributes<'section'> {
7
+ class?: string
8
+ className?: string
9
+ glass?: boolean | 'subtle' | 'strong'
10
+ }
11
+
12
+ const { class: classProp = '', className = '', glass = false, ...rest } = Astro.props
13
+ const { classList, passthrough } = resolveLumenAstroProps(rest, ['ui-schedule', glass && 'ui-schedule--glass', glass === 'subtle' && 'ui-glass-subtle', glass === 'strong' && 'ui-glass-strong'
14
+ ], classProp, className)
15
+ ---
16
+
17
+ <section class:list={classList} data-ui-schedule {...passthrough}>
18
+ <slot />
19
+ </section>
@@ -0,0 +1,32 @@
1
+ ---
2
+ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
3
+
4
+ import type { HTMLAttributes } from 'astro/types'
5
+
6
+ interface Props extends HTMLAttributes<'div'> {
7
+ class?: string
8
+ className?: string
9
+ glass?: boolean | 'subtle' | 'strong'
10
+ }
11
+
12
+ const {
13
+ class: classProp = '',
14
+ className = '',
15
+ glass = false,
16
+ ...rest
17
+ } = Astro.props
18
+
19
+ const { classList, passthrough } = resolveLumenAstroProps(rest, [
20
+ 'ui-scroll-area',
21
+ glass && 'ui-scroll-area--glass',
22
+ glass === 'subtle' && 'ui-glass-subtle',
23
+ glass === 'strong' && 'ui-glass-strong'
24
+ ], classProp, className)
25
+ ---
26
+
27
+ <div
28
+ class:list={classList}
29
+ {...passthrough}
30
+ >
31
+ <slot />
32
+ </div>