@gntik-ai/templates 0.10.0 → 0.11.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.
@@ -0,0 +1,44 @@
1
+ import { DescriptionListCard } from '@gntik-ai/blocks';
2
+ import { Section } from '@gntik-ai/ui';
3
+ import ResourceDetailPage from '../Page';
4
+
5
+ /** The host owns the main landmark and any ChartLocaleProvider needed by chart content. */
6
+ export default function EmbeddedCustomTabs() {
7
+ return (
8
+ <main>
9
+ <ResourceDetailPage
10
+ shell={null}
11
+ readOnly
12
+ name="Resource record"
13
+ description="A detail page inside an existing application shell."
14
+ status="active"
15
+ breadcrumbs={[{ label: 'Resources', href: '/resources' }, { label: 'Resource record' }]}
16
+ tabs={[
17
+ {
18
+ value: 'summary',
19
+ label: 'Summary',
20
+ content: (
21
+ <DescriptionListCard
22
+ titleAs="h2"
23
+ title="Record summary"
24
+ items={[
25
+ { id: 'identifier', label: 'Identifier', value: 'record_42', mono: true },
26
+ { id: 'owner', label: 'Owner', value: 'Platform team' },
27
+ ]}
28
+ />
29
+ ),
30
+ },
31
+ {
32
+ value: 'output',
33
+ label: 'Output',
34
+ content: (
35
+ <Section variant="card" padding="md" title="Result">
36
+ <p>The resource completed successfully.</p>
37
+ </Section>
38
+ ),
39
+ },
40
+ ]}
41
+ />
42
+ </main>
43
+ );
44
+ }
@@ -6,7 +6,7 @@ export const meta: TemplateMeta = {
6
6
  priority: 'P1',
7
7
  status: 'beta',
8
8
  description:
9
- 'Resource detail with editable Overview, Activity and Settings tabs by default; optional readOnly (boolean, default false) uses only explicit header and detail props and one Overview tab, with optional history (readonly StatusEvent[], default undefined): omitted hides the history card, [] shows the named empty state, and events render exactly as supplied without invented actors. Read-only ignores activity, events, dangerActions, defaultTab, onSaveSettings and onDangerAction; explicit actions and onEditDetails are honored. The Resource sections tablist retains Tab, arrow, Home/End and Enter/Space keyboard navigation; history is a named group containing the Status history list or empty-state region. Uses token styling in dark (default), light and high_contrast. Examples: runtime-with-transition maps state and lastTransitionAt to one actor-free event, runtime-without-transition maps null to [], and realtime-configuration and postgres-table-detail omit history. Optional labels?: Partial<ResourceDetailLabels> overrides overview, activity, settings and sections (all strings). Unset keys use I18nProvider (en/es); no provider keeps English. Only the tabs and tablist are localized by this template; fixtures and other section text are unchanged. readOnly keeps only the localized overview tab. See the Catalog labels live preview. ConsoleShell retains sample frame defaults unless explicit shell props are supplied, as in the examples.',
9
+ 'Resource detail with editable Overview, Activity and Settings tabs by default; optional readOnly (boolean, default false) uses only explicit header and detail props and one Overview tab, with optional history (readonly StatusEvent[], default undefined): omitted hides the history card, [] shows the named empty state, and events render exactly as supplied without invented actors. Read-only ignores activity, events, dangerActions, defaultTab, onSaveSettings and onDangerAction; explicit actions and onEditDetails are honored. The Resource sections tablist retains Tab, arrow, Home/End and Enter/Space keyboard navigation; history is a named group containing the Status history list or empty-state region. Uses token styling in dark (default), light and high_contrast. Examples: runtime-with-transition maps state and lastTransitionAt to one actor-free event, runtime-without-transition maps null to [], and realtime-configuration and postgres-table-detail omit history. Optional labels?: Partial<ResourceDetailLabels> overrides overview, activity, settings and sections (all strings). Unset keys use I18nProvider (en/es); no provider keeps English. Only the tabs and tablist are localized by this template; fixtures and other section text are unchanged. readOnly keeps only the localized overview tab. See the Catalog labels live preview. ConsoleShell retains sample frame defaults when shell is omitted or an object. shell={null} renders only Page and PageHeader, with breadcrumbs in the header; pass breadcrumbs or [] to avoid the editable sample trail. The host owns main and provides ChartLocaleProvider for custom chart locales. Optional tabs?: { value: string; label: string; content: ReactNode }[] replaces the built-in tabs in caller order, even with readOnly; [] hides the tab set. With custom tabs, defaultTab and onTabChange use string values; an omitted or unknown defaultTab selects the first tab. Without tabs they retain ResourceDetailTab values. Custom tabs use the same Base UI keyboard navigation and panel mounting. See the embedded-custom-tabs live preview for shell-less composition inside a host main.',
10
10
  layout: 'SidebarLayout + Page',
11
11
  blocks: [
12
12
  'app-sidebar',