ksk-design-system 1.51.1 → 1.51.2

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "meta": {
3
3
  "name": "KSK Design System — Component Contracts",
4
- "version": "1.51.1",
4
+ "version": "1.51.2",
5
5
  "description": "全コンポーネントの構造化定義。バリアント・アクセシビリティ要件・使用ルールを機械可読形式で管理。",
6
6
  "counts": {
7
7
  "ui": 67,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "meta": {
3
3
  "name": "KSK Design System — Semantic Token Hex Cache",
4
- "version": "1.51.1",
4
+ "version": "1.51.2",
5
5
  "description": "semantic / semanticDark トークン(var(--Primitive-*) 参照)を実 hex に解決したサイドカー生成物。hex はデフォルト(Blue)テーマでの解決値であり、Brand 系(meta.themeDependentKeys に列挙)はテーマ差し替え(orange/green/violet 等)で実色が変わる。テーマ別の完全解決値は `ksk-design-system/native` エクスポート(バンドル済み native トークンモジュール)の themes を参照。tokens.json 本体のスキーマは変更せず、AI がこのファイルだけで実色を把握できるようにし、primitive 値の変更による semantic 実色のドリフトを --check で機械検出する。",
6
6
  "generatedBy": "scripts/generate-token-hex-cache.mjs",
7
7
  "theme": "default",
package/dist/native/ui.js CHANGED
@@ -701,24 +701,24 @@ var Ve = {
701
701
  md: 12,
702
702
  lg: 16
703
703
  };
704
- function Ue({ variant: e = "filled", size: t = "md", shape: n = "pill", selected: r = !1, disabled: i = !1, count: a, removable: o = !1, onRemove: s, children: c, ...l }) {
705
- let { theme: u, scales: d } = K(), f = {
704
+ function Ue({ variant: e = "filled", size: t = "md", shape: n = "pill", selected: r = !1, disabled: i = !1, count: a, removable: o = !1, onRemove: s, children: c, accessibilityRole: l, accessibilityState: u, ...d }) {
705
+ let { theme: f, scales: p } = K(), m = {
706
706
  filled: {
707
- bg: u.surface.secondary,
708
- fg: u.text["high-emphasis"],
707
+ bg: f.surface.secondary,
708
+ fg: f.text["high-emphasis"],
709
709
  border: "transparent"
710
710
  },
711
711
  accent: {
712
- bg: u.surface["accent-primary-light"],
713
- fg: u.text["accent-primary"],
712
+ bg: f.surface["accent-primary-light"],
713
+ fg: f.text["accent-primary"],
714
714
  border: "transparent"
715
715
  },
716
716
  outline: {
717
717
  bg: "transparent",
718
- fg: u.text["high-emphasis"],
719
- border: u.border["medium-emphasis"]
718
+ fg: f.text["high-emphasis"],
719
+ border: f.border["medium-emphasis"]
720
720
  }
721
- }[e], p = r ? u.brand.primary : f.bg, m = r ? u.text["on-inverse"] : i ? u.text.disable : f.fg, h = r ? u.brand.primary : f.border;
721
+ }[e], h = typeof c == "string" || typeof c == "number" ? `削除: ${c}` : "削除", g = r ? f.brand.primary : m.bg, _ = r ? f.text["on-inverse"] : i ? f.text.disable : m.fg, v = r ? f.brand.primary : m.border;
722
722
  return /* @__PURE__ */ D(W, {
723
723
  style: {
724
724
  flexDirection: "row",
@@ -726,59 +726,68 @@ function Ue({ variant: e = "filled", size: t = "md", shape: n = "pill", selected
726
726
  },
727
727
  children: [/* @__PURE__ */ D(z, {
728
728
  disabled: i,
729
+ accessibilityRole: l ?? "button",
730
+ accessibilityState: {
731
+ selected: r,
732
+ disabled: i,
733
+ ...u
734
+ },
729
735
  style: ({ pressed: a }) => [{
730
736
  height: Ve[t],
731
737
  paddingHorizontal: He[t],
732
738
  flexDirection: "row",
733
739
  alignItems: "center",
734
740
  justifyContent: "center",
735
- gap: d.spacing.scale[1],
736
- borderRadius: n === "pill" ? d.borderRadius.full : d.borderRadius.sm,
741
+ gap: p.spacing.scale[1],
742
+ borderRadius: n === "pill" ? p.borderRadius.full : p.borderRadius.sm,
737
743
  borderWidth: e === "outline" || r ? 1 : 0,
738
- borderColor: h,
739
- backgroundColor: a && !i ? u.active["secondary-button"] : p,
744
+ borderColor: v,
745
+ backgroundColor: a && !i ? f.active["secondary-button"] : g,
740
746
  opacity: i ? .6 : 1
741
747
  }, o && {
742
748
  borderTopRightRadius: 0,
743
749
  borderBottomRightRadius: 0
744
750
  }],
745
- ...l,
751
+ ...d,
746
752
  children: [/* @__PURE__ */ E(H, {
747
- style: [q("label.sm"), { color: m }],
753
+ style: [q("label.sm"), { color: _ }],
748
754
  children: c
749
755
  }), a !== void 0 && /* @__PURE__ */ E(W, {
750
756
  style: {
751
757
  minWidth: 20,
752
758
  paddingHorizontal: 6,
753
- borderRadius: d.borderRadius.full,
754
- backgroundColor: r ? u.surface.primary : u.surface.tertiary,
759
+ borderRadius: p.borderRadius.full,
760
+ backgroundColor: r ? f.surface.primary : f.surface.tertiary,
755
761
  alignItems: "center",
756
762
  justifyContent: "center"
757
763
  },
758
764
  children: /* @__PURE__ */ E(H, {
759
- style: [q("label.xs"), { color: r ? u.text["accent-primary"] : u.text["medium-emphasis"] }],
765
+ style: [q("label.xs"), { color: r ? f.text["accent-primary"] : f.text["medium-emphasis"] }],
760
766
  children: a
761
767
  })
762
768
  })]
763
769
  }), o && /* @__PURE__ */ E(z, {
764
770
  onPress: s,
765
771
  disabled: i,
772
+ accessibilityRole: "button",
773
+ accessibilityLabel: h,
774
+ accessibilityState: { disabled: i },
766
775
  style: ({ pressed: a }) => ({
767
776
  height: Ve[t],
768
777
  paddingHorizontal: 10,
769
778
  alignItems: "center",
770
779
  justifyContent: "center",
771
- backgroundColor: a ? u.active["tertiary-button"] : p,
772
- borderTopRightRadius: n === "pill" ? d.borderRadius.full : d.borderRadius.sm,
773
- borderBottomRightRadius: n === "pill" ? d.borderRadius.full : d.borderRadius.sm,
780
+ backgroundColor: a ? f.active["tertiary-button"] : g,
781
+ borderTopRightRadius: n === "pill" ? p.borderRadius.full : p.borderRadius.sm,
782
+ borderBottomRightRadius: n === "pill" ? p.borderRadius.full : p.borderRadius.sm,
774
783
  borderWidth: e === "outline" || r ? 1 : 0,
775
784
  borderLeftWidth: 0,
776
- borderColor: h,
785
+ borderColor: v,
777
786
  opacity: i ? .6 : 1
778
787
  }),
779
788
  children: /* @__PURE__ */ E(H, {
780
789
  style: [q("label.md"), {
781
- color: m,
790
+ color: _,
782
791
  lineHeight: 14
783
792
  }],
784
793
  children: "×"
@@ -14,4 +14,4 @@ export interface ChipProps extends Omit<PressableProps, "children" | "style"> {
14
14
  onRemove?: () => void;
15
15
  children?: React.ReactNode;
16
16
  }
17
- export declare function Chip({ variant, size, shape, selected, disabled, count, removable, onRemove, children, ...rest }: ChipProps): React.JSX.Element;
17
+ export declare function Chip({ variant, size, shape, selected, disabled, count, removable, onRemove, children, accessibilityRole, accessibilityState, ...rest }: ChipProps): React.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ksk-design-system",
3
- "version": "1.51.1",
3
+ "version": "1.51.2",
4
4
  "type": "module",
5
5
  "description": "KSK Design System — フリーランス向けマルチテーマ対応デザインシステム",
6
6
  "license": "MIT",