@santi020k/lumen-astro 0.3.0 → 1.0.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 (158) hide show
  1. package/README.md +100 -2
  2. package/components/Accordion.astro +4 -4
  3. package/components/Affix.astro +2 -2
  4. package/components/Agenda.astro +3 -2
  5. package/components/Alert.astro +9 -9
  6. package/components/AlertDialog.astro +7 -13
  7. package/components/Anchor.astro +29 -3
  8. package/components/AnimatedLogo.astro +2 -1
  9. package/components/AnimatedNumber.astro +5 -2
  10. package/components/AnimatedPortrait.astro +46 -36
  11. package/components/AspectRatio.astro +10 -8
  12. package/components/Attachment.astro +24 -24
  13. package/components/Autocomplete.astro +3 -2
  14. package/components/Avatar.astro +4 -3
  15. package/components/BackToTop.astro +2 -2
  16. package/components/Badge.astro +9 -9
  17. package/components/BarChart.astro +211 -0
  18. package/components/Breadcrumb.astro +3 -3
  19. package/components/Bubble.astro +7 -7
  20. package/components/Button.astro +18 -16
  21. package/components/ButtonGroup.astro +3 -3
  22. package/components/ButtonLink.astro +9 -3
  23. package/components/Calendar.astro +43 -31
  24. package/components/Callout.astro +2 -2
  25. package/components/Card.astro +12 -10
  26. package/components/CardContent.astro +26 -0
  27. package/components/CardDescription.astro +26 -0
  28. package/components/CardFooter.astro +26 -0
  29. package/components/CardHeader.astro +26 -0
  30. package/components/CardTitle.astro +26 -0
  31. package/components/Carousel.astro +6 -6
  32. package/components/Cascader.astro +10 -4
  33. package/components/Chart.astro +32 -6
  34. package/components/Checkbox.astro +3 -2
  35. package/components/CheckboxGroup.astro +39 -0
  36. package/components/Code.astro +55 -52
  37. package/components/CodeTabs.astro +6 -6
  38. package/components/Collapsible.astro +3 -3
  39. package/components/ColorPicker.astro +3 -2
  40. package/components/Combobox.astro +4 -5
  41. package/components/Command.astro +6 -6
  42. package/components/Container.astro +29 -0
  43. package/components/ContextMenu.astro +7 -13
  44. package/components/CopyButton.astro +55 -0
  45. package/components/CoverImage.astro +19 -9
  46. package/components/DataTable.astro +50 -49
  47. package/components/DatePicker.astro +20 -17
  48. package/components/DateRangePicker.astro +3 -2
  49. package/components/Descriptions.astro +3 -3
  50. package/components/Dialog.astro +8 -14
  51. package/components/Direction.astro +3 -3
  52. package/components/Drawer.astro +7 -13
  53. package/components/DropdownMenu.astro +7 -13
  54. package/components/Empty.astro +6 -6
  55. package/components/ErrorSummary.astro +54 -0
  56. package/components/Eyebrow.astro +2 -2
  57. package/components/Field.astro +7 -6
  58. package/components/FieldError.astro +29 -0
  59. package/components/FileUpload.astro +2 -2
  60. package/components/FloatingBadge.astro +2 -2
  61. package/components/Form.astro +33 -0
  62. package/components/FormattedDate.astro +2 -2
  63. package/components/GradientDivider.astro +2 -2
  64. package/components/Grid.astro +46 -0
  65. package/components/HoverCard.astro +7 -13
  66. package/components/Icon.astro +8 -6
  67. package/components/Image.astro +2 -1
  68. package/components/Input.astro +6 -5
  69. package/components/InputGroup.astro +3 -3
  70. package/components/InputOTP.astro +5 -3
  71. package/components/Item.astro +11 -8
  72. package/components/Kbd.astro +3 -3
  73. package/components/Label.astro +3 -2
  74. package/components/LanguageToggle.astro +2 -2
  75. package/components/LineChart.astro +244 -0
  76. package/components/Link.astro +6 -5
  77. package/components/ListBox.astro +154 -0
  78. package/components/Marker.astro +6 -6
  79. package/components/Mentions.astro +30 -10
  80. package/components/Menubar.astro +7 -13
  81. package/components/Message.astro +5 -5
  82. package/components/MessageScroller.astro +6 -6
  83. package/components/Meter.astro +1 -0
  84. package/components/NativeSelect.astro +4 -5
  85. package/components/NavigationMenu.astro +9 -14
  86. package/components/Note.astro +1 -1
  87. package/components/NumberField.astro +3 -2
  88. package/components/Pagination.astro +3 -3
  89. package/components/Particles.astro +58 -2
  90. package/components/PasswordField.astro +73 -0
  91. package/components/PhoneInput.astro +5 -7
  92. package/components/PieChart.astro +141 -0
  93. package/components/Pill.astro +15 -9
  94. package/components/Popconfirm.astro +8 -3
  95. package/components/Popover.astro +7 -13
  96. package/components/Progress.astro +12 -4
  97. package/components/Prose.astro +2 -2
  98. package/components/QRCode.astro +13 -5
  99. package/components/RadioGroup.astro +3 -3
  100. package/components/Rating.astro +3 -1
  101. package/components/Resizable.astro +8 -7
  102. package/components/RevealGroup.astro +4 -2
  103. package/components/RichTextEditor.astro +3 -2
  104. package/components/Schedule.astro +3 -2
  105. package/components/ScrollArea.astro +6 -6
  106. package/components/ScrollProgress.astro +38 -0
  107. package/components/ScrollReveal.astro +4 -2
  108. package/components/SearchField.astro +3 -2
  109. package/components/Segmented.astro +4 -6
  110. package/components/Select.astro +23 -14
  111. package/components/Separator.astro +5 -5
  112. package/components/Sheet.astro +7 -13
  113. package/components/Sidebar.astro +9 -14
  114. package/components/Skeleton.astro +4 -3
  115. package/components/SkipLink.astro +2 -2
  116. package/components/Slider.astro +3 -2
  117. package/components/Sonner.astro +3 -3
  118. package/components/Sparkline.astro +72 -0
  119. package/components/SpeedDial.astro +3 -3
  120. package/components/Spinner.astro +4 -3
  121. package/components/Stack.astro +46 -0
  122. package/components/Stat.astro +14 -8
  123. package/components/StatDescription.astro +16 -0
  124. package/components/StatIcon.astro +15 -0
  125. package/components/StatLabel.astro +16 -0
  126. package/components/StatTrend.astro +28 -0
  127. package/components/StatValue.astro +16 -0
  128. package/components/Stepper.astro +11 -8
  129. package/components/Switch.astro +3 -2
  130. package/components/Table.astro +7 -6
  131. package/components/Tabs.astro +6 -6
  132. package/components/TagGroup.astro +3 -2
  133. package/components/Textarea.astro +3 -2
  134. package/components/ThemeBuilder.astro +3 -2
  135. package/components/ThemeToggle.astro +5 -3
  136. package/components/TimeField.astro +3 -2
  137. package/components/Timeline.astro +2 -1
  138. package/components/TimelineItem.astro +2 -1
  139. package/components/Toast.astro +10 -16
  140. package/components/Toggle.astro +3 -2
  141. package/components/ToggleGroup.astro +3 -3
  142. package/components/Toolbar.astro +2 -2
  143. package/components/Tooltip.astro +3 -3
  144. package/components/Tour.astro +3 -3
  145. package/components/Transfer.astro +16 -5
  146. package/components/Tree.astro +3 -2
  147. package/components/TreeGrid.astro +3 -2
  148. package/components/TreeSelect.astro +10 -4
  149. package/components/Typography.astro +3 -3
  150. package/components/VirtualList.astro +3 -2
  151. package/components/VisuallyHidden.astro +27 -0
  152. package/components/Watermark.astro +11 -7
  153. package/forms.ts +46 -0
  154. package/index.ts +31 -0
  155. package/package.json +12 -8
  156. package/runtime/UIPrimitives.astro +3764 -3142
  157. package/runtime/controllers/motion.ts +13 -16
  158. package/index.d.ts +0 -126
@@ -1,8 +1,8 @@
1
1
  ---
2
- import { resolveLumenAstroProps } from '@santi020k/lumen-core'
3
-
4
2
  import type { HTMLAttributes } from 'astro/types'
5
3
 
4
+ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
5
+
6
6
  interface Props extends HTMLAttributes<'div'> {
7
7
  class?: string | null
8
8
  className?: string
@@ -19,8 +19,9 @@ const {
19
19
  } = Astro.props
20
20
 
21
21
  const isAccessible = Boolean(ariaLabel || ariaLabelledby)
22
+
22
23
  const { classList, passthrough } = resolveLumenAstroProps(rest, [
23
- 'ui-skeleton'
24
+ 'ui-skeleton'
24
25
  ], classProp, className)
25
26
  ---
26
27
 
@@ -1,8 +1,8 @@
1
1
  ---
2
- import { resolveLumenAstroProps } from '@santi020k/lumen-core'
3
-
4
2
  import type { HTMLAttributes } from 'astro/types'
5
3
 
4
+ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
5
+
6
6
  interface Props extends HTMLAttributes<'a'> {
7
7
  class?: string | null
8
8
  className?: string
@@ -1,14 +1,15 @@
1
1
  ---
2
- import { resolveLumenAstroProps } from '@santi020k/lumen-core'
3
-
4
2
  import type { HTMLAttributes } from 'astro/types'
5
3
 
4
+ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
5
+
6
6
  interface Props extends HTMLAttributes<'input'> {
7
7
  class?: string | null
8
8
  className?: string
9
9
  }
10
10
 
11
11
  const { class: classProp = '', className = '', type = 'range', ...rest } = Astro.props
12
+
12
13
  const { classList, passthrough } = resolveLumenAstroProps(rest, ['ui-slider'
13
14
  ], classProp, className)
14
15
  ---
@@ -1,8 +1,8 @@
1
1
  ---
2
- import { resolveLumenAstroProps } from '@santi020k/lumen-core'
3
-
4
2
  import type { HTMLAttributes } from 'astro/types'
5
3
 
4
+ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
5
+
6
6
  interface Props extends HTMLAttributes<'div'> {
7
7
  class?: string | null
8
8
  className?: string
@@ -21,7 +21,7 @@ const {
21
21
  } = Astro.props
22
22
 
23
23
  const { classList, passthrough } = resolveLumenAstroProps(rest, [
24
- 'ui-sonner'
24
+ 'ui-sonner'
25
25
  ], classProp, className)
26
26
  ---
27
27
 
@@ -0,0 +1,72 @@
1
+ ---
2
+ import type { HTMLAttributes } from 'astro/types'
3
+
4
+ import {
5
+ composeClassName,
6
+ createLumenLineGeometry,
7
+ type LumenChartTone,
8
+ resolveLumenChartTone
9
+ } from '@santi020k/lumen-core'
10
+
11
+ interface Props extends HTMLAttributes<'span'> {
12
+ area?: boolean
13
+ class?: string | null
14
+ className?: string
15
+ label: string
16
+ showEndpoint?: boolean
17
+ tone?: LumenChartTone
18
+ values: readonly number[]
19
+ }
20
+
21
+ const {
22
+ area = false,
23
+ class: classProp = '',
24
+ className = '',
25
+ label,
26
+ showEndpoint = true,
27
+ tone,
28
+ values,
29
+ ...rest
30
+ } = Astro.props
31
+
32
+ const data = values.map((value, index) => ({ x: index, y: value }))
33
+
34
+ const geometry = createLumenLineGeometry(data, {
35
+ height: 40,
36
+ padding: 3,
37
+ width: 120
38
+ })
39
+
40
+ const resolvedTone = resolveLumenChartTone(tone)
41
+ const endpoint = geometry.points[geometry.points.length - 1]
42
+ ---
43
+
44
+ <span
45
+ aria-label={label}
46
+ class={composeClassName(
47
+ 'ui-sparkline', `ui-chart-tone--${resolvedTone}`, classProp, className
48
+ )}
49
+ role="img"
50
+ {...rest}
51
+ >
52
+ <svg aria-hidden="true" preserveAspectRatio="none" viewBox="0 0 120 40">
53
+ {
54
+ area &&
55
+ geometry.areaPaths.map(path => (
56
+ <path class="ui-sparkline__area" d={path} />
57
+ ))
58
+ }
59
+ <path class="ui-sparkline__line" d={geometry.path} />
60
+ {
61
+ showEndpoint && endpoint && (
62
+ <circle
63
+ class="ui-sparkline__endpoint"
64
+ cx={endpoint.xCoordinate}
65
+ cy={endpoint.yCoordinate}
66
+ r="2.5"
67
+ />
68
+ )
69
+ }
70
+ </svg>
71
+ <span class="ui-sr-only">{label}</span>
72
+ </span>
@@ -1,12 +1,12 @@
1
1
  ---
2
+ import type { HTMLAttributes } from 'astro/types'
3
+
2
4
  import {
3
5
  renderLumenIconSvg,
4
6
  resolveLumenAstroProps
5
7
  } from '@santi020k/lumen-core'
6
8
 
7
- import type { HTMLAttributes } from 'astro/types'
8
-
9
- type SpeedDialAction = { icon?: string; label: string; value?: string }
9
+ interface SpeedDialAction { icon?: string, label: string, value?: string }
10
10
 
11
11
  interface Props extends HTMLAttributes<'div'> {
12
12
  actions?: SpeedDialAction[]
@@ -1,8 +1,8 @@
1
1
  ---
2
- import { resolveLumenAstroProps } from '@santi020k/lumen-core'
3
-
4
2
  import type { HTMLAttributes } from 'astro/types'
5
3
 
4
+ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
5
+
6
6
  interface Props extends HTMLAttributes<'span'> {
7
7
  class?: string | null
8
8
  className?: string
@@ -19,8 +19,9 @@ const {
19
19
  } = Astro.props
20
20
 
21
21
  const isAccessible = Boolean(ariaLabel || ariaLabelledby)
22
+
22
23
  const { classList, passthrough } = resolveLumenAstroProps(rest, [
23
- 'ui-spinner'
24
+ 'ui-spinner'
24
25
  ], classProp, className)
25
26
  ---
26
27
 
@@ -0,0 +1,46 @@
1
+ ---
2
+ import type { HTMLAttributes } from 'astro/types'
3
+
4
+ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
5
+
6
+ interface Props extends HTMLAttributes<'div'> {
7
+ align?: 'center' | 'end' | 'start' | 'stretch'
8
+ as?: 'article' | 'div' | 'fieldset' | 'nav' | 'section'
9
+ class?: string | null
10
+ className?: string
11
+ direction?: 'horizontal' | 'vertical'
12
+ gap?: 'lg' | 'md' | 'none' | 'sm' | 'xl'
13
+ justify?: 'between' | 'center' | 'end' | 'start'
14
+ wrap?: boolean
15
+ }
16
+
17
+ const {
18
+ align = 'stretch',
19
+ as: Tag = 'div',
20
+ class: classProp = '',
21
+ className = '',
22
+ direction = 'vertical',
23
+ gap = 'md',
24
+ justify = 'start',
25
+ wrap = false,
26
+ ...rest
27
+ } = Astro.props
28
+
29
+ const { classList, passthrough } = resolveLumenAstroProps(rest, [
30
+ 'ui-stack',
31
+ `ui-stack--${direction}`,
32
+ `ui-stack--gap-${gap}`,
33
+ `ui-stack--align-${align}`,
34
+ `ui-stack--justify-${justify}`,
35
+ wrap && 'ui-stack--wrap'
36
+ ], classProp, className)
37
+ ---
38
+
39
+ <Tag
40
+ class:list={classList}
41
+ data-direction={direction}
42
+ data-ui-stack
43
+ {...passthrough}
44
+ >
45
+ <slot />
46
+ </Tag>
@@ -1,34 +1,40 @@
1
1
  ---
2
- import { resolveLumenAstroProps } from '@santi020k/lumen-core'
3
-
4
2
  import type { HTMLAttributes } from 'astro/types'
5
3
 
4
+ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
5
+
6
6
  interface Props extends HTMLAttributes<'div'> {
7
+ as?: 'article' | 'div' | 'section'
7
8
  class?: string | null
8
9
  className?: string
9
10
  label?: string
10
11
  value?: string
12
+ variant?: 'accent' | 'bare' | 'default' | 'glass'
11
13
  }
12
14
 
13
15
  const {
16
+ as: Tag = 'div',
14
17
  class: classProp = '',
15
18
  className = '',
16
19
  label,
17
20
  value,
21
+ variant = 'default',
18
22
  ...rest
19
23
  } = Astro.props
20
24
 
21
25
  const { classList, passthrough } = resolveLumenAstroProps(rest, [
22
- 'ui-stat'
26
+ 'ui-stat',
27
+ variant !== 'default' && `ui-stat--${variant}`
23
28
  ], classProp, className)
24
29
  ---
25
30
 
26
- <div
31
+ <Tag
27
32
  class:list={classList}
33
+ data-slot="stat"
34
+ data-variant={variant}
28
35
  {...passthrough}
29
36
  >
30
- {label && <div class="ui-stat-label">{label}</div>}
31
- {value && <div class="ui-stat-value">{value}</div>}
37
+ {label && <div class="ui-stat-label" data-slot="stat-label">{label}</div>}
38
+ {value && <div class="ui-stat-value" data-slot="stat-value">{value}</div>}
32
39
  <slot />
33
- </div>
34
-
40
+ </Tag>
@@ -0,0 +1,16 @@
1
+ ---
2
+ import type { HTMLAttributes } from 'astro/types'
3
+
4
+ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
5
+
6
+ interface Props extends HTMLAttributes<'div'> {
7
+ as?: 'div' | 'p'
8
+ class?: string | null
9
+ className?: string
10
+ }
11
+
12
+ const { as: Tag = 'div', class: classProp = '', className = '', ...rest } = Astro.props
13
+ const { classList, passthrough } = resolveLumenAstroProps(rest, ['ui-stat-description'], classProp, className)
14
+ ---
15
+
16
+ <Tag class:list={classList} data-slot="stat-description" {...passthrough}><slot /></Tag>
@@ -0,0 +1,15 @@
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
+ }
10
+
11
+ const { class: classProp = '', className = '', ...rest } = Astro.props
12
+ const { classList, passthrough } = resolveLumenAstroProps(rest, ['ui-stat-icon'], classProp, className)
13
+ ---
14
+
15
+ <span class:list={classList} data-slot="stat-icon" {...passthrough}><slot /></span>
@@ -0,0 +1,16 @@
1
+ ---
2
+ import type { HTMLAttributes } from 'astro/types'
3
+
4
+ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
5
+
6
+ interface Props extends HTMLAttributes<'div'> {
7
+ as?: 'div' | 'span'
8
+ class?: string | null
9
+ className?: string
10
+ }
11
+
12
+ const { as: Tag = 'div', class: classProp = '', className = '', ...rest } = Astro.props
13
+ const { classList, passthrough } = resolveLumenAstroProps(rest, ['ui-stat-label'], classProp, className)
14
+ ---
15
+
16
+ <Tag class:list={classList} data-slot="stat-label" {...passthrough}><slot /></Tag>
@@ -0,0 +1,28 @@
1
+ ---
2
+ import type { HTMLAttributes } from 'astro/types'
3
+
4
+ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
5
+
6
+ type StatTrendTone = 'danger' | 'neutral' | 'success' | 'warning'
7
+
8
+ interface Props extends HTMLAttributes<'span'> {
9
+ class?: string | null
10
+ className?: string
11
+ tone?: StatTrendTone
12
+ }
13
+
14
+ const {
15
+ class: classProp = '',
16
+ className = '',
17
+ tone = 'neutral',
18
+ ...rest
19
+ } = Astro.props
20
+
21
+ const { classList, passthrough } = resolveLumenAstroProps(
22
+ rest, ['ui-stat-trend', `ui-stat-trend--${tone}`], classProp, className
23
+ )
24
+ ---
25
+
26
+ <span class:list={classList} data-slot="stat-trend" data-tone={tone} {...passthrough}>
27
+ <slot />
28
+ </span>
@@ -0,0 +1,16 @@
1
+ ---
2
+ import type { HTMLAttributes } from 'astro/types'
3
+
4
+ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
5
+
6
+ interface Props extends HTMLAttributes<'div'> {
7
+ as?: 'div' | 'output' | 'span'
8
+ class?: string | null
9
+ className?: string
10
+ }
11
+
12
+ const { as: Tag = 'div', class: classProp = '', className = '', ...rest } = Astro.props
13
+ const { classList, passthrough } = resolveLumenAstroProps(rest, ['ui-stat-value'], classProp, className)
14
+ ---
15
+
16
+ <Tag class:list={classList} data-slot="stat-value" {...passthrough}><slot /></Tag>
@@ -1,9 +1,9 @@
1
1
  ---
2
- import { resolveLumenAstroProps } from '@santi020k/lumen-core'
3
-
4
2
  import type { HTMLAttributes } from 'astro/types'
5
3
 
6
- type StepItem = string | { description?: string; title: string }
4
+ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
5
+
6
+ type StepItem = string | { description?: string, title: string }
7
7
 
8
8
  interface Props extends HTMLAttributes<'ol'> {
9
9
  class?: string | null
@@ -22,12 +22,15 @@ const {
22
22
  ...rest
23
23
  } = Astro.props
24
24
 
25
- const normalized = steps.map(step =>
26
- typeof step === 'string' ? { description: undefined, title: step } : step
27
- )
25
+ const normalized = steps.map(step => typeof step === 'string' ? { description: undefined, title: step } : step)
28
26
 
29
- const stepState = (index: number) =>
30
- index < currentStep ? 'complete' : index === currentStep ? 'current' : 'upcoming'
27
+ const stepState = (index: number) => {
28
+ if (index < currentStep) return 'complete'
29
+
30
+ if (index === currentStep) return 'current'
31
+
32
+ return 'upcoming'
33
+ }
31
34
 
32
35
  const { classList, passthrough } = resolveLumenAstroProps(rest, [
33
36
  'ui-stepper',
@@ -1,8 +1,8 @@
1
1
  ---
2
- import { resolveLumenAstroProps } from '@santi020k/lumen-core'
3
-
4
2
  import type { HTMLAttributes } from 'astro/types'
5
3
 
4
+ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
5
+
6
6
  type HTMLInputAttributes = HTMLAttributes<'input'>
7
7
 
8
8
  interface Props extends Omit<HTMLInputAttributes, 'type'> {
@@ -11,6 +11,7 @@ interface Props extends Omit<HTMLInputAttributes, 'type'> {
11
11
  }
12
12
 
13
13
  const { class: classProp = '', className = '', role = 'switch', ...rest } = Astro.props
14
+
14
15
  const { classList, passthrough } = resolveLumenAstroProps(rest, ['ui-switch'
15
16
  ], classProp, className)
16
17
  ---
@@ -1,8 +1,8 @@
1
1
  ---
2
- import { resolveLumenAstroProps } from '@santi020k/lumen-core'
3
-
4
2
  import type { HTMLAttributes } from 'astro/types'
5
3
 
4
+ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
5
+
6
6
  interface Props extends HTMLAttributes<'div'> {
7
7
  class?: string | null
8
8
  className?: string
@@ -17,15 +17,16 @@ const {
17
17
  } = Astro.props
18
18
 
19
19
  const { classList, passthrough } = resolveLumenAstroProps(rest, [
20
- 'ui-table-wrap',
21
- glass && 'ui-table-wrap--glass',
22
- glass === 'subtle' && 'ui-glass-subtle',
23
- glass === 'strong' && 'ui-glass-strong'
20
+ 'ui-table-wrap',
21
+ glass && 'ui-table-wrap--glass',
22
+ glass === 'subtle' && 'ui-glass-subtle',
23
+ glass === 'strong' && 'ui-glass-strong'
24
24
  ], classProp, className)
25
25
  ---
26
26
 
27
27
  <div
28
28
  class:list={classList}
29
+ data-slot="table"
29
30
  {...passthrough}
30
31
  >
31
32
  <slot />
@@ -1,8 +1,8 @@
1
1
  ---
2
- import { resolveLumenAstroProps } from '@santi020k/lumen-core'
3
-
4
2
  import type { HTMLAttributes } from 'astro/types'
5
3
 
4
+ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
5
+
6
6
  interface Props extends HTMLAttributes<'div'> {
7
7
  class?: string | null
8
8
  className?: string
@@ -21,10 +21,10 @@ const {
21
21
  } = Astro.props
22
22
 
23
23
  const { classList, passthrough } = resolveLumenAstroProps(rest, [
24
- 'ui-tabs',
25
- glass && 'ui-tabs--glass',
26
- glass === 'subtle' && 'ui-glass-subtle',
27
- glass === 'strong' && 'ui-glass-strong'
24
+ 'ui-tabs',
25
+ glass && 'ui-tabs--glass',
26
+ glass === 'subtle' && 'ui-glass-subtle',
27
+ glass === 'strong' && 'ui-glass-strong'
28
28
  ], classProp, className)
29
29
  ---
30
30
 
@@ -1,14 +1,15 @@
1
1
  ---
2
- import { resolveLumenAstroProps } from '@santi020k/lumen-core'
3
-
4
2
  import type { HTMLAttributes } from 'astro/types'
5
3
 
4
+ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
5
+
6
6
  interface Props extends HTMLAttributes<'div'> {
7
7
  class?: string | null
8
8
  className?: string
9
9
  }
10
10
 
11
11
  const { class: classProp = '', className = '', ...rest } = Astro.props
12
+
12
13
  const { classList, passthrough } = resolveLumenAstroProps(rest, ['ui-tag-group'
13
14
  ], classProp, className)
14
15
  ---
@@ -1,14 +1,15 @@
1
1
  ---
2
- import { resolveLumenAstroProps } from '@santi020k/lumen-core'
3
-
4
2
  import type { HTMLAttributes } from 'astro/types'
5
3
 
4
+ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
5
+
6
6
  interface Props extends HTMLAttributes<'textarea'> {
7
7
  class?: string | null
8
8
  className?: string
9
9
  }
10
10
 
11
11
  const { class: classProp = '', className = '', rows = 4, ...rest } = Astro.props
12
+
12
13
  const { classList, passthrough } = resolveLumenAstroProps(rest, ['ui-textarea'
13
14
  ], classProp, className)
14
15
  ---
@@ -1,8 +1,8 @@
1
1
  ---
2
- import { resolveLumenAstroProps } from '@santi020k/lumen-core'
3
-
4
2
  import type { HTMLAttributes } from 'astro/types'
5
3
 
4
+ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
5
+
6
6
  interface Props extends HTMLAttributes<'section'> {
7
7
  class?: string | null
8
8
  className?: string
@@ -10,6 +10,7 @@ interface Props extends HTMLAttributes<'section'> {
10
10
  }
11
11
 
12
12
  const { class: classProp = '', className = '', glass = false, ...rest } = Astro.props
13
+
13
14
  const { classList, passthrough } = resolveLumenAstroProps(rest, ['ui-theme-builder', glass && 'ui-theme-builder--glass', glass === 'subtle' && 'ui-glass-subtle', glass === 'strong' && 'ui-glass-strong'
14
15
  ], classProp, className)
15
16
  ---
@@ -1,8 +1,9 @@
1
1
  ---
2
+ import type { HTMLAttributes } from 'astro/types'
3
+
2
4
  import { resolveLumenAstroProps } from '@santi020k/lumen-core'
3
- import Icon from './Icon.astro'
4
5
 
5
- import type { HTMLAttributes } from 'astro/types'
6
+ import Icon from './Icon.astro'
6
7
 
7
8
  interface Props extends HTMLAttributes<'button'> {
8
9
  class?: string | null
@@ -30,13 +31,14 @@ const { classList, passthrough } = resolveLumenAstroProps(rest, [
30
31
  ---
31
32
 
32
33
  <button
33
- type={type}
34
34
  class:list={classList}
35
35
  data-dark-theme={darkTheme}
36
36
  data-light-theme={lightTheme}
37
+ data-slot="theme-toggle"
37
38
  data-storage-key={storageKey}
38
39
  data-ui-controlled={controlled || undefined}
39
40
  data-ui-theme-toggle
41
+ type={type}
40
42
  {...passthrough}
41
43
  >
42
44
  <span class="ui-sr-only">Toggle color theme</span>
@@ -1,14 +1,15 @@
1
1
  ---
2
- import { resolveLumenAstroProps } from '@santi020k/lumen-core'
3
-
4
2
  import type { HTMLAttributes } from 'astro/types'
5
3
 
4
+ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
5
+
6
6
  interface Props extends HTMLAttributes<'input'> {
7
7
  class?: string | null
8
8
  className?: string
9
9
  }
10
10
 
11
11
  const { class: classProp = '', className = '', type = 'time', ...rest } = Astro.props
12
+
12
13
  const { classList, passthrough } = resolveLumenAstroProps(rest, ['ui-input', 'ui-time-field'
13
14
  ], classProp, className)
14
15
  ---
@@ -1,8 +1,9 @@
1
1
  ---
2
2
  import type { HTMLAttributes } from 'astro/types'
3
+
3
4
  import { composeClassName } from '@santi020k/lumen-core'
4
5
 
5
- export interface Props extends HTMLAttributes<'ol'> {}
6
+ export type Props = HTMLAttributes<'ol'>
6
7
 
7
8
  const { class: className, ...props } = Astro.props
8
9
  ---
@@ -1,8 +1,9 @@
1
1
  ---
2
2
  import type { HTMLAttributes } from 'astro/types'
3
+
3
4
  import { composeClassName } from '@santi020k/lumen-core'
4
5
 
5
- export interface Props extends HTMLAttributes<'li'> {}
6
+ export type Props = HTMLAttributes<'li'>
6
7
 
7
8
  const { class: className, ...props } = Astro.props
8
9
  const hasDot = Astro.slots.has('dot')
@@ -1,16 +1,12 @@
1
1
  ---
2
- import { resolveLumenAstroProps, resolveLumenGlass } from '@santi020k/lumen-core'
3
-
4
2
  import type { HTMLAttributes } from 'astro/types'
5
3
 
4
+ import { resolveLumenAstroProps } from '@santi020k/lumen-core'
5
+
6
6
  interface Props extends HTMLAttributes<'aside'> {
7
7
  class?: string | null
8
8
  className?: string
9
9
  glass?: boolean | 'subtle' | 'strong'
10
- /**
11
- * @deprecated Use `glass` instead. `surface="glass"` maps to `glass={true}`.
12
- */
13
- surface?: 'default' | 'glass'
14
10
  variant?: 'default' | 'destructive' | 'success' | 'warning'
15
11
  }
16
12
 
@@ -20,25 +16,23 @@ const {
20
16
  className = '',
21
17
  glass = false,
22
18
  role,
23
- surface = 'default',
24
19
  variant = 'default',
25
20
  ...rest
26
21
  } = Astro.props
27
22
 
28
- const resolvedGlass = resolveLumenGlass(glass, surface)
29
23
  const { classList, passthrough } = resolveLumenAstroProps(rest, [
30
- 'ui-toast',
31
- variant === 'destructive' && 'ui-toast--destructive',
32
- variant === 'success' && 'ui-toast--success',
33
- variant === 'warning' && 'ui-toast--warning',
34
- resolvedGlass && 'ui-toast--glass',
35
- glass === 'subtle' && 'ui-glass-subtle',
36
- glass === 'strong' && 'ui-glass-strong'
24
+ 'ui-toast',
25
+ variant === 'destructive' && 'ui-toast--destructive',
26
+ variant === 'success' && 'ui-toast--success',
27
+ variant === 'warning' && 'ui-toast--warning',
28
+ glass && 'ui-toast--glass',
29
+ glass === 'subtle' && 'ui-glass-subtle',
30
+ glass === 'strong' && 'ui-glass-strong'
37
31
  ], classProp, className)
38
32
  ---
39
33
 
40
34
  <aside
41
- data-surface={resolvedGlass ? 'glass' : 'default'}
35
+ data-surface={glass ? 'glass' : 'default'}
42
36
  data-ui-toast
43
37
  data-variant={variant}
44
38
  aria-live={ariaLive ?? (variant === 'destructive' ? 'assertive' : 'polite')}