@zvoove/unity-ui 2.33.0 → 2.34.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/dist/bin/cli.mjs CHANGED
@@ -3778,11 +3778,19 @@ function generateRulesContent() {
3778
3778
  - NEVER pass \`className\` or \`style\` to ANY Unity UI component \u2014 use their props API only; put token-based Tailwind on native HTML wrappers (\`div\`, \`section\`, etc.) when you need extra layout or chrome
3779
3779
  - Stack \`align\` defaults to \`baseline\` \u2014 always set \`align\` explicitly when centering or stretching is needed
3780
3780
  - Stack with a Divider needs \`width="100%"\` \u2014 otherwise the divider will not span the full container width
3781
+ - Stack with \`justify="space-between"\` (or any space distribution): the last child must have \`width="fit-content"\` \u2014 without it the child stretches to fill remaining space and the spacing effect is lost
3781
3782
  - Use Stack and Grid for layout \u2014 do not use Card, div, or CSS for layout
3782
3783
  - Card is a visual container, NOT a layout tool \u2014 use Stack/Grid INSIDE a Card
3783
3784
  - Use Typography for all text \u2014 never use raw \`<p>\`, \`<h1>\`, \`<span>\` etc.
3784
3785
  - Use the spacing scale for gap/padding/margin \u2014 never use arbitrary pixel values
3785
3786
  - Icons use semantic names as strings (e.g., \`"search"\`, \`"delete"\`, \`"edit"\`) \u2014 never import Phosphor icon components directly
3787
+ - Use \`List\` for any vertical sequence of rows \u2014 search results, activity feeds, notification lists, inbox items, dashboard widgets. Do NOT build this with \`Stack\` + manual \`Divider\` loops. Each item's \`content\` prop accepts any \`ReactNode\`, so rich layouts (icon + text + badge, avatar + metadata + action) all fit inside \`List\`
3788
+ - \`List\` items have horizontal padding (\`pl-sm pr-sm\`) on the row wrapper. If the design calls for additional horizontal inset on the content Stack (e.g. to align with card edges), add only \`padding={{ left: 'sm', right: 'sm' }}\` on the content Stack \u2014 **never top/bottom padding**, as vertical spacing is handled by \`spread\`
3789
+ - Section titles and header actions (e.g. "\u2192 Alle") belong OUTSIDE the \`Card\` that wraps list content \u2014 the \`Card\` contains only the list itself
3790
+ - Always add the \`interactive\` prop to \`Card\` whenever it has a link, \`onClick\`, or any click/keyboard interaction \u2014 this enables the correct hover and focus states
3791
+ - **Gap vs Padding**: Use \`Stack\` with \`gap\` to separate sibling elements from each other. Use \`padding\` only to add space between an element and its container boundary. Never use \`padding\` on a child element to create distance between siblings \u2014 that creates asymmetric spacing and fights with the container's own padding
3792
+ - **Always verify props before using them**: Before passing any prop to a Unity UI component, confirm it exists in the component's TypeScript type (e.g. \`ButtonProps\`, \`GridItemProps\`). Do NOT assume a prop exists because it exists on a similar component or seems logical. When in doubt, read the type definition or run a grep. Known traps: \`Button\` has no \`iconPosition\` prop; \`Grid.Item\` has no \`height\` prop (only \`Grid\` does)
3793
+ - **No markdown tables in MDX files**: Storybook uses MDX2/3 which does NOT support GitHub Flavored Markdown tables. Never use \`| col | col |\` pipe-table syntax in \`.mdx\` files \u2014 it will not render. Use HTML \`<table>\` elements instead. Markdown tables are fine in \`.md\` files (rules, profiles, skills) since those are only read by AI agents, not rendered by Storybook
3786
3794
 
3787
3795
  ## Skill Routing
3788
3796
 
@@ -3856,6 +3864,49 @@ Load the matching skill for full props, examples, and rules:
3856
3864
  | useClickOutside | \`unity-ui-use-click-outside\` |
3857
3865
 
3858
3866
  > If unsure which component to use, load \`unity-ui-index\` for the full equivalence table (shadcn/ui \u2192 Unity UI).
3867
+
3868
+ ## Component Aliases
3869
+
3870
+ When a component is requested by a name not listed above, resolve it using this table before doing anything else. If you find a match, use the Unity UI component \u2014 never recreate it.
3871
+
3872
+ | If asked for... | Use Unity UI component |
3873
+ |-----------------|------------------------|
3874
+ | Drawer, Side panel, Flyout, Slide-over, Panel, Offcanvas | **Sheet** |
3875
+ | Input, TextInput, FormInput, InputField, TextBox, Text field | **TextField** |
3876
+ | MultilineInput, TextareaInput, Multi-line text | **Textarea** |
3877
+ | Modal, Popup, Overlay, Alert dialog, Modal dialog, Lightbox | **Dialog** |
3878
+ | Dropdown, ComboBox, Picker, DropdownSelect, DropDown, Select input | **Select** |
3879
+ | Toast, Notification, Alert (temporary/dismissible) | **Snackbar** |
3880
+ | Header, AppBar, Navbar, Navigation bar, Toolbar, App header, Top navigation | **TopBar** |
3881
+ | Sidebar, Side menu, Nav, Navigation drawer, NavBar, Left nav | **SideNavigation** |
3882
+ | Spinner, Loader, Loading indicator, Loading spinner, Busy indicator | **ProgressIndicator** |
3883
+ | Context menu, Action menu, Kebab menu, More menu, Dropdown menu, Options menu | **PopUpMenu** |
3884
+ | Alert (inline/persistent), Warning banner, Info banner, Notice, Callout, Inline alert | **InfoBox** |
3885
+ | Collapsible, Collapse, CollapsePanel, Disclosure (single item) | **Expandable** |
3886
+ | Collapsible list, Expandable list, Collapsible sections (multiple items) | **Accordion** |
3887
+ | Segmented control, Button group, Toggle group, Radio tabs, Tab buttons | **Segment / SegmentGroup** |
3888
+ | File upload, Drop zone, Dropzone, File picker, Attachment uploader | **Uploader** |
3889
+ | Toggle, Toggle switch | **Switch** |
3890
+ | Date input, Date field, Calendar picker | **DatePicker** |
3891
+ | Shimmer, Loading placeholder, Content placeholder | **Skeleton** |
3892
+ | Confirm dialog, Confirmation panel, Confirm card, Delete confirmation | **ConfirmationCard** |
3893
+ | Profile picture, User icon, Profile icon, User avatar, Initials avatar | **Avatar / AvatarGroup** |
3894
+ | Hint, Help tooltip, Popover (read-only), Info bubble | **Tooltip** |
3895
+ | Breadcrumb, Path, Navigation path, Crumbs | **Breadcrumbs** |
3896
+ | Indicator, Status badge, Notification badge, Dot indicator, Counter badge | **Badge** |
3897
+ | Filter chip, Choice chip, Action chip, Removable tag | **Chip** |
3898
+ | Label tag, Status tag, Status label, Category label | **Tag** |
3899
+ | Flexbox container, HStack, VStack, Flex, Box | **Stack** |
3900
+ | Grid layout, CSS grid, Masonry (equal columns) | **Grid** |
3901
+ | Menu list, Navigation list, Action list, Vertical menu | **ListMenu** |
3902
+ | Tab navigation, Sub navigation, Section tabs, Tab bar (secondary) | **MidSectionMenus** |
3903
+ | Content section, Page section, Content container, Content area | **ContentBlock** |
3904
+ | Label, Field label, Input label, Form label | **FormLabel** |
3905
+ | Pager, Page navigation, Page controls | **Pagination** |
3906
+ | Tab bar, Tab panel, Tabbed interface | **Tabs** |
3907
+ | Separator, Horizontal rule, HR | **Divider** |
3908
+ | Code, Syntax highlighter, Code snippet | **CodeBlock** |
3909
+ | Text, Paragraph, Heading, Label text, Caption | **Typography** |
3859
3910
  `;
3860
3911
  }
3861
3912
  async function runRules({ output: outputDir } = {}) {
package/dist/theme.css CHANGED
@@ -908,3 +908,20 @@
908
908
  font-family: 'Source Sans 3', sans-serif;
909
909
  }
910
910
  }
911
+
912
+ @layer components {
913
+ .chat-container {
914
+ container-type: inline-size;
915
+ }
916
+
917
+ @container (max-width: 480px) {
918
+ [data-testid='chat-bubble'] {
919
+ grid-template-columns: 1fr;
920
+ --chat-content-measure: 90%;
921
+ }
922
+
923
+ [data-testid='chat-bubble'] > [data-slot='avatar'] {
924
+ display: none;
925
+ }
926
+ }
927
+ }