@softize/opus 29.0.0 → 31.0.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 +137 -0
- package/bin/lib/check.mjs +178 -94
- package/bin/lib/copy.mjs +2970 -1801
- package/docs/adr/0043-neutral-surfaces-and-interactions-use-opaque-role-tokens.md +52 -0
- package/docs/adr/0044-neutral-appearance-derives-from-bounded-axes-per-mode.md +27 -2
- package/docs/adr/0045-surface-replaces-content-and-card.md +3 -0
- package/docs/adr/0060-surface-composition-separates-chrome-and-intro.md +142 -0
- package/docs/adr/0062-listas-contidas-e-texto-flexivel.md +68 -0
- package/docs/adr/0063-metadados-das-superficies.md +44 -0
- package/docs/adr/0064-action-list-com-itens-e-fontes-externas.md +47 -0
- package/docs/adr/0065-presentation-composes-settings-sections.md +295 -0
- package/docs/adr/README.md +8 -0
- package/package.json +1 -1
- package/registry/skills/build-opus-ui/SKILL.md +21 -19
- package/registry/skills/build-opus-ui/references/evaluations.md +21 -10
- package/registry/skills/build-opus-ui/references/ui-patterns.md +33 -28
- package/src/core/presentation.ts +938 -32
- package/src/core/types.ts +2 -1
- package/src/ui/components/patterns/form.tsx +2 -0
- package/src/ui/components/patterns/grouped-list.ts +2 -2
- package/src/ui/components/patterns/list.tsx +588 -365
- package/src/ui/components/patterns/page-heading-context.tsx +12 -5
- package/src/ui/components/patterns/page.tsx +238 -181
- package/src/ui/components/patterns/presentation-fields.tsx +246 -0
- package/src/ui/components/patterns/presentation-sections.tsx +494 -0
- package/src/ui/components/patterns/presentation.tsx +1142 -229
- package/src/ui/components/patterns/structural-header.tsx +47 -34
- package/src/ui/components/patterns/surface-anatomy.ts +27 -217
- package/src/ui/components/patterns/surface.tsx +55 -37
- package/src/ui/components/patterns/trigger.tsx +10 -2
- package/src/ui/components/primitives/close-button.tsx +11 -3
- package/src/ui/components/primitives/command.tsx +2 -8
- package/src/ui/components/primitives/detail.tsx +1 -1
- package/src/ui/components/primitives/dialog.tsx +59 -89
- package/src/ui/components/primitives/drawer.tsx +52 -87
- package/src/ui/components/primitives/field.tsx +1 -1
- package/src/ui/components/primitives/pagination.tsx +3 -2
- package/src/ui/components/primitives/table.tsx +3 -3
- package/src/ui/components/primitives/tabs.tsx +13 -2
- package/src/ui/docs/content/action-form.md +2 -1
- package/src/ui/docs/content/action-list.md +146 -73
- package/src/ui/docs/content/action-trigger.md +5 -0
- package/src/ui/docs/content/button.md +5 -6
- package/src/ui/docs/content/command.md +62 -50
- package/src/ui/docs/content/compositions.md +129 -459
- package/src/ui/docs/content/dialog.md +72 -101
- package/src/ui/docs/content/drawer.md +69 -92
- package/src/ui/docs/content/field.md +2 -1
- package/src/ui/docs/content/page.md +207 -386
- package/src/ui/docs/content/presentation.md +371 -23
- package/src/ui/docs/content/separator.md +1 -1
- package/src/ui/docs/content/surface.md +94 -116
- package/src/ui/docs/content/table.md +7 -0
- package/src/ui/docs/content/tokens.md +18 -4
- package/src/ui/drivers/context.tsx +11 -4
- package/src/ui/drivers/react.tsx +27 -7
- package/src/ui/meta.ts +5 -5
- package/src/ui/react.tsx +38 -8
- package/src/ui/theme.css +44 -33
package/src/core/types.ts
CHANGED
|
@@ -598,6 +598,7 @@ export type OptionsSpec =
|
|
|
598
598
|
|
|
599
599
|
/** Overrides declarativos nativos reconhecidos pelo ActionForm. */
|
|
600
600
|
export type BuiltInFieldWidget =
|
|
601
|
+
| 'password'
|
|
601
602
|
| 'textarea'
|
|
602
603
|
| 'code'
|
|
603
604
|
| 'lines'
|
|
@@ -714,7 +715,7 @@ export interface ListColumnSpec {
|
|
|
714
715
|
/** Header clicável (asc ↔ desc). Convenção: a UI escreve `sort: '<key>:<dir>'` no
|
|
715
716
|
* input; o handler implementa o orderBy. */
|
|
716
717
|
sortable?: boolean
|
|
717
|
-
/**
|
|
718
|
+
/** Preserva valores sem quebra; a largura considera também o cabeçalho e o espaço disponível. */
|
|
718
719
|
fit?: boolean
|
|
719
720
|
/** Nasce oculta (candidata ao column picker). */
|
|
720
721
|
hidden?: boolean
|
|
@@ -683,6 +683,8 @@ export function ActionFormField({
|
|
|
683
683
|
) : (
|
|
684
684
|
<Input
|
|
685
685
|
id={name}
|
|
686
|
+
type={spec.widget === "password" ? "password" : undefined}
|
|
687
|
+
autoComplete={spec.widget === "password" ? "new-password" : undefined}
|
|
686
688
|
placeholder={spec.placeholder ?? ""}
|
|
687
689
|
aria-invalid={errorMessage !== undefined}
|
|
688
690
|
aria-describedby={describedBy}
|
|
@@ -15,7 +15,7 @@ export interface ListActionGroup<TItem> {
|
|
|
15
15
|
|
|
16
16
|
/** Implementação interna do ActionList para executar um recorte paginado por grupo. */
|
|
17
17
|
export function useGroupedListQueries<TItem = unknown, TInput extends Record<string, unknown> = Record<string, unknown>>(
|
|
18
|
-
client: ClientAdapter,
|
|
18
|
+
client: ClientAdapter | null,
|
|
19
19
|
action: { name: string; kind: 'list' },
|
|
20
20
|
input: TInput,
|
|
21
21
|
field: string | null,
|
|
@@ -52,7 +52,7 @@ export function useGroupedListQueries<TItem = unknown, TInput extends Record<str
|
|
|
52
52
|
return {
|
|
53
53
|
queryKey: [action.name, groupInput],
|
|
54
54
|
queryFn: async (): Promise<Paginated<TItem>> => {
|
|
55
|
-
const result = await client
|
|
55
|
+
const result = await client!.run<Paginated<TItem>>(action as unknown as ActionDef, groupInput)
|
|
56
56
|
if (!result.ok) throw result.error
|
|
57
57
|
return result.data
|
|
58
58
|
},
|