@tailor-platform/app-shell 1.17.0 → 1.19.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.
Files changed (36) hide show
  1. package/dist/app-shell-core.css +1 -1
  2. package/dist/app-shell.d.ts +503 -137
  3. package/dist/app-shell.js +8847 -7378
  4. package/dist/{appshell-CahhZy7v.js → appshell-DQTz-QwK.js} +489 -379
  5. package/dist/style-entry.d.ts +1 -656
  6. package/dist/testing.d.ts +118 -113
  7. package/dist/testing.js +1 -1
  8. package/dist/theme.bridge.css +127 -40
  9. package/dist/theme.css +4 -3
  10. package/dist/themes/_template.css +5 -6
  11. package/dist/themes/bloom.css +0 -2
  12. package/dist/themes/cream.css +0 -2
  13. package/dist/themes/default.css +112 -77
  14. package/dist/vite-plugin.d.ts +118 -113
  15. package/package.json +8 -5
  16. package/skills/app-shell-patterns/SKILL.md +51 -32
  17. package/skills/app-shell-patterns/references/api/aggregations.md +131 -0
  18. package/skills/app-shell-patterns/references/api/define-i18n-labels.md +123 -91
  19. package/skills/app-shell-patterns/references/api/define-module.md +2 -4
  20. package/skills/app-shell-patterns/references/components/action-panel.md +55 -23
  21. package/skills/app-shell-patterns/references/components/badge.md +7 -3
  22. package/skills/app-shell-patterns/references/components/data-table.md +724 -36
  23. package/skills/app-shell-patterns/references/components/form.md +19 -9
  24. package/skills/app-shell-patterns/references/components/item-list.md +191 -0
  25. package/skills/app-shell-patterns/references/components/select.md +10 -0
  26. package/skills/app-shell-patterns/references/components/sidebar-group.md +6 -6
  27. package/skills/app-shell-patterns/references/components/text.md +235 -0
  28. package/skills/app-shell-patterns/references/concepts/sidebar-navigation.md +16 -14
  29. package/skills/app-shell-patterns/references/concepts/styling-theming.md +46 -22
  30. package/skills/app-shell-patterns/references/migrations.md +23 -2
  31. package/skills/app-shell-patterns/references/pages/document-detail.md +36 -25
  32. package/skills/app-shell-patterns/references/patterns/form-modal.md +4 -1
  33. package/skills/app-shell-patterns/references/patterns/i18n-labels.md +139 -0
  34. package/skills/app-shell-patterns/references/patterns/list-dense-scan.md +3 -2
  35. package/dist/semantic-contrast.test.ts +0 -154
  36. package/dist/theme-bridge.test.ts +0 -159
@@ -17,24 +17,30 @@ import { ActionPanel } from "@tailor-platform/app-shell";
17
17
 
18
18
  ## Basic Usage
19
19
 
20
+ <example-preview name="basic-usage"></example-preview>
21
+
20
22
  ```tsx
21
- <ActionPanel
22
- title="Actions"
23
- actions={[
24
- {
25
- key: "create-invoice",
26
- label: "Create new sales invoice",
27
- icon: <ReceiptIcon />,
28
- onClick: () => openCreateInvoiceModal(),
29
- },
30
- {
31
- key: "view-docs",
32
- label: "View documentation",
33
- icon: <ExternalLinkIcon />,
34
- onClick: () => window.open("/docs", "_blank", "noopener,noreferrer"),
35
- },
36
- ]}
37
- />
23
+ function BasicUsage() {
24
+ return (
25
+ <ActionPanel
26
+ title="Actions"
27
+ actions={[
28
+ {
29
+ key: "create-invoice",
30
+ label: "Create new sales invoice",
31
+ icon: <Receipt />,
32
+ onClick: () => {},
33
+ },
34
+ {
35
+ key: "view-docs",
36
+ label: "View documentation",
37
+ icon: <ExternalLink />,
38
+ onClick: () => {},
39
+ },
40
+ ]}
41
+ />
42
+ );
43
+ }
38
44
  ```
39
45
 
40
46
  ## Props
@@ -43,11 +49,12 @@ _Generated from the type surface — first-party props only._
43
49
 
44
50
  ### ActionPanelProps
45
51
 
46
- | Prop | Type | Default | Description |
47
- | ------------ | -------------- | ------- | --------------------------------------------- |
48
- | `actions` | `ActionItem[]` | - | List of actions to render |
49
- | `className?` | `string` | - | Additional CSS classes for the card container |
50
- | `title` | `string` | - | Card title |
52
+ | Prop | Type | Default | Description |
53
+ | --------------- | -------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
54
+ | `actions` | `ActionItem[]` | - | List of actions to render |
55
+ | `className?` | `string` | - | Additional CSS classes for the card container |
56
+ | `emptyContent?` | `ReactNode` | - | Content shown with consistent padding when actions is empty. Defaults to a localized "No actions available" message. Strings use the default body text styling; other React nodes render unchanged. Pass null to hide the empty content and its additional vertical spacing while keeping the card and title. |
57
+ | `title` | `string` | - | Card title |
51
58
 
52
59
  ## Exports
53
60
 
@@ -71,7 +78,32 @@ _Generated from the type surface — first-party props only._
71
78
  - Rows are rendered as `<button type="button">` elements.
72
79
  - `disabled` or `loading` makes the row non-interactive.
73
80
  - When `loading` is `true`, the icon slot renders a spinner without shifting layout.
74
- - Empty actions show a built-in fallback message: `No actions available`.
81
+ - Empty actions show `emptyContent`, which defaults to a styled message localized using the AppShell locale: `No actions available` in English or `利用可能なアクションはありません` in Japanese.
82
+
83
+ ## Custom Empty Content
84
+
85
+ Pass a string or any `ReactNode` to `emptyContent` to replace the default content when `actions` is empty. Strings use the same muted `Text` body styling as the default message. Other React nodes render directly inside `Card.Content` without a paragraph wrapper and control their own typography. `Card.Content` owns the spacing, and the title, empty content, and action icons share the same 32px horizontal inset. Action rows retain horizontal padding around their hover backgrounds and focus rings. Custom empty content is ignored when actions are present.
86
+
87
+ <example-preview name="custom-empty-content"></example-preview>
88
+
89
+ ```tsx
90
+ function CustomEmptyContent() {
91
+ return (
92
+ <ActionPanel
93
+ title="操作"
94
+ actions={[]}
95
+ emptyContent={
96
+ <div>
97
+ <p>利用可能な操作はありません</p>
98
+ <p>ステータスが変わると、操作が表示されます。</p>
99
+ </div>
100
+ }
101
+ />
102
+ );
103
+ }
104
+ ```
105
+
106
+ Pass `null` to hide the empty content and its additional vertical spacing while keeping the card and its title. To hide the entire panel when no actions are available, render it conditionally with `actions.length > 0`.
75
107
 
76
108
  ## With Loading State
77
109
 
@@ -32,6 +32,7 @@ function BasicUsage() {
32
32
  <Badge variant="subtle-warning">Subtle Warning</Badge>
33
33
  <Badge variant="subtle-error">Subtle Error</Badge>
34
34
  <Badge variant="subtle-info">Subtle Info</Badge>
35
+ <Badge variant="subtle-neutral">Subtle Neutral</Badge>
35
36
  </div>
36
37
  );
37
38
  }
@@ -54,6 +55,7 @@ Filled variants for high emphasis, plus subtle variants for lower-emphasis statu
54
55
  <Badge variant="subtle-warning">Needs Attention</Badge>
55
56
  <Badge variant="subtle-error">Needs Review</Badge>
56
57
  <Badge variant="subtle-info">In Progress</Badge>
58
+ <Badge variant="subtle-neutral">Archived</Badge>
57
59
  ```
58
60
 
59
61
  ### Outline Variants with Status Dots
@@ -74,9 +76,9 @@ _Generated from the type surface — first-party props only._
74
76
 
75
77
  ### BadgeProps
76
78
 
77
- | Prop | Type | Default | Description |
78
- | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | -------------------- |
79
- | `variant?` | `"error" \| "neutral" \| "success" \| "warning" \| "info" \| "default" \| "subtle-success" \| "subtle-warning" \| "subtle-error" \| "subtle-info" \| "outline-success" \| "outline-warning" \| "outline-error" \| "outline-info" \| "outline-neutral" \| null` | `"default"` | Visual style variant |
79
+ | Prop | Type | Default | Description |
80
+ | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | -------------------- |
81
+ | `variant?` | `"error" \| "neutral" \| "success" \| "warning" \| "info" \| "default" \| "subtle-success" \| "subtle-warning" \| "subtle-error" \| "subtle-info" \| "subtle-neutral" \| "outline-success" \| "outline-warning" \| "outline-error" \| "outline-info" \| "outline-neutral" \| null` | `"default"` | Visual style variant |
80
82
 
81
83
  ## Exports
82
84
 
@@ -99,6 +101,7 @@ type BadgeVariant =
99
101
  | "subtle-warning" // Low-emphasis yellow
100
102
  | "subtle-error" // Low-emphasis red/destructive
101
103
  | "subtle-info" // Low-emphasis blue
104
+ | "subtle-neutral" // Low-emphasis gray
102
105
  // Outline variants with status dots
103
106
  | "outline-success"
104
107
  | "outline-warning"
@@ -225,6 +228,7 @@ function ProductBadge({ product }: { product: Product }) {
225
228
  | `subtle-warning` | ![Subtle yellow badge] | Low-emphasis pending or attention states |
226
229
  | `subtle-error` | ![Subtle red badge] | Low-emphasis failures or exceptions |
227
230
  | `subtle-info` | ![Subtle blue badge] | Low-emphasis informational or in-progress |
231
+ | `subtle-neutral` | ![Subtle gray badge] | Low-emphasis tags with no status |
228
232
 
229
233
  ### Outline Variants
230
234