@estiva-app/ui 0.120.0 → 0.122.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/ActivityLine.d.ts.map +1 -1
- package/dist/CollapsibleSection.d.ts.map +1 -1
- package/dist/ListTable.d.ts +4 -2
- package/dist/ListTable.d.ts.map +1 -1
- package/dist/MembersPill.d.ts +7 -1
- package/dist/MembersPill.d.ts.map +1 -1
- package/dist/NavItem.d.ts.map +1 -1
- package/dist/NavTree.d.ts +7 -1
- package/dist/NavTree.d.ts.map +1 -1
- package/dist/SectionHeader.d.ts.map +1 -1
- package/dist/Skeleton.d.ts +1 -1
- package/dist/Skeleton.d.ts.map +1 -1
- package/dist/index.js +32 -16
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
- package/registry.json +16 -3
- package/src/ActivityLine.mdx +3 -1
- package/src/ActivityLine.test.tsx +9 -0
- package/src/ActivityLine.tsx +6 -1
- package/src/CollapsibleSection.mdx +6 -3
- package/src/CollapsibleSection.test.tsx +22 -0
- package/src/CollapsibleSection.tsx +2 -1
- package/src/ListTable.mdx +7 -5
- package/src/ListTable.test.tsx +17 -0
- package/src/ListTable.tsx +12 -9
- package/src/MembersPill.mdx +6 -0
- package/src/MembersPill.stories.tsx +5 -0
- package/src/MembersPill.test.tsx +38 -0
- package/src/MembersPill.tsx +18 -2
- package/src/NavItem.mdx +2 -2
- package/src/NavItem.test.tsx +10 -1
- package/src/NavItem.tsx +9 -4
- package/src/NavTree.mdx +10 -0
- package/src/NavTree.stories.tsx +33 -0
- package/src/NavTree.test.tsx +26 -0
- package/src/NavTree.tsx +9 -2
- package/src/SectionHeader.mdx +3 -3
- package/src/SectionHeader.tsx +2 -1
- package/src/Skeleton.mdx +2 -2
- package/src/Skeleton.tsx +2 -2
- package/src/heights.test.tsx +8 -1
package/src/SectionHeader.tsx
CHANGED
|
@@ -205,7 +205,8 @@ export function SectionHeader({ title, chevron = false, icon, isExpanded = true,
|
|
|
205
205
|
<div
|
|
206
206
|
className={cn(
|
|
207
207
|
// `relative`: a dot in the last button's place is placed against the row.
|
|
208
|
-
'
|
|
208
|
+
// 28px, a row's height (Katerina, 17 November); 32px until then.
|
|
209
|
+
'group relative flex h-[28px] shrink-0 items-center gap-1 px-2',
|
|
209
210
|
!row && 'transition-colors',
|
|
210
211
|
// A row is NavItem's shape and colour: 6px corners, secondary words that brighten on hover.
|
|
211
212
|
row ? cn(SIDEBAR_ROW_CLASSES, SIDEBAR_ROW_TEXT_CLASSES) : 'rounded-lg',
|
package/src/Skeleton.mdx
CHANGED
|
@@ -6,7 +6,7 @@ import * as SkeletonStories from './Skeleton.stories'
|
|
|
6
6
|
# Skeleton
|
|
7
7
|
|
|
8
8
|
The loading placeholder, in generic parts: **SkeletonBar** (the pulsing
|
|
9
|
-
block), **SkeletonRow** (a
|
|
9
|
+
block), **SkeletonRow** (a 28px row, a list row's height — a 16px square and a bar, like a row
|
|
10
10
|
with a face and a name), and **SkeletonList** (rows of varied widths, so
|
|
11
11
|
the placeholder does not read as a pattern).
|
|
12
12
|
|
|
@@ -44,4 +44,4 @@ It does these by itself. Write none of them around it.
|
|
|
44
44
|
|
|
45
45
|
| It does | So you never write | Refused when written by hand |
|
|
46
46
|
|---|---|---|
|
|
47
|
-
| Keeps each row's
|
|
47
|
+
| Keeps each row's 28px in a scrolling column | `shrink-0` | |
|
package/src/Skeleton.tsx
CHANGED
|
@@ -22,10 +22,10 @@ export function SkeletonBar({ className, style, on = 'surface', shape = 'bar' }:
|
|
|
22
22
|
|
|
23
23
|
const ROW_BAR_WIDTHS = [150, 100, 170, 120, 90, 140, 110, 160]
|
|
24
24
|
|
|
25
|
-
/** A
|
|
25
|
+
/** A 28px row, a list row's height: a 16px square and a bar, like a row with a face and a name. */
|
|
26
26
|
export function SkeletonRow({ barWidth = 130 }: { barWidth?: number }) {
|
|
27
27
|
return (
|
|
28
|
-
<div className="flex shrink-0 items-center gap-2 px-2 h-[
|
|
28
|
+
<div className="flex shrink-0 items-center gap-2 px-2 h-[28px] rounded-lg">
|
|
29
29
|
<SkeletonBar className="w-4 h-4 shrink-0" />
|
|
30
30
|
<SkeletonBar className="h-3.5" style={{ width: barWidth }} />
|
|
31
31
|
</div>
|
package/src/heights.test.tsx
CHANGED
|
@@ -28,7 +28,7 @@ const classes = (el: Element | null) => (el?.getAttribute('class') ?? '').split(
|
|
|
28
28
|
describe('a part with a set height keeps it in a scrolling column', () => {
|
|
29
29
|
it('SectionHeader: shrink-0', () => {
|
|
30
30
|
const { container } = render(<SectionHeader title="Group" />)
|
|
31
|
-
expect(classes(container.querySelector('[class*="h-[
|
|
31
|
+
expect(classes(container.querySelector('[class*="h-[28px]"]'))).toContain('shrink-0')
|
|
32
32
|
})
|
|
33
33
|
|
|
34
34
|
it('SkeletonRow: shrink-0', () => {
|
|
@@ -36,6 +36,13 @@ describe('a part with a set height keeps it in a scrolling column', () => {
|
|
|
36
36
|
expect(classes(container.firstElementChild)).toContain('shrink-0')
|
|
37
37
|
})
|
|
38
38
|
|
|
39
|
+
// 28px, a list row's height, for the three that stand in one list (Katerina, 17 November): 32px until then.
|
|
40
|
+
it('a row, a heading and a loading row are each 28px', () => {
|
|
41
|
+
const row = render(<SectionHeader title="Group" />).container
|
|
42
|
+
expect(classes(row.firstElementChild)).toContain('h-[28px]')
|
|
43
|
+
expect(classes(render(<SkeletonRow />).container.firstElementChild)).toContain('h-[28px]')
|
|
44
|
+
})
|
|
45
|
+
|
|
39
46
|
it('RailItem: a set 48px, and shrink-0', () => {
|
|
40
47
|
render(<RailItem href="#" label="Item" icon={<span />} />)
|
|
41
48
|
const tile = classes(screen.getByRole('link'))
|