ksk-design-system 2.1.1 → 2.3.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/AGENTS.md +10 -0
- package/CLAUDE.md +10 -0
- package/DESIGN.md +16 -16
- package/NATIVE_RECIPES.md +2 -0
- package/PUBLISHING.md +10 -0
- package/README.md +30 -3
- package/RELEASE.md +4 -0
- package/bin/consumer-release-notices.js +138 -0
- package/bin/init.js +8 -0
- package/contracts/components.json +11 -3
- package/contracts/consumer-requests.json +10 -0
- package/contracts/token-hex-cache.json +28 -28
- package/dist/index.js +23 -22
- package/dist/native/ui.js +40 -39
- package/dist/{native-DlR32_Lk.js → native-E7YOVABy.js} +227 -227
- package/dist/native.js +1 -1
- package/dist/types/components/patterns/compact-file-picker.d.ts +7 -1
- package/dist/types/components/patterns/mobile-app-header.d.ts +9 -1
- package/dist/types/native/components/CompactFilePicker.d.ts +6 -1
- package/dist/types/native/components/MobileAppHeader.d.ts +3 -1
- package/dist/types/tokens/native/primitives.d.ts +21 -21
- package/dist/types/tokens/native/scales.d.ts +8 -8
- package/dist/types/tokens/native/themes.d.ts +198 -198
- package/docs/consumer-release-notices.md +46 -0
- package/package.json +3 -2
- package/src/components/COMPONENT_LOOKUP.md +3 -3
- package/src/preset.css +1 -1
- package/src/styles/primitive.css +21 -21
- package/templates/AGENTS.md +10 -0
- package/templates/CLAUDE.md +10 -0
- package/templates/consumer-release-notices/check-ds-release.mjs +284 -0
- package/tokens.json +34 -24
package/dist/index.js
CHANGED
|
@@ -8474,7 +8474,7 @@ function ju({ steps: e, open: t, onComplete: n, onSkip: r, variant: i = "default
|
|
|
8474
8474
|
let e = 0, n = 0, r = () => {
|
|
8475
8475
|
let t = Array.from(_.querySelectorAll("button:not([disabled]), [href], input:not([disabled]), textarea:not([disabled]), select:not([disabled]), [tabindex]")).find((e) => e.tabIndex >= 0);
|
|
8476
8476
|
if (t) {
|
|
8477
|
-
t.focus();
|
|
8477
|
+
t.focus({ preventScroll: !0 });
|
|
8478
8478
|
return;
|
|
8479
8479
|
}
|
|
8480
8480
|
n++ < 5 && (e = requestAnimationFrame(r));
|
|
@@ -8538,7 +8538,7 @@ function ju({ steps: e, open: t, onComplete: n, onSkip: r, variant: i = "default
|
|
|
8538
8538
|
trapped: !0,
|
|
8539
8539
|
loop: !0,
|
|
8540
8540
|
onMountAutoFocus: (e) => {
|
|
8541
|
-
c || (e.preventDefault(), e.currentTarget instanceof HTMLElement && e.currentTarget.focus());
|
|
8541
|
+
c || (e.preventDefault(), e.currentTarget instanceof HTMLElement && e.currentTarget.focus({ preventScroll: !0 }));
|
|
8542
8542
|
},
|
|
8543
8543
|
onUnmountAutoFocus: (e) => {
|
|
8544
8544
|
l || e.preventDefault();
|
|
@@ -8579,9 +8579,9 @@ function ju({ steps: e, open: t, onComplete: n, onSkip: r, variant: i = "default
|
|
|
8579
8579
|
className: "fixed pointer-events-none",
|
|
8580
8580
|
style: D && h ? {
|
|
8581
8581
|
top: h.top,
|
|
8582
|
-
left: h.left
|
|
8583
|
-
width:
|
|
8584
|
-
height:
|
|
8582
|
+
left: h.left,
|
|
8583
|
+
width: h.width,
|
|
8584
|
+
height: h.height
|
|
8585
8585
|
} : {
|
|
8586
8586
|
top: "50%",
|
|
8587
8587
|
left: "50%"
|
|
@@ -12983,13 +12983,13 @@ function xf({ className: e, label: t, icon: n, showLabel: r = !1, placement: i =
|
|
|
12983
12983
|
}
|
|
12984
12984
|
//#endregion
|
|
12985
12985
|
//#region src/components/patterns/mobile-app-header.tsx
|
|
12986
|
-
function Sf({ className: e, brand: t, leading: n, status: r, compactStatus: i, actions: a, sticky: o = !0, bordered: s = !0, landmark: c = !0,
|
|
12986
|
+
function Sf({ className: e, brand: t, leading: n, status: r, compactStatus: i, actions: a, sticky: o = !0, bordered: s = !0, landmark: c = !0, verticalAlignment: l = "center", children: u, ...d }) {
|
|
12987
12987
|
return /* @__PURE__ */ V(c ? "header" : "div", {
|
|
12988
12988
|
"data-slot": "mobile-app-header",
|
|
12989
12989
|
className: G("bg-[var(--Surface-Primary)] text-[var(--Text-High-Emphasis)]", o && "sticky top-0 z-[var(--Z-Nav)]", s && "border-b border-[var(--Border-Low-Emphasis)]", e),
|
|
12990
|
-
...
|
|
12990
|
+
...d,
|
|
12991
12991
|
children: [/* @__PURE__ */ V("div", {
|
|
12992
|
-
className: "flex min-h-14
|
|
12992
|
+
className: G("flex min-h-14 gap-2 px-4", l === "top" ? "items-start" : "items-center"),
|
|
12993
12993
|
children: [
|
|
12994
12994
|
n && /* @__PURE__ */ B("div", {
|
|
12995
12995
|
"data-slot": "mobile-app-header-leading",
|
|
@@ -13020,7 +13020,7 @@ function Sf({ className: e, brand: t, leading: n, status: r, compactStatus: i, a
|
|
|
13020
13020
|
]
|
|
13021
13021
|
})
|
|
13022
13022
|
]
|
|
13023
|
-
}),
|
|
13023
|
+
}), u]
|
|
13024
13024
|
});
|
|
13025
13025
|
}
|
|
13026
13026
|
//#endregion
|
|
@@ -16172,35 +16172,35 @@ function Nm({ accept: e, maxSize: t, multiple: n = !1, maxFiles: r = 10, onUploa
|
|
|
16172
16172
|
}
|
|
16173
16173
|
//#endregion
|
|
16174
16174
|
//#region src/components/patterns/compact-file-picker.tsx
|
|
16175
|
-
function Pm({ className: e, inputClassName: t, label: n = "ファイル", description: r, triggerLabel: i = "選択する",
|
|
16176
|
-
let
|
|
16175
|
+
function Pm({ className: e, inputClassName: t, label: n = "ファイル", description: r, triggerLabel: i = "選択する", loadingLabel: a = "処理中", icon: o, loading: s = !1, disabled: c, id: l, multiple: d, onFilesChange: f, ...p }) {
|
|
16176
|
+
let m = u.useId(), h = l ?? m, g = u.useRef(null), _ = c || s;
|
|
16177
16177
|
return /* @__PURE__ */ V("div", {
|
|
16178
16178
|
"data-slot": "compact-file-picker",
|
|
16179
16179
|
className: G("flex items-center gap-3", e),
|
|
16180
16180
|
children: [
|
|
16181
16181
|
/* @__PURE__ */ B("input", {
|
|
16182
|
-
...
|
|
16183
|
-
ref:
|
|
16184
|
-
id:
|
|
16182
|
+
...p,
|
|
16183
|
+
ref: g,
|
|
16184
|
+
id: h,
|
|
16185
16185
|
type: "file",
|
|
16186
|
-
multiple:
|
|
16187
|
-
disabled:
|
|
16186
|
+
multiple: d,
|
|
16187
|
+
disabled: _,
|
|
16188
16188
|
className: G("sr-only", t),
|
|
16189
16189
|
onChange: (e) => {
|
|
16190
16190
|
let t = Array.from(e.currentTarget.files ?? []);
|
|
16191
|
-
|
|
16191
|
+
f?.(t), e.currentTarget.value = "";
|
|
16192
16192
|
}
|
|
16193
16193
|
}),
|
|
16194
16194
|
/* @__PURE__ */ V("div", {
|
|
16195
16195
|
className: "flex min-w-0 flex-1 items-center gap-3",
|
|
16196
16196
|
children: [/* @__PURE__ */ B("span", {
|
|
16197
16197
|
className: "flex size-10 shrink-0 items-center justify-center rounded-lg bg-[var(--Surface-Secondary)] text-[var(--Object-Medium-Emphasis)]",
|
|
16198
|
-
children:
|
|
16198
|
+
children: o ?? /* @__PURE__ */ B(se, {
|
|
16199
16199
|
size: 20,
|
|
16200
16200
|
"aria-hidden": !0
|
|
16201
16201
|
})
|
|
16202
16202
|
}), /* @__PURE__ */ V("label", {
|
|
16203
|
-
htmlFor:
|
|
16203
|
+
htmlFor: h,
|
|
16204
16204
|
className: "min-w-0 flex-1",
|
|
16205
16205
|
children: [/* @__PURE__ */ B("span", {
|
|
16206
16206
|
className: "typo-label-md block truncate text-[var(--Text-High-Emphasis)]",
|
|
@@ -16215,9 +16215,10 @@ function Pm({ className: e, inputClassName: t, label: n = "ファイル", descri
|
|
|
16215
16215
|
type: "button",
|
|
16216
16216
|
variant: "secondary",
|
|
16217
16217
|
size: "sm",
|
|
16218
|
-
disabled:
|
|
16219
|
-
|
|
16220
|
-
|
|
16218
|
+
disabled: _,
|
|
16219
|
+
"aria-busy": s || void 0,
|
|
16220
|
+
onClick: () => g.current?.click(),
|
|
16221
|
+
children: s ? a : i
|
|
16221
16222
|
})
|
|
16222
16223
|
]
|
|
16223
16224
|
});
|
package/dist/native/ui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c, u as l } from "../prompt-coordinator-sBFZKQIX.js";
|
|
2
|
-
import { a as u, i as d, n as f, r as p, t as m } from "../native-
|
|
2
|
+
import { a as u, i as d, n as f, r as p, t as m } from "../native-E7YOVABy.js";
|
|
3
3
|
import * as h from "react";
|
|
4
4
|
import g, { createContext as _, useCallback as v, useContext as y, useEffect as b, useId as x, useMemo as S, useRef as C, useState as w } from "react";
|
|
5
5
|
import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
@@ -291,7 +291,7 @@ function X({ variant: e = "primary", elevation: t = "flat", containerStyle: n, p
|
|
|
291
291
|
secondary: {
|
|
292
292
|
bg: m.surface["accent-primary-light"],
|
|
293
293
|
bgActive: m.active["secondary-button"],
|
|
294
|
-
fg: m.text["accent-primary"],
|
|
294
|
+
fg: g === "dark" ? m.text["high-emphasis"] : m.text["accent-primary"],
|
|
295
295
|
border: m.border["accent-primary"],
|
|
296
296
|
bottomBorder: m.active["secondary-button"]
|
|
297
297
|
},
|
|
@@ -2736,34 +2736,34 @@ function _n({ tone: e = "info", title: t, description: n, children: r }) {
|
|
|
2736
2736
|
//#endregion
|
|
2737
2737
|
//#region src/native/components/Dialog.tsx
|
|
2738
2738
|
function vn({ open: e, onClose: t, title: n, description: r, footer: i, children: a, dismissOnBackdrop: o = !0, position: s = "center", safeArea: c = !0 }) {
|
|
2739
|
-
let { theme: l, scales: u } = G(),
|
|
2739
|
+
let { theme: l, scales: u, mode: d } = G(), f = q(), p = s === "fullscreen", m = ue(u.spacing.scale[5], f, c);
|
|
2740
2740
|
return /* @__PURE__ */ E(I, {
|
|
2741
2741
|
visible: e,
|
|
2742
|
-
transparent: !
|
|
2742
|
+
transparent: !p,
|
|
2743
2743
|
animationType: "fade",
|
|
2744
2744
|
onRequestClose: t,
|
|
2745
2745
|
children: /* @__PURE__ */ E(R, {
|
|
2746
|
-
onPress: () => o && !
|
|
2746
|
+
onPress: () => o && !p && t(),
|
|
2747
2747
|
style: {
|
|
2748
2748
|
flex: 1,
|
|
2749
|
-
backgroundColor:
|
|
2749
|
+
backgroundColor: p ? l.surface.primary : l.overlay.dark,
|
|
2750
2750
|
alignItems: "center",
|
|
2751
2751
|
justifyContent: s === "top" ? "flex-start" : "center",
|
|
2752
|
-
...
|
|
2752
|
+
...p ? { padding: 0 } : {
|
|
2753
2753
|
padding: u.spacing.scale[4],
|
|
2754
|
-
...s === "top" ? { paddingTop: u.spacing.scale[4] + J(
|
|
2754
|
+
...s === "top" ? { paddingTop: u.spacing.scale[4] + J(f, "top", c) } : null
|
|
2755
2755
|
}
|
|
2756
2756
|
},
|
|
2757
2757
|
children: /* @__PURE__ */ D(R, {
|
|
2758
2758
|
onPress: () => {},
|
|
2759
2759
|
style: {
|
|
2760
2760
|
width: "100%",
|
|
2761
|
-
backgroundColor: l.surface.primary,
|
|
2761
|
+
backgroundColor: !p && d === "dark" ? l.surface.secondary : l.surface.primary,
|
|
2762
2762
|
gap: u.spacing.scale[3],
|
|
2763
|
-
...
|
|
2763
|
+
...p ? {
|
|
2764
2764
|
flex: 1,
|
|
2765
2765
|
borderRadius: 0,
|
|
2766
|
-
...
|
|
2766
|
+
...m
|
|
2767
2767
|
} : {
|
|
2768
2768
|
maxWidth: 480,
|
|
2769
2769
|
borderRadius: u.borderRadius["2xl"],
|
|
@@ -5441,22 +5441,22 @@ function ai({ title: e, subtitle: t, leading: n, trailing: r, onBack: i, centere
|
|
|
5441
5441
|
}
|
|
5442
5442
|
//#endregion
|
|
5443
5443
|
//#region src/native/components/MobileAppHeader.tsx
|
|
5444
|
-
function oi({ brand: e, leading: t, status: n, compactStatus: r, actions: i, children: a, bordered: o = !0,
|
|
5445
|
-
let { theme:
|
|
5444
|
+
function oi({ brand: e, leading: t, status: n, compactStatus: r, actions: i, children: a, bordered: o = !0, verticalAlignment: s = "center", style: c }) {
|
|
5445
|
+
let { theme: l, scales: u } = G();
|
|
5446
5446
|
return /* @__PURE__ */ D(H, {
|
|
5447
5447
|
style: [{
|
|
5448
|
-
backgroundColor:
|
|
5448
|
+
backgroundColor: l.surface.primary,
|
|
5449
5449
|
borderBottomWidth: +!!o,
|
|
5450
|
-
borderBottomColor:
|
|
5451
|
-
paddingTop: L.OS === "ios" ? 48 :
|
|
5452
|
-
},
|
|
5450
|
+
borderBottomColor: l.border["low-emphasis"],
|
|
5451
|
+
paddingTop: L.OS === "ios" ? 48 : u.spacing.scale[3]
|
|
5452
|
+
}, c],
|
|
5453
5453
|
children: [/* @__PURE__ */ D(H, {
|
|
5454
5454
|
style: {
|
|
5455
5455
|
minHeight: 56,
|
|
5456
|
-
paddingHorizontal:
|
|
5456
|
+
paddingHorizontal: u.spacing.scale[4],
|
|
5457
5457
|
flexDirection: "row",
|
|
5458
|
-
alignItems: "center",
|
|
5459
|
-
gap:
|
|
5458
|
+
alignItems: s === "top" ? "flex-start" : "center",
|
|
5459
|
+
gap: u.spacing.scale[2]
|
|
5460
5460
|
},
|
|
5461
5461
|
children: [
|
|
5462
5462
|
t,
|
|
@@ -5474,7 +5474,7 @@ function oi({ brand: e, leading: t, status: n, compactStatus: r, actions: i, chi
|
|
|
5474
5474
|
flexDirection: "row",
|
|
5475
5475
|
justifyContent: "flex-end",
|
|
5476
5476
|
alignItems: "center",
|
|
5477
|
-
gap:
|
|
5477
|
+
gap: u.spacing.scale[2]
|
|
5478
5478
|
},
|
|
5479
5479
|
children: [r ?? n, i]
|
|
5480
5480
|
})
|
|
@@ -6802,23 +6802,23 @@ function $i({ item: e, itemDirection: t, onReveal: n }) {
|
|
|
6802
6802
|
}
|
|
6803
6803
|
//#endregion
|
|
6804
6804
|
//#region src/native/components/CompactFilePicker.tsx
|
|
6805
|
-
function ea({ label: e = "ファイル", description: t, triggerLabel: n = "選択する",
|
|
6806
|
-
let { theme:
|
|
6805
|
+
function ea({ label: e = "ファイル", description: t, triggerLabel: n = "選択する", loadingLabel: r, icon: i, loading: a = !1, disabled: o = !1, onPress: s, style: c }) {
|
|
6806
|
+
let { theme: l, scales: u } = G(), d = o || a;
|
|
6807
6807
|
return /* @__PURE__ */ D(R, {
|
|
6808
|
-
disabled:
|
|
6809
|
-
onPress:
|
|
6808
|
+
disabled: d,
|
|
6809
|
+
onPress: s,
|
|
6810
6810
|
accessibilityRole: "button",
|
|
6811
6811
|
accessibilityState: {
|
|
6812
|
-
disabled:
|
|
6813
|
-
busy:
|
|
6812
|
+
disabled: d,
|
|
6813
|
+
busy: a
|
|
6814
6814
|
},
|
|
6815
6815
|
style: [{
|
|
6816
6816
|
minHeight: 56,
|
|
6817
6817
|
flexDirection: "row",
|
|
6818
6818
|
alignItems: "center",
|
|
6819
|
-
gap:
|
|
6820
|
-
opacity:
|
|
6821
|
-
},
|
|
6819
|
+
gap: u.spacing.scale[3],
|
|
6820
|
+
opacity: d ? .5 : 1
|
|
6821
|
+
}, c],
|
|
6822
6822
|
children: [
|
|
6823
6823
|
/* @__PURE__ */ E(H, {
|
|
6824
6824
|
style: {
|
|
@@ -6826,11 +6826,11 @@ function ea({ label: e = "ファイル", description: t, triggerLabel: n = "選
|
|
|
6826
6826
|
height: 40,
|
|
6827
6827
|
alignItems: "center",
|
|
6828
6828
|
justifyContent: "center",
|
|
6829
|
-
borderRadius:
|
|
6830
|
-
backgroundColor:
|
|
6829
|
+
borderRadius: u.borderRadius.lg,
|
|
6830
|
+
backgroundColor: l.surface.secondary
|
|
6831
6831
|
},
|
|
6832
|
-
children:
|
|
6833
|
-
style: [Y("heading.md"), { color:
|
|
6832
|
+
children: i ?? /* @__PURE__ */ E(B, {
|
|
6833
|
+
style: [Y("heading.md"), { color: l.text["medium-emphasis"] }],
|
|
6834
6834
|
children: "+"
|
|
6835
6835
|
})
|
|
6836
6836
|
}),
|
|
@@ -6841,11 +6841,11 @@ function ea({ label: e = "ファイル", description: t, triggerLabel: n = "選
|
|
|
6841
6841
|
},
|
|
6842
6842
|
children: [typeof e == "string" ? /* @__PURE__ */ E(B, {
|
|
6843
6843
|
numberOfLines: 1,
|
|
6844
|
-
style: [Y("label.md"), { color:
|
|
6844
|
+
style: [Y("label.md"), { color: l.text["high-emphasis"] }],
|
|
6845
6845
|
children: e
|
|
6846
6846
|
}) : e, t && (typeof t == "string" ? /* @__PURE__ */ E(B, {
|
|
6847
6847
|
style: [Y("body.sm"), {
|
|
6848
|
-
color:
|
|
6848
|
+
color: l.text["medium-emphasis"],
|
|
6849
6849
|
marginTop: 2
|
|
6850
6850
|
}],
|
|
6851
6851
|
children: t
|
|
@@ -6853,9 +6853,10 @@ function ea({ label: e = "ファイル", description: t, triggerLabel: n = "選
|
|
|
6853
6853
|
}),
|
|
6854
6854
|
/* @__PURE__ */ E(X, {
|
|
6855
6855
|
variant: "secondary",
|
|
6856
|
-
disabled:
|
|
6857
|
-
loading:
|
|
6858
|
-
|
|
6856
|
+
disabled: d,
|
|
6857
|
+
loading: a,
|
|
6858
|
+
loadingLabel: r,
|
|
6859
|
+
onPress: s,
|
|
6859
6860
|
children: n
|
|
6860
6861
|
})
|
|
6861
6862
|
]
|