@cloudflare/kumo 2.16.0 → 2.18.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/CHANGELOG.md +47 -0
- package/ai/USAGE.md +6 -0
- package/ai/component-registry.json +37 -10
- package/ai/component-registry.md +81 -3
- package/ai/schemas.ts +3 -0
- package/dist/.build-complete +1 -1
- package/dist/ai/schemas.d.ts +4 -0
- package/dist/ai/schemas.js +2 -0
- package/dist/{button-Bbi7gFL7.d.ts → button-DBuj7_fo.d.ts} +2 -2
- package/dist/catalog.d.ts +4 -1
- package/dist/catalog.js +37 -14
- package/dist/chunks/{autocomplete-ht782okfv7nv75mq.js → autocomplete-ngrji5wk0xdpq2qc.js} +2 -2
- package/dist/chunks/{badge-kyz53p7p0ng393bs.js → badge-f27mwe9gasi4inb6.js} +3 -1
- package/dist/chunks/{banner-cpla8vqjxaulggyd.js → banner-m68xx7eqplxwi73f.js} +21 -10
- package/dist/chunks/{breadcrumbs-oyuqwb09l08uhok2.js → breadcrumbs-2ra74bio44h1fvuj.js} +2 -2
- package/dist/chunks/{button-oxy32x5w9x9az80g.js → button-cyea767mx5dwgavm.js} +12 -17
- package/dist/chunks/{chart-hp3vqwe49tbyywqm.js → chart-g4dnsqiamjh39chn.js} +1 -1
- package/dist/chunks/{checkbox-o9627970y7c9ciqy.js → checkbox-bcpt8k7ck95vgjc1.js} +5 -5
- package/dist/chunks/{clipboard-text-c0ad6lzyxauxduv1.js → clipboard-text-k9ae6rsreg9ol6y2.js} +17 -6
- package/dist/chunks/{combobox-kgf0gmniahm15n81.js → combobox-iuuzrkczst4nmoyh.js} +18 -6
- package/dist/chunks/{date-picker-oee5ehsrepnlmltj.js → date-picker-o6iov1n67oc4rbom.js} +78 -6
- package/dist/chunks/{date-range-picker-hpx3cdu9ve01jx6d.js → date-range-picker-oivlshld01jbel29.js} +1 -1
- package/dist/chunks/{dialog-lgrwmsumwpftp2u8.js → dialog-h3zgi4kmimpesv5j.js} +1 -1
- package/dist/chunks/{dropdown-o875yxeqod7qp871.js → dropdown-m5a8nwer5hpvnkfk.js} +3 -1
- package/dist/chunks/{empty-ft85jcbs7fd5t3tn.js → empty-ghcpxo6x75jg7mw9.js} +1 -1
- package/dist/chunks/{field-jzzlgre0jmrr38o2.js → field-crf1hw5exr2oxemk.js} +7 -2
- package/dist/chunks/{inline-copy-text-57r67slswfqvgbaf.js → inline-copy-text-c6wa49ys72pj7k53.js} +1 -1
- package/dist/chunks/{input-jk86hoj6nqfhl5u8.js → input-d1230n06m5b1p3rd.js} +2 -2
- package/dist/chunks/{input-group-hc2qp3m6gsfomqvr.js → input-group-gg4aurpe2s60van9.js} +9 -7
- package/dist/chunks/{input-jsnp6etq7rbjjj9e.js → input-m6nvwwnydvbdz8rf.js} +2 -2
- package/dist/chunks/{label-hugrtzreeqk5mtqu.js → label-cecukn2rbow4ghxg.js} +2 -2
- package/dist/chunks/{layer-dialog-dwrrgv1wasrerow4.js → layer-dialog-eeecim8yf0dzhs2m.js} +12 -4
- package/dist/chunks/{menubar-m5pqhx7lu5z7mkks.js → menubar-gzlyhmmc4i24prn1.js} +2 -2
- package/dist/chunks/{pagination-nyknrk1lyexwgyrx.js → pagination-fkjx0m380ku9zqv9.js} +2 -2
- package/dist/chunks/{radio-d3pkrvsldfbdefav.js → radio-co7gt6ihfp5w4jr0.js} +4 -4
- package/dist/chunks/{select-owq85889zm4y23ws.js → select-ha59x0uq5ocr1x36.js} +6 -6
- package/dist/chunks/{sensitive-input-nzwvjuwlpb51ze04.js → sensitive-input-hg58r9x2d9njtysl.js} +3 -3
- package/dist/chunks/{sidebar-gluq5b5oacrdk4m4.js → sidebar-dgyce0z35tpnxj8t.js} +13 -11
- package/dist/chunks/skeleton-line-kmhnp0lx3rxhioxa.js +74 -0
- package/dist/chunks/{slider-juwif2d8xa5n0429.js → slider-e395gihi5cjd62ss.js} +1 -1
- package/dist/chunks/{switch-mqf1ulvle4nd6d2t.js → switch-hqj8v7ll9g14p5my.js} +4 -4
- package/dist/chunks/{table-nysse5tiwf47gg4k.js → table-b491wlpxd8jbr9b5.js} +1 -1
- package/dist/chunks/{tabs-mmkz7q5rofnmogwt.js → tabs-oi64kuuf2poro26u.js} +2 -2
- package/dist/chunks/{tag-input-fjfzlsaxmnqee7dk.js → tag-input-0ombmb7yrn4xk3in.js} +4 -4
- package/dist/chunks/{toast-b4t9rt9y1sumcmy2.js → toast-cmj0e7xvoh9gxxao.js} +60 -52
- package/dist/chunks/{toolbar-l9laewk5jvf4u0si.js → toolbar-bx2w3vk2if6mp36l.js} +3 -3
- package/dist/chunks/{tooltip-lguwh8bjhxwnjfus.js → tooltip-bcymn9bfyz29fvji.js} +2 -0
- package/dist/chunks/unwrap-lazy-element-hzbdkmujhd7iksau.js +45 -0
- package/dist/code.js +1 -1
- package/dist/components/autocomplete.js +1 -1
- package/dist/components/badge.js +1 -1
- package/dist/components/banner.d.ts +1 -1
- package/dist/components/banner.js +1 -1
- package/dist/components/breadcrumbs.js +1 -1
- package/dist/components/button.d.ts +2 -2
- package/dist/components/button.js +1 -1
- package/dist/components/chart.js +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/clipboard-text.d.ts +1 -1
- package/dist/components/clipboard-text.js +1 -1
- package/dist/components/combobox.d.ts +1 -1
- package/dist/components/combobox.js +1 -1
- package/dist/components/date-picker.d.ts +1 -1
- package/dist/components/date-picker.js +1 -1
- package/dist/components/date-range-picker.js +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/dropdown.js +1 -1
- package/dist/components/empty.js +1 -1
- package/dist/components/field.js +1 -1
- package/dist/components/inline-copy-text.d.ts +1 -1
- package/dist/components/inline-copy-text.js +1 -1
- package/dist/components/input-group.d.ts +1 -1
- package/dist/components/input-group.js +1 -1
- package/dist/components/input.d.ts +1 -1
- package/dist/components/input.js +3 -3
- package/dist/components/label.js +1 -1
- package/dist/components/layer-dialog.d.ts +1 -1
- package/dist/components/layer-dialog.js +1 -1
- package/dist/components/loader.d.ts +1 -1
- package/dist/components/loader.js +1 -1
- package/dist/components/menubar.js +1 -1
- package/dist/components/pagination.js +1 -1
- package/dist/components/radio.js +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/sensitive-input.js +1 -1
- package/dist/components/sidebar.js +1 -1
- package/dist/components/slider.js +1 -1
- package/dist/components/switch.js +1 -1
- package/dist/components/table.js +1 -1
- package/dist/components/tabs.js +1 -1
- package/dist/components/tag-input.js +1 -1
- package/dist/components/toast.d.ts +1 -1
- package/dist/components/toast.js +1 -1
- package/dist/components/toolbar.d.ts +1 -1
- package/dist/components/toolbar.js +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/{index-BMe3cpLB.d.ts → index--HBggSGH.d.ts} +2 -2
- package/dist/{index-CSWbPhke.d.ts → index-BAFvYacU.d.ts} +15 -5
- package/dist/{index--RbAKeBL.d.ts → index-BfoZI9Hf.d.ts} +2 -2
- package/dist/{index-DJIRVD5B.d.ts → index-CReGk3Dc.d.ts} +6 -0
- package/dist/{index-jNWPjJl9.d.ts → index-D4_C1J_8.d.ts} +1 -1
- package/dist/{index-5bJAnzUo.d.ts → index-Dmbgjww7.d.ts} +1 -0
- package/dist/{index-BAQwS4mL.d.ts → index-Dx7hOWUc.d.ts} +24 -1
- package/dist/{index-CrQi3QCY.d.ts → index-DxOyYZaJ.d.ts} +4 -3
- package/dist/index-WCjW8Iot.d.ts +1 -0
- package/dist/{index-DNsSKNUe.d.ts → index-bBPKMepR.d.ts} +4 -0
- package/dist/index.d.ts +12 -12
- package/dist/index.js +36 -36
- package/dist/{input-group-B3M_WRqm.d.ts → input-group-oXVkmPrY.d.ts} +1 -1
- package/dist/styles/kumo-binding.css +159 -0
- package/dist/styles/kumo-standalone.css +1 -1
- package/dist/styles/kumo.css +0 -545
- package/package.json +1 -1
- package/scripts/component-registry/schema-generator.ts +2 -0
- package/scripts/format-generated.ts +12 -0
- package/scripts/generate-primitives.ts +16 -12
- package/scripts/theme-generator/index.ts +2 -2
- package/dist/chunks/skeleton-line-gjf1fecmyy82aejz.js +0 -43
- package/dist/index-B-hCpI5K.d.ts +0 -1
- package/dist/index-DhOvcB0m.d.ts +0 -60
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { t as cn } from "./vendor-styling-gs32v7xt5znc8kg0.js";
|
|
3
|
-
import { useMemo } from "react";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
//#region src/components/loader/skeleton-line.tsx
|
|
6
|
-
const getRandomWidth = (min, max) => Math.floor(Math.random() * (max - min + 1) + min);
|
|
7
|
-
const getRandomFloat = (min, max) => (Math.random() * (max - min) + min).toFixed(2);
|
|
8
|
-
const SkeletonLine = ({ minWidth = 30, maxWidth = 100, minDuration = 1.3, maxDuration = 1.7, minDelay = 0, maxDelay = .5, blockHeight, className }) => {
|
|
9
|
-
const { width, duration, delay } = useMemo(() => {
|
|
10
|
-
return {
|
|
11
|
-
width: getRandomWidth(minWidth, maxWidth),
|
|
12
|
-
duration: getRandomFloat(minDuration, maxDuration),
|
|
13
|
-
delay: getRandomFloat(minDelay, maxDelay)
|
|
14
|
-
};
|
|
15
|
-
}, [
|
|
16
|
-
minWidth,
|
|
17
|
-
maxWidth,
|
|
18
|
-
minDuration,
|
|
19
|
-
maxDuration,
|
|
20
|
-
minDelay,
|
|
21
|
-
maxDelay
|
|
22
|
-
]);
|
|
23
|
-
const lineStyle = {
|
|
24
|
-
"--skeleton-width": `${width}%`,
|
|
25
|
-
"--shimmer-duration": `${duration}s`,
|
|
26
|
-
"--shimmer-delay": `${delay}s`
|
|
27
|
-
};
|
|
28
|
-
const line = /* @__PURE__ */ jsx("div", {
|
|
29
|
-
className: cn("skeleton-line", className),
|
|
30
|
-
style: lineStyle
|
|
31
|
-
});
|
|
32
|
-
if (blockHeight !== void 0) {
|
|
33
|
-
const height = typeof blockHeight === "number" ? `${blockHeight}px` : blockHeight;
|
|
34
|
-
return /* @__PURE__ */ jsx("div", {
|
|
35
|
-
className: "flex items-center",
|
|
36
|
-
style: { height },
|
|
37
|
-
children: line
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
return line;
|
|
41
|
-
};
|
|
42
|
-
//#endregion
|
|
43
|
-
export { SkeletonLine as t };
|
package/dist/index-B-hCpI5K.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./button-Bbi7gFL7.js";
|
package/dist/index-DhOvcB0m.d.ts
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { a as LinkButtonProps, n as ButtonProps } from "./button-Bbi7gFL7.js";
|
|
2
|
-
import { n as InputProps } from "./input-BeWEb-jD.js";
|
|
3
|
-
import { t as InputGroup } from "./input-group-B3M_WRqm.js";
|
|
4
|
-
import React from "react";
|
|
5
|
-
import { Toolbar } from "@base-ui/react/toolbar";
|
|
6
|
-
//#region src/components/toolbar/toolbar.d.ts
|
|
7
|
-
/** @deprecated Toolbar size customization is deprecated. Omit `size` to use the default base size. */
|
|
8
|
-
declare const KUMO_TOOLBAR_VARIANTS: {
|
|
9
|
-
readonly size: {
|
|
10
|
-
readonly xs: {
|
|
11
|
-
readonly classes: "text-xs";
|
|
12
|
-
readonly description: "Extra small toolbar for compact UIs";
|
|
13
|
-
};
|
|
14
|
-
readonly sm: {
|
|
15
|
-
readonly classes: "text-xs";
|
|
16
|
-
readonly description: "Small toolbar for secondary controls";
|
|
17
|
-
};
|
|
18
|
-
readonly base: {
|
|
19
|
-
readonly classes: "text-base";
|
|
20
|
-
readonly description: "Default toolbar size";
|
|
21
|
-
};
|
|
22
|
-
readonly lg: {
|
|
23
|
-
readonly classes: "text-base";
|
|
24
|
-
readonly description: "Large toolbar for prominent controls";
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
/** @deprecated Toolbar size customization is deprecated. Omit `size` to use the default base size. */
|
|
29
|
-
declare const KUMO_TOOLBAR_DEFAULT_VARIANTS: {
|
|
30
|
-
readonly size: "base";
|
|
31
|
-
};
|
|
32
|
-
/** @deprecated Toolbar size customization is deprecated. Omit `size` to use the default base size. */
|
|
33
|
-
type ToolbarSize = keyof typeof KUMO_TOOLBAR_VARIANTS.size;
|
|
34
|
-
interface ToolbarProps extends Omit<Toolbar.Root.Props, "children"> {
|
|
35
|
-
/** Toolbar controls rendered as one grouped card. */
|
|
36
|
-
children: React.ReactNode;
|
|
37
|
-
/**
|
|
38
|
-
* Locks every toolbar item to this size.
|
|
39
|
-
* @deprecated Omit this prop to use the default base size. Toolbar size customization will be removed in a future major release.
|
|
40
|
-
*/
|
|
41
|
-
size?: ToolbarSize;
|
|
42
|
-
}
|
|
43
|
-
type ToolbarButtonProps = Omit<ButtonProps, "size" | "variant"> & Pick<Toolbar.Button.Props, "focusableWhenDisabled">;
|
|
44
|
-
type ToolbarLinkProps = Omit<LinkButtonProps, "size" | "variant">;
|
|
45
|
-
type ToolbarInputProps = Omit<InputProps, "size" | "variant" | "label" | "labelTooltip" | "description" | "hideLabel" | "error" | "passwordManagerIgnore" | "render"> & {
|
|
46
|
-
/** When `true`, the item remains focusable when disabled. */
|
|
47
|
-
focusableWhenDisabled?: Toolbar.Input.Props["focusableWhenDisabled"];
|
|
48
|
-
};
|
|
49
|
-
type ToolbarInputGroupProps = Omit<React.ComponentPropsWithoutRef<typeof InputGroup>, "size">;
|
|
50
|
-
declare const Toolbar$1: React.ForwardRefExoticComponent<Omit<ToolbarProps, "ref"> & React.RefAttributes<HTMLDivElement>> & {
|
|
51
|
-
Button: React.ForwardRefExoticComponent<Omit<ButtonProps, "variant" | "size"> & Pick<import("@base-ui/react").ToolbarButtonProps, "focusableWhenDisabled"> & React.RefAttributes<HTMLButtonElement>>;
|
|
52
|
-
Link: React.ForwardRefExoticComponent<ToolbarLinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
53
|
-
Input: React.ForwardRefExoticComponent<Omit<InputProps, "variant" | "label" | "labelTooltip" | "description" | "error" | "size" | "hideLabel" | "passwordManagerIgnore" | "render"> & {
|
|
54
|
-
/** When `true`, the item remains focusable when disabled. */
|
|
55
|
-
focusableWhenDisabled?: Toolbar.Input.Props["focusableWhenDisabled"];
|
|
56
|
-
} & React.RefAttributes<HTMLInputElement>>;
|
|
57
|
-
InputGroup: React.ForwardRefExoticComponent<ToolbarInputGroupProps & React.RefAttributes<HTMLElement>>;
|
|
58
|
-
};
|
|
59
|
-
//#endregion
|
|
60
|
-
export { ToolbarInputGroupProps as a, ToolbarProps as c, ToolbarButtonProps as i, ToolbarSize as l, KUMO_TOOLBAR_VARIANTS as n, ToolbarInputProps as o, Toolbar$1 as r, ToolbarLinkProps as s, KUMO_TOOLBAR_DEFAULT_VARIANTS as t };
|