@sanity/ui 5.0.0-alpha.26 → 5.0.0-alpha.28
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/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/docs/components/box.dsds.yaml +2 -2
- package/docs/components/button.dsds.yaml +4 -3
- package/docs/components/card.dsds.yaml +1 -1
- package/docs/components/dialog.dsds.yaml +2 -2
- package/docs/components/divider.dsds.yaml +1 -1
- package/docs/components/flex.dsds.yaml +1 -1
- package/docs/components/grid.dsds.yaml +3 -3
- package/docs/components/h-stack.dsds.yaml +1 -1
- package/docs/components/icon-button.dsds.yaml +1 -1
- package/docs/components/indicator-stack.dsds.yaml +1 -1
- package/docs/components/indicator.dsds.yaml +2 -1
- package/docs/components/list-item-button.dsds.yaml +150 -0
- package/docs/components/list-item-image.dsds.yaml +6 -3
- package/docs/components/list-item.dsds.yaml +51 -66
- package/docs/components/list.dsds.yaml +26 -30
- package/docs/components/popover.dsds.yaml +3 -3
- package/docs/components/press-area.dsds.yaml +3 -3
- package/docs/components/search-input.dsds.yaml +115 -0
- package/docs/components/select.dsds.yaml +1 -1
- package/docs/components/tabs-panel.dsds.yaml +1 -1
- package/docs/components/tooltip.dsds.yaml +1 -1
- package/docs/components/v-stack.dsds.yaml +3 -2
- package/docs/components/visually-hidden.dsds.yaml +1 -1
- package/docs/foundations/color-guidelines.dsds.yaml +6 -6
- package/docs/index.dsds.yaml +20 -19
- package/docs/overview/api-essentials.dsds.yaml +2 -2
- package/docs/overview/component-reference.dsds.yaml +4 -4
- package/docs/overview/quick-start.dsds.yaml +1 -0
- package/docs/patterns/confirmation-dialogs.dsds.yaml +3 -3
- package/docs/patterns/layouts.dsds.yaml +8 -7
- package/docs/patterns/navigation.dsds.yaml +37 -37
- package/docs/patterns/responsive.dsds.yaml +1 -1
- package/docs/tokens/dtcg/README.md +4 -4
- package/docs/tokens/dtcg/css/color.css +1 -1
- package/docs/tokens/dtcg/css/semantic.css +7 -7
- package/docs/tokens/dtcg/json/color.tokens.json +2 -2
- package/docs/tokens/dtcg/json/semantic.tokens.json +18 -21
- package/package.json +2 -2
- package/src/components/tabs/tabs.css +1 -1
- package/src/utils/getProps.test.ts +22 -0
- package/src/utils/getProps.ts +5 -1
- package/src/version.ts +2 -2
- package/docs/components/list-button-item.dsds.yaml +0 -103
- package/docs/components/list-item-text.dsds.yaml +0 -80
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
kind: component
|
|
2
|
-
id: list-item-text
|
|
3
|
-
name: List.ItemText
|
|
4
|
-
description: The text content slot inside a List.Item.
|
|
5
|
-
metadata:
|
|
6
|
-
tags: [list, item, text, title, subtitle]
|
|
7
|
-
status:
|
|
8
|
-
status: beta
|
|
9
|
-
sections:
|
|
10
|
-
- kind: guidelines
|
|
11
|
-
for: all
|
|
12
|
-
framing: how-to-use
|
|
13
|
-
items:
|
|
14
|
-
- level: should
|
|
15
|
-
statement: Keep titles short — they are clamped to one line.
|
|
16
|
-
- level: must-not
|
|
17
|
-
statement: Don't use List.ItemText outside of List.Item. It relies on the flex layout of the parent row.
|
|
18
|
-
- kind: guidelines
|
|
19
|
-
for: agent
|
|
20
|
-
framing: how-to-use
|
|
21
|
-
items:
|
|
22
|
-
- refs:
|
|
23
|
-
- to: list#subcomponents-not-named-exports
|
|
24
|
-
rel: same-as
|
|
25
|
-
- level: must-not
|
|
26
|
-
statement: Do not wrap title or subtitle in a Text component — List.ItemText applies sizing, weight, and truncation internally.
|
|
27
|
-
- kind: guidelines
|
|
28
|
-
for: all
|
|
29
|
-
title: Content
|
|
30
|
-
tags: [content]
|
|
31
|
-
items:
|
|
32
|
-
- refs:
|
|
33
|
-
- to: content-guidelines#sentence-case-all-system-set
|
|
34
|
-
rel: same-as
|
|
35
|
-
- kind: section
|
|
36
|
-
for: agent
|
|
37
|
-
freeform:
|
|
38
|
-
- title: Examples
|
|
39
|
-
body: |-
|
|
40
|
-
List.ItemText renders a two-line label block with built-in styling.
|
|
41
|
-
|
|
42
|
-
```tsx
|
|
43
|
-
// ✓ — ItemText applies size, weight, and truncation internally
|
|
44
|
-
<List.ItemText title="My document" subtitle="Last edited 2 hours ago" />
|
|
45
|
-
|
|
46
|
-
// ✗ — wrapping in Text adds conflicting styles
|
|
47
|
-
<List.ItemText
|
|
48
|
-
title={<Text size={1} weight="medium">My document</Text>}
|
|
49
|
-
subtitle="..."
|
|
50
|
-
/>
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
Both `title` and `subtitle` accept `React.ReactNode`, so you can pass a `Badge` or `Icon` when needed. Keep the value short — both lines are clamped to one line (`truncate={1}`).
|
|
54
|
-
|
|
55
|
-
refs:
|
|
56
|
-
- href: https://www.figma.com/design/5mhVqXlldJEEB2VWZeKQ4i/Sanity-UI?node-id=32249-547
|
|
57
|
-
rel: design
|
|
58
|
-
role: Figma component (v5)
|
|
59
|
-
- to: list-item
|
|
60
|
-
rel: relates-to
|
|
61
|
-
note: The parent row
|
|
62
|
-
- to: list
|
|
63
|
-
rel: relates-to
|
|
64
|
-
note: The root list component — see **List** for full compound component docs
|
|
65
|
-
- to: tooltip
|
|
66
|
-
rel: relates-to
|
|
67
|
-
note: Use to reveal full text when a title is truncated
|
|
68
|
-
sourceFiles:
|
|
69
|
-
- platform: react
|
|
70
|
-
file: packages/ui/src/components/list/List.tsx
|
|
71
|
-
imports:
|
|
72
|
-
- platform: react
|
|
73
|
-
code: import { List } from '@sanity/ui'
|
|
74
|
-
package: '@sanity/ui'
|
|
75
|
-
|
|
76
|
-
$extensions:
|
|
77
|
-
com.sanity.ui:
|
|
78
|
-
implementationStatus:
|
|
79
|
-
context: Implementation status. Lets a tool tell a component that is coming from one that does not exist, without parsing the status note.
|
|
80
|
-
implemented: true
|