@cloudflare/kumo 2.18.1 → 2.19.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.
Files changed (51) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/.build-complete +1 -1
  3. package/dist/chunks/{autocomplete-kx87ui5sodpxx2zm.js → autocomplete-gdd9aruremdgdvx7.js} +2 -2
  4. package/dist/chunks/{breadcrumbs-o63hllvg6zlbxvcr.js → breadcrumbs-z1jo40oxlw8e4eh4.js} +9 -6
  5. package/dist/chunks/{checkbox-oav03hnpbj06x31v.js → checkbox-eifiwbw34xwsikvf.js} +1 -1
  6. package/dist/chunks/{clipboard-text-ldk0zyq1qtey1yux.js → clipboard-text-oukrnke1s3kebk3y.js} +1 -1
  7. package/dist/chunks/{combobox-iwqfbp2cn3z54azu.js → combobox-mzvobpvalz2gnpli.js} +2 -2
  8. package/dist/chunks/{field-gkrpde59au4kjh7q.js → field-fowmq5smvp17pnqe.js} +1 -1
  9. package/dist/chunks/{flow-imvwzp5p2f8y2dxm.js → flow-fak0fyldoaozd32s.js} +4 -4
  10. package/dist/chunks/{input-group-grlfeiivjuhd7jif.js → input-group-h9fepskc84e1h11n.js} +2 -2
  11. package/dist/chunks/{input-ggn78losfydwdjqg.js → input-kfi46426y22ocoo4.js} +1 -1
  12. package/dist/chunks/{input-ehb5hnwkr2kx9rpw.js → input-m2tfec2viezoz9hh.js} +2 -2
  13. package/dist/chunks/{label-f9vvtexndkpjlrv0.js → label-f18fnpbv85jddo4q.js} +1 -1
  14. package/dist/chunks/{layer-dialog-cwpiki9rq2s6yidp.js → layer-dialog-b57b6vowfdfhfdq1.js} +1 -1
  15. package/dist/chunks/{locale-provider-e3310bgo4lnffqkd.js → locale-provider-j4ii538ntyok36r6.js} +9 -0
  16. package/dist/chunks/{pagination-h5l4b9bfmf78s6jq.js → pagination-lmogkvvtu19mnr7f.js} +2 -2
  17. package/dist/chunks/{select-ei05w4df1th4fa4e.js → select-lnekz415wm4v6d6m.js} +3 -3
  18. package/dist/chunks/{sensitive-input-owfvgxmefm5lzzx8.js → sensitive-input-dvwlnntm7rdudwp0.js} +2 -2
  19. package/dist/chunks/{switch-e1dsoxucn07fz00t.js → switch-n279p5ma6s2f38ez.js} +1 -1
  20. package/dist/chunks/{table-m0xshmsbxq2h1sho.js → table-ngl1b5yc8mcur662.js} +1 -1
  21. package/dist/chunks/{tag-input-fm0pwt6kea4q137b.js → tag-input-lbx9yzt33d4wu07o.js} +2 -2
  22. package/dist/chunks/{toolbar-3wkkukczgo0bk6mo.js → toolbar-kh6pc12ii7b6dv1x.js} +2 -2
  23. package/dist/components/autocomplete.js +1 -1
  24. package/dist/components/banner.d.ts +1 -1
  25. package/dist/components/breadcrumbs.d.ts +1 -1
  26. package/dist/components/breadcrumbs.js +1 -1
  27. package/dist/components/checkbox.js +1 -1
  28. package/dist/components/clipboard-text.js +1 -1
  29. package/dist/components/combobox.js +1 -1
  30. package/dist/components/field.js +1 -1
  31. package/dist/components/flow.js +1 -1
  32. package/dist/components/input-group.js +1 -1
  33. package/dist/components/input.js +3 -3
  34. package/dist/components/label.js +1 -1
  35. package/dist/components/layer-dialog.js +1 -1
  36. package/dist/components/pagination.js +1 -1
  37. package/dist/components/select.js +1 -1
  38. package/dist/components/sensitive-input.js +1 -1
  39. package/dist/components/switch.js +1 -1
  40. package/dist/components/table.js +1 -1
  41. package/dist/components/tag-input.js +1 -1
  42. package/dist/components/toolbar.js +1 -1
  43. package/dist/{index-CLsBWiaS.d.ts → index-5PpauI_2.d.ts} +7 -1
  44. package/dist/index.d.ts +3 -3
  45. package/dist/index.js +20 -20
  46. package/dist/{locale-provider-CAjVN3_0.d.ts → locale-provider-CHMCQ0-J.d.ts} +8 -0
  47. package/dist/styles/kumo-standalone.css +1 -1
  48. package/dist/utils.d.ts +1 -1
  49. package/dist/utils.js +1 -1
  50. package/package.json +1 -1
  51. package/dist/index-wD5WGQQz.d.ts +0 -136
package/dist/utils.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  import { n as PortalContainer, t as KumoPortalProvider } from "./portal-provider-BAqPpq_a.js";
2
2
  import { n as LinkProvider, r as useLinkComponent, t as LinkComponentProps } from "./link-provider-tz-NJp9x.js";
3
- import { a as cn, i as KumoTranslationsPartial, n as KumoLocaleProviderProps, o as safeRandomId, r as KumoTranslations, t as KumoLocaleProvider } from "./locale-provider-CAjVN3_0.js";
3
+ import { a as cn, i as KumoTranslationsPartial, n as KumoLocaleProviderProps, o as safeRandomId, r as KumoTranslations, t as KumoLocaleProvider } from "./locale-provider-CHMCQ0-J.js";
4
4
  export { KumoLocaleProvider, type KumoLocaleProviderProps, KumoPortalProvider, type KumoTranslations, type KumoTranslationsPartial, type LinkComponentProps, LinkProvider, type PortalContainer, cn, safeRandomId, useLinkComponent };
package/dist/utils.js CHANGED
@@ -3,5 +3,5 @@ import { t as cn } from "./chunks/vendor-styling-gs32v7xt5znc8kg0.js";
3
3
  import { t as safeRandomId } from "./chunks/utils-o44zfmzz9z7uyj1v.js";
4
4
  import { n as useLinkComponent, t as LinkProvider } from "./chunks/link-provider-kbwllpbo24fvgioj.js";
5
5
  import { t as KumoPortalProvider } from "./chunks/portal-provider-eveknxf26oudn7pp.js";
6
- import { t as KumoLocaleProvider } from "./chunks/locale-provider-e3310bgo4lnffqkd.js";
6
+ import { t as KumoLocaleProvider } from "./chunks/locale-provider-j4ii538ntyok36r6.js";
7
7
  export { KumoLocaleProvider, KumoPortalProvider, LinkProvider, cn, safeRandomId, useLinkComponent };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudflare/kumo",
3
- "version": "2.18.1",
3
+ "version": "2.19.0",
4
4
  "private": false,
5
5
  "description": "Kumo - Cloudflare's component library for building modern web applications",
6
6
  "keywords": [
@@ -1,136 +0,0 @@
1
- import { a as LinkButtonProps, n as ButtonProps, r as KumoButtonVariant } from "./button-DzavLWXm.js";
2
- import { HTMLAttributes, ReactNode } from "react";
3
- //#region src/components/banner/banner-action.d.ts
4
- /**
5
- * Visual variant for a `Banner.Action`, aligned with `Button`'s `variant` naming.
6
- * - `"primary"` — filled accent gradient for the main action.
7
- * - `"secondary"` — transparent with an accent-hued outline (same hue as the banner).
8
- * - `"ghost"` — text-only accent action with a faint accent-tinted hover.
9
- */
10
- type BannerActionVariant = Extract<KumoButtonVariant, "primary" | "secondary" | "ghost">;
11
- type WithBannerActionVariants<Props> = Props extends unknown ? Omit<Props, "size" | "variant"> & {
12
- /**
13
- * Visual variant of the CTA, aligned with `Button`'s `variant` naming.
14
- * - `"primary"` — filled accent gradient for the main action (default).
15
- * - `"secondary"` — transparent with an accent-hued outline matching the banner.
16
- * - `"ghost"` — text-only accent action with a faint accent-tinted hover.
17
- * @default "primary"
18
- */
19
- variant?: BannerActionVariant;
20
- } : never;
21
- type BannerActionButtonProps = WithBannerActionVariants<ButtonProps> & {
22
- href?: never;
23
- };
24
- type BannerActionLinkProps = WithBannerActionVariants<LinkButtonProps> & {
25
- /**
26
- * Renders the action as a link via `LinkButton`, so it uses the app's
27
- * `LinkProvider` component for client-side routing.
28
- */
29
- href: string;
30
- };
31
- /** Props for {@link BannerAction}. Pass `href` to render a link. */
32
- type BannerActionProps = BannerActionButtonProps | BannerActionLinkProps;
33
- //#endregion
34
- //#region src/components/banner/banner.d.ts
35
- /** Banner variant definitions mapping style options to their Tailwind classes and descriptions. */
36
- declare const KUMO_BANNER_VARIANTS: {
37
- readonly variant: {
38
- readonly default: {
39
- readonly classes: "bg-kumo-info-tint text-kumo-info";
40
- readonly iconClasses: "fill-kumo-info";
41
- readonly description: "Informational banner for general messages";
42
- };
43
- readonly alert: {
44
- readonly classes: "bg-kumo-warning-tint text-kumo-warning";
45
- readonly iconClasses: "fill-kumo-warning";
46
- readonly description: "Warning banner for cautionary messages";
47
- };
48
- readonly error: {
49
- readonly classes: "bg-kumo-danger-tint text-kumo-danger";
50
- readonly iconClasses: "fill-kumo-danger";
51
- readonly description: "Error banner for critical issues";
52
- };
53
- readonly secondary: {
54
- readonly classes: "bg-kumo-contrast/5 text-kumo-default/70";
55
- readonly iconClasses: "fill-kumo-interact";
56
- readonly description: "Neutral banner for secondary messages";
57
- };
58
- };
59
- readonly size: {
60
- readonly base: {
61
- readonly classes: "items-start gap-3 rounded-lg px-4 py-3 text-base";
62
- readonly description: "Default banner size";
63
- };
64
- readonly sm: {
65
- readonly classes: "items-center gap-2 rounded-md px-3 py-2 text-sm";
66
- readonly description: "Compact banner for dialogs and tight spaces";
67
- };
68
- };
69
- };
70
- type KumoBannerVariant = keyof typeof KUMO_BANNER_VARIANTS.variant;
71
- type KumoBannerSize = keyof typeof KUMO_BANNER_VARIANTS.size;
72
- declare enum BannerVariant {
73
- DEFAULT = 0,
74
- ALERT = 1,
75
- ERROR = 2
76
- }
77
- /**
78
- * Banner component props.
79
- *
80
- * @example
81
- * ```tsx
82
- * <Banner title="Update available" description="A new version is ready to install." />
83
- * <Banner variant="alert" title="Session expiring" description="Your session will expire soon." />
84
- * <Banner variant="error" title="Save failed" description="We couldn't save your changes." />
85
- * ```
86
- */
87
- interface BannerProps extends Omit<HTMLAttributes<HTMLDivElement>, "children" | "title"> {
88
- /** Icon element rendered before the banner content (e.g. from `@phosphor-icons/react`). */
89
- icon?: ReactNode;
90
- /** Primary heading text for the banner. Use for i18n string injection. */
91
- title?: string;
92
- /** Secondary description text displayed below the title. Use for i18n string injection. */
93
- description?: ReactNode;
94
- /**
95
- * Action slot for a CTA button or link. Compact banners render a Kumo `Link`
96
- * inline with the description; CTAs render at the trailing end.
97
- * Use `Banner.Action` for accent-aware CTAs that self-style to the banner
98
- * variant; other nodes are rendered as-is. Multiple actions can be passed in
99
- * a Fragment. Only used in structured mode (with `title` or `description`).
100
- */
101
- action?: ReactNode;
102
- /** @deprecated Use `title` and `description` instead. Will be removed in a future major version. */
103
- text?: string;
104
- /** @deprecated Use `title` and `description` instead for better i18n support. */
105
- children?: ReactNode;
106
- /**
107
- * Visual style of the banner.
108
- * - `"default"` — Informational blue banner for general messages
109
- * - `"alert"` — Warning yellow banner for cautionary messages
110
- * - `"error"` — Error red banner for critical issues
111
- * - `"secondary"` — Neutral banner for secondary messages
112
- * @default "default"
113
- */
114
- variant?: KumoBannerVariant;
115
- /**
116
- * Size of the banner. A `"sm"` banner uses tighter spacing and `text-sm`,
117
- * renders a Kumo `Link` action inline with the description, and sets its
118
- * `Banner.Action` children to the `"xs"` size — suited to dialogs and other
119
- * tight spaces.
120
- * @default "base"
121
- */
122
- size?: KumoBannerSize;
123
- /** Additional CSS classes merged via `cn()`. */
124
- className?: string;
125
- }
126
- /**
127
- * Full-width message bar with an optional trailing CTA slot.
128
- *
129
- * `Banner.Action` is an accent-aware CTA button
130
- * (`variant="primary" | "secondary" | "ghost"`).
131
- */
132
- declare const Banner: import("react").ForwardRefExoticComponent<BannerProps & import("react").RefAttributes<HTMLDivElement>> & {
133
- Action: import("react").ForwardRefExoticComponent<BannerActionProps & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
134
- };
135
- //#endregion
136
- export { BannerVariant as n, Banner as t };