@softize/opus 30.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.
Files changed (55) hide show
  1. package/CHANGELOG.md +116 -0
  2. package/bin/lib/check.mjs +109 -101
  3. package/bin/lib/copy.mjs +2970 -1801
  4. package/docs/adr/0043-neutral-surfaces-and-interactions-use-opaque-role-tokens.md +52 -0
  5. package/docs/adr/0044-neutral-appearance-derives-from-bounded-axes-per-mode.md +27 -2
  6. package/docs/adr/0060-surface-composition-separates-chrome-and-intro.md +142 -0
  7. package/docs/adr/0064-action-list-com-itens-e-fontes-externas.md +47 -0
  8. package/docs/adr/0065-presentation-composes-settings-sections.md +295 -0
  9. package/docs/adr/README.md +4 -0
  10. package/package.json +1 -1
  11. package/registry/skills/build-opus-ui/SKILL.md +21 -19
  12. package/registry/skills/build-opus-ui/references/evaluations.md +13 -11
  13. package/registry/skills/build-opus-ui/references/ui-patterns.md +24 -27
  14. package/src/core/presentation.ts +938 -32
  15. package/src/core/types.ts +1 -0
  16. package/src/ui/components/patterns/form.tsx +2 -0
  17. package/src/ui/components/patterns/grouped-list.ts +2 -2
  18. package/src/ui/components/patterns/list.tsx +572 -358
  19. package/src/ui/components/patterns/page-heading-context.tsx +12 -5
  20. package/src/ui/components/patterns/page.tsx +227 -197
  21. package/src/ui/components/patterns/presentation-fields.tsx +246 -0
  22. package/src/ui/components/patterns/presentation-sections.tsx +494 -0
  23. package/src/ui/components/patterns/presentation.tsx +1142 -229
  24. package/src/ui/components/patterns/structural-header.tsx +23 -32
  25. package/src/ui/components/patterns/surface-anatomy.ts +27 -217
  26. package/src/ui/components/patterns/surface.tsx +19 -29
  27. package/src/ui/components/patterns/trigger.tsx +10 -2
  28. package/src/ui/components/primitives/close-button.tsx +11 -3
  29. package/src/ui/components/primitives/command.tsx +2 -8
  30. package/src/ui/components/primitives/detail.tsx +1 -1
  31. package/src/ui/components/primitives/dialog.tsx +19 -81
  32. package/src/ui/components/primitives/drawer.tsx +17 -79
  33. package/src/ui/components/primitives/field.tsx +1 -1
  34. package/src/ui/components/primitives/pagination.tsx +3 -2
  35. package/src/ui/components/primitives/table.tsx +1 -1
  36. package/src/ui/components/primitives/tabs.tsx +13 -2
  37. package/src/ui/docs/content/action-form.md +2 -1
  38. package/src/ui/docs/content/action-list.md +134 -68
  39. package/src/ui/docs/content/action-trigger.md +5 -0
  40. package/src/ui/docs/content/button.md +5 -6
  41. package/src/ui/docs/content/command.md +62 -50
  42. package/src/ui/docs/content/compositions.md +129 -459
  43. package/src/ui/docs/content/dialog.md +44 -112
  44. package/src/ui/docs/content/drawer.md +44 -103
  45. package/src/ui/docs/content/field.md +2 -1
  46. package/src/ui/docs/content/page.md +204 -412
  47. package/src/ui/docs/content/presentation.md +371 -23
  48. package/src/ui/docs/content/separator.md +1 -1
  49. package/src/ui/docs/content/surface.md +65 -120
  50. package/src/ui/docs/content/tokens.md +18 -4
  51. package/src/ui/drivers/context.tsx +11 -4
  52. package/src/ui/drivers/react.tsx +27 -7
  53. package/src/ui/meta.ts +5 -5
  54. package/src/ui/react.tsx +34 -8
  55. 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'
@@ -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.run<Paginated<TItem>>(action as unknown as ActionDef, groupInput)
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
  },