@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,9 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as cn } from "./vendor-styling-gs32v7xt5znc8kg0.js";
|
|
3
|
-
import { t as
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as
|
|
6
|
-
import {
|
|
3
|
+
import { t as unwrapLazyElement } from "./unwrap-lazy-element-hzbdkmujhd7iksau.js";
|
|
4
|
+
import { t as Tooltip } from "./tooltip-bcymn9bfyz29fvji.js";
|
|
5
|
+
import { t as Button$1 } from "./button-cyea767mx5dwgavm.js";
|
|
6
|
+
import { t as Field } from "./field-crf1hw5exr2oxemk.js";
|
|
7
|
+
import { r as inputVariants, t as Input$1 } from "./input-d1230n06m5b1p3rd.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,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-crf1hw5exr2oxemk.js";
|
|
5
|
+
import { r as inputVariants } from "./input-d1230n06m5b1p3rd.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";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as cn } from "./vendor-styling-gs32v7xt5znc8kg0.js";
|
|
3
|
-
import { t as Tooltip } from "./tooltip-
|
|
4
|
-
import { t as Button } from "./button-
|
|
3
|
+
import { t as Tooltip } from "./tooltip-bcymn9bfyz29fvji.js";
|
|
4
|
+
import { t as Button } from "./button-cyea767mx5dwgavm.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";
|
|
@@ -3,16 +3,16 @@ 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-cyea767mx5dwgavm.js";
|
|
7
7
|
import { n as useKumoLocale } from "./locale-provider-e3310bgo4lnffqkd.js";
|
|
8
8
|
import { t as Text } from "./text-me99rjbjkaff98gp.js";
|
|
9
9
|
import { t as LayerCard } from "./layer-card-mar4dya5kl1vvie6.js";
|
|
10
|
-
import { t as DropdownMenu } from "./dropdown-
|
|
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";
|
|
14
14
|
import * as React$1 from "react";
|
|
15
|
-
import { Children, createContext, isValidElement, useContext, useRef, useState } from "react";
|
|
15
|
+
import { Children, createContext, forwardRef, isValidElement, useContext, useRef, useState } from "react";
|
|
16
16
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
17
17
|
import { CaretDownIcon, X } from "@phosphor-icons/react";
|
|
18
18
|
import { useSyncExternalStore as useSyncExternalStore$1 } from "use-sync-external-store/shim";
|
|
@@ -298,7 +298,7 @@ function LayerDialogBody({ children }) {
|
|
|
298
298
|
/* @__PURE__ */ jsxs(ScrollAreaRoot, {
|
|
299
299
|
className: "relative flex min-h-0 flex-1 flex-col",
|
|
300
300
|
children: [/* @__PURE__ */ jsx(ScrollAreaViewport, {
|
|
301
|
-
className: "min-h-0 flex-1 overscroll-none [mask-image:linear-gradient(to_bottom,transparent_0,black_min(24px,var(--scroll-area-overflow-y-start,0px)),black_calc(100%-min(24px,var(--scroll-area-overflow-y-end,24px))),transparent_100%)]",
|
|
301
|
+
className: "no-scrollbar min-h-0 flex-1 overscroll-none [mask-image:linear-gradient(to_bottom,transparent_0,black_min(24px,var(--scroll-area-overflow-y-start,0px)),black_calc(100%-min(24px,var(--scroll-area-overflow-y-end,24px))),transparent_100%)]",
|
|
302
302
|
onScroll: handleScroll,
|
|
303
303
|
children: isDesktop ? /* @__PURE__ */ jsx(ScrollAreaContent, {
|
|
304
304
|
className: "px-4.5 pt-0.5 pb-4.5",
|
|
@@ -322,6 +322,13 @@ function LayerDialogBody({ children }) {
|
|
|
322
322
|
});
|
|
323
323
|
}
|
|
324
324
|
LayerDialogBody.displayName = "LayerDialog.Body";
|
|
325
|
+
/** A full-width divider between sections of `LayerDialog.Body`. */
|
|
326
|
+
const LayerDialogSeparator = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("hr", {
|
|
327
|
+
ref,
|
|
328
|
+
className: cn("-mx-4 my-4 h-px border-0 bg-kumo-hairline sm:-mx-4.5", className),
|
|
329
|
+
...props
|
|
330
|
+
}));
|
|
331
|
+
LayerDialogSeparator.displayName = "LayerDialog.Separator";
|
|
325
332
|
function LayerDialogIconClose({ disabled, label }) {
|
|
326
333
|
const close = (closeProps) => /* @__PURE__ */ jsx(Button, {
|
|
327
334
|
...closeProps,
|
|
@@ -399,6 +406,7 @@ const LayerDialog = Object.assign(LayerDialogRoot, {
|
|
|
399
406
|
Title: LayerDialogTitle,
|
|
400
407
|
Description: LayerDialogDescription,
|
|
401
408
|
Body: LayerDialogBody,
|
|
409
|
+
Separator: LayerDialogSeparator,
|
|
402
410
|
Action: LayerDialogAction,
|
|
403
411
|
Actions: LayerDialogActions
|
|
404
412
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as cn } from "./vendor-styling-gs32v7xt5znc8kg0.js";
|
|
3
|
-
import { t as Tooltip } from "./tooltip-
|
|
3
|
+
import { t as Tooltip } from "./tooltip-bcymn9bfyz29fvji.js";
|
|
4
4
|
import { useEffect, useRef } from "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
import { IconContext } from "@phosphor-icons/react";
|
|
@@ -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-gg4aurpe2s60van9.js";
|
|
4
|
+
import { t as Select } from "./select-ha59x0uq5ocr1x36.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",
|
|
@@ -162,7 +162,7 @@ function RadioGroup({ legend, children, orientation = "vertical", appearance = "
|
|
|
162
162
|
children: error
|
|
163
163
|
}),
|
|
164
164
|
description && /* @__PURE__ */ jsx("p", {
|
|
165
|
-
className: "text-sm text-kumo-subtle",
|
|
165
|
+
className: "text-sm leading-snug text-pretty text-kumo-subtle",
|
|
166
166
|
children: description
|
|
167
167
|
})
|
|
168
168
|
]
|
|
@@ -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-cyea767mx5dwgavm.js";
|
|
5
|
+
import { r as Label } from "./label-cecukn2rbow4ghxg.js";
|
|
6
|
+
import { t as Field } from "./field-crf1hw5exr2oxemk.js";
|
|
7
|
+
import { n as KUMO_INPUT_VARIANTS } from "./input-d1230n06m5b1p3rd.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";
|
|
@@ -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-nzwvjuwlpb51ze04.js → sensitive-input-hg58r9x2d9njtysl.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-crf1hw5exr2oxemk.js";
|
|
5
|
+
import { n as KUMO_INPUT_VARIANTS, r as inputVariants } from "./input-d1230n06m5b1p3rd.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";
|
|
@@ -198,7 +198,7 @@ const SensitiveInput = forwardRef(({ value: controlledValue, defaultValue = "",
|
|
|
198
198
|
onClick: copyToClipboard,
|
|
199
199
|
onKeyDown: (e) => e.stopPropagation(),
|
|
200
200
|
"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-
|
|
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-hidden focus-visible:ring-2 focus-visible:ring-kumo-brand", "m-0 h-auto min-h-0 border-none shadow-none"),
|
|
202
202
|
children: copied ? "Copied" : "Copy"
|
|
203
203
|
})
|
|
204
204
|
] });
|
|
@@ -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
|
-
import { n as TooltipProvider, t as Tooltip } from "./tooltip-
|
|
5
|
-
import { t as Button } from "./button-
|
|
6
|
-
import { t as SkeletonLine } from "./skeleton-line-
|
|
5
|
+
import { n as TooltipProvider, t as Tooltip } from "./tooltip-bcymn9bfyz29fvji.js";
|
|
6
|
+
import { t as Button } from "./button-cyea767mx5dwgavm.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";
|
|
@@ -506,7 +507,7 @@ const SidebarContent = forwardRef(({ className, children, ...props }, ref) => {
|
|
|
506
507
|
children: [/* @__PURE__ */ jsx(ScrollAreaViewport, {
|
|
507
508
|
tabIndex: -1,
|
|
508
509
|
"data-sidebar": "viewport",
|
|
509
|
-
className: cn("h-full px-[11px] py-3 group-not-data-[state=collapsed]/sidebar:px-3.5", "transition-[padding] duration-(--sidebar-animation-duration)", "overflow-x-hidden!", "[mask-image:linear-gradient(to_bottom,transparent_0,black_min(24px,var(--scroll-area-overflow-y-start,24px)),black_calc(100%-min(24px,var(--scroll-area-overflow-y-end,24px))),transparent_100%)]"),
|
|
510
|
+
className: cn("h-full px-[11px] py-3 group-not-data-[state=collapsed]/sidebar:px-3.5", "transition-[padding] duration-(--sidebar-animation-duration)", "overflow-x-hidden!", "no-scrollbar", "[mask-image:linear-gradient(to_bottom,transparent_0,black_min(24px,var(--scroll-area-overflow-y-start,24px)),black_calc(100%-min(24px,var(--scroll-area-overflow-y-end,24px))),transparent_100%)]"),
|
|
510
511
|
children: /* @__PURE__ */ jsx(ScrollAreaContent, {
|
|
511
512
|
className: "flex min-w-0! flex-col",
|
|
512
513
|
children
|
|
@@ -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
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as cn } from "./vendor-styling-gs32v7xt5znc8kg0.js";
|
|
3
|
+
import { t as resolveVariant } from "./resolve-variant-l6x5ksfrjtu4m66l.js";
|
|
4
|
+
import { useMemo } from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/loader/skeleton-line.tsx
|
|
7
|
+
/** SkeletonLine variant definitions mapping variant names to their root classes and descriptions. */
|
|
8
|
+
const KUMO_SKELETON_LINE_VARIANTS = { variant: {
|
|
9
|
+
default: {
|
|
10
|
+
classes: "skeleton-line",
|
|
11
|
+
description: "Flat grey bar with a sliding shimmer"
|
|
12
|
+
},
|
|
13
|
+
sketch: {
|
|
14
|
+
classes: "relative h-2 w-(--skeleton-width)",
|
|
15
|
+
description: "Wireframe-style bar: rounded fill with a sliding shimmer, a 1px outline, and construction strokes that overshoot each corner by 4px"
|
|
16
|
+
}
|
|
17
|
+
} };
|
|
18
|
+
const KUMO_SKELETON_LINE_DEFAULT_VARIANTS = { variant: "default" };
|
|
19
|
+
/** Edge strokes drawn under the sketch variant's outline. */
|
|
20
|
+
const SKETCH_STROKE = "absolute bg-kumo-fill";
|
|
21
|
+
const getRandomWidth = (min, max) => Math.floor(Math.random() * (max - min + 1) + min);
|
|
22
|
+
const getRandomFloat = (min, max) => (Math.random() * (max - min) + min).toFixed(2);
|
|
23
|
+
const SkeletonLine = ({ variant = KUMO_SKELETON_LINE_DEFAULT_VARIANTS.variant, minWidth = 30, maxWidth = 100, minDuration = 1.3, maxDuration = 1.7, minDelay = 0, maxDelay = .5, blockHeight, className }) => {
|
|
24
|
+
const { width, duration, delay } = useMemo(() => {
|
|
25
|
+
return {
|
|
26
|
+
width: getRandomWidth(minWidth, maxWidth),
|
|
27
|
+
duration: getRandomFloat(minDuration, maxDuration),
|
|
28
|
+
delay: getRandomFloat(minDelay, maxDelay)
|
|
29
|
+
};
|
|
30
|
+
}, [
|
|
31
|
+
minWidth,
|
|
32
|
+
maxWidth,
|
|
33
|
+
minDuration,
|
|
34
|
+
maxDuration,
|
|
35
|
+
minDelay,
|
|
36
|
+
maxDelay
|
|
37
|
+
]);
|
|
38
|
+
const lineStyle = {
|
|
39
|
+
"--skeleton-width": `${width}%`,
|
|
40
|
+
"--shimmer-duration": `${duration}s`,
|
|
41
|
+
"--shimmer-delay": `${delay}s`
|
|
42
|
+
};
|
|
43
|
+
const rootClasses = resolveVariant(KUMO_SKELETON_LINE_VARIANTS.variant, variant, KUMO_SKELETON_LINE_DEFAULT_VARIANTS.variant).classes;
|
|
44
|
+
const line = variant === "sketch" ? /* @__PURE__ */ jsxs("div", {
|
|
45
|
+
className: cn(rootClasses, className),
|
|
46
|
+
style: lineStyle,
|
|
47
|
+
"data-variant": "sketch",
|
|
48
|
+
children: [
|
|
49
|
+
/* @__PURE__ */ jsx("div", {
|
|
50
|
+
className: "absolute inset-0 overflow-hidden rounded-lg bg-kumo-recessed",
|
|
51
|
+
children: /* @__PURE__ */ jsx("div", { className: "absolute inset-0 animate-[shimmer_var(--shimmer-duration,1.5s)_var(--shimmer-delay,0s)_infinite_ease-in-out] bg-linear-to-r from-transparent via-kumo-contrast/8 to-transparent motion-reduce:animate-none" })
|
|
52
|
+
}),
|
|
53
|
+
/* @__PURE__ */ jsx("div", { className: cn(SKETCH_STROKE, "-inset-x-1 top-0 h-px") }),
|
|
54
|
+
/* @__PURE__ */ jsx("div", { className: cn(SKETCH_STROKE, "-inset-x-1 bottom-0 h-px") }),
|
|
55
|
+
/* @__PURE__ */ jsx("div", { className: cn(SKETCH_STROKE, "-inset-y-1 left-0 w-px") }),
|
|
56
|
+
/* @__PURE__ */ jsx("div", { className: cn(SKETCH_STROKE, "-inset-y-1 right-0 w-px") }),
|
|
57
|
+
/* @__PURE__ */ jsx("div", { className: "absolute inset-0 rounded-lg border border-kumo-interact" })
|
|
58
|
+
]
|
|
59
|
+
}) : /* @__PURE__ */ jsx("div", {
|
|
60
|
+
className: cn(rootClasses, className),
|
|
61
|
+
style: lineStyle
|
|
62
|
+
});
|
|
63
|
+
if (blockHeight !== void 0) {
|
|
64
|
+
const height = typeof blockHeight === "number" ? `${blockHeight}px` : blockHeight;
|
|
65
|
+
return /* @__PURE__ */ jsx("div", {
|
|
66
|
+
className: "flex items-center",
|
|
67
|
+
style: { height },
|
|
68
|
+
children: line
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
return line;
|
|
72
|
+
};
|
|
73
|
+
//#endregion
|
|
74
|
+
export { SkeletonLine as t };
|
|
@@ -61,7 +61,7 @@ function Slider({ label, size = KUMO_SLIDER_DEFAULT_VARIANTS.size, getAriaLabel,
|
|
|
61
61
|
children: [/* @__PURE__ */ jsx(SliderIndicator, { className: cn("box-content! bg-kumo-overlay pr-2 shadow-sm ring ring-kumo-line", isRange && "-ml-2 pl-2", innerRadius) }), Array.from({ length: thumbCount }, (_, index) => /* @__PURE__ */ jsxs(SliderThumb, {
|
|
62
62
|
index: isRange ? index : void 0,
|
|
63
63
|
getAriaLabel,
|
|
64
|
-
className: cn("group h-full w-4 cursor-grab outline-none has-focus-visible:ring-2 has-focus-visible:ring-kumo-focus data-disabled:cursor-not-allowed data-dragging:cursor-grabbing", innerRadius),
|
|
64
|
+
className: cn("group h-full w-4 cursor-grab outline-none has-focus-visible:ring-2 has-focus-visible:ring-kumo-focus has-focus-visible:outline-hidden data-disabled:cursor-not-allowed data-dragging:cursor-grabbing", innerRadius),
|
|
65
65
|
children: [/* @__PURE__ */ jsx("span", {
|
|
66
66
|
"aria-hidden": true,
|
|
67
67
|
className: "absolute top-1/2 left-1/2 h-1/2 w-0.5 -translate-1/2 rounded-full bg-kumo-contrast/25"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as cn } from "./vendor-styling-gs32v7xt5znc8kg0.js";
|
|
3
3
|
import { n as FieldsetRoot, t as FieldsetLegend } from "./FieldsetLegend-gl9z9eezr0xg9zr7.js";
|
|
4
|
-
import { t as Field } from "./field-
|
|
4
|
+
import { t as Field } from "./field-crf1hw5exr2oxemk.js";
|
|
5
5
|
import { t as SwitchRoot } from "./SwitchRoot-m4t2tq5zn5wibyxk.js";
|
|
6
6
|
import { createContext, forwardRef, useContext } from "react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -70,7 +70,7 @@ const SwitchBase = forwardRef(({ className, checked, disabled, size = "base", va
|
|
|
70
70
|
}[size];
|
|
71
71
|
const trackColors = isNeutral ? state.checked ? "bg-neutral-500 dark:bg-kumo-base ring-neutral-600 dark:ring-neutral-700" : "bg-neutral-150 dark:bg-kumo-base ring-kumo-hairline" : state.checked ? "bg-blue-500 dark:bg-blue-600 ring-blue-600 dark:ring-blue-500" : "bg-neutral-200 dark:bg-neutral-700 ring-neutral-300 dark:ring-neutral-600";
|
|
72
72
|
const thumbColors = isNeutral ? state.checked ? "bg-kumo-base dark:bg-neutral-400" : "bg-kumo-base dark:bg-neutral-850" : state.checked ? "bg-kumo-base dark:bg-blue-300" : "bg-kumo-base dark:bg-neutral-850";
|
|
73
|
-
const trackClassName = cn("relative inline-flex cursor-pointer items-center border-none p-0 ring", "focus:outline-
|
|
73
|
+
const trackClassName = cn("relative inline-flex cursor-pointer items-center border-none p-0 ring", "focus:outline-hidden focus-visible:ring-2 focus-visible:ring-kumo-brand", "transition-colors duration-150 ease-out motion-reduce:transition-none", "disabled:cursor-not-allowed disabled:opacity-50", s.track, squircleRadius, trackColors, className, baseClassName);
|
|
74
74
|
const thumbClassName = cn("absolute top-0 bottom-0 shadow-[0_0_1px_0.5px_var(--color-kumo-shadow-edge),0_1px_2px_var(--color-kumo-shadow-drop)]", s.thumb, squircleRadius, thumbColors, "transition-all duration-150 ease-out motion-reduce:transition-none", state.checked ? s.slide : "left-0");
|
|
75
75
|
const role = props.role ?? baseRole ?? "switch";
|
|
76
76
|
const checkedA11yProps = role === "switch" ? { "aria-checked": state.checked } : { "aria-pressed": state.checked };
|
|
@@ -134,7 +134,7 @@ const SwitchItem = forwardRef(({ className, checked, disabled, size = "base", va
|
|
|
134
134
|
}[size];
|
|
135
135
|
const trackColors = isNeutral ? state.checked ? "bg-neutral-500 dark:bg-kumo-base ring-neutral-600 dark:ring-neutral-700" : "bg-neutral-150 dark:bg-kumo-base ring-kumo-hairline" : state.checked ? "bg-blue-500 dark:bg-blue-600 ring-blue-600 dark:ring-blue-500" : "bg-neutral-200 dark:bg-neutral-700 ring-neutral-300 dark:ring-neutral-600";
|
|
136
136
|
const thumbColors = isNeutral ? state.checked ? "bg-kumo-base dark:bg-neutral-400" : "bg-kumo-base dark:bg-neutral-850" : state.checked ? "bg-kumo-base dark:bg-blue-300" : "bg-kumo-base dark:bg-neutral-850";
|
|
137
|
-
const trackClassName = cn("relative inline-flex cursor-pointer items-center border-none p-0 ring", "focus:ring-kumo-focus/50 focus:outline-
|
|
137
|
+
const trackClassName = cn("relative inline-flex cursor-pointer items-center border-none p-0 ring", "focus:ring-kumo-focus/50 focus:outline-hidden focus-visible:ring-2 focus-visible:ring-kumo-brand", "transition-colors duration-150 ease-out motion-reduce:transition-none", "disabled:cursor-not-allowed disabled:opacity-50", s.track, squircleRadius, trackColors, baseClassName);
|
|
138
138
|
const thumbClassName = cn("absolute top-0 bottom-0 shadow-[0_0_1px_0.5px_var(--color-kumo-shadow-edge),0_1px_2px_var(--color-kumo-shadow-drop)]", s.thumb, squircleRadius, thumbColors, "transition-all duration-150 ease-out motion-reduce:transition-none", state.checked ? s.slide : "left-0");
|
|
139
139
|
const role = baseRole ?? "switch";
|
|
140
140
|
const checkedA11yProps = role === "switch" ? { "aria-checked": state.checked } : { "aria-pressed": state.checked };
|
|
@@ -185,7 +185,7 @@ function SwitchGroup({ legend, children, error, description, disabled, controlFi
|
|
|
185
185
|
children: error
|
|
186
186
|
}),
|
|
187
187
|
description && /* @__PURE__ */ jsx("p", {
|
|
188
|
-
className: "text-sm text-kumo-subtle",
|
|
188
|
+
className: "text-sm leading-snug text-pretty text-kumo-subtle",
|
|
189
189
|
children: description
|
|
190
190
|
})
|
|
191
191
|
]
|
|
@@ -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-bcpt8k7ck95vgjc1.js";
|
|
5
5
|
import { forwardRef } from "react";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
//#region src/components/table/table.tsx
|
|
@@ -73,7 +73,7 @@ function Tabs({ tabs, value, selectedValue, onValueChange, activateOnFocus, clas
|
|
|
73
73
|
inline: "nearest"
|
|
74
74
|
});
|
|
75
75
|
},
|
|
76
|
-
className: cn("relative z-2 flex items-center rounded bg-transparent whitespace-nowrap focus:ring-kumo-focus/50 focus:outline-
|
|
76
|
+
className: cn("relative z-2 flex items-center rounded bg-transparent whitespace-nowrap focus:ring-kumo-focus/50 focus:outline-hidden focus-visible:ring-2 focus-visible:ring-kumo-brand", "forced-colors:focus-visible:-outline-offset-2", isOverflowing ? "cursor-grab active:cursor-grabbing" : "cursor-pointer", isSm ? "text-xs" : "text-base", isSegmented && "my-0.5 text-kumo-subtle hover:text-kumo-default focus-visible:ring-inset aria-selected:text-kumo-default", isSegmented && (isSm ? "rounded-sm px-2" : "rounded-md px-2.5"), isUnderline && "text-kumo-subtle hover:bg-kumo-tint hover:text-kumo-default aria-selected:font-medium aria-selected:text-kumo-default aria-selected:hover:bg-kumo-tint", isUnderline && (isSm ? "px-1.5 py-2.5" : "px-2 py-3"), tab.className),
|
|
77
77
|
children: tab.label
|
|
78
78
|
}, tab.value)), /* @__PURE__ */ jsx(TabsIndicator, { render: (props) => /* @__PURE__ */ jsx("div", {
|
|
79
79
|
...props,
|
|
@@ -110,7 +110,7 @@ function TabsOverflowControl({ side, visible, variant, size, label, onClick }) {
|
|
|
110
110
|
"aria-hidden": !visible,
|
|
111
111
|
tabIndex: visible ? 0 : -1,
|
|
112
112
|
onClick,
|
|
113
|
-
className: cn("absolute inset-y-0 z-3 flex items-center border-0 bg-transparent p-0 transition-opacity duration-150 focus:outline-
|
|
113
|
+
className: cn("absolute inset-y-0 z-3 flex items-center border-0 bg-transparent p-0 transition-opacity duration-150 focus:outline-hidden focus-visible:[&>span]:ring-2 focus-visible:[&>span]:ring-kumo-brand", isStart ? "left-0 justify-start bg-linear-to-r" : "right-0 justify-end bg-linear-to-l", visible ? "pointer-events-auto opacity-100" : "pointer-events-none opacity-0", isSegmented ? "from-kumo-recessed via-kumo-recessed/95 to-transparent" : "from-kumo-base via-kumo-base/95 to-transparent", isSegmented && (size === "sm" ? "w-8 rounded-md" : "w-10 rounded-lg"), !isSegmented && "w-8"),
|
|
114
114
|
children: /* @__PURE__ */ jsx("span", {
|
|
115
115
|
className: cn("flex items-center justify-center text-kumo-subtle transition-colors hover:text-kumo-default", size === "sm" ? "size-5" : "size-6", isSegmented ? size === "sm" ? "rounded-sm" : "rounded-md" : "rounded", isStart ? "ml-1" : "mr-1"),
|
|
116
116
|
children: /* @__PURE__ */ jsx("svg", {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as cn } from "./vendor-styling-gs32v7xt5znc8kg0.js";
|
|
3
|
-
import { t as Button } from "./button-
|
|
3
|
+
import { t as Button } from "./button-cyea767mx5dwgavm.js";
|
|
4
4
|
import { t as FieldControl } from "./FieldControl-hjj2tcqruozadgdi.js";
|
|
5
|
-
import { a as normalizeFieldError, t as Field } from "./field-
|
|
6
|
-
import { r as inputVariants } from "./input-
|
|
5
|
+
import { a as normalizeFieldError, t as Field } from "./field-crf1hw5exr2oxemk.js";
|
|
6
|
+
import { r as inputVariants } from "./input-d1230n06m5b1p3rd.js";
|
|
7
7
|
import { forwardRef, useId, useState } from "react";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import { XIcon } from "@phosphor-icons/react";
|
|
@@ -143,7 +143,7 @@ const TagInput = forwardRef(({ value, defaultValue = [], onValueChange, validate
|
|
|
143
143
|
}, item)), hasField ? /* @__PURE__ */ jsx(FieldControl, { render: (controlProps) => input(controlProps) }) : input()]
|
|
144
144
|
});
|
|
145
145
|
if (hasField) return /* @__PURE__ */ jsx(Field, {
|
|
146
|
-
label
|
|
146
|
+
label,
|
|
147
147
|
labelTooltip,
|
|
148
148
|
description,
|
|
149
149
|
error: fieldError,
|