@godxjp/ui 18.4.0 → 18.6.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 (159) hide show
  1. package/README.md +16 -1
  2. package/dist/app/theme-axes.d.ts +11 -3
  3. package/dist/app/theme-axes.js +2 -1
  4. package/dist/components/charts/chart-frame.d.ts +17 -3
  5. package/dist/components/charts/chart-frame.js +7 -1
  6. package/dist/components/charts/chart-summary.d.ts +21 -0
  7. package/dist/components/charts/chart-summary.js +32 -5
  8. package/dist/components/charts/compact-bar-trend.d.ts +30 -0
  9. package/dist/components/charts/compact-bar-trend.js +74 -0
  10. package/dist/components/charts/index.d.ts +6 -0
  11. package/dist/components/charts/index.js +2 -0
  12. package/dist/components/data-display/badge.d.ts +8 -0
  13. package/dist/components/data-display/badge.js +7 -1
  14. package/dist/components/data-display/data-table.d.ts +40 -4
  15. package/dist/components/data-display/data-table.js +69 -2
  16. package/dist/components/data-display/empty-state.js +1 -1
  17. package/dist/components/data-display/index.d.ts +4 -2
  18. package/dist/components/data-display/index.js +10 -1
  19. package/dist/components/data-display/list-row.d.ts +41 -4
  20. package/dist/components/data-display/list-row.js +23 -3
  21. package/dist/components/data-display/qr-code.d.ts +1 -1
  22. package/dist/components/data-display/service-launcher-card.d.ts +40 -0
  23. package/dist/components/data-display/service-launcher-card.js +97 -0
  24. package/dist/components/data-display/table.d.ts +47 -2
  25. package/dist/components/data-display/table.js +29 -4
  26. package/dist/components/data-entry/command-palette.d.ts +37 -0
  27. package/dist/components/data-entry/command-palette.js +125 -0
  28. package/dist/components/data-entry/command.d.ts +10 -10
  29. package/dist/components/data-entry/index.d.ts +3 -0
  30. package/dist/components/data-entry/index.js +2 -0
  31. package/dist/components/data-entry/input-otp.d.ts +1 -0
  32. package/dist/components/feedback/dialog.d.ts +16 -1
  33. package/dist/components/feedback/dialog.js +46 -33
  34. package/dist/components/feedback/index.d.ts +5 -2
  35. package/dist/components/feedback/index.js +8 -2
  36. package/dist/components/feedback/sheet.d.ts +26 -4
  37. package/dist/components/feedback/sheet.js +54 -7
  38. package/dist/components/feedback/two-factor-setup.d.ts +31 -0
  39. package/dist/components/feedback/two-factor-setup.js +97 -0
  40. package/dist/components/general/index.d.ts +1 -1
  41. package/dist/components/general/logo.d.ts +49 -9
  42. package/dist/components/general/logo.js +67 -14
  43. package/dist/components/layout/app-shell.d.ts +1 -1
  44. package/dist/components/layout/app-shell.js +55 -30
  45. package/dist/components/layout/auth-account-summary.d.ts +5 -0
  46. package/dist/components/layout/auth-account-summary.js +31 -0
  47. package/dist/components/layout/auth-divider.d.ts +7 -0
  48. package/dist/components/layout/auth-divider.js +21 -0
  49. package/dist/components/layout/auth-footer.d.ts +5 -0
  50. package/dist/components/layout/auth-footer.js +24 -0
  51. package/dist/components/layout/auth-identity.d.ts +5 -0
  52. package/dist/components/layout/auth-identity.js +17 -0
  53. package/dist/components/layout/auth-shell.d.ts +9 -1
  54. package/dist/components/layout/auth-shell.js +25 -6
  55. package/dist/components/layout/auth-stack.d.ts +4 -0
  56. package/dist/components/layout/auth-stack.js +8 -0
  57. package/dist/components/layout/centered-shell.d.ts +5 -2
  58. package/dist/components/layout/centered-shell.js +29 -19
  59. package/dist/components/layout/error-surface.d.ts +35 -0
  60. package/dist/components/layout/error-surface.js +155 -0
  61. package/dist/components/layout/flex.d.ts +1 -1
  62. package/dist/components/layout/flex.js +4 -0
  63. package/dist/components/layout/index.d.ts +23 -3
  64. package/dist/components/layout/index.js +21 -2
  65. package/dist/components/layout/legal-document-shell.d.ts +34 -0
  66. package/dist/components/layout/legal-document-shell.js +186 -0
  67. package/dist/components/layout/master-detail.d.ts +24 -0
  68. package/dist/components/layout/master-detail.js +48 -0
  69. package/dist/components/layout/org-switcher.d.ts +9 -0
  70. package/dist/components/layout/org-switcher.js +218 -0
  71. package/dist/components/layout/page-container.d.ts +1 -1
  72. package/dist/components/layout/page-container.js +7 -2
  73. package/dist/components/layout/sidebar-link.d.ts +43 -0
  74. package/dist/components/layout/sidebar-link.js +13 -0
  75. package/dist/components/layout/sidebar.d.ts +42 -5
  76. package/dist/components/layout/sidebar.js +170 -85
  77. package/dist/components/navigation/app-setting-picker.js +17 -6
  78. package/dist/components/navigation/filter-bar.d.ts +12 -3
  79. package/dist/components/navigation/filter-bar.js +8 -2
  80. package/dist/components/navigation/index.d.ts +2 -2
  81. package/dist/components/navigation/index.js +3 -1
  82. package/dist/components/navigation/steps.js +38 -19
  83. package/dist/components/navigation/tabs-scroll.d.ts +70 -0
  84. package/dist/components/navigation/tabs-scroll.js +76 -0
  85. package/dist/components/navigation/tabs.js +47 -23
  86. package/dist/components/ui/avatar.d.ts +2 -1
  87. package/dist/components/ui/avatar.js +2 -1
  88. package/dist/components/ui/input-otp.d.ts +4 -1
  89. package/dist/components/ui/input-otp.js +2 -1
  90. package/dist/components/ui/toggle-group.d.ts +7 -4
  91. package/dist/components/ui/toggle-group.js +32 -21
  92. package/dist/email/brand-mark.d.ts +108 -0
  93. package/dist/email/brand-mark.js +88 -0
  94. package/dist/email/color.d.ts +53 -0
  95. package/dist/email/color.js +37 -0
  96. package/dist/email/geometry.d.ts +120 -0
  97. package/dist/email/geometry.js +90 -0
  98. package/dist/email/index.d.ts +83 -0
  99. package/dist/email/index.js +82 -0
  100. package/dist/email/inline-style.d.ts +27 -0
  101. package/dist/email/inline-style.js +26 -0
  102. package/dist/email/tokens.generated.d.ts +167 -0
  103. package/dist/email/tokens.generated.js +162 -0
  104. package/dist/email/urgency.d.ts +22 -0
  105. package/dist/email/urgency.js +14 -0
  106. package/dist/i18n/messages/en.json +36 -3
  107. package/dist/i18n/messages/ja.json +36 -3
  108. package/dist/i18n/messages/vi.json +36 -3
  109. package/dist/inertia/index.d.ts +50 -0
  110. package/dist/inertia/index.js +5 -0
  111. package/dist/props/components/app.prop.d.ts +11 -1
  112. package/dist/props/components/charts.prop.d.ts +40 -1
  113. package/dist/props/components/data-display.prop.d.ts +75 -1
  114. package/dist/props/components/data-entry.prop.d.ts +6 -0
  115. package/dist/props/components/feedback.prop.d.ts +10 -0
  116. package/dist/props/components/index.d.ts +3 -3
  117. package/dist/props/components/layout.prop.d.ts +560 -10
  118. package/dist/props/components/layout.prop.js +1 -0
  119. package/dist/props/components/navigation.prop.d.ts +24 -2
  120. package/dist/props/registry.d.ts +433 -8
  121. package/dist/props/registry.js +527 -9
  122. package/dist/props/vocabulary/data.prop.d.ts +27 -0
  123. package/dist/props/vocabulary/index.d.ts +3 -3
  124. package/dist/props/vocabulary/interaction.prop.d.ts +10 -1
  125. package/dist/props/vocabulary/layout.prop.d.ts +49 -0
  126. package/dist/styles/base.css +8 -2
  127. package/dist/styles/card-layout.css +161 -7
  128. package/dist/styles/chart-layout.css +97 -0
  129. package/dist/styles/control.css +76 -2
  130. package/dist/styles/data-display-layout.css +78 -6
  131. package/dist/styles/dialog-layout.css +105 -4
  132. package/dist/styles/fonts.css +15 -4
  133. package/dist/styles/index.css +11 -3
  134. package/dist/styles/layout.css +466 -1
  135. package/dist/styles/logo-layout.css +95 -0
  136. package/dist/styles/navigation-layout.css +152 -0
  137. package/dist/styles/shell-layout.css +790 -40
  138. package/dist/styles/table-layout.css +164 -1
  139. package/dist/theme/dxs.canonical.css +77 -0
  140. package/dist/tokens/axes.css +40 -0
  141. package/dist/tokens/base.css +6 -0
  142. package/dist/tokens/components/card.css +48 -0
  143. package/dist/tokens/components/chart.css +47 -0
  144. package/dist/tokens/components/control.css +16 -0
  145. package/dist/tokens/components/data-display.css +13 -0
  146. package/dist/tokens/components/email.css +93 -0
  147. package/dist/tokens/components/error-surface.css +36 -0
  148. package/dist/tokens/components/feedback.css +17 -0
  149. package/dist/tokens/components/legal-document.css +67 -0
  150. package/dist/tokens/components/list-row.css +43 -2
  151. package/dist/tokens/components/logo.css +74 -0
  152. package/dist/tokens/components/navigation.css +28 -0
  153. package/dist/tokens/components/sheet.css +19 -0
  154. package/dist/tokens/components/shell.css +210 -0
  155. package/dist/tokens/components/sidebar.css +33 -0
  156. package/dist/tokens/components/table.css +45 -0
  157. package/dist/tokens/foundation.css +31 -2
  158. package/dist/tokens/semantic/layout.css +69 -2
  159. package/package.json +22 -5
@@ -1,6 +1,6 @@
1
1
  /** Data Display component prop types — @see docs/COMPONENTS.md#data-display */
2
2
  import type * as React from "react";
3
- import type { ActionProp, ClassNameProp, DescriptionProp, IconProp, TitleProp, ColumnDefProp, GetRowIdProp, OnRowClickProp, OnSelectChangeProp, OnSortChangeProp, OnTableDensityChangeProp, SelectedIdsProp, SortStateProp, TableDensityProp, ChildrenProp, ToneProp, HeadingLevelProp, SizeProp, LabelProp, IdProp } from "../vocabulary/index.js";
3
+ import type { ActionProp, ClassNameProp, DescriptionProp, IconProp, TitleProp, ColumnDefProp, GetRowIdProp, OnRowClickProp, OnSelectChangeProp, OnSortChangeProp, OnTableDensityChangeProp, SelectedIdsProp, SortStateProp, TableDensityProp, TablePresetProp, BreakpointProp, DensityProp, ChildrenProp, ToneProp, AvatarShapeProp, HeadingLevelProp, HandlerProp, SizeProp, LabelProp, IdProp } from "../vocabulary/index.js";
4
4
  /** @see EmptyState */
5
5
  /**
6
6
  * Semantic intent of the EmptyState icon medallion — a subset of the shared `ToneProp` vocabulary
@@ -50,6 +50,21 @@ export type DescriptionsItemProp = {
50
50
  value: React.ReactNode;
51
51
  mono?: boolean;
52
52
  };
53
+ /**
54
+ * @see Avatar
55
+ *
56
+ * Identity mark. `shape` is the ONLY appearance knob: the default `circle` is the person avatar
57
+ * (unchanged — an existing `<Avatar>` renders identically), `square` is the entity-header
58
+ * organization / service mark (compact rounded square on the brand surface). Every value it
59
+ * paints — radius, box size, fill, glyph colour — comes from the `--avatar-square-*` component
60
+ * tokens (cardinal rule #45), so a service retunes the entity mark once in its theme instead of
61
+ * overriding `className` per call site.
62
+ */
63
+ export type AvatarProp = React.ComponentPropsWithoutRef<"span"> & {
64
+ shape?: AvatarShapeProp;
65
+ className?: ClassNameProp;
66
+ children?: ChildrenProp;
67
+ };
53
68
  /** @see Badge */
54
69
  export type BadgeProp = {
55
70
  variant?: "default" | "secondary" | "outline";
@@ -136,6 +151,65 @@ export type DataTableProp<T> = {
136
151
  onSortChange?: OnSortChangeProp;
137
152
  loading?: boolean;
138
153
  empty?: React.ReactNode;
154
+ /**
155
+ * Failure state (#216). `true` = built-in localized message (with a retry when `onRetry` is
156
+ * given); any other node replaces it. `false`/`undefined` = the read succeeded.
157
+ */
158
+ error?: React.ReactNode;
159
+ /**
160
+ * Permission-denied state (#216) — refused, not failed. `true` = built-in localized message
161
+ * with NO retry. Takes precedence over `error`.
162
+ */
163
+ denied?: React.ReactNode;
164
+ /** Retry handler surfaced by the built-in `error` state. */
165
+ onRetry?: HandlerProp;
166
+ /**
167
+ * Named collection contract (gh#253) — the SAME preset the `Table` primitive owns, forwarded to
168
+ * the table DataTable renders. `"default"` (the default) emits no attribute and matches no
169
+ * selector. `"action-collection"` is the canonical dense approval / action queue: below
170
+ * `collapseBelow` the desktop intrinsic column widths give way to the token-owned column-PRIORITY
171
+ * measures (`--table-action-collection-*`) under `table-layout: fixed`, cells wrap, and the
172
+ * surface drops its `--table-surface-min-inline-size` floor — so every column, row actions
173
+ * included, stays inside a 390px frame with no horizontal scroll. Mark each column with
174
+ * `priority` on its `ColumnDef`.
175
+ */
176
+ preset?: TablePresetProp;
177
+ /**
178
+ * Container step at which `preset="action-collection"` switches to the compact priority measures.
179
+ * Measured against the TABLE's own container (a container query), not the viewport, so a table in
180
+ * a master rail collapses before the page does. Default `"sm"`. Ignored while `preset` is
181
+ * `"default"`.
182
+ */
183
+ collapseBelow?: BreakpointProp;
139
184
  className?: ClassNameProp;
140
185
  children?: ChildrenProp;
141
186
  };
187
+ /**
188
+ * ListRow geometry — `default` (the roomy entity row) or `compact` (#246: the inline-actions row —
189
+ * Avatar + title/description + one or two small trailing Buttons on ONE line inside a narrow card).
190
+ * A ListRow-LOCAL subset of the shared density vocabulary: the row has no `comfortable` step, so it
191
+ * is deliberately narrower than `DensityProp` (and unrelated to `PageDensityProp`/`TableDensityProp`).
192
+ */
193
+ export type ListRowDensityProp = Exclude<DensityProp, "comfortable">;
194
+ /** @see ListRow */
195
+ export type ListRowProp = {
196
+ /** Render element — `div` (default) or `li` when the parent is a `<ul>`/`<ol>`. */
197
+ as?: "div" | "li";
198
+ /** Leading slot — a decorative icon or an Avatar. Mark a purely decorative icon `aria-hidden`. */
199
+ leading?: React.ReactNode;
200
+ /** Primary line — rendered in medium weight. */
201
+ title: TitleProp | React.ReactNode;
202
+ /** Secondary line under the title (muted, xs). */
203
+ description?: DescriptionProp | React.ReactNode;
204
+ /** Trailing slot — the row action(s): a Button / DropdownMenu trigger, a Badge, or a Switch. */
205
+ trailing?: React.ReactNode;
206
+ /** Cross-axis alignment of the columns — `center` (default) or `start` for multi-line content. */
207
+ align?: "center" | "start";
208
+ /** How over-long title/description resolve — `truncate` (default) or `wrap` (#224). */
209
+ overflow?: "truncate" | "wrap";
210
+ /** Row geometry — `default` or the compact inline-actions preset (#246). */
211
+ density?: ListRowDensityProp;
212
+ /** Read/unread state — indicator dot + localized `sr-only` text, never colour alone (#225). */
213
+ unread?: boolean;
214
+ className?: ClassNameProp;
215
+ };
@@ -10,6 +10,12 @@ import type { UploadFileItem } from "../../components/data-entry/upload-types.js
10
10
  import type { FieldA11yProps } from "../../lib/field-a11y.js";
11
11
  import type { ClassNameProp, DisabledProp, EmptyMessageProp, ErrorProp, HelperProp, IdProp, LabelProp, NameProp, OnChangeProp, OnValueChangeProp, OnSearchChangeProp, OpenProp, OnOpenChangeProp, PlaceholderProp, RequiredProp, ValueProp, DefaultValueProp, FormLayoutProp, WidthProp, BreakpointProp, DensityProp, SizeProp } from "../vocabulary/index.js";
12
12
  import type { ResponsiveGridColumnsProp } from "./layout.prop.js";
13
+ /** One-outline-per-group appearance for the compound InputOTP control. */
14
+ export type InputOTPGroupAppearanceProp = "slots" | "grouped";
15
+ /** @see InputOTPGroup */
16
+ export type InputOTPGroupProp = React.HTMLAttributes<HTMLDivElement> & {
17
+ appearance?: InputOTPGroupAppearanceProp;
18
+ };
13
19
  /** @see Input */
14
20
  export type InputProp = React.InputHTMLAttributes<HTMLInputElement> & {
15
21
  /** Show an inline ✕ that clears the field while it holds text (default false). */
@@ -62,6 +62,16 @@ export type AlertActionsProp = React.HTMLAttributes<HTMLDivElement> & {
62
62
  className?: ClassNameProp;
63
63
  children?: ChildrenProp;
64
64
  };
65
+ /**
66
+ * @see SheetContent — responsive drawer / detail-panel presentation contract.
67
+ *
68
+ * - `"side"` (default) — always the physical `side` panel the consumer named. Today's behaviour.
69
+ * - `"auto"` — desktop side panel above `--sheet-responsive-breakpoint-width`, mobile bottom sheet
70
+ * at and below it. The breakpoint is a token, so a service moves the line once for every overlay.
71
+ * - `"bottom"` — always the mobile bottom-sheet presentation (deterministic embedded surfaces,
72
+ * component tests, and composites that already decided they are on a compact viewport).
73
+ */
74
+ export type SheetResponsiveProp = "auto" | "side" | "bottom";
65
75
  /** @see SkeletonRows */
66
76
  export type SkeletonRowsProp = {
67
77
  rows?: number;
@@ -1,9 +1,9 @@
1
- export type { AppShellProp, PageContainerProp, PageInsetProp, SidebarItemProp, SidebarProductProp, SidebarProp, SidebarSectionProp, TopbarProp, } from "./layout.prop.js";
1
+ export type { AppShellProp, AuthFooterProp, AuthIdentityProp, OrgSwitcherLabels, OrgSwitcherOrganization, OrgSwitcherProp, PageContainerProp, PageInsetProp, SidebarItemProp, SidebarProductProp, SidebarProp, SidebarSectionProp, TopbarProp, } from "./layout.prop.js";
2
2
  export type { ButtonProp } from "./general.prop.js";
3
3
  export type { InputProp, TextareaProp, FormFieldProp, SearchInputProp, CheckboxProp, CheckboxGroupProp, ChoiceOptionProp, RadioProp, RadioGroupProp, SwitchProp, SliderProp, CalendarProp, DatePickerProp, DateRangePickerProp, TimePickerProp, ColorPickerProp, UploadProp, UploadFileItemProp, UploadVariantProp, TreeOptionProp, TreeFieldNamesProp, CascaderProp, TreeSelectProp, ShowCheckedStrategyProp, TransferProp, TransferItemProp, } from "./data-entry.prop.js";
4
- export type { EmptyStateProp, DescriptionsProp, DescriptionsItemProp, BadgeProp, DataTableProp, QrCodeProp, } from "./data-display.prop.js";
4
+ export type { AvatarProp, EmptyStateProp, DescriptionsProp, DescriptionsItemProp, BadgeProp, DataTableProp, QrCodeProp, } from "./data-display.prop.js";
5
5
  export type { ChartDatum, ChartSeriesProp, LineChartProp, BarChartProp, AreaChartProp, PieChartProp, } from "./charts.prop.js";
6
- export type { AlertQueryErrorProp, AlertProp, AlertTitleProp, AlertContentProp, AlertDescriptionProp, AlertActionsProp, SkeletonRowsProp, } from "./feedback.prop.js";
6
+ export type { AlertQueryErrorProp, AlertProp, AlertTitleProp, AlertContentProp, AlertDescriptionProp, AlertActionsProp, SheetResponsiveProp, SkeletonRowsProp, } from "./feedback.prop.js";
7
7
  export type { DataStateProp, InfiniteQueryStateProp, InfiniteQueryHelpers, PrefetchLinkProp, } from "./query.prop.js";
8
8
  export type { PaginationProp, StepsProp, StepItemProp, StepStatusProp, TabsProp, TabItemProp, } from "./navigation.prop.js";
9
9
  export type { AppProviderProp, AppContextValue, AppSettingKind, AppSettingPickerProp, } from "./app.prop.js";