@instruments/materia-ui 0.4.5 → 0.4.7

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 (127) hide show
  1. package/agent-docs.md +4 -0
  2. package/dist/components/accordion/accordion-variants.js +1 -0
  3. package/dist/components/alert/alert-root.js +1 -0
  4. package/dist/components/anchor/anchor-root.js +1 -0
  5. package/dist/components/aspect-ratio/aspect-ratio-root.d.ts +7 -3
  6. package/dist/components/aspect-ratio/aspect-ratio-root.js +5 -3
  7. package/dist/components/avatar/avatar-badge.d.ts +1 -1
  8. package/dist/components/avatar/avatar-fallback.d.ts +1 -1
  9. package/dist/components/avatar/avatar-root.d.ts +1 -1
  10. package/dist/components/avatar/avatar-status.d.ts +2 -1
  11. package/dist/components/badge/badge-button.d.ts +1 -0
  12. package/dist/components/badge/badge-button.js +1 -0
  13. package/dist/components/badge/badge-root.d.ts +4 -1
  14. package/dist/components/breadcrumb/breadcrumb-root.d.ts +1 -0
  15. package/dist/components/button/button-variants.js +7 -0
  16. package/dist/components/button-group/button-group-root.js +4 -0
  17. package/dist/components/card/card-root.d.ts +1 -0
  18. package/dist/components/card/card-root.js +1 -0
  19. package/dist/components/checkbox-card/checkbox-card-root.d.ts +1 -1
  20. package/dist/components/checkbox-field/checkbox-field-root.d.ts +4 -1
  21. package/dist/components/context-menu/context-menu-checkbox-item.d.ts +1 -1
  22. package/dist/components/context-menu/context-menu-content.d.ts +1 -1
  23. package/dist/components/context-menu/context-menu-item.d.ts +1 -1
  24. package/dist/components/context-menu/context-menu-radio-item.d.ts +1 -1
  25. package/dist/components/context-menu/context-menu-separator.d.ts +2 -2
  26. package/dist/components/context-menu/context-menu-separator.js +1 -1
  27. package/dist/components/context-menu/context-menu-sub-trigger.d.ts +1 -1
  28. package/dist/components/dot/dot-root.js +1 -0
  29. package/dist/components/drawer/drawer-root.d.ts +1 -0
  30. package/dist/components/dropdown-menu/dropdown-menu-checkbox-item.d.ts +1 -1
  31. package/dist/components/dropdown-menu/dropdown-menu-content.d.ts +1 -1
  32. package/dist/components/dropdown-menu/dropdown-menu-item.d.ts +1 -1
  33. package/dist/components/dropdown-menu/dropdown-menu-radio-item.d.ts +1 -1
  34. package/dist/components/dropdown-menu/dropdown-menu-separator.d.ts +2 -2
  35. package/dist/components/dropdown-menu/dropdown-menu-separator.js +1 -1
  36. package/dist/components/dropdown-menu/dropdown-menu-sub-trigger.d.ts +1 -1
  37. package/dist/components/empty/empty-root.js +1 -0
  38. package/dist/components/expand-button/expand-button-root.js +1 -0
  39. package/dist/components/field/field-error.d.ts +1 -0
  40. package/dist/components/field/field-variants.js +1 -0
  41. package/dist/components/icon-box/icon-box-root.js +4 -0
  42. package/dist/components/identified-surface.d.ts +5 -0
  43. package/dist/components/input/input-variants.js +1 -0
  44. package/dist/components/input-card/input-card-root.d.ts +3 -0
  45. package/dist/components/input-group/input-group-button.d.ts +7 -3
  46. package/dist/components/item/item-group.js +1 -0
  47. package/dist/components/item/item-media.d.ts +8 -0
  48. package/dist/components/item/item-media.js +1 -0
  49. package/dist/components/item/item-root.d.ts +1 -0
  50. package/dist/components/item/item-root.js +1 -0
  51. package/dist/components/kbd/kbd-root.js +2 -0
  52. package/dist/components/media-frame/media-frame-root.d.ts +2 -0
  53. package/dist/components/media-frame/media-frame-root.js +2 -0
  54. package/dist/components/menu-item/menu-item-variants.js +5 -0
  55. package/dist/components/menu-parts-types.d.ts +82 -0
  56. package/dist/components/menu-parts-types.js +1 -0
  57. package/dist/components/menu-parts.d.ts +3 -66
  58. package/dist/components/menubar/menubar-checkbox-item.d.ts +1 -1
  59. package/dist/components/menubar/menubar-content.d.ts +1 -1
  60. package/dist/components/menubar/menubar-item.d.ts +1 -1
  61. package/dist/components/menubar/menubar-radio-item.d.ts +1 -1
  62. package/dist/components/menubar/menubar-separator.d.ts +2 -2
  63. package/dist/components/menubar/menubar-separator.js +1 -1
  64. package/dist/components/menubar/menubar-sub-trigger.d.ts +1 -1
  65. package/dist/components/phone-input/phone-input-root.js +2 -0
  66. package/dist/components/pill/pill-root.d.ts +1 -0
  67. package/dist/components/pill/pill-variants.js +3 -0
  68. package/dist/components/popover/popover-root.d.ts +2 -0
  69. package/dist/components/progress/progress-root.d.ts +2 -0
  70. package/dist/components/scroll-frame/scroll-frame-root.d.ts +8 -2
  71. package/dist/components/segmented-control/segmented-control-root.d.ts +8 -2
  72. package/dist/components/select/select-content.d.ts +1 -0
  73. package/dist/components/select/select-trigger.d.ts +9 -1
  74. package/dist/components/select/select-trigger.js +1 -1
  75. package/dist/components/sidepanel/sidepanel-header.d.ts +4 -0
  76. package/dist/components/sub-navigation/sub-navigation-link.d.ts +1 -0
  77. package/dist/components/swatch/swatch-root.d.ts +2 -0
  78. package/dist/components/swatch/swatch-root.js +2 -0
  79. package/dist/components/swatch/swatch-tile.d.ts +2 -1
  80. package/dist/components/swatch/swatch-tile.js +1 -1
  81. package/dist/components/tab-navigation/tab-navigation-link.d.ts +1 -0
  82. package/dist/components/tabs/tabs-panel.d.ts +4 -0
  83. package/dist/components/tabs/tabs-variants.js +4 -0
  84. package/dist/components/thinking-loader/thinking-loader-counter.d.ts +2 -0
  85. package/dist/components/thinking-loader/thinking-loader-icon.d.ts +2 -0
  86. package/dist/components/thinking-loader/thinking-loader-step.d.ts +2 -0
  87. package/dist/components/toggle/toggle-root.js +2 -0
  88. package/dist/components/voice/voice-error-popover.d.ts +2 -0
  89. package/dist/components/voice/voice-pill.d.ts +2 -0
  90. package/dist/compositions/attribute-card.d.ts +1 -0
  91. package/dist/compositions/card-grid/card-grid-rows.d.ts +13 -0
  92. package/dist/compositions/data-grid/data-grid-checkbox.d.ts +8 -0
  93. package/dist/compositions/data-grid/data-grid-expand.d.ts +1 -0
  94. package/dist/compositions/data-grid/data-grid-filterable-header.d.ts +1 -0
  95. package/dist/compositions/data-grid/data-grid-types.d.ts +6 -0
  96. package/dist/compositions/data-grid-column-header/data-grid-column-header-root.d.ts +5 -0
  97. package/dist/compositions/data-grid-table/data-grid-table-body.d.ts +13 -1
  98. package/dist/compositions/data-grid-table/data-grid-table-body.js +1 -1
  99. package/dist/compositions/data-grid-table/data-grid-table-header.d.ts +5 -0
  100. package/dist/compositions/document-list/document-list-icon.d.ts +1 -0
  101. package/dist/compositions/document-list/document-list-root.js +4 -0
  102. package/dist/compositions/editorial-card/editorial-card-content.d.ts +2 -0
  103. package/dist/compositions/file-upload/file-upload-dropzone.d.ts +3 -0
  104. package/dist/compositions/folder-tile/folder-tile-types.d.ts +2 -0
  105. package/dist/compositions/mobile-navigation/mobile-navigation-header.d.ts +5 -2
  106. package/dist/compositions/mobile-navigation/mobile-navigation-header.js +0 -1
  107. package/dist/compositions/mobile-navigation/mobile-navigation-item.d.ts +2 -0
  108. package/dist/compositions/mobile-navigation/mobile-navigation-profile.d.ts +1 -0
  109. package/dist/compositions/mobile-navigation/mobile-navigation-root.d.ts +1 -0
  110. package/dist/compositions/page-toolbar/page-toolbar-applied.d.ts +4 -1
  111. package/dist/compositions/page-toolbar/page-toolbar-sort.d.ts +3 -0
  112. package/dist/compositions/product-card/product-card-content.d.ts +1 -0
  113. package/dist/compositions/product-card/product-card-image-types.d.ts +8 -2
  114. package/dist/compositions/product-card/product-card-provider-types.d.ts +47 -2
  115. package/dist/compositions/product-card/product-card-root.d.ts +3 -0
  116. package/dist/compositions/product-card/product-card-root.js +2 -0
  117. package/dist/compositions/product-card/product-card-swatch.d.ts +2 -0
  118. package/dist/compositions/product-card/product-card-tools-types.d.ts +6 -0
  119. package/dist/compositions/product-specifications-selector/product-specifications-selector.d.ts +14 -0
  120. package/dist/compositions/sidebar/sidebar-group.d.ts +4 -0
  121. package/dist/compositions/sidebar/sidebar-menu-button.d.ts +11 -0
  122. package/dist/compositions/sidebar/sidebar-menu-sub.d.ts +4 -0
  123. package/dist/compositions/sidebar/sidebar-trigger.d.ts +2 -0
  124. package/dist/compositions/variant-selector/variant-selector-item.d.ts +1 -0
  125. package/dist/data/docs-manifest.js +580 -32
  126. package/dist/utils/with-test-id.d.ts +1 -0
  127. package/package.json +2 -1
@@ -14,7 +14,16 @@ interface SiblingWithAttributes {
14
14
  variantAttributes: VariantAttributes | null;
15
15
  }
16
16
  export interface ProductSpecificationsSelectorProps {
17
+ /**
18
+ * The current selection, keyed by filter key (`"color"` for `colorName`, otherwise the
19
+ * dimension name such as `"finish"`) to the selected option's `value`, or `null` for none.
20
+ */
17
21
  filters: Record<string, string | null>;
22
+ /**
23
+ * Called when an option is picked, with the filter key and the option's `value`;
24
+ * picking the selected option again sends `null` to clear it. When `onSiblingSelect` and
25
+ * `siblingsWithAttributes` find a matching sibling, that fires instead.
26
+ */
18
27
  onFilterChange: (key: string, value: string | null) => void;
19
28
  /** Callback when a sibling is selected (fallback variant selection) */
20
29
  onSiblingSelect?: (siblingId: string) => void;
@@ -26,6 +35,11 @@ export interface ProductSpecificationsSelectorProps {
26
35
  siblings?: Sibling[];
27
36
  /** Full sibling data with variant attributes for computing compatible options on hover */
28
37
  siblingsWithAttributes?: SiblingWithAttributes[];
38
+ /**
39
+ * The options on offer per dimension (`colorName`, `pattern`, `finish`, `size`, `width`,
40
+ * `length`, `substrate`, `finishType`). Each present dimension becomes one field, ordered
41
+ * with colourways first; an option with `available: false` is shown as unavailable.
42
+ */
29
43
  variantOptions: VariantOptions;
30
44
  }
31
45
  /**
@@ -7,6 +7,10 @@ export declare const SidebarGroup: ({ className, ...props }: React.ComponentProp
7
7
  export declare const SidebarGroupLabel: ({ className, render, ...props }: useRender.ComponentProps<"div">) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
8
8
  /** Icon button pinned to a group's top-right corner (defaults to a `+`); hidden when collapsed unless `showWhenCollapsed`. */
9
9
  export declare const SidebarGroupAction: ({ className, icon, size, radius, emphasis, showWhenCollapsed, ...props }: React.ComponentProps<typeof Button> & {
10
+ /** Size token, as on Button. @default "icon-sm" */
11
+ size?: React.ComponentProps<typeof Button>["size"];
12
+ /** Visual weight, as on Button. @default "ghost" */
13
+ emphasis?: React.ComponentProps<typeof Button>["emphasis"];
10
14
  /** Show the action button even when sidebar is collapsed */
11
15
  showWhenCollapsed?: boolean;
12
16
  }) => React.JSX.Element;
@@ -10,16 +10,27 @@ type SidebarMenuButtonProps = Omit<useRender.ComponentProps<"button">, "children
10
10
  tooltip?: string | React.ComponentProps<typeof TooltipContent>;
11
11
  /** Control tooltip visibility. Use `false` to hide tooltip (e.g., when a dropdown is open). */
12
12
  tooltipOpen?: boolean;
13
+ /**
14
+ * Row height and text size. Use `"xl"` in an icon-collapsible sidebar so the collapsed square centres on the rail.
15
+ * @default "base"
16
+ */
13
17
  size?: ComponentSize;
18
+ /**
19
+ * Surface treatment: `"input"` uses the sidebar's accent fill on hover and when active, `"default"` the standard accent tint, `"outline"` adds a ring.
20
+ * @default "input"
21
+ */
14
22
  variant?: "default" | "input" | "outline";
23
+ /** Leading icon component. When the sidebar collapses to the rail it is the only thing shown, unless `collapsedIcon` or `collapsedContent` replaces it. */
15
24
  icon?: IconComponent;
16
25
  /** Icon to show when sidebar is collapsed (overrides icon) */
17
26
  collapsedIcon?: IconComponent;
18
27
  /** Custom content to show when sidebar is collapsed (e.g., Avatar). Takes precedence over collapsedIcon. */
19
28
  collapsedContent?: React.ReactNode;
29
+ /** Trailing icon component, such as a chevron for a submenu. Replaces the `kbd` hint when both are set, and hides when the sidebar collapses. */
20
30
  suffixIcon?: IconComponent;
21
31
  /** Keep label/suffix visible even when the sidebar provider is collapsed. */
22
32
  forceExpanded?: boolean;
33
+ /** Keyboard shortcut keys shown as keycaps at the end of the row, one string per key (e.g. `["⌘", "K"]`). Hidden when collapsed or when `suffixIcon` is set. */
23
34
  kbd?: string[];
24
35
  children?: React.ReactNode;
25
36
  };
@@ -26,6 +26,10 @@ type SidebarMenuSubButtonProps = Omit<MenuItemProps, "icon" | "dot"> & {
26
26
  icon?: IconComponent;
27
27
  /** Additional className for the icon */
28
28
  iconClassName?: string;
29
+ /** Row size, as on MenuItem. @default "xl" */
30
+ size?: MenuItemProps["size"];
31
+ /** Row style, as on MenuItem. @default "input" */
32
+ variant?: MenuItemProps["variant"];
29
33
  };
30
34
  /**
31
35
  * SidebarMenuSubButton UI component.
@@ -4,6 +4,8 @@ import type { IconComponent } from "../../tokens/icon-component.js";
4
4
  type SidebarTriggerProps = Omit<React.ComponentProps<typeof Button>, "icon"> & {
5
5
  /** Icon to display. Defaults to PanelLeftCloseIcon. */
6
6
  icon?: IconComponent;
7
+ /** Visual weight, as on Button. @default "ghost" */
8
+ emphasis?: React.ComponentProps<typeof Button>["emphasis"];
7
9
  };
8
10
  /** Icon button that toggles the sidebar open/collapsed via {@link useSidebar}; must render inside a {@link SidebarProvider}. Any `onClick` runs before the toggle. */
9
11
  export declare const SidebarTrigger: ({ className, emphasis, onClick, icon, ...props }: SidebarTriggerProps) => React.JSX.Element;
@@ -8,6 +8,7 @@ export interface VariantSelectorItemProps {
8
8
  disabled?: boolean;
9
9
  /** Whether this option is highlighted (compatible with a hovered unavailable option) */
10
10
  highlighted?: boolean;
11
+ /** Picture shown inside the tile, such as an `<img>` of the variant; omit it for a plain `color` tile. */
11
12
  image?: ReactNode;
12
13
  /** Label text */
13
14
  label: string;