@momoi-labs/kiso-react 0.10.0 → 0.11.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/dist/alert.d.ts CHANGED
@@ -2,8 +2,9 @@ import * as React from "react";
2
2
  import { type VariantProps } from "class-variance-authority";
3
3
  declare const alertVariants: (props?: ({
4
4
  variant?: "error" | "info" | "success" | "warning" | null | undefined;
5
+ appearance?: "rail" | "tinted" | null | undefined;
5
6
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
- declare function Alert({ className, variant, role, ...props }: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>): React.JSX.Element;
7
+ declare function Alert({ className, variant, appearance, role, ...props }: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>): React.JSX.Element;
7
8
  declare function AlertContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
8
9
  declare function AlertTitle({ className, ...props }: React.ComponentProps<"p">): React.JSX.Element;
9
10
  declare function AlertDescription({ className, ...props }: React.ComponentProps<"p">): React.JSX.Element;
package/dist/alert.js CHANGED
@@ -9,14 +9,15 @@ const alertVariants = cva("alert", {
9
9
  warning: "alert-warning",
10
10
  error: "alert-danger",
11
11
  },
12
+ appearance: { tinted: "", rail: "alert-rail" },
12
13
  },
13
- defaultVariants: { variant: "info" },
14
+ defaultVariants: { variant: "info", appearance: "tinted" },
14
15
  });
15
- function Alert({ className, variant = "info", role, ...props }) {
16
- return (_jsx("div", { "data-slot": "alert", "data-variant": variant, role: role ?? (variant === "error" ? "alert" : "status"), className: cn(alertVariants({ variant }), className), ...props }));
16
+ function Alert({ className, variant = "info", appearance = "tinted", role, ...props }) {
17
+ return (_jsx("div", { "data-slot": "alert", "data-variant": variant, "data-appearance": appearance, role: role ?? (variant === "error" ? "alert" : "status"), className: cn(alertVariants({ variant, appearance }), className), ...props }));
17
18
  }
18
19
  function AlertContent({ className, ...props }) {
19
- return (_jsx("div", { "data-slot": "alert-content", className: cn("stack-xs grow", className), ...props }));
20
+ return (_jsx("div", { "data-slot": "alert-content", className: cn("alert-content stack-xs grow", className), ...props }));
20
21
  }
21
22
  function AlertTitle({ className, ...props }) {
22
23
  return (_jsx("p", { "data-slot": "alert-title", className: cn("alert-title", className), ...props }));
@@ -1,8 +1,15 @@
1
1
  import * as React from "react";
2
+ import { Button } from "./button.js";
2
3
  declare function AppShell({ className, variant, ...props }: React.ComponentProps<"div"> & {
3
4
  variant?: "default" | "inset";
4
5
  }): React.JSX.Element;
5
6
  declare function AppShellMain({ className, ...props }: React.ComponentProps<"main">): React.JSX.Element;
7
+ declare function AppShellPanel({ className, ...props }: React.ComponentProps<"aside">): React.JSX.Element;
8
+ declare function AppShellPanelToggle({ className, placement, children, "aria-label": label, ...props }: React.ComponentProps<typeof Button> & {
9
+ placement?: "header" | "floating";
10
+ "aria-controls": string;
11
+ "aria-expanded": boolean;
12
+ }): React.JSX.Element;
6
13
  type ApplicationShellDestination = {
7
14
  href: string;
8
15
  active?: boolean;
@@ -20,6 +27,7 @@ type ApplicationShellSharedProps = Omit<React.ComponentProps<typeof AppShell>, "
20
27
  brand: React.ReactNode;
21
28
  primaryAction?: React.ReactNode;
22
29
  header?: React.ReactNode;
30
+ panel?: React.ReactNode;
23
31
  children: React.ReactNode;
24
32
  };
25
33
  type ApplicationShellSidebarProps = ApplicationShellSharedProps & {
@@ -28,6 +36,7 @@ type ApplicationShellSidebarProps = ApplicationShellSharedProps & {
28
36
  navigationLabel?: string;
29
37
  footer?: React.ReactNode;
30
38
  collapsible?: boolean;
39
+ togglePlacement?: "sidebar" | "header";
31
40
  collapsed?: boolean;
32
41
  defaultCollapsed?: boolean;
33
42
  onCollapsedChange?: (collapsed: boolean) => void;
@@ -38,11 +47,12 @@ type ApplicationShellTopbarProps = ApplicationShellSharedProps & {
38
47
  navigationLabel?: never;
39
48
  footer?: never;
40
49
  collapsible?: never;
50
+ togglePlacement?: never;
41
51
  collapsed?: never;
42
52
  defaultCollapsed?: never;
43
53
  onCollapsedChange?: never;
44
54
  };
45
55
  type ApplicationShellProps = ApplicationShellSidebarProps | ApplicationShellTopbarProps;
46
56
  declare function ApplicationShell(props: ApplicationShellProps): React.JSX.Element;
47
- export { AppShell, AppShellMain, ApplicationShell };
57
+ export { AppShell, AppShellMain, AppShellPanel, AppShellPanelToggle, ApplicationShell };
48
58
  export type { ApplicationShellDestination, ApplicationShellGroup, ApplicationShellProps, };
package/dist/app-shell.js CHANGED
@@ -16,6 +16,12 @@ function AppShell({ className, variant, ...props }) {
16
16
  function AppShellMain({ className, ...props }) {
17
17
  return (_jsx("main", { "data-slot": "app-shell-main", className: cn("grow", className), ...props }));
18
18
  }
19
+ function AppShellPanel({ className, ...props }) {
20
+ return _jsx("aside", { "data-slot": "app-shell-panel", className: cn("app-shell-panel", className), ...props });
21
+ }
22
+ function AppShellPanelToggle({ className, placement = "header", children, "aria-label": label, ...props }) {
23
+ return _jsx(Button, { variant: "ghost", size: "sm", "data-slot": "app-shell-panel-toggle", "data-placement": placement, className: cn("app-shell-panel-toggle", className), "aria-label": label ?? (props["aria-expanded"] ? "Close panel" : "Open panel"), title: label ?? (props["aria-expanded"] ? "Close panel" : "Open panel"), ...props, children: children ?? _jsxs("svg", { className: "icon", viewBox: "0 0 16 16", "aria-hidden": "true", children: [_jsx("rect", { x: "1.5", y: "2", width: "13", height: "12", rx: "1.5" }), _jsx("path", { d: "M10.5 2v12" })] }) });
24
+ }
19
25
  function ApplicationShellNavigation({ navigation, navigationLabel, collapsible = false, }) {
20
26
  return (_jsx(Navigation, { "aria-label": navigationLabel, children: navigation.map((group, groupIndex) => (_jsx(NavigationGroup, { label: group.label, children: group.destinations.length > 0 ? (_jsx(NavigationList, { children: group.destinations.map((destination, destinationIndex) => (_jsx(NavigationItem, { children: _jsx(NavigationLink, { href: destination.href, active: destination.active, className: collapsible && destination.leading ? "sidebar-link-with-icon" : undefined, title: collapsible && typeof destination.label === "string" ? destination.label : undefined, onClick: (event) => {
21
27
  if (!destination.onClick)
@@ -26,12 +32,12 @@ function ApplicationShellNavigation({ navigation, navigationLabel, collapsible =
26
32
  }
27
33
  function ApplicationShell(props) {
28
34
  if (props.layout === "topbar") {
29
- const { brand, primaryAction, header, children, layout: _layout, ...shellProps } = props;
30
- return (_jsx(AppShell, { ...shellProps, "data-layout": "topbar", children: _jsxs(AppShellMain, { children: [_jsxs(Header, { children: [brand, primaryAction, header] }), children] }) }));
35
+ const { brand, primaryAction, header, panel, children, layout: _layout, ...shellProps } = props;
36
+ return (_jsxs(AppShell, { ...shellProps, "data-layout": "topbar", children: [_jsxs(AppShellMain, { children: [_jsxs(Header, { children: [brand, primaryAction, header] }), children] }), panel] }));
31
37
  }
32
38
  return _jsx(ApplicationShellSidebar, { ...props });
33
39
  }
34
- function ApplicationShellSidebar({ brand, primaryAction, navigation, navigationLabel = "Primary", footer, header, children, layout: _layout, collapsible = false, collapsed, defaultCollapsed = false, onCollapsedChange, ...shellProps }) {
40
+ function ApplicationShellSidebar({ brand, primaryAction, navigation, navigationLabel = "Primary", footer, header, panel, children, layout: _layout, collapsible = false, togglePlacement = "sidebar", collapsed, defaultCollapsed = false, onCollapsedChange, ...shellProps }) {
35
41
  const [internalCollapsed, setInternalCollapsed] = React.useState(defaultCollapsed);
36
42
  const isCollapsed = collapsible && (collapsed ?? internalCollapsed);
37
43
  const sidebarId = React.useId();
@@ -50,6 +56,7 @@ function ApplicationShellSidebar({ brand, primaryAction, navigation, navigationL
50
56
  setInternalCollapsed(next);
51
57
  onCollapsedChange?.(next);
52
58
  }
53
- return (_jsxs(AppShell, { ...shellProps, children: [_jsxs(Sidebar, { ref: sidebarRef, id: sidebarId, collapsed: isCollapsed, children: [_jsx(SidebarHeader, { className: collapsible ? "sidebar-header-collapsible" : undefined, children: collapsible ? _jsxs(_Fragment, { children: [_jsxs("div", { className: "sidebar-expanded-content", children: [brand, primaryAction] }), _jsx(Button, { ref: toggleRef, variant: "ghost", size: "sm", className: "sidebar-toggle btn-icon", "aria-controls": sidebarId, "aria-expanded": !isCollapsed, "aria-label": isCollapsed ? "Expand sidebar" : "Collapse sidebar", title: isCollapsed ? "Expand sidebar" : "Collapse sidebar", onClick: toggleSidebar, children: _jsxs("svg", { className: "icon", viewBox: "0 0 16 16", "aria-hidden": "true", children: [_jsx("rect", { x: "1.5", y: "2", width: "13", height: "12", rx: "1.5" }), _jsx("path", { d: "M5.5 2v12" }), _jsx("path", { d: isCollapsed ? "m8.5 5.5 2.5 2.5-2.5 2.5" : "m11 5.5-2.5 2.5 2.5 2.5" })] }) })] }) : _jsxs(_Fragment, { children: [brand, primaryAction] }) }), _jsx(SidebarBody, { children: _jsx(ApplicationShellNavigation, { navigation: navigation, navigationLabel: navigationLabel, collapsible: collapsible }) }), footer && _jsx(SidebarFooter, { className: collapsible ? "sidebar-expanded-content" : undefined, children: footer })] }), _jsxs(AppShellMain, { children: [header && _jsx(Header, { children: header }), children] })] }));
59
+ const toggle = collapsible ? (_jsx(Button, { ref: toggleRef, variant: "ghost", size: "sm", className: "sidebar-toggle btn-icon", "aria-controls": sidebarId, "aria-expanded": !isCollapsed, "aria-label": isCollapsed ? "Expand sidebar" : "Collapse sidebar", title: isCollapsed ? "Expand sidebar" : "Collapse sidebar", onClick: toggleSidebar, children: _jsxs("svg", { className: "icon", viewBox: "0 0 16 16", "aria-hidden": "true", children: [_jsx("rect", { x: "1.5", y: "2", width: "13", height: "12", rx: "1.5" }), _jsx("path", { d: "M5.5 2v12" }), _jsx("path", { d: isCollapsed ? "m8.5 5.5 2.5 2.5-2.5 2.5" : "m11 5.5-2.5 2.5 2.5 2.5" })] }) })) : null;
60
+ return (_jsxs(AppShell, { ...shellProps, children: [_jsxs(Sidebar, { ref: sidebarRef, id: sidebarId, collapsed: isCollapsed, children: [_jsx(SidebarHeader, { className: collapsible && togglePlacement === "sidebar" ? "sidebar-header-collapsible" : undefined, children: collapsible ? _jsxs(_Fragment, { children: [_jsxs("div", { className: "sidebar-expanded-content", children: [brand, primaryAction] }), togglePlacement === "sidebar" && toggle] }) : _jsxs(_Fragment, { children: [brand, primaryAction] }) }), _jsx(SidebarBody, { children: _jsx(ApplicationShellNavigation, { navigation: navigation, navigationLabel: navigationLabel, collapsible: collapsible }) }), footer && _jsx(SidebarFooter, { className: collapsible ? "sidebar-expanded-content" : undefined, children: footer })] }), _jsxs(AppShellMain, { children: [(header || (collapsible && togglePlacement === "header")) && _jsxs(Header, { children: [togglePlacement === "header" && toggle, header] }), children] }), panel] }));
54
61
  }
55
- export { AppShell, AppShellMain, ApplicationShell };
62
+ export { AppShell, AppShellMain, AppShellPanel, AppShellPanelToggle, ApplicationShell };
@@ -2,6 +2,8 @@ import { type ComponentProps, type ReactElement, type ReactNode } from "react";
2
2
  import { Input } from "./input.js";
3
3
  type FormControlProps = {
4
4
  id?: string;
5
+ controlSize?: ComponentProps<typeof Input>["controlSize"];
6
+ "data-control-size"?: ComponentProps<typeof Input>["controlSize"];
5
7
  "aria-describedby"?: string;
6
8
  "aria-invalid"?: ComponentProps<"input">["aria-invalid"];
7
9
  };
@@ -11,6 +13,9 @@ type FormFieldProps = Omit<ComponentProps<typeof Input>, "children"> & {
11
13
  error?: ReactNode;
12
14
  children?: ReactElement<FormControlProps>;
13
15
  fieldClassName?: string;
16
+ layout?: "stacked" | "inline";
17
+ leading?: ReactNode;
18
+ suffix?: ReactNode;
14
19
  };
15
- export declare function FormField({ label, hint, error, children, fieldClassName, id: providedId, "aria-describedby": describedBy, "aria-invalid": invalid, ...props }: FormFieldProps): import("react").JSX.Element;
20
+ export declare function FormField({ label, hint, error, children, fieldClassName, layout, leading, suffix, controlSize, id: providedId, "aria-describedby": describedBy, "aria-invalid": invalid, ...props }: FormFieldProps): import("react").JSX.Element;
16
21
  export type { FormFieldProps };
@@ -8,18 +8,24 @@ function mergeDescriptions(...descriptions) {
8
8
  const ids = descriptions.flatMap((description) => description?.split(/\s+/).filter(Boolean) ?? []);
9
9
  return ids.length > 0 ? [...new Set(ids)].join(" ") : undefined;
10
10
  }
11
- export function FormField({ label, hint, error, children, fieldClassName, id: providedId, "aria-describedby": describedBy, "aria-invalid": invalid, ...props }) {
11
+ export function FormField({ label, hint, error, children, fieldClassName, layout = "stacked", leading, suffix, controlSize, id: providedId, "aria-describedby": describedBy, "aria-invalid": invalid, ...props }) {
12
12
  const generatedId = useId();
13
13
  const id = providedId ?? children?.props.id ?? generatedId;
14
14
  const hintId = hint ? `${id}-help` : undefined;
15
15
  const errorId = error ? `${id}-error` : undefined;
16
- const description = mergeDescriptions(describedBy, children?.props["aria-describedby"], hintId, errorId);
16
+ const suffixId = suffix ? `${id}-suffix` : undefined;
17
+ const size = controlSize ?? children?.props.controlSize ?? children?.props["data-control-size"];
18
+ const description = mergeDescriptions(describedBy, children?.props["aria-describedby"], hintId, errorId, suffixId);
17
19
  const controlProps = {
18
20
  id,
19
21
  "aria-describedby": description,
20
22
  "aria-invalid": error ? true : children?.props["aria-invalid"] ?? invalid,
23
+ ...(size ? { "data-control-size": size } : {}),
21
24
  };
22
- return (_jsxs("div", { className: fieldClassName ? `field ${fieldClassName}` : "field", children: [_jsx(Label, { htmlFor: id, children: label }), children
23
- ? cloneElement(children, controlProps)
24
- : _jsx(Input, { ...props, ...controlProps }), hint && (_jsx("small", { className: "field-hint", id: hintId, children: hint })), error && _jsx(ValidationMessage, { id: errorId, children: error })] }));
25
+ const control = children
26
+ ? cloneElement(children, controlProps)
27
+ : _jsx(Input, { ...props, ...controlProps });
28
+ const fieldLabel = _jsx(Label, { htmlFor: id, children: label });
29
+ const grouped = layout === "inline" || leading || suffix;
30
+ return (_jsxs("div", { className: fieldClassName ? `field ${fieldClassName}` : "field", "data-layout": layout, "data-control-size": size, children: [layout !== "inline" && fieldLabel, grouped ? _jsxs("div", { className: "field-control", children: [leading && _jsx("span", { className: "field-leading", "aria-hidden": "true", children: leading }), layout === "inline" && fieldLabel, control, suffix && _jsx("span", { className: "field-suffix", id: suffixId, children: suffix })] }) : control, hint && (_jsx("small", { className: "field-hint", id: hintId, children: hint })), error && _jsx(ValidationMessage, { id: errorId, children: error })] }));
25
31
  }
package/dist/input.d.ts CHANGED
@@ -1,3 +1,7 @@
1
1
  import * as React from "react";
2
- declare function Input({ className, type, ...props }: React.ComponentProps<"input">): React.JSX.Element;
2
+ type InputProps = React.ComponentProps<"input"> & {
3
+ controlSize?: "sm" | "md" | "lg";
4
+ };
5
+ declare function Input({ className, type, controlSize, ...props }: InputProps): React.JSX.Element;
3
6
  export { Input };
7
+ export type { InputProps };
package/dist/input.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { clsx as cn } from "clsx";
3
- function Input({ className, type, ...props }) {
4
- return (_jsx("input", { type: type, "data-slot": "input", className: cn("input", className), ...props }));
3
+ function Input({ className, type, controlSize, ...props }) {
4
+ return (_jsx("input", { type: type, "data-slot": "input", "data-control-size": controlSize, className: cn("input", className), ...props }));
5
5
  }
6
6
  export { Input };
package/dist/select.d.ts CHANGED
@@ -3,7 +3,9 @@ import { Select as SelectPrimitive } from "radix-ui";
3
3
  declare function Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>): React.JSX.Element;
4
4
  declare function SelectGroup({ ...props }: React.ComponentProps<typeof SelectPrimitive.Group>): React.JSX.Element;
5
5
  declare function SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>): React.JSX.Element;
6
- declare function SelectTrigger({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Trigger>): React.JSX.Element;
6
+ declare function SelectTrigger({ className, controlSize, ...props }: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
7
+ controlSize?: "sm" | "md" | "lg";
8
+ }): React.JSX.Element;
7
9
  declare function SelectContent({ className, children, position, sideOffset, ...props }: React.ComponentProps<typeof SelectPrimitive.Content>): React.JSX.Element;
8
10
  declare function SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>): React.JSX.Element;
9
11
  declare function SelectItem({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Item>): React.JSX.Element;
package/dist/select.js CHANGED
@@ -12,8 +12,8 @@ function SelectGroup({ ...props }) {
12
12
  function SelectValue({ ...props }) {
13
13
  return _jsx(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
14
14
  }
15
- function SelectTrigger({ className, ...props }) {
16
- return (_jsx(SelectPrimitive.Trigger, { "data-slot": "select-trigger", className: cn("select", className), ...props }));
15
+ function SelectTrigger({ className, controlSize, ...props }) {
16
+ return (_jsx(SelectPrimitive.Trigger, { "data-slot": "select-trigger", "data-control-size": controlSize, className: cn("select", className), ...props }));
17
17
  }
18
18
  function SelectContent({ className, children, position = "popper", sideOffset = 4, ...props }) {
19
19
  return (_jsx(SelectPrimitive.Portal, { children: _jsx(SelectPrimitive.Content, { "data-slot": "select-content", position: position, sideOffset: sideOffset, className: cn("menu kiso-react-floating", className), ...props, children: _jsx(SelectPrimitive.Viewport, { "data-slot": "select-viewport", children: children }) }) }));
package/dist/styles.css CHANGED
@@ -155,10 +155,11 @@
155
155
  z-index: 51;
156
156
  transform: translate(-50%, -50%);
157
157
  width: min(32rem, calc(100vw - 2 * var(--spacing-lg)));
158
- background: var(--color-elevated-surface);
159
- border: 1px solid var(--color-border);
160
- border-radius: var(--radius-surface);
161
- box-shadow: var(--shadow-md);
158
+ --frame-fill: var(--color-elevated-surface);
159
+ background-color: color-mix(in srgb, var(--frame-fill) calc((1 - var(--appearance-expressive, 0)) * (1 - var(--pixel-enabled, 0)) * 100%), transparent);
160
+ border: 1px var(--appearance-panel-border, solid) var(--appearance-border-color, var(--corner-border-color, var(--color-border)));
161
+ border-radius: var(--appearance-corners, var(--radius-surface));
162
+ box-shadow: var(--appearance-frame-shadow, var(--corner-frame-shadow, var(--shadow-md)));
162
163
  }
163
164
  .dialog-scroll {
164
165
  max-height: calc(100dvh - 2 * var(--spacing-xl));
@@ -254,6 +255,12 @@
254
255
  [data-slot="select-trigger"][data-placeholder] {
255
256
  color: var(--color-muted-foreground);
256
257
  }
258
+ .field-control > .select > [data-slot="select-value"] {
259
+ min-width: 0;
260
+ overflow: hidden;
261
+ text-overflow: ellipsis;
262
+ white-space: nowrap;
263
+ }
257
264
  [data-slot="select-trigger"]:disabled { cursor: not-allowed; }
258
265
  [data-slot="select-item"] { justify-content: space-between; }
259
266
  [data-slot="select-content"] {
@@ -336,9 +343,10 @@
336
343
  z-index: 51;
337
344
  display: flex;
338
345
  flex-direction: column;
339
- background: var(--color-elevated-surface);
340
- border: 1px solid var(--color-border);
341
- box-shadow: var(--shadow-md);
346
+ --frame-fill: var(--color-elevated-surface);
347
+ background-color: color-mix(in srgb, var(--frame-fill) calc((1 - var(--appearance-expressive, 0)) * (1 - var(--pixel-enabled, 0)) * 100%), transparent);
348
+ border: 1px var(--appearance-panel-border, solid) var(--appearance-border-color, var(--corner-border-color, var(--color-border)));
349
+ box-shadow: var(--appearance-frame-shadow, var(--corner-frame-shadow, var(--shadow-md)));
342
350
  }
343
351
  .kiso-react-drawer[data-placement="side"] {
344
352
  inset-block: 0;
@@ -360,6 +368,13 @@
360
368
  overflow-y: auto;
361
369
  }
362
370
 
371
+ @media (forced-colors: active) {
372
+ .kiso-react-dialog, .kiso-react-drawer {
373
+ background: Canvas;
374
+ border-color: CanvasText;
375
+ }
376
+ }
377
+
363
378
  .kiso-react-palette {
364
379
  position: fixed;
365
380
  z-index: 51;
package/dist/table.d.ts CHANGED
@@ -1,5 +1,12 @@
1
1
  import * as React from "react";
2
- declare function Table({ className, ...props }: React.ComponentProps<"table">): React.JSX.Element;
2
+ type TableProps = React.ComponentProps<"table"> & {
3
+ density?: "compact" | "comfortable" | "spacious";
4
+ header?: "tinted" | "plain";
5
+ };
6
+ declare function TableFrame({ className, frame, children, ...props }: React.ComponentProps<"div"> & {
7
+ frame?: "default" | "none";
8
+ }): React.JSX.Element;
9
+ declare function Table({ className, density, header, ...props }: TableProps): React.JSX.Element;
3
10
  declare function TableHeader({ className, ...props }: React.ComponentProps<"thead">): React.JSX.Element;
4
11
  declare function TableBody({ className, ...props }: React.ComponentProps<"tbody">): React.JSX.Element;
5
12
  declare function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">): React.JSX.Element;
@@ -7,4 +14,5 @@ declare function TableRow({ className, ...props }: React.ComponentProps<"tr">):
7
14
  declare function TableHead({ className, ...props }: React.ComponentProps<"th">): React.JSX.Element;
8
15
  declare function TableCell({ className, ...props }: React.ComponentProps<"td">): React.JSX.Element;
9
16
  declare function TableCaption({ className, ...props }: React.ComponentProps<"caption">): React.JSX.Element;
10
- export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };
17
+ export { Table, TableFrame, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };
18
+ export type { TableProps };
package/dist/table.js CHANGED
@@ -2,8 +2,11 @@
2
2
  "use client";
3
3
  import { jsx as _jsx } from "react/jsx-runtime";
4
4
  import { clsx as cn } from "clsx";
5
- function Table({ className, ...props }) {
6
- return (_jsx("div", { "data-slot": "table-container", className: "table-scroll", children: _jsx("table", { "data-slot": "table", className: cn("table", className), ...props }) }));
5
+ function TableFrame({ className, frame = "default", children, ...props }) {
6
+ return _jsx("div", { "data-slot": "table-frame", "data-frame": frame, className: cn("table-wrap", className), ...props, children: _jsx("div", { className: "table-surface", children: children }) });
7
+ }
8
+ function Table({ className, density, header, ...props }) {
9
+ return (_jsx("div", { "data-slot": "table-container", className: "table-scroll", children: _jsx("table", { "data-slot": "table", "data-density": density, "data-header": header, className: cn("table", className), ...props }) }));
7
10
  }
8
11
  function TableHeader({ className, ...props }) {
9
12
  return (_jsx("thead", { "data-slot": "table-header", className: cn("", className), ...props }));
@@ -26,4 +29,4 @@ function TableCell({ className, ...props }) {
26
29
  function TableCaption({ className, ...props }) {
27
30
  return (_jsx("caption", { "data-slot": "table-caption", className: cn("muted", className), ...props }));
28
31
  }
29
- export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };
32
+ export { Table, TableFrame, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momoi-labs/kiso-react",
3
- "version": "0.10.0",
3
+ "version": "0.11.1",
4
4
  "description": "Kiso React components built with shadcn/ui and Radix",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -32,7 +32,7 @@
32
32
  "prepack": "npm run build"
33
33
  },
34
34
  "dependencies": {
35
- "@momoi-labs/kiso": "^0.14.0",
35
+ "@momoi-labs/kiso": "^0.15.2",
36
36
  "class-variance-authority": "0.7.1",
37
37
  "clsx": "2.1.1",
38
38
  "radix-ui": "1.6.7",