@fldr/ui 0.3.8 → 0.3.10
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 +67 -448
- package/ai/component-registry.json +27 -14
- package/ai/component-registry.md +3 -3
- package/dist/.build-complete +1 -1
- package/dist/blocks-source/auth-card/auth-card.test.tsx +20 -14
- package/dist/blocks-source/auth-card/auth-card.tsx +73 -55
- package/dist/blocks-source/file-table/file-table.tsx +197 -150
- package/dist/blocks-source/login-page/login-page.tsx +3 -1
- package/dist/blocks-source/share-dialog/share-dialog.test.tsx +9 -3
- package/dist/blocks-source/share-dialog/share-dialog.tsx +50 -35
- package/dist/blocks.d.ts +24 -5
- package/dist/blocks.js +250 -197
- package/dist/brands.d.ts +143 -0
- package/dist/brands.js +92 -0
- package/dist/{button-DzavLWXm.d.ts → button-CS82eT0x.d.ts} +1 -1
- package/dist/chunks/{checkbox-eifiwbw34xwsikvf.js → checkbox-d5epe4dl78bzy4f8.js} +8 -8
- package/dist/chunks/{dropdown-e5zk0ez21busnt0b.js → dropdown-oec4g1w9kbsjsg15.js} +1 -1
- package/dist/chunks/highlighter-kb7huz24pcziin6d.js +57 -0
- package/dist/chunks/{layer-dialog-m8qb0wzfg3k7406a.js → layer-dialog-ioa3r4ayemppsspx.js} +4 -3
- package/dist/chunks/{table-ngl1b5yc8mcur662.js → table-bdye068ekayq3u1n.js} +1 -1
- package/dist/chunks/table-n5yarooiknhc18ln.js +448 -0
- package/dist/chunks/{table-of-contents-gkjv9ck8etbz64ej.js → table-of-contents-d3pmkrk223umdz9h.js} +1 -1
- package/dist/code/server.js +1 -1
- package/dist/code.js +4 -131
- package/dist/components/banner.d.ts +1 -1
- package/dist/components/button.d.ts +2 -2
- package/dist/components/checkbox.d.ts +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/dropdown.js +1 -1
- package/dist/components/input-group.d.ts +2 -1
- package/dist/components/input.d.ts +2 -2
- package/dist/components/layer-dialog.js +1 -1
- package/dist/components/link.d.ts +2 -67
- package/dist/components/sidebar.d.ts +2 -1
- package/dist/components/table-of-contents.js +1 -1
- package/dist/components/table.d.ts +1 -1
- package/dist/components/table.js +1 -1
- package/dist/components/toast.d.ts +1 -1
- package/dist/components/toolbar.d.ts +1 -1
- package/dist/form.d.ts +207 -0
- package/dist/form.js +317 -0
- package/dist/hotkeys.d.ts +135 -0
- package/dist/hotkeys.js +203 -0
- package/dist/index-9LwQy84o.d.ts +1 -0
- package/dist/index-B7iG0qDU.d.ts +1 -0
- package/dist/{index-B6JNUfG9.d.ts → index-BMXHK-3k.d.ts} +2 -2
- package/dist/{index-B6Wo_iiN.d.ts → index-B_ug9XY7.d.ts} +1 -1
- package/dist/{index-RP_rt8vB.d.ts → index-Bh9kuAvN.d.ts} +1 -1
- package/dist/{index-DjSGDESy.d.ts → index-CAUjUp2G.d.ts} +1 -1
- package/dist/{index-NnHba-T1.d.ts → index-DK28YxxP.d.ts} +2 -2
- package/dist/{index-aahL-0Zw.d.ts → index-DOVlARA6.d.ts} +2 -2
- package/dist/index-DTj6M6kA.d.ts +1 -0
- package/dist/index.d.ts +14 -12
- package/dist/index.js +5 -6
- package/dist/{input-group-8gEtPiKw.d.ts → input-group-Swzit45o.d.ts} +1 -1
- package/dist/link-CoVXE5W2.d.ts +68 -0
- package/dist/query.d.ts +156 -0
- package/dist/query.js +204 -0
- package/dist/router.d.ts +95 -0
- package/dist/router.js +146 -0
- package/dist/skeleton.d.ts +3 -0
- package/dist/skeleton.js +4 -0
- package/dist/styles/kumo-binding.css +36 -0
- package/dist/styles/kumo-standalone.css +1 -1
- package/dist/styles/theme-fldr.css +18 -18
- package/dist/table.d.ts +245 -0
- package/dist/table.js +3 -0
- package/dist/theming.d.ts +4 -4
- package/dist/theming.js +2 -2
- package/package.json +46 -1
- package/dist/chunks/highlighter-mouttug0tu8xg1i8.js +0 -1364
- package/dist/index-DL1-uSuH.d.ts +0 -1
- /package/dist/{index-BkTAB4wj.d.ts → sidebar-BkTAB4wj.d.ts} +0 -0
package/dist/brands.d.ts
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { ComponentType, SVGProps } from "react";
|
|
2
|
+
export * from "@ridemountainpig/svgl-react";
|
|
3
|
+
//#region src/brands/index.d.ts
|
|
4
|
+
export type BrandLogoProps = SVGProps<SVGSVGElement>;
|
|
5
|
+
/**
|
|
6
|
+
* Pairs svgl's light and dark variants into one logo. Both render; CSS in the
|
|
7
|
+
* fldr stylesheet shows the one matching the nearest `data-mode` (or the
|
|
8
|
+
* system scheme when no mode is set).
|
|
9
|
+
*/
|
|
10
|
+
export declare function themedLogo(light: ComponentType<BrandLogoProps>, dark: ComponentType<BrandLogoProps>, displayName: string): {
|
|
11
|
+
({ className, width, height, ...props }: BrandLogoProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
14
|
+
/** Gives an svgl logo icon-like 1em defaults instead of 100%. */
|
|
15
|
+
export declare function sizedLogo(Logo: ComponentType<BrandLogoProps>, displayName: string): {
|
|
16
|
+
({ width, height, ...props }: BrandLogoProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
displayName: string;
|
|
18
|
+
};
|
|
19
|
+
export declare const Google: {
|
|
20
|
+
({ width, height, ...props }: BrandLogoProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
displayName: string;
|
|
22
|
+
};
|
|
23
|
+
export declare const Microsoft: {
|
|
24
|
+
({ width, height, ...props }: BrandLogoProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
displayName: string;
|
|
26
|
+
};
|
|
27
|
+
export declare const Windows: {
|
|
28
|
+
({ width, height, ...props }: BrandLogoProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
displayName: string;
|
|
30
|
+
};
|
|
31
|
+
export declare const Slack: {
|
|
32
|
+
({ width, height, ...props }: BrandLogoProps): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
displayName: string;
|
|
34
|
+
};
|
|
35
|
+
export declare const Notion: {
|
|
36
|
+
({ width, height, ...props }: BrandLogoProps): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
displayName: string;
|
|
38
|
+
};
|
|
39
|
+
export declare const Dropbox: {
|
|
40
|
+
({ width, height, ...props }: BrandLogoProps): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
displayName: string;
|
|
42
|
+
};
|
|
43
|
+
export declare const LinkedIn: {
|
|
44
|
+
({ width, height, ...props }: BrandLogoProps): import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
displayName: string;
|
|
46
|
+
};
|
|
47
|
+
export declare const Figma: {
|
|
48
|
+
({ width, height, ...props }: BrandLogoProps): import("react/jsx-runtime").JSX.Element;
|
|
49
|
+
displayName: string;
|
|
50
|
+
};
|
|
51
|
+
export declare const Linear: {
|
|
52
|
+
({ width, height, ...props }: BrandLogoProps): import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
displayName: string;
|
|
54
|
+
};
|
|
55
|
+
export declare const Stripe: {
|
|
56
|
+
({ width, height, ...props }: BrandLogoProps): import("react/jsx-runtime").JSX.Element;
|
|
57
|
+
displayName: string;
|
|
58
|
+
};
|
|
59
|
+
export declare const Zoom: {
|
|
60
|
+
({ width, height, ...props }: BrandLogoProps): import("react/jsx-runtime").JSX.Element;
|
|
61
|
+
displayName: string;
|
|
62
|
+
};
|
|
63
|
+
export declare const Discord: {
|
|
64
|
+
({ width, height, ...props }: BrandLogoProps): import("react/jsx-runtime").JSX.Element;
|
|
65
|
+
displayName: string;
|
|
66
|
+
};
|
|
67
|
+
export declare const Gmail: {
|
|
68
|
+
({ width, height, ...props }: BrandLogoProps): import("react/jsx-runtime").JSX.Element;
|
|
69
|
+
displayName: string;
|
|
70
|
+
};
|
|
71
|
+
export declare const GoogleDrive: {
|
|
72
|
+
({ width, height, ...props }: BrandLogoProps): import("react/jsx-runtime").JSX.Element;
|
|
73
|
+
displayName: string;
|
|
74
|
+
};
|
|
75
|
+
export declare const MicrosoftOutlook: {
|
|
76
|
+
({ width, height, ...props }: BrandLogoProps): import("react/jsx-runtime").JSX.Element;
|
|
77
|
+
displayName: string;
|
|
78
|
+
};
|
|
79
|
+
export declare const MicrosoftTeams: {
|
|
80
|
+
({ width, height, ...props }: BrandLogoProps): import("react/jsx-runtime").JSX.Element;
|
|
81
|
+
displayName: string;
|
|
82
|
+
};
|
|
83
|
+
export declare const MicrosoftOneDrive: {
|
|
84
|
+
({ width, height, ...props }: BrandLogoProps): import("react/jsx-runtime").JSX.Element;
|
|
85
|
+
displayName: string;
|
|
86
|
+
};
|
|
87
|
+
export declare const YouTube: {
|
|
88
|
+
({ width, height, ...props }: BrandLogoProps): import("react/jsx-runtime").JSX.Element;
|
|
89
|
+
displayName: string;
|
|
90
|
+
};
|
|
91
|
+
export declare const Facebook: {
|
|
92
|
+
({ width, height, ...props }: BrandLogoProps): import("react/jsx-runtime").JSX.Element;
|
|
93
|
+
displayName: string;
|
|
94
|
+
};
|
|
95
|
+
export declare const Instagram: {
|
|
96
|
+
({ width, height, ...props }: BrandLogoProps): import("react/jsx-runtime").JSX.Element;
|
|
97
|
+
displayName: string;
|
|
98
|
+
};
|
|
99
|
+
export declare const WhatsApp: {
|
|
100
|
+
({ width, height, ...props }: BrandLogoProps): import("react/jsx-runtime").JSX.Element;
|
|
101
|
+
displayName: string;
|
|
102
|
+
};
|
|
103
|
+
export declare const Shopify: {
|
|
104
|
+
({ width, height, ...props }: BrandLogoProps): import("react/jsx-runtime").JSX.Element;
|
|
105
|
+
displayName: string;
|
|
106
|
+
};
|
|
107
|
+
export declare const Salesforce: {
|
|
108
|
+
({ width, height, ...props }: BrandLogoProps): import("react/jsx-runtime").JSX.Element;
|
|
109
|
+
displayName: string;
|
|
110
|
+
};
|
|
111
|
+
export declare const Apple: {
|
|
112
|
+
({ className, width, height, ...props }: BrandLogoProps): import("react/jsx-runtime").JSX.Element;
|
|
113
|
+
displayName: string;
|
|
114
|
+
};
|
|
115
|
+
export declare const GitHub: {
|
|
116
|
+
({ className, width, height, ...props }: BrandLogoProps): import("react/jsx-runtime").JSX.Element;
|
|
117
|
+
displayName: string;
|
|
118
|
+
};
|
|
119
|
+
export declare const X: {
|
|
120
|
+
({ className, width, height, ...props }: BrandLogoProps): import("react/jsx-runtime").JSX.Element;
|
|
121
|
+
displayName: string;
|
|
122
|
+
};
|
|
123
|
+
export declare const Vercel: {
|
|
124
|
+
({ className, width, height, ...props }: BrandLogoProps): import("react/jsx-runtime").JSX.Element;
|
|
125
|
+
displayName: string;
|
|
126
|
+
};
|
|
127
|
+
export declare const OpenAI: {
|
|
128
|
+
({ className, width, height, ...props }: BrandLogoProps): import("react/jsx-runtime").JSX.Element;
|
|
129
|
+
displayName: string;
|
|
130
|
+
};
|
|
131
|
+
export declare const Anthropic: {
|
|
132
|
+
({ className, width, height, ...props }: BrandLogoProps): import("react/jsx-runtime").JSX.Element;
|
|
133
|
+
displayName: string;
|
|
134
|
+
};
|
|
135
|
+
export declare const AmazonWebServices: {
|
|
136
|
+
({ className, width, height, ...props }: BrandLogoProps): import("react/jsx-runtime").JSX.Element;
|
|
137
|
+
displayName: string;
|
|
138
|
+
};
|
|
139
|
+
export declare const Threads: {
|
|
140
|
+
({ className, width, height, ...props }: BrandLogoProps): import("react/jsx-runtime").JSX.Element;
|
|
141
|
+
displayName: string;
|
|
142
|
+
};
|
|
143
|
+
//#endregion
|
package/dist/brands.js
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as cn } from "./chunks/vendor-styling-gs32v7xt5znc8kg0.js";
|
|
3
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import * as svgl from "@ridemountainpig/svgl-react";
|
|
5
|
+
export * from "@ridemountainpig/svgl-react";
|
|
6
|
+
//#region src/brands/index.tsx
|
|
7
|
+
/**
|
|
8
|
+
* Official company logos from svgl (https://svgl.app), full colour.
|
|
9
|
+
*
|
|
10
|
+
* Use these instead of Phosphor's redrawn `*LogoIcon` marks (lint rule
|
|
11
|
+
* `kumo/no-phosphor-brand-logos`). The common brands below default to 1em, so
|
|
12
|
+
* they size like icons; logos with light and dark variants (Apple, GitHub, X…)
|
|
13
|
+
* follow `data-mode`. Every other svgl logo is re-exported as-is and fills its
|
|
14
|
+
* container unless you pass `width`/`height`.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* import { Apple, GitHub, Google, Microsoft } from "@fldr/ui/brands";
|
|
19
|
+
*
|
|
20
|
+
* <Button icon={<Google />}>Continue with Google</Button>
|
|
21
|
+
* <GitHub width={20} height={20} />
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* Pairs svgl's light and dark variants into one logo. Both render; CSS in the
|
|
26
|
+
* fldr stylesheet shows the one matching the nearest `data-mode` (or the
|
|
27
|
+
* system scheme when no mode is set).
|
|
28
|
+
*/
|
|
29
|
+
function themedLogo(light, dark, displayName) {
|
|
30
|
+
const Light = light;
|
|
31
|
+
const Dark = dark;
|
|
32
|
+
function ThemedLogo({ className, width = "1em", height = "1em", ...props }) {
|
|
33
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Light, {
|
|
34
|
+
...props,
|
|
35
|
+
width,
|
|
36
|
+
height,
|
|
37
|
+
className: cn("fldr-brand-light", className)
|
|
38
|
+
}), /* @__PURE__ */ jsx(Dark, {
|
|
39
|
+
...props,
|
|
40
|
+
width,
|
|
41
|
+
height,
|
|
42
|
+
className: cn("fldr-brand-dark", className)
|
|
43
|
+
})] });
|
|
44
|
+
}
|
|
45
|
+
ThemedLogo.displayName = displayName;
|
|
46
|
+
return ThemedLogo;
|
|
47
|
+
}
|
|
48
|
+
/** Gives an svgl logo icon-like 1em defaults instead of 100%. */
|
|
49
|
+
function sizedLogo(Logo, displayName) {
|
|
50
|
+
function SizedLogo({ width = "1em", height = "1em", ...props }) {
|
|
51
|
+
return /* @__PURE__ */ jsx(Logo, {
|
|
52
|
+
width,
|
|
53
|
+
height,
|
|
54
|
+
...props
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
SizedLogo.displayName = displayName;
|
|
58
|
+
return SizedLogo;
|
|
59
|
+
}
|
|
60
|
+
const Google = sizedLogo(svgl.Google, "Google");
|
|
61
|
+
const Microsoft = sizedLogo(svgl.Microsoft, "Microsoft");
|
|
62
|
+
const Windows = sizedLogo(svgl.Windows, "Windows");
|
|
63
|
+
const Slack = sizedLogo(svgl.Slack, "Slack");
|
|
64
|
+
const Notion = sizedLogo(svgl.Notion, "Notion");
|
|
65
|
+
const Dropbox = sizedLogo(svgl.Dropbox, "Dropbox");
|
|
66
|
+
const LinkedIn = sizedLogo(svgl.LinkedIn, "LinkedIn");
|
|
67
|
+
const Figma = sizedLogo(svgl.Figma, "Figma");
|
|
68
|
+
const Linear = sizedLogo(svgl.Linear, "Linear");
|
|
69
|
+
const Stripe = sizedLogo(svgl.Stripe, "Stripe");
|
|
70
|
+
const Zoom = sizedLogo(svgl.Zoom, "Zoom");
|
|
71
|
+
const Discord = sizedLogo(svgl.Discord, "Discord");
|
|
72
|
+
const Gmail = sizedLogo(svgl.Gmail, "Gmail");
|
|
73
|
+
const GoogleDrive = sizedLogo(svgl.GoogleDrive, "GoogleDrive");
|
|
74
|
+
const MicrosoftOutlook = sizedLogo(svgl.MicrosoftOutlook, "MicrosoftOutlook");
|
|
75
|
+
const MicrosoftTeams = sizedLogo(svgl.MicrosoftTeams, "MicrosoftTeams");
|
|
76
|
+
const MicrosoftOneDrive = sizedLogo(svgl.MicrosoftOneDrive, "MicrosoftOneDrive");
|
|
77
|
+
const YouTube = sizedLogo(svgl.YouTube, "YouTube");
|
|
78
|
+
const Facebook = sizedLogo(svgl.Facebook, "Facebook");
|
|
79
|
+
const Instagram = sizedLogo(svgl.Instagram, "Instagram");
|
|
80
|
+
const WhatsApp = sizedLogo(svgl.WhatsApp, "WhatsApp");
|
|
81
|
+
const Shopify = sizedLogo(svgl.Shopify, "Shopify");
|
|
82
|
+
const Salesforce = sizedLogo(svgl.Salesforce, "Salesforce");
|
|
83
|
+
const Apple = themedLogo(svgl.AppleLight, svgl.AppleDark, "Apple");
|
|
84
|
+
const GitHub = themedLogo(svgl.GitHubLight, svgl.GitHubDark, "GitHub");
|
|
85
|
+
const X = themedLogo(svgl.XLight, svgl.XDark, "X");
|
|
86
|
+
const Vercel = themedLogo(svgl.VercelLight, svgl.VercelDark, "Vercel");
|
|
87
|
+
const OpenAI = themedLogo(svgl.OpenAILight, svgl.OpenAIDark, "OpenAI");
|
|
88
|
+
const Anthropic = themedLogo(svgl.AnthropicLight, svgl.AnthropicDark, "Anthropic");
|
|
89
|
+
const AmazonWebServices = themedLogo(svgl.AmazonWebServicesLight, svgl.AmazonWebServicesDark, "AmazonWebServices");
|
|
90
|
+
const Threads = themedLogo(svgl.ThreadsLight, svgl.ThreadsDark, "Threads");
|
|
91
|
+
//#endregion
|
|
92
|
+
export { AmazonWebServices, Anthropic, Apple, Discord, Dropbox, Facebook, Figma, GitHub, Gmail, Google, GoogleDrive, Instagram, Linear, LinkedIn, Microsoft, MicrosoftOneDrive, MicrosoftOutlook, MicrosoftTeams, Notion, OpenAI, Salesforce, Shopify, Slack, Stripe, Threads, Vercel, WhatsApp, Windows, X, YouTube, Zoom, sizedLogo, themedLogo };
|
|
@@ -224,4 +224,4 @@ declare const LinkButton: React.ForwardRefExoticComponent<React.AnchorHTMLAttrib
|
|
|
224
224
|
linksExternal?: boolean;
|
|
225
225
|
} & React.RefAttributes<HTMLAnchorElement>>;
|
|
226
226
|
//#endregion
|
|
227
|
-
export {
|
|
227
|
+
export { LinkButton as a, buttonVariants as c, KumoButtonVariantsProps as i, ButtonProps as n, LinkButtonProps as o, KumoButtonVariant as r, RefreshButton as s, Button as t };
|
|
@@ -13,7 +13,7 @@ import { CheckIcon, MinusIcon } from "@phosphor-icons/react";
|
|
|
13
13
|
const KUMO_CHECKBOX_VARIANTS = {
|
|
14
14
|
variant: {
|
|
15
15
|
default: {
|
|
16
|
-
classes: "[&:focus-within>span]:ring-kumo-focus [&:hover>span]:ring-kumo-
|
|
16
|
+
classes: "[&:focus-within>span]:ring-kumo-focus [&:hover>span]:ring-kumo-interact",
|
|
17
17
|
description: "Default checkbox appearance"
|
|
18
18
|
},
|
|
19
19
|
error: {
|
|
@@ -56,7 +56,7 @@ const CheckboxBase = forwardRef(({ className, checked, indeterminate, disabled,
|
|
|
56
56
|
indeterminate,
|
|
57
57
|
disabled,
|
|
58
58
|
onCheckedChange,
|
|
59
|
-
className: cn("relative flex
|
|
59
|
+
className: cn("relative flex size-3.5 shrink-0 items-center justify-center rounded-sm border-0 bg-kumo-base ring after:absolute after:-inset-x-3 after:-inset-y-2 focus:outline-hidden", label && "mt-0.75", variant === "error" ? "ring-kumo-danger" : "ring-kumo-interact", !disabled && "hover:ring-kumo-interact focus:ring-2 focus:ring-kumo-focus focus-visible:ring-2 focus-visible:ring-kumo-brand", "data-[checked]:bg-kumo-contrast data-[checked]:ring-kumo-contrast data-[indeterminate]:bg-kumo-contrast data-[indeterminate]:ring-kumo-contrast", disabled && "cursor-not-allowed opacity-50", className),
|
|
60
60
|
...props,
|
|
61
61
|
children: /* @__PURE__ */ jsx(CheckboxIndicator, {
|
|
62
62
|
keepMounted: true,
|
|
@@ -65,10 +65,10 @@ const CheckboxBase = forwardRef(({ className, checked, indeterminate, disabled,
|
|
|
65
65
|
...renderProps,
|
|
66
66
|
children: state.indeterminate ? /* @__PURE__ */ jsx(MinusIcon, {
|
|
67
67
|
weight: "bold",
|
|
68
|
-
size:
|
|
68
|
+
size: 10
|
|
69
69
|
}) : /* @__PURE__ */ jsx(CheckIcon, {
|
|
70
70
|
weight: "bold",
|
|
71
|
-
size:
|
|
71
|
+
size: 10
|
|
72
72
|
})
|
|
73
73
|
})
|
|
74
74
|
})
|
|
@@ -100,10 +100,10 @@ const CheckboxItem = forwardRef(({ className, checked, indeterminate, disabled,
|
|
|
100
100
|
...renderProps,
|
|
101
101
|
children: state.indeterminate ? /* @__PURE__ */ jsx(MinusIcon, {
|
|
102
102
|
weight: "bold",
|
|
103
|
-
size:
|
|
103
|
+
size: 10
|
|
104
104
|
}) : /* @__PURE__ */ jsx(CheckIcon, {
|
|
105
105
|
weight: "bold",
|
|
106
|
-
size:
|
|
106
|
+
size: 10
|
|
107
107
|
})
|
|
108
108
|
})
|
|
109
109
|
});
|
|
@@ -130,7 +130,7 @@ const CheckboxItem = forwardRef(({ className, checked, indeterminate, disabled,
|
|
|
130
130
|
indeterminate,
|
|
131
131
|
disabled,
|
|
132
132
|
onCheckedChange,
|
|
133
|
-
className: cn("relative mt-0.
|
|
133
|
+
className: cn("relative mt-0.75 flex size-3.5 shrink-0 items-center justify-center rounded-sm border-0 bg-kumo-base ring focus:ring-kumo-focus focus:outline-hidden focus-visible:ring-2 focus-visible:ring-kumo-brand", variant === "error" ? "ring-kumo-danger" : "ring-kumo-interact", !disabled && variant !== "error" && "group-hover:ring-kumo-interact", "data-[checked]:bg-kumo-contrast data-[checked]:ring-kumo-contrast data-[indeterminate]:bg-kumo-contrast data-[indeterminate]:ring-kumo-contrast"),
|
|
134
134
|
children: indicator
|
|
135
135
|
})]
|
|
136
136
|
});
|
|
@@ -148,7 +148,7 @@ const CheckboxItem = forwardRef(({ className, checked, indeterminate, disabled,
|
|
|
148
148
|
indeterminate,
|
|
149
149
|
disabled,
|
|
150
150
|
onCheckedChange,
|
|
151
|
-
className: cn("peer relative mt-0.
|
|
151
|
+
className: cn("peer relative mt-0.75 flex size-3.5 shrink-0 items-center justify-center rounded-sm border-0 bg-kumo-base ring after:absolute after:-inset-x-3 after:-inset-y-2", variant === "error" ? "ring-kumo-danger" : "ring-kumo-interact", !disabled && "group-hover:ring-kumo-interact hover:ring-kumo-interact focus:ring-2 focus:ring-kumo-focus focus-visible:ring-2 focus-visible:ring-kumo-brand", "data-[checked]:bg-kumo-contrast data-[checked]:ring-kumo-contrast data-[indeterminate]:bg-kumo-contrast data-[indeterminate]:ring-kumo-contrast"),
|
|
152
152
|
children: indicator
|
|
153
153
|
}), /* @__PURE__ */ jsx("span", {
|
|
154
154
|
className: "text-base text-kumo-default",
|
|
@@ -287,7 +287,7 @@ const DropdownMenuSeparator = React$1.forwardRef(({ className, ...props }, ref)
|
|
|
287
287
|
DropdownMenuSeparator.displayName = Separator.displayName;
|
|
288
288
|
const DropdownMenuShortcut = ({ className, ...props }) => {
|
|
289
289
|
return /* @__PURE__ */ jsx("span", {
|
|
290
|
-
className: cn("ml-auto text-xs
|
|
290
|
+
className: cn("ml-auto text-xs text-kumo-subtle", className),
|
|
291
291
|
...props
|
|
292
292
|
});
|
|
293
293
|
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { createHighlighter } from "@tanstack/highlight/core";
|
|
3
|
+
import { css } from "@tanstack/highlight/languages/css";
|
|
4
|
+
import { diff } from "@tanstack/highlight/languages/diff";
|
|
5
|
+
import { graphql } from "@tanstack/highlight/languages/graphql";
|
|
6
|
+
import { html } from "@tanstack/highlight/languages/html";
|
|
7
|
+
import { js } from "@tanstack/highlight/languages/js";
|
|
8
|
+
import { json } from "@tanstack/highlight/languages/json";
|
|
9
|
+
import { jsx } from "@tanstack/highlight/languages/jsx";
|
|
10
|
+
import { markdown } from "@tanstack/highlight/languages/markdown";
|
|
11
|
+
import { python } from "@tanstack/highlight/languages/python";
|
|
12
|
+
import { shell } from "@tanstack/highlight/languages/shell";
|
|
13
|
+
import { sql } from "@tanstack/highlight/languages/sql";
|
|
14
|
+
import { toml } from "@tanstack/highlight/languages/toml";
|
|
15
|
+
import { ts } from "@tanstack/highlight/languages/ts";
|
|
16
|
+
import { tsx } from "@tanstack/highlight/languages/tsx";
|
|
17
|
+
import { yaml } from "@tanstack/highlight/languages/yaml";
|
|
18
|
+
//#region src/code/highlighter.ts
|
|
19
|
+
/**
|
|
20
|
+
* Kumo's shared highlighter. TanStack Highlight is synchronous, so there is
|
|
21
|
+
* no provider or loading state: grammars are plain imports, created once.
|
|
22
|
+
* Unknown languages render as escaped plain text.
|
|
23
|
+
*/
|
|
24
|
+
const highlighter = createHighlighter({ languages: [
|
|
25
|
+
css,
|
|
26
|
+
diff,
|
|
27
|
+
graphql,
|
|
28
|
+
html,
|
|
29
|
+
js,
|
|
30
|
+
json,
|
|
31
|
+
jsx,
|
|
32
|
+
markdown,
|
|
33
|
+
python,
|
|
34
|
+
shell,
|
|
35
|
+
sql,
|
|
36
|
+
toml,
|
|
37
|
+
ts,
|
|
38
|
+
tsx,
|
|
39
|
+
yaml
|
|
40
|
+
] });
|
|
41
|
+
/** Highlight code to an HTML string (`<pre class="th-code">…</pre>`). Safe to call during SSR. */
|
|
42
|
+
function highlightCode(code, lang, options = {}) {
|
|
43
|
+
return highlighter.highlightToHtml(code, {
|
|
44
|
+
lang,
|
|
45
|
+
lineNumbers: options.lineNumbers,
|
|
46
|
+
decorations: options.highlightLines?.map((line) => ({
|
|
47
|
+
lines: line,
|
|
48
|
+
className: "line-highlighted"
|
|
49
|
+
}))
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
/** Resolve a language name or alias (`ts`, `bash`, `yml`) to the highlighter's canonical name. */
|
|
53
|
+
function normalizeLanguage(lang) {
|
|
54
|
+
return highlighter.normalizeLanguage(lang);
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
export { normalizeLanguage as n, highlightCode as t };
|
|
@@ -7,7 +7,7 @@ import { t as Button } from "./button-hzvowfkbathmx8yg.js";
|
|
|
7
7
|
import { n as useKumoLocale } from "./locale-provider-j4ii538ntyok36r6.js";
|
|
8
8
|
import { t as Text } from "./text-nqum95flcp07ac9s.js";
|
|
9
9
|
import { t as LayerCard } from "./layer-card-lsmeuqic9i1isv2b.js";
|
|
10
|
-
import { t as DropdownMenu } from "./dropdown-
|
|
10
|
+
import { t as DropdownMenu } from "./dropdown-oec4g1w9kbsjsg15.js";
|
|
11
11
|
import { i as ScrollAreaViewport, n as ScrollAreaContent, r as ScrollAreaScrollbar, s as ScrollAreaRoot, t as ScrollAreaThumb } from "./ScrollAreaThumb-hxig41yn4lrurd3o.js";
|
|
12
12
|
import { t as ButtonGroup } from "./button-group-biv43ksvaipc3p5n.js";
|
|
13
13
|
import { a as DrawerRoot, g as DrawerBackdrop, h as DrawerClose, i as DrawerTitle, m as DrawerContent, o as DrawerPortal, p as DrawerDescription, r as DrawerTrigger, s as DrawerPopup, t as DrawerViewport } from "./DrawerViewport-mzqpwvqtylnad8ib.js";
|
|
@@ -203,7 +203,8 @@ function LayerDialogContent({ children, closeLabel, container: containerProp, si
|
|
|
203
203
|
render: isAlert ? /* @__PURE__ */ jsx("div", { role: "alertdialog" }) : /* @__PURE__ */ jsx("div", {}),
|
|
204
204
|
className: cn("fixed inset-x-0 bottom-0 flex max-h-[85dvh] min-h-0 w-full max-w-none [transform:translate3d(0,var(--drawer-swipe-movement-y,0px),0)] transform-gpu overflow-visible transition-[transform,opacity] duration-[450ms] ease-[cubic-bezier(0.32,0.72,0,1)] will-change-transform outline-none data-[ending-style]:[transform:translate3d(0,100%,0)] data-[ending-style]:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-[starting-style]:[transform:translate3d(0,100%,0)] data-[swiping]:duration-0 data-[swiping]:select-none motion-reduce:transition-none sm:static sm:max-h-full sm:[transform:translate3d(0,0,0)] sm:duration-200 sm:data-[ending-style]:[transform:translate3d(0,8px,0)] sm:data-[ending-style]:opacity-0 sm:data-[ending-style]:duration-200 sm:data-[starting-style]:[transform:translate3d(0,8px,0)] sm:data-[starting-style]:opacity-0", sizeConfig.classes),
|
|
205
205
|
children: /* @__PURE__ */ jsxs(LayerCard, {
|
|
206
|
-
|
|
206
|
+
"data-chinless": actions.element ? void 0 : "",
|
|
207
|
+
className: cn("group/layer-dialog flex max-h-[85dvh] min-h-0 w-full flex-col overflow-hidden rounded-none bg-kumo-elevated p-1.5 shadow-[0_20px_25px_-5px_rgb(0_0_0/0.03),0_8px_10px_-6px_rgb(0_0_0/0.03)] max-sm:border-t max-sm:border-kumo-hairline max-sm:shadow-xs max-sm:ring-0 sm:max-h-full sm:rounded-xl", !actions.element && "bg-kumo-base p-0"),
|
|
207
208
|
children: [!isDesktop && !isAlert && /* @__PURE__ */ jsx("div", {
|
|
208
209
|
"aria-hidden": true,
|
|
209
210
|
className: "flex justify-center pt-1.5 pb-3",
|
|
@@ -272,7 +273,7 @@ function LayerDialogBody({ children }) {
|
|
|
272
273
|
children
|
|
273
274
|
});
|
|
274
275
|
return /* @__PURE__ */ jsxs(LayerCard.Primary, {
|
|
275
|
-
className: "min-h-0 flex-1 gap-0 p-0",
|
|
276
|
+
className: "min-h-0 flex-1 gap-0 p-0 group-data-[chinless]/layer-dialog:rounded-none group-data-[chinless]/layer-dialog:shadow-none group-data-[chinless]/layer-dialog:ring-0",
|
|
276
277
|
children: [
|
|
277
278
|
/* @__PURE__ */ jsxs("div", {
|
|
278
279
|
className: "z-10 flex shrink-0 items-start justify-between gap-4 rounded-t-lg bg-kumo-base px-4 py-4 sm:px-4.5",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as cn } from "./vendor-styling-gs32v7xt5znc8kg0.js";
|
|
3
3
|
import { t as resolveVariant } from "./resolve-variant-l6x5ksfrjtu4m66l.js";
|
|
4
|
-
import { t as Checkbox } from "./checkbox-
|
|
4
|
+
import { t as Checkbox } from "./checkbox-d5epe4dl78bzy4f8.js";
|
|
5
5
|
import { forwardRef } from "react";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
//#region src/components/table/table.tsx
|