@lablup/ui-common 0.1.0-alpha.1 → 0.1.0-alpha.10
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/README.md +9 -2
- package/dist/assets/components/BaseCard/BaseCard.css +1 -1
- package/dist/assets/components/Button/Button.css +1 -1
- package/dist/assets/components/DataTable/DataTable.css +1 -1
- package/dist/assets/components/Drawer/Drawer.css +1 -1
- package/dist/assets/components/EmptyState/EmptyState.css +1 -1
- package/dist/assets/components/ErrorState/ErrorState.css +1 -1
- package/dist/assets/components/StatCard/StatCard.css +1 -1
- package/dist/assets/components/Tabs/Tabs.css +1 -1
- package/dist/assets/components/Tooltip/Tooltip.css +1 -1
- package/dist/components/DataTable/DataTable.d.ts +16 -5
- package/dist/components/DataTable/DataTable2.js +31 -64
- package/dist/components/DataTable/DataTable2.js.map +1 -1
- package/dist/components/EmptyState/EmptyState.d.ts +10 -3
- package/dist/components/EmptyState/EmptyState2.js +31 -48
- package/dist/components/EmptyState/EmptyState2.js.map +1 -1
- package/dist/components/EmptyState/index.d.ts +6 -1
- package/dist/components/ErrorState/ErrorState.d.ts +17 -4
- package/dist/components/ErrorState/ErrorState2.js +20 -23
- package/dist/components/ErrorState/ErrorState2.js.map +1 -1
- package/dist/components/ErrorState/index.d.ts +1 -1
- package/dist/components/Skeleton/SkeletonCard.d.ts +3 -1
- package/dist/components/Skeleton/SkeletonCard2.js +12 -3
- package/dist/components/Skeleton/SkeletonCard2.js.map +1 -1
- package/dist/components/Skeleton/SkeletonRow.d.ts +3 -1
- package/dist/components/Skeleton/SkeletonRow2.js +8 -3
- package/dist/components/Skeleton/SkeletonRow2.js.map +1 -1
- package/dist/components/Skeleton/SkeletonText.d.ts +3 -1
- package/dist/components/Skeleton/SkeletonText2.js +6 -5
- package/dist/components/Skeleton/SkeletonText2.js.map +1 -1
- package/dist/components/Tabs/Tabs.d.ts +10 -23
- package/dist/components/Tabs/Tabs2.js +127 -146
- package/dist/components/Tabs/Tabs2.js.map +1 -1
- package/dist/components/Tabs/index.d.ts +2 -2
- package/dist/components/Tabs/index.js +2 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +3 -4
- package/dist/styles/base.css +130 -48
- package/dist/styles/themes/orange-dark.css +3 -0
- package/dist/styles/themes/orange-light.css +6 -1
- package/package.json +1 -1
- package/dist/components/EmptyState/illustrations.d.ts +0 -51
- package/dist/components/EmptyState/illustrations.js +0 -571
- package/dist/components/EmptyState/illustrations.js.map +0 -1
- package/dist/components/Tabs/tabTags.d.ts +0 -9
- package/dist/components/Tabs/tabTags.js +0 -11
- package/dist/components/Tabs/tabTags.js.map +0 -1
- package/dist/styles/themes/bliss-dark.css +0 -123
- package/dist/styles/themes/bliss-light.css +0 -123
- package/dist/styles/themes/glass-dark.css +0 -124
- package/dist/styles/themes/glass-light.css +0 -125
- package/dist/styles/themes/reverie-dark.css +0 -104
- package/dist/styles/themes/reverie-light.css +0 -104
- package/dist/styles/themes/stained-dark.css +0 -80
- package/dist/styles/themes/stained-light.css +0 -80
|
@@ -2,9 +2,9 @@ import { Skeleton as e } from "./Skeleton2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
import { Fragment as t, jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/Skeleton/SkeletonRow.tsx
|
|
5
|
-
function i({ showAvatar: i = !1, showActions: a = !1, count: o = 1, className: s = "", testId: c }) {
|
|
6
|
-
let
|
|
7
|
-
return /* @__PURE__ */ n(t, { children:
|
|
5
|
+
function i({ showAvatar: i = !1, showActions: a = !1, count: o = 1, className: s = "", testId: c, loadingLabel: l }) {
|
|
6
|
+
let u = Array.from({ length: o });
|
|
7
|
+
return /* @__PURE__ */ n(t, { children: u.map((t, o) => /* @__PURE__ */ r("div", {
|
|
8
8
|
className: `skeleton-row ${s}`,
|
|
9
9
|
"data-testid": c ? `${c}-${String(o)}` : void 0,
|
|
10
10
|
role: "status",
|
|
@@ -13,6 +13,7 @@ function i({ showAvatar: i = !1, showActions: a = !1, count: o = 1, className: s
|
|
|
13
13
|
i && /* @__PURE__ */ n("div", {
|
|
14
14
|
className: "skeleton-row__avatar",
|
|
15
15
|
children: /* @__PURE__ */ n(e, {
|
|
16
|
+
loadingLabel: l,
|
|
16
17
|
width: "40px",
|
|
17
18
|
height: "40px",
|
|
18
19
|
variant: "circle"
|
|
@@ -21,9 +22,11 @@ function i({ showAvatar: i = !1, showActions: a = !1, count: o = 1, className: s
|
|
|
21
22
|
/* @__PURE__ */ r("div", {
|
|
22
23
|
className: "skeleton-row__content",
|
|
23
24
|
children: [/* @__PURE__ */ n(e, {
|
|
25
|
+
loadingLabel: l,
|
|
24
26
|
width: "25%",
|
|
25
27
|
height: "14px"
|
|
26
28
|
}), /* @__PURE__ */ n(e, {
|
|
29
|
+
loadingLabel: l,
|
|
27
30
|
width: "100%",
|
|
28
31
|
height: "16px"
|
|
29
32
|
})]
|
|
@@ -31,9 +34,11 @@ function i({ showAvatar: i = !1, showActions: a = !1, count: o = 1, className: s
|
|
|
31
34
|
a && /* @__PURE__ */ r("div", {
|
|
32
35
|
className: "skeleton-row__actions",
|
|
33
36
|
children: [/* @__PURE__ */ n(e, {
|
|
37
|
+
loadingLabel: l,
|
|
34
38
|
width: "32px",
|
|
35
39
|
height: "32px"
|
|
36
40
|
}), /* @__PURE__ */ n(e, {
|
|
41
|
+
loadingLabel: l,
|
|
37
42
|
width: "32px",
|
|
38
43
|
height: "32px"
|
|
39
44
|
})]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkeletonRow2.js","names":[],"sources":["../../../src/components/Skeleton/SkeletonRow.tsx"],"sourcesContent":["/**\n * SkeletonRow Component\n *\n * Skeleton placeholder for list rows and table rows.\n * Mimics the structure of a log entry or table row.\n *\n * @example\n * // Basic usage\n * <SkeletonRow />\n *\n * @example\n * // With avatar\n * <SkeletonRow showAvatar />\n */\n\nimport { Skeleton } from \"./Skeleton\";\nimport \"./SkeletonRow.css\";\n\nexport interface SkeletonRowProps {\n /** Show avatar/icon on the left */\n showAvatar?: boolean;\n /** Show action buttons on the right */\n showActions?: boolean;\n /** Number of rows to display */\n count?: number;\n /** Additional CSS class names */\n className?: string;\n /** Test ID for testing */\n testId?: string;\n}\n\n/**\n * SkeletonRow provides a loading placeholder for list/table rows.\n *\n * Features:\n * - Optional avatar/icon\n * - Optional action buttons\n * - Multiple rows for lists\n */\nexport function SkeletonRow({\n showAvatar = false,\n showActions = false,\n count = 1,\n className = \"\",\n testId,\n}: SkeletonRowProps) {\n const rows = Array.from({ length: count });\n\n return (\n <>\n {rows.map((_, index) => (\n <div\n key={index}\n className={`skeleton-row ${className}`}\n data-testid={testId ? `${testId}-${String(index)}` : undefined}\n role=\"status\"\n aria-busy=\"true\"\n >\n {showAvatar && (\n <div className=\"skeleton-row__avatar\">\n <Skeleton
|
|
1
|
+
{"version":3,"file":"SkeletonRow2.js","names":[],"sources":["../../../src/components/Skeleton/SkeletonRow.tsx"],"sourcesContent":["/**\n * SkeletonRow Component\n *\n * Skeleton placeholder for list rows and table rows.\n * Mimics the structure of a log entry or table row.\n *\n * @example\n * // Basic usage\n * <SkeletonRow />\n *\n * @example\n * // With avatar\n * <SkeletonRow showAvatar />\n */\n\nimport { Skeleton } from \"./Skeleton\";\nimport \"./SkeletonRow.css\";\n\nexport interface SkeletonRowProps {\n /** Show avatar/icon on the left */\n showAvatar?: boolean;\n /** Show action buttons on the right */\n showActions?: boolean;\n /** Number of rows to display */\n count?: number;\n /** Additional CSS class names */\n className?: string;\n /** Test ID for testing */\n testId?: string;\n /** Accessible name for each skeleton inside. Defaults to \"Loading\". */\n loadingLabel?: string;\n}\n\n/**\n * SkeletonRow provides a loading placeholder for list/table rows.\n *\n * Features:\n * - Optional avatar/icon\n * - Optional action buttons\n * - Multiple rows for lists\n */\nexport function SkeletonRow({\n showAvatar = false,\n showActions = false,\n count = 1,\n className = \"\",\n testId,\n loadingLabel,\n}: SkeletonRowProps) {\n const rows = Array.from({ length: count });\n\n return (\n <>\n {rows.map((_, index) => (\n <div\n key={index}\n className={`skeleton-row ${className}`}\n data-testid={testId ? `${testId}-${String(index)}` : undefined}\n role=\"status\"\n aria-busy=\"true\"\n >\n {showAvatar && (\n <div className=\"skeleton-row__avatar\">\n <Skeleton\n loadingLabel={loadingLabel}\n width=\"40px\"\n height=\"40px\"\n variant=\"circle\"\n />\n </div>\n )}\n <div className=\"skeleton-row__content\">\n <Skeleton loadingLabel={loadingLabel} width=\"25%\" height=\"14px\" />\n <Skeleton loadingLabel={loadingLabel} width=\"100%\" height=\"16px\" />\n </div>\n {showActions && (\n <div className=\"skeleton-row__actions\">\n <Skeleton loadingLabel={loadingLabel} width=\"32px\" height=\"32px\" />\n <Skeleton loadingLabel={loadingLabel} width=\"32px\" height=\"32px\" />\n </div>\n )}\n </div>\n ))}\n </>\n );\n}\n\nexport default SkeletonRow;\n"],"mappings":";;;;AAyCA,SAAgB,EAAY,EAC1B,gBAAa,IACb,iBAAc,IACd,WAAQ,GACR,eAAY,IACZ,WACA,mBACmB;CACnB,IAAM,IAAO,MAAM,KAAK,EAAE,QAAQ,EAAM,CAAC;CAEzC,OACE,kBAAA,GAAA,EAAA,UACG,EAAK,KAAK,GAAG,MACZ,kBAAC,OAAD;EAEE,WAAW,gBAAgB;EAC3B,eAAa,IAAS,GAAG,EAAO,GAAG,OAAO,CAAK,MAAM,KAAA;EACrD,MAAK;EACL,aAAU;EALZ,UAAA;GAOG,KACC,kBAAC,OAAD;IAAK,WAAU;IACb,UAAA,kBAAC,GAAD;KACgB;KACd,OAAM;KACN,QAAO;KACP,SAAQ;IACT,CAAA;GACE,CAAA;GAEP,kBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACE,kBAAC,GAAD;KAAwB;KAAc,OAAM;KAAM,QAAO;IAAQ,CAAA,GACjE,kBAAC,GAAD;KAAwB;KAAc,OAAM;KAAO,QAAO;IAAQ,CAAA,CAC/D;;GACJ,KACC,kBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACE,kBAAC,GAAD;KAAwB;KAAc,OAAM;KAAO,QAAO;IAAQ,CAAA,GAClE,kBAAC,GAAD;KAAwB;KAAc,OAAM;KAAO,QAAO;IAAQ,CAAA,CAC/D;;EAEJ;CA1BE,GAAA,CA0BF,CACN,EACD,CAAA;AAEN"}
|
|
@@ -7,6 +7,8 @@ export interface SkeletonTextProps {
|
|
|
7
7
|
className?: string;
|
|
8
8
|
/** Test ID for testing */
|
|
9
9
|
testId?: string;
|
|
10
|
+
/** Accessible name for each skeleton inside. Defaults to "Loading". */
|
|
11
|
+
loadingLabel?: string;
|
|
10
12
|
}
|
|
11
13
|
/**
|
|
12
14
|
* SkeletonText provides a loading placeholder for text content.
|
|
@@ -16,5 +18,5 @@ export interface SkeletonTextProps {
|
|
|
16
18
|
* - Configurable line spacing
|
|
17
19
|
* - Accessible via aria-busy
|
|
18
20
|
*/
|
|
19
|
-
export declare function SkeletonText({ lines, spacing, className, testId, }: SkeletonTextProps): import("react").JSX.Element;
|
|
21
|
+
export declare function SkeletonText({ lines, spacing, className, testId, loadingLabel, }: SkeletonTextProps): import("react").JSX.Element;
|
|
20
22
|
export default SkeletonText;
|
|
@@ -2,18 +2,19 @@ import { Skeleton as e } from "./Skeleton2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
import { jsx as t } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/Skeleton/SkeletonText.tsx
|
|
5
|
-
function n({ lines: n = 3, spacing: r = "normal", className: i = "", testId: a }) {
|
|
6
|
-
let
|
|
5
|
+
function n({ lines: n = 3, spacing: r = "normal", className: i = "", testId: a, loadingLabel: o }) {
|
|
6
|
+
let s = [
|
|
7
7
|
"skeleton-text",
|
|
8
8
|
`skeleton-text--${r}`,
|
|
9
9
|
i
|
|
10
|
-
].filter(Boolean).join(" "),
|
|
10
|
+
].filter(Boolean).join(" "), c = Array.from({ length: n }, (e, t) => t === n - 1 ? "60%" : t % 2 == 0 ? "100%" : "95%");
|
|
11
11
|
return /* @__PURE__ */ t("div", {
|
|
12
|
-
className:
|
|
12
|
+
className: s,
|
|
13
13
|
"data-testid": a,
|
|
14
14
|
role: "status",
|
|
15
15
|
"aria-busy": "true",
|
|
16
|
-
children:
|
|
16
|
+
children: c.map((n, r) => /* @__PURE__ */ t(e, {
|
|
17
|
+
loadingLabel: o,
|
|
17
18
|
width: n,
|
|
18
19
|
height: "1em",
|
|
19
20
|
variant: "text"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkeletonText2.js","names":[],"sources":["../../../src/components/Skeleton/SkeletonText.tsx"],"sourcesContent":["/**\n * SkeletonText Component\n *\n * Skeleton placeholder for text content.\n * Provides multiple lines with varying widths for natural appearance.\n *\n * @example\n * // Basic usage (3 lines)\n * <SkeletonText />\n *\n * @example\n * // Custom number of lines\n * <SkeletonText lines={5} />\n */\n\nimport { Skeleton } from \"./Skeleton\";\nimport \"./SkeletonText.css\";\n\nexport interface SkeletonTextProps {\n /** Number of text lines to display */\n lines?: number;\n /** Spacing between lines */\n spacing?: \"compact\" | \"normal\" | \"relaxed\";\n /** Additional CSS class names */\n className?: string;\n /** Test ID for testing */\n testId?: string;\n}\n\n/**\n * SkeletonText provides a loading placeholder for text content.\n *\n * Features:\n * - Multiple lines with varying widths\n * - Configurable line spacing\n * - Accessible via aria-busy\n */\nexport function SkeletonText({\n lines = 3,\n spacing = \"normal\",\n className = \"\",\n testId,\n}: SkeletonTextProps) {\n const classNames = [\"skeleton-text\", `skeleton-text--${spacing}`, className]\n .filter(Boolean)\n .join(\" \");\n\n // Generate varying widths for natural appearance\n const widths = Array.from({ length: lines }, (_, i) => {\n if (i === lines - 1) {\n // Last line is shorter\n return \"60%\";\n }\n // Alternate between full and slightly shorter widths\n return i % 2 === 0 ? \"100%\" : \"95%\";\n });\n\n return (\n <div className={classNames} data-testid={testId} role=\"status\" aria-busy=\"true\">\n {widths.map((width, index) => (\n <Skeleton
|
|
1
|
+
{"version":3,"file":"SkeletonText2.js","names":[],"sources":["../../../src/components/Skeleton/SkeletonText.tsx"],"sourcesContent":["/**\n * SkeletonText Component\n *\n * Skeleton placeholder for text content.\n * Provides multiple lines with varying widths for natural appearance.\n *\n * @example\n * // Basic usage (3 lines)\n * <SkeletonText />\n *\n * @example\n * // Custom number of lines\n * <SkeletonText lines={5} />\n */\n\nimport { Skeleton } from \"./Skeleton\";\nimport \"./SkeletonText.css\";\n\nexport interface SkeletonTextProps {\n /** Number of text lines to display */\n lines?: number;\n /** Spacing between lines */\n spacing?: \"compact\" | \"normal\" | \"relaxed\";\n /** Additional CSS class names */\n className?: string;\n /** Test ID for testing */\n testId?: string;\n /** Accessible name for each skeleton inside. Defaults to \"Loading\". */\n loadingLabel?: string;\n}\n\n/**\n * SkeletonText provides a loading placeholder for text content.\n *\n * Features:\n * - Multiple lines with varying widths\n * - Configurable line spacing\n * - Accessible via aria-busy\n */\nexport function SkeletonText({\n lines = 3,\n spacing = \"normal\",\n className = \"\",\n testId,\n loadingLabel,\n}: SkeletonTextProps) {\n const classNames = [\"skeleton-text\", `skeleton-text--${spacing}`, className]\n .filter(Boolean)\n .join(\" \");\n\n // Generate varying widths for natural appearance\n const widths = Array.from({ length: lines }, (_, i) => {\n if (i === lines - 1) {\n // Last line is shorter\n return \"60%\";\n }\n // Alternate between full and slightly shorter widths\n return i % 2 === 0 ? \"100%\" : \"95%\";\n });\n\n return (\n <div className={classNames} data-testid={testId} role=\"status\" aria-busy=\"true\">\n {widths.map((width, index) => (\n <Skeleton\n loadingLabel={loadingLabel}\n key={index}\n width={width}\n height=\"1em\"\n variant=\"text\"\n />\n ))}\n </div>\n );\n}\n\nexport default SkeletonText;\n"],"mappings":";;;;AAuCA,SAAgB,EAAa,EAC3B,WAAQ,GACR,aAAU,UACV,eAAY,IACZ,WACA,mBACoB;CACpB,IAAM,IAAa;EAAC;EAAiB,kBAAkB;EAAW;CAAS,CAAC,CACzE,OAAO,OAAO,CAAC,CACf,KAAK,GAAG,GAGL,IAAS,MAAM,KAAK,EAAE,QAAQ,EAAM,IAAI,GAAG,MAC3C,MAAM,IAAQ,IAET,QAGF,IAAI,KAAM,IAAI,SAAS,KAC/B;CAED,OACE,kBAAC,OAAD;EAAK,WAAW;EAAY,eAAa;EAAQ,MAAK;EAAS,aAAU;EACtE,UAAA,EAAO,KAAK,GAAO,MAClB,kBAAC,GAAD;GACgB;GAEP;GACP,QAAO;GACP,SAAQ;EACT,GAJM,CAIN,CACF;CACE,CAAA;AAET"}
|
|
@@ -1,26 +1,18 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { TabTagType, TabTagLabels } from './tabTags';
|
|
3
|
-
export type { TabTagType, TabTagLabels } from './tabTags';
|
|
4
|
-
export { TAG_CONFIG } from './tabTags';
|
|
5
2
|
export interface TabItem {
|
|
6
3
|
id: string;
|
|
7
4
|
label: string;
|
|
8
5
|
content: ReactNode;
|
|
9
6
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Optional extra trailing node rendered next to the tab label (e.g. a
|
|
21
|
-
* count badge). Distinct from `tag` (which uses a fixed preset). Use this
|
|
22
|
-
* when migrating segmented controls that rendered their own inline count
|
|
23
|
-
* pill alongside the label.
|
|
7
|
+
* Trailing node rendered next to the tab label: a count pill, a status
|
|
8
|
+
* badge, whatever the consumer's vocabulary calls for.
|
|
9
|
+
*
|
|
10
|
+
* This used to sit beside a `tag` prop that took one of four fixed names,
|
|
11
|
+
* required / recommended / beta / experimental, and rendered a Badge for
|
|
12
|
+
* it. Those are one product's guide vocabulary, and the arrangement had
|
|
13
|
+
* already split across the boundary: the badge variant lived here while the
|
|
14
|
+
* label text had to be passed in from the consumer's locale bundle. A
|
|
15
|
+
* consumer that wants that badge renders it here, and owns both halves.
|
|
24
16
|
*/
|
|
25
17
|
labelExtra?: ReactNode;
|
|
26
18
|
/**
|
|
@@ -98,10 +90,5 @@ export interface TabsProps {
|
|
|
98
90
|
scrollLeftLabel?: string;
|
|
99
91
|
/** Accessible label for the right scroll-arrow button. Default: "Scroll right" */
|
|
100
92
|
scrollRightLabel?: string;
|
|
101
|
-
/**
|
|
102
|
-
* English defaults for every guide-tag badge label (required / recommended
|
|
103
|
-
* / beta / experimental). Override individual entries to translate them.
|
|
104
|
-
*/
|
|
105
|
-
tagLabels?: TabTagLabels;
|
|
106
93
|
}
|
|
107
|
-
export declare function Tabs({ tabs, groups, defaultTab, activeTab: controlledTab, onTabChange, className, panelClassName, ariaLabel, showOverflowControls, showGroupLabels, overflowMode: explicitOverflowMode, variant, fillContainer, renderPanel, moreTabsLabel, selectTabLabel, scrollLeftLabel, scrollRightLabel,
|
|
94
|
+
export declare function Tabs({ tabs, groups, defaultTab, activeTab: controlledTab, onTabChange, className, panelClassName, ariaLabel, showOverflowControls, showGroupLabels, overflowMode: explicitOverflowMode, variant, fillContainer, renderPanel, moreTabsLabel, selectTabLabel, scrollLeftLabel, scrollRightLabel, }: TabsProps): import("react").JSX.Element;
|