@godxjp/ui 31.10.2 → 31.10.3

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.
@@ -3,7 +3,7 @@
3
3
  You are about to write code against a design system you did not author. This file is the whole
4
4
  contract. Read it before you write JSX.
5
5
 
6
- **This catalog describes `@godxjp/ui` 31.10.2.** If the project you are editing has a different
6
+ **This catalog describes `@godxjp/ui` 31.10.3.** If the project you are editing has a different
7
7
  version in its `package.json`, read the pinned catalog for THAT version instead
8
8
  (`…/v<their-version>/agent/…`). A catalog newer than the installed package describes props that do
9
9
  not exist yet; older, and it hides props that do. Neither failure announces itself.
package/agent/index.json CHANGED
@@ -48,7 +48,7 @@
48
48
  "note": "Pin to the tag that matches the @godxjp/ui version you installed. A catalog newer than your package describes props you do not have; older, and it hides props you do.",
49
49
  "read": {
50
50
  "live": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/index.json",
51
- "pinned": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/v31.10.2/agent/index.json"
51
+ "pinned": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/v31.10.3/agent/index.json"
52
52
  },
53
53
  "source": "mcp/src/data — the same data @godxjp/ui-mcp serves — plus the foundation and semantic token tiers, read from src/tokens/*.css",
54
54
  "start": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/START-HERE.md",
@@ -62,5 +62,5 @@
62
62
  "foundation": "the seeds a consumer is invited to set — --primary, --background, --radius",
63
63
  "semantic": "named roles that follow the seeds — --ring, --text-link, --overlay-background"
64
64
  },
65
- "version": "31.10.2"
65
+ "version": "31.10.3"
66
66
  }
package/agent/llms.txt CHANGED
@@ -1,10 +1,10 @@
1
1
  # @godxjp/ui
2
2
 
3
3
  > A Japanese-enterprise React design system: 177 components, 2104 design tokens,
4
- > 50 cardinal rules. This file is the entry point for AI agents. Catalog version 31.10.2.
4
+ > 50 cardinal rules. This file is the entry point for AI agents. Catalog version 31.10.3.
5
5
 
6
6
  If your client can run a process, do not read these files — run the MCP server instead
7
- (`npx @godxjp/ui-mcp@31.10.2`). It is searchable and version-locked. These files exist for agents
7
+ (`npx @godxjp/ui-mcp@31.10.3`). It is searchable and version-locked. These files exist for agents
8
8
  that can only fetch URLs.
9
9
 
10
10
  ## Start
@@ -26,7 +26,7 @@ that can only fetch URLs.
26
26
  ## Pinning
27
27
 
28
28
  Every URL above tracks `main`. To pin to the release a project actually installed, swap `main` for
29
- the tag: `.../godx-jp/godxjp-ui/v31.10.2/agent/...`. A catalog that does not match the installed
29
+ the tag: `.../godx-jp/godxjp-ui/v31.10.3/agent/...`. A catalog that does not match the installed
30
30
  package describes props that are absent, or hides props that are present, and says nothing either way.
31
31
 
32
32
  Pinned catalogs only exist for releases whose tag actually contains `agent/`. If `…/v<version>/agent/index.json` returns 404, that release predates this catalog: read `…/main/…` instead and compare `index.json` → `version` against the package you have, so you at least know which way it drifted.
@@ -217,6 +217,22 @@ function DatePicker(props) {
217
217
  setText(displayAll(date));
218
218
  }
219
219
  };
220
+ const confirm = (next) => {
221
+ if (range) {
222
+ const nextRange = next;
223
+ if (!validRange(nextRange)) return;
224
+ emit(nextRange);
225
+ setFromText(display(nextRange?.from));
226
+ setToText(display(nextRange?.to));
227
+ } else {
228
+ const first = Array.isArray(next) ? next[0] : next;
229
+ if (!first || !allowed(first) || !timeAllowed(first)) return;
230
+ emit(next);
231
+ setText(displayAll(next));
232
+ }
233
+ setOpen(false);
234
+ };
235
+ const timeEnterRef = React.useRef(false);
220
236
  const commit = (raw) => {
221
237
  if (!raw.trim()) {
222
238
  choose(void 0);
@@ -494,42 +510,56 @@ function DatePicker(props) {
494
510
  index
495
511
  )) }) : null,
496
512
  isPeriod ? renderPeriodPanel() : renderDayPanel(),
497
- showTime ? /* @__PURE__ */ jsx(Flex, { pad: "sm", children: /* @__PURE__ */ jsx(
498
- TimePicker,
513
+ showTime ? /* @__PURE__ */ jsx(
514
+ Flex,
499
515
  {
500
- ...typeof showTime === "object" ? showTime : {},
501
- "aria-label": t("dataEntry.timePicker.openPicker"),
502
- value: selectedDate ? [
503
- selectedDate.getHours(),
504
- selectedDate.getMinutes(),
505
- ...typeof showTime === "object" && showTime.showSeconds ? [selectedDate.getSeconds()] : []
506
- ].map((n) => String(n).padStart(2, "0")).join(":") : "",
507
- onValueChange: (time) => {
508
- if (!time) return;
509
- const date = new Date(selectedDate ?? /* @__PURE__ */ new Date());
510
- const [h, m, sec = 0] = time.split(":").map(Number);
511
- date.setHours(h, m, sec, 0);
512
- choose(date);
513
- }
516
+ pad: "sm",
517
+ onKeyDownCapture: (event) => {
518
+ if (event.key === "Enter" && !isImeComposing(event)) timeEnterRef.current = true;
519
+ },
520
+ onKeyDown: (event) => {
521
+ if (event.key !== "Enter" || !timeEnterRef.current) return;
522
+ timeEnterRef.current = false;
523
+ event.preventDefault();
524
+ if (needConfirm) confirm(working);
525
+ else setOpen(false);
526
+ },
527
+ children: /* @__PURE__ */ jsx(
528
+ TimePicker,
529
+ {
530
+ ...typeof showTime === "object" ? showTime : {},
531
+ "aria-label": t("dataEntry.timePicker.openPicker"),
532
+ value: selectedDate ? [
533
+ selectedDate.getHours(),
534
+ selectedDate.getMinutes(),
535
+ ...typeof showTime === "object" && showTime.showSeconds ? [selectedDate.getSeconds()] : []
536
+ ].map((n) => String(n).padStart(2, "0")).join(":") : "",
537
+ onValueChange: (time) => {
538
+ if (!time) return;
539
+ const date = new Date(selectedDate ?? /* @__PURE__ */ new Date());
540
+ const [h, m, sec = 0] = time.split(":").map(Number);
541
+ date.setHours(h, m, sec, 0);
542
+ if (!timeEnterRef.current) {
543
+ choose(date);
544
+ return;
545
+ }
546
+ timeEnterRef.current = false;
547
+ if (needConfirm) confirm(date);
548
+ else {
549
+ choose(date);
550
+ setOpen(false);
551
+ }
552
+ }
553
+ }
554
+ )
514
555
  }
515
- ) }) : null,
556
+ ) : null,
516
557
  needConfirm ? /* @__PURE__ */ jsx(Flex, { pad: "sm", justify: "end", children: /* @__PURE__ */ jsx(
517
558
  Button,
518
559
  {
519
560
  type: "button",
520
561
  disabled: range ? !validRange(rangeValue) : !selectedDate || !allowed(selectedDate) || !timeAllowed(selectedDate),
521
- onClick: () => {
522
- if (range ? validRange(rangeValue) : selectedDate && allowed(selectedDate)) {
523
- emit(working);
524
- if (range) {
525
- setFromText(display(rangeValue?.from));
526
- setToText(display(rangeValue?.to));
527
- } else {
528
- setText(displayAll(working));
529
- }
530
- setOpen(false);
531
- }
532
- },
562
+ onClick: () => confirm(working),
533
563
  children: t("dataEntry.timePicker.confirm")
534
564
  }
535
565
  ) }) : null,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$comment": "AUTO-GENERATED by scripts/gen-measurement-contract.mjs — do not edit. Read this instead of guessing: docs/MEASUREMENT-CONTRACT.md.",
3
- "version": "31.10.2",
3
+ "version": "31.10.3",
4
4
  "targetSize": {
5
5
  "standard": "WCAG 2.2 SC 2.5.8 Target Size (Minimum), level AA — 24×24 CSS px",
6
6
  "min": 24,
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "31.10.2",
2
+ "version": "31.10.3",
3
3
  "generatedBy": "scripts/gen-style-layers.mjs — do not edit by hand; run `pnpm gen:style-layers`",
4
4
  "base": "base.css",
5
5
  "fonts": "fonts.css",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@godxjp/ui",
3
- "version": "31.10.2",
4
- "godxUiMcp": "31.10.2",
3
+ "version": "31.10.3",
4
+ "godxUiMcp": "31.10.3",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",