ingred-ui 32.0.0 → 33.0.0-canary.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/README.md CHANGED
@@ -81,6 +81,34 @@ pnpm run update-holidays
81
81
 
82
82
  詳細な情報については、[scripts/holiday/README.md](./scripts/holiday/README.md) を参照してください。
83
83
 
84
+ ### カナリア版の publish
85
+
86
+ 試験版を npm の `@canary` タグで配布する。正式版リリース(changesets → `@latest`)とは独立した運用。
87
+
88
+ #### publish する(maintainer)
89
+
90
+ 1. publish 対象ブランチの `package.json` の `version` を `X.Y.Z-canary.N` に設定する(例: `33.0.0-canary.0`)
91
+ 2. ブランチを push する
92
+ 3. GitHub Actions → **publish-canary** → Run workflow
93
+ - **Publish する branch / tag**: publish 対象のブランチ名(例: `feat/my-feature`)
94
+ 4. npm に `@canary` タグで publish される
95
+
96
+ 同じ内容を再 publish する場合は `-canary.N` の連番を上げる(npm は同一 version の再 publish 不可)。
97
+
98
+ #### 利用する(利用側プロジェクト)
99
+
100
+ publish された version を固定してインストールする。
101
+
102
+ ```json
103
+ "ingred-ui": "33.0.0-canary.0"
104
+ ```
105
+
106
+ peerDependencies 化を含む変更の場合は、README や PR に記載の追加パッケージも `dependencies` に入れる。
107
+
108
+ #### 正式版リリース
109
+
110
+ カナリアで問題なければ PR を master に merge し、いつも通り changesets の Version Packages PR 経由で `@latest` に publish する。
111
+
84
112
  ## License
85
113
 
86
114
  MIT © [CARTA HOLDINGS, Inc.](https://github.com/voyagegroup)
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ /**
3
+ * モバイルの「メニューを開く」ボタン。
4
+ *
5
+ * `NavigationRail.Container` 配下の任意の場所(独自 AppBar 内など)に設置できる。
6
+ * 設置すると Container は自動でデフォルト(右上固定)のメニューボタンを描画しなくなるため、
7
+ * 二重描画にならない。開閉ロジック・通知バッジ・アクセシビリティは組み込みと同一。
8
+ */
9
+ export declare const MobileMenuButton: React.ForwardRefExoticComponent<React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ /**
3
+ * モバイルの「メニューを開く」ボタン本体(presentational)。
4
+ * 表示条件(モバイル かつ ドロワー閉)と通知バッジ表示を内包する。
5
+ * 配置(固定/インライン)は呼び出し側に委ねる。
6
+ */
7
+ export declare const MobileMenuButtonView: React.ForwardRefExoticComponent<React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1 @@
1
+ export { MobileMenuButton } from "./MobileMenuButton";
@@ -7,6 +7,7 @@ import { Menu } from "./Menu";
7
7
  import { ExpansionMenu } from "./ExpansionMenu";
8
8
  import { ExpansionMenuItem } from "./ExpansionMenuItem";
9
9
  import { Slot, SlotContent } from "./Slot";
10
+ import { MobileMenuButton } from "./MobileMenuButton";
10
11
  type ExportedComponentType = {
11
12
  (props: Props & React.RefAttributes<HTMLDivElement>): JSX.Element;
12
13
  Container: typeof NavigationRailContainer;
@@ -20,6 +21,7 @@ type ExportedComponentType = {
20
21
  MainContent: typeof MainContent;
21
22
  Slot: typeof Slot;
22
23
  SlotContent: typeof SlotContent;
24
+ MobileMenuButton: typeof MobileMenuButton;
23
25
  };
24
26
  type Props = {
25
27
  children?: React.ReactNode;
@@ -22,6 +22,13 @@ export type NavigationRailContainerProps = {
22
22
  * 折りたたみ時の `Fixture` には 1 件以上で赤ドットのみ(件数なし)。メニュー行とは別管理。
23
23
  */
24
24
  slotNotificationCount?: number;
25
+ /**
26
+ * モバイル時にデフォルト(右上固定)の「メニューを開く」ボタンを描画するか。
27
+ * `NavigationRail.MobileMenuButton` を配置した場合はデフォルトが自動抑制される。
28
+ * 自前ボタンのみ使う場合は `false` を指定する。
29
+ * @default true
30
+ */
31
+ showMobileMenuButton?: boolean;
25
32
  children: React.ReactNode;
26
33
  };
27
34
  declare const NavigationRailContainer: React.ForwardRefExoticComponent<NavigationRailContainerProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,2 +1,2 @@
1
1
  export declare const Container: import("styled-components/dist/types").IStyledComponentBase<"web", any> & string;
2
- export declare const MobileMenuButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<any, never> & Partial<Pick<any, never>>> & string;
2
+ export declare const MobileMenuButton: import("styled-components/dist/types").IStyledComponentBase<"web", any> & string;
@@ -9,6 +9,12 @@ export type NavigationRailContextValues = {
9
9
  isMobile: boolean;
10
10
  isMobileMenuOpen: boolean;
11
11
  handleMobileMenuToggle?: () => void;
12
+ /**
13
+ * 任意位置に設置された `NavigationRail.MobileMenuButton` を登録する。
14
+ * 登録があると Container はデフォルト(右上固定)のメニューボタンを描画しない。
15
+ */
16
+ registerMobileMenuButton?: () => void;
17
+ unregisterMobileMenuButton?: () => void;
12
18
  /**
13
19
  * モバイル向けの未読件数(メニュー内の通知を含む合算。ドロワー閉時は開くボタンへ表示)。
14
20
  */