@seanyeh77/ui 0.52.0 → 0.52.1

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.
@@ -989,6 +989,12 @@
989
989
  .ui-dt-body .ui-dt-cell.is-num {
990
990
  white-space: normal;
991
991
  }
992
+ /* A number with a second line starts at the left like every value in the card, on its name's line: the table's
993
+ right alignment and the stack's 6 px padding are for rows, not cards. */
994
+ .ui-dt-body .ui-dt-cell.is-num .ui-dt-stack {
995
+ align-items: flex-start;
996
+ padding-block: 0;
997
+ }
992
998
  .ui-dt-body .ui-dt-cell[data-label]:not(.is-m-title, .is-m-status)::before {
993
999
  content: attr(data-label);
994
1000
  position: absolute;
package/dist/styles.css CHANGED
@@ -4590,6 +4590,12 @@ div.ui-toast[role='status'] {
4590
4590
  .ui-dt-body .ui-dt-cell.is-num {
4591
4591
  white-space: normal;
4592
4592
  }
4593
+ /* A number with a second line starts at the left like every value in the card, on its name's line: the table's
4594
+ right alignment and the stack's 6 px padding are for rows, not cards. */
4595
+ .ui-dt-body .ui-dt-cell.is-num .ui-dt-stack {
4596
+ align-items: flex-start;
4597
+ padding-block: 0;
4598
+ }
4593
4599
  .ui-dt-body .ui-dt-cell[data-label]:not(.is-m-title, .is-m-status)::before {
4594
4600
  content: attr(data-label);
4595
4601
  position: absolute;
package/docs/DataTable.md CHANGED
@@ -36,7 +36,7 @@ const columns: DataTableColumn<Import>[] = [
36
36
 
37
37
  預設就有:主要文字欄占剩下的寬度、其他欄貼合內容;一列工具列(摘要分段、搜尋、「篩選」「排序」「⋯」和 `action`,放不下時摘要自己一列);手機上變成卡片清單。
38
38
 
39
- - 清單頁的「新增」(一個 `primary`)給 `action`,在工具列最右端;Card 的 `title`、`label` 怎麼給見 guidelines 的「常見頁面」。
39
+ - 清單頁的「新增」(一個 `primary`)給 `action`,在工具列最右端;Card 的 `title`、`label` 怎麼給見 guidelines 的「常見頁面」。`action` 的字用短的動詞(「新增」,不寫「新增手動帳戶」):表格寬度小於 480 px 時工具列只有一列、不換行,長字會把按鈕擠出畫面;要說是什麼,寫在頁面標題或 `label`。
40
40
  - 主要的文字欄放第一欄:它占剩下的寬度,也是手機卡片的標題和列的名稱。每列給 `id`。
41
41
  - 數字給 `numeric: true` 加 `unit`(傳數字 `1234`,不傳 `'1,234 筆'`);金額用 `format: 'money'`;長度(秒)用 `format: 'duration'`;日期用 `format: 'date' | 'dateTime' | 'relative'`。ID、代碼、雜湊和路徑的欄位給 `mono: true`。
42
42
  - 失敗的列:原因寫在 `secondary`(第二行),「重試」放 `rowActions`,可勾選時 `bulkActions` 也放。進行中的列:`doing` 的 Badge,進度文字(「匯入中 42%」)寫在 `secondary`,格子裡不放 ProgressBar。
package/docs/agents.md CHANGED
@@ -65,11 +65,11 @@ export default [ui.configs.recommended];
65
65
  ```html
66
66
  <meta charset="utf-8">
67
67
  <meta name="viewport" content="width=device-width, initial-scale=1">
68
- <link rel="stylesheet" href="https://seanyeh77.github.io/ui-design-system/dist/0.52.0/fonts.css">
69
- <link rel="stylesheet" href="https://seanyeh77.github.io/ui-design-system/dist/0.52.0/tokens.css">
70
- <link rel="stylesheet" href="https://seanyeh77.github.io/ui-design-system/dist/0.52.0/styles.css">
68
+ <link rel="stylesheet" href="https://seanyeh77.github.io/ui-design-system/dist/0.52.1/fonts.css">
69
+ <link rel="stylesheet" href="https://seanyeh77.github.io/ui-design-system/dist/0.52.1/tokens.css">
70
+ <link rel="stylesheet" href="https://seanyeh77.github.io/ui-design-system/dist/0.52.1/styles.css">
71
71
  <div id="root"></div>
72
- <script src="https://seanyeh77.github.io/ui-design-system/dist/0.52.0/bundle.js"></script>
72
+ <script src="https://seanyeh77.github.io/ui-design-system/dist/0.52.1/bundle.js"></script>
73
73
  <script>
74
74
  const h = React.createElement;
75
75
  UI.initTheme();
@@ -77,6 +77,6 @@ export default [ui.configs.recommended];
77
77
  </script>
78
78
  ```
79
79
 
80
- Pin a version as above: `/dist/<version>/` never changes; `/dist/` always serves the latest release. jsDelivr has the same files (`https://cdn.jsdelivr.net/npm/@seanyeh77/ui@0.52.0/dist/bundle.js`, `…/dist/styles.css`; the fonts at `https://cdn.jsdelivr.net/npm/@seanyeh77/tokens@0.52.0/fonts.css`). Without a bundler, `@seanyeh77/ui/dist/fonts.css` cannot resolve its import: load the tokens package's `fonts.css` or the pinned site URL.
80
+ Pin a version as above: `/dist/<version>/` never changes; `/dist/` always serves the latest release. jsDelivr has the same files (`https://cdn.jsdelivr.net/npm/@seanyeh77/ui@0.52.1/dist/bundle.js`, `…/dist/styles.css`; the fonts at `https://cdn.jsdelivr.net/npm/@seanyeh77/tokens@0.52.1/fonts.css`). Without a bundler, `@seanyeh77/ui/dist/fonts.css` cannot resolve its import: load the tokens package's `fonts.css` or the pinned site URL.
81
81
 
82
82
  Scope: web UI, and the tokens of SeanYeh's Slidev decks (`initTheme({ preset: 'teaching' })`, see `theme.md`). Slide layout, Notion documents and teaching diagrams follow the separate `teaching-materials-style` skill.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seanyeh77/ui",
3
- "version": "0.52.0",
3
+ "version": "0.52.1",
4
4
  "description": "SeanYeh's design system: typed React components on Base UI, styled with design tokens.",
5
5
  "license": "MIT",
6
6
  "author": "Hsiu-An Yeh",
@@ -58,7 +58,7 @@
58
58
  },
59
59
  "dependencies": {
60
60
  "@base-ui/react": "^1.9.0",
61
- "@seanyeh77/tokens": "^0.52.0"
61
+ "@seanyeh77/tokens": "^0.52.1"
62
62
  },
63
63
  "scripts": {
64
64
  "build": "node scripts/theme-defaults.ts && tsdown && node scripts/postbuild.ts",