@elaraai/east-ui 0.0.1-beta.3 → 0.0.1-beta.5
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 +3 -2
- package/dist/src/buttons/button/index.d.ts +57 -0
- package/dist/src/buttons/button/index.d.ts.map +1 -1
- package/dist/src/buttons/button/index.js +57 -0
- package/dist/src/buttons/button/index.js.map +1 -1
- package/dist/src/buttons/icon-button/index.d.ts +62 -0
- package/dist/src/buttons/icon-button/index.d.ts.map +1 -1
- package/dist/src/buttons/icon-button/index.js +62 -0
- package/dist/src/buttons/icon-button/index.js.map +1 -1
- package/dist/src/charts/index.d.ts +603 -18
- package/dist/src/charts/index.d.ts.map +1 -1
- package/dist/src/charts/index.js +603 -20
- package/dist/src/charts/index.js.map +1 -1
- package/dist/src/charts/sparkline/index.d.ts +47 -0
- package/dist/src/charts/sparkline/index.d.ts.map +1 -1
- package/dist/src/charts/sparkline/index.js +47 -0
- package/dist/src/charts/sparkline/index.js.map +1 -1
- package/dist/src/collections/data-list/index.d.ts +89 -0
- package/dist/src/collections/data-list/index.d.ts.map +1 -1
- package/dist/src/collections/data-list/index.js +89 -0
- package/dist/src/collections/data-list/index.js.map +1 -1
- package/dist/src/collections/gantt/index.d.ts +692 -4
- package/dist/src/collections/gantt/index.d.ts.map +1 -1
- package/dist/src/collections/gantt/index.js +177 -4
- package/dist/src/collections/gantt/index.js.map +1 -1
- package/dist/src/collections/table/index.d.ts +511 -0
- package/dist/src/collections/table/index.d.ts.map +1 -1
- package/dist/src/collections/table/index.js +99 -0
- package/dist/src/collections/table/index.js.map +1 -1
- package/dist/src/collections/tree-view/index.d.ts +170 -0
- package/dist/src/collections/tree-view/index.d.ts.map +1 -1
- package/dist/src/collections/tree-view/index.js +170 -0
- package/dist/src/collections/tree-view/index.js.map +1 -1
- package/dist/src/component.d.ts +103 -0
- package/dist/src/component.d.ts.map +1 -1
- package/dist/src/component.js +15 -1
- package/dist/src/component.js.map +1 -1
- package/dist/src/container/card/index.d.ts +266 -0
- package/dist/src/container/card/index.d.ts.map +1 -1
- package/dist/src/container/card/index.js +60 -0
- package/dist/src/container/card/index.js.map +1 -1
- package/dist/src/disclosure/accordion/index.d.ts +495 -0
- package/dist/src/disclosure/accordion/index.d.ts.map +1 -1
- package/dist/src/disclosure/accordion/index.js +83 -0
- package/dist/src/disclosure/accordion/index.js.map +1 -1
- package/dist/src/disclosure/carousel/index.d.ts +266 -4
- package/dist/src/disclosure/carousel/index.d.ts.map +1 -1
- package/dist/src/disclosure/carousel/index.js +60 -4
- package/dist/src/disclosure/carousel/index.js.map +1 -1
- package/dist/src/disclosure/tabs/index.d.ts +591 -0
- package/dist/src/disclosure/tabs/index.d.ts.map +1 -1
- package/dist/src/disclosure/tabs/index.js +179 -0
- package/dist/src/disclosure/tabs/index.js.map +1 -1
- package/dist/src/display/avatar/index.d.ts +35 -0
- package/dist/src/display/avatar/index.d.ts.map +1 -1
- package/dist/src/display/avatar/index.js +35 -0
- package/dist/src/display/avatar/index.js.map +1 -1
- package/dist/src/display/badge/index.d.ts +35 -0
- package/dist/src/display/badge/index.d.ts.map +1 -1
- package/dist/src/display/badge/index.js +35 -0
- package/dist/src/display/badge/index.js.map +1 -1
- package/dist/src/display/icon/index.d.ts +78 -6
- package/dist/src/display/icon/index.d.ts.map +1 -1
- package/dist/src/display/icon/index.js +78 -6
- package/dist/src/display/icon/index.js.map +1 -1
- package/dist/src/display/stat/index.d.ts +67 -2
- package/dist/src/display/stat/index.d.ts.map +1 -1
- package/dist/src/display/stat/index.js +68 -3
- package/dist/src/display/stat/index.js.map +1 -1
- package/dist/src/display/tag/index.d.ts +48 -0
- package/dist/src/display/tag/index.d.ts.map +1 -1
- package/dist/src/display/tag/index.js +48 -0
- package/dist/src/display/tag/index.js.map +1 -1
- package/dist/src/feedback/alert/index.d.ts +64 -0
- package/dist/src/feedback/alert/index.d.ts.map +1 -1
- package/dist/src/feedback/alert/index.js +64 -0
- package/dist/src/feedback/alert/index.js.map +1 -1
- package/dist/src/feedback/progress/index.d.ts +54 -0
- package/dist/src/feedback/progress/index.d.ts.map +1 -1
- package/dist/src/feedback/progress/index.js +54 -0
- package/dist/src/feedback/progress/index.js.map +1 -1
- package/dist/src/forms/checkbox/index.d.ts +38 -0
- package/dist/src/forms/checkbox/index.d.ts.map +1 -1
- package/dist/src/forms/checkbox/index.js +38 -0
- package/dist/src/forms/checkbox/index.js.map +1 -1
- package/dist/src/forms/field/index.d.ts +248 -0
- package/dist/src/forms/field/index.d.ts.map +1 -1
- package/dist/src/forms/field/index.js +42 -0
- package/dist/src/forms/field/index.js.map +1 -1
- package/dist/src/forms/fieldset/index.d.ts +30 -3
- package/dist/src/forms/fieldset/index.d.ts.map +1 -1
- package/dist/src/forms/fieldset/index.js +30 -3
- package/dist/src/forms/fieldset/index.js.map +1 -1
- package/dist/src/forms/file-upload/index.d.ts +48 -4
- package/dist/src/forms/file-upload/index.d.ts.map +1 -1
- package/dist/src/forms/file-upload/index.js +48 -4
- package/dist/src/forms/file-upload/index.js.map +1 -1
- package/dist/src/forms/input/index.d.ts +93 -14
- package/dist/src/forms/input/index.d.ts.map +1 -1
- package/dist/src/forms/input/index.js +93 -14
- package/dist/src/forms/input/index.js.map +1 -1
- package/dist/src/forms/select/index.d.ts +10 -6
- package/dist/src/forms/select/index.d.ts.map +1 -1
- package/dist/src/forms/select/index.js +10 -6
- package/dist/src/forms/select/index.js.map +1 -1
- package/dist/src/forms/slider/index.d.ts +15 -0
- package/dist/src/forms/slider/index.d.ts.map +1 -1
- package/dist/src/forms/slider/index.js +15 -0
- package/dist/src/forms/slider/index.js.map +1 -1
- package/dist/src/forms/switch/index.d.ts +20 -0
- package/dist/src/forms/switch/index.d.ts.map +1 -1
- package/dist/src/forms/switch/index.js +20 -0
- package/dist/src/forms/switch/index.js.map +1 -1
- package/dist/src/forms/tags-input/index.d.ts +33 -4
- package/dist/src/forms/tags-input/index.d.ts.map +1 -1
- package/dist/src/forms/tags-input/index.js +33 -4
- package/dist/src/forms/tags-input/index.js.map +1 -1
- package/dist/src/forms/textarea/index.d.ts +36 -4
- package/dist/src/forms/textarea/index.d.ts.map +1 -1
- package/dist/src/forms/textarea/index.js +36 -4
- package/dist/src/forms/textarea/index.js.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/layout/box/index.d.ts +341 -0
- package/dist/src/layout/box/index.d.ts.map +1 -1
- package/dist/src/layout/box/index.js +135 -0
- package/dist/src/layout/box/index.js.map +1 -1
- package/dist/src/layout/grid/index.d.ts +515 -0
- package/dist/src/layout/grid/index.d.ts.map +1 -1
- package/dist/src/layout/grid/index.js +103 -0
- package/dist/src/layout/grid/index.js.map +1 -1
- package/dist/src/layout/separator/index.d.ts +41 -0
- package/dist/src/layout/separator/index.d.ts.map +1 -1
- package/dist/src/layout/separator/index.js +41 -0
- package/dist/src/layout/separator/index.js.map +1 -1
- package/dist/src/layout/splitter/index.d.ts +504 -0
- package/dist/src/layout/splitter/index.d.ts.map +1 -1
- package/dist/src/layout/splitter/index.js +92 -0
- package/dist/src/layout/splitter/index.js.map +1 -1
- package/dist/src/layout/stack/index.d.ts +364 -0
- package/dist/src/layout/stack/index.d.ts.map +1 -1
- package/dist/src/layout/stack/index.js +158 -0
- package/dist/src/layout/stack/index.js.map +1 -1
- package/dist/src/overlays/action-bar/index.d.ts +105 -0
- package/dist/src/overlays/action-bar/index.d.ts.map +1 -1
- package/dist/src/overlays/action-bar/index.js +105 -0
- package/dist/src/overlays/action-bar/index.js.map +1 -1
- package/dist/src/overlays/dialog/index.d.ts +500 -0
- package/dist/src/overlays/dialog/index.d.ts.map +1 -1
- package/dist/src/overlays/dialog/index.js +88 -0
- package/dist/src/overlays/dialog/index.js.map +1 -1
- package/dist/src/overlays/drawer/index.d.ts +476 -0
- package/dist/src/overlays/drawer/index.d.ts.map +1 -1
- package/dist/src/overlays/drawer/index.js +64 -0
- package/dist/src/overlays/drawer/index.js.map +1 -1
- package/dist/src/overlays/hover-card/index.d.ts +489 -0
- package/dist/src/overlays/hover-card/index.d.ts.map +1 -1
- package/dist/src/overlays/hover-card/index.js +77 -0
- package/dist/src/overlays/hover-card/index.js.map +1 -1
- package/dist/src/overlays/menu/index.d.ts +338 -8
- package/dist/src/overlays/menu/index.d.ts.map +1 -1
- package/dist/src/overlays/menu/index.js +132 -8
- package/dist/src/overlays/menu/index.js.map +1 -1
- package/dist/src/overlays/popover/index.d.ts +496 -0
- package/dist/src/overlays/popover/index.d.ts.map +1 -1
- package/dist/src/overlays/popover/index.js +84 -0
- package/dist/src/overlays/popover/index.js.map +1 -1
- package/dist/src/overlays/toggle-tip/index.d.ts +273 -0
- package/dist/src/overlays/toggle-tip/index.d.ts.map +1 -1
- package/dist/src/overlays/toggle-tip/index.js +67 -0
- package/dist/src/overlays/toggle-tip/index.js.map +1 -1
- package/dist/src/overlays/tooltip/index.d.ts +284 -0
- package/dist/src/overlays/tooltip/index.d.ts.map +1 -1
- package/dist/src/overlays/tooltip/index.js +78 -0
- package/dist/src/overlays/tooltip/index.js.map +1 -1
- package/dist/src/typography/code/index.d.ts +61 -0
- package/dist/src/typography/code/index.d.ts.map +1 -0
- package/dist/src/typography/code/index.js +65 -0
- package/dist/src/typography/code/index.js.map +1 -0
- package/dist/src/typography/code/types.d.ts +56 -0
- package/dist/src/typography/code/types.d.ts.map +1 -0
- package/dist/src/typography/code/types.js +39 -0
- package/dist/src/typography/code/types.js.map +1 -0
- package/dist/src/typography/code-block/index.d.ts +86 -0
- package/dist/src/typography/code-block/index.d.ts.map +1 -0
- package/dist/src/typography/code-block/index.js +78 -0
- package/dist/src/typography/code-block/index.js.map +1 -0
- package/dist/src/typography/code-block/types.d.ts +100 -0
- package/dist/src/typography/code-block/types.d.ts.map +1 -0
- package/dist/src/typography/code-block/types.js +70 -0
- package/dist/src/typography/code-block/types.js.map +1 -0
- package/dist/src/typography/heading/index.d.ts +92 -0
- package/dist/src/typography/heading/index.d.ts.map +1 -0
- package/dist/src/typography/heading/index.js +73 -0
- package/dist/src/typography/heading/index.js.map +1 -0
- package/dist/src/typography/heading/types.d.ts +108 -0
- package/dist/src/typography/heading/types.d.ts.map +1 -0
- package/dist/src/typography/heading/types.js +76 -0
- package/dist/src/typography/heading/types.js.map +1 -0
- package/dist/src/typography/highlight/index.d.ts +48 -0
- package/dist/src/typography/highlight/index.d.ts.map +1 -0
- package/dist/src/typography/highlight/index.js +60 -0
- package/dist/src/typography/highlight/index.js.map +1 -0
- package/dist/src/typography/highlight/types.d.ts +26 -0
- package/dist/src/typography/highlight/types.d.ts.map +1 -0
- package/dist/src/typography/highlight/types.js +21 -0
- package/dist/src/typography/highlight/types.js.map +1 -0
- package/dist/src/typography/index.d.ts +16 -120
- package/dist/src/typography/index.d.ts.map +1 -1
- package/dist/src/typography/index.js +24 -128
- package/dist/src/typography/index.js.map +1 -1
- package/dist/src/typography/link/index.d.ts +56 -0
- package/dist/src/typography/link/index.d.ts.map +1 -0
- package/dist/src/typography/link/index.js +66 -0
- package/dist/src/typography/link/index.js.map +1 -0
- package/dist/src/typography/link/types.d.ts +49 -0
- package/dist/src/typography/link/types.d.ts.map +1 -0
- package/dist/src/typography/link/types.js +38 -0
- package/dist/src/typography/link/types.js.map +1 -0
- package/dist/src/typography/list/index.d.ts +59 -0
- package/dist/src/typography/list/index.d.ts.map +1 -0
- package/dist/src/typography/list/index.js +61 -0
- package/dist/src/typography/list/index.js.map +1 -0
- package/dist/src/typography/list/types.d.ts +47 -0
- package/dist/src/typography/list/types.d.ts.map +1 -0
- package/dist/src/typography/list/types.js +36 -0
- package/dist/src/typography/list/types.js.map +1 -0
- package/dist/src/typography/mark/index.d.ts +57 -0
- package/dist/src/typography/mark/index.d.ts.map +1 -0
- package/dist/src/typography/mark/index.js +58 -0
- package/dist/src/typography/mark/index.js.map +1 -0
- package/dist/src/typography/mark/types.d.ts +49 -0
- package/dist/src/typography/mark/types.d.ts.map +1 -0
- package/dist/src/typography/mark/types.js +38 -0
- package/dist/src/typography/mark/types.js.map +1 -0
- package/dist/src/typography/text/index.d.ts +122 -0
- package/dist/src/typography/text/index.d.ts.map +1 -0
- package/dist/src/typography/text/index.js +130 -0
- package/dist/src/typography/text/index.js.map +1 -0
- package/dist/src/typography/{types.d.ts → text/types.d.ts} +2 -2
- package/dist/src/typography/text/types.d.ts.map +1 -0
- package/dist/src/typography/{types.js → text/types.js} +1 -1
- package/dist/src/typography/text/types.js.map +1 -0
- package/package.json +1 -1
- package/dist/src/typography/types.d.ts.map +0 -1
- package/dist/src/typography/types.js.map +0 -1
|
@@ -85,6 +85,109 @@ export declare const TooltipType: StructType<{
|
|
|
85
85
|
}>>;
|
|
86
86
|
borderColor: OptionType<StringType>;
|
|
87
87
|
}>;
|
|
88
|
+
Code: StructType<{
|
|
89
|
+
value: StringType;
|
|
90
|
+
variant: OptionType<import("@elaraai/east").VariantType<{
|
|
91
|
+
subtle: import("@elaraai/east").NullType;
|
|
92
|
+
surface: import("@elaraai/east").NullType;
|
|
93
|
+
outline: import("@elaraai/east").NullType;
|
|
94
|
+
}>>;
|
|
95
|
+
colorPalette: OptionType<StringType>;
|
|
96
|
+
size: OptionType<import("@elaraai/east").VariantType<{
|
|
97
|
+
xs: import("@elaraai/east").NullType;
|
|
98
|
+
sm: import("@elaraai/east").NullType;
|
|
99
|
+
md: import("@elaraai/east").NullType;
|
|
100
|
+
lg: import("@elaraai/east").NullType;
|
|
101
|
+
}>>;
|
|
102
|
+
}>;
|
|
103
|
+
Heading: StructType<{
|
|
104
|
+
value: StringType;
|
|
105
|
+
size: OptionType<import("@elaraai/east").VariantType<{
|
|
106
|
+
xs: import("@elaraai/east").NullType;
|
|
107
|
+
sm: import("@elaraai/east").NullType;
|
|
108
|
+
md: import("@elaraai/east").NullType;
|
|
109
|
+
lg: import("@elaraai/east").NullType;
|
|
110
|
+
xl: import("@elaraai/east").NullType;
|
|
111
|
+
"2xl": import("@elaraai/east").NullType;
|
|
112
|
+
"3xl": import("@elaraai/east").NullType;
|
|
113
|
+
"4xl": import("@elaraai/east").NullType;
|
|
114
|
+
"5xl": import("@elaraai/east").NullType;
|
|
115
|
+
"6xl": import("@elaraai/east").NullType;
|
|
116
|
+
}>>;
|
|
117
|
+
as: OptionType<import("@elaraai/east").VariantType<{
|
|
118
|
+
h1: import("@elaraai/east").NullType;
|
|
119
|
+
h2: import("@elaraai/east").NullType;
|
|
120
|
+
h3: import("@elaraai/east").NullType;
|
|
121
|
+
h4: import("@elaraai/east").NullType;
|
|
122
|
+
h5: import("@elaraai/east").NullType;
|
|
123
|
+
h6: import("@elaraai/east").NullType;
|
|
124
|
+
}>>;
|
|
125
|
+
color: OptionType<StringType>;
|
|
126
|
+
textAlign: OptionType<import("@elaraai/east").VariantType<{
|
|
127
|
+
left: import("@elaraai/east").NullType;
|
|
128
|
+
center: import("@elaraai/east").NullType;
|
|
129
|
+
right: import("@elaraai/east").NullType;
|
|
130
|
+
justify: import("@elaraai/east").NullType;
|
|
131
|
+
}>>;
|
|
132
|
+
}>;
|
|
133
|
+
Link: StructType<{
|
|
134
|
+
value: StringType;
|
|
135
|
+
href: StringType;
|
|
136
|
+
external: OptionType<BooleanType>;
|
|
137
|
+
variant: OptionType<import("@elaraai/east").VariantType<{
|
|
138
|
+
underline: import("@elaraai/east").NullType;
|
|
139
|
+
plain: import("@elaraai/east").NullType;
|
|
140
|
+
}>>;
|
|
141
|
+
colorPalette: OptionType<StringType>;
|
|
142
|
+
}>;
|
|
143
|
+
Highlight: StructType<{
|
|
144
|
+
value: StringType;
|
|
145
|
+
query: import("@elaraai/east").ArrayType<StringType>;
|
|
146
|
+
color: OptionType<StringType>;
|
|
147
|
+
}>;
|
|
148
|
+
Mark: StructType<{
|
|
149
|
+
value: StringType;
|
|
150
|
+
variant: OptionType<import("@elaraai/east").VariantType<{
|
|
151
|
+
subtle: import("@elaraai/east").NullType;
|
|
152
|
+
solid: import("@elaraai/east").NullType;
|
|
153
|
+
text: import("@elaraai/east").NullType;
|
|
154
|
+
plain: import("@elaraai/east").NullType;
|
|
155
|
+
}>>;
|
|
156
|
+
colorPalette: OptionType<StringType>;
|
|
157
|
+
}>;
|
|
158
|
+
List: StructType<{
|
|
159
|
+
items: import("@elaraai/east").ArrayType<StringType>;
|
|
160
|
+
variant: OptionType<import("@elaraai/east").VariantType<{
|
|
161
|
+
ordered: import("@elaraai/east").NullType;
|
|
162
|
+
unordered: import("@elaraai/east").NullType;
|
|
163
|
+
}>>;
|
|
164
|
+
gap: OptionType<StringType>;
|
|
165
|
+
colorPalette: OptionType<StringType>;
|
|
166
|
+
}>;
|
|
167
|
+
CodeBlock: StructType<{
|
|
168
|
+
code: StringType;
|
|
169
|
+
language: OptionType<import("@elaraai/east").VariantType<{
|
|
170
|
+
typescript: import("@elaraai/east").NullType;
|
|
171
|
+
javascript: import("@elaraai/east").NullType;
|
|
172
|
+
json: import("@elaraai/east").NullType;
|
|
173
|
+
html: import("@elaraai/east").NullType;
|
|
174
|
+
css: import("@elaraai/east").NullType;
|
|
175
|
+
python: import("@elaraai/east").NullType;
|
|
176
|
+
rust: import("@elaraai/east").NullType;
|
|
177
|
+
go: import("@elaraai/east").NullType;
|
|
178
|
+
sql: import("@elaraai/east").NullType;
|
|
179
|
+
bash: import("@elaraai/east").NullType;
|
|
180
|
+
markdown: import("@elaraai/east").NullType;
|
|
181
|
+
yaml: import("@elaraai/east").NullType;
|
|
182
|
+
xml: import("@elaraai/east").NullType;
|
|
183
|
+
plaintext: import("@elaraai/east").NullType;
|
|
184
|
+
}>>;
|
|
185
|
+
showLineNumbers: OptionType<BooleanType>;
|
|
186
|
+
highlightLines: OptionType<import("@elaraai/east").ArrayType<import("@elaraai/east").IntegerType>>;
|
|
187
|
+
maxHeight: OptionType<StringType>;
|
|
188
|
+
showCopyButton: OptionType<BooleanType>;
|
|
189
|
+
title: OptionType<StringType>;
|
|
190
|
+
}>;
|
|
88
191
|
Button: StructType<{
|
|
89
192
|
label: StringType;
|
|
90
193
|
style: OptionType<StructType<{
|
|
@@ -3575,9 +3678,57 @@ declare function createTooltip(trigger: SubtypeExprOrValue<UIComponentType>, con
|
|
|
3575
3678
|
* ```
|
|
3576
3679
|
*/
|
|
3577
3680
|
export declare const Tooltip: {
|
|
3681
|
+
/**
|
|
3682
|
+
* Creates a Tooltip component with a trigger and content text.
|
|
3683
|
+
*
|
|
3684
|
+
* @param trigger - The UI component that triggers the tooltip on hover
|
|
3685
|
+
* @param content - The tooltip text content
|
|
3686
|
+
* @param style - Optional styling configuration
|
|
3687
|
+
* @returns An East expression representing the tooltip component
|
|
3688
|
+
*
|
|
3689
|
+
* @remarks
|
|
3690
|
+
* Tooltip displays additional information when hovering over an element.
|
|
3691
|
+
* The trigger can be any UI component (button, text, icon, etc.).
|
|
3692
|
+
*
|
|
3693
|
+
* @example
|
|
3694
|
+
* ```ts
|
|
3695
|
+
* import { East } from "@elaraai/east";
|
|
3696
|
+
* import { Tooltip, Button, UIComponentType } from "@elaraai/east-ui";
|
|
3697
|
+
*
|
|
3698
|
+
* const example = East.function([], UIComponentType, $ => {
|
|
3699
|
+
* return Tooltip.Root(
|
|
3700
|
+
* Button.Root("Hover me"),
|
|
3701
|
+
* "This is a helpful tooltip",
|
|
3702
|
+
* { placement: "top" }
|
|
3703
|
+
* );
|
|
3704
|
+
* });
|
|
3705
|
+
* ```
|
|
3706
|
+
*/
|
|
3578
3707
|
readonly Root: typeof createTooltip;
|
|
3708
|
+
/**
|
|
3709
|
+
* Helper function to create tooltip placement values.
|
|
3710
|
+
*
|
|
3711
|
+
* @param v - The placement string
|
|
3712
|
+
* @returns An East expression representing the placement variant
|
|
3713
|
+
*
|
|
3714
|
+
* @remarks
|
|
3715
|
+
* Use this helper to create placement values programmatically. In most cases,
|
|
3716
|
+
* you can pass string literals directly to the style property.
|
|
3717
|
+
*/
|
|
3579
3718
|
readonly Placement: typeof Placement;
|
|
3580
3719
|
readonly Types: {
|
|
3720
|
+
/**
|
|
3721
|
+
* The concrete East type for Tooltip component data.
|
|
3722
|
+
*
|
|
3723
|
+
* @remarks
|
|
3724
|
+
* This struct type represents the serializable data structure for a Tooltip
|
|
3725
|
+
* component. Tooltip displays text content when hovering over a trigger element.
|
|
3726
|
+
*
|
|
3727
|
+
* @property trigger - The UI component that triggers the tooltip on hover (UIComponentType)
|
|
3728
|
+
* @property content - The tooltip text content (StringType)
|
|
3729
|
+
* @property placement - Optional placement position (OptionType<PlacementType>)
|
|
3730
|
+
* @property hasArrow - Whether to show an arrow pointing to the trigger (OptionType<BooleanType>)
|
|
3731
|
+
*/
|
|
3581
3732
|
readonly Tooltip: StructType<{
|
|
3582
3733
|
trigger: import("@elaraai/east").RecursiveType<import("@elaraai/east").VariantType<{
|
|
3583
3734
|
Text: StructType<{
|
|
@@ -3645,6 +3796,109 @@ export declare const Tooltip: {
|
|
|
3645
3796
|
}>>;
|
|
3646
3797
|
borderColor: OptionType<StringType>;
|
|
3647
3798
|
}>;
|
|
3799
|
+
Code: StructType<{
|
|
3800
|
+
value: StringType;
|
|
3801
|
+
variant: OptionType<import("@elaraai/east").VariantType<{
|
|
3802
|
+
subtle: import("@elaraai/east").NullType;
|
|
3803
|
+
surface: import("@elaraai/east").NullType;
|
|
3804
|
+
outline: import("@elaraai/east").NullType;
|
|
3805
|
+
}>>;
|
|
3806
|
+
colorPalette: OptionType<StringType>;
|
|
3807
|
+
size: OptionType<import("@elaraai/east").VariantType<{
|
|
3808
|
+
xs: import("@elaraai/east").NullType;
|
|
3809
|
+
sm: import("@elaraai/east").NullType;
|
|
3810
|
+
md: import("@elaraai/east").NullType;
|
|
3811
|
+
lg: import("@elaraai/east").NullType;
|
|
3812
|
+
}>>;
|
|
3813
|
+
}>;
|
|
3814
|
+
Heading: StructType<{
|
|
3815
|
+
value: StringType;
|
|
3816
|
+
size: OptionType<import("@elaraai/east").VariantType<{
|
|
3817
|
+
xs: import("@elaraai/east").NullType;
|
|
3818
|
+
sm: import("@elaraai/east").NullType;
|
|
3819
|
+
md: import("@elaraai/east").NullType;
|
|
3820
|
+
lg: import("@elaraai/east").NullType;
|
|
3821
|
+
xl: import("@elaraai/east").NullType;
|
|
3822
|
+
"2xl": import("@elaraai/east").NullType;
|
|
3823
|
+
"3xl": import("@elaraai/east").NullType;
|
|
3824
|
+
"4xl": import("@elaraai/east").NullType;
|
|
3825
|
+
"5xl": import("@elaraai/east").NullType;
|
|
3826
|
+
"6xl": import("@elaraai/east").NullType;
|
|
3827
|
+
}>>;
|
|
3828
|
+
as: OptionType<import("@elaraai/east").VariantType<{
|
|
3829
|
+
h1: import("@elaraai/east").NullType;
|
|
3830
|
+
h2: import("@elaraai/east").NullType;
|
|
3831
|
+
h3: import("@elaraai/east").NullType;
|
|
3832
|
+
h4: import("@elaraai/east").NullType;
|
|
3833
|
+
h5: import("@elaraai/east").NullType;
|
|
3834
|
+
h6: import("@elaraai/east").NullType;
|
|
3835
|
+
}>>;
|
|
3836
|
+
color: OptionType<StringType>;
|
|
3837
|
+
textAlign: OptionType<import("@elaraai/east").VariantType<{
|
|
3838
|
+
left: import("@elaraai/east").NullType;
|
|
3839
|
+
center: import("@elaraai/east").NullType;
|
|
3840
|
+
right: import("@elaraai/east").NullType;
|
|
3841
|
+
justify: import("@elaraai/east").NullType;
|
|
3842
|
+
}>>;
|
|
3843
|
+
}>;
|
|
3844
|
+
Link: StructType<{
|
|
3845
|
+
value: StringType;
|
|
3846
|
+
href: StringType;
|
|
3847
|
+
external: OptionType<BooleanType>;
|
|
3848
|
+
variant: OptionType<import("@elaraai/east").VariantType<{
|
|
3849
|
+
underline: import("@elaraai/east").NullType;
|
|
3850
|
+
plain: import("@elaraai/east").NullType;
|
|
3851
|
+
}>>;
|
|
3852
|
+
colorPalette: OptionType<StringType>;
|
|
3853
|
+
}>;
|
|
3854
|
+
Highlight: StructType<{
|
|
3855
|
+
value: StringType;
|
|
3856
|
+
query: import("@elaraai/east").ArrayType<StringType>;
|
|
3857
|
+
color: OptionType<StringType>;
|
|
3858
|
+
}>;
|
|
3859
|
+
Mark: StructType<{
|
|
3860
|
+
value: StringType;
|
|
3861
|
+
variant: OptionType<import("@elaraai/east").VariantType<{
|
|
3862
|
+
subtle: import("@elaraai/east").NullType;
|
|
3863
|
+
solid: import("@elaraai/east").NullType;
|
|
3864
|
+
text: import("@elaraai/east").NullType;
|
|
3865
|
+
plain: import("@elaraai/east").NullType;
|
|
3866
|
+
}>>;
|
|
3867
|
+
colorPalette: OptionType<StringType>;
|
|
3868
|
+
}>;
|
|
3869
|
+
List: StructType<{
|
|
3870
|
+
items: import("@elaraai/east").ArrayType<StringType>;
|
|
3871
|
+
variant: OptionType<import("@elaraai/east").VariantType<{
|
|
3872
|
+
ordered: import("@elaraai/east").NullType;
|
|
3873
|
+
unordered: import("@elaraai/east").NullType;
|
|
3874
|
+
}>>;
|
|
3875
|
+
gap: OptionType<StringType>;
|
|
3876
|
+
colorPalette: OptionType<StringType>;
|
|
3877
|
+
}>;
|
|
3878
|
+
CodeBlock: StructType<{
|
|
3879
|
+
code: StringType;
|
|
3880
|
+
language: OptionType<import("@elaraai/east").VariantType<{
|
|
3881
|
+
typescript: import("@elaraai/east").NullType;
|
|
3882
|
+
javascript: import("@elaraai/east").NullType;
|
|
3883
|
+
json: import("@elaraai/east").NullType;
|
|
3884
|
+
html: import("@elaraai/east").NullType;
|
|
3885
|
+
css: import("@elaraai/east").NullType;
|
|
3886
|
+
python: import("@elaraai/east").NullType;
|
|
3887
|
+
rust: import("@elaraai/east").NullType;
|
|
3888
|
+
go: import("@elaraai/east").NullType;
|
|
3889
|
+
sql: import("@elaraai/east").NullType;
|
|
3890
|
+
bash: import("@elaraai/east").NullType;
|
|
3891
|
+
markdown: import("@elaraai/east").NullType;
|
|
3892
|
+
yaml: import("@elaraai/east").NullType;
|
|
3893
|
+
xml: import("@elaraai/east").NullType;
|
|
3894
|
+
plaintext: import("@elaraai/east").NullType;
|
|
3895
|
+
}>>;
|
|
3896
|
+
showLineNumbers: OptionType<BooleanType>;
|
|
3897
|
+
highlightLines: OptionType<import("@elaraai/east").ArrayType<import("@elaraai/east").IntegerType>>;
|
|
3898
|
+
maxHeight: OptionType<StringType>;
|
|
3899
|
+
showCopyButton: OptionType<BooleanType>;
|
|
3900
|
+
title: OptionType<StringType>;
|
|
3901
|
+
}>;
|
|
3648
3902
|
Button: StructType<{
|
|
3649
3903
|
label: StringType;
|
|
3650
3904
|
style: OptionType<StructType<{
|
|
@@ -7072,6 +7326,16 @@ export declare const Tooltip: {
|
|
|
7072
7326
|
}>>;
|
|
7073
7327
|
hasArrow: OptionType<BooleanType>;
|
|
7074
7328
|
}>;
|
|
7329
|
+
/**
|
|
7330
|
+
* The concrete East type for Tooltip style configuration.
|
|
7331
|
+
*
|
|
7332
|
+
* @remarks
|
|
7333
|
+
* This struct type defines the styling configuration for a Tooltip component.
|
|
7334
|
+
* Contains optional placement and arrow settings.
|
|
7335
|
+
*
|
|
7336
|
+
* @property placement - Where the tooltip appears relative to trigger (OptionType<PlacementType>)
|
|
7337
|
+
* @property hasArrow - Show arrow pointing to trigger (OptionType<BooleanType>)
|
|
7338
|
+
*/
|
|
7075
7339
|
readonly Style: StructType<{
|
|
7076
7340
|
placement: OptionType<import("@elaraai/east").VariantType<{
|
|
7077
7341
|
top: import("@elaraai/east").NullType;
|
|
@@ -7089,6 +7353,26 @@ export declare const Tooltip: {
|
|
|
7089
7353
|
}>>;
|
|
7090
7354
|
hasArrow: OptionType<BooleanType>;
|
|
7091
7355
|
}>;
|
|
7356
|
+
/**
|
|
7357
|
+
* Placement variant type for Tooltip positioning.
|
|
7358
|
+
*
|
|
7359
|
+
* @remarks
|
|
7360
|
+
* Controls where the tooltip appears relative to its trigger element.
|
|
7361
|
+
* Supports all cardinal directions with start/end variations.
|
|
7362
|
+
*
|
|
7363
|
+
* @property top - Centered above the trigger
|
|
7364
|
+
* @property top-start - Above, aligned to start
|
|
7365
|
+
* @property top-end - Above, aligned to end
|
|
7366
|
+
* @property bottom - Centered below the trigger
|
|
7367
|
+
* @property bottom-start - Below, aligned to start
|
|
7368
|
+
* @property bottom-end - Below, aligned to end
|
|
7369
|
+
* @property left - Centered to the left
|
|
7370
|
+
* @property left-start - Left, aligned to start
|
|
7371
|
+
* @property left-end - Left, aligned to end
|
|
7372
|
+
* @property right - Centered to the right
|
|
7373
|
+
* @property right-start - Right, aligned to start
|
|
7374
|
+
* @property right-end - Right, aligned to end
|
|
7375
|
+
*/
|
|
7092
7376
|
readonly Placement: import("@elaraai/east").VariantType<{
|
|
7093
7377
|
top: import("@elaraai/east").NullType;
|
|
7094
7378
|
"top-start": import("@elaraai/east").NullType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/overlays/tooltip/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,KAAK,QAAQ,EACb,KAAK,kBAAkB,EAEvB,UAAU,EACV,WAAW,EACX,UAAU,EACV,UAAU,EAEb,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAEH,SAAS,EAET,KAAK,YAAY,EACpB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACH,aAAa,EACb,SAAS,EACT,gBAAgB,EAChB,KAAK,YAAY,EACjB,KAAK,gBAAgB,GACxB,MAAM,YAAY,CAAC;AAMpB;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/overlays/tooltip/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,KAAK,QAAQ,EACb,KAAK,kBAAkB,EAEvB,UAAU,EACV,WAAW,EACX,UAAU,EACV,UAAU,EAEb,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAEH,SAAS,EAET,KAAK,YAAY,EACpB,M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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAEH;;;;;;;;;WASG;;;;;;;;;;;;;;;;;;QAEH;;;;;;;;;;;;;;;;;;;WAmBG;;;;;;;;;;;;;;;;CAGD,CAAC"}
|
|
@@ -102,11 +102,89 @@ function createTooltip(trigger, content, style) {
|
|
|
102
102
|
* ```
|
|
103
103
|
*/
|
|
104
104
|
export const Tooltip = {
|
|
105
|
+
/**
|
|
106
|
+
* Creates a Tooltip component with a trigger and content text.
|
|
107
|
+
*
|
|
108
|
+
* @param trigger - The UI component that triggers the tooltip on hover
|
|
109
|
+
* @param content - The tooltip text content
|
|
110
|
+
* @param style - Optional styling configuration
|
|
111
|
+
* @returns An East expression representing the tooltip component
|
|
112
|
+
*
|
|
113
|
+
* @remarks
|
|
114
|
+
* Tooltip displays additional information when hovering over an element.
|
|
115
|
+
* The trigger can be any UI component (button, text, icon, etc.).
|
|
116
|
+
*
|
|
117
|
+
* @example
|
|
118
|
+
* ```ts
|
|
119
|
+
* import { East } from "@elaraai/east";
|
|
120
|
+
* import { Tooltip, Button, UIComponentType } from "@elaraai/east-ui";
|
|
121
|
+
*
|
|
122
|
+
* const example = East.function([], UIComponentType, $ => {
|
|
123
|
+
* return Tooltip.Root(
|
|
124
|
+
* Button.Root("Hover me"),
|
|
125
|
+
* "This is a helpful tooltip",
|
|
126
|
+
* { placement: "top" }
|
|
127
|
+
* );
|
|
128
|
+
* });
|
|
129
|
+
* ```
|
|
130
|
+
*/
|
|
105
131
|
Root: createTooltip,
|
|
132
|
+
/**
|
|
133
|
+
* Helper function to create tooltip placement values.
|
|
134
|
+
*
|
|
135
|
+
* @param v - The placement string
|
|
136
|
+
* @returns An East expression representing the placement variant
|
|
137
|
+
*
|
|
138
|
+
* @remarks
|
|
139
|
+
* Use this helper to create placement values programmatically. In most cases,
|
|
140
|
+
* you can pass string literals directly to the style property.
|
|
141
|
+
*/
|
|
106
142
|
Placement: Placement,
|
|
107
143
|
Types: {
|
|
144
|
+
/**
|
|
145
|
+
* The concrete East type for Tooltip component data.
|
|
146
|
+
*
|
|
147
|
+
* @remarks
|
|
148
|
+
* This struct type represents the serializable data structure for a Tooltip
|
|
149
|
+
* component. Tooltip displays text content when hovering over a trigger element.
|
|
150
|
+
*
|
|
151
|
+
* @property trigger - The UI component that triggers the tooltip on hover (UIComponentType)
|
|
152
|
+
* @property content - The tooltip text content (StringType)
|
|
153
|
+
* @property placement - Optional placement position (OptionType<PlacementType>)
|
|
154
|
+
* @property hasArrow - Whether to show an arrow pointing to the trigger (OptionType<BooleanType>)
|
|
155
|
+
*/
|
|
108
156
|
Tooltip: TooltipType,
|
|
157
|
+
/**
|
|
158
|
+
* The concrete East type for Tooltip style configuration.
|
|
159
|
+
*
|
|
160
|
+
* @remarks
|
|
161
|
+
* This struct type defines the styling configuration for a Tooltip component.
|
|
162
|
+
* Contains optional placement and arrow settings.
|
|
163
|
+
*
|
|
164
|
+
* @property placement - Where the tooltip appears relative to trigger (OptionType<PlacementType>)
|
|
165
|
+
* @property hasArrow - Show arrow pointing to trigger (OptionType<BooleanType>)
|
|
166
|
+
*/
|
|
109
167
|
Style: TooltipStyleType,
|
|
168
|
+
/**
|
|
169
|
+
* Placement variant type for Tooltip positioning.
|
|
170
|
+
*
|
|
171
|
+
* @remarks
|
|
172
|
+
* Controls where the tooltip appears relative to its trigger element.
|
|
173
|
+
* Supports all cardinal directions with start/end variations.
|
|
174
|
+
*
|
|
175
|
+
* @property top - Centered above the trigger
|
|
176
|
+
* @property top-start - Above, aligned to start
|
|
177
|
+
* @property top-end - Above, aligned to end
|
|
178
|
+
* @property bottom - Centered below the trigger
|
|
179
|
+
* @property bottom-start - Below, aligned to start
|
|
180
|
+
* @property bottom-end - Below, aligned to end
|
|
181
|
+
* @property left - Centered to the left
|
|
182
|
+
* @property left-start - Left, aligned to start
|
|
183
|
+
* @property left-end - Left, aligned to end
|
|
184
|
+
* @property right - Centered to the right
|
|
185
|
+
* @property right-start - Right, aligned to start
|
|
186
|
+
* @property right-end - Right, aligned to end
|
|
187
|
+
*/
|
|
110
188
|
Placement: PlacementType,
|
|
111
189
|
},
|
|
112
190
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/overlays/tooltip/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAGH,IAAI,EACJ,UAAU,EACV,WAAW,EACX,UAAU,EACV,UAAU,EACV,OAAO,GACV,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EACH,aAAa,EACb,SAAS,EACT,gBAAgB,GAEnB,MAAM,YAAY,CAAC;AAEpB,kBAAkB;AAClB,OAAO,EACH,aAAa,EACb,SAAS,EACT,gBAAgB,GAGnB,MAAM,YAAY,CAAC;AAEpB,+EAA+E;AAC/E,eAAe;AACf,+EAA+E;AAE/E;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,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AAK,CAAC,OAAO,CAAC,SAAS,EAAE;QACjC,OAAO,EAAE,OAAO;QAChB,OAAO,EAAE,OAAO;QAChB,SAAS,EAAE,cAAc,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC;QACnF,QAAQ,EAAE,KAAK,EAAE,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC;KACpG,CAAC,EAAE,eAAe,CAAC,CAAC;AACzB,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG;IACnB;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,IAAI,EAAE,aAAa;IACnB;;;;;;;;;OASG;IACH,SAAS,EAAE,SAAS;IACpB,KAAK,EAAE;QACH;;;;;;;;;;;WAWG;QACH,OAAO,EAAE,WAAW;QACpB;;;;;;;;;WASG;QACH,KAAK,EAAE,gBAAgB;QACvB;;;;;;;;;;;;;;;;;;;WAmBG;QACH,SAAS,EAAE,aAAa;KAC3B;CACK,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
import { type SubtypeExprOrValue, type ExprType, StringType } from "@elaraai/east";
|
|
6
|
+
import { UIComponentType } from "../../component.js";
|
|
7
|
+
import { type CodeStyle } from "./types.js";
|
|
8
|
+
export { CodeType, CodeVariantType, type CodeStyle } from "./types.js";
|
|
9
|
+
/**
|
|
10
|
+
* Creates a Code component for displaying inline code.
|
|
11
|
+
*
|
|
12
|
+
* @param value - The code text to display
|
|
13
|
+
* @param style - Optional styling configuration
|
|
14
|
+
* @returns An East expression representing the code component
|
|
15
|
+
*/
|
|
16
|
+
declare function createCode(value: SubtypeExprOrValue<StringType>, style?: CodeStyle): ExprType<UIComponentType>;
|
|
17
|
+
/**
|
|
18
|
+
* Code component for displaying inline code snippets.
|
|
19
|
+
*
|
|
20
|
+
* @remarks
|
|
21
|
+
* Use `Code.Root(value, style)` to create inline code display.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* import { East } from "@elaraai/east";
|
|
26
|
+
* import { Code, UIComponentType } from "@elaraai/east-ui";
|
|
27
|
+
*
|
|
28
|
+
* const example = East.function([], UIComponentType, $ => {
|
|
29
|
+
* return Code.Root("const x = 42", {
|
|
30
|
+
* colorPalette: "purple",
|
|
31
|
+
* variant: "surface",
|
|
32
|
+
* });
|
|
33
|
+
* });
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
export declare const Code: {
|
|
37
|
+
readonly Root: typeof createCode;
|
|
38
|
+
readonly Types: {
|
|
39
|
+
readonly Code: import("@elaraai/east").StructType<{
|
|
40
|
+
value: StringType;
|
|
41
|
+
variant: import("@elaraai/east").OptionType<import("@elaraai/east").VariantType<{
|
|
42
|
+
subtle: import("@elaraai/east").NullType;
|
|
43
|
+
surface: import("@elaraai/east").NullType;
|
|
44
|
+
outline: import("@elaraai/east").NullType;
|
|
45
|
+
}>>;
|
|
46
|
+
colorPalette: import("@elaraai/east").OptionType<StringType>;
|
|
47
|
+
size: import("@elaraai/east").OptionType<import("@elaraai/east").VariantType<{
|
|
48
|
+
xs: import("@elaraai/east").NullType;
|
|
49
|
+
sm: import("@elaraai/east").NullType;
|
|
50
|
+
md: import("@elaraai/east").NullType;
|
|
51
|
+
lg: import("@elaraai/east").NullType;
|
|
52
|
+
}>>;
|
|
53
|
+
}>;
|
|
54
|
+
readonly Variant: import("@elaraai/east").VariantType<{
|
|
55
|
+
subtle: import("@elaraai/east").NullType;
|
|
56
|
+
surface: import("@elaraai/east").NullType;
|
|
57
|
+
outline: import("@elaraai/east").NullType;
|
|
58
|
+
}>;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/typography/code/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,KAAK,kBAAkB,EACvB,KAAK,QAAQ,EAEb,UAAU,EAEb,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAGvE,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAMvE;;;;;;GAMG;AACH,iBAAS,UAAU,CACf,KAAK,EAAE,kBAAkB,CAAC,UAAU,CAAC,EACrC,KAAK,CAAC,EAAE,SAAS,GAClB,QAAQ,CAAC,eAAe,CAAC,CAmB3B;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;CAMP,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
import { East, StringType, variant, } from "@elaraai/east";
|
|
6
|
+
import { SizeType } from "../../style.js";
|
|
7
|
+
import { UIComponentType } from "../../component.js";
|
|
8
|
+
import { CodeType, CodeVariantType } from "./types.js";
|
|
9
|
+
// Re-export types
|
|
10
|
+
export { CodeType, CodeVariantType } from "./types.js";
|
|
11
|
+
// ============================================================================
|
|
12
|
+
// Code Component
|
|
13
|
+
// ============================================================================
|
|
14
|
+
/**
|
|
15
|
+
* Creates a Code component for displaying inline code.
|
|
16
|
+
*
|
|
17
|
+
* @param value - The code text to display
|
|
18
|
+
* @param style - Optional styling configuration
|
|
19
|
+
* @returns An East expression representing the code component
|
|
20
|
+
*/
|
|
21
|
+
function createCode(value, style) {
|
|
22
|
+
const variantValue = style?.variant
|
|
23
|
+
? (typeof style.variant === "string"
|
|
24
|
+
? East.value(variant(style.variant, null), CodeVariantType)
|
|
25
|
+
: style.variant)
|
|
26
|
+
: undefined;
|
|
27
|
+
const sizeValue = style?.size
|
|
28
|
+
? (typeof style.size === "string"
|
|
29
|
+
? East.value(variant(style.size, null), SizeType)
|
|
30
|
+
: style.size)
|
|
31
|
+
: undefined;
|
|
32
|
+
return East.value(variant("Code", {
|
|
33
|
+
value: value,
|
|
34
|
+
variant: variantValue ? variant("some", variantValue) : variant("none", null),
|
|
35
|
+
colorPalette: style?.colorPalette ? variant("some", style.colorPalette) : variant("none", null),
|
|
36
|
+
size: sizeValue ? variant("some", sizeValue) : variant("none", null),
|
|
37
|
+
}), UIComponentType);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Code component for displaying inline code snippets.
|
|
41
|
+
*
|
|
42
|
+
* @remarks
|
|
43
|
+
* Use `Code.Root(value, style)` to create inline code display.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* import { East } from "@elaraai/east";
|
|
48
|
+
* import { Code, UIComponentType } from "@elaraai/east-ui";
|
|
49
|
+
*
|
|
50
|
+
* const example = East.function([], UIComponentType, $ => {
|
|
51
|
+
* return Code.Root("const x = 42", {
|
|
52
|
+
* colorPalette: "purple",
|
|
53
|
+
* variant: "surface",
|
|
54
|
+
* });
|
|
55
|
+
* });
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
export const Code = {
|
|
59
|
+
Root: createCode,
|
|
60
|
+
Types: {
|
|
61
|
+
Code: CodeType,
|
|
62
|
+
Variant: CodeVariantType,
|
|
63
|
+
},
|
|
64
|
+
};
|
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ACZ,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC;QAC7E,YAAY,EAAE,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC;QAC/F,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC;KACvE,CAAC,EAAE,eAAe,CAAC,CAAC;AACzB,CAAC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG;IAChB,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE;QACH,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,eAAe;KAC3B;CACK,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
import { type SubtypeExprOrValue, OptionType, StringType, StructType, VariantType, NullType } from "@elaraai/east";
|
|
6
|
+
import { SizeType, type SizeLiteral } from "../../style.js";
|
|
7
|
+
/**
|
|
8
|
+
* Code variant type for different code display styles.
|
|
9
|
+
*
|
|
10
|
+
* @property subtle - Subtle background with colored text
|
|
11
|
+
* @property surface - Surface-level styling
|
|
12
|
+
* @property outline - Transparent background with colored border
|
|
13
|
+
*/
|
|
14
|
+
export declare const CodeVariantType: VariantType<{
|
|
15
|
+
subtle: NullType;
|
|
16
|
+
surface: NullType;
|
|
17
|
+
outline: NullType;
|
|
18
|
+
}>;
|
|
19
|
+
export type CodeVariantType = typeof CodeVariantType;
|
|
20
|
+
export type CodeVariantLiteral = "subtle" | "surface" | "outline";
|
|
21
|
+
/**
|
|
22
|
+
* The concrete East type for Code component data.
|
|
23
|
+
*
|
|
24
|
+
* @property value - The code text to display
|
|
25
|
+
* @property variant - Visual style variant
|
|
26
|
+
* @property colorPalette - Color scheme for the code
|
|
27
|
+
* @property size - Size of the code text
|
|
28
|
+
*/
|
|
29
|
+
export declare const CodeType: StructType<{
|
|
30
|
+
value: StringType;
|
|
31
|
+
variant: OptionType<VariantType<{
|
|
32
|
+
subtle: NullType;
|
|
33
|
+
surface: NullType;
|
|
34
|
+
outline: NullType;
|
|
35
|
+
}>>;
|
|
36
|
+
colorPalette: OptionType<StringType>;
|
|
37
|
+
size: OptionType<VariantType<{
|
|
38
|
+
xs: NullType;
|
|
39
|
+
sm: NullType;
|
|
40
|
+
md: NullType;
|
|
41
|
+
lg: NullType;
|
|
42
|
+
}>>;
|
|
43
|
+
}>;
|
|
44
|
+
export type CodeType = typeof CodeType;
|
|
45
|
+
/**
|
|
46
|
+
* Style configuration for Code components.
|
|
47
|
+
*/
|
|
48
|
+
export type CodeStyle = {
|
|
49
|
+
/** Visual style variant */
|
|
50
|
+
variant?: SubtypeExprOrValue<CodeVariantType> | CodeVariantLiteral;
|
|
51
|
+
/** Color palette (e.g., "gray", "blue") */
|
|
52
|
+
colorPalette?: SubtypeExprOrValue<StringType>;
|
|
53
|
+
/** Size of the code text */
|
|
54
|
+
size?: SubtypeExprOrValue<SizeType> | SizeLiteral;
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/typography/code/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,KAAK,kBAAkB,EACvB,UAAU,EACV,UAAU,EACV,UAAU,EACV,WAAW,EACX,QAAQ,EACX,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,QAAQ,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAM5D;;;;;;GAMG;AACH,eAAO,MAAM,eAAe;;;;EAI1B,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,OAAO,eAAe,CAAC;AACrD,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAC;AAMlE;;;;;;;GAOG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;EAKnB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ,CAAC;AAMvC;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG;IACpB,2BAA2B;IAC3B,OAAO,CAAC,EAAE,kBAAkB,CAAC,eAAe,CAAC,GAAG,kBAAkB,CAAC;IACnE,2CAA2C;IAC3C,YAAY,CAAC,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAC;IAC9C,4BAA4B;IAC5B,IAAI,CAAC,EAAE,kBAAkB,CAAC,QAAQ,CAAC,GAAG,WAAW,CAAC;CACrD,CAAC"}
|