@ubie/vitals-ui-business 0.4.0 → 0.5.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/CHANGELOG.md +38 -0
- package/DESIGN.md +38 -29
- package/dist/index.cjs +109 -0
- package/dist/index.d.cts +55 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +55 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +102 -1
- package/dist/index.mjs.map +1 -1
- package/docs/components/statistic.md +38 -0
- package/docs/components/table.md +16 -1
- package/docs/patterns/chart.md +84 -0
- package/docs/patterns/disclosure.md +12 -2
- package/docs/patterns/empty-state.md +37 -0
- package/docs/patterns/print.md +44 -0
- package/docs/patterns/region-state.md +37 -0
- package/docs/patterns/skeleton.md +40 -5
- package/docs/tokens.md +13 -1
- package/package.json +1 -1
- package/src/index.ts +4 -0
- package/src/stories/patterns/Chart.stories.tsx +367 -0
- package/src/stories/patterns/Section.stories.tsx +251 -0
- package/src/theme/chartSeriesColors.ts +71 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,43 @@
|
|
|
1
1
|
# @ubie/vitals-ui-business
|
|
2
2
|
|
|
3
|
+
## 0.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- dc8d246: グラフの系列色 `chartSeriesColors` と、グラフの規則 docs/patterns/chart.md を追加する。
|
|
8
|
+
|
|
9
|
+
- **追加**: `chartSeriesColors`。`cool`(寒色 4 色。各位置が `base` と 2 値の内訳用の `shade` を持つ)/ `warm`(暖色主体 4 色)/ `neutral`(`unset` / `other` / `total`)/ `printRamp`(モノクロ印刷でグラフの塗りを差し替えるグレーのランプ)。値はすべて `@ubie/vitals-token` の primitive。プライマリ・意味色と同じ段の primitive と hospital accent(sky-500 を除く)は含まず、`cool` の主・`warm`・`unset` は白地で 3:1 以上(テストで固定)
|
|
10
|
+
- **追加**: docs/patterns/chart.md。形の選び方(積み上げ可否は「合計に意味があるか」)/ 表の併置と凡例順 = 表順 / 色相スロットは 4(上位 4 + その他)と全 0 系列の扱い / 色の系統と「同じ系列は常に同じ色」/ 意味色・hospital accent との距離 / 集計中の別塗り + ラベル / `role="img"` と描画アニメーションの停止 / モノクロ印刷はグレーのランプ + 表 / グラフ単位の [画像を保存]
|
|
11
|
+
- **追加**: Storybook `Patterns/Chart`(Stacked / Grouped / AllZero / Palette)。描画は素の SVG で、ライブラリに依存しない
|
|
12
|
+
- docs/tokens.md「選ぶ順」に「グラフの系列色 → `chartSeriesColors`」の分岐を追加
|
|
13
|
+
|
|
14
|
+
- 84ecd94: `jaJP` ロケールを再 export し、docs/tokens.md「選ぶ順」に寸法(余白 / 幅 / 高さ)の分岐を、DESIGN.md の立ち上げに CSS 変数と Storybook decorator の手順を足す。
|
|
15
|
+
|
|
16
|
+
- **追加**: `jaJP`(antd の `ja_JP` ロケール)。`UbieConfigProvider` の `locale` に渡す。これまで `antd/locale/ja_JP` を直接 import する必要があった
|
|
17
|
+
- 寸法: 部品の内側は `size` prop、部品の間は `Flex gap` / `Space size` に `margin*` トークン、面の内側は `padding*`、幅は `Col span` / `controlHeight` / 表の列幅、高さは `controlHeight*`。余白・幅・高さの数値をコードに書くのは表の列幅と印刷の紙寸法を除いて禁止
|
|
18
|
+
- 文字: 補足・注記・脚注・グラフの目盛は `fontSizeSM`。それより小さい文字を作らない。文字サイズの数値をコードに書かない
|
|
19
|
+
- 立ち上げ 2: `locale={jaJP}`。立ち上げ 5: CSS 変数は `UbieConfigProvider` を通した時点で出ているので `cssVar` の指定は不要、`StyleProvider` が要るときだけ `@ant-design/cssinjs` を依存に足して直接 import する。立ち上げ 6: Storybook decorator は `UbieConfigProvider` → `App` → `Layout` > `Layout.Content`
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- c2b7b22: 集計画面で自作になりがちな 4 つの規則を docs/ に足し、開示と表のカードに追記する。
|
|
24
|
+
|
|
25
|
+
- **新設** docs/patterns/print.md: 画面と印刷の切り替え(`screenOnly` / `printOnly`)、印刷から外す部品、骨格の高さ制約の解き方、`@page` と改ページ、各頁のフッタ、白黒前提、Storybook での確認法と限界
|
|
26
|
+
- **新設** docs/patterns/region-state.md: 区画をリクエスト単位で切る、`Skeleton` の形を中身に合わせる、失敗は数字を出さず `Alert` に、文言の型、再試行は `Alert` の `action` に
|
|
27
|
+
- **新設** docs/patterns/empty-state.md: 一覧が空 / 集計が 0 / 区画が取得できない の 3 つを見分け、理由と次の行動は数字の隣に置く、閾値は仕様側が持つ
|
|
28
|
+
- **新設** docs/components/statistic.md: 指標名・主数字・補足・推移の 1 枚の構成、1 段の枚数、`gutter` と折り返し、印刷では grid
|
|
29
|
+
- docs/patterns/disclosure.md: パターン表に「脚注」を追加、Tooltip に入れてよい情報の 5 問目「印刷・エクスポートに載らなくてよいか」
|
|
30
|
+
- docs/components/table.md: 「数値の列・合計・比較」(右寄せ・単位は見出し・合計は `summary`・横棒は数値併記・ピボット表の先頭列固定)
|
|
31
|
+
|
|
32
|
+
- 8e6f29f: docs/patterns/skeleton.md に補助型「区画」(Content の中を複数の主題に分ける構造)を追加する。
|
|
33
|
+
|
|
34
|
+
- 見出しのサイズを `Title` の `level` で固定(画面タイトル `level={3}` → 区画 `level={4}` → 面の中の小見出し `level={5}` → 補足は `fontSizeSM`)。区画の見出しを `Card` の `title` で代用しない
|
|
35
|
+
- 区画 = 見出し + 補足 + 白地の面の列。余白はトークン(`marginXL` / `marginMD` / `marginXXS`)。読み込みと失敗は区画単位で、失敗は数字を出さず `Alert` にする
|
|
36
|
+
- 開閉は既定で開いたまま。閉じられるようにするなら `Collapse` で統一し、既定を開にする
|
|
37
|
+
- 区画へのアンカー: 横向き `Anchor` は追従(`affix`)で置く。非追従にすると選択中の項目が変わるたびに自身へスクロールし、ページを下へスクロールできなくなる。`offsetTop` / `targetOffset` は固定ヘッダ + `marginXS`、内側スクロールなら `getContainer`。閉じた区画へ到達したら開く
|
|
38
|
+
- センタリング型の使う条件から「印刷」を外し、印刷は区画の構造をそのまま写す様式とした
|
|
39
|
+
- Storybook `Patterns/Section`(区画 / 区画 + アンカー / 区画 + 開閉)を追加
|
|
40
|
+
|
|
3
41
|
## 0.4.0
|
|
4
42
|
|
|
5
43
|
### Minor Changes
|
package/DESIGN.md
CHANGED
|
@@ -13,24 +13,26 @@ antd と Ant Design X の公開 API をそのまま再 export し、共通のテ
|
|
|
13
13
|
|
|
14
14
|
## 何をするときに何を読むか
|
|
15
15
|
|
|
16
|
-
| したいこと | 読むもの
|
|
17
|
-
| ---------------------------- |
|
|
18
|
-
| プロダクトを立ち上げる | 下の「立ち上げ」
|
|
19
|
-
| 画面を 1 枚足す |
|
|
20
|
-
| 部品の使い方を確かめる | `docs/components/`(Table / Layout / Modal / Drawer / チャット / アイコン)
|
|
21
|
-
| アイコンを選ぶ | `docs/components/icon.md`
|
|
22
|
-
| 色・寸法を決める | `docs/tokens.md`
|
|
23
|
-
|
|
|
16
|
+
| したいこと | 読むもの |
|
|
17
|
+
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
18
|
+
| プロダクトを立ち上げる | 下の「立ち上げ」 |
|
|
19
|
+
| 画面を 1 枚足す | 骨格と区画は `docs/patterns/skeleton.md` → 一覧と詳細の関係は `docs/patterns/list-detail.md` → 情報の出し方は `docs/patterns/disclosure.md` |
|
|
20
|
+
| 部品の使い方を確かめる | `docs/components/`(Table / Layout / Modal / Drawer / Statistic / チャット / アイコン) |
|
|
21
|
+
| アイコンを選ぶ | `docs/components/icon.md` |
|
|
22
|
+
| 色・寸法を決める | `docs/tokens.md` |
|
|
23
|
+
| グラフを置く | `docs/patterns/chart.md`。系列色は `chartSeriesColors` |
|
|
24
|
+
| 設計や実装を見直す・採点する | `docs/principles/` |
|
|
24
25
|
|
|
25
26
|
## 索引
|
|
26
27
|
|
|
27
28
|
### テーマ
|
|
28
29
|
|
|
29
|
-
| 名前 | 場所 | 役割
|
|
30
|
-
| -------------------- | --------------------------------- |
|
|
31
|
-
| `businessTheme` | `src/theme/businessTheme.ts` | ToB プロダクト共通の antd テーマ。`antdTheme` の token 層(色)+ `businessTypography`(文字)+ Layout / Table の components 既定
|
|
32
|
-
| `businessTypography` | `src/theme/businessTypography.ts` | ToB の文字の正本。書体スタック・本文 16px 基準の見出しスケール・行間。toC の `@ubie/vitals-token-consumer` とは正本が別
|
|
33
|
-
| `UbieConfigProvider` | `src/UbieConfigProvider.tsx` | `businessTheme` を既定で当てる ConfigProvider。利用側の `theme` は差分として重なる
|
|
30
|
+
| 名前 | 場所 | 役割 |
|
|
31
|
+
| -------------------- | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
32
|
+
| `businessTheme` | `src/theme/businessTheme.ts` | ToB プロダクト共通の antd テーマ。`antdTheme` の token 層(色)+ `businessTypography`(文字)+ Layout / Table の components 既定 |
|
|
33
|
+
| `businessTypography` | `src/theme/businessTypography.ts` | ToB の文字の正本。書体スタック・本文 16px 基準の見出しスケール・行間。toC の `@ubie/vitals-token-consumer` とは正本が別 |
|
|
34
|
+
| `UbieConfigProvider` | `src/UbieConfigProvider.tsx` | `businessTheme` を既定で当てる ConfigProvider。利用側の `theme` は差分として重なる |
|
|
35
|
+
| `chartSeriesColors` | `src/theme/chartSeriesColors.ts` | グラフの系列色。2 系統(`cool` / `warm`、色相 4 ずつ、`cool` は主・従の 2 段)+ `neutral` + 印刷用 `printRamp`。使い方は `docs/patterns/chart.md` |
|
|
34
36
|
|
|
35
37
|
### コンポーネント
|
|
36
38
|
|
|
@@ -44,20 +46,25 @@ antd の同名コンポーネントに既定を足したもの、および antd
|
|
|
44
46
|
|
|
45
47
|
### 文書
|
|
46
48
|
|
|
47
|
-
| 文書
|
|
48
|
-
|
|
|
49
|
-
| 体験設計の 8 原則と採点の枠
|
|
50
|
-
| 情報設計の原則
|
|
51
|
-
| トークンの優先順位
|
|
52
|
-
| Table カード
|
|
53
|
-
| 画面骨格 5
|
|
54
|
-
| 情報の開示パターン
|
|
55
|
-
| 一覧と詳細
|
|
56
|
-
|
|
|
57
|
-
|
|
|
58
|
-
|
|
|
59
|
-
|
|
|
60
|
-
|
|
|
49
|
+
| 文書 | 場所 |
|
|
50
|
+
| ---------------------------- | --------------------------------------- |
|
|
51
|
+
| 体験設計の 8 原則と採点の枠 | `docs/principles/README.md` |
|
|
52
|
+
| 情報設計の原則 | `docs/principles/information-design.md` |
|
|
53
|
+
| トークンの優先順位 | `docs/tokens.md` |
|
|
54
|
+
| Table カード | `docs/components/table.md` |
|
|
55
|
+
| 画面骨格 5 型と区画 | `docs/patterns/skeleton.md` |
|
|
56
|
+
| 情報の開示パターン | `docs/patterns/disclosure.md` |
|
|
57
|
+
| 一覧と詳細 | `docs/patterns/list-detail.md` |
|
|
58
|
+
| グラフ | `docs/patterns/chart.md` |
|
|
59
|
+
| 区画の状態(読み込み・失敗) | `docs/patterns/region-state.md` |
|
|
60
|
+
| 空状態 | `docs/patterns/empty-state.md` |
|
|
61
|
+
| 印刷様式 | `docs/patterns/print.md` |
|
|
62
|
+
| Statistic カード | `docs/components/statistic.md` |
|
|
63
|
+
| Layout カード | `docs/components/layout.md` |
|
|
64
|
+
| Modal カード | `docs/components/modal.md` |
|
|
65
|
+
| Drawer カード | `docs/components/drawer.md` |
|
|
66
|
+
| チャット | `docs/components/chat.md` |
|
|
67
|
+
| Icon カード | `docs/components/icon.md` |
|
|
61
68
|
|
|
62
69
|
### 描画カタログ
|
|
63
70
|
|
|
@@ -65,11 +72,13 @@ Storybook: https://ubie-inc.github.io/ubie-vitals/ui-business (main への pus
|
|
|
65
72
|
コンポーネントは Storybook の "Business/" グループ、パターンの実演は "Patterns/" グループにある。
|
|
66
73
|
|
|
67
74
|
- コンポーネント: `src/stories/business/Table.stories.tsx`・`src/stories/business/Chat.stories.tsx`・`src/stories/business/Icon.stories.tsx`
|
|
68
|
-
- パターンの実演: `src/stories/patterns/Skeleton.stories.tsx`・`src/stories/patterns/Disclosure.stories.tsx`・`src/stories/patterns/ListDetail.stories.tsx`
|
|
75
|
+
- パターンの実演: `src/stories/patterns/Skeleton.stories.tsx`・`src/stories/patterns/Section.stories.tsx`・`src/stories/patterns/Disclosure.stories.tsx`・`src/stories/patterns/ListDetail.stories.tsx`・`src/stories/patterns/Chart.stories.tsx`
|
|
69
76
|
|
|
70
77
|
## 立ち上げ
|
|
71
78
|
|
|
72
79
|
1. 依存を入れる: `pnpm add @ubie/vitals-ui-business react react-dom`
|
|
73
|
-
2. アプリの最上位を `UbieConfigProvider`
|
|
80
|
+
2. アプリの最上位を `UbieConfigProvider` で包み、`locale={jaJP}` を渡す。`jaJP` も `UbieConfigProvider` も `@ubie/vitals-ui-business` から import する(`antd/locale/*` を直接 import しない)
|
|
74
81
|
3. アプリ固有のテーマ差分(ヘッダー高さなど)は `UbieConfigProvider` の `theme` に差分だけ渡す。書き方は `docs/tokens.md`
|
|
75
82
|
4. 骨格は `docs/patterns/skeleton.md` の 5 型から選ぶ。一覧と詳細の組み立ては `docs/patterns/list-detail.md`、情報の出し方は `docs/patterns/disclosure.md`、部品の用法は `docs/components/` にある
|
|
83
|
+
5. CSS module から antd の値を参照するときは CSS 変数(`--ant-*`)をそのまま使う。`UbieConfigProvider` を通した時点で出ているので `cssVar` の指定は要らない。スタイルの挿入順を変える `StyleProvider` が要るときだけ、antd と同じ major の `@ant-design/cssinjs` を依存に足して直接 import する(再 export していない)
|
|
84
|
+
6. Storybook で描くときは decorator で `UbieConfigProvider` → `App` → `Layout` > `Layout.Content` の順に包む。`Layout` が無いと `Layout.bodyBg` が当たらず、面の外側が白いまま描かれる(`docs/components/layout.md`)
|
package/dist/index.cjs
CHANGED
|
@@ -25,6 +25,8 @@ let _ant_design_icons = require("@ant-design/icons");
|
|
|
25
25
|
_ant_design_icons = __toESM(_ant_design_icons);
|
|
26
26
|
let _ant_design_x = require("@ant-design/x");
|
|
27
27
|
let antd = require("antd");
|
|
28
|
+
let antd_locale_ja_JP_js = require("antd/locale/ja_JP.js");
|
|
29
|
+
antd_locale_ja_JP_js = __toESM(antd_locale_ja_JP_js);
|
|
28
30
|
let _ubie_vitals_antd_theme = require("@ubie/vitals-antd-theme");
|
|
29
31
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
30
32
|
let react = require("react");
|
|
@@ -33,7 +35,27 @@ let react = require("react");
|
|
|
33
35
|
* Do not edit directly, this file was auto-generated.
|
|
34
36
|
*/
|
|
35
37
|
const ColorUbieBlue100 = "#f0f2fdff";
|
|
38
|
+
const ColorUbieBlue400 = "#8499e0ff";
|
|
39
|
+
const ColorUbieBlue700 = "#2843b4ff";
|
|
40
|
+
const ColorUbiePink500 = "#e84f88ff";
|
|
41
|
+
const ColorUbieSky500 = "#008bf2ff";
|
|
42
|
+
const ColorUbieGreen400 = "#52c997ff";
|
|
43
|
+
const ColorUbieGreen700 = "#1c7e4fff";
|
|
44
|
+
const ColorUbieYellow700 = "#9f7200ff";
|
|
45
|
+
const ColorUbiePurple400 = "#cb90f8ff";
|
|
46
|
+
const ColorUbiePurple500 = "#b65df2ff";
|
|
47
|
+
const ColorUbiePurple700 = "#7700afff";
|
|
48
|
+
const ColorUbieRed700 = "#a4002cff";
|
|
49
|
+
const ColorUbieGray200 = "#e2e5e9ff";
|
|
50
|
+
const ColorUbieGray300 = "#c8cbd0ff";
|
|
51
|
+
const ColorUbieGray400 = "#a4a8adff";
|
|
52
|
+
const ColorUbieGray500 = "#83868cff";
|
|
53
|
+
const ColorUbieGray700 = "#474b50ff";
|
|
54
|
+
const ColorUbieGray800 = "#2b2e33ff";
|
|
55
|
+
const ColorUbieGray900 = "#181b1eff";
|
|
36
56
|
const ColorSurfaceContainer = "#ffffffff";
|
|
57
|
+
const ColorOnSurface = "#0a0b0eff";
|
|
58
|
+
const ColorOnSurfaceVariant = "#63666bff";
|
|
37
59
|
//#endregion
|
|
38
60
|
//#region src/theme/businessTypography.ts
|
|
39
61
|
/**
|
|
@@ -170,6 +192,86 @@ function UbieConfigProvider({ children, ...configProviderProps }) {
|
|
|
170
192
|
});
|
|
171
193
|
}
|
|
172
194
|
//#endregion
|
|
195
|
+
//#region src/theme/chartSeriesColors.ts
|
|
196
|
+
/**
|
|
197
|
+
* グラフの系列色。
|
|
198
|
+
*
|
|
199
|
+
* 系列色は「意味で表せない色」なので primitive から取る(docs/tokens.md「選ぶ順」)。使い方の規則は docs/patterns/chart.md。
|
|
200
|
+
* 選び方の約束(chartSeriesColors.test.ts が構造を検査する):
|
|
201
|
+
* - プライマリ・意味色(success / warning / error)と同じ段(blue-600・green-600・yellow-500・red-600 など)は系列に使わない。
|
|
202
|
+
* 同じ色相を使うときは段をずらす。状態を表す色と分類を表す色が同じ画面で混ざるため
|
|
203
|
+
* - hospital accent(sky / cream / slate / indigo / stone)は系列に使わない。sky-500 だけは系統 1 の例外
|
|
204
|
+
* - 白地(colorBgContainer)に対して 3:1 以上(WCAG 1.4.11)。`shade`(従)と `other` だけは例外で、単独では使わない
|
|
205
|
+
* - 1 系統の色相は 4 まで。それ以上の区分は上位 4 + その他に畳む(docs/patterns/chart.md「系列」)
|
|
206
|
+
*
|
|
207
|
+
* 2 系統を持つ理由: 1 画面に分類軸が 2 つあるとき(例: システム側の分類と人・組織側の分類)、軸ごとに系統を固定すると、
|
|
208
|
+
* 別の軸の同じ位置の色が並んでも別物だと読める。同じ軸のグラフでは、同じ系列に常に同じ色を当てる。
|
|
209
|
+
*/
|
|
210
|
+
const chartSeriesColors = {
|
|
211
|
+
/**
|
|
212
|
+
* 系統 1(寒色)。システム側の分類に使う。`base` が系列の色、`shade` は同じ系列を主・従の 2 値に割るときの従(淡)。
|
|
213
|
+
* `shade` が無い位置は 2 値の内訳に使わない。
|
|
214
|
+
*/
|
|
215
|
+
cool: [
|
|
216
|
+
{
|
|
217
|
+
base: ColorUbieBlue700,
|
|
218
|
+
shade: ColorUbieBlue400
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
base: ColorUbieSky500,
|
|
222
|
+
shade: null
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
base: ColorUbiePurple700,
|
|
226
|
+
shade: ColorUbiePurple400
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
base: ColorUbieGreen700,
|
|
230
|
+
shade: ColorUbieGreen400
|
|
231
|
+
}
|
|
232
|
+
],
|
|
233
|
+
/** 系統 2(暖色主体)。人・組織側の分類に使う。系統 1 と同じ色を含まない */
|
|
234
|
+
warm: [
|
|
235
|
+
ColorUbiePink500,
|
|
236
|
+
ColorUbieYellow700,
|
|
237
|
+
ColorUbieRed700,
|
|
238
|
+
ColorUbiePurple500
|
|
239
|
+
],
|
|
240
|
+
/** 系列ではない中立の色 */
|
|
241
|
+
neutral: {
|
|
242
|
+
/** 「(未設定)」「未分類」の系列。補足文字と同じ色 */
|
|
243
|
+
unset: ColorOnSurfaceVariant,
|
|
244
|
+
/** 上位 4 に入らなかった残りを畳んだ「その他」。淡いグレーの実色(透過だと印刷・画像で消える) */
|
|
245
|
+
other: ColorUbieGray300,
|
|
246
|
+
/** どの系列にも属さない全体の線(合計・率)。本文の文字色 */
|
|
247
|
+
total: ColorOnSurface
|
|
248
|
+
},
|
|
249
|
+
/**
|
|
250
|
+
* モノクロ印刷で系列の塗りを差し替えるグレーのランプ。積む順(底が濃い)に並ぶ。
|
|
251
|
+
* 色相の違いは白黒では潰れるため、印刷では色ではなく明度の段で系列を分ける(docs/patterns/print.md)。
|
|
252
|
+
*/
|
|
253
|
+
printRamp: {
|
|
254
|
+
/** 系統 1 の 4 系列 */
|
|
255
|
+
cool: [
|
|
256
|
+
ColorUbieGray900,
|
|
257
|
+
ColorUbieGray700,
|
|
258
|
+
ColorUbieGray500,
|
|
259
|
+
ColorUbieGray300
|
|
260
|
+
],
|
|
261
|
+
/** 系統 2 の 4 系列。続けて(未設定)は gray-300、その他は gray-200 */
|
|
262
|
+
warm: [
|
|
263
|
+
ColorUbieGray900,
|
|
264
|
+
ColorUbieGray700,
|
|
265
|
+
ColorUbieGray500,
|
|
266
|
+
ColorUbieGray400
|
|
267
|
+
],
|
|
268
|
+
warmUnset: ColorUbieGray300,
|
|
269
|
+
warmOther: ColorUbieGray200,
|
|
270
|
+
/** 2 値の内訳(主 / 従) */
|
|
271
|
+
shade: [ColorUbieGray800, ColorUbieGray400]
|
|
272
|
+
}
|
|
273
|
+
};
|
|
274
|
+
//#endregion
|
|
173
275
|
//#region src/components/Table/index.tsx
|
|
174
276
|
const ROW_ACTIONS_COLUMN_KEY = "__rowActions";
|
|
175
277
|
function resolveRowKey(rowKey, record, index) {
|
|
@@ -364,6 +466,13 @@ exports.businessFontSizes = businessFontSizes;
|
|
|
364
466
|
exports.businessLineHeights = businessLineHeights;
|
|
365
467
|
exports.businessTheme = businessTheme;
|
|
366
468
|
exports.businessTypography = businessTypography;
|
|
469
|
+
exports.chartSeriesColors = chartSeriesColors;
|
|
470
|
+
Object.defineProperty(exports, "jaJP", {
|
|
471
|
+
enumerable: true,
|
|
472
|
+
get: function() {
|
|
473
|
+
return antd_locale_ja_JP_js.default;
|
|
474
|
+
}
|
|
475
|
+
});
|
|
367
476
|
Object.defineProperty(exports, "notification", {
|
|
368
477
|
enumerable: true,
|
|
369
478
|
get: function() {
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import Icon from "@ant-design/icons";
|
|
2
2
|
import { BubbleProps, Conversations, ConversationsProps, notification as xNotification, version as xVersion } from "@ant-design/x";
|
|
3
3
|
import { ConfigProviderProps, Table as Table$1, TableProps as TableProps$1, notification, version } from "antd";
|
|
4
|
+
import jaJP from "antd/locale/ja_JP.js";
|
|
4
5
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
6
|
import { TableRef } from "antd/es/table/index.js";
|
|
6
7
|
import { ComponentRef, ReactNode, Ref } from "react";
|
|
@@ -171,6 +172,59 @@ declare const businessTheme: {
|
|
|
171
172
|
};
|
|
172
173
|
};
|
|
173
174
|
//#endregion
|
|
175
|
+
//#region src/theme/chartSeriesColors.d.ts
|
|
176
|
+
/**
|
|
177
|
+
* グラフの系列色。
|
|
178
|
+
*
|
|
179
|
+
* 系列色は「意味で表せない色」なので primitive から取る(docs/tokens.md「選ぶ順」)。使い方の規則は docs/patterns/chart.md。
|
|
180
|
+
* 選び方の約束(chartSeriesColors.test.ts が構造を検査する):
|
|
181
|
+
* - プライマリ・意味色(success / warning / error)と同じ段(blue-600・green-600・yellow-500・red-600 など)は系列に使わない。
|
|
182
|
+
* 同じ色相を使うときは段をずらす。状態を表す色と分類を表す色が同じ画面で混ざるため
|
|
183
|
+
* - hospital accent(sky / cream / slate / indigo / stone)は系列に使わない。sky-500 だけは系統 1 の例外
|
|
184
|
+
* - 白地(colorBgContainer)に対して 3:1 以上(WCAG 1.4.11)。`shade`(従)と `other` だけは例外で、単独では使わない
|
|
185
|
+
* - 1 系統の色相は 4 まで。それ以上の区分は上位 4 + その他に畳む(docs/patterns/chart.md「系列」)
|
|
186
|
+
*
|
|
187
|
+
* 2 系統を持つ理由: 1 画面に分類軸が 2 つあるとき(例: システム側の分類と人・組織側の分類)、軸ごとに系統を固定すると、
|
|
188
|
+
* 別の軸の同じ位置の色が並んでも別物だと読める。同じ軸のグラフでは、同じ系列に常に同じ色を当てる。
|
|
189
|
+
*/
|
|
190
|
+
declare const chartSeriesColors: {
|
|
191
|
+
/**
|
|
192
|
+
* 系統 1(寒色)。システム側の分類に使う。`base` が系列の色、`shade` は同じ系列を主・従の 2 値に割るときの従(淡)。
|
|
193
|
+
* `shade` が無い位置は 2 値の内訳に使わない。
|
|
194
|
+
*/
|
|
195
|
+
readonly cool: readonly [{
|
|
196
|
+
readonly base: string;
|
|
197
|
+
readonly shade: string;
|
|
198
|
+
}, {
|
|
199
|
+
readonly base: string;
|
|
200
|
+
readonly shade: null;
|
|
201
|
+
}, {
|
|
202
|
+
readonly base: string;
|
|
203
|
+
readonly shade: string;
|
|
204
|
+
}, {
|
|
205
|
+
readonly base: string;
|
|
206
|
+
readonly shade: string;
|
|
207
|
+
}]; /** 系統 2(暖色主体)。人・組織側の分類に使う。系統 1 と同じ色を含まない */
|
|
208
|
+
readonly warm: readonly [string, string, string, string]; /** 系列ではない中立の色 */
|
|
209
|
+
readonly neutral: {
|
|
210
|
+
/** 「(未設定)」「未分類」の系列。補足文字と同じ色 */readonly unset: string; /** 上位 4 に入らなかった残りを畳んだ「その他」。淡いグレーの実色(透過だと印刷・画像で消える) */
|
|
211
|
+
readonly other: string; /** どの系列にも属さない全体の線(合計・率)。本文の文字色 */
|
|
212
|
+
readonly total: string;
|
|
213
|
+
};
|
|
214
|
+
/**
|
|
215
|
+
* モノクロ印刷で系列の塗りを差し替えるグレーのランプ。積む順(底が濃い)に並ぶ。
|
|
216
|
+
* 色相の違いは白黒では潰れるため、印刷では色ではなく明度の段で系列を分ける(docs/patterns/print.md)。
|
|
217
|
+
*/
|
|
218
|
+
readonly printRamp: {
|
|
219
|
+
/** 系統 1 の 4 系列 */readonly cool: readonly [string, string, string, string]; /** 系統 2 の 4 系列。続けて(未設定)は gray-300、その他は gray-200 */
|
|
220
|
+
readonly warm: readonly [string, string, string, string];
|
|
221
|
+
readonly warmUnset: string;
|
|
222
|
+
readonly warmOther: string; /** 2 値の内訳(主 / 従) */
|
|
223
|
+
readonly shade: readonly [string, string];
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
type ChartSeriesColors = typeof chartSeriesColors;
|
|
227
|
+
//#endregion
|
|
174
228
|
//#region src/theme/businessTypography.d.ts
|
|
175
229
|
/**
|
|
176
230
|
* ToB プロダクト共通の書体スタック。
|
|
@@ -372,5 +426,5 @@ declare function ChatConversations({
|
|
|
372
426
|
...rest
|
|
373
427
|
}: ChatConversationsProps): _$react_jsx_runtime0.JSX.Element;
|
|
374
428
|
//#endregion
|
|
375
|
-
export { ChatBubble, type ChatBubbleEvidence, type ChatBubbleProps, ChatConversations, type ChatConversationsProps, Icon, Table, type TableProps, UbieConfigProvider, type UbieConfigProviderProps, businessFontFamily, businessFontSizes, businessLineHeights, businessTheme, businessTypography, notification, version, xNotification, xVersion };
|
|
429
|
+
export { type ChartSeriesColors, ChatBubble, type ChatBubbleEvidence, type ChatBubbleProps, ChatConversations, type ChatConversationsProps, Icon, Table, type TableProps, UbieConfigProvider, type UbieConfigProviderProps, businessFontFamily, businessFontSizes, businessLineHeights, businessTheme, businessTypography, chartSeriesColors, jaJP, notification, version, xNotification, xVersion };
|
|
376
430
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/UbieConfigProvider.tsx","../src/theme/businessTheme.ts","../src/theme/businessTypography.ts","../src/components/Table/index.tsx","../src/components/ChatBubble/index.tsx","../src/components/ChatConversations/index.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/UbieConfigProvider.tsx","../src/theme/businessTheme.ts","../src/theme/chartSeriesColors.ts","../src/theme/businessTypography.ts","../src/components/Table/index.tsx","../src/components/ChatBubble/index.tsx","../src/components/ChatConversations/index.tsx"],"mappings":";;;;;;;;;;;;;KAIY,uBAAA,GAA0B,mBAAA;;;;;iBAMtB,kBAAA,CAAA;EAAqB,QAAA;EAAA,GAAa;AAAA,GAAuB,uBAAA,GAAuB,oBAAA,CAAA,GAAA,CAAA,OAAA;;;;;;;;;;;cC8DnF,aAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cCxDA,iBAAA;;AFZb;;;;;;;;;;;;;;;MAMyE;EAAA,0DAAuB;EAAA;IAAA;4BC8DnF;IAAA;;EAgBU;;;;EAAA;;;;;;;;KClBX,iBAAA,UAA2B,iBAAA;;;;;;;;;;cC7D1B,kBAAA;;;;;;;;;AHLb;;;;;cGqBa,iBAAA;EHfqB,uGAAG;EAAA,+BAA2D;EAAA,+BAAA;EAAA,+BAA3D;EAAA,+BAAoC;EAAA;;;;;;;AC8DzE;;cEzBa,mBAAA;EAAA;;;;;;;;;;;;;;;cAiBA,kBAAA;EAAA;;;;;;;;;;;;;;;;;;UCvDI,UAAA,cAAwB,MAAA,CAAO,WAAA,oBAA+B,IAAA,CAC7E,YAAA,CAAe,UAAA;;;;;EAOf,UAAA,IAAc,MAAA,EAAQ,UAAA,KAAe,SAAA;;EAErC,aAAA;;EAEA,kBAAA;EACA,GAAA,GAAM,GAAA,CAAI,QAAA;;;AJlBZ;;;;;EI0BE,OAAA,GAAU,YAAA,CAAe,UAAA;AAAA;;;;;;;;;;iBAyBlB,aAAA,2BAAA,CAAyC,KAAA,EAAO,UAAA,CAAW,UAAA,IAAW,oBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,KA0F1E,YAAA,GAAe,IAAA,QACX,OAAA;AAAA,cAWI,KAAA,SAAc,aAAA,GAAgB,YAAA;;;;;;UCjJ1B,kBAAA;;EAEf,KAAA;;EAEA,IAAA;;EAEA,IAAA,GAAO,SAAA;AAAA;AAAA,UAGQ,eAAA,qBACK,iBAAA,mBACZ,WAAA,CAAY,WAAA;;ALnBtB;;;;EKyBE,QAAA,GAAW,kBAAA,GAAqB,kBAAA;ELnBlB;;;;;;;EK2Bd,SAAA,YAAqB,IAAA;EL3Bc;;;;EKgCnC,eAAA,IAAmB,IAAA,EAAM,IAAA;ELhCqE;;;;EKqC9F,OAAA;;EAEA,UAAA,GAAa,SAAA;EJuCQ;;;;;EIjCrB,GAAA,GAAM,GAAA,CAAI,SAAA;AAAA;;;;;;;;;iBAwCI,UAAA,qBAA+B,iBAAA,UAAA,CAAA;EAC7C,QAAA;EACA,SAAA;EACA,eAAA;EACA,OAAA;EACA,UAAA;EACA,MAAA;EACA,KAAA;EACA,GAAA;EAAA,GACG;AAAA,GACF,eAAA,CAAgB,WAAA,IAAY,oBAAA,CAAA,GAAA,CAAA,OAAA;;;UCrGd,sBAAA,SAA+B,kBAAA;;;;;;EAM9C,UAAA,GAAa,SAAA;;;;;EAKb,GAAA,GAAM,GAAA,CAAI,YAAA,QAAoB,aAAA;AAAA;;ANXhC;;;;;AAMA;;;iBMiBgB,iBAAA,CAAA;EAAoB,UAAA;EAAY,KAAA;EAAO,GAAA;EAAA,GAAQ;AAAA,GAAQ,sBAAA,GAAsB,oBAAA,CAAA,GAAA,CAAA,OAAA"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import Icon from "@ant-design/icons";
|
|
2
2
|
import { BubbleProps, Conversations, ConversationsProps, notification as xNotification, version as xVersion } from "@ant-design/x";
|
|
3
3
|
import { ConfigProviderProps, Table as Table$1, TableProps as TableProps$1, notification, version } from "antd";
|
|
4
|
+
import jaJP from "antd/locale/ja_JP.js";
|
|
4
5
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
6
|
import { ComponentRef, ReactNode, Ref } from "react";
|
|
6
7
|
import { TableRef } from "antd/es/table/index.js";
|
|
@@ -171,6 +172,59 @@ declare const businessTheme: {
|
|
|
171
172
|
};
|
|
172
173
|
};
|
|
173
174
|
//#endregion
|
|
175
|
+
//#region src/theme/chartSeriesColors.d.ts
|
|
176
|
+
/**
|
|
177
|
+
* グラフの系列色。
|
|
178
|
+
*
|
|
179
|
+
* 系列色は「意味で表せない色」なので primitive から取る(docs/tokens.md「選ぶ順」)。使い方の規則は docs/patterns/chart.md。
|
|
180
|
+
* 選び方の約束(chartSeriesColors.test.ts が構造を検査する):
|
|
181
|
+
* - プライマリ・意味色(success / warning / error)と同じ段(blue-600・green-600・yellow-500・red-600 など)は系列に使わない。
|
|
182
|
+
* 同じ色相を使うときは段をずらす。状態を表す色と分類を表す色が同じ画面で混ざるため
|
|
183
|
+
* - hospital accent(sky / cream / slate / indigo / stone)は系列に使わない。sky-500 だけは系統 1 の例外
|
|
184
|
+
* - 白地(colorBgContainer)に対して 3:1 以上(WCAG 1.4.11)。`shade`(従)と `other` だけは例外で、単独では使わない
|
|
185
|
+
* - 1 系統の色相は 4 まで。それ以上の区分は上位 4 + その他に畳む(docs/patterns/chart.md「系列」)
|
|
186
|
+
*
|
|
187
|
+
* 2 系統を持つ理由: 1 画面に分類軸が 2 つあるとき(例: システム側の分類と人・組織側の分類)、軸ごとに系統を固定すると、
|
|
188
|
+
* 別の軸の同じ位置の色が並んでも別物だと読める。同じ軸のグラフでは、同じ系列に常に同じ色を当てる。
|
|
189
|
+
*/
|
|
190
|
+
declare const chartSeriesColors: {
|
|
191
|
+
/**
|
|
192
|
+
* 系統 1(寒色)。システム側の分類に使う。`base` が系列の色、`shade` は同じ系列を主・従の 2 値に割るときの従(淡)。
|
|
193
|
+
* `shade` が無い位置は 2 値の内訳に使わない。
|
|
194
|
+
*/
|
|
195
|
+
readonly cool: readonly [{
|
|
196
|
+
readonly base: string;
|
|
197
|
+
readonly shade: string;
|
|
198
|
+
}, {
|
|
199
|
+
readonly base: string;
|
|
200
|
+
readonly shade: null;
|
|
201
|
+
}, {
|
|
202
|
+
readonly base: string;
|
|
203
|
+
readonly shade: string;
|
|
204
|
+
}, {
|
|
205
|
+
readonly base: string;
|
|
206
|
+
readonly shade: string;
|
|
207
|
+
}]; /** 系統 2(暖色主体)。人・組織側の分類に使う。系統 1 と同じ色を含まない */
|
|
208
|
+
readonly warm: readonly [string, string, string, string]; /** 系列ではない中立の色 */
|
|
209
|
+
readonly neutral: {
|
|
210
|
+
/** 「(未設定)」「未分類」の系列。補足文字と同じ色 */readonly unset: string; /** 上位 4 に入らなかった残りを畳んだ「その他」。淡いグレーの実色(透過だと印刷・画像で消える) */
|
|
211
|
+
readonly other: string; /** どの系列にも属さない全体の線(合計・率)。本文の文字色 */
|
|
212
|
+
readonly total: string;
|
|
213
|
+
};
|
|
214
|
+
/**
|
|
215
|
+
* モノクロ印刷で系列の塗りを差し替えるグレーのランプ。積む順(底が濃い)に並ぶ。
|
|
216
|
+
* 色相の違いは白黒では潰れるため、印刷では色ではなく明度の段で系列を分ける(docs/patterns/print.md)。
|
|
217
|
+
*/
|
|
218
|
+
readonly printRamp: {
|
|
219
|
+
/** 系統 1 の 4 系列 */readonly cool: readonly [string, string, string, string]; /** 系統 2 の 4 系列。続けて(未設定)は gray-300、その他は gray-200 */
|
|
220
|
+
readonly warm: readonly [string, string, string, string];
|
|
221
|
+
readonly warmUnset: string;
|
|
222
|
+
readonly warmOther: string; /** 2 値の内訳(主 / 従) */
|
|
223
|
+
readonly shade: readonly [string, string];
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
type ChartSeriesColors = typeof chartSeriesColors;
|
|
227
|
+
//#endregion
|
|
174
228
|
//#region src/theme/businessTypography.d.ts
|
|
175
229
|
/**
|
|
176
230
|
* ToB プロダクト共通の書体スタック。
|
|
@@ -372,5 +426,5 @@ declare function ChatConversations({
|
|
|
372
426
|
...rest
|
|
373
427
|
}: ChatConversationsProps): _$react_jsx_runtime0.JSX.Element;
|
|
374
428
|
//#endregion
|
|
375
|
-
export { ChatBubble, type ChatBubbleEvidence, type ChatBubbleProps, ChatConversations, type ChatConversationsProps, Icon, Table, type TableProps, UbieConfigProvider, type UbieConfigProviderProps, businessFontFamily, businessFontSizes, businessLineHeights, businessTheme, businessTypography, notification, version, xNotification, xVersion };
|
|
429
|
+
export { type ChartSeriesColors, ChatBubble, type ChatBubbleEvidence, type ChatBubbleProps, ChatConversations, type ChatConversationsProps, Icon, Table, type TableProps, UbieConfigProvider, type UbieConfigProviderProps, businessFontFamily, businessFontSizes, businessLineHeights, businessTheme, businessTypography, chartSeriesColors, jaJP, notification, version, xNotification, xVersion };
|
|
376
430
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/UbieConfigProvider.tsx","../src/theme/businessTheme.ts","../src/theme/businessTypography.ts","../src/components/Table/index.tsx","../src/components/ChatBubble/index.tsx","../src/components/ChatConversations/index.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/UbieConfigProvider.tsx","../src/theme/businessTheme.ts","../src/theme/chartSeriesColors.ts","../src/theme/businessTypography.ts","../src/components/Table/index.tsx","../src/components/ChatBubble/index.tsx","../src/components/ChatConversations/index.tsx"],"mappings":";;;;;;;;;;;;;KAIY,uBAAA,GAA0B,mBAAA;;;;;iBAMtB,kBAAA,CAAA;EAAqB,QAAA;EAAA,GAAa;AAAA,GAAuB,uBAAA,GAAuB,oBAAA,CAAA,GAAA,CAAA,OAAA;;;;;;;;;;;cC8DnF,aAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cCxDA,iBAAA;;AFZb;;;;;;;;;;;;;;;MAMyE;EAAA,0DAAuB;EAAA;IAAA;4BC8DnF;IAAA;;EAgBU;;;;EAAA;;;;;;;;KClBX,iBAAA,UAA2B,iBAAA;;;;;;;;;;cC7D1B,kBAAA;;;;;;;;;AHLb;;;;;cGqBa,iBAAA;EHfqB,uGAAG;EAAA,+BAA2D;EAAA,+BAAA;EAAA,+BAA3D;EAAA,+BAAoC;EAAA;;;;;;;AC8DzE;;cEzBa,mBAAA;EAAA;;;;;;;;;;;;;;;cAiBA,kBAAA;EAAA;;;;;;;;;;;;;;;;;;UCvDI,UAAA,cAAwB,MAAA,CAAO,WAAA,oBAA+B,IAAA,CAC7E,YAAA,CAAe,UAAA;;;;;EAOf,UAAA,IAAc,MAAA,EAAQ,UAAA,KAAe,SAAA;;EAErC,aAAA;;EAEA,kBAAA;EACA,GAAA,GAAM,GAAA,CAAI,QAAA;;;AJlBZ;;;;;EI0BE,OAAA,GAAU,YAAA,CAAe,UAAA;AAAA;;;;;;;;;;iBAyBlB,aAAA,2BAAA,CAAyC,KAAA,EAAO,UAAA,CAAW,UAAA,IAAW,oBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,KA0F1E,YAAA,GAAe,IAAA,QACX,OAAA;AAAA,cAWI,KAAA,SAAc,aAAA,GAAgB,YAAA;;;;;;UCjJ1B,kBAAA;;EAEf,KAAA;;EAEA,IAAA;;EAEA,IAAA,GAAO,SAAA;AAAA;AAAA,UAGQ,eAAA,qBACK,iBAAA,mBACZ,WAAA,CAAY,WAAA;;ALnBtB;;;;EKyBE,QAAA,GAAW,kBAAA,GAAqB,kBAAA;ELnBlB;;;;;;;EK2Bd,SAAA,YAAqB,IAAA;EL3Bc;;;;EKgCnC,eAAA,IAAmB,IAAA,EAAM,IAAA;ELhCqE;;;;EKqC9F,OAAA;;EAEA,UAAA,GAAa,SAAA;EJuCQ;;;;;EIjCrB,GAAA,GAAM,GAAA,CAAI,SAAA;AAAA;;;;;;;;;iBAwCI,UAAA,qBAA+B,iBAAA,UAAA,CAAA;EAC7C,QAAA;EACA,SAAA;EACA,eAAA;EACA,OAAA;EACA,UAAA;EACA,MAAA;EACA,KAAA;EACA,GAAA;EAAA,GACG;AAAA,GACF,eAAA,CAAgB,WAAA,IAAY,oBAAA,CAAA,GAAA,CAAA,OAAA;;;UCrGd,sBAAA,SAA+B,kBAAA;;;;;;EAM9C,UAAA,GAAa,SAAA;;;;;EAKb,GAAA,GAAM,GAAA,CAAI,YAAA,QAAoB,aAAA;AAAA;;ANXhC;;;;;AAMA;;;iBMiBgB,iBAAA,CAAA;EAAoB,UAAA;EAAY,KAAA;EAAO,GAAA;EAAA,GAAQ;AAAA,GAAQ,sBAAA,GAAsB,oBAAA,CAAA,GAAA,CAAA,OAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import Icon from "@ant-design/icons";
|
|
2
2
|
import { Bubble, Conversations, notification as xNotification, version as xVersion } from "@ant-design/x";
|
|
3
3
|
import { Button, ConfigProvider, Empty, Space, Table as Table$1, Typography, notification, theme, version } from "antd";
|
|
4
|
+
import jaJP from "antd/locale/ja_JP.js";
|
|
4
5
|
import { antdTheme } from "@ubie/vitals-antd-theme";
|
|
5
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
7
|
import { useCallback, useMemo, useState } from "react";
|
|
@@ -12,7 +13,27 @@ export * from "antd";
|
|
|
12
13
|
* Do not edit directly, this file was auto-generated.
|
|
13
14
|
*/
|
|
14
15
|
const ColorUbieBlue100 = "#f0f2fdff";
|
|
16
|
+
const ColorUbieBlue400 = "#8499e0ff";
|
|
17
|
+
const ColorUbieBlue700 = "#2843b4ff";
|
|
18
|
+
const ColorUbiePink500 = "#e84f88ff";
|
|
19
|
+
const ColorUbieSky500 = "#008bf2ff";
|
|
20
|
+
const ColorUbieGreen400 = "#52c997ff";
|
|
21
|
+
const ColorUbieGreen700 = "#1c7e4fff";
|
|
22
|
+
const ColorUbieYellow700 = "#9f7200ff";
|
|
23
|
+
const ColorUbiePurple400 = "#cb90f8ff";
|
|
24
|
+
const ColorUbiePurple500 = "#b65df2ff";
|
|
25
|
+
const ColorUbiePurple700 = "#7700afff";
|
|
26
|
+
const ColorUbieRed700 = "#a4002cff";
|
|
27
|
+
const ColorUbieGray200 = "#e2e5e9ff";
|
|
28
|
+
const ColorUbieGray300 = "#c8cbd0ff";
|
|
29
|
+
const ColorUbieGray400 = "#a4a8adff";
|
|
30
|
+
const ColorUbieGray500 = "#83868cff";
|
|
31
|
+
const ColorUbieGray700 = "#474b50ff";
|
|
32
|
+
const ColorUbieGray800 = "#2b2e33ff";
|
|
33
|
+
const ColorUbieGray900 = "#181b1eff";
|
|
15
34
|
const ColorSurfaceContainer = "#ffffffff";
|
|
35
|
+
const ColorOnSurface = "#0a0b0eff";
|
|
36
|
+
const ColorOnSurfaceVariant = "#63666bff";
|
|
16
37
|
//#endregion
|
|
17
38
|
//#region src/theme/businessTypography.ts
|
|
18
39
|
/**
|
|
@@ -149,6 +170,86 @@ function UbieConfigProvider({ children, ...configProviderProps }) {
|
|
|
149
170
|
});
|
|
150
171
|
}
|
|
151
172
|
//#endregion
|
|
173
|
+
//#region src/theme/chartSeriesColors.ts
|
|
174
|
+
/**
|
|
175
|
+
* グラフの系列色。
|
|
176
|
+
*
|
|
177
|
+
* 系列色は「意味で表せない色」なので primitive から取る(docs/tokens.md「選ぶ順」)。使い方の規則は docs/patterns/chart.md。
|
|
178
|
+
* 選び方の約束(chartSeriesColors.test.ts が構造を検査する):
|
|
179
|
+
* - プライマリ・意味色(success / warning / error)と同じ段(blue-600・green-600・yellow-500・red-600 など)は系列に使わない。
|
|
180
|
+
* 同じ色相を使うときは段をずらす。状態を表す色と分類を表す色が同じ画面で混ざるため
|
|
181
|
+
* - hospital accent(sky / cream / slate / indigo / stone)は系列に使わない。sky-500 だけは系統 1 の例外
|
|
182
|
+
* - 白地(colorBgContainer)に対して 3:1 以上(WCAG 1.4.11)。`shade`(従)と `other` だけは例外で、単独では使わない
|
|
183
|
+
* - 1 系統の色相は 4 まで。それ以上の区分は上位 4 + その他に畳む(docs/patterns/chart.md「系列」)
|
|
184
|
+
*
|
|
185
|
+
* 2 系統を持つ理由: 1 画面に分類軸が 2 つあるとき(例: システム側の分類と人・組織側の分類)、軸ごとに系統を固定すると、
|
|
186
|
+
* 別の軸の同じ位置の色が並んでも別物だと読める。同じ軸のグラフでは、同じ系列に常に同じ色を当てる。
|
|
187
|
+
*/
|
|
188
|
+
const chartSeriesColors = {
|
|
189
|
+
/**
|
|
190
|
+
* 系統 1(寒色)。システム側の分類に使う。`base` が系列の色、`shade` は同じ系列を主・従の 2 値に割るときの従(淡)。
|
|
191
|
+
* `shade` が無い位置は 2 値の内訳に使わない。
|
|
192
|
+
*/
|
|
193
|
+
cool: [
|
|
194
|
+
{
|
|
195
|
+
base: ColorUbieBlue700,
|
|
196
|
+
shade: ColorUbieBlue400
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
base: ColorUbieSky500,
|
|
200
|
+
shade: null
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
base: ColorUbiePurple700,
|
|
204
|
+
shade: ColorUbiePurple400
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
base: ColorUbieGreen700,
|
|
208
|
+
shade: ColorUbieGreen400
|
|
209
|
+
}
|
|
210
|
+
],
|
|
211
|
+
/** 系統 2(暖色主体)。人・組織側の分類に使う。系統 1 と同じ色を含まない */
|
|
212
|
+
warm: [
|
|
213
|
+
ColorUbiePink500,
|
|
214
|
+
ColorUbieYellow700,
|
|
215
|
+
ColorUbieRed700,
|
|
216
|
+
ColorUbiePurple500
|
|
217
|
+
],
|
|
218
|
+
/** 系列ではない中立の色 */
|
|
219
|
+
neutral: {
|
|
220
|
+
/** 「(未設定)」「未分類」の系列。補足文字と同じ色 */
|
|
221
|
+
unset: ColorOnSurfaceVariant,
|
|
222
|
+
/** 上位 4 に入らなかった残りを畳んだ「その他」。淡いグレーの実色(透過だと印刷・画像で消える) */
|
|
223
|
+
other: ColorUbieGray300,
|
|
224
|
+
/** どの系列にも属さない全体の線(合計・率)。本文の文字色 */
|
|
225
|
+
total: ColorOnSurface
|
|
226
|
+
},
|
|
227
|
+
/**
|
|
228
|
+
* モノクロ印刷で系列の塗りを差し替えるグレーのランプ。積む順(底が濃い)に並ぶ。
|
|
229
|
+
* 色相の違いは白黒では潰れるため、印刷では色ではなく明度の段で系列を分ける(docs/patterns/print.md)。
|
|
230
|
+
*/
|
|
231
|
+
printRamp: {
|
|
232
|
+
/** 系統 1 の 4 系列 */
|
|
233
|
+
cool: [
|
|
234
|
+
ColorUbieGray900,
|
|
235
|
+
ColorUbieGray700,
|
|
236
|
+
ColorUbieGray500,
|
|
237
|
+
ColorUbieGray300
|
|
238
|
+
],
|
|
239
|
+
/** 系統 2 の 4 系列。続けて(未設定)は gray-300、その他は gray-200 */
|
|
240
|
+
warm: [
|
|
241
|
+
ColorUbieGray900,
|
|
242
|
+
ColorUbieGray700,
|
|
243
|
+
ColorUbieGray500,
|
|
244
|
+
ColorUbieGray400
|
|
245
|
+
],
|
|
246
|
+
warmUnset: ColorUbieGray300,
|
|
247
|
+
warmOther: ColorUbieGray200,
|
|
248
|
+
/** 2 値の内訳(主 / 従) */
|
|
249
|
+
shade: [ColorUbieGray800, ColorUbieGray400]
|
|
250
|
+
}
|
|
251
|
+
};
|
|
252
|
+
//#endregion
|
|
152
253
|
//#region src/components/Table/index.tsx
|
|
153
254
|
const ROW_ACTIONS_COLUMN_KEY = "__rowActions";
|
|
154
255
|
function resolveRowKey(rowKey, record, index) {
|
|
@@ -328,6 +429,6 @@ function ChatConversations({ emptyState, items, ref, ...rest }) {
|
|
|
328
429
|
}), isEmpty ? emptyContent : null] });
|
|
329
430
|
}
|
|
330
431
|
//#endregion
|
|
331
|
-
export { ChatBubble, ChatConversations, Icon, Table, UbieConfigProvider, businessFontFamily, businessFontSizes, businessLineHeights, businessTheme, businessTypography, notification, version, xNotification, xVersion };
|
|
432
|
+
export { ChatBubble, ChatConversations, Icon, Table, UbieConfigProvider, businessFontFamily, businessFontSizes, businessLineHeights, businessTheme, businessTypography, chartSeriesColors, jaJP, notification, version, xNotification, xVersion };
|
|
332
433
|
|
|
333
434
|
//# sourceMappingURL=index.mjs.map
|