@duro-app/ui 5.20.0 → 5.22.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/Table-Cw1B14R3.js.map +1 -1
- package/dist/components/CodeBlock/CodeBlock.d.ts +3 -21
- package/dist/components/CodeBlock/CodeBlock.d.ts.map +1 -1
- package/dist/components/CodeBlock/CodeBlock.stories.d.ts +4 -0
- package/dist/components/CodeBlock/CodeBlock.stories.d.ts.map +1 -1
- package/dist/components/CodeBlock/DiffLines.d.ts +9 -0
- package/dist/components/CodeBlock/DiffLines.d.ts.map +1 -0
- package/dist/components/CodeBlock/diffRoles.d.ts +14 -0
- package/dist/components/CodeBlock/diffRoles.d.ts.map +1 -0
- package/dist/components/CodeBlock/styles.css.d.ts +24 -0
- package/dist/components/CodeBlock/styles.css.d.ts.map +1 -1
- package/dist/components/CodeBlock/types.d.ts +29 -0
- package/dist/components/CodeBlock/types.d.ts.map +1 -0
- package/dist/components/Drawer/touchInput.d.ts +5 -1
- package/dist/components/Drawer/touchInput.d.ts.map +1 -1
- package/dist/components/Heading/Heading.d.ts +10 -2
- package/dist/components/Heading/Heading.d.ts.map +1 -1
- package/dist/components/Heading/Heading.meta.d.ts.map +1 -1
- package/dist/components/Heading/Heading.stories.d.ts +5 -0
- package/dist/components/Heading/Heading.stories.d.ts.map +1 -1
- package/dist/components/Prose/Prose.d.ts +1 -1
- package/dist/components/SplitPane/SplitPane.d.ts +10 -1
- package/dist/components/SplitPane/SplitPane.d.ts.map +1 -1
- package/dist/components/SplitPane/SplitPane.stories.d.ts +11 -0
- package/dist/components/SplitPane/SplitPane.stories.d.ts.map +1 -1
- package/dist/components/SplitPane/styles.css.d.ts +22 -0
- package/dist/components/SplitPane/styles.css.d.ts.map +1 -1
- package/dist/components/Textarea/Textarea.d.ts +14 -2
- package/dist/components/Textarea/Textarea.d.ts.map +1 -1
- package/dist/components/Textarea/Textarea.meta.d.ts.map +1 -1
- package/dist/components/Textarea/Textarea.stories.d.ts +2 -0
- package/dist/components/Textarea/Textarea.stories.d.ts.map +1 -1
- package/dist/components/Textarea/autoGrow.d.ts +22 -0
- package/dist/components/Textarea/autoGrow.d.ts.map +1 -0
- package/dist/components/Textarea/grow.css.d.ts +12 -0
- package/dist/components/Textarea/grow.css.d.ts.map +1 -0
- package/dist/components/Textarea/grow.d.ts +2 -0
- package/dist/components/Textarea/grow.d.ts.map +1 -0
- package/dist/components/Textarea/native.css.d.ts +8 -0
- package/dist/components/Textarea/native.css.d.ts.map +1 -0
- package/dist/components/Textarea/useAutoGrowFallback.d.ts +9 -0
- package/dist/components/Textarea/useAutoGrowFallback.d.ts.map +1 -0
- package/dist/components/Toolbar/Toolbar.d.ts +2 -14
- package/dist/components/Toolbar/Toolbar.d.ts.map +1 -1
- package/dist/components/Toolbar/types.d.ts +15 -0
- package/dist/components/Toolbar/types.d.ts.map +1 -0
- package/dist/components/VirtualList/VirtualList.d.ts +5 -26
- package/dist/components/VirtualList/VirtualList.d.ts.map +1 -1
- package/dist/components/VirtualList/VirtualList.meta.d.ts.map +1 -1
- package/dist/components/VirtualList/VirtualList.stories.d.ts +16 -0
- package/dist/components/VirtualList/VirtualList.stories.d.ts.map +1 -1
- package/dist/components/VirtualList/native.css.d.ts +14 -0
- package/dist/components/VirtualList/native.css.d.ts.map +1 -0
- package/dist/components/VirtualList/props.d.ts +31 -0
- package/dist/components/VirtualList/props.d.ts.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4007 -3767
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/components/CodeBlock/CodeBlock.meta.ts +1 -1
- package/src/components/CodeBlock/CodeBlock.native.tsx +33 -0
- package/src/components/CodeBlock/CodeBlock.stories.tsx +54 -0
- package/src/components/CodeBlock/CodeBlock.tsx +8 -20
- package/src/components/CodeBlock/DiffLines.tsx +32 -0
- package/src/components/CodeBlock/diffRoles.ts +40 -0
- package/src/components/CodeBlock/styles.css.ts +17 -0
- package/src/components/CodeBlock/types.ts +29 -0
- package/src/components/Drawer/touchInput.ts +16 -2
- package/src/components/Heading/Heading.meta.ts +6 -3
- package/src/components/Heading/Heading.stories.tsx +45 -0
- package/src/components/Heading/Heading.tsx +51 -11
- package/src/components/Prose/Prose.meta.ts +1 -1
- package/src/components/Prose/Prose.native.tsx +23 -0
- package/src/components/Prose/Prose.tsx +1 -1
- package/src/components/Prose/styles.native.css.ts +15 -0
- package/src/components/SplitPane/SplitPane.meta.ts +1 -1
- package/src/components/SplitPane/SplitPane.native.tsx +4 -0
- package/src/components/SplitPane/SplitPane.stories.tsx +207 -1
- package/src/components/SplitPane/SplitPane.tsx +50 -7
- package/src/components/SplitPane/styles.css.ts +28 -0
- package/src/components/Text/Text.meta.ts +2 -2
- package/src/components/Textarea/Textarea.meta.ts +6 -2
- package/src/components/Textarea/Textarea.stories.tsx +136 -1
- package/src/components/Textarea/Textarea.tsx +50 -3
- package/src/components/Textarea/autoGrow.ts +33 -0
- package/src/components/Textarea/grow.css.ts +18 -0
- package/src/components/Textarea/grow.native.ts +1 -0
- package/src/components/Textarea/grow.ts +1 -0
- package/src/components/Textarea/native.css.ts +16 -0
- package/src/components/Textarea/useAutoGrowFallback.native.ts +5 -0
- package/src/components/Textarea/useAutoGrowFallback.ts +35 -0
- package/src/components/Toolbar/Toolbar.meta.ts +1 -1
- package/src/components/Toolbar/Toolbar.native.tsx +27 -0
- package/src/components/Toolbar/Toolbar.tsx +3 -14
- package/src/components/Toolbar/types.ts +15 -0
- package/src/components/VirtualList/VirtualList.meta.ts +2 -1
- package/src/components/VirtualList/VirtualList.native.tsx +80 -0
- package/src/components/VirtualList/VirtualList.stories.tsx +171 -1
- package/src/components/VirtualList/VirtualList.tsx +116 -27
- package/src/components/VirtualList/native.css.ts +14 -0
- package/src/components/VirtualList/props.ts +31 -0
- package/src/docs/Typography.mdx +19 -15
- package/src/index.native.ts +8 -1
- package/src/index.ts +1 -1
package/src/docs/Typography.mdx
CHANGED
|
@@ -55,12 +55,15 @@ Presets compose scale tokens + weight + tracking into named styles via `typePres
|
|
|
55
55
|
|
|
56
56
|
### Heading
|
|
57
57
|
|
|
58
|
-
| Preset | Size | Weight | Tracking
|
|
59
|
-
| ----------- | ----- | -------- |
|
|
60
|
-
| `headingSm` | 20/28 | Semibold | Tight
|
|
61
|
-
| `headingMd` | 24/32 | Semibold | Tight
|
|
62
|
-
| `headingLg` | 30/36 | Bold | Tight
|
|
63
|
-
| `headingXl` | 36/44 | Bold | Tight
|
|
58
|
+
| Preset | Size | Weight | Tracking |
|
|
59
|
+
| ----------- | ----- | -------- | -------------------------------------------------------- |
|
|
60
|
+
| `headingSm` | 20/28 | Semibold | Tight |
|
|
61
|
+
| `headingMd` | 24/32 | Semibold | Tight |
|
|
62
|
+
| `headingLg` | 30/36 | Bold | Tight |
|
|
63
|
+
| `headingXl` | 36/44 | Bold | Tight |
|
|
64
|
+
| `overline` | 12/16 | Semibold | Wide, uppercase (`overlineMd` 14/20, `overlineLg` 16/24) |
|
|
65
|
+
|
|
66
|
+
`Heading` picks a preset from two props: `variant` (`heading`, `display`, `overline`) and `size` (`sm`, `md`, `lg`, `xl`). `<Heading level={3} variant="overline" size="lg">` is a group title at 16/24. Without `size`, a heading takes its level's size, a display title `md` and an overline `sm`.
|
|
64
67
|
|
|
65
68
|
### Display (fluid)
|
|
66
69
|
|
|
@@ -82,12 +85,13 @@ See the **Fluid Display** story for a resizable demo.
|
|
|
82
85
|
|
|
83
86
|
## When to use which layer
|
|
84
87
|
|
|
85
|
-
| Scenario | Use
|
|
86
|
-
| ---------------------------------------------- |
|
|
87
|
-
| Body text in a page or card | `<Text variant="bodyMd">`
|
|
88
|
-
| Section heading | `<Heading level={2}>`
|
|
89
|
-
|
|
|
90
|
-
|
|
|
91
|
-
|
|
|
92
|
-
|
|
|
93
|
-
|
|
|
88
|
+
| Scenario | Use |
|
|
89
|
+
| ---------------------------------------------- | ------------------------------------------------- |
|
|
90
|
+
| Body text in a page or card | `<Text variant="bodyMd">` |
|
|
91
|
+
| Section heading | `<Heading level={2}>` |
|
|
92
|
+
| Group title over a list of rows | `<Heading level={3} variant="overline">` |
|
|
93
|
+
| Hero or landing page title | `<Heading level={1} variant="display" size="lg">` |
|
|
94
|
+
| Form label | `<Text variant="label">` |
|
|
95
|
+
| Inline code | `<Text variant="code">` |
|
|
96
|
+
| Custom component needing raw font size | `typeScale.fontSize4` token |
|
|
97
|
+
| Composing a one-off style with preset defaults | `typePresets.bodyMd` in `css.create()` |
|
package/src/index.native.ts
CHANGED
|
@@ -20,13 +20,18 @@ export {Badge, type BadgeVariant, type BadgeSize} from './components/Badge/Badge
|
|
|
20
20
|
export {Button, type ButtonVariant, type ButtonSize} from './components/Button/Button'
|
|
21
21
|
export {Card, type CardVariant, type CardSize} from './components/Card/Card'
|
|
22
22
|
export {Checkbox} from './components/Checkbox/Checkbox'
|
|
23
|
-
export {Heading, type HeadingVariant} from './components/Heading/Heading'
|
|
23
|
+
export {Heading, type HeadingSize, type HeadingVariant} from './components/Heading/Heading'
|
|
24
24
|
export {Input, type InputVariant} from './components/Input/Input'
|
|
25
25
|
export {Switch} from './components/Switch/Switch'
|
|
26
26
|
export {Text, type TextVariant, type TextColor} from './components/Text/Text'
|
|
27
27
|
export {TextLink, type TextLinkVariant} from './components/TextLink/TextLink'
|
|
28
28
|
export {Textarea, type TextareaVariant} from './components/Textarea/Textarea'
|
|
29
29
|
|
|
30
|
+
// Text and layout
|
|
31
|
+
export {CodeBlock, type CodeBlockProps} from './components/CodeBlock/CodeBlock'
|
|
32
|
+
export {Prose} from './components/Prose/Prose'
|
|
33
|
+
export {Toolbar, type ToolbarProps} from './components/Toolbar/Toolbar'
|
|
34
|
+
|
|
30
35
|
// Form field wrappers (RN-safe — used by Input/Textarea/Checkbox)
|
|
31
36
|
export {Field} from './components/Field/Field'
|
|
32
37
|
export {InputGroup} from './components/InputGroup/InputGroup'
|
|
@@ -57,6 +62,8 @@ export {Tree} from './components/Tree/Tree'
|
|
|
57
62
|
export {Select} from './components/Select/Select'
|
|
58
63
|
export {Combobox} from './components/Combobox/Combobox'
|
|
59
64
|
export {Listbox} from './components/Listbox/Listbox'
|
|
65
|
+
// A FlatList with the web props; prepend keeps position.
|
|
66
|
+
export {VirtualList, type VirtualListProps} from './components/VirtualList/VirtualList'
|
|
60
67
|
// The platform's own scroll indicator: Scrollbar and Thumb draw nothing.
|
|
61
68
|
export {ScrollArea} from './components/ScrollArea/ScrollArea'
|
|
62
69
|
export type {ListboxAnchorProps, ListboxMaxHeight} from './components/Listbox/Listbox'
|
package/src/index.ts
CHANGED
|
@@ -56,7 +56,7 @@ export {
|
|
|
56
56
|
type SnapPoint,
|
|
57
57
|
} from './components/Drawer/Drawer'
|
|
58
58
|
export {EmptyState} from './components/EmptyState/EmptyState'
|
|
59
|
-
export {Heading, type HeadingVariant} from './components/Heading/Heading'
|
|
59
|
+
export {Heading, type HeadingSize, type HeadingVariant} from './components/Heading/Heading'
|
|
60
60
|
export {List, type ListSelectionMode} from './components/List/List'
|
|
61
61
|
export {LiveRegion, type LiveRegionPoliteness} from './components/LiveRegion/LiveRegion'
|
|
62
62
|
export {Field} from './components/Field/Field'
|