@apipass/design-system 1.18.1 → 1.20.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/dist/lib/embedded-styles.js +1 -1
- package/dist/lib/lib.index.cjs +1 -1
- package/dist/lib/lib.index.js +775 -765
- package/dist/lib/lib.index.js.map +1 -1
- package/dist/lib/style.css +1 -1
- package/dist/lib/ui/components/Widget/Widget.cjs +1 -1
- package/dist/lib/ui/components/Widget/Widget.cjs.map +1 -1
- package/dist/lib/ui/components/Widget/Widget.js +12 -12
- package/dist/lib/ui/components/Widget/Widget.js.map +1 -1
- package/dist/lib/ui/components/WidgetEmptyState/WidgetEmptyState.cjs +2 -0
- package/dist/lib/ui/components/WidgetEmptyState/WidgetEmptyState.cjs.map +1 -0
- package/dist/lib/ui/components/WidgetEmptyState/WidgetEmptyState.js +18 -0
- package/dist/lib/ui/components/WidgetEmptyState/WidgetEmptyState.js.map +1 -0
- package/dist/lib/ui/components/WidgetErrorState/WidgetErrorState.cjs +2 -0
- package/dist/lib/ui/components/WidgetErrorState/WidgetErrorState.cjs.map +1 -0
- package/dist/lib/ui/components/WidgetErrorState/WidgetErrorState.js +22 -0
- package/dist/lib/ui/components/WidgetErrorState/WidgetErrorState.js.map +1 -0
- package/dist/lib/ui/components/WidgetGrid/WidgetGrid.cjs +1 -1
- package/dist/lib/ui/components/WidgetGrid/WidgetGrid.cjs.map +1 -1
- package/dist/lib/ui/components/WidgetGrid/WidgetGrid.js +40 -26
- package/dist/lib/ui/components/WidgetGrid/WidgetGrid.js.map +1 -1
- package/dist/lib/ui/components/WidgetLoadingState/WidgetLoadingState.cjs +2 -0
- package/dist/lib/ui/components/WidgetLoadingState/WidgetLoadingState.cjs.map +1 -0
- package/dist/lib/ui/components/WidgetLoadingState/WidgetLoadingState.js +27 -0
- package/dist/lib/ui/components/WidgetLoadingState/WidgetLoadingState.js.map +1 -0
- package/dist/lib/ui/primitives/ComboBox/ComboBox.cjs +2 -0
- package/dist/lib/ui/primitives/ComboBox/ComboBox.cjs.map +1 -0
- package/dist/lib/ui/primitives/ComboBox/ComboBox.js +58 -0
- package/dist/lib/ui/primitives/ComboBox/ComboBox.js.map +1 -0
- package/dist/lib/ui/primitives/DateRangePicker/DateRangePicker.cjs +1 -1
- package/dist/lib/ui/primitives/DateRangePicker/DateRangePicker.js +17 -17
- package/dist/lib/ui/primitives/Search/Search.cjs +1 -1
- package/dist/lib/ui/primitives/Search/Search.js +8 -8
- package/dist/types/ui/components/Widget/Widget.d.ts +11 -8
- package/dist/types/ui/components/WidgetEmptyState/WidgetEmptyState.d.ts +6 -0
- package/dist/types/ui/components/WidgetErrorState/WidgetErrorState.d.ts +8 -0
- package/dist/types/ui/components/WidgetGrid/WidgetGrid.d.ts +3 -1
- package/dist/types/ui/components/WidgetLoadingState/WidgetLoadingState.d.ts +6 -0
- package/dist/types/ui/components/index.d.ts +3 -0
- package/dist/types/ui/primitives/ComboBox/ComboBox.d.ts +12 -0
- package/dist/types/ui/primitives/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),d=require("../../../vendor/clsx/dist/clsx.cjs"),a=require("react"),l=require("react-aria-components");;/* empty css */const p=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),d=require("../../../vendor/clsx/dist/clsx.cjs"),a=require("react"),l=require("react-aria-components");;/* empty css */const p=require("../../icons/IconX.cjs"),q=require("../../icons/IconSearch.cjs"),b=require("../Fieldset/Fieldset.cjs"),S=require("../Input/Input.cjs"),h=require("../IconButton/IconButton.cjs"),x=require("../ListBox/ListBox.cjs"),f=a.forwardRef(function({className:m,results:s,onSearch:o,...i},n){const[u,j]=a.useState(""),c=a.useRef(null),t=e=>{j(e),o&&o(e)},I=d.clsx(m,"search-input-container");return r.jsxs(l.ComboBox,{className:I,children:[r.jsx(b.Label,{hidden:!0,children:i["aria-label"]||"Search"}),r.jsx(S.Input,{type:"search",className:"search-input",value:u,onInput:e=>t(e.currentTarget.value),ref:e=>{c.current=e,typeof n=="function"?n(e):n&&(n.current=e)},...i}),r.jsx("span",{className:"search-icon",children:u?r.jsx(h.IconButton,{"aria-label":"Clear search",onPress:()=>t(""),size:"small",variant:"subtle",children:r.jsx(p.IconX,{})}):r.jsx(h.IconButton,{"aria-label":"Clear search",onPress:()=>{var e;return(e=c==null?void 0:c.current)==null?void 0:e.focus()},size:"small",variant:"subtle",children:r.jsx(q.IconSearch,{})})}),r.jsx(l.Popover,{children:r.jsx(x.ListBox,{children:s==null?void 0:s.map(e=>r.jsx(x.ListBoxItem,{onAction:()=>t(e),children:e},e))})})]})});exports.Search=f;
|
|
2
2
|
//# sourceMappingURL=Search.cjs.map
|
|
@@ -3,10 +3,10 @@ import { clsx as f } from "../../../vendor/clsx/dist/clsx.js";
|
|
|
3
3
|
import d, { useState as I, useRef as b } from "react";
|
|
4
4
|
import { ComboBox as x, Popover as v } from "react-aria-components";
|
|
5
5
|
/* empty css */
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
6
|
+
import { IconX as B } from "../../icons/IconX.js";
|
|
7
|
+
import { IconSearch as S } from "../../icons/IconSearch.js";
|
|
8
|
+
import { Label as N } from "../Fieldset/Fieldset.js";
|
|
9
|
+
import { Input as C } from "../Input/Input.js";
|
|
10
10
|
import { IconButton as m } from "../IconButton/IconButton.js";
|
|
11
11
|
import { ListBox as L, ListBoxItem as P } from "../ListBox/ListBox.js";
|
|
12
12
|
const D = d.forwardRef(function({ className: l, results: a, onSearch: n, ...i }, o) {
|
|
@@ -14,9 +14,9 @@ const D = d.forwardRef(function({ className: l, results: a, onSearch: n, ...i },
|
|
|
14
14
|
p(r), n && n(r);
|
|
15
15
|
}, h = f(l, "search-input-container");
|
|
16
16
|
return /* @__PURE__ */ u(x, { className: h, children: [
|
|
17
|
-
/* @__PURE__ */ e(
|
|
17
|
+
/* @__PURE__ */ e(N, { hidden: !0, children: i["aria-label"] || "Search" }),
|
|
18
18
|
/* @__PURE__ */ e(
|
|
19
|
-
|
|
19
|
+
C,
|
|
20
20
|
{
|
|
21
21
|
type: "search",
|
|
22
22
|
className: "search-input",
|
|
@@ -35,7 +35,7 @@ const D = d.forwardRef(function({ className: l, results: a, onSearch: n, ...i },
|
|
|
35
35
|
onPress: () => c(""),
|
|
36
36
|
size: "small",
|
|
37
37
|
variant: "subtle",
|
|
38
|
-
children: /* @__PURE__ */ e(
|
|
38
|
+
children: /* @__PURE__ */ e(B, {})
|
|
39
39
|
}
|
|
40
40
|
) : /* @__PURE__ */ e(
|
|
41
41
|
m,
|
|
@@ -47,7 +47,7 @@ const D = d.forwardRef(function({ className: l, results: a, onSearch: n, ...i },
|
|
|
47
47
|
},
|
|
48
48
|
size: "small",
|
|
49
49
|
variant: "subtle",
|
|
50
|
-
children: /* @__PURE__ */ e(
|
|
50
|
+
children: /* @__PURE__ */ e(S, {})
|
|
51
51
|
}
|
|
52
52
|
) }),
|
|
53
53
|
/* @__PURE__ */ e(v, { children: /* @__PURE__ */ e(L, { children: a == null ? void 0 : a.map((r) => /* @__PURE__ */ e(P, { onAction: () => c(r), children: r }, r)) }) })
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { type ComponentPropsWithoutRef, type ReactNode } from "react";
|
|
2
2
|
import "./widget.css";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
type WidgetDescriptionProps = {
|
|
4
|
+
description?: undefined;
|
|
5
|
+
descriptionButtonLabel?: undefined;
|
|
6
|
+
} | {
|
|
7
|
+
description: ReactNode;
|
|
8
|
+
descriptionButtonLabel: string;
|
|
7
9
|
};
|
|
8
|
-
export
|
|
9
|
-
title:
|
|
10
|
-
description?: ReactNode;
|
|
10
|
+
export type WidgetProps = Omit<ComponentPropsWithoutRef<"div">, "title"> & WidgetDescriptionProps & {
|
|
11
|
+
title: ReactNode;
|
|
11
12
|
headerActions?: ReactNode;
|
|
12
|
-
}
|
|
13
|
+
};
|
|
14
|
+
export declare const Widget: import("react").ForwardRefExoticComponent<WidgetProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef } from "react";
|
|
2
|
+
import "./widget-empty-state.css";
|
|
3
|
+
export type WidgetEmptyStateProps = ComponentPropsWithoutRef<"div"> & {
|
|
4
|
+
message: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function WidgetEmptyState({ message, className, ...props }: WidgetEmptyStateProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef } from "react";
|
|
2
|
+
import "./widget-error-state.css";
|
|
3
|
+
export type WidgetErrorStateProps = ComponentPropsWithoutRef<"div"> & {
|
|
4
|
+
message: string;
|
|
5
|
+
retryLabel: string;
|
|
6
|
+
onRetry?: () => void;
|
|
7
|
+
};
|
|
8
|
+
export declare function WidgetErrorState({ message, retryLabel, onRetry, className, ...props }: WidgetErrorStateProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -15,8 +15,10 @@ export interface WidgetGridProps {
|
|
|
15
15
|
cols?: number;
|
|
16
16
|
rowHeight?: number;
|
|
17
17
|
isEditable?: boolean;
|
|
18
|
+
isDraggable?: boolean;
|
|
19
|
+
isResizable?: boolean;
|
|
18
20
|
className?: string;
|
|
19
21
|
style?: CSSProperties;
|
|
20
22
|
children: ReactNode;
|
|
21
23
|
}
|
|
22
|
-
export declare function WidgetGrid({ layout, onLayoutChange, cols, rowHeight, isEditable, className, style, children, }: WidgetGridProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare function WidgetGrid({ layout, onLayoutChange, cols, rowHeight, isEditable, isDraggable, isResizable, className, style, children, }: WidgetGridProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef } from "react";
|
|
2
|
+
import "./widget-loading-state.css";
|
|
3
|
+
export type WidgetLoadingStateProps = ComponentPropsWithoutRef<"div"> & {
|
|
4
|
+
message: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function WidgetLoadingState({ message, className, ...props }: WidgetLoadingStateProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,4 +6,7 @@ export * from "./FormModal/FormModal";
|
|
|
6
6
|
export * from "./PageHeader/PageHeader";
|
|
7
7
|
export * from "./Sidebar/Sidebar";
|
|
8
8
|
export * from "./Widget/Widget";
|
|
9
|
+
export * from "./WidgetEmptyState/WidgetEmptyState";
|
|
10
|
+
export * from "./WidgetErrorState/WidgetErrorState";
|
|
9
11
|
export * from "./WidgetGrid/WidgetGrid";
|
|
12
|
+
export * from "./WidgetLoadingState/WidgetLoadingState";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SharedFieldProps, type ListBoxItemProps } from "primitives";
|
|
2
|
+
import { type ComboBoxProps as RACComboBoxProps } from "react-aria-components";
|
|
3
|
+
import "./combobox.css";
|
|
4
|
+
export interface ComboBoxFieldProps<T extends object> extends Omit<ComboBoxProps<T>, "children">, SharedFieldProps {
|
|
5
|
+
items?: Iterable<T>;
|
|
6
|
+
children: React.ReactNode | ((item: T) => React.ReactNode);
|
|
7
|
+
}
|
|
8
|
+
export declare function ComboBoxField<T extends object>({ className, label, description, errorMessage, placeholder, children, items, ...props }: ComboBoxFieldProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export type ComboBoxProps<T extends object> = RACComboBoxProps<T>;
|
|
10
|
+
export declare function ComboBox<T extends object>({ ...props }: ComboBoxProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export type ComboBoxItemProps = ListBoxItemProps;
|
|
12
|
+
export declare function ComboBoxItem({ children, className, ...props }: ComboBoxItemProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,6 +5,7 @@ export * from "./CodeEditor/CodeEditor";
|
|
|
5
5
|
export * from "./Avatar/Avatar";
|
|
6
6
|
export * from "./Button/Button";
|
|
7
7
|
export * from "./Checkbox/Checkbox";
|
|
8
|
+
export * from "./ComboBox/ComboBox";
|
|
8
9
|
export * from "./DateRangePicker/DateRangePicker";
|
|
9
10
|
export * from "./DateRangePicker/dateRangePresets";
|
|
10
11
|
export * from "./Dialog/Dialog";
|