@sableui/react 0.1.0 → 0.2.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 +66 -0
- package/dist/{_contract-CYScOdf5.d.ts → _contract-o3tUc8Ig.d.ts} +1 -1
- package/dist/{chunk-J23ELQQZ.js → chunk-AOWBYEQ6.js} +4177 -1917
- package/dist/{chunk-RWP4XBSK.js → chunk-KFZ43RKU.js} +1 -1
- package/dist/{chunk-JI7WJP2L.js → chunk-X276MF2W.js} +5 -0
- package/dist/foundations/index.js +1 -1
- package/dist/index.d.ts +155 -101
- package/dist/index.js +582 -2778
- package/dist/ios/index.d.ts +6 -1
- package/dist/ios/index.js +4 -4
- package/dist/ios/preview.js +1 -1
- package/dist/ios/styles.css +20 -6
- package/dist/patterns/index.js +1683 -469
- package/dist/presets/index.d.ts +1 -1
- package/dist/presets/index.js +1 -1
- package/dist/styles.css +238 -40
- package/dist/{theme-provider-BWcizhAt.d.ts → theme-provider-BE-KqUG-.d.ts} +1 -1
- package/dist/themes/atelier/atelier.css +3 -0
- package/dist/themes/atelier/index.d.ts +1 -1
- package/dist/themes/base/base.css +11 -4
- package/dist/themes/base/index.d.ts +1 -1
- package/dist/themes/ember/ember.css +3 -0
- package/dist/themes/ember/index.d.ts +1 -1
- package/dist/themes/index.d.ts +2 -2
- package/dist/themes/meridian/index.d.ts +1 -1
- package/dist/themes/meridian/meridian.css +10 -5
- package/dist/themes/poppy/index.d.ts +1 -1
- package/dist/themes/poppy/poppy.css +16 -0
- package/dist/themes/prism/index.d.ts +1 -1
- package/dist/themes/prism/prism.css +4 -1
- package/dist/themes/verdant/index.d.ts +1 -1
- package/dist/themes/verdant/verdant.css +7 -2
- package/llms/components/bubble.md +5 -5
- package/llms/components/checkbox-card.md +1 -1
- package/llms/components/context-card.md +2 -2
- package/llms/components/dialog.md +1 -1
- package/llms/components/empty-state.md +4 -4
- package/llms/components/entity.md +1 -1
- package/llms/components/fieldset.md +1 -1
- package/llms/components/kbd.md +18 -6
- package/llms/components/pill.md +1 -1
- package/llms/components/side-nav.md +1 -1
- package/llms/components/skeleton.md +1 -1
- package/llms/components/theme-selector.md +1 -1
- package/llms/foundations/shape.md +1 -1
- package/llms/patterns/auth-page.md +132 -42
- package/llms/patterns/brand-landing-page.md +271 -175
- package/llms/patterns/chat-panel.md +120 -39
- package/llms/patterns/dashboard-page.md +277 -65
- package/llms/patterns/feed-page.md +245 -64
- package/llms/patterns/landing-page.md +473 -75
- package/llms/patterns/list-detail-page.md +385 -68
- package/llms/patterns/settings-page.md +279 -67
- package/llms/reference/token-intent.md +4 -2
- package/llms/reference/utilities.md +20 -5
- package/llms-full.txt +2244 -727
- package/llms.txt +14 -15
- package/package.json +1 -1
- package/registry.json +261 -238
- package/targets/ios.json +4 -15
- package/llms/components/description.md +0 -96
package/targets/ios.json
CHANGED
|
@@ -324,10 +324,9 @@
|
|
|
324
324
|
"components": [
|
|
325
325
|
"Card",
|
|
326
326
|
"CardList",
|
|
327
|
-
"Entity"
|
|
328
|
-
"Description"
|
|
327
|
+
"Entity"
|
|
329
328
|
],
|
|
330
|
-
"guidance": "On a phone a table becomes rows: Entity per record in a CardList, with the detail on a pushed screen (
|
|
329
|
+
"guidance": "On a phone a table becomes rows: Entity per record in a CardList, with the detail on a pushed screen (a `<dl className=\"sable-list-dl\">` for its fields). Keep sorting and filtering the task needs."
|
|
331
330
|
},
|
|
332
331
|
"DatePicker": {
|
|
333
332
|
"source": "DatePicker",
|
|
@@ -338,15 +337,6 @@
|
|
|
338
337
|
],
|
|
339
338
|
"guidance": "Use the Sable component as it is, in the preset. Adapt layout and touch targets to the phone; do not swap in a native lookalike or restyle it."
|
|
340
339
|
},
|
|
341
|
-
"Description": {
|
|
342
|
-
"source": "Description",
|
|
343
|
-
"strategy": "preserve",
|
|
344
|
-
"importFrom": "@sableui/react",
|
|
345
|
-
"components": [
|
|
346
|
-
"Description"
|
|
347
|
-
],
|
|
348
|
-
"guidance": "Use the Sable component as it is, in the preset. Adapt layout and touch targets to the phone; do not swap in a native lookalike or restyle it."
|
|
349
|
-
},
|
|
350
340
|
"DestructiveActionModal": {
|
|
351
341
|
"source": "DestructiveActionModal",
|
|
352
342
|
"strategy": "preserve",
|
|
@@ -864,10 +854,9 @@
|
|
|
864
854
|
"components": [
|
|
865
855
|
"Card",
|
|
866
856
|
"CardList",
|
|
867
|
-
"Entity"
|
|
868
|
-
"Description"
|
|
857
|
+
"Entity"
|
|
869
858
|
],
|
|
870
|
-
"guidance": "On a phone a table becomes rows: Entity per record in a CardList, with the detail on a pushed screen (
|
|
859
|
+
"guidance": "On a phone a table becomes rows: Entity per record in a CardList, with the detail on a pushed screen (a `<dl className=\"sable-list-dl\">` for its fields). Keep sorting and filtering the task needs."
|
|
871
860
|
},
|
|
872
861
|
"Tabs": {
|
|
873
862
|
"source": "Tabs",
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
# Description
|
|
2
|
-
|
|
3
|
-
**Status:** stable
|
|
4
|
-
|
|
5
|
-
A labeled key/value list (definition list). Compose with DescriptionTerm + DescriptionDetail, or the ergonomic DescriptionItem shorthand. Aligns terms and details into a grid; cols="2" packs pairs two-wide.
|
|
6
|
-
|
|
7
|
-
**Keywords:** description list, metadata, details, key value
|
|
8
|
-
|
|
9
|
-
## Usage
|
|
10
|
-
|
|
11
|
-
Use Description to present label-value details where each term needs a clear corresponding value.
|
|
12
|
-
|
|
13
|
-
### Best practices
|
|
14
|
-
|
|
15
|
-
- Do: Use it for object metadata, settings summaries, and read-only record details.
|
|
16
|
-
- Do: Keep terms brief and values scannable so the list works as reference material.
|
|
17
|
-
- Don't: Do not use Description for editable forms; pair Label and form controls instead.
|
|
18
|
-
- Don't: Do not use it for a single key/value. A definition list of one is a labelled value — use a Label and the value, and keep the list semantics for actual lists.
|
|
19
|
-
|
|
20
|
-
### Anatomy
|
|
21
|
-
|
|
22
|
-
| Part | Required | Description |
|
|
23
|
-
| --- | --- | --- |
|
|
24
|
-
| DescriptionItem | yes | One term and detail pair. |
|
|
25
|
-
| DescriptionTerm | yes | The label for the value. |
|
|
26
|
-
| DescriptionDetail | yes | The value or explanatory detail. |
|
|
27
|
-
|
|
28
|
-
## Subcomponents
|
|
29
|
-
|
|
30
|
-
| Name | Type | Description |
|
|
31
|
-
| --- | --- | --- |
|
|
32
|
-
| DescriptionTerm | <dt> props + className | The key. Muted label tier; sits in the first grid column. |
|
|
33
|
-
| DescriptionDetail | <dd> props + tone?: "default" \| "muted" \| "success" \| "warning" \| "destructive" + className | The value. Body tier on the foreground; sits in the second grid column. tone colors the value to encode a status (e.g. Ended → muted, Active → success), replacing inline conditional color classes; defaults to "default". |
|
|
34
|
-
| DescriptionItem | { term: ReactNode; detail?: ReactNode; tone?: "default" \| "muted" \| "success" \| "warning" \| "destructive"; children? } | Ergonomic shorthand for one term/detail pair — renders a DescriptionTerm followed by a DescriptionDetail. Pass the value via detail or children; tone (defaults to "default") colors the detail value the same way it does on DescriptionDetail. |
|
|
35
|
-
|
|
36
|
-
## Props
|
|
37
|
-
|
|
38
|
-
| Name | Type | Default | Description |
|
|
39
|
-
| --- | --- | --- | --- |
|
|
40
|
-
| cols | "1" \| "2" | "1" | Column density. One term/detail column, or two pairs per row once the list's container is at least @md (28rem) wide; narrower, it stays one column. A container query, not a viewport breakpoint, so a narrow card on a wide screen stays one column. With cols="2" the <dl> is wrapped in an @container div. |
|
|
41
|
-
|
|
42
|
-
## Variants
|
|
43
|
-
|
|
44
|
-
- **cols**: 1, 2
|
|
45
|
-
- **tone**: default, muted, success, warning, destructive
|
|
46
|
-
|
|
47
|
-
## Tokens used
|
|
48
|
-
|
|
49
|
-
`muted-foreground`, `foreground`, `success`, `tone-warning`, `destructive`
|
|
50
|
-
|
|
51
|
-
## Accessibility
|
|
52
|
-
|
|
53
|
-
- Renders semantic <dl>/<dt>/<dd> elements so assistive tech announces the term/detail relationship.
|
|
54
|
-
- tone is a visual emphasis only — keep the value text itself meaningful (e.g. "Ended"), never color alone.
|
|
55
|
-
|
|
56
|
-
## Related
|
|
57
|
-
|
|
58
|
-
- Components: Fieldset, Entity
|
|
59
|
-
|
|
60
|
-
## Examples
|
|
61
|
-
|
|
62
|
-
### Metadata list
|
|
63
|
-
|
|
64
|
-
```tsx
|
|
65
|
-
import { Description, DescriptionItem } from "@sableui/react"
|
|
66
|
-
|
|
67
|
-
<Description>
|
|
68
|
-
<DescriptionItem term="Network" detail="Solana" />
|
|
69
|
-
<DescriptionItem term="Supply" detail="100" />
|
|
70
|
-
<DescriptionItem term="Royalty" detail="5%" />
|
|
71
|
-
</Description>
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### Composed term/detail
|
|
75
|
-
|
|
76
|
-
```tsx
|
|
77
|
-
import { Description, DescriptionDetail, DescriptionTerm } from "@sableui/react"
|
|
78
|
-
|
|
79
|
-
<Description>
|
|
80
|
-
<DescriptionTerm>Network</DescriptionTerm>
|
|
81
|
-
<DescriptionDetail>Solana</DescriptionDetail>
|
|
82
|
-
<DescriptionTerm>Contract</DescriptionTerm>
|
|
83
|
-
<DescriptionDetail className="text-mono-sm">7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU</DescriptionDetail>
|
|
84
|
-
</Description>
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
### Toned status value
|
|
88
|
-
|
|
89
|
-
```tsx
|
|
90
|
-
import { Description, DescriptionItem } from "@sableui/react"
|
|
91
|
-
|
|
92
|
-
<Description>
|
|
93
|
-
<DescriptionItem term="Edition" detail="Midnight Archive" />
|
|
94
|
-
<DescriptionItem term="Status" detail={isEnded ? "Ended" : "Active"} tone={isEnded ? "muted" : "success"} />
|
|
95
|
-
</Description>
|
|
96
|
-
```
|