@stagewise/ui 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -3
- package/package.json +9 -15
- package/src/components/ui/accordion.tsx +13 -15
- package/src/components/ui/alert-dialog.tsx +38 -38
- package/src/components/ui/alert.tsx +22 -22
- package/src/components/ui/aspect-ratio.tsx +6 -6
- package/src/components/ui/avatar.tsx +30 -30
- package/src/components/ui/badge.tsx +24 -22
- package/src/components/ui/breadcrumb.tsx +34 -37
- package/src/components/ui/bubble.tsx +48 -48
- package/src/components/ui/button-group.tsx +24 -24
- package/src/components/ui/button.tsx +24 -24
- package/src/components/ui/calendar.tsx +94 -81
- package/src/components/ui/card.tsx +30 -30
- package/src/components/ui/carousel.tsx +95 -92
- package/src/components/ui/chart.tsx +110 -110
- package/src/components/ui/checkbox.tsx +9 -10
- package/src/components/ui/collapsible.tsx +5 -5
- package/src/components/ui/combobox.tsx +51 -44
- package/src/components/ui/command.tsx +173 -190
- package/src/components/ui/context-menu.tsx +60 -50
- package/src/components/ui/dialog.tsx +33 -34
- package/src/components/ui/direction.tsx +1 -1
- package/src/components/ui/drawer.tsx +61 -61
- package/src/components/ui/dropdown-menu.tsx +54 -50
- package/src/components/ui/empty.tsx +30 -30
- package/src/components/ui/field.tsx +64 -64
- package/src/components/ui/hover-card.tsx +12 -12
- package/src/components/ui/input-group.tsx +54 -54
- package/src/components/ui/input-otp.tsx +24 -25
- package/src/components/ui/input.tsx +8 -8
- package/src/components/ui/item.tsx +64 -64
- package/src/components/ui/kbd.tsx +8 -8
- package/src/components/ui/klex-logo-combo.tsx +69 -0
- package/src/components/ui/klex-logo-text.tsx +70 -0
- package/src/components/ui/klex-logo.tsx +146 -0
- package/src/components/ui/label.tsx +8 -8
- package/src/components/ui/marker.tsx +25 -25
- package/src/components/ui/menubar.tsx +54 -50
- package/src/components/ui/message-scroller.tsx +130 -0
- package/src/components/ui/message.tsx +27 -27
- package/src/components/ui/native-select.tsx +22 -18
- package/src/components/ui/navigation-menu.tsx +37 -34
- package/src/components/ui/pagination.tsx +34 -31
- package/src/components/ui/popover.tsx +19 -19
- package/src/components/ui/progress.tsx +16 -16
- package/src/components/ui/questionnaire.tsx +72 -69
- package/src/components/ui/radio-group.tsx +9 -9
- package/src/components/ui/resizable.tsx +19 -12
- package/src/components/ui/scroll-area.tsx +10 -10
- package/src/components/ui/select.tsx +39 -34
- package/src/components/ui/separator.tsx +7 -7
- package/src/components/ui/sheet.tsx +31 -32
- package/src/components/ui/sidebar.tsx +244 -232
- package/src/components/ui/skeleton.tsx +5 -5
- package/src/components/ui/slider.tsx +11 -7
- package/src/components/ui/spinner.tsx +15 -6
- package/src/components/ui/stagewise-logo-combo.tsx +43 -0
- package/src/components/ui/stagewise-logo-text.tsx +30 -0
- package/src/components/ui/stagewise-logo.tsx +42 -0
- package/src/components/ui/switch.tsx +9 -9
- package/src/components/ui/table.tsx +31 -31
- package/src/components/ui/tabs.tsx +37 -26
- package/src/components/ui/textarea.tsx +7 -7
- package/src/components/ui/toast.tsx +70 -70
- package/src/components/ui/toggle-group.tsx +26 -26
- package/src/components/ui/toggle.tsx +15 -15
- package/src/components/ui/tooltip.tsx +13 -13
- package/src/hooks/use-mobile.ts +13 -11
- package/src/icons/custom/ui-outline-18/IconKlexOutline18.tsx +39 -0
- package/src/icons/custom/ui-outline-18/IconLaptop.tsx +35 -0
- package/src/icons/custom/ui-outline-18/IconSignOut.tsx +33 -0
- package/src/icons/custom/ui-outline-18/index.ts +4 -1
- package/src/icons/index.ts +43 -20
- package/src/icons/nucleo/social-media/IconMicrosoftEntraId.tsx +56 -0
- package/src/icons/nucleo/social-media/index.ts +1 -0
- package/src/icons/nucleo/ui-outline-18/IconArrowDownOutline18.tsx +4 -3
- package/src/icons/nucleo/ui-outline-18/IconArrowTurnRightOutline18.tsx +32 -0
- package/src/icons/nucleo/ui-outline-18/IconArrowUpOutline18.tsx +35 -0
- package/src/icons/nucleo/ui-outline-18/IconChartPieOutline18.tsx +4 -3
- package/src/icons/nucleo/ui-outline-18/IconChevronMaximizeDiagonal2Outline18.tsx +33 -0
- package/src/icons/nucleo/ui-outline-18/IconChevronUpOutline18.tsx +4 -3
- package/src/icons/nucleo/ui-outline-18/IconEmptyOutline18.tsx +41 -0
- package/src/icons/nucleo/ui-outline-18/IconEyeOffOutline18.tsx +18 -0
- package/src/icons/nucleo/ui-outline-18/IconLinkBrokenOutline18.tsx +66 -0
- package/src/icons/nucleo/ui-outline-18/IconLock18Outline.tsx +48 -0
- package/src/icons/nucleo/ui-outline-18/IconMinusOutline18.tsx +4 -3
- package/src/icons/nucleo/ui-outline-18/IconMsgs2Outline18.tsx +32 -0
- package/src/icons/nucleo/ui-outline-18/IconPanelLeftOutline18.tsx +4 -3
- package/src/icons/nucleo/ui-outline-18/IconSidebarLeft2HideOutline18.tsx +63 -0
- package/src/icons/nucleo/ui-outline-18/IconSidebarRight2HideOutline18.tsx +63 -0
- package/src/icons/nucleo/ui-outline-18/index.ts +11 -1
- package/src/icons/provider/IconAnthropic.tsx +15 -0
- package/src/icons/provider/IconAttio.tsx +9 -0
- package/src/icons/provider/IconCodex.tsx +18 -0
- package/src/icons/provider/IconDiscord.tsx +17 -0
- package/src/icons/provider/IconGemini.tsx +152 -0
- package/src/icons/provider/IconLinear.tsx +9 -0
- package/src/icons/provider/IconOpenAI.tsx +15 -0
- package/src/icons/provider/IconOpenRouter.tsx +24 -0
- package/src/icons/provider/IconSlack.tsx +24 -0
- package/src/icons/provider/IconTelegram.tsx +29 -0
- package/src/icons/provider/IconWhatsapp.tsx +14 -0
- package/src/icons/provider/LICENSE +21 -0
- package/src/icons/provider/index.ts +11 -0
- package/src/index.ts +68 -61
- package/src/lib/utils.ts +3 -3
- package/src/styles/bridge.css +7 -3
- package/src/styles/derived-utilities.css +129 -50
- package/src/styles/index.css +17 -2
- package/src/styles/palette.css +266 -105
- package/src/styles/scroll-fade.css +116 -0
- package/src/styles/tailwind-tokens.css +3 -0
- package/src/styles/theme.css +57 -43
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { FC, HTMLAttributes } from 'react';
|
|
2
|
+
|
|
3
|
+
import { cn } from '../../lib/utils';
|
|
4
|
+
import {
|
|
5
|
+
type KlexLogoColorMode,
|
|
6
|
+
type KlexLogoVariant,
|
|
7
|
+
KlexLogo,
|
|
8
|
+
} from './klex-logo';
|
|
9
|
+
import { type KlexLogoTextVariant, KlexLogoText } from './klex-logo-text';
|
|
10
|
+
|
|
11
|
+
export interface KlexLogoComboProps extends HTMLAttributes<HTMLDivElement> {
|
|
12
|
+
/** className applied to the logo mark */
|
|
13
|
+
logoClassName?: string;
|
|
14
|
+
/** className applied to the wordmark */
|
|
15
|
+
textClassName?: string;
|
|
16
|
+
/** className applied to the wordmark path */
|
|
17
|
+
textPathClassName?: string;
|
|
18
|
+
/** Height of the combined logo in px. Defaults to 32. */
|
|
19
|
+
size?: number;
|
|
20
|
+
/** Variant of the logo mark. Defaults to 'boxed-square'. */
|
|
21
|
+
variant?: KlexLogoVariant;
|
|
22
|
+
/** Color mode of the logo mark. Defaults to 'primary'. */
|
|
23
|
+
colorMode?: KlexLogoColorMode;
|
|
24
|
+
/** Wordmark text variant. Defaults to 'klex'. */
|
|
25
|
+
textVariant?: KlexLogoTextVariant;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export const KlexLogoCombo: FC<KlexLogoComboProps> = ({
|
|
29
|
+
className,
|
|
30
|
+
logoClassName,
|
|
31
|
+
textClassName,
|
|
32
|
+
textPathClassName,
|
|
33
|
+
size = 32,
|
|
34
|
+
variant = 'boxed-square',
|
|
35
|
+
colorMode = 'primary',
|
|
36
|
+
textVariant = 'klex',
|
|
37
|
+
style,
|
|
38
|
+
...props
|
|
39
|
+
}) => {
|
|
40
|
+
const ariaLabels: Record<KlexLogoTextVariant, string> = {
|
|
41
|
+
klex: 'Klex',
|
|
42
|
+
'klex-cloud': 'Klex Cloud',
|
|
43
|
+
'klex-docs': 'Klex Docs',
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<div
|
|
48
|
+
className={cn('flex shrink-0 items-center', className)}
|
|
49
|
+
style={{ gap: size * 0.26, ...style }}
|
|
50
|
+
role="img"
|
|
51
|
+
aria-label={ariaLabels[textVariant]}
|
|
52
|
+
data-slot="klex-logo-combo"
|
|
53
|
+
{...props}
|
|
54
|
+
>
|
|
55
|
+
<KlexLogo
|
|
56
|
+
variant={variant}
|
|
57
|
+
colorMode={colorMode}
|
|
58
|
+
size={size}
|
|
59
|
+
className={logoClassName}
|
|
60
|
+
/>
|
|
61
|
+
<KlexLogoText
|
|
62
|
+
variant={textVariant}
|
|
63
|
+
className={cn('w-auto shrink-0', textClassName)}
|
|
64
|
+
pathClassName={textPathClassName}
|
|
65
|
+
style={{ height: size * 0.8 }}
|
|
66
|
+
/>
|
|
67
|
+
</div>
|
|
68
|
+
);
|
|
69
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { FC, SVGAttributes } from 'react';
|
|
2
|
+
|
|
3
|
+
import { cn } from '../../lib/utils';
|
|
4
|
+
|
|
5
|
+
export type KlexLogoTextVariant = 'klex' | 'klex-cloud' | 'klex-docs';
|
|
6
|
+
|
|
7
|
+
export interface KlexLogoTextProps extends SVGAttributes<SVGSVGElement> {
|
|
8
|
+
/** className applied to the wordmark path */
|
|
9
|
+
pathClassName?: string;
|
|
10
|
+
/** Wordmark variant. Defaults to 'klex'. */
|
|
11
|
+
variant?: KlexLogoTextVariant;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Base wordmark path shared by all variants — the "Klex" letterforms.
|
|
16
|
+
* Extended variants append their own suffix path data.
|
|
17
|
+
*/
|
|
18
|
+
const BASE_PATH =
|
|
19
|
+
'M21.55 49L53.95 17.15C55.05 16.1167 55.75 15.2 56.05 14.4C56.3833 13.5667 56.3667 12.8667 56 12.3C55.6667 11.7333 55.0167 11.2833 54.05 10.95L51.2 10.35C50.4667 10.1167 49.9333 9.81666 49.6 9.45C49.3 9.08333 49.15 8.63333 49.15 8.1C49.15 7.43333 49.3833 6.91666 49.85 6.55C50.35 6.18333 51.0667 6 52 6H70.9C71.9 6 72.6333 6.18333 73.1 6.55C73.5667 6.91666 73.8 7.43333 73.8 8.1C73.8 8.66666 73.6 9.11666 73.2 9.45C72.8 9.75 71.9833 10.1 70.75 10.5C70.2167 10.6333 69.6833 10.8167 69.15 11.05C68.65 11.2833 68.05 11.65 67.35 12.15C66.65 12.65 65.7667 13.3833 64.7 14.35C63.6333 15.2833 62.2667 16.5167 60.6 18.05L23.7 53.5L21.55 49ZM34.75 38.45L45.3 29.85L69.45 67.7C70.1833 68.8333 70.9333 69.6667 71.7 70.2C72.5 70.7 73.4333 71.0667 74.5 71.3C75.6333 71.6333 76.3833 72.0167 76.75 72.45C77.15 72.85 77.35 73.3333 77.35 73.9C77.35 74.5333 77.1 75.05 76.6 75.45C76.1333 75.8167 75.4167 76 74.45 76H51.3C50.3 76 49.5667 75.8167 49.1 75.45C48.6333 75.05 48.4 74.5167 48.4 73.85C48.4 73.2833 48.5667 72.8167 48.9 72.45C49.2333 72.0833 49.7 71.8167 50.3 71.65L53.2 71.1C53.9333 70.9333 54.3167 70.5833 54.35 70.05C54.3833 69.4833 54.0833 68.6833 53.45 67.65L34.75 38.45ZM26.65 68.15C26.65 68.8833 26.8333 69.4833 27.2 69.95C27.6 70.3833 28.1667 70.7167 28.9 70.95L31.7 71.55C32.5 71.85 33.0333 72.1833 33.3 72.55C33.6 72.8833 33.75 73.3333 33.75 73.9C33.75 74.5333 33.5167 75.05 33.05 75.45C32.6167 75.8167 31.9167 76 30.95 76H8.25C7.31667 76 6.61667 75.8167 6.15 75.45C5.71667 75.05 5.5 74.5333 5.5 73.9C5.5 72.7333 6.16667 71.95 7.5 71.55L10.55 70.95C11.3833 70.7167 12 70.3833 12.4 69.95C12.8333 69.4833 13.05 68.8833 13.05 68.15V13.85C13.05 13.1167 12.8333 12.5167 12.4 12.05C12 11.5833 11.3833 11.25 10.55 11.05L7.5 10.4C6.16667 10 5.5 9.23333 5.5 8.1C5.5 7.43333 5.71667 6.91666 6.15 6.55C6.61667 6.18333 7.31667 6 8.25 6H31.45C32.4167 6 33.1167 6.18333 33.55 6.55C34.0167 6.91666 34.25 7.43333 34.25 8.1C34.25 9.23333 33.5667 10 32.2 10.4L29.15 11.05C28.35 11.25 27.7333 11.5833 27.3 12.05C26.8667 12.5167 26.65 13.1167 26.65 13.85V68.15ZM98.332 4.9V68.4C98.332 69.4 98.482 70.1333 98.782 70.6C99.1154 71.0667 99.5987 71.4 100.232 71.6L102.282 72.1C102.915 72.3 103.382 72.5667 103.682 72.9C103.982 73.2 104.132 73.6 104.132 74.1C104.132 74.6667 103.915 75.1333 103.482 75.5C103.082 75.8333 102.432 76 101.532 76H82.632C81.7654 76 81.132 75.8333 80.732 75.5C80.332 75.1333 80.132 74.6667 80.132 74.1C80.132 73.6333 80.2654 73.2333 80.532 72.9C80.832 72.5667 81.2987 72.3 81.932 72.1L84.082 71.6C84.7154 71.4 85.182 71.0667 85.482 70.6C85.8154 70.1333 85.982 69.4167 85.982 68.45V12.7C85.982 11.9 85.8487 11.3167 85.582 10.95C85.3154 10.5833 84.8987 10.3667 84.332 10.3L81.332 10.1C80.732 10 80.2987 9.81666 80.032 9.54999C79.7654 9.25 79.632 8.88333 79.632 8.45C79.632 7.95 79.782 7.55 80.082 7.24999C80.4154 6.91666 80.9987 6.6 81.832 6.3L90.532 3.15C91.732 2.71667 92.6987 2.41667 93.432 2.25C94.1654 2.05 94.782 1.95 95.282 1.95C96.3154 1.95 97.082 2.21666 97.582 2.75C98.082 3.28333 98.332 4 98.332 4.9ZM150.33 46.5C150.33 48.2 149.846 49.5 148.88 50.4C147.913 51.3 146.496 51.75 144.63 51.75H113.03V48.15H135.28C136.98 48.15 137.83 47.4 137.83 45.9C137.83 41.5 136.946 38.1167 135.18 35.75C133.413 33.35 131.046 32.15 128.08 32.15C125.78 32.15 123.746 32.8333 121.98 34.2C120.213 35.5333 118.83 37.45 117.83 39.95C116.83 42.45 116.33 45.4167 116.33 48.85C116.33 55.3833 117.88 60.3167 120.98 63.65C124.08 66.9833 128.18 68.65 133.28 68.65C136.38 68.65 139.096 68 141.43 66.7C143.763 65.3667 145.496 63.55 146.63 61.25C147.13 60.65 147.546 60.2333 147.88 60C148.213 59.7667 148.563 59.65 148.93 59.65C149.43 59.65 149.78 59.8833 149.98 60.35C150.213 60.7833 150.33 61.3 150.33 61.9C150.163 64.6667 149.163 67.2167 147.33 69.55C145.496 71.8833 143.03 73.75 139.93 75.15C136.863 76.5167 133.346 77.2 129.38 77.2C124.613 77.2 120.396 76.2167 116.73 74.25C113.063 72.25 110.196 69.4667 108.13 65.9C106.063 62.3333 105.03 58.15 105.03 53.35C105.03 48.35 106.013 43.9333 107.98 40.1C109.98 36.2333 112.83 33.2 116.53 31C120.23 28.7667 124.63 27.65 129.73 27.65C133.996 27.65 137.663 28.45 140.73 30.05C143.83 31.65 146.196 33.8667 147.83 36.7C149.496 39.5333 150.33 42.8 150.33 46.5ZM170.509 50.45L174.209 52.55L163.559 66.7C162.626 67.9667 162.243 69.0333 162.409 69.9C162.576 70.7333 163.376 71.3333 164.809 71.7L166.559 72.1C167.193 72.3 167.643 72.55 167.909 72.85C168.209 73.15 168.359 73.5333 168.359 74C168.359 74.6 168.126 75.0833 167.659 75.45C167.226 75.7833 166.609 75.95 165.809 75.95H152.009C151.243 75.95 150.626 75.7833 150.159 75.45C149.726 75.0833 149.509 74.6 149.509 74C149.509 73.5333 149.659 73.15 149.959 72.85C150.259 72.5167 150.793 72.1833 151.559 71.85C152.526 71.4833 153.359 71.0667 154.059 70.6C154.793 70.1 155.543 69.4333 156.309 68.6C157.076 67.7667 158.009 66.65 159.109 65.25L170.509 50.45ZM171.109 36.45L180.859 49.65L181.409 50.25L194.759 67.8C195.826 69.2 196.676 70.1833 197.309 70.75C197.943 71.2833 198.693 71.7 199.559 72C200.226 72.2667 200.693 72.5667 200.959 72.9C201.259 73.2 201.409 73.5833 201.409 74.05C201.409 74.65 201.176 75.1333 200.709 75.5C200.276 75.8333 199.659 76 198.859 76H178.359C177.526 76 176.876 75.8333 176.409 75.5C175.976 75.1333 175.759 74.65 175.759 74.05C175.759 73.5833 175.876 73.2 176.109 72.9C176.376 72.6 176.809 72.3667 177.409 72.2L179.159 71.85C180.393 71.6167 181.076 71.2333 181.209 70.7C181.343 70.1333 181.026 69.35 180.259 68.35L169.859 54.2L169.259 53.55L156.959 36.75C155.993 35.45 155.159 34.55 154.459 34.05C153.793 33.55 152.976 33.15 152.009 32.85C151.243 32.6167 150.726 32.3333 150.459 32C150.193 31.6667 150.059 31.2333 150.059 30.7C150.059 30.1 150.276 29.6333 150.709 29.3C151.176 28.9333 151.809 28.75 152.609 28.75H172.809C173.576 28.75 174.176 28.9167 174.609 29.25C175.076 29.5833 175.309 30.05 175.309 30.65C175.309 31.1167 175.193 31.5 174.959 31.8C174.759 32.1 174.393 32.35 173.859 32.55L172.109 33.05C170.909 33.35 170.276 33.7667 170.209 34.3C170.143 34.8 170.443 35.5167 171.109 36.45ZM179.809 53.7L176.059 51.6L186.509 38C187.476 36.7333 187.876 35.6667 187.709 34.8C187.543 33.9333 186.726 33.3167 185.259 32.95L183.509 32.6C182.876 32.4 182.409 32.15 182.109 31.85C181.843 31.5167 181.709 31.1167 181.709 30.65C181.709 30.05 181.926 29.5833 182.359 29.25C182.826 28.9167 183.459 28.75 184.259 28.75H198.059C198.859 28.75 199.476 28.9167 199.909 29.25C200.343 29.5833 200.559 30.0667 200.559 30.7C200.559 31.1667 200.409 31.5667 200.109 31.9C199.809 32.2 199.276 32.5167 198.509 32.85C197.076 33.35 195.876 34.05 194.909 34.95C193.943 35.85 192.626 37.35 190.959 39.45L179.809 53.7Z';
|
|
20
|
+
|
|
21
|
+
/** Additional path data for the "Klex Cloud" wordmark. */
|
|
22
|
+
const CLOUD_SUFFIX =
|
|
23
|
+
'M279.47 58C279.47 60.2667 278.836 62.5667 277.57 64.9C276.336 67.2333 274.52 69.3833 272.12 71.35C269.753 73.2833 266.853 74.85 263.42 76.05C260.02 77.25 256.153 77.85 251.82 77.85C244.653 77.85 238.47 76.3 233.27 73.2C228.07 70.0667 224.053 65.7667 221.22 60.3C218.42 54.8 217.02 48.5 217.02 41.4C217.02 36.0333 217.853 31.1 219.52 26.6C221.186 22.1 223.52 18.1833 226.52 14.85C229.553 11.4833 233.103 8.88333 237.17 7.05C241.236 5.21667 245.67 4.3 250.47 4.3C253.87 4.3 256.636 4.65 258.77 5.34999C260.903 6.01666 262.57 6.7 263.77 7.4C265.003 8.06666 265.953 8.39999 266.62 8.39999C267.453 8.39999 268.053 8.11666 268.42 7.55C268.82 6.95 269.22 6.36666 269.62 5.8C270.02 5.2 270.636 4.9 271.47 4.9C272.003 4.9 272.453 5.06666 272.82 5.4C273.186 5.73333 273.503 6.31666 273.77 7.15L279.07 24.25C279.303 24.9833 279.236 25.6333 278.87 26.2C278.503 26.7333 277.953 27.0667 277.22 27.2C276.52 27.3333 275.87 27.2667 275.27 27C274.703 26.7 274.253 26.1833 273.92 25.45C272.086 21.4833 270.07 18.3167 267.87 15.95C265.67 13.55 263.253 11.8333 260.62 10.8C258.02 9.73333 255.17 9.2 252.07 9.2C248.97 9.2 246.103 9.9 243.47 11.3C240.87 12.6667 238.62 14.65 236.72 17.25C234.82 19.8167 233.336 22.9 232.27 26.5C231.236 30.0667 230.72 34.0667 230.72 38.5C230.72 45.2667 231.803 51.0167 233.97 55.75C236.136 60.4833 239.103 64.0833 242.87 66.55C246.636 69.0167 250.903 70.25 255.67 70.25C260.336 70.25 264.353 69.1667 267.72 67C271.12 64.8333 273.72 61.8 275.52 57.9C275.886 57.1667 276.27 56.6833 276.67 56.45C277.103 56.1833 277.586 56.1 278.12 56.2C278.586 56.2667 278.92 56.45 279.12 56.75C279.353 57.05 279.47 57.4667 279.47 58ZM301.387 4.9V68.4C301.387 69.4 301.537 70.1333 301.837 70.6C302.17 71.0667 302.653 71.4 303.287 71.6L305.337 72.1C305.97 72.3 306.437 72.5667 306.737 72.9C307.037 73.2 307.187 73.6 307.187 74.1C307.187 74.6667 306.97 75.1333 306.537 75.5C306.137 75.8333 305.487 76 304.587 76H285.687C284.82 76 284.187 75.8333 283.787 75.5C283.387 75.1333 283.187 74.6667 283.187 74.1C283.187 73.6333 283.32 73.2333 283.587 72.9C283.887 72.5667 284.353 72.3 284.987 72.1L287.137 71.6C287.77 71.4 288.237 71.0667 288.537 70.6C288.87 70.1333 289.037 69.4167 289.037 68.45V12.7C289.037 11.9 288.903 11.3167 288.637 10.95C288.37 10.5833 287.953 10.3667 287.387 10.3L284.387 10.1C283.787 10 283.353 9.81666 283.087 9.54999C282.82 9.25 282.687 8.88333 282.687 8.45C282.687 7.95 282.837 7.55 283.137 7.24999C283.47 6.91666 284.053 6.6 284.887 6.3L293.587 3.15C294.787 2.71667 295.753 2.41667 296.487 2.25C297.22 2.05 297.837 1.95 298.337 1.95C299.37 1.95 300.137 2.21666 300.637 2.75C301.137 3.28333 301.387 4 301.387 4.9ZM336.034 27.65C341.068 27.65 345.501 28.7 349.334 30.8C353.168 32.9 356.151 35.8167 358.284 39.55C360.451 43.2833 361.534 47.6 361.534 52.5C361.534 57.2 360.434 61.4167 358.234 65.15C356.034 68.8833 352.984 71.8333 349.084 74C345.218 76.1333 340.734 77.2 335.634 77.2C330.601 77.2 326.168 76.15 322.334 74.05C318.501 71.9167 315.501 68.9833 313.334 65.25C311.201 61.4833 310.134 57.1833 310.134 52.35C310.134 47.5833 311.234 43.35 313.434 39.65C315.634 35.9167 318.668 32.9833 322.534 30.85C326.434 28.7167 330.934 27.65 336.034 27.65ZM339.584 72.35C342.118 71.95 344.168 70.85 345.734 69.05C347.301 67.25 348.318 64.8 348.784 61.7C349.284 58.5667 349.151 54.85 348.384 50.55C347.618 46.25 346.451 42.7 344.884 39.9C343.318 37.0667 341.434 35.0333 339.234 33.8C337.068 32.5333 334.684 32.1 332.084 32.5C329.551 32.9 327.501 34 325.934 35.8C324.368 37.6 323.351 40.0667 322.884 43.2C322.418 46.3 322.551 50 323.284 54.3C324.051 58.6 325.218 62.1667 326.784 65C328.351 67.8 330.218 69.8333 332.384 71.1C334.584 72.3333 336.984 72.75 339.584 72.35ZM402.014 69.35V66.6L401.614 66.35V38.75C401.614 37.95 401.481 37.3667 401.214 37C400.981 36.6333 400.564 36.4167 399.964 36.35L396.964 36.15C396.364 36.05 395.931 35.8667 395.664 35.6C395.431 35.3 395.314 34.9333 395.314 34.5C395.314 34 395.464 33.6 395.764 33.3C396.064 32.9667 396.631 32.65 397.464 32.35L406.164 29.2C407.331 28.7667 408.281 28.4667 409.014 28.3C409.747 28.1 410.431 28 411.064 28C412.031 28 412.747 28.2667 413.214 28.8C413.714 29.3333 413.964 30.05 413.964 30.95V68.4C413.964 69.4 414.114 70.1333 414.414 70.6C414.747 71.0667 415.231 71.4 415.864 71.6L417.914 72.1C418.547 72.3 419.014 72.5667 419.314 72.9C419.614 73.2 419.764 73.6 419.764 74.1C419.764 74.6667 419.547 75.1333 419.114 75.5C418.714 75.8333 418.081 76 417.214 76H407.864C406.164 76 404.764 75.4 403.664 74.2C402.564 72.9667 402.014 71.35 402.014 69.35ZM370.164 62.2V38.75C370.164 37.95 370.031 37.3667 369.764 37C369.531 36.6333 369.114 36.4167 368.514 36.35L365.514 36.15C364.914 36.05 364.481 35.8667 364.214 35.6C363.981 35.3 363.864 34.9333 363.864 34.5C363.864 34 364.014 33.6 364.314 33.3C364.614 32.9667 365.181 32.65 366.014 32.35L374.714 29.2C375.947 28.7667 376.914 28.4667 377.614 28.3C378.347 28.1 378.981 28 379.514 28C380.514 28 381.264 28.2667 381.764 28.8C382.264 29.3333 382.514 30.05 382.514 30.95V60.35C382.514 63.4833 383.264 65.8333 384.764 67.4C386.297 68.9333 388.331 69.7 390.864 69.7C392.431 69.7 394.114 69.3167 395.914 68.55C397.714 67.75 399.597 66.5 401.564 64.8L403.664 63L405.814 65.2L403.764 67.05C399.664 70.7833 396.081 73.4167 393.014 74.95C389.947 76.45 387.047 77.2 384.314 77.2C380.081 77.2 376.664 75.85 374.064 73.15C371.464 70.4167 370.164 66.7667 370.164 62.2ZM459.976 67.65L459.626 67.35V12.7C459.626 11.9 459.492 11.3167 459.226 10.95C458.959 10.5833 458.542 10.3667 457.976 10.3L454.976 10.1C454.376 10 453.942 9.81666 453.676 9.54999C453.409 9.25 453.276 8.88333 453.276 8.45C453.276 7.95 453.426 7.55 453.726 7.24999C454.059 6.91666 454.642 6.6 455.476 6.3L464.176 3.15C465.342 2.71667 466.292 2.41667 467.026 2.25C467.759 2.05 468.426 1.95 469.026 1.95C469.992 1.95 470.726 2.21666 471.226 2.75C471.726 3.28333 471.976 4 471.976 4.9V68.4C471.976 69.4 472.126 70.1333 472.426 70.6C472.759 71.0667 473.242 71.4 473.876 71.6L475.926 72.1C476.559 72.3 477.026 72.5667 477.326 72.9C477.626 73.2 477.776 73.6 477.776 74.1C477.776 74.6667 477.559 75.1333 477.126 75.5C476.726 75.8333 476.076 76 475.176 76H465.626C463.959 76 462.592 75.5 461.526 74.5C460.492 73.4667 459.976 72.0833 459.976 70.35V67.65ZM423.276 53.6C423.276 48.3 424.326 43.7167 426.426 39.85C428.559 35.95 431.409 32.95 434.976 30.85C438.576 28.7167 442.576 27.65 446.976 27.65C450.976 27.65 454.526 28.6167 457.626 30.55C460.726 32.45 463.259 35.2 465.226 38.8L462.226 41.55C460.559 38.65 458.592 36.4833 456.326 35.05C454.092 33.5833 451.692 32.85 449.126 32.85C446.692 32.85 444.492 33.55 442.526 34.95C440.559 36.35 439.009 38.4833 437.876 41.35C436.776 44.1833 436.226 47.8 436.226 52.2C436.226 56.3333 436.759 59.7833 437.826 62.55C438.926 65.2833 440.426 67.35 442.326 68.75C444.226 70.1167 446.392 70.8 448.826 70.8C451.392 70.8 453.809 70.0333 456.076 68.5C458.342 66.9667 460.426 64.6667 462.326 61.6L464.276 64.4C461.676 68.4 458.642 71.5333 455.176 73.8C451.742 76.0667 447.976 77.2 443.876 77.2C439.909 77.2 436.376 76.2 433.276 74.2C430.176 72.1667 427.726 69.3833 425.926 65.85C424.159 62.2833 423.276 58.2 423.276 53.6Z';
|
|
24
|
+
|
|
25
|
+
/** Additional path data for the "Klex Docs" wordmark. */
|
|
26
|
+
const DOCS_SUFFIX =
|
|
27
|
+
'M218.27 73.9C218.27 72.7333 218.936 71.95 220.27 71.55L223.32 70.95C224.153 70.7167 224.77 70.3833 225.17 69.95C225.603 69.4833 225.82 68.8833 225.82 68.15V13.85C225.82 13.1167 225.603 12.5167 225.17 12.05C224.77 11.5833 224.153 11.25 223.32 11.05L220.27 10.4C218.936 10 218.27 9.23333 218.27 8.1C218.27 7.43333 218.486 6.91666 218.92 6.55C219.386 6.18333 220.086 6 221.02 6H246.52C252.753 6 258.403 6.91666 263.47 8.75C268.536 10.55 272.903 13.1 276.57 16.4C280.236 19.7 283.053 23.6167 285.02 28.15C286.986 32.65 287.97 37.6 287.97 43C287.97 49.3333 286.503 54.9833 283.57 59.95C280.636 64.9167 276.42 68.8333 270.92 71.7C265.42 74.5667 258.786 76 251.02 76H221.02C220.086 76 219.386 75.8167 218.92 75.45C218.486 75.05 218.27 74.5333 218.27 73.9ZM249.87 71.4C254.77 71.4 259.003 70.3167 262.57 68.15C266.136 65.9833 268.903 62.7833 270.87 58.55C272.836 54.2833 273.82 49.0167 273.82 42.75C273.82 37.8167 273.153 33.3833 271.82 29.45C270.486 25.4833 268.553 22.1 266.02 19.3C263.52 16.5 260.486 14.35 256.92 12.85C253.386 11.35 249.403 10.6 244.97 10.6H239.42V66.95C239.42 68.4833 239.87 69.6167 240.77 70.35C241.703 71.05 243.086 71.4 244.92 71.4H249.87ZM317.866 27.65C322.9 27.65 327.333 28.7 331.166 30.8C335 32.9 337.983 35.8167 340.116 39.55C342.283 43.2833 343.366 47.6 343.366 52.5C343.366 57.2 342.266 61.4167 340.066 65.15C337.866 68.8833 334.816 71.8333 330.916 74C327.05 76.1333 322.566 77.2 317.466 77.2C312.433 77.2 308 76.15 304.166 74.05C300.333 71.9167 297.333 68.9833 295.166 65.25C293.033 61.4833 291.966 57.1833 291.966 52.35C291.966 47.5833 293.066 43.35 295.266 39.65C297.466 35.9167 300.5 32.9833 304.366 30.85C308.266 28.7167 312.766 27.65 317.866 27.65ZM321.416 72.35C323.95 71.95 326 70.85 327.566 69.05C329.133 67.25 330.15 64.8 330.616 61.7C331.116 58.5667 330.983 54.85 330.216 50.55C329.45 46.25 328.283 42.7 326.716 39.9C325.15 37.0667 323.266 35.0333 321.066 33.8C318.9 32.5333 316.516 32.1 313.916 32.5C311.383 32.9 309.333 34 307.766 35.8C306.2 37.6 305.183 40.0667 304.716 43.2C304.25 46.3 304.383 50 305.116 54.3C305.883 58.6 307.05 62.1667 308.616 65C310.183 67.8 312.05 69.8333 314.216 71.1C316.416 72.3333 318.816 72.75 321.416 72.35ZM391.596 41.1C391.596 42.8333 390.996 44.3 389.796 45.5C388.596 46.6667 387.013 47.25 385.046 47.25C383.146 47.25 381.679 46.7167 380.646 45.65C379.613 44.55 379.096 43.1333 379.096 41.4V39.9C379.096 37.5667 378.329 35.7 376.796 34.3C375.296 32.8667 373.229 32.15 370.596 32.15C368.263 32.15 366.179 32.8333 364.346 34.2C362.513 35.5333 361.063 37.45 359.996 39.95C358.963 42.45 358.446 45.4167 358.446 48.85C358.446 53.1167 359.163 56.7333 360.596 59.7C362.063 62.6333 364.063 64.8667 366.596 66.4C369.163 67.9 372.079 68.65 375.346 68.65C378.346 68.65 380.963 68 383.196 66.7C385.429 65.3667 387.096 63.5833 388.196 61.35C388.729 60.75 389.146 60.3333 389.446 60.1C389.779 59.8667 390.146 59.75 390.546 59.75C391.046 59.75 391.396 59.9667 391.596 60.4C391.829 60.8333 391.929 61.35 391.896 61.95C391.729 64.7167 390.746 67.2667 388.946 69.6C387.179 71.9 384.796 73.75 381.796 75.15C378.796 76.5167 375.363 77.2 371.496 77.2C366.729 77.2 362.513 76.2167 358.846 74.25C355.179 72.25 352.313 69.4667 350.246 65.9C348.179 62.3333 347.146 58.15 347.146 53.35C347.146 48.4833 348.179 44.1167 350.246 40.25C352.346 36.3833 355.279 33.3167 359.046 31.05C362.813 28.7833 367.229 27.65 372.296 27.65C376.263 27.65 379.679 28.2667 382.546 29.5C385.446 30.7333 387.679 32.3667 389.246 34.4C390.813 36.4333 391.596 38.6667 391.596 41.1ZM414.002 31.85C411.602 31.85 409.718 32.4667 408.352 33.7C406.985 34.9 406.302 36.45 406.302 38.35C406.302 39.55 406.568 40.6333 407.102 41.6C407.668 42.5333 408.685 43.4 410.152 44.2C411.618 44.9667 413.735 45.7 416.502 46.4C421.402 47.4333 425.202 48.75 427.902 50.35C430.635 51.9167 432.535 53.7167 433.602 55.75C434.702 57.7833 435.252 60.0333 435.252 62.5C435.252 66.9333 433.668 70.5 430.502 73.2C427.335 75.8667 422.768 77.2 416.802 77.2C414.635 77.2 412.868 77 411.502 76.6C410.135 76.2333 409.002 75.8667 408.102 75.5C407.202 75.1333 406.402 74.95 405.702 74.95C405.002 74.95 404.452 75.15 404.052 75.55C403.652 75.9167 403.268 76.2833 402.902 76.65C402.535 77.0167 402.035 77.2 401.402 77.2C400.868 77.2 400.452 77.0333 400.152 76.7C399.885 76.4 399.618 75.85 399.352 75.05L395.852 64.85C395.518 63.7833 395.418 62.9167 395.552 62.25C395.685 61.55 396.102 61.0667 396.802 60.8C397.502 60.5333 398.118 60.5333 398.652 60.8C399.185 61.0667 399.668 61.5667 400.102 62.3C401.568 64.9333 403.152 67.0333 404.852 68.6C406.552 70.1667 408.352 71.3 410.252 72C412.152 72.6667 414.102 73 416.102 73C419.135 73 421.402 72.3833 422.902 71.15C424.402 69.8833 425.152 68.2167 425.152 66.15C425.152 64.9167 424.835 63.8 424.202 62.8C423.568 61.7667 422.402 60.8333 420.702 60C419.002 59.1333 416.552 58.3167 413.352 57.55C409.152 56.6167 405.802 55.4333 403.302 54C400.835 52.5333 399.052 50.7833 397.952 48.75C396.885 46.7167 396.352 44.35 396.352 41.65C396.352 38.8833 397.052 36.45 398.452 34.35C399.885 32.25 401.868 30.6167 404.402 29.45C406.968 28.25 409.952 27.65 413.352 27.65C415.552 27.65 417.318 27.85 418.652 28.25C419.985 28.65 421.085 29.05 421.952 29.45C422.818 29.85 423.618 30.05 424.352 30.05C425.118 30.05 425.718 29.85 426.152 29.45C426.585 29.05 426.985 28.65 427.352 28.25C427.752 27.85 428.252 27.65 428.852 27.65C429.285 27.65 429.652 27.8167 429.952 28.15C430.285 28.45 430.535 28.9833 430.702 29.75L433.352 39.5C433.585 40.6 433.652 41.5 433.552 42.2C433.452 42.8667 433.052 43.35 432.352 43.65C431.652 43.9167 431.035 43.8833 430.502 43.55C430.002 43.1833 429.485 42.55 428.952 41.65C426.985 38.0833 424.685 35.5667 422.052 34.1C419.418 32.6 416.735 31.85 414.002 31.85Z';
|
|
28
|
+
|
|
29
|
+
const VARIANT_CONFIG: Record<
|
|
30
|
+
KlexLogoTextVariant,
|
|
31
|
+
{ viewBox: string; path: string }
|
|
32
|
+
> = {
|
|
33
|
+
klex: { viewBox: '0 0 203 80', path: BASE_PATH },
|
|
34
|
+
'klex-cloud': {
|
|
35
|
+
viewBox: '0 0 482 80',
|
|
36
|
+
path: `${BASE_PATH}${CLOUD_SUFFIX}`,
|
|
37
|
+
},
|
|
38
|
+
'klex-docs': {
|
|
39
|
+
viewBox: '0 0 440 80',
|
|
40
|
+
path: `${BASE_PATH}${DOCS_SUFFIX}`,
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export const KlexLogoText: FC<KlexLogoTextProps> = ({
|
|
45
|
+
className,
|
|
46
|
+
pathClassName,
|
|
47
|
+
variant = 'klex',
|
|
48
|
+
...props
|
|
49
|
+
}) => {
|
|
50
|
+
const config = VARIANT_CONFIG[variant];
|
|
51
|
+
return (
|
|
52
|
+
<svg
|
|
53
|
+
viewBox={config.viewBox}
|
|
54
|
+
fill="none"
|
|
55
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
56
|
+
className={cn('h-auto w-auto', className)}
|
|
57
|
+
aria-hidden="true"
|
|
58
|
+
data-slot="klex-logo-text"
|
|
59
|
+
{...props}
|
|
60
|
+
>
|
|
61
|
+
<path
|
|
62
|
+
className={cn(
|
|
63
|
+
'fill-current text-base-950 dark:text-base-50',
|
|
64
|
+
pathClassName,
|
|
65
|
+
)}
|
|
66
|
+
d={config.path}
|
|
67
|
+
/>
|
|
68
|
+
</svg>
|
|
69
|
+
);
|
|
70
|
+
};
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import type { FC, HTMLAttributes } from 'react';
|
|
2
|
+
|
|
3
|
+
import { cn } from '../../lib/utils';
|
|
4
|
+
|
|
5
|
+
export type KlexLogoVariant = 'free-standing' | 'boxed-square' | 'boxed-round';
|
|
6
|
+
export type KlexLogoColorMode = 'primary' | 'monochrome';
|
|
7
|
+
|
|
8
|
+
export interface KlexLogoProps extends HTMLAttributes<HTMLDivElement> {
|
|
9
|
+
/** Visual style of the logo mark. Defaults to 'boxed-square'. */
|
|
10
|
+
variant?: KlexLogoVariant;
|
|
11
|
+
/** Color scheme. Defaults to 'primary'. */
|
|
12
|
+
colorMode?: KlexLogoColorMode;
|
|
13
|
+
/** Width of the logo in px (height is derived via aspect-square). Defaults to 32. */
|
|
14
|
+
size?: number;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface IconColors {
|
|
18
|
+
box?: string;
|
|
19
|
+
body: string;
|
|
20
|
+
eyes: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const colorMap: Record<
|
|
24
|
+
KlexLogoVariant,
|
|
25
|
+
Record<KlexLogoColorMode, IconColors>
|
|
26
|
+
> = {
|
|
27
|
+
'free-standing': {
|
|
28
|
+
primary: { body: 'fill-primary', eyes: 'fill-base-50' },
|
|
29
|
+
monochrome: {
|
|
30
|
+
body: 'fill-base-950 dark:fill-base-50',
|
|
31
|
+
eyes: 'fill-base-50 dark:fill-base-950',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
'boxed-square': {
|
|
35
|
+
primary: { box: 'bg-primary', body: 'fill-base-50', eyes: 'fill-primary' },
|
|
36
|
+
monochrome: {
|
|
37
|
+
box: 'bg-base-950 dark:bg-base-50',
|
|
38
|
+
body: 'fill-base-50 dark:fill-base-950',
|
|
39
|
+
eyes: 'fill-base-950 dark:fill-base-50',
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
'boxed-round': {
|
|
43
|
+
primary: { box: 'bg-primary', body: 'fill-base-50', eyes: 'fill-primary' },
|
|
44
|
+
monochrome: {
|
|
45
|
+
box: 'bg-base-950 dark:bg-base-50',
|
|
46
|
+
body: 'fill-base-50 dark:fill-base-950',
|
|
47
|
+
eyes: 'fill-base-950 dark:fill-base-50',
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const variantClass: Record<KlexLogoVariant, string> = {
|
|
53
|
+
'free-standing': '',
|
|
54
|
+
'boxed-square':
|
|
55
|
+
'rounded-[30%] [corner-shape:round] supports-[corner-shape:squircle]:rounded-[50%] supports-[corner-shape:squircle]:[corner-shape:squircle]',
|
|
56
|
+
'boxed-round': 'rounded-full',
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
const GHOST_PATH =
|
|
60
|
+
'M96.9692 39.5294C97.6935 19.2487 85.675 0 64.2162 0C38.2397 0 30.5897 17.281 28.075 36.1412C21.2985 86.9647 5.23535 89.5529 5.23535 92.9412C5.23535 94.6582 9.94124 101.176 26.4118 94.1176C33.2509 91.1866 38.8849 98.2481 44.0589 98.8235C49.5595 99.4353 52.7928 96.7746 58.1766 95.2941C64.3687 93.5913 70.0597 100 74.6472 100C90.4589 100 95.8398 71.153 96.9692 39.5294Z';
|
|
61
|
+
|
|
62
|
+
interface KlexLogoIconProps {
|
|
63
|
+
className?: string;
|
|
64
|
+
bodyClassName?: string;
|
|
65
|
+
eyesClassName?: string;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const KlexLogoIcon: FC<KlexLogoIconProps> = ({
|
|
69
|
+
className,
|
|
70
|
+
bodyClassName,
|
|
71
|
+
eyesClassName,
|
|
72
|
+
}) => (
|
|
73
|
+
<svg
|
|
74
|
+
viewBox="-2 -2 104 104"
|
|
75
|
+
fill="none"
|
|
76
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
77
|
+
className={cn('size-full aspect-square', className)}
|
|
78
|
+
aria-hidden="true"
|
|
79
|
+
data-slot="klex-logo-icon"
|
|
80
|
+
>
|
|
81
|
+
<path className={bodyClassName} d={GHOST_PATH} />
|
|
82
|
+
<ellipse
|
|
83
|
+
className={eyesClassName}
|
|
84
|
+
cx="64.0589"
|
|
85
|
+
cy="35.2942"
|
|
86
|
+
rx="4.70588"
|
|
87
|
+
ry="7.05883"
|
|
88
|
+
/>
|
|
89
|
+
<ellipse
|
|
90
|
+
className={eyesClassName}
|
|
91
|
+
cx="80.5294"
|
|
92
|
+
cy="35.2942"
|
|
93
|
+
rx="4.70588"
|
|
94
|
+
ry="7.05883"
|
|
95
|
+
/>
|
|
96
|
+
</svg>
|
|
97
|
+
);
|
|
98
|
+
|
|
99
|
+
export const KlexLogo: FC<KlexLogoProps> = ({
|
|
100
|
+
variant = 'boxed-square',
|
|
101
|
+
colorMode = 'primary',
|
|
102
|
+
size = 32,
|
|
103
|
+
className,
|
|
104
|
+
style,
|
|
105
|
+
...props
|
|
106
|
+
}) => {
|
|
107
|
+
const colors = colorMap[variant][colorMode];
|
|
108
|
+
const isBoxed = variant !== 'free-standing';
|
|
109
|
+
|
|
110
|
+
if (!isBoxed) {
|
|
111
|
+
return (
|
|
112
|
+
<div
|
|
113
|
+
className={cn('aspect-square shrink-0', className)}
|
|
114
|
+
style={{ width: size, ...style }}
|
|
115
|
+
role="img"
|
|
116
|
+
aria-label="Klex"
|
|
117
|
+
data-slot="klex-logo"
|
|
118
|
+
{...props}
|
|
119
|
+
>
|
|
120
|
+
<KlexLogoIcon bodyClassName={colors.body} eyesClassName={colors.eyes} />
|
|
121
|
+
</div>
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
return (
|
|
126
|
+
<div
|
|
127
|
+
className={cn(
|
|
128
|
+
'flex aspect-square shrink-0 items-center justify-center',
|
|
129
|
+
variantClass[variant],
|
|
130
|
+
colors.box,
|
|
131
|
+
className,
|
|
132
|
+
)}
|
|
133
|
+
style={{ width: size, ...style }}
|
|
134
|
+
role="img"
|
|
135
|
+
aria-label="Klex"
|
|
136
|
+
data-slot="klex-logo"
|
|
137
|
+
{...props}
|
|
138
|
+
>
|
|
139
|
+
<KlexLogoIcon
|
|
140
|
+
className="size-[50%]"
|
|
141
|
+
bodyClassName={colors.body}
|
|
142
|
+
eyesClassName={colors.eyes}
|
|
143
|
+
/>
|
|
144
|
+
</div>
|
|
145
|
+
);
|
|
146
|
+
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
2
|
|
|
3
|
-
import * as React from
|
|
3
|
+
import * as React from 'react';
|
|
4
4
|
|
|
5
|
-
import { cn } from
|
|
5
|
+
import { cn } from '../../lib/utils';
|
|
6
6
|
|
|
7
|
-
function Label({ className, ...props }: React.ComponentProps<
|
|
7
|
+
function Label({ className, ...props }: React.ComponentProps<'label'>) {
|
|
8
8
|
return (
|
|
9
9
|
<label
|
|
10
10
|
data-slot="label"
|
|
11
11
|
className={cn(
|
|
12
|
-
|
|
13
|
-
className
|
|
12
|
+
'flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',
|
|
13
|
+
className,
|
|
14
14
|
)}
|
|
15
15
|
{...props}
|
|
16
16
|
/>
|
|
17
|
-
)
|
|
17
|
+
);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
export { Label }
|
|
20
|
+
export { Label };
|
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import { mergeProps } from
|
|
3
|
-
import { useRender } from
|
|
4
|
-
import { cva, type VariantProps } from
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { mergeProps } from '@base-ui/react/merge-props';
|
|
3
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
4
|
+
import { cva, type VariantProps } from 'class-variance-authority';
|
|
5
5
|
|
|
6
|
-
import { cn } from
|
|
6
|
+
import { cn } from '../../lib/utils';
|
|
7
7
|
|
|
8
8
|
const markerVariants = cva(
|
|
9
9
|
"group/marker relative flex min-h-4 w-full items-center gap-2 text-left text-sm text-muted-foreground [&_svg:not([class*='size-'])]:size-4 [a]:underline [a]:underline-offset-3 [a]:hover:text-foreground",
|
|
10
10
|
{
|
|
11
11
|
variants: {
|
|
12
12
|
variant: {
|
|
13
|
-
default:
|
|
13
|
+
default: '',
|
|
14
14
|
separator:
|
|
15
|
-
|
|
16
|
-
border:
|
|
15
|
+
'before:mr-1 before:h-px before:min-w-0 before:flex-1 before:bg-border after:ml-1 after:h-px after:min-w-0 after:flex-1 after:bg-border',
|
|
16
|
+
border: 'border-b border-derived-subtle pb-2',
|
|
17
17
|
},
|
|
18
18
|
},
|
|
19
|
-
}
|
|
20
|
-
)
|
|
19
|
+
},
|
|
20
|
+
);
|
|
21
21
|
|
|
22
22
|
function Marker({
|
|
23
23
|
className,
|
|
24
|
-
variant =
|
|
24
|
+
variant = 'default',
|
|
25
25
|
render,
|
|
26
26
|
...props
|
|
27
|
-
}: useRender.ComponentProps<
|
|
27
|
+
}: useRender.ComponentProps<'div'> & VariantProps<typeof markerVariants>) {
|
|
28
28
|
return useRender({
|
|
29
|
-
defaultTagName:
|
|
30
|
-
props: mergeProps<
|
|
29
|
+
defaultTagName: 'div',
|
|
30
|
+
props: mergeProps<'div'>(
|
|
31
31
|
{
|
|
32
32
|
className: cn(markerVariants({ variant, className })),
|
|
33
33
|
},
|
|
34
|
-
props
|
|
34
|
+
props,
|
|
35
35
|
),
|
|
36
36
|
render,
|
|
37
37
|
state: {
|
|
38
|
-
slot:
|
|
38
|
+
slot: 'marker',
|
|
39
39
|
variant,
|
|
40
40
|
},
|
|
41
|
-
})
|
|
41
|
+
});
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
function MarkerIcon({ className, ...props }: React.ComponentProps<
|
|
44
|
+
function MarkerIcon({ className, ...props }: React.ComponentProps<'span'>) {
|
|
45
45
|
return (
|
|
46
46
|
<span
|
|
47
47
|
data-slot="marker-icon"
|
|
48
48
|
aria-hidden="true"
|
|
49
49
|
className={cn(
|
|
50
50
|
"size-4 shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
51
|
-
className
|
|
51
|
+
className,
|
|
52
52
|
)}
|
|
53
53
|
{...props}
|
|
54
54
|
/>
|
|
55
|
-
)
|
|
55
|
+
);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
function MarkerContent({ className, ...props }: React.ComponentProps<
|
|
58
|
+
function MarkerContent({ className, ...props }: React.ComponentProps<'span'>) {
|
|
59
59
|
return (
|
|
60
60
|
<span
|
|
61
61
|
data-slot="marker-content"
|
|
62
62
|
className={cn(
|
|
63
|
-
|
|
64
|
-
className
|
|
63
|
+
'min-w-0 wrap-break-word group-data-[variant=separator]/marker:flex-none group-data-[variant=separator]/marker:text-center *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground',
|
|
64
|
+
className,
|
|
65
65
|
)}
|
|
66
66
|
{...props}
|
|
67
67
|
/>
|
|
68
|
-
)
|
|
68
|
+
);
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
export { Marker, MarkerIcon, MarkerContent, markerVariants }
|
|
71
|
+
export { Marker, MarkerIcon, MarkerContent, markerVariants };
|