@godxjp/ui 18.9.0 → 18.11.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/LICENSE +202 -0
- package/dist/components/data-display/badge.d.ts +7 -0
- package/dist/components/data-display/badge.js +1 -1
- package/dist/components/data-display/data-table.js +2 -2
- package/dist/components/data-display/index.d.ts +2 -0
- package/dist/components/data-display/index.js +2 -0
- package/dist/components/data-display/permission-matrix.d.ts +26 -0
- package/dist/components/data-display/permission-matrix.js +219 -0
- package/dist/components/data-display/table.d.ts +12 -0
- package/dist/components/data-entry/branch-scope-picker.d.ts +43 -0
- package/dist/components/data-entry/branch-scope-picker.js +200 -0
- package/dist/components/data-entry/index.d.ts +2 -0
- package/dist/components/data-entry/index.js +2 -0
- package/dist/components/data-entry/select.d.ts +7 -1
- package/dist/components/data-entry/select.js +46 -26
- package/dist/components/feedback/alert.d.ts +2 -20
- package/dist/components/feedback/alert.js +1 -11
- package/dist/components/feedback/banner.d.ts +21 -0
- package/dist/components/feedback/banner.js +19 -0
- package/dist/components/feedback/index.d.ts +4 -2
- package/dist/components/feedback/index.js +2 -2
- package/dist/components/general/typography.d.ts +1 -0
- package/dist/components/general/typography.js +32 -13
- package/dist/components/layout/auth-shell.d.ts +2 -2
- package/dist/components/layout/index.d.ts +2 -2
- package/dist/components/layout/index.js +2 -2
- package/dist/components/layout/page-container.d.ts +1 -1
- package/dist/components/layout/page-container.js +61 -15
- package/dist/components/layout/resizable.d.ts +1 -1
- package/dist/components/layout/resizable.js +26 -8
- package/dist/components/layout/service-role-panel.d.ts +25 -0
- package/dist/components/layout/service-role-panel.js +206 -0
- package/dist/components/navigation/filter-bar.d.ts +2 -2
- package/dist/components/navigation/filter-bar.js +113 -34
- package/dist/components/navigation/index.d.ts +1 -1
- package/dist/components/navigation/pagination.js +20 -1
- package/dist/components/navigation/tabs.js +6 -1
- package/dist/i18n/messages/en.json +59 -4
- package/dist/i18n/messages/ja.json +54 -5
- package/dist/i18n/messages/vi.json +53 -4
- package/dist/lib/field-a11y.d.ts +7 -0
- package/dist/lib/field-a11y.js +6 -0
- package/dist/lib/hooks.d.ts +15 -0
- package/dist/lib/hooks.js +37 -0
- package/dist/props/components/data-display.prop.d.ts +66 -0
- package/dist/props/components/data-entry.prop.d.ts +54 -0
- package/dist/props/components/feedback.prop.d.ts +3 -3
- package/dist/props/components/general.prop.d.ts +8 -1
- package/dist/props/components/layout.prop.d.ts +80 -51
- package/dist/props/components/navigation.prop.d.ts +77 -50
- package/dist/props/registry.d.ts +274 -54
- package/dist/props/registry.js +362 -73
- package/dist/props/vocabulary/content.prop.d.ts +5 -0
- package/dist/props/vocabulary/index.d.ts +1 -1
- package/dist/props/vocabulary/interaction.prop.d.ts +4 -7
- package/dist/props/vocabulary/layout.prop.d.ts +2 -2
- package/dist/styles/alert-layout.css +15 -32
- package/dist/styles/badge-layout.css +5 -0
- package/dist/styles/control.css +5 -0
- package/dist/styles/layout.css +118 -108
- package/dist/styles/shell-layout.css +16 -7
- package/dist/styles/table-layout.css +92 -2
- package/dist/styles/text-layout.css +13 -0
- package/dist/tokens/base.css +1 -0
- package/dist/tokens/components/badge.css +5 -0
- package/dist/tokens/components/banner.css +16 -0
- package/dist/tokens/components/navigation.css +10 -25
- package/dist/tokens/components/shell.css +20 -9
- package/dist/tokens/components/table.css +41 -1
- package/dist/tokens/semantic/layout.css +8 -7
- package/package.json +15 -2
- package/dist/components/layout/page-header.d.ts +0 -22
- package/dist/components/layout/page-header.js +0 -89
|
@@ -83,14 +83,15 @@
|
|
|
83
83
|
* page moves. 11rem = 176px, i.e. the control ends flush with the compact page gutter. */
|
|
84
84
|
--page-header-extra-measure: 11rem; /* 176px */
|
|
85
85
|
|
|
86
|
-
/*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
|
|
86
|
+
/* Gap between the page title and its status/meta band (PageContainer `status`,
|
|
87
|
+
* godxjp-ui#255), and between the band's own items. One knob aligns the badge row
|
|
88
|
+
* to a service's grid; a page that never passes `status` reads neither the token
|
|
89
|
+
* nor the wrapping row. */
|
|
90
|
+
--page-header-status-gap: var(--space-inline-sm);
|
|
90
91
|
|
|
91
|
-
/*
|
|
92
|
-
* `.ui-skeleton-block` skin, so they need only a MEASURE and a block size — a service
|
|
93
|
-
* pending band's proportions here instead of per page. */
|
|
92
|
+
/* PageContainer `headerLoading` placeholders (gh#255). The title/subtitle elements wear the
|
|
93
|
+
* shared `.ui-skeleton-block` skin, so they need only a MEASURE and a block size — a service
|
|
94
|
+
* retunes the pending band's proportions here instead of per page. */
|
|
94
95
|
--page-title-placeholder-measure: 14rem; /* 224px */
|
|
95
96
|
--page-title-placeholder-block-size: 1.5em;
|
|
96
97
|
--page-subtitle-placeholder-measure: 22rem; /* 352px */
|
package/package.json
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@godxjp/ui",
|
|
3
|
-
"version": "18.
|
|
4
|
-
"godxUiMcp": "18.
|
|
3
|
+
"version": "18.11.0",
|
|
4
|
+
"godxUiMcp": "18.11.0",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/godx-jp/godxjp-ui.git"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://github.com/godx-jp/godxjp-ui#readme",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/godx-jp/godxjp-ui/issues"
|
|
13
|
+
},
|
|
14
|
+
"author": "GoDX (https://godx.jp)",
|
|
5
15
|
"type": "module",
|
|
6
16
|
"packageManager": "pnpm@10.29.1",
|
|
7
17
|
"pnpm": {
|
|
@@ -12,6 +22,7 @@
|
|
|
12
22
|
"sideEffects": false,
|
|
13
23
|
"description": "@godxjp/ui — shared React UI framework (shadcn + Radix + Tailwind v4).",
|
|
14
24
|
"files": [
|
|
25
|
+
"LICENSE",
|
|
15
26
|
"dist",
|
|
16
27
|
"scripts/ui-audit.mjs",
|
|
17
28
|
"README.md",
|
|
@@ -296,7 +307,9 @@
|
|
|
296
307
|
"format:fix": "prettier --write .",
|
|
297
308
|
"test": "vitest run",
|
|
298
309
|
"test:visual:auth-login": "node scripts/auth-shell-login-visual.mjs",
|
|
310
|
+
"test:visual:auth-registration": "node scripts/auth-shell-registration-visual.mjs",
|
|
299
311
|
"test:visual:topbar-collision": "node scripts/topbar-collision-visual.mjs",
|
|
312
|
+
"test:visual:table-collection-cjk": "node scripts/table-collection-cjk-visual.mjs",
|
|
300
313
|
"test:watch": "vitest",
|
|
301
314
|
"test:coverage": "vitest run --coverage",
|
|
302
315
|
"check:example-imports": "node scripts/check-example-imports.mjs",
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* PageHeader — the canonical page title band (gh#255).
|
|
3
|
-
*
|
|
4
|
-
* This is the geometry `PageContainer` has always rendered, lifted into its own export so a
|
|
5
|
-
* consumer can mount it OUTSIDE a full page shell — a Sheet detail, a `MasterDetail` detail pane, a
|
|
6
|
-
* tab body, a nested route header — without re-authoring `.ui-page-header` CSS locally. There is
|
|
7
|
-
* exactly ONE implementation: `PageContainer` renders this component, so the two can never drift.
|
|
8
|
-
*
|
|
9
|
-
* The band owns: breadcrumbs (a named `<nav>` landmark with `aria-current="page"` on the leaf), the
|
|
10
|
-
* `<h1>` title, the subtitle/description, a status/meta slot, the `extra` action region, the
|
|
11
|
-
* responsive overflow arrangement (`layout`), and the pending state (`loading`). It owns no page
|
|
12
|
-
* chrome — padding, measure and body rhythm stay with `PageContainer`.
|
|
13
|
-
*
|
|
14
|
-
* DENIED / ERROR are deliberately NOT states of this component: a page the user may not see must
|
|
15
|
-
* not render its title, breadcrumb trail or actions at all (they leak the resource's existence and
|
|
16
|
-
* its name). That whole-surface contract belongs to `ErrorSurface`, which is the canonical public
|
|
17
|
-
* replacement — see `docs/CANONICAL-CONTRACTS.md`.
|
|
18
|
-
*/
|
|
19
|
-
import * as React from "react";
|
|
20
|
-
import type { PageHeaderProp } from "../../props/components/layout.prop.js";
|
|
21
|
-
export type { PageHeaderProp, PageHeaderProp as PageHeaderProps, } from "../../props/components/layout.prop.js";
|
|
22
|
-
export declare const PageHeader: React.ForwardRefExoticComponent<PageHeaderProp & React.RefAttributes<HTMLElement>>;
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import { ChevronRight } from "lucide-react";
|
|
5
|
-
import { useTranslation } from "../../i18n/use-translation.js";
|
|
6
|
-
import { cn } from "../../lib/utils.js";
|
|
7
|
-
const PageHeader = React.forwardRef(function PageHeader2({
|
|
8
|
-
title,
|
|
9
|
-
subtitle,
|
|
10
|
-
meta,
|
|
11
|
-
extra,
|
|
12
|
-
breadcrumb,
|
|
13
|
-
breadcrumbLabel,
|
|
14
|
-
breadcrumbAriaLabel,
|
|
15
|
-
linkComponent: LinkComponent = "a",
|
|
16
|
-
layout = "stack",
|
|
17
|
-
loading = false,
|
|
18
|
-
className
|
|
19
|
-
}, ref) {
|
|
20
|
-
const { t } = useTranslation();
|
|
21
|
-
return (
|
|
22
|
-
// `data-layout` is the only hook the header arrangement needs: `stack` (the default)
|
|
23
|
-
// matches no rule, so the historical geometry is untouched, while `responsive-inline`
|
|
24
|
-
// selects the compact-range rules that keep `extra` beside the title band (gh#231).
|
|
25
|
-
/* @__PURE__ */ jsxs(
|
|
26
|
-
"header",
|
|
27
|
-
{
|
|
28
|
-
ref,
|
|
29
|
-
className: cn("ui-page-header", className),
|
|
30
|
-
"data-layout": layout,
|
|
31
|
-
"aria-busy": loading ? "true" : void 0,
|
|
32
|
-
children: [
|
|
33
|
-
breadcrumb && breadcrumb.length > 0 && /* @__PURE__ */ jsx(
|
|
34
|
-
"nav",
|
|
35
|
-
{
|
|
36
|
-
"aria-label": breadcrumbLabel ?? breadcrumbAriaLabel ?? t("navigation.breadcrumb.ariaLabel"),
|
|
37
|
-
className: "ui-breadcrumb",
|
|
38
|
-
children: /* @__PURE__ */ jsx("ol", { className: "ui-breadcrumb-list", children: breadcrumb.map((item, i) => {
|
|
39
|
-
const isLast = i === breadcrumb.length - 1;
|
|
40
|
-
return /* @__PURE__ */ jsxs("li", { className: "ui-inline-xs", children: [
|
|
41
|
-
item.to && !isLast ? /* @__PURE__ */ jsx(
|
|
42
|
-
LinkComponent,
|
|
43
|
-
{
|
|
44
|
-
href: item.to,
|
|
45
|
-
to: item.to,
|
|
46
|
-
className: "hover:text-foreground hover:underline",
|
|
47
|
-
children: item.label
|
|
48
|
-
}
|
|
49
|
-
) : /* @__PURE__ */ jsx(
|
|
50
|
-
"span",
|
|
51
|
-
{
|
|
52
|
-
className: isLast ? "text-foreground" : "",
|
|
53
|
-
"aria-current": isLast ? "page" : void 0,
|
|
54
|
-
children: item.label
|
|
55
|
-
}
|
|
56
|
-
),
|
|
57
|
-
!isLast && /* @__PURE__ */ jsx(ChevronRight, { className: "size-3", "aria-hidden": "true" })
|
|
58
|
-
] }, i);
|
|
59
|
-
}) })
|
|
60
|
-
}
|
|
61
|
-
),
|
|
62
|
-
/* @__PURE__ */ jsxs("div", { className: "ui-page-header-row", children: [
|
|
63
|
-
/* @__PURE__ */ jsxs("div", { className: "ui-page-header-heading min-w-0", children: [
|
|
64
|
-
loading ? /* @__PURE__ */ jsx("h1", { className: "ui-page-title ui-skeleton-block ui-page-title-placeholder", children: /* @__PURE__ */ jsx("span", { className: "sr-only", children: t("layout.pageHeader.loading") }) }) : meta != null ? /* @__PURE__ */ jsxs("div", { className: "ui-page-title-band", children: [
|
|
65
|
-
/* @__PURE__ */ jsx("h1", { className: "ui-page-title", children: title }),
|
|
66
|
-
/* @__PURE__ */ jsx("div", { className: "ui-page-header-meta", children: meta })
|
|
67
|
-
] }) : /* @__PURE__ */ jsx("h1", { className: "ui-page-title", children: title }),
|
|
68
|
-
loading ? (
|
|
69
|
-
// Decorative only — the pending state is already announced once by the heading above,
|
|
70
|
-
// so a second live placeholder here would double-announce it.
|
|
71
|
-
/* @__PURE__ */ jsx(
|
|
72
|
-
"p",
|
|
73
|
-
{
|
|
74
|
-
className: "ui-page-subtitle ui-skeleton-block ui-page-subtitle-placeholder",
|
|
75
|
-
"aria-hidden": "true"
|
|
76
|
-
}
|
|
77
|
-
)
|
|
78
|
-
) : subtitle && /* @__PURE__ */ jsx("p", { className: "ui-page-subtitle", children: subtitle })
|
|
79
|
-
] }),
|
|
80
|
-
extra && /* @__PURE__ */ jsx("div", { className: "ui-page-header-extra", children: extra })
|
|
81
|
-
] })
|
|
82
|
-
]
|
|
83
|
-
}
|
|
84
|
-
)
|
|
85
|
-
);
|
|
86
|
-
});
|
|
87
|
-
export {
|
|
88
|
-
PageHeader
|
|
89
|
-
};
|