@rimelight/ui 0.0.34 → 0.0.35
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 +1 -0
- package/package.json +19 -24
- package/src/components/astro/RLAAccordion.astro +94 -18
- package/src/components/astro/RLAAvatar.astro +135 -68
- package/src/components/astro/RLABadge.astro +4 -2
- package/src/components/astro/RLABanner.astro +138 -23
- package/src/components/astro/RLABreadcrumb.astro +13 -0
- package/src/components/astro/RLAButton.astro +8 -4
- package/src/components/astro/RLACallout.astro +112 -0
- package/src/components/astro/RLACard.astro +6 -5
- package/src/components/astro/RLACarousel.astro +104 -75
- package/src/components/astro/RLAChart.astro +4 -1
- package/src/components/astro/RLAChip.astro +11 -5
- package/src/components/astro/RLACollapsible.astro +4 -1
- package/src/components/astro/RLAColorArea.astro +432 -0
- package/src/components/astro/RLAColorField.astro +300 -0
- package/src/components/astro/RLAColorSlider.astro +413 -0
- package/src/components/astro/RLAConfirm.astro +13 -11
- package/src/components/astro/RLACopyMarkdown.astro +78 -0
- package/src/components/astro/RLADate.astro +30 -0
- package/src/components/astro/RLADrawer.astro +50 -3
- package/src/components/astro/RLADropdownMenu.astro +78 -51
- package/src/components/astro/RLAFieldGroup.astro +4 -1
- package/src/components/astro/RLAFileUpload.astro +114 -100
- package/src/components/astro/RLAFooter.astro +2 -1
- package/src/components/astro/RLAFormField.astro +10 -6
- package/src/components/astro/RLAGrid.astro +31 -39
- package/src/components/astro/RLAHead.astro +139 -39
- package/src/components/astro/RLAHeader.astro +2 -1
- package/src/components/astro/RLAImage.astro +274 -251
- package/src/components/astro/RLAInput.astro +14 -9
- package/src/components/astro/RLAInputMenu.astro +119 -83
- package/src/components/astro/RLAKbd.astro +5 -5
- package/src/components/astro/RLALayoutGrid.astro +395 -0
- package/src/components/astro/RLALink.astro +23 -1
- package/src/components/astro/RLALinkGroup.astro +99 -99
- package/src/components/astro/RLALocaleSelector.astro +29 -35
- package/src/components/astro/RLALogo.astro +117 -90
- package/src/components/astro/RLAModal.astro +48 -18
- package/src/components/astro/RLANavigationMenu.astro +381 -326
- package/src/components/astro/{RLADocsPackageManagers.astro → RLAPackageManagers.astro} +81 -87
- package/src/components/astro/RLAPageSection.astro +4 -2
- package/src/components/astro/RLAPopover.astro +4 -3
- package/src/components/astro/RLAPost.astro +11 -2
- package/src/components/astro/RLAScrollArea.astro +4 -1
- package/src/components/astro/RLAScrollToTop.astro +200 -172
- package/src/components/astro/RLASearch.astro +282 -0
- package/src/components/astro/RLASelect.astro +78 -55
- package/src/components/astro/RLASeparator.astro +11 -6
- package/src/components/astro/RLAShare.astro +60 -0
- package/src/components/astro/RLAShortcuts.astro +429 -0
- package/src/components/astro/RLASidebar.astro +158 -212
- package/src/components/astro/RLASlideover.astro +47 -17
- package/src/components/astro/RLASplitter.astro +194 -141
- package/src/components/astro/RLASteps.astro +118 -71
- package/src/components/astro/RLASurround.astro +39 -0
- package/src/components/astro/RLATable.astro +4 -1
- package/src/components/astro/RLATableOfContents.astro +109 -23
- package/src/components/astro/RLATabs.astro +147 -133
- package/src/components/astro/RLATextarea.astro +4 -1
- package/src/components/astro/RLAThemeSelector.astro +105 -76
- package/src/components/astro/RLAToast.astro +35 -21
- package/src/components/vue/RLVBanner.vue +230 -0
- package/src/components/vue/RLVButton.vue +3 -2
- package/src/components/vue/RLVCheckbox.vue +4 -2
- package/src/components/vue/RLVFooter.vue +3 -2
- package/src/components/vue/RLVHeader.vue +3 -2
- package/src/components/vue/RLVIcon.vue +4 -2
- package/src/components/vue/RLVInput.vue +5 -4
- package/src/components/vue/RLVLogo.vue +25 -3
- package/src/components/vue/RLVPlaceholder.vue +3 -2
- package/src/components/vue/RLVPost.vue +8 -2
- package/src/components/vue/RLVProgress.vue +60 -0
- package/src/components/vue/RLVScrollToTop.vue +65 -52
- package/src/components/vue/RLVSection.vue +14 -13
- package/src/components/vue/RLVToast.vue +17 -4
- package/src/composables/index.ts +1 -0
- package/src/composables/useHeaderStore.ts +1 -0
- package/src/composables/useShortcuts.ts +11 -0
- package/src/config/security.ts +43 -36
- package/src/config/site.config.ts +1 -0
- package/src/docs/components/ApiChangelog.astro +147 -0
- package/src/{plugins/starlightDocsApi → docs}/components/ApiEmits.astro +4 -4
- package/src/{plugins/starlightDocsApi → docs}/components/ApiProps.astro +4 -4
- package/src/{plugins/starlightDocsApi → docs}/components/ApiSlots.astro +4 -4
- package/src/docs/components/ApiTheme.astro +100 -0
- package/src/docs/extractAll.ts +94 -0
- package/src/docs/extractors/extractAstro.ts +69 -0
- package/src/docs/extractors/extractTheme.ts +56 -0
- package/src/{plugins/starlightDocsApi/extract-vue.ts → docs/extractors/extractVue.ts} +164 -15
- package/src/{plugins/starlightDocsApi → docs}/utils.ts +1 -2
- package/src/env.d.ts +0 -12
- package/src/integrations/ui.ts +35 -19
- package/src/middleware/security.ts +75 -19
- package/src/presets/index.ts +118 -293
- package/src/styles/index.css +0 -2
- package/src/themes/accordion.theme.ts +29 -3
- package/src/themes/aspect-ratio.theme.ts +1 -1
- package/src/themes/avatar-group.theme.ts +1 -1
- package/src/themes/avatar.theme.ts +2 -2
- package/src/themes/badge.theme.ts +2 -3
- package/src/themes/banner.theme.ts +40 -4
- package/src/themes/breadcrumb.theme.ts +1 -1
- package/src/themes/button.theme.ts +21 -22
- package/src/themes/{alert.theme.ts → callout.theme.ts} +12 -39
- package/src/themes/card.theme.ts +17 -9
- package/src/themes/carousel.theme.ts +1 -1
- package/src/themes/checkbox.theme.ts +1 -2
- package/src/themes/chip.theme.ts +2 -3
- package/src/themes/color-area.theme.ts +33 -0
- package/src/themes/color-field.theme.ts +32 -0
- package/src/themes/color-slider.theme.ts +34 -0
- package/src/themes/confirm.theme.ts +1 -1
- package/src/themes/container.theme.ts +1 -1
- package/src/themes/drawer.theme.ts +1 -1
- package/src/themes/footer.theme.ts +2 -2
- package/src/themes/grid.theme.ts +38 -0
- package/src/themes/header.theme.ts +4 -3
- package/src/themes/hover-card.theme.ts +1 -1
- package/src/themes/image.theme.ts +11 -1
- package/src/themes/input.theme.ts +7 -1
- package/src/themes/kbd.theme.ts +2 -3
- package/src/themes/label.theme.ts +1 -1
- package/src/themes/layout-grid.theme.ts +16 -0
- package/src/themes/link-group.theme.ts +0 -4
- package/src/themes/marquee.theme.ts +1 -1
- package/src/themes/modal.theme.ts +1 -1
- package/src/themes/navigation-menu.theme.ts +2 -2
- package/src/themes/page-section.theme.ts +4 -2
- package/src/themes/pagination.theme.ts +1 -1
- package/src/themes/pin-input.theme.ts +1 -1
- package/src/themes/popover.theme.ts +1 -1
- package/src/themes/post.theme.ts +23 -3
- package/src/themes/progress.theme.ts +1 -2
- package/src/themes/scroll-to-top.theme.ts +2 -3
- package/src/themes/search.theme.ts +64 -0
- package/src/themes/separator.theme.ts +1 -1
- package/src/themes/slideover.theme.ts +1 -1
- package/src/themes/slider.theme.ts +1 -2
- package/src/themes/spinner.theme.ts +1 -2
- package/src/themes/{megamenu.theme.ts → steps.theme.ts} +3 -3
- package/src/themes/sticky-surface.theme.ts +1 -1
- package/src/themes/switch.theme.ts +1 -2
- package/src/themes/table-of-contents.theme.ts +21 -2
- package/src/themes/timeline.theme.ts +7 -2
- package/src/themes/toast.theme.ts +1 -1
- package/src/types/components/accordion.ts +35 -2
- package/src/types/components/avatar.ts +16 -0
- package/src/types/components/banner.ts +42 -0
- package/src/types/components/button.ts +3 -4
- package/src/types/components/{alert.ts → callout.ts} +6 -6
- package/src/types/components/color-area.ts +19 -0
- package/src/types/components/color-field.ts +21 -0
- package/src/types/components/color-slider.ts +20 -0
- package/src/types/components/grid.ts +23 -0
- package/src/types/components/input.ts +4 -0
- package/src/types/components/layout-grid.ts +145 -0
- package/src/types/components/link-group.ts +4 -2
- package/src/types/components/link.ts +15 -0
- package/src/types/components/logo.ts +3 -3
- package/src/types/components/post.ts +12 -0
- package/src/types/components/search.ts +29 -0
- package/src/types/components/sidebar.ts +2 -6
- package/src/types/components/{megamenu.ts → steps.ts} +7 -1
- package/src/types/components/table-of-contents.ts +22 -0
- package/src/types/components/toast.ts +4 -0
- package/src/types/docs.ts +40 -0
- package/src/types/index.ts +151 -1
- package/src/types/theme.ts +6 -6
- package/src/utils/color.ts +165 -0
- package/src/utils/docs.ts +260 -110
- package/src/utils/headerStack.ts +24 -4
- package/src/utils/index.ts +2 -0
- package/src/utils/shortcuts.ts +322 -0
- package/src/components/TableOfContents.astro +0 -107
- package/src/components/astro/RLAAlert.astro +0 -93
- package/src/components/astro/RLAChangelog.astro +0 -23
- package/src/components/astro/RLAMegamenu.astro +0 -23
- package/src/plugins/index.ts +0 -2
- package/src/plugins/starlightDocsApi/components/ApiTheme.astro +0 -27
- package/src/plugins/starlightDocsApi/index.ts +0 -272
- package/src/styles/prism.css +0 -42
- package/src/themes/changelog.theme.ts +0 -13
- package/src/types/components/index.ts +0 -134
- /package/src/{plugins/starlightDocsApi → docs}/types.ts +0 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Theme, ThemeColor } from "../theme"
|
|
2
|
+
|
|
3
|
+
export interface ColorAreaProps {
|
|
4
|
+
colorSpace?: "hsl" | "rgb" | "hsb"
|
|
5
|
+
defaultValue?: string
|
|
6
|
+
disabled?: boolean
|
|
7
|
+
modelValue?: string
|
|
8
|
+
name?: string
|
|
9
|
+
required?: boolean
|
|
10
|
+
xChannel?: "hue" | "saturation" | "red" | "green" | "blue" | "alpha" | "lightness" | "brightness"
|
|
11
|
+
xName?: string
|
|
12
|
+
yChannel?: "hue" | "saturation" | "red" | "green" | "blue" | "alpha" | "lightness" | "brightness"
|
|
13
|
+
yName?: string
|
|
14
|
+
color?: ThemeColor
|
|
15
|
+
theme?: Theme
|
|
16
|
+
ui?: any
|
|
17
|
+
class?: any
|
|
18
|
+
[key: string]: unknown
|
|
19
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Theme, ThemeColor } from "../theme"
|
|
2
|
+
|
|
3
|
+
export interface ColorFieldProps {
|
|
4
|
+
channel?: "hue" | "saturation" | "red" | "green" | "blue" | "alpha" | "lightness" | "brightness"
|
|
5
|
+
colorSpace?: "hsl" | "rgb" | "hsb"
|
|
6
|
+
defaultValue?: string
|
|
7
|
+
disabled?: boolean
|
|
8
|
+
disableWheelChange?: boolean
|
|
9
|
+
locale?: string
|
|
10
|
+
modelValue?: string
|
|
11
|
+
name?: string
|
|
12
|
+
placeholder?: string
|
|
13
|
+
readonly?: boolean
|
|
14
|
+
required?: boolean
|
|
15
|
+
step?: number
|
|
16
|
+
color?: ThemeColor
|
|
17
|
+
theme?: Theme
|
|
18
|
+
ui?: any
|
|
19
|
+
class?: any
|
|
20
|
+
[key: string]: unknown
|
|
21
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Theme, ThemeColor } from "../theme"
|
|
2
|
+
|
|
3
|
+
export interface ColorSliderProps {
|
|
4
|
+
channel: "hue" | "saturation" | "red" | "green" | "blue" | "alpha" | "lightness" | "brightness"
|
|
5
|
+
colorSpace?: "hsl" | "rgb" | "hsb"
|
|
6
|
+
defaultValue?: string
|
|
7
|
+
dir?: "ltr" | "rtl"
|
|
8
|
+
disabled?: boolean
|
|
9
|
+
inverted?: boolean
|
|
10
|
+
modelValue?: string
|
|
11
|
+
name?: string
|
|
12
|
+
orientation?: "vertical" | "horizontal"
|
|
13
|
+
required?: boolean
|
|
14
|
+
step?: number
|
|
15
|
+
color?: ThemeColor
|
|
16
|
+
theme?: Theme
|
|
17
|
+
ui?: any
|
|
18
|
+
class?: any
|
|
19
|
+
[key: string]: unknown
|
|
20
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface GridProps {
|
|
2
|
+
/**
|
|
3
|
+
* Number of columns on desktop viewports.
|
|
4
|
+
*/
|
|
5
|
+
cols?: 1 | 2 | 3 | 4 | 5 | 6
|
|
6
|
+
/**
|
|
7
|
+
* Staggered height layout for grid items.
|
|
8
|
+
*/
|
|
9
|
+
stagger?: boolean
|
|
10
|
+
/**
|
|
11
|
+
* Grid gap size.
|
|
12
|
+
*/
|
|
13
|
+
gap?: "none" | "xs" | "sm" | "md" | "lg" | "xl"
|
|
14
|
+
/**
|
|
15
|
+
* Slot-specific CSS class overrides.
|
|
16
|
+
*/
|
|
17
|
+
ui?: any
|
|
18
|
+
/**
|
|
19
|
+
* Additional CSS classes to apply to the root element.
|
|
20
|
+
*/
|
|
21
|
+
class?: any
|
|
22
|
+
[key: string]: unknown
|
|
23
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
export interface LayoutGridProps {
|
|
2
|
+
/**
|
|
3
|
+
* Number of columns on base/xs viewports (<640px by default).
|
|
4
|
+
*
|
|
5
|
+
* @default 4
|
|
6
|
+
*/
|
|
7
|
+
cols?: number
|
|
8
|
+
/**
|
|
9
|
+
* Number of columns on sm viewports (>=640px by default).
|
|
10
|
+
*
|
|
11
|
+
* @default 4
|
|
12
|
+
*/
|
|
13
|
+
smCols?: number
|
|
14
|
+
/**
|
|
15
|
+
* Number of columns on md viewports (>=768px by default).
|
|
16
|
+
*
|
|
17
|
+
* @default 8
|
|
18
|
+
*/
|
|
19
|
+
mdCols?: number
|
|
20
|
+
/**
|
|
21
|
+
* Number of columns on lg viewports (>=1024px by default).
|
|
22
|
+
*
|
|
23
|
+
* @default 12
|
|
24
|
+
*/
|
|
25
|
+
lgCols?: number
|
|
26
|
+
/**
|
|
27
|
+
* Number of columns on xl viewports (>=1280px by default).
|
|
28
|
+
*
|
|
29
|
+
* @default 12
|
|
30
|
+
*/
|
|
31
|
+
xlCols?: number
|
|
32
|
+
/**
|
|
33
|
+
* Breakpoint width in pixels for sm breakpoint.
|
|
34
|
+
*
|
|
35
|
+
* @default 640
|
|
36
|
+
*/
|
|
37
|
+
smBreakpoint?: number
|
|
38
|
+
/**
|
|
39
|
+
* Breakpoint width in pixels for md breakpoint.
|
|
40
|
+
*
|
|
41
|
+
* @default 768
|
|
42
|
+
*/
|
|
43
|
+
mdBreakpoint?: number
|
|
44
|
+
/**
|
|
45
|
+
* Breakpoint width in pixels for lg breakpoint.
|
|
46
|
+
*
|
|
47
|
+
* @default 1024
|
|
48
|
+
*/
|
|
49
|
+
lgBreakpoint?: number
|
|
50
|
+
/**
|
|
51
|
+
* Breakpoint width in pixels for xl breakpoint.
|
|
52
|
+
*
|
|
53
|
+
* @default 1280
|
|
54
|
+
*/
|
|
55
|
+
xlBreakpoint?: number
|
|
56
|
+
/**
|
|
57
|
+
* Spacing between columns in rem. Can be a single number or array [base, sm, md, lg, xl].
|
|
58
|
+
*
|
|
59
|
+
* @default 1
|
|
60
|
+
*/
|
|
61
|
+
gutter?: number | number[]
|
|
62
|
+
/**
|
|
63
|
+
* Spacing on outer margins of the grid in rem. Can be a single number or array [base, sm, md, lg,
|
|
64
|
+
* xl].
|
|
65
|
+
*
|
|
66
|
+
* @default 1
|
|
67
|
+
*/
|
|
68
|
+
margin?: number | number[]
|
|
69
|
+
/**
|
|
70
|
+
* Color value (CSS color string) for the grid.
|
|
71
|
+
*
|
|
72
|
+
* @default "#ff0000"
|
|
73
|
+
*/
|
|
74
|
+
gridColor?: string
|
|
75
|
+
/**
|
|
76
|
+
* Opacity for filled column backgrounds.
|
|
77
|
+
*
|
|
78
|
+
* @default 0.1
|
|
79
|
+
*/
|
|
80
|
+
gridOpacity?: number
|
|
81
|
+
/**
|
|
82
|
+
* Maximum width of the grid container (CSS max-width string).
|
|
83
|
+
*
|
|
84
|
+
* @default "100vw"
|
|
85
|
+
*/
|
|
86
|
+
maxWidth?: string
|
|
87
|
+
/**
|
|
88
|
+
* Whether to display colored backgrounds in columns.
|
|
89
|
+
*
|
|
90
|
+
* @default false
|
|
91
|
+
*/
|
|
92
|
+
showBackground?: boolean
|
|
93
|
+
/**
|
|
94
|
+
* Whether to overlay a secondary full-width viewport grid.
|
|
95
|
+
*
|
|
96
|
+
* @default true
|
|
97
|
+
*/
|
|
98
|
+
showFullWidth?: boolean
|
|
99
|
+
/**
|
|
100
|
+
* Color value (CSS color string) for the full-width grid overlay.
|
|
101
|
+
*
|
|
102
|
+
* @default "#3b82f6"
|
|
103
|
+
*/
|
|
104
|
+
fullWidthGridColor?: string
|
|
105
|
+
/**
|
|
106
|
+
* Opacity for filled full-width column backgrounds.
|
|
107
|
+
*
|
|
108
|
+
* @default 0.05
|
|
109
|
+
*/
|
|
110
|
+
fullWidthGridOpacity?: number
|
|
111
|
+
/**
|
|
112
|
+
* Whether to display colored backgrounds in full-width columns.
|
|
113
|
+
*
|
|
114
|
+
* @default false
|
|
115
|
+
*/
|
|
116
|
+
showFullWidthBackground?: boolean
|
|
117
|
+
/**
|
|
118
|
+
* Z-index of the grid overlay.
|
|
119
|
+
*
|
|
120
|
+
* @default 1000
|
|
121
|
+
*/
|
|
122
|
+
zIndex?: number
|
|
123
|
+
/**
|
|
124
|
+
* Shortcut key combination to toggle grid visibility, using underscore formatting (e.g.
|
|
125
|
+
* meta_shift_g).
|
|
126
|
+
*
|
|
127
|
+
* @default "meta_shift_g"
|
|
128
|
+
*/
|
|
129
|
+
shortcut?: string
|
|
130
|
+
/**
|
|
131
|
+
* Whether the grid is restricted only to development mode (import.meta.env.DEV).
|
|
132
|
+
*
|
|
133
|
+
* @default true
|
|
134
|
+
*/
|
|
135
|
+
devOnly?: boolean
|
|
136
|
+
/**
|
|
137
|
+
* UI class overrides for components elements slots.
|
|
138
|
+
*/
|
|
139
|
+
ui?: any
|
|
140
|
+
/**
|
|
141
|
+
* CSS class to apply to the root wrapper.
|
|
142
|
+
*/
|
|
143
|
+
class?: any
|
|
144
|
+
[key: string]: unknown
|
|
145
|
+
}
|
|
@@ -34,9 +34,11 @@ export interface LinkGroupProps {
|
|
|
34
34
|
*/
|
|
35
35
|
ui?: any
|
|
36
36
|
/**
|
|
37
|
-
* Force a
|
|
37
|
+
* Force a color-scheme context on the link group. `"light"` or `"dark"` sets `color-scheme` on
|
|
38
|
+
* the root element, causing all `light-dark()` color variables to resolve to the correct scheme
|
|
39
|
+
* regardless of the global page mode.
|
|
38
40
|
*/
|
|
39
|
-
theme?: "
|
|
41
|
+
theme?: "light" | "dark"
|
|
40
42
|
/**
|
|
41
43
|
* Additional CSS classes to apply to the root element.
|
|
42
44
|
*/
|
|
@@ -15,6 +15,21 @@ export interface LinkProps {
|
|
|
15
15
|
activeClass?: string
|
|
16
16
|
variant?: "solid" | "outline" | "soft" | "subtle" | "ghost" | "link"
|
|
17
17
|
color?: ThemeColor
|
|
18
|
+
/**
|
|
19
|
+
* Styles the link visually as a button
|
|
20
|
+
*
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
23
|
+
isButton?: boolean
|
|
24
|
+
/**
|
|
25
|
+
* Screen reader accessibility label. Will automatically append " (opens in a new tab)" for
|
|
26
|
+
* external links if not customized
|
|
27
|
+
*/
|
|
28
|
+
ariaLabel?: string
|
|
29
|
+
/**
|
|
30
|
+
* Custom external link icon name
|
|
31
|
+
*/
|
|
32
|
+
externalIcon?: string
|
|
18
33
|
/**
|
|
19
34
|
* Slot-specific CSS class overrides.
|
|
20
35
|
*/
|
|
@@ -8,10 +8,10 @@ export interface LogoProps {
|
|
|
8
8
|
*/
|
|
9
9
|
mode?: "color" | "white" | "black"
|
|
10
10
|
/**
|
|
11
|
-
* Theme override
|
|
12
|
-
*
|
|
11
|
+
* Theme override — pins the logo rendering to `"light"` or `"dark"` color-scheme context, causing
|
|
12
|
+
* `light-dark()` variables to resolve to the correct scheme regardless of the global page mode.
|
|
13
13
|
*/
|
|
14
|
-
theme?: "
|
|
14
|
+
theme?: "light" | "dark"
|
|
15
15
|
/**
|
|
16
16
|
* The destination URL when the logo is clicked.
|
|
17
17
|
*/
|
|
@@ -23,6 +23,18 @@ export interface PostProps {
|
|
|
23
23
|
* The variant of the post.
|
|
24
24
|
*/
|
|
25
25
|
variant?: "soft" | "ghost"
|
|
26
|
+
/**
|
|
27
|
+
* The orientation layout of the post.
|
|
28
|
+
*/
|
|
29
|
+
orientation?: "vertical" | "horizontal"
|
|
30
|
+
/**
|
|
31
|
+
* Badge label displayed on the post.
|
|
32
|
+
*/
|
|
33
|
+
badge?: string
|
|
34
|
+
/**
|
|
35
|
+
* Badge color scheme.
|
|
36
|
+
*/
|
|
37
|
+
badgeColor?: string
|
|
26
38
|
/**
|
|
27
39
|
* Slot-specific CSS class overrides.
|
|
28
40
|
*/
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface SearchProps {
|
|
2
|
+
/**
|
|
3
|
+
* API endpoint to query results from.
|
|
4
|
+
*/
|
|
5
|
+
endpoint?: string
|
|
6
|
+
/**
|
|
7
|
+
* Search input placeholder.
|
|
8
|
+
*/
|
|
9
|
+
placeholder?: string
|
|
10
|
+
/**
|
|
11
|
+
* Custom labels and localization text.
|
|
12
|
+
*/
|
|
13
|
+
messages?: {
|
|
14
|
+
searchButtonLabel?: string
|
|
15
|
+
searchPlaceholder?: string
|
|
16
|
+
noResultsLabel?: string
|
|
17
|
+
footerCloseHint?: string
|
|
18
|
+
footerBackendHint?: string
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Slot-specific CSS class overrides.
|
|
22
|
+
*/
|
|
23
|
+
ui?: any
|
|
24
|
+
/**
|
|
25
|
+
* Additional CSS classes to apply to the root element.
|
|
26
|
+
*/
|
|
27
|
+
class?: any
|
|
28
|
+
[key: string]: unknown
|
|
29
|
+
}
|
|
@@ -15,18 +15,13 @@ export interface BadgeConfig {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
export interface SidebarItem {
|
|
18
|
-
label
|
|
18
|
+
label: string
|
|
19
19
|
href?: string
|
|
20
20
|
icon?: string
|
|
21
21
|
badge?: string | BadgeConfig
|
|
22
22
|
active?: boolean
|
|
23
23
|
children?: SidebarItem[]
|
|
24
24
|
items?: SidebarItem[]
|
|
25
|
-
order?: number
|
|
26
|
-
autogenerate?: {
|
|
27
|
-
directory: string
|
|
28
|
-
collapsed?: boolean
|
|
29
|
-
}
|
|
30
25
|
collapsed?: boolean
|
|
31
26
|
}
|
|
32
27
|
|
|
@@ -49,6 +44,7 @@ export interface EditLinkConfig {
|
|
|
49
44
|
}
|
|
50
45
|
|
|
51
46
|
export interface DocsConfig {
|
|
47
|
+
basePath?: string
|
|
52
48
|
sidebar:
|
|
53
49
|
| (SidebarItem | SidebarScope)[]
|
|
54
50
|
| {
|
|
@@ -1,4 +1,26 @@
|
|
|
1
|
+
export interface TableOfContentsHeading {
|
|
2
|
+
depth: number
|
|
3
|
+
slug: string
|
|
4
|
+
text: string
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface TableOfContentsConfig {
|
|
8
|
+
minHeadingLevel?: number
|
|
9
|
+
maxHeadingLevel?: number
|
|
10
|
+
}
|
|
11
|
+
|
|
1
12
|
export interface TableOfContentsProps {
|
|
13
|
+
headings: TableOfContentsHeading[]
|
|
14
|
+
/**
|
|
15
|
+
* False = hide entirely, object = heading level bounds
|
|
16
|
+
*/
|
|
17
|
+
tableOfContents?: false | TableOfContentsConfig
|
|
18
|
+
/**
|
|
19
|
+
* CSS selector for the container element whose headings should be tracked.
|
|
20
|
+
*
|
|
21
|
+
* @default ".markdown-content"
|
|
22
|
+
*/
|
|
23
|
+
containerSelector?: string
|
|
2
24
|
/**
|
|
3
25
|
* The component the root element should render as.
|
|
4
26
|
*
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export interface PropMeta {
|
|
2
|
+
name: string
|
|
3
|
+
type: string
|
|
4
|
+
default?: string
|
|
5
|
+
required: boolean
|
|
6
|
+
description: string
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface SlotMeta {
|
|
10
|
+
name: string
|
|
11
|
+
bindings: Record<string, string>
|
|
12
|
+
description: string
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface EmitMeta {
|
|
16
|
+
name: string
|
|
17
|
+
type: string
|
|
18
|
+
description: string
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface ThemeMeta {
|
|
22
|
+
slots: string[]
|
|
23
|
+
base: Record<string, string | string[]>
|
|
24
|
+
variants: Record<string, Record<string, Record<string, string | string[]>>>
|
|
25
|
+
compoundVariants: Record<string, unknown>[]
|
|
26
|
+
defaultVariants: Record<string, unknown>
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface ComponentMeta {
|
|
30
|
+
name: string
|
|
31
|
+
astroComponent: string | null
|
|
32
|
+
vueComponent: string | null
|
|
33
|
+
frameworks: ("astro" | "vue")[]
|
|
34
|
+
props: PropMeta[]
|
|
35
|
+
slots: SlotMeta[]
|
|
36
|
+
emits: EmitMeta[]
|
|
37
|
+
theme: ThemeMeta | null
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export type ComponentMetaMap = Record<string, ComponentMeta>
|
package/src/types/index.ts
CHANGED
|
@@ -1,3 +1,153 @@
|
|
|
1
|
-
export * from "./components"
|
|
2
1
|
export * from "./componentVariant"
|
|
3
2
|
export * from "./theme"
|
|
3
|
+
export * from "./docs"
|
|
4
|
+
|
|
5
|
+
export type { ThreeDHoverProps } from "./components/3d-hover"
|
|
6
|
+
export type { AccordionProps } from "./components/accordion"
|
|
7
|
+
export type { CalloutProps } from "./components/callout"
|
|
8
|
+
export type { AppProps } from "./components/app"
|
|
9
|
+
export type { AspectRatioProps } from "./components/aspect-ratio"
|
|
10
|
+
export type { AudioProps } from "./components/audio"
|
|
11
|
+
export type { AvatarGroupProps } from "./components/avatar-group"
|
|
12
|
+
export type { AvatarProps } from "./components/avatar"
|
|
13
|
+
export type { BadgeProps } from "./components/badge"
|
|
14
|
+
export type { BannerProps } from "./components/banner"
|
|
15
|
+
export type { BreadcrumbProps } from "./components/breadcrumb"
|
|
16
|
+
export type { BrowserMockupProps } from "./components/browser-mockup"
|
|
17
|
+
export type { ButtonProps } from "./components/button"
|
|
18
|
+
export type { CalendarProps } from "./components/calendar"
|
|
19
|
+
export type { CardProps } from "./components/card"
|
|
20
|
+
export type { CarouselProps } from "./components/carousel"
|
|
21
|
+
export type { ChangelogProps } from "./components/changelog"
|
|
22
|
+
export type { ChartProps, ChartDataPoint } from "./components/chart"
|
|
23
|
+
export type { ChatMessageProps } from "./components/chat-message"
|
|
24
|
+
export type { ChatMessagesProps } from "./components/chat-messages"
|
|
25
|
+
export type { ChatPaletteProps } from "./components/chat-palette"
|
|
26
|
+
export type { ChatPromptProps } from "./components/chat-prompt"
|
|
27
|
+
export type { ChatPromptSubmitProps } from "./components/chat-prompt-submit"
|
|
28
|
+
export type { ChatReasoningProps } from "./components/chat-reasoning"
|
|
29
|
+
export type { ChatShimmerProps } from "./components/chat-shimmer"
|
|
30
|
+
export type { ChatToolProps } from "./components/chat-tool"
|
|
31
|
+
export type { ChatProps } from "./components/chat"
|
|
32
|
+
export type { CheckboxProps } from "./components/checkbox"
|
|
33
|
+
export type { ChipProps } from "./components/chip"
|
|
34
|
+
export type { CollapsibleProps } from "./components/collapsible"
|
|
35
|
+
export type { ColorPickerProps } from "./components/color-picker"
|
|
36
|
+
export type { CommandPaletteProps } from "./components/command-palette"
|
|
37
|
+
export type { CompareProps } from "./components/compare"
|
|
38
|
+
export type { ConfirmProps } from "./components/confirm"
|
|
39
|
+
export type { ContainerProps } from "./components/container"
|
|
40
|
+
export type { ContextMenuProps } from "./components/context-menu"
|
|
41
|
+
export type { DashboardGroupProps } from "./components/dashboard-group"
|
|
42
|
+
export type { DashboardNavbarProps } from "./components/dashboard-navbar"
|
|
43
|
+
export type { DashboardPanelProps } from "./components/dashboard-panel"
|
|
44
|
+
export type { DashboardResizeHandleProps } from "./components/dashboard-resize-handle"
|
|
45
|
+
export type { DashboardSearchButtonProps } from "./components/dashboard-search-button"
|
|
46
|
+
export type { DashboardSearchProps } from "./components/dashboard-search"
|
|
47
|
+
export type { SearchProps } from "./components/search"
|
|
48
|
+
export type { DashboardSidebarCollapseProps } from "./components/dashboard-sidebar-collapse"
|
|
49
|
+
export type { DashboardSidebarToggleProps } from "./components/dashboard-sidebar-toggle"
|
|
50
|
+
export type { DashboardSidebarProps } from "./components/dashboard-sidebar"
|
|
51
|
+
export type { DashboardToolbarProps } from "./components/dashboard-toolbar"
|
|
52
|
+
export type { DockProps } from "./components/dock"
|
|
53
|
+
export type { DrawerProps } from "./components/drawer"
|
|
54
|
+
export type { DropdownMenuProps } from "./components/dropdown-menu"
|
|
55
|
+
export type { EditorProps } from "./components/editor"
|
|
56
|
+
export type { EmptyProps } from "./components/empty"
|
|
57
|
+
export type { ErrorProps } from "./components/error"
|
|
58
|
+
export type { FieldGroupProps } from "./components/field-group"
|
|
59
|
+
export type { FieldsetProps } from "./components/fieldset"
|
|
60
|
+
export type { FileUploadProps } from "./components/file-upload"
|
|
61
|
+
export type { FloatingActionProps } from "./components/floating-action"
|
|
62
|
+
export type { FooterProps } from "./components/footer"
|
|
63
|
+
export type { FormFieldProps } from "./components/form-field"
|
|
64
|
+
export type { FormProps } from "./components/form"
|
|
65
|
+
export type { GalleryProps } from "./components/gallery"
|
|
66
|
+
export type { GridProps } from "./components/grid"
|
|
67
|
+
export type { LayoutGridProps } from "./components/layout-grid"
|
|
68
|
+
export type { HeaderProps } from "./components/header"
|
|
69
|
+
export type { HoverCardProps } from "./components/hover-card"
|
|
70
|
+
export type { IconProps } from "./components/icon"
|
|
71
|
+
export type { ImageProps } from "./components/image"
|
|
72
|
+
export type { InputDateProps } from "./components/input-date"
|
|
73
|
+
export type { InputMenuProps } from "./components/input-menu"
|
|
74
|
+
export type { InputNumberProps } from "./components/input-number"
|
|
75
|
+
export type { InputProps } from "./components/input"
|
|
76
|
+
export type { InputTagsProps } from "./components/input-tags"
|
|
77
|
+
export type { InputTimeProps } from "./components/input-time"
|
|
78
|
+
export type { KbdProps } from "./components/kbd"
|
|
79
|
+
export type { KnobProps } from "./components/knob"
|
|
80
|
+
export type { LabelProps } from "./components/label"
|
|
81
|
+
export type { LinkGroupProps } from "./components/link-group"
|
|
82
|
+
export type { LinkProps } from "./components/link"
|
|
83
|
+
export type { ListboxProps } from "./components/listbox"
|
|
84
|
+
export type { LocaleSelectorProps } from "./components/locale-selector"
|
|
85
|
+
export type { LogoProps } from "./components/logo"
|
|
86
|
+
export type { MainProps } from "./components/main"
|
|
87
|
+
export type { MarqueeProps } from "./components/marquee"
|
|
88
|
+
export type { MeterProps } from "./components/meter"
|
|
89
|
+
export type { ModalProps } from "./components/modal"
|
|
90
|
+
export type { NavigationMenuItem, NavigationMenuProps } from "./components/navigation-menu"
|
|
91
|
+
export type { PageAsideProps } from "./components/page-aside"
|
|
92
|
+
export type { PageBodyProps } from "./components/page-body"
|
|
93
|
+
export type { PageHeaderProps } from "./components/page-header"
|
|
94
|
+
export type { PageSectionProps } from "./components/page-section"
|
|
95
|
+
export type { PageProps } from "./components/page"
|
|
96
|
+
export type { PaginationProps } from "./components/pagination"
|
|
97
|
+
export type { PasswordProps } from "./components/password"
|
|
98
|
+
export type { PhoneMockupProps } from "./components/phone-mockup"
|
|
99
|
+
export type { PinInputProps } from "./components/pin-input"
|
|
100
|
+
export type { PlaceholderProps } from "./components/placeholder"
|
|
101
|
+
export type { PopoverProps } from "./components/popover"
|
|
102
|
+
export type { PostProps } from "./components/post"
|
|
103
|
+
export type { PricingPlanProps } from "./components/pricing-plan"
|
|
104
|
+
export type { PricingTableProps } from "./components/pricing-table"
|
|
105
|
+
export type { ProgressProps } from "./components/progress"
|
|
106
|
+
export type { ProseProps } from "./components/prose"
|
|
107
|
+
export type { QrCodeProps } from "./components/qr-code"
|
|
108
|
+
export type { RadioGroupProps } from "./components/radio-group"
|
|
109
|
+
export type { RatingProps } from "./components/rating"
|
|
110
|
+
export type { ScrollAreaProps } from "./components/scroll-area"
|
|
111
|
+
export type { ScrollToTopProps } from "./components/scroll-to-top"
|
|
112
|
+
export type { SelectProps } from "./components/select"
|
|
113
|
+
export type { SeparatorProps } from "./components/separator"
|
|
114
|
+
export type {
|
|
115
|
+
SidebarProps,
|
|
116
|
+
DocsConfig,
|
|
117
|
+
BadgeConfig,
|
|
118
|
+
SidebarItem,
|
|
119
|
+
SidebarScope
|
|
120
|
+
} from "./components/sidebar"
|
|
121
|
+
export type { SkeletonProps } from "./components/skeleton"
|
|
122
|
+
export type { SlideoverProps } from "./components/slideover"
|
|
123
|
+
export type { SliderProps } from "./components/slider"
|
|
124
|
+
export type { SpeedDialProps } from "./components/speed-dial"
|
|
125
|
+
export type { SpinnerProps } from "./components/spinner"
|
|
126
|
+
export type { SplitterProps } from "./components/splitter"
|
|
127
|
+
export type { SpoilerProps } from "./components/spoiler"
|
|
128
|
+
export type { StepperProps } from "./components/stepper"
|
|
129
|
+
export type { StepsProps } from "./components/steps"
|
|
130
|
+
export type { StickySurfaceProps } from "./components/sticky-surface"
|
|
131
|
+
export type { SwitchProps } from "./components/switch"
|
|
132
|
+
export type {
|
|
133
|
+
TableOfContentsProps,
|
|
134
|
+
TableOfContentsHeading,
|
|
135
|
+
TableOfContentsConfig
|
|
136
|
+
} from "./components/table-of-contents"
|
|
137
|
+
export type { TableProps } from "./components/table"
|
|
138
|
+
export type { TabsProps } from "./components/tabs"
|
|
139
|
+
export type { TextareaProps } from "./components/textarea"
|
|
140
|
+
export type { ThemeSelectorProps } from "./components/theme-selector"
|
|
141
|
+
export type { TimelineProps } from "./components/timeline"
|
|
142
|
+
export type { ToastProps } from "./components/toast"
|
|
143
|
+
export type { TooltipProps } from "./components/tooltip"
|
|
144
|
+
export type { TourProps } from "./components/tour"
|
|
145
|
+
export type { TreeProps } from "./components/tree"
|
|
146
|
+
export type { UserProps } from "./components/user"
|
|
147
|
+
export type { VideoProps } from "./components/video"
|
|
148
|
+
export type { WatermarkProps } from "./components/watermark"
|
|
149
|
+
export type { WindowMockupProps } from "./components/window-mockup"
|
|
150
|
+
|
|
151
|
+
export type { ColorAreaProps } from "./components/color-area"
|
|
152
|
+
export type { ColorFieldProps } from "./components/color-field"
|
|
153
|
+
export type { ColorSliderProps } from "./components/color-slider"
|
package/src/types/theme.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defaultColors } from "../presets/defaults"
|
|
1
|
+
import type { defaultColors } from "../presets/defaults"
|
|
2
2
|
|
|
3
|
-
export type Theme = "
|
|
3
|
+
export type Theme = "light" | "dark"
|
|
4
4
|
|
|
5
5
|
export interface CustomColors {}
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
|
10
|
-
| keyof CustomColors
|
|
7
|
+
type AddCustomColors<T> = [keyof T] extends [never]
|
|
8
|
+
? (typeof defaultColors)[number]
|
|
9
|
+
: (typeof defaultColors)[number] | keyof T
|
|
11
10
|
|
|
11
|
+
export type ThemeColor = AddCustomColors<CustomColors> | "neutral"
|