@cloudflare/kumo 2.17.0 → 2.18.1
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 +46 -0
- package/ai/USAGE.md +6 -0
- package/ai/component-registry.json +7 -6
- package/ai/component-registry.md +24 -1
- package/ai/schemas.ts +3 -1
- package/dist/.build-complete +1 -1
- package/dist/ai/schemas.d.ts +2 -0
- package/dist/ai/schemas.js +1 -0
- package/dist/{button-Bbi7gFL7.d.ts → button-DzavLWXm.d.ts} +3 -3
- package/dist/catalog.d.ts +4 -1
- package/dist/catalog.js +37 -14
- package/dist/chunks/{autocomplete-evlm6fj7v7w0g2z2.js → autocomplete-kx87ui5sodpxx2zm.js} +2 -2
- package/dist/chunks/{badge-kyz53p7p0ng393bs.js → badge-g0m6j3nji45tiink.js} +4 -2
- package/dist/chunks/{banner-lvbgdzxq3yndkbot.js → banner-mo1xl9ww734kgsqh.js} +21 -10
- package/dist/chunks/{breadcrumbs-fsuyq7z6hdh1thjv.js → breadcrumbs-o63hllvg6zlbxvcr.js} +2 -2
- package/dist/chunks/{button-k7axs4vu1rwx89w3.js → button-hzvowfkbathmx8yg.js} +12 -17
- package/dist/chunks/{chart-hp3vqwe49tbyywqm.js → chart-g4dnsqiamjh39chn.js} +1 -1
- package/dist/chunks/{checkbox-g8b4f2hs5vux3u26.js → checkbox-oav03hnpbj06x31v.js} +5 -5
- package/dist/chunks/{clipboard-text-fffd5tpa0iye6r6m.js → clipboard-text-ldk0zyq1qtey1yux.js} +2 -2
- package/dist/chunks/{combobox-iawd8lxwd5b18fce.js → combobox-iwqfbp2cn3z54azu.js} +18 -6
- package/dist/chunks/{command-palette-el4x943vpmid0po0.js → command-palette-d45ueqbuxygu87ir.js} +1 -1
- package/dist/chunks/{date-picker-kfoxd4u7ckg4nsez.js → date-picker-ija2bz17ai6ypnao.js} +3 -3
- package/dist/chunks/{date-range-picker-hpx3cdu9ve01jx6d.js → date-range-picker-oivlshld01jbel29.js} +1 -1
- package/dist/chunks/{dialog-lgrwmsumwpftp2u8.js → dialog-g7wavhkdv2gplwq9.js} +2 -2
- package/dist/chunks/{dropdown-o875yxeqod7qp871.js → dropdown-m5a8nwer5hpvnkfk.js} +3 -1
- package/dist/chunks/{empty-ir5bg5w4kkisuc1c.js → empty-dzm61keqaezmp452.js} +1 -1
- package/dist/chunks/{field-n7gmbg5xvh6oqbom.js → field-gkrpde59au4kjh7q.js} +1 -1
- package/dist/chunks/{inline-copy-text-57r67slswfqvgbaf.js → inline-copy-text-c6wa49ys72pj7k53.js} +1 -1
- package/dist/chunks/{input-iev3wgdzhkqpae2k.js → input-ehb5hnwkr2kx9rpw.js} +2 -2
- package/dist/chunks/{input-f0pbcvjudf5zb8ek.js → input-ggn78losfydwdjqg.js} +2 -2
- package/dist/chunks/{input-group-dqo5tcoewbdx86qx.js → input-group-grlfeiivjuhd7jif.js} +8 -6
- package/dist/chunks/{label-njfcj6h9utmg2n9l.js → label-f9vvtexndkpjlrv0.js} +1 -1
- package/dist/chunks/{layer-card-mar4dya5kl1vvie6.js → layer-card-lsmeuqic9i1isv2b.js} +2 -2
- package/dist/chunks/{layer-dialog-n7foup6icxowm82n.js → layer-dialog-cwpiki9rq2s6yidp.js} +3 -3
- package/dist/chunks/{menubar-b454nksysu0wicbz.js → menubar-gzlyhmmc4i24prn1.js} +1 -1
- package/dist/chunks/{pagination-mwlpbysq4cxmvs45.js → pagination-h5l4b9bfmf78s6jq.js} +2 -2
- package/dist/chunks/{radio-d3pkrvsldfbdefav.js → radio-nf717i5ypsga9zdh.js} +34 -33
- package/dist/chunks/{select-fae2ls189jrq902h.js → select-ei05w4df1th4fa4e.js} +10 -10
- package/dist/chunks/{sensitive-input-heb3xapwahzhpq6y.js → sensitive-input-owfvgxmefm5lzzx8.js} +4 -3
- package/dist/chunks/{sidebar-h6g412ror8p7uo0d.js → sidebar-jhwzfl3xpsfns60z.js} +11 -9
- package/dist/chunks/skeleton-line-kmhnp0lx3rxhioxa.js +74 -0
- package/dist/chunks/{slider-juwif2d8xa5n0429.js → slider-e395gihi5cjd62ss.js} +1 -1
- package/dist/chunks/{surface-ginwpan1pz61l6k2.js → surface-jr8x5hy0gucjk5ig.js} +1 -1
- package/dist/chunks/{switch-ktfauhluw1yi5tkk.js → switch-e1dsoxucn07fz00t.js} +4 -4
- package/dist/chunks/{table-lp41fsw7mqr751hn.js → table-m0xshmsbxq2h1sho.js} +1 -1
- package/dist/chunks/{tabs-mmkz7q5rofnmogwt.js → tabs-oi64kuuf2poro26u.js} +2 -2
- package/dist/chunks/{tag-input-k6vzllby4qebmv63.js → tag-input-fm0pwt6kea4q137b.js} +3 -3
- package/dist/chunks/{toast-kzwscia42707sau6.js → toast-iojuzen6iavawpc9.js} +1 -1
- package/dist/chunks/{toolbar-nnos2ouwfk7i6tpw.js → toolbar-3wkkukczgo0bk6mo.js} +3 -3
- package/dist/chunks/unwrap-lazy-element-hzbdkmujhd7iksau.js +45 -0
- package/dist/code.js +1 -1
- package/dist/command-line/cli.js +6 -5
- package/dist/components/autocomplete.js +1 -1
- package/dist/components/badge.d.ts +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.js +1 -1
- package/dist/components/combobox.d.ts +1 -1
- package/dist/components/combobox.js +1 -1
- package/dist/components/command-palette.js +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-card.js +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.d.ts +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/surface.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/{index-BMe3cpLB.d.ts → index-CUT5x1Z2.d.ts} +2 -2
- package/dist/{index-jNWPjJl9.d.ts → index-D4_C1J_8.d.ts} +1 -1
- package/dist/index-DL1-uSuH.d.ts +1 -0
- package/dist/{index-CdSf6Vfc.d.ts → index-DmhpD22M.d.ts} +1 -1
- package/dist/{index-DWZia2ui.d.ts → index-DwNMa4LN.d.ts} +5 -1
- 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-CSWbPhke.d.ts → index-NnHba-T1.d.ts} +15 -5
- package/dist/{index--RbAKeBL.d.ts → index-aahL-0Zw.d.ts} +2 -2
- package/dist/index-wD5WGQQz.d.ts +136 -0
- package/dist/index.d.ts +11 -11
- package/dist/index.js +38 -38
- package/dist/{input-group-B3M_WRqm.d.ts → input-group-8gEtPiKw.d.ts} +1 -1
- package/dist/styles/kumo-standalone.css +1 -1
- package/package.json +1 -1
- package/scripts/component-registry/schema-generator.ts +2 -0
- package/dist/chunks/skeleton-line-gjf1fecmyy82aejz.js +0 -43
- package/dist/index-B-hCpI5K.d.ts +0 -1
package/dist/chunks/{clipboard-text-fffd5tpa0iye6r6m.js → clipboard-text-ldk0zyq1qtey1yux.js}
RENAMED
|
@@ -3,9 +3,9 @@ import { t as cn } from "./vendor-styling-gs32v7xt5znc8kg0.js";
|
|
|
3
3
|
import { t as resolveVariant } from "./resolve-variant-l6x5ksfrjtu4m66l.js";
|
|
4
4
|
import { a as TooltipTrigger, i as TooltipPortal, n as TooltipPositioner, s as TooltipRoot, t as TooltipPopup } from "./TooltipPopup-furysmeyb68uycbz.js";
|
|
5
5
|
import { t as TooltipProvider } from "./TooltipProvider-hyans0ens4axh1y8.js";
|
|
6
|
-
import { t as Button } from "./button-
|
|
6
|
+
import { t as Button } from "./button-hzvowfkbathmx8yg.js";
|
|
7
7
|
import { a as ToastDescription, h as ToastProvider, l as ToastRoot, n as useToastManager, p as ToastViewport, r as ToastPositioner, t as createToastManager } from "./createToastManager-cxjmn4jx3ejh85fs.js";
|
|
8
|
-
import { r as inputVariants } from "./input-
|
|
8
|
+
import { r as inputVariants } from "./input-ggn78losfydwdjqg.js";
|
|
9
9
|
import { forwardRef, useCallback, useEffect, useRef, useState } from "react";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
import { CheckIcon, CopyIcon, EyeIcon, EyeSlashIcon } from "@phosphor-icons/react";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as cn } from "./vendor-styling-gs32v7xt5znc8kg0.js";
|
|
3
3
|
import { n as usePortalContainer } from "./portal-provider-eveknxf26oudn7pp.js";
|
|
4
|
-
import { t as Field } from "./field-
|
|
5
|
-
import { n as KUMO_INPUT_VARIANTS, r as inputVariants } from "./input-
|
|
4
|
+
import { t as Field } from "./field-gkrpde59au4kjh7q.js";
|
|
5
|
+
import { n as KUMO_INPUT_VARIANTS, r as inputVariants } from "./input-ggn78losfydwdjqg.js";
|
|
6
6
|
import { C as useComboboxFilter, a as ComboboxGroupLabel, c as ComboboxCollection, l as ComboboxInput, n as ComboboxItem, o as ComboboxGroup, s as ComboboxList, t as ComboboxEmpty } from "./ComboboxEmpty-gkt1y5b81a4983v7.js";
|
|
7
7
|
import { a as ComboboxItemIndicator, i as ComboboxChips, n as ComboboxChipRemove, o as ComboboxValue, r as ComboboxChip, s as ComboboxRoot, t as createComboboxItems } from "./createItems-n07tfwx89cdoar18.js";
|
|
8
8
|
import { n as ComboboxIcon, r as ComboboxTrigger, t as ComboboxClear } from "./ComboboxClear-ioejwvtnmqanph88.js";
|
|
@@ -86,18 +86,29 @@ const triggerValueIconStyles = {
|
|
|
86
86
|
iconRight: "right-3"
|
|
87
87
|
}
|
|
88
88
|
};
|
|
89
|
-
|
|
89
|
+
/**
|
|
90
|
+
* Drops keys whose value is `undefined`. Base UI's `mergeProps` lets an
|
|
91
|
+
* explicit `undefined` override internal props, so e.g.
|
|
92
|
+
* `aria-labelledby={undefined}` would erase the Field label's id.
|
|
93
|
+
*/
|
|
94
|
+
function omitUndefined(props) {
|
|
95
|
+
return Object.fromEntries(Object.entries(props).filter(([, value]) => value !== void 0));
|
|
96
|
+
}
|
|
97
|
+
function TriggerValue({ className, children, placeholder, ...triggerProps }) {
|
|
90
98
|
const { size, hasError } = useContext(ComboboxContext);
|
|
91
99
|
const iconStyles = triggerValueIconStyles[size];
|
|
92
100
|
return /* @__PURE__ */ jsxs(ComboboxTrigger, {
|
|
93
101
|
"data-kumo-component": "Combobox",
|
|
94
102
|
"data-kumo-part": "trigger",
|
|
95
|
-
|
|
103
|
+
...omitUndefined(triggerProps),
|
|
96
104
|
className: cn(inputVariants({
|
|
97
105
|
size,
|
|
98
106
|
variant: hasError ? "error" : "default"
|
|
99
107
|
}), "relative flex items-center", "data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50", "data-[placeholder]:text-kumo-placeholder", iconStyles.padding, className),
|
|
100
|
-
children: [/* @__PURE__ */ jsx(ComboboxValue, {
|
|
108
|
+
children: [/* @__PURE__ */ jsx(ComboboxValue, {
|
|
109
|
+
placeholder,
|
|
110
|
+
children
|
|
111
|
+
}), /* @__PURE__ */ jsx(ComboboxIcon, {
|
|
101
112
|
className: cn("absolute top-1/2 flex -translate-y-1/2 items-center text-kumo-subtle", iconStyles.iconRight),
|
|
102
113
|
children: /* @__PURE__ */ jsx(CaretUpDownIcon, {
|
|
103
114
|
size: iconStyles.iconSize,
|
|
@@ -233,10 +244,11 @@ const sizeToMinHeight = {
|
|
|
233
244
|
base: "min-h-9",
|
|
234
245
|
lg: "min-h-10"
|
|
235
246
|
};
|
|
236
|
-
function TriggerMultipleWithInput({ placeholder, renderItem, className, inputSide = "right", value: controlledValue }) {
|
|
247
|
+
function TriggerMultipleWithInput({ placeholder, renderItem, className, inputSide = "right", value: controlledValue, ...inputProps }) {
|
|
237
248
|
const { size, hasError } = useContext(ComboboxContext);
|
|
238
249
|
const chipsToRender = controlledValue;
|
|
239
250
|
const renderTriggerInput = (className) => /* @__PURE__ */ jsx(ComboboxInput, {
|
|
251
|
+
...omitUndefined(inputProps),
|
|
240
252
|
placeholder,
|
|
241
253
|
className
|
|
242
254
|
});
|
package/dist/chunks/{command-palette-el4x943vpmid0po0.js → command-palette-d45ueqbuxygu87ir.js}
RENAMED
|
@@ -6,7 +6,7 @@ import { a as ComboboxGroupLabel, c as ComboboxCollection, l as ComboboxInput, o
|
|
|
6
6
|
import { r as DialogPortal } from "./useRenderDialogRoot-bsqrqpc1ddau7xg4.js";
|
|
7
7
|
import { r as DialogBackdrop, t as DialogPopup } from "./DialogPopup-n6w7b389e7bs0472.js";
|
|
8
8
|
import { t as DialogRoot } from "./DialogRoot-hkkqj7vcjpkx8qk8.js";
|
|
9
|
-
import { t as LayerCard } from "./layer-card-
|
|
9
|
+
import { t as LayerCard } from "./layer-card-lsmeuqic9i1isv2b.js";
|
|
10
10
|
import { n as AutocompleteRoot, t as AutocompleteItem } from "./AutocompleteItem-36ysm5nwbsd0snr6.js";
|
|
11
11
|
import { createContext, forwardRef, useCallback, useContext, useRef } from "react";
|
|
12
12
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as __exportAll } from "./rolldown-runtime-hi7ti5xiuxsegr96.js";
|
|
3
3
|
import { t as cn } from "./vendor-styling-gs32v7xt5znc8kg0.js";
|
|
4
|
-
import { i as buttonVariants } from "./button-
|
|
4
|
+
import { i as buttonVariants } from "./button-hzvowfkbathmx8yg.js";
|
|
5
5
|
import React, { createContext, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
import { CaretDownIcon, CaretLeftIcon, CaretRightIcon, CaretUpIcon } from "@phosphor-icons/react";
|
|
@@ -6787,7 +6787,7 @@ const navButtonClassName = cn(buttonVariants({
|
|
|
6787
6787
|
variant: "ghost",
|
|
6788
6788
|
shape: "square"
|
|
6789
6789
|
}), "size-(--cell-size) rounded-md aria-disabled:cursor-not-allowed aria-disabled:opacity-50");
|
|
6790
|
-
const dayButtonClassName = cn("flex size-(--cell-size) items-center justify-center rounded-md text-base text-kumo-default tabular-nums transition-colors outline-none", "cursor-pointer hover:bg-kumo-tint", "focus-visible:relative focus-visible:z-10 focus-visible:ring-2 focus-visible:ring-kumo-brand", "[td[data-day][data-disabled]_&]:cursor-not-allowed [td[data-day][data-disabled]_&]:text-kumo-inactive [td[data-day][data-disabled]_&]:hover:bg-transparent", "[td[data-day][data-outside]:not([data-selected])_&]:text-kumo-inactive", "[td[data-day][data-today]:not([data-selected],[data-outside])_&]:font-semibold [td[data-day][data-today]:not([data-selected],[data-outside],[data-disabled])_&]:text-kumo-link", "[td[data-day][data-selected]:not([data-range-middle])_&]:bg-kumo-contrast [td[data-day][data-selected]:not([data-range-middle])_&]:text-kumo-inverse [td[data-day][data-selected]:not([data-range-middle])_&]:hover:bg-kumo-contrast", "[td[data-day][data-range-middle]:not([data-disabled])_&]:hover:bg-kumo-interact", "[td[data-day][data-range-start]:not([data-range-end],:last-of-type)_&]:rounded-e-none", "[td[data-day][data-range-end]:not([data-range-start],:first-of-type)_&]:rounded-s-none");
|
|
6790
|
+
const dayButtonClassName = cn("m-0 border-0 bg-transparent p-0", "flex size-(--cell-size) items-center justify-center rounded-md text-base text-kumo-default tabular-nums transition-colors outline-none focus-visible:outline-hidden", "cursor-pointer hover:bg-kumo-tint", "focus-visible:relative focus-visible:z-10 focus-visible:ring-2 focus-visible:ring-kumo-brand", "[td[data-day][data-disabled]_&]:cursor-not-allowed [td[data-day][data-disabled]_&]:text-kumo-inactive [td[data-day][data-disabled]_&]:hover:bg-transparent", "[td[data-day][data-outside]:not([data-selected])_&]:text-kumo-inactive", "[td[data-day][data-today]:not([data-selected],[data-outside])_&]:font-semibold [td[data-day][data-today]:not([data-selected],[data-outside],[data-disabled])_&]:text-kumo-link", "[td[data-day][data-selected]:not([data-range-middle])_&]:bg-kumo-contrast [td[data-day][data-selected]:not([data-range-middle])_&]:text-kumo-inverse [td[data-day][data-selected]:not([data-range-middle])_&]:hover:bg-kumo-contrast", "[td[data-day][data-range-middle]:not([data-disabled])_&]:hover:bg-kumo-interact", "[td[data-day][data-range-start]:not([data-range-end],:last-of-type)_&]:rounded-e-none", "[td[data-day][data-range-end]:not([data-range-start],:first-of-type)_&]:rounded-s-none");
|
|
6791
6791
|
/**
|
|
6792
6792
|
* DatePicker — a date selection calendar.
|
|
6793
6793
|
*
|
|
@@ -6837,7 +6837,7 @@ function DatePicker({ className, classNames, onChange, ...props }) {
|
|
|
6837
6837
|
dropdowns: cn(defaults.dropdowns, "flex items-center gap-1.5"),
|
|
6838
6838
|
dropdown_root: cn(defaults.dropdown_root, "relative rounded-md ring ring-kumo-line has-focus-visible:ring-2 has-focus-visible:ring-kumo-brand"),
|
|
6839
6839
|
dropdown: cn(defaults.dropdown, "absolute inset-0 cursor-pointer opacity-0"),
|
|
6840
|
-
month_grid: cn(defaults.month_grid, "border-collapse"),
|
|
6840
|
+
month_grid: cn(defaults.month_grid, "border-collapse [&_thead]:bg-transparent"),
|
|
6841
6841
|
weekdays: cn(defaults.weekdays, "flex"),
|
|
6842
6842
|
weekday: cn(defaults.weekday, "flex h-5 w-(--cell-width) items-center justify-center text-xs font-normal text-kumo-subtle"),
|
|
6843
6843
|
week: cn(defaults.week, "mt-2 flex"),
|
package/dist/chunks/{date-range-picker-hpx3cdu9ve01jx6d.js → date-range-picker-oivlshld01jbel29.js}
RENAMED
|
@@ -299,7 +299,7 @@ function DateRangeMonthHeader({ month, year, size = KUMO_DATE_RANGE_PICKER_DEFAU
|
|
|
299
299
|
children: /* @__PURE__ */ jsx("input", {
|
|
300
300
|
"aria-label": "Edit month and year",
|
|
301
301
|
defaultValue: `${month} ${year}`,
|
|
302
|
-
className: cn("w-full rounded-md border-none bg-transparent py-1.5 text-center font-semibold text-kumo-default transition-all duration-200 focus:ring-[1.5px] focus:ring-kumo-focus/50 focus:outline-
|
|
302
|
+
className: cn("w-full rounded-md border-none bg-transparent py-1.5 text-center font-semibold text-kumo-default transition-all duration-200 focus:ring-[1.5px] focus:ring-kumo-focus/50 focus:outline-hidden", sizeConfig.textSize),
|
|
303
303
|
onBlur: (e) => {
|
|
304
304
|
if (e.currentTarget.value.length === 0) return;
|
|
305
305
|
updateCurrentMonth?.(e.currentTarget.value);
|
|
@@ -7,7 +7,7 @@ import { r as DialogBackdrop, t as DialogPopup } from "./DialogPopup-n6w7b389e7b
|
|
|
7
7
|
import { i as DialogClose$1, n as DialogTitle$1, r as DialogDescription$1, t as DialogTrigger$1 } from "./DialogTrigger-kpugfkbfswqrus4u.js";
|
|
8
8
|
import { t as DialogRoot$1 } from "./DialogRoot-hkkqj7vcjpkx8qk8.js";
|
|
9
9
|
import { n as AlertDialogRoot, t as AlertDialogTrigger } from "./AlertDialogTrigger-l1r1gbxcky1xq889.js";
|
|
10
|
-
import { t as LayerCard } from "./layer-card-
|
|
10
|
+
import { t as LayerCard } from "./layer-card-lsmeuqic9i1isv2b.js";
|
|
11
11
|
import { createContext, useContext } from "react";
|
|
12
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
//#region src/components/dialog/dialog.tsx
|
|
@@ -51,7 +51,7 @@ function useDialogRole() {
|
|
|
51
51
|
return useContext(DialogRoleContext);
|
|
52
52
|
}
|
|
53
53
|
function dialogVariants({ size = KUMO_DIALOG_DEFAULT_VARIANTS.size } = {}) {
|
|
54
|
-
return cn("shadow-m ring ring-kumo-line fixed top-8 left-1/2 sm:top-16 w-full max-w-[calc(100vw-2rem)] -translate-x-1/2 overflow-hidden rounded-xl bg-kumo-base text-kumo-default duration-150 data-ending-style:scale-90 data-ending-style:opacity-0 data-starting-style:scale-90 data-starting-style:opacity-0", resolveVariant(KUMO_DIALOG_VARIANTS.size, size, KUMO_DIALOG_DEFAULT_VARIANTS.size).classes);
|
|
54
|
+
return cn("shadow-m ring ring-kumo-line fixed top-8 left-1/2 sm:top-16 w-full max-w-[calc(100vw-2rem)] max-h-[calc(100dvh-4rem)] sm:max-h-[calc(100dvh-6rem)] -translate-x-1/2 overflow-x-hidden overflow-y-auto overscroll-contain rounded-xl bg-kumo-base text-kumo-default duration-150 data-ending-style:scale-90 data-ending-style:opacity-0 data-starting-style:scale-90 data-starting-style:opacity-0", resolveVariant(KUMO_DIALOG_VARIANTS.size, size, KUMO_DIALOG_DEFAULT_VARIANTS.size).classes);
|
|
55
55
|
}
|
|
56
56
|
/**
|
|
57
57
|
* Modal dialog overlay with backdrop. Compound component with `Dialog.Root`,
|
|
@@ -1,6 +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 unwrapLazyElement } from "./unwrap-lazy-element-hzbdkmujhd7iksau.js";
|
|
4
5
|
import { n as useLinkComponent } from "./link-provider-kbwllpbo24fvgioj.js";
|
|
5
6
|
import { n as usePortalContainer } from "./portal-provider-eveknxf26oudn7pp.js";
|
|
6
7
|
import { t as Separator } from "./Separator-fhwve0tfny3tht3a.js";
|
|
@@ -31,7 +32,8 @@ function dropdownVariants({ variant = KUMO_DROPDOWN_DEFAULT_VARIANTS.variant } =
|
|
|
31
32
|
* identically. The slot also lets icon-less rows detect that a sibling has an
|
|
32
33
|
* icon and inset themselves to keep the text aligned.
|
|
33
34
|
*/
|
|
34
|
-
const renderIconNode = (
|
|
35
|
+
const renderIconNode = (iconProp) => {
|
|
36
|
+
const IconComponent = unwrapLazyElement(iconProp);
|
|
35
37
|
if (!IconComponent) return null;
|
|
36
38
|
let icon;
|
|
37
39
|
if (React$1.isValidElement(IconComponent)) icon = React$1.cloneElement(IconComponent, { className: cn("h-4 w-4", IconComponent.props.className) });
|
|
@@ -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 Button } from "./button-
|
|
4
|
+
import { t as Button } from "./button-hzvowfkbathmx8yg.js";
|
|
5
5
|
import { t as Text } from "./text-me99rjbjkaff98gp.js";
|
|
6
6
|
import { t as useCopyFeedback } from "./use-copy-feedback-gl55ghst0csvpv4j.js";
|
|
7
7
|
import { useCallback } from "react";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as cn } from "./vendor-styling-gs32v7xt5znc8kg0.js";
|
|
3
|
-
import { r as Label } from "./label-
|
|
3
|
+
import { r as Label } from "./label-f9vvtexndkpjlrv0.js";
|
|
4
4
|
import { n as FieldRoot, t as FieldLabel } from "./FieldLabel-fjc7tdis7rcbq8o4.js";
|
|
5
5
|
import { n as FieldError, t as FieldDescription } from "./FieldDescription-orix2gepowrp5ni4.js";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
package/dist/chunks/{inline-copy-text-57r67slswfqvgbaf.js → inline-copy-text-c6wa49ys72pj7k53.js}
RENAMED
|
@@ -18,7 +18,7 @@ function resolveCopyValue(children, value) {
|
|
|
18
18
|
const KUMO_INLINE_COPY_TEXT_VARIANTS = {};
|
|
19
19
|
const KUMO_INLINE_COPY_TEXT_DEFAULT_VARIANTS = {};
|
|
20
20
|
/** Base classes shared by every InlineCopyText. */
|
|
21
|
-
const KUMO_INLINE_COPY_TEXT_STYLING = { baseClasses: "group/inline-copy flex min-w-0 max-w-full cursor-pointer items-center gap-1 rounded-xs border-0 bg-transparent p-0 focus-visible:outline-
|
|
21
|
+
const KUMO_INLINE_COPY_TEXT_STYLING = { baseClasses: "group/inline-copy flex min-w-0 max-w-full cursor-pointer items-center gap-1 rounded-xs border-0 bg-transparent p-0 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-kumo-brand" };
|
|
22
22
|
/**
|
|
23
23
|
* Compact, borderless copy control for IDs and other short values displayed
|
|
24
24
|
* inline or inside dense table cells.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as cn } from "./vendor-styling-gs32v7xt5znc8kg0.js";
|
|
3
3
|
import { t as FieldControl } from "./FieldControl-hjj2tcqruozadgdi.js";
|
|
4
|
-
import { a as normalizeFieldError, t as Field } from "./field-
|
|
5
|
-
import { r as inputVariants } from "./input-
|
|
4
|
+
import { a as normalizeFieldError, t as Field } from "./field-gkrpde59au4kjh7q.js";
|
|
5
|
+
import { r as inputVariants } from "./input-ggn78losfydwdjqg.js";
|
|
6
6
|
import * as React$1 from "react";
|
|
7
7
|
import { useCallback, useEffect, useLayoutEffect, useRef } from "react";
|
|
8
8
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { t as cn } from "./vendor-styling-gs32v7xt5znc8kg0.js";
|
|
3
3
|
import { t as resolveVariant } from "./resolve-variant-l6x5ksfrjtu4m66l.js";
|
|
4
4
|
import { t as Input$1 } from "./Input-ozudotydd679ly63.js";
|
|
5
|
-
import { a as normalizeFieldError, t as Field } from "./field-
|
|
5
|
+
import { a as normalizeFieldError, t as Field } from "./field-gkrpde59au4kjh7q.js";
|
|
6
6
|
import { forwardRef } from "react";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
//#region src/components/input/input.tsx
|
|
@@ -42,7 +42,7 @@ const KUMO_INPUT_DEFAULT_VARIANTS = {
|
|
|
42
42
|
variant: "default"
|
|
43
43
|
};
|
|
44
44
|
function inputVariants({ variant = KUMO_INPUT_DEFAULT_VARIANTS.variant, size = KUMO_INPUT_DEFAULT_VARIANTS.size, parentFocusIndicator = false, focusIndicator = false } = {}) {
|
|
45
|
-
return cn("border-0 bg-kumo-control text-kumo-default ring ring-kumo-line outline-none focus:outline-
|
|
45
|
+
return cn("border-0 bg-kumo-control text-kumo-default ring ring-kumo-line outline-none focus:outline-hidden", "kumo-input-placeholder disabled:text-kumo-inactive", resolveVariant(KUMO_INPUT_VARIANTS.size, size, KUMO_INPUT_DEFAULT_VARIANTS.size).classes, resolveVariant(KUMO_INPUT_VARIANTS.variant, variant, KUMO_INPUT_DEFAULT_VARIANTS.variant).classes, parentFocusIndicator && "has-focus-visible:outline-hidden", parentFocusIndicator && (variant === "error" ? "focus-within:ring-[1.5px] focus-within:ring-kumo-danger/50" : "focus-within:ring-[1.5px] focus-within:ring-kumo-focus/50"), focusIndicator && (variant === "error" ? "focus:ring-[1.5px] focus:ring-kumo-danger/50" : "focus:ring-[1.5px] focus:ring-kumo-focus/50"));
|
|
46
46
|
}
|
|
47
47
|
const Input = forwardRef((props, ref) => {
|
|
48
48
|
const { className, size = "base", variant: variantProp, label, labelTooltip, description, error, passwordManagerIgnore = false, ...inputProps } = props;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as cn } from "./vendor-styling-gs32v7xt5znc8kg0.js";
|
|
3
|
+
import { t as unwrapLazyElement } from "./unwrap-lazy-element-hzbdkmujhd7iksau.js";
|
|
3
4
|
import { t as Tooltip } from "./tooltip-bcymn9bfyz29fvji.js";
|
|
4
|
-
import { t as Button$1 } from "./button-
|
|
5
|
-
import { t as Field } from "./field-
|
|
6
|
-
import { r as inputVariants, t as Input$1 } from "./input-
|
|
5
|
+
import { t as Button$1 } from "./button-hzvowfkbathmx8yg.js";
|
|
6
|
+
import { t as Field } from "./field-gkrpde59au4kjh7q.js";
|
|
7
|
+
import { r as inputVariants, t as Input$1 } from "./input-ggn78losfydwdjqg.js";
|
|
7
8
|
import React, { Children, cloneElement, createContext, forwardRef, isValidElement, useContext, useId, useMemo } from "react";
|
|
8
9
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
9
10
|
//#region src/components/input-group/context.ts
|
|
@@ -190,7 +191,7 @@ const COMPACT_BUTTON_SIZE = {
|
|
|
190
191
|
*
|
|
191
192
|
* Pass a `tooltip` prop to show a tooltip on hover.
|
|
192
193
|
*/
|
|
193
|
-
const Button = forwardRef(({ children, className, variant, size, disabled, tooltip, tooltipSide = "bottom", icon, ...props }, ref) => {
|
|
194
|
+
const Button = forwardRef(({ children, className, variant, size, disabled, tooltip, tooltipSide = "bottom", icon: iconProp, ...props }, ref) => {
|
|
194
195
|
const context = useInputGroupContext("Button");
|
|
195
196
|
const isInsideAddon = useContext(InputGroupAddonContext);
|
|
196
197
|
const isDisabled = disabled ?? context?.disabled;
|
|
@@ -199,6 +200,7 @@ const Button = forwardRef(({ children, className, variant, size, disabled, toolt
|
|
|
199
200
|
if (context && size !== void 0) console.warn("InputGroup.Button: Set `size` on <InputGroup> instead of <InputGroup.Button>.");
|
|
200
201
|
const tooltipAriaLabel = typeof tooltip === "string" && !props["aria-label"] ? tooltip : void 0;
|
|
201
202
|
const contextIconSize = context ? INPUT_GROUP_SIZE[context.size ?? "base"].iconSize : void 0;
|
|
203
|
+
const icon = unwrapLazyElement(iconProp);
|
|
202
204
|
const sizedIcon = icon && contextIconSize && (typeof icon === "function" || typeof icon === "object" && icon !== null && !React.isValidElement(icon)) ? React.createElement(icon, { size: contextIconSize }) : icon;
|
|
203
205
|
const btn = /* @__PURE__ */ jsx(Button$1, {
|
|
204
206
|
ref,
|
|
@@ -346,7 +348,7 @@ const Root = forwardRef(({ size = "base", children, className, disabled = false,
|
|
|
346
348
|
error,
|
|
347
349
|
inputId
|
|
348
350
|
]);
|
|
349
|
-
const containerClassName = cn("relative w-full cursor-text", inputVariants({ size }), "data-[disabled]:pointer-events-none data-[disabled]:opacity-50", focusMode === "container" ? ["overflow-hidden", "focus-within:ring-[1.5px] focus-within:ring-kumo-focus/50"] : "isolate overflow-visible shadow-none ring-0", "has-[input[aria-invalid=true]]:ring-kumo-danger", "px-0", "flex items-center gap-0", "has-[[data-slot=input-group-suffix]]:[&_input]:[field-sizing:content]", "has-[[data-slot=input-group-suffix]]:[&_input]:max-w-full", "has-[[data-slot=input-group-suffix]]:[&_input]:grow-0", "has-[[data-slot=input-group-suffix]]:[&_input]:pr-0", INPUT_GROUP_HAS_CLASSES[size], "!mb-0", className);
|
|
351
|
+
const containerClassName = cn("relative w-full cursor-text", inputVariants({ size }), "data-[disabled]:pointer-events-none data-[disabled]:opacity-50", focusMode === "container" ? ["overflow-hidden", "focus-within:ring-[1.5px] focus-within:ring-kumo-focus/50 has-focus-visible:outline-hidden"] : "isolate overflow-visible shadow-none ring-0", "has-[input[aria-invalid=true]]:ring-kumo-danger", "px-0", "flex items-center gap-0", "has-[[data-slot=input-group-suffix]]:[&_input]:[field-sizing:content]", "has-[[data-slot=input-group-suffix]]:[&_input]:max-w-full", "has-[[data-slot=input-group-suffix]]:[&_input]:grow-0", "has-[[data-slot=input-group-suffix]]:[&_input]:pr-0", INPUT_GROUP_HAS_CLASSES[size], "!mb-0", className);
|
|
350
352
|
const dataProps = {
|
|
351
353
|
"data-slot": "input-group",
|
|
352
354
|
"data-focus-mode": focusMode,
|
|
@@ -362,7 +364,7 @@ const Root = forwardRef(({ size = "base", children, className, disabled = false,
|
|
|
362
364
|
value: containerZoneContext,
|
|
363
365
|
children: /* @__PURE__ */ jsxs("div", {
|
|
364
366
|
"data-slot": "input-group-container-zone",
|
|
365
|
-
className: cn(inputVariants({ size }), "overflow-hidden", "has-[input[aria-invalid=true]]:ring-kumo-danger", "px-0", "flex min-w-0 flex-1 items-center gap-0", "shadow-none ring-0", "border border-kumo-line", "focus-within:border-kumo-focus/50", "focus-within:z-2", "not-first:-ml-px", "rounded-none first:rounded-l-[inherit] last:rounded-r-[inherit]", INPUT_GROUP_HAS_CLASSES[size], "has-data-[slot=input-group-suffix]:[&_input]:field-sizing-content", "has-data-[slot=input-group-suffix]:[&_input]:max-w-full", "has-data-[slot=input-group-suffix]:[&_input]:grow-0", "has-data-[slot=input-group-suffix]:[&_input]:pr-0"),
|
|
367
|
+
className: cn(inputVariants({ size }), "overflow-hidden", "has-[input[aria-invalid=true]]:ring-kumo-danger", "px-0", "flex min-w-0 flex-1 items-center gap-0", "shadow-none ring-0", "border border-kumo-line", "focus-within:border-kumo-focus/50 has-focus-visible:outline-hidden", "focus-within:z-2", "not-first:-ml-px", "rounded-none first:rounded-l-[inherit] last:rounded-r-[inherit]", INPUT_GROUP_HAS_CLASSES[size], "has-data-[slot=input-group-suffix]:[&_input]:field-sizing-content", "has-data-[slot=input-group-suffix]:[&_input]:max-w-full", "has-data-[slot=input-group-suffix]:[&_input]:grow-0", "has-data-[slot=input-group-suffix]:[&_input]:pr-0"),
|
|
366
368
|
children: [label && /* @__PURE__ */ jsx("label", {
|
|
367
369
|
htmlFor: inputId,
|
|
368
370
|
className: "absolute inset-0 z-0 mb-0! cursor-text",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as cn } from "./vendor-styling-gs32v7xt5znc8kg0.js";
|
|
3
3
|
import { t as Tooltip } from "./tooltip-bcymn9bfyz29fvji.js";
|
|
4
|
-
import { t as Button } from "./button-
|
|
4
|
+
import { t as Button } from "./button-hzvowfkbathmx8yg.js";
|
|
5
5
|
import { n as useKumoLocale } from "./locale-provider-e3310bgo4lnffqkd.js";
|
|
6
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { Info } from "@phosphor-icons/react";
|
|
@@ -7,8 +7,8 @@ import { jsx } from "react/jsx-runtime";
|
|
|
7
7
|
//#region src/components/layer-card/layer-card.tsx
|
|
8
8
|
const LAYER_CARD_SURFACE_CLASSES = "overflow-hidden rounded-lg bg-kumo-base shadow-xs ring ring-kumo-line";
|
|
9
9
|
const LAYER_CARD_LAYERED_ROOT_CLASSES = "flex w-full flex-col overflow-hidden rounded-lg bg-kumo-elevated text-base ring ring-kumo-hairline";
|
|
10
|
-
const LAYER_CARD_SECONDARY_CLASSES = "-my-2 flex items-center gap-2 bg-kumo-elevated p-4 text-base font-medium text-kumo-subtle";
|
|
11
|
-
const LAYER_CARD_PRIMARY_CLASSES = "relative flex flex-col gap-2 overflow-hidden rounded-lg bg-kumo-base p-4 pr-3 text-inherit no-underline ring ring-kumo-fill";
|
|
10
|
+
const LAYER_CARD_SECONDARY_CLASSES = "-my-2 flex shrink-0 items-center gap-2 bg-kumo-elevated p-4 text-base font-medium text-kumo-subtle";
|
|
11
|
+
const LAYER_CARD_PRIMARY_CLASSES = "relative flex shrink-0 flex-col gap-2 overflow-hidden rounded-lg bg-kumo-base p-4 pr-3 text-inherit no-underline ring ring-kumo-fill";
|
|
12
12
|
function layerCardVariants(_props = {}) {
|
|
13
13
|
return cn(LAYER_CARD_SURFACE_CLASSES);
|
|
14
14
|
}
|
|
@@ -3,11 +3,11 @@ import { t as cn } from "./vendor-styling-gs32v7xt5znc8kg0.js";
|
|
|
3
3
|
import { t as resolveVariant } from "./resolve-variant-l6x5ksfrjtu4m66l.js";
|
|
4
4
|
import { t as addEventListener } from "./addEventListener-ku3x23446prmd1kz.js";
|
|
5
5
|
import { n as usePortalContainer } from "./portal-provider-eveknxf26oudn7pp.js";
|
|
6
|
-
import { t as Button } from "./button-
|
|
6
|
+
import { t as Button } from "./button-hzvowfkbathmx8yg.js";
|
|
7
7
|
import { n as useKumoLocale } from "./locale-provider-e3310bgo4lnffqkd.js";
|
|
8
8
|
import { t as Text } from "./text-me99rjbjkaff98gp.js";
|
|
9
|
-
import { t as LayerCard } from "./layer-card-
|
|
10
|
-
import { t as DropdownMenu } from "./dropdown-
|
|
9
|
+
import { t as LayerCard } from "./layer-card-lsmeuqic9i1isv2b.js";
|
|
10
|
+
import { t as DropdownMenu } from "./dropdown-m5a8nwer5hpvnkfk.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";
|
|
@@ -55,7 +55,7 @@ const MenuOption = ({ icon, id, isActive, onClick, tooltip }) => {
|
|
|
55
55
|
"data-kumo-component": "MenuBar",
|
|
56
56
|
"data-kumo-part": "option",
|
|
57
57
|
"aria-label": tooltip,
|
|
58
|
-
className: cn("relative -ml-px flex h-full w-11 cursor-pointer items-center justify-center rounded-md border-none bg-kumo-recessed transition-colors first:rounded-l-lg last:rounded-r-lg focus:z-3 focus:ring-kumo-focus/50 focus:outline-
|
|
58
|
+
className: cn("relative -ml-px flex h-full w-11 cursor-pointer items-center justify-center rounded-md border-none bg-kumo-recessed transition-colors first:rounded-l-lg last:rounded-r-lg focus:z-3 focus:ring-kumo-focus/50 focus:outline-hidden focus-visible:z-3 focus-visible:ring-2 focus-visible:ring-kumo-brand", { "z-2 bg-kumo-base shadow-xs transition-colors": isActive === id }),
|
|
59
59
|
onClick,
|
|
60
60
|
children: /* @__PURE__ */ jsx(IconContext.Provider, {
|
|
61
61
|
value: { size: 18 },
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as cn } from "./vendor-styling-gs32v7xt5znc8kg0.js";
|
|
3
|
-
import { t as InputGroup } from "./input-group-
|
|
4
|
-
import { t as Select } from "./select-
|
|
3
|
+
import { t as InputGroup } from "./input-group-grlfeiivjuhd7jif.js";
|
|
4
|
+
import { t as Select } from "./select-ei05w4df1th4fa4e.js";
|
|
5
5
|
import { createContext, useContext, useEffect, useMemo, useState } from "react";
|
|
6
6
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { CaretDoubleLeftIcon, CaretDoubleRightIcon, CaretLeftIcon, CaretRightIcon } from "@phosphor-icons/react";
|
|
@@ -77,7 +77,7 @@ function _RadioItem({ className, disabled, variant = "default", appearance: appe
|
|
|
77
77
|
className: "text-base font-medium text-kumo-default",
|
|
78
78
|
children: label
|
|
79
79
|
}), description && /* @__PURE__ */ jsx("span", {
|
|
80
|
-
className: "text-sm text-kumo-subtle",
|
|
80
|
+
className: "text-sm leading-snug text-pretty text-kumo-subtle",
|
|
81
81
|
children: description
|
|
82
82
|
})]
|
|
83
83
|
}), /* @__PURE__ */ jsx(RadioRoot, {
|
|
@@ -86,7 +86,7 @@ function _RadioItem({ className, disabled, variant = "default", appearance: appe
|
|
|
86
86
|
"data-kumo-part": "item",
|
|
87
87
|
value,
|
|
88
88
|
disabled,
|
|
89
|
-
className: cn("relative mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-full border-0 bg-kumo-base ring focus:ring-kumo-focus focus:outline-
|
|
89
|
+
className: cn("relative mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-full 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-line", !disabled && variant !== "error" && "group-hover:ring-kumo-hairline focus-visible:outline-offset-3", !disabled && variant === "error" && "focus-visible:outline-offset-3", "data-checked:bg-kumo-contrast"),
|
|
90
90
|
children: /* @__PURE__ */ jsx(RadioIndicator, {
|
|
91
91
|
keepMounted: true,
|
|
92
92
|
className: "flex items-center justify-center",
|
|
@@ -105,7 +105,7 @@ function _RadioItem({ className, disabled, variant = "default", appearance: appe
|
|
|
105
105
|
"data-kumo-part": "item",
|
|
106
106
|
value,
|
|
107
107
|
disabled,
|
|
108
|
-
className: cn("relative mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-full border-0 bg-kumo-base ring after:absolute after:-inset-x-3 after:-inset-y-2 focus:outline-
|
|
108
|
+
className: cn("relative mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-full border-0 bg-kumo-base ring after:absolute after:-inset-x-3 after:-inset-y-2 focus:outline-hidden", variant === "error" ? "ring-kumo-danger" : "ring-kumo-line", !disabled && variant !== "error" && "group-hover:ring-kumo-hairline focus:ring-2 focus:ring-kumo-focus focus-visible:ring-2 focus-visible:ring-kumo-brand focus-visible:outline-offset-3", !disabled && variant === "error" && "focus:ring-2 focus:ring-kumo-focus focus-visible:ring-2 focus-visible:ring-kumo-brand focus-visible:outline-offset-3", "data-checked:bg-kumo-contrast"),
|
|
109
109
|
children: /* @__PURE__ */ jsx(RadioIndicator, {
|
|
110
110
|
keepMounted: true,
|
|
111
111
|
className: "flex items-center justify-center",
|
|
@@ -136,37 +136,38 @@ function RadioGroup({ legend, children, orientation = "vertical", appearance = "
|
|
|
136
136
|
appearance,
|
|
137
137
|
orientation
|
|
138
138
|
},
|
|
139
|
-
children: /* @__PURE__ */
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
children: /* @__PURE__ */ jsxs(FieldsetRoot, {
|
|
139
|
+
children: /* @__PURE__ */ jsxs(FieldsetRoot, {
|
|
140
|
+
render: /* @__PURE__ */ jsx(RadioGroup$1, {
|
|
141
|
+
render: /* @__PURE__ */ jsx("fieldset", {}),
|
|
142
|
+
defaultValue,
|
|
143
|
+
value,
|
|
144
|
+
onValueChange: (newValue, eventDetails) => onValueChange?.(newValue, eventDetails),
|
|
146
145
|
disabled,
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
146
|
+
name
|
|
147
|
+
}),
|
|
148
|
+
disabled,
|
|
149
|
+
className: cn("flex flex-col p-0", appearance === "card" || appearance === "segmented" ? "gap-2" : "gap-4", className),
|
|
150
|
+
children: [
|
|
151
|
+
legend && /* @__PURE__ */ jsx(FieldsetLegend, {
|
|
152
|
+
className: "text-base font-medium text-kumo-default",
|
|
153
|
+
children: legend
|
|
154
|
+
}),
|
|
155
|
+
composableLegends,
|
|
156
|
+
/* @__PURE__ */ jsx("div", {
|
|
157
|
+
"data-kumo-component": "Radio",
|
|
158
|
+
"data-kumo-part": "items",
|
|
159
|
+
className: cn(appearance === "segmented" ? "inline-flex w-max flex-row flex-nowrap items-center self-start rounded-lg bg-kumo-control shadow-xs ring ring-kumo-line" : orientation === "vertical" ? appearance === "card" ? "flex flex-col overflow-hidden rounded-lg ring ring-kumo-line" : "flex flex-col gap-2" : appearance === "card" ? "grid grid-cols-2 overflow-hidden rounded-lg bg-kumo-base ring ring-kumo-line" : "flex flex-row flex-wrap gap-2"),
|
|
160
|
+
children: itemChildren
|
|
161
|
+
}),
|
|
162
|
+
error && /* @__PURE__ */ jsx("p", {
|
|
163
|
+
className: "text-sm text-kumo-danger",
|
|
164
|
+
children: error
|
|
165
|
+
}),
|
|
166
|
+
description && /* @__PURE__ */ jsx("p", {
|
|
167
|
+
className: "text-sm leading-snug text-pretty text-kumo-subtle",
|
|
168
|
+
children: description
|
|
169
|
+
})
|
|
170
|
+
]
|
|
170
171
|
})
|
|
171
172
|
});
|
|
172
173
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as cn } from "./vendor-styling-gs32v7xt5znc8kg0.js";
|
|
3
3
|
import { n as usePortalContainer } from "./portal-provider-eveknxf26oudn7pp.js";
|
|
4
|
-
import { i as buttonVariants } from "./button-
|
|
5
|
-
import { r as Label } from "./label-
|
|
6
|
-
import { t as Field } from "./field-
|
|
7
|
-
import { n as KUMO_INPUT_VARIANTS } from "./input-
|
|
8
|
-
import { t as SkeletonLine } from "./skeleton-line-
|
|
4
|
+
import { i as buttonVariants } from "./button-hzvowfkbathmx8yg.js";
|
|
5
|
+
import { r as Label } from "./label-f9vvtexndkpjlrv0.js";
|
|
6
|
+
import { t as Field } from "./field-gkrpde59au4kjh7q.js";
|
|
7
|
+
import { n as KUMO_INPUT_VARIANTS } from "./input-ggn78losfydwdjqg.js";
|
|
8
|
+
import { t as SkeletonLine } from "./skeleton-line-kmhnp0lx3rxhioxa.js";
|
|
9
9
|
import { _ as SelectLabel, a as SelectItemIndicator, c as SelectPopup, f as SelectPortal, h as SelectTrigger, i as SelectItemText, m as SelectValue, n as SelectGroupLabel, o as SelectItem, p as SelectIcon, r as SelectGroup, s as SelectList, t as SelectSeparator, u as SelectPositioner, v as SelectRoot } from "./SelectSeparator-nnak70azojox8b2b.js";
|
|
10
10
|
import { forwardRef, useId } from "react";
|
|
11
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -93,11 +93,11 @@ function Select({ children, className, render, renderValue, label, hideLabel, pl
|
|
|
93
93
|
const propLookup = props;
|
|
94
94
|
const ariaLabel = propLookup["aria-label"];
|
|
95
95
|
const ariaLabelledby = propLookup["aria-labelledby"];
|
|
96
|
-
const fallbackLabel = typeof label === "string" ? label : placeholder;
|
|
97
96
|
if (hideLabel !== void 0) console.warn("[Kumo Select]: `hideLabel` is deprecated. For hidden labels, use `aria-label` instead of `label` + `hideLabel={true}`.\n Migration:\n - For visible labels: <Select label=\"Country\" /> (hideLabel no longer needed)\n - For hidden labels: <Select aria-label=\"Select a country\" /> (remove label and hideLabel)");
|
|
98
97
|
const useFieldWrapper = label && hideLabel !== true;
|
|
99
|
-
const triggerLabelledBy =
|
|
100
|
-
const triggerAriaLabel = ariaLabel ?? (!triggerLabelledBy ?
|
|
98
|
+
const triggerLabelledBy = ariaLabelledby ?? (label && !useFieldWrapper ? labelId : void 0);
|
|
99
|
+
const triggerAriaLabel = ariaLabel ?? (!label && !triggerLabelledBy ? placeholder : void 0);
|
|
100
|
+
const triggerLabelledByProps = useFieldWrapper && ariaLabel === void 0 && ariaLabelledby === void 0 ? {} : { "aria-labelledby": triggerLabelledBy };
|
|
101
101
|
const normalizedItems = props.items ? normalizeItems(props.items) : void 0;
|
|
102
102
|
const renderedChildren = children ? children : props.items ? renderOptionsFromItems(props.items) : null;
|
|
103
103
|
const valueChildrenFn = renderValue ? (value) => {
|
|
@@ -126,7 +126,7 @@ function Select({ children, className, render, renderValue, label, hideLabel, pl
|
|
|
126
126
|
render,
|
|
127
127
|
className: cn(selectVariants({ size }), props.disabled && "cursor-not-allowed opacity-50", error && "!ring-kumo-danger focus:ring-[1.5px] focus:ring-kumo-danger/50", className),
|
|
128
128
|
"aria-label": triggerAriaLabel,
|
|
129
|
-
|
|
129
|
+
...triggerLabelledByProps,
|
|
130
130
|
children: [loading ? /* @__PURE__ */ jsx(SkeletonLine, { className: "w-32" }) : /* @__PURE__ */ jsx(SelectValue, {
|
|
131
131
|
placeholder,
|
|
132
132
|
className: "min-w-0 truncate data-[placeholder]:text-kumo-placeholder",
|
|
@@ -215,7 +215,7 @@ function Option({ children, value, disabled, className }) {
|
|
|
215
215
|
"data-kumo-part": "option",
|
|
216
216
|
value,
|
|
217
217
|
disabled,
|
|
218
|
-
className: cn("group mx-1.5 flex cursor-pointer items-center justify-between gap-2 rounded px-2 py-1.5 text-base outline-none", "focus-visible:z-50 focus-visible:ring-2 focus-visible:ring-kumo-brand focus-visible:ring-inset", "data-highlighted:bg-kumo-tint", "data-[disabled]:pointer-events-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50", className),
|
|
218
|
+
className: cn("group mx-1.5 flex cursor-pointer items-center justify-between gap-2 rounded px-2 py-1.5 text-base outline-none focus-visible:outline-hidden", "focus-visible:z-50 focus-visible:ring-2 focus-visible:ring-kumo-brand focus-visible:ring-inset", "data-highlighted:bg-kumo-tint", "data-[disabled]:pointer-events-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50", className),
|
|
219
219
|
children: [/* @__PURE__ */ jsx(SelectItemText, { children }), /* @__PURE__ */ jsx(SelectItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) })]
|
|
220
220
|
});
|
|
221
221
|
}
|
package/dist/chunks/{sensitive-input-heb3xapwahzhpq6y.js → sensitive-input-owfvgxmefm5lzzx8.js}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as cn } from "./vendor-styling-gs32v7xt5znc8kg0.js";
|
|
3
3
|
import { t as Input } from "./Input-ozudotydd679ly63.js";
|
|
4
|
-
import { t as Field } from "./field-
|
|
5
|
-
import { n as KUMO_INPUT_VARIANTS, r as inputVariants } from "./input-
|
|
4
|
+
import { t as Field } from "./field-gkrpde59au4kjh7q.js";
|
|
5
|
+
import { n as KUMO_INPUT_VARIANTS, r as inputVariants } from "./input-ggn78losfydwdjqg.js";
|
|
6
6
|
import { t as useCopyFeedback } from "./use-copy-feedback-gl55ghst0csvpv4j.js";
|
|
7
7
|
import { forwardRef, useCallback, useId, useRef, useState } from "react";
|
|
8
8
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -160,6 +160,7 @@ const SensitiveInput = forwardRef(({ value: controlledValue, defaultValue = "",
|
|
|
160
160
|
onKeyDown: handleInputKeyDown,
|
|
161
161
|
disabled,
|
|
162
162
|
readOnly: readOnly || isMaskedWithValue,
|
|
163
|
+
required,
|
|
163
164
|
autoComplete,
|
|
164
165
|
tabIndex: isMaskedWithValue ? -1 : 0,
|
|
165
166
|
className: cn("kumo-input-placeholder w-full border-0 bg-transparent p-0 text-kumo-default ring-0 outline-none disabled:cursor-not-allowed disabled:text-kumo-subtle", size === "xs" && "pr-5", size === "sm" && "pr-6", size === "base" && "pr-8", size === "lg" && "pr-10", isMaskedWithValue && "pointer-events-none text-transparent"),
|
|
@@ -198,7 +199,7 @@ const SensitiveInput = forwardRef(({ value: controlledValue, defaultValue = "",
|
|
|
198
199
|
onClick: copyToClipboard,
|
|
199
200
|
onKeyDown: (e) => e.stopPropagation(),
|
|
200
201
|
"aria-label": copied ? "Copied" : "Copy to clipboard",
|
|
201
|
-
className: cn("absolute -top-px right-2 -translate-y-full cursor-pointer rounded-t-md bg-kumo-brand px-2 py-0.5 text-xs text-white opacity-0 transition-opacity group-focus-within/container:opacity-100 group-hover/container:opacity-100 hover:brightness-120 focus:ring-kumo-focus/50 focus:outline-
|
|
202
|
+
className: cn("absolute -top-px right-2 -translate-y-full cursor-pointer rounded-t-md bg-kumo-brand px-2 py-0.5 text-xs text-white opacity-0 transition-opacity group-focus-within/container:opacity-100 group-hover/container:opacity-100 hover:brightness-120 focus:ring-kumo-focus/50 focus:outline-hidden focus-visible:ring-2 focus-visible:ring-kumo-brand", "m-0 h-auto min-h-0 border-none shadow-none"),
|
|
202
203
|
children: copied ? "Copied" : "Copy"
|
|
203
204
|
})
|
|
204
205
|
] });
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as cn } from "./vendor-styling-gs32v7xt5znc8kg0.js";
|
|
3
|
+
import { t as unwrapLazyElement } from "./unwrap-lazy-element-hzbdkmujhd7iksau.js";
|
|
3
4
|
import { n as useLinkComponent } from "./link-provider-kbwllpbo24fvgioj.js";
|
|
4
5
|
import { n as TooltipProvider, t as Tooltip } from "./tooltip-bcymn9bfyz29fvji.js";
|
|
5
|
-
import { t as Button } from "./button-
|
|
6
|
-
import { t as SkeletonLine } from "./skeleton-line-
|
|
6
|
+
import { t as Button } from "./button-hzvowfkbathmx8yg.js";
|
|
7
|
+
import { t as SkeletonLine } from "./skeleton-line-kmhnp0lx3rxhioxa.js";
|
|
7
8
|
import { i as ScrollAreaViewport, n as ScrollAreaContent, r as ScrollAreaScrollbar, s as ScrollAreaRoot, t as ScrollAreaThumb } from "./ScrollAreaThumb-hxig41yn4lrurd3o.js";
|
|
8
9
|
import React, { createContext, forwardRef, useCallback, useContext, useEffect, useId, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
9
10
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -733,9 +734,10 @@ const SidebarMenuButton = forwardRef(({ className, icon: IconProp, active = fals
|
|
|
733
734
|
registerItem
|
|
734
735
|
]);
|
|
735
736
|
const iconNode = (() => {
|
|
736
|
-
|
|
737
|
-
if (
|
|
738
|
-
|
|
737
|
+
const icon = unwrapLazyElement(IconProp);
|
|
738
|
+
if (!icon) return null;
|
|
739
|
+
if (React.isValidElement(icon)) return icon;
|
|
740
|
+
return /* @__PURE__ */ jsx(icon, { className: cn("shrink-0 opacity-40", size === "base" ? "size-4" : "size-3.5") });
|
|
739
741
|
})();
|
|
740
742
|
const content = /* @__PURE__ */ jsxs("div", {
|
|
741
743
|
className: cn("flex min-w-0 flex-1 items-center gap-3", "translate-x-[-3px] group-not-data-[state=collapsed]/sidebar:translate-x-0", "transition-transform duration-(--sidebar-animation-duration)"),
|
|
@@ -747,7 +749,7 @@ const SidebarMenuButton = forwardRef(({ className, icon: IconProp, active = fals
|
|
|
747
749
|
}) : child)
|
|
748
750
|
})]
|
|
749
751
|
});
|
|
750
|
-
const buttonClasses = cn("group/menu-button relative flex w-full min-w-0 cursor-pointer items-center gap-2.5 rounded-lg outline-none", "before:absolute before:inset-x-0 before:-inset-y-px", size === "base" && "min-h-8.5 px-3 py-0 text-sm font-medium", size === "sm" && "min-h-7 px-2 py-0 text-sm", "text-kumo-default", "transition-[color,box-shadow,outline] duration-(--sidebar-animation-duration)", !active && "hover:bg-(--sidebar-active-bg)", active && "bg-(--sidebar-active-bg)", "has-[[data-active]]:bg-transparent has-[[data-active]]:hover:bg-(--sidebar-active-bg)", "focus:outline-
|
|
752
|
+
const buttonClasses = cn("group/menu-button relative flex w-full min-w-0 cursor-pointer items-center gap-2.5 rounded-lg outline-none", "before:absolute before:inset-x-0 before:-inset-y-px", size === "base" && "min-h-8.5 px-3 py-0 text-sm font-medium", size === "sm" && "min-h-7 px-2 py-0 text-sm", "text-kumo-default", "transition-[color,box-shadow,outline] duration-(--sidebar-animation-duration)", !active && "hover:bg-(--sidebar-active-bg)", active && "bg-(--sidebar-active-bg)", "has-[[data-active]]:bg-transparent has-[[data-active]]:hover:bg-(--sidebar-active-bg)", "focus:outline-hidden focus-visible:bg-(--sidebar-active-bg) focus-visible:text-kumo-strong", className);
|
|
751
753
|
let button;
|
|
752
754
|
const itemIdOnButton = isInsideMenuItem ? itemId : void 0;
|
|
753
755
|
if (href) button = /* @__PURE__ */ jsx(LinkComponent, {
|
|
@@ -873,7 +875,7 @@ SidebarMenuSubItem.displayName = "Sidebar.MenuSubItem";
|
|
|
873
875
|
const SidebarMenuSubButton = forwardRef(({ className, active = false, href, target, children, ...props }, ref) => {
|
|
874
876
|
const LinkComponent = useLinkComponent();
|
|
875
877
|
const isInsideMenuSubItem = useContext(MenuSubItemContext);
|
|
876
|
-
const buttonClasses = cn("group/menu-button relative flex min-h-8.5 w-full min-w-0 cursor-pointer items-center gap-2 rounded-lg px-3 py-0 text-sm font-medium outline-none", "before:absolute before:inset-x-0 before:-inset-y-px", "text-kumo-default transition-[color] duration-150", !active && "hover:bg-(--sidebar-active-bg)", active && "bg-(--sidebar-active-bg)", "focus:outline-
|
|
878
|
+
const buttonClasses = cn("group/menu-button relative flex min-h-8.5 w-full min-w-0 cursor-pointer items-center gap-2 rounded-lg px-3 py-0 text-sm font-medium outline-none", "before:absolute before:inset-x-0 before:-inset-y-px", "text-kumo-default transition-[color] duration-150", !active && "hover:bg-(--sidebar-active-bg)", active && "bg-(--sidebar-active-bg)", "focus:outline-hidden focus-visible:bg-(--sidebar-active-bg) focus-visible:text-kumo-strong", className);
|
|
877
879
|
const content = /* @__PURE__ */ jsx("span", {
|
|
878
880
|
className: "flex min-w-0 flex-1 items-center gap-2 overflow-hidden text-left",
|
|
879
881
|
children: React.Children.map(children, (child) => typeof child === "string" || typeof child === "number" ? /* @__PURE__ */ jsx("span", {
|
|
@@ -968,7 +970,7 @@ const SidebarTrigger = forwardRef(({ className, children, onClick, ...props }, r
|
|
|
968
970
|
"data-kumo-part": "trigger",
|
|
969
971
|
"aria-expanded": open,
|
|
970
972
|
"aria-label": open ? "Collapse sidebar" : "Expand sidebar",
|
|
971
|
-
className: cn("flex size-8.5 shrink-0 cursor-pointer items-center justify-center rounded-lg", "text-kumo-subtle hover:bg-(--sidebar-active-bg) hover:text-kumo-default", "focus:outline-
|
|
973
|
+
className: cn("flex size-8.5 shrink-0 cursor-pointer items-center justify-center rounded-lg", "text-kumo-subtle hover:bg-(--sidebar-active-bg) hover:text-kumo-default", "focus:outline-hidden focus-visible:ring-2 focus-visible:ring-kumo-brand focus-visible:ring-inset", className),
|
|
972
974
|
onClick: (e) => {
|
|
973
975
|
onClick?.(e);
|
|
974
976
|
toggleSidebar();
|
|
@@ -1115,7 +1117,7 @@ const SidebarResizeHandle = forwardRef(({ className, ...props }, ref) => {
|
|
|
1115
1117
|
"aria-label": "Resize sidebar",
|
|
1116
1118
|
tabIndex: 0,
|
|
1117
1119
|
"data-sidebar": "resize-handle",
|
|
1118
|
-
className: cn("absolute inset-y-0 z-2 hidden w-3 cursor-col-resize sm:block", "after:absolute after:inset-y-0 after:w-0.5", "after:bg-transparent after:transition-colors", "hover:after:bg-kumo-hairline focus-visible:after:bg-kumo-hairline active:after:bg-kumo-hairline", "focus:outline-
|
|
1120
|
+
className: cn("absolute inset-y-0 z-2 hidden w-3 cursor-col-resize sm:block", "after:absolute after:inset-y-0 after:w-0.5", "after:bg-transparent after:transition-colors", "hover:after:bg-kumo-hairline focus-visible:after:bg-kumo-hairline active:after:bg-kumo-hairline", "focus:outline-hidden", side === "left" && "right-0 after:right-0", side === "right" && "left-0 after:left-0", className),
|
|
1119
1121
|
onPointerDown: handlePointerDown,
|
|
1120
1122
|
onKeyDown: handleKeyDown,
|
|
1121
1123
|
...props
|