@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.
@@ -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
- 'group relative flex h-[32px] shrink-0 items-center gap-1 px-2',
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 32px row — a 16px square and a bar, like a row
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 32px in a scrolling column | `shrink-0` | |
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 32px row: a 16px square and a bar, like a row with a face and a name. */
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-[32px] rounded-lg">
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>
@@ -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-[32px]"]'))).toContain('shrink-0')
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'))