@flamingo-stack/openframe-frontend-core 0.0.621 → 0.0.622-snapshot.20260914021720
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/{chunk-CFZUWKQF.js → chunk-6EHXQH7C.js} +4 -4
- package/dist/{chunk-PDGVOZCD.cjs → chunk-7CHG2DP2.cjs} +3 -3
- package/dist/{chunk-PDGVOZCD.cjs.map → chunk-7CHG2DP2.cjs.map} +1 -1
- package/dist/{chunk-5QUBQ4WP.js → chunk-AOGRJ4FT.js} +2 -2
- package/dist/{chunk-5YVZQVSR.js → chunk-C7AWXFDL.js} +5 -5
- package/dist/{chunk-A7TZZQGS.js → chunk-CIPIND3J.js} +2 -2
- package/dist/{chunk-CLPPOP5T.cjs → chunk-CKLQVCDP.cjs} +4 -4
- package/dist/{chunk-CLPPOP5T.cjs.map → chunk-CKLQVCDP.cjs.map} +1 -1
- package/dist/{chunk-QCZMCOAD.cjs → chunk-D4Q7BB3N.cjs} +33 -33
- package/dist/{chunk-QCZMCOAD.cjs.map → chunk-D4Q7BB3N.cjs.map} +1 -1
- package/dist/{chunk-EYFFIJEY.js → chunk-DTCNLA67.js} +2 -2
- package/dist/{chunk-CKL3UD5N.js → chunk-DUI764J2.js} +2 -2
- package/dist/{chunk-Q2NPL4FU.cjs → chunk-EP2XHZ4Z.cjs} +17 -17
- package/dist/{chunk-Q2NPL4FU.cjs.map → chunk-EP2XHZ4Z.cjs.map} +1 -1
- package/dist/{chunk-KDZLAUHJ.cjs → chunk-EVUDHIDB.cjs} +17 -17
- package/dist/{chunk-KDZLAUHJ.cjs.map → chunk-EVUDHIDB.cjs.map} +1 -1
- package/dist/{chunk-IQNG52SU.js → chunk-KZ7AKNDM.js} +15 -4
- package/dist/{chunk-IQNG52SU.js.map → chunk-KZ7AKNDM.js.map} +1 -1
- package/dist/{chunk-ADT6RYCG.cjs → chunk-LWBLLL32.cjs} +57 -68
- package/dist/chunk-LWBLLL32.cjs.map +1 -0
- package/dist/{chunk-62TUSJHG.js → chunk-MJJIQJGQ.js} +20 -22
- package/dist/{chunk-62TUSJHG.js.map → chunk-MJJIQJGQ.js.map} +1 -1
- package/dist/{chunk-OHJZD7QU.js → chunk-NIX7EG4G.js} +2 -2
- package/dist/{chunk-2BJONQDE.cjs → chunk-NMCR5YGW.cjs} +18 -18
- package/dist/{chunk-2BJONQDE.cjs.map → chunk-NMCR5YGW.cjs.map} +1 -1
- package/dist/{chunk-RGVXFAWM.cjs → chunk-ORUOBIJT.cjs} +3 -3
- package/dist/{chunk-RGVXFAWM.cjs.map → chunk-ORUOBIJT.cjs.map} +1 -1
- package/dist/{chunk-YEIX26DQ.js → chunk-PQZGMNJQ.js} +3 -3
- package/dist/{chunk-O3P2INXM.cjs → chunk-RZPGGSSW.cjs} +13 -13
- package/dist/{chunk-O3P2INXM.cjs.map → chunk-RZPGGSSW.cjs.map} +1 -1
- package/dist/{chunk-KTYYH3JV.cjs → chunk-SEC6NRAV.cjs} +3 -3
- package/dist/{chunk-KTYYH3JV.cjs.map → chunk-SEC6NRAV.cjs.map} +1 -1
- package/dist/{chunk-F4GW2DPW.js → chunk-SNWPBMPV.js} +2 -2
- package/dist/{chunk-NFITQGUP.js → chunk-V4OA6SVZ.js} +2 -2
- package/dist/{chunk-ALHMMNAZ.js → chunk-V6QYKYY2.js} +73 -38
- package/dist/chunk-V6QYKYY2.js.map +1 -0
- package/dist/{chunk-ME4C6DYA.cjs → chunk-VQCEWQFV.cjs} +4 -4
- package/dist/{chunk-ME4C6DYA.cjs.map → chunk-VQCEWQFV.cjs.map} +1 -1
- package/dist/{chunk-L4FR7YIS.js → chunk-VW57GX5O.js} +2 -2
- package/dist/{chunk-MSEHEEF7.cjs → chunk-XB7Z5ASO.cjs} +47 -12
- package/dist/chunk-XB7Z5ASO.cjs.map +1 -0
- package/dist/{chunk-7EV2UHWQ.cjs → chunk-XFYPKN2D.cjs} +15 -4
- package/dist/chunk-XFYPKN2D.cjs.map +1 -0
- package/dist/{chunk-OEXGPFM2.js → chunk-YU5PQOEU.js} +28 -39
- package/dist/chunk-YU5PQOEU.js.map +1 -0
- package/dist/{chunk-5Y2V24GT.cjs → chunk-YW7GPBB2.cjs} +64 -66
- package/dist/chunk-YW7GPBB2.cjs.map +1 -0
- package/dist/{chunk-IZ5GI3FP.cjs → chunk-YXBY2MDO.cjs} +3 -3
- package/dist/{chunk-IZ5GI3FP.cjs.map → chunk-YXBY2MDO.cjs.map} +1 -1
- package/dist/components/case-studies/index.cjs +8 -8
- package/dist/components/case-studies/index.js +2 -2
- package/dist/components/contact/index.cjs +3 -3
- package/dist/components/contact/index.js +2 -2
- package/dist/components/docs/index.cjs +6 -6
- package/dist/components/docs/index.js +5 -5
- package/dist/components/embeds/index.cjs +3 -3
- package/dist/components/embeds/index.js +2 -2
- package/dist/components/faq/index.cjs +3 -3
- package/dist/components/faq/index.js +2 -2
- package/dist/components/features/command-box.d.ts +9 -1
- package/dist/components/features/command-box.d.ts.map +1 -1
- package/dist/components/features/index.cjs +2 -2
- package/dist/components/features/index.js +1 -1
- package/dist/components/help-center-pages/index.cjs +22 -22
- package/dist/components/help-center-pages/index.js +13 -13
- package/dist/components/index.cjs +33 -31
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +15 -13
- package/dist/components/index.js.map +1 -1
- package/dist/components/list-empty-state.d.ts +32 -0
- package/dist/components/list-empty-state.d.ts.map +1 -0
- package/dist/components/meeting-scheduler/index.cjs +21 -21
- package/dist/components/meeting-scheduler/index.js +1 -1
- package/dist/components/navigation/index.cjs +5 -5
- package/dist/components/navigation/index.js +4 -4
- package/dist/components/onboarding-guides/index.cjs +5 -5
- package/dist/components/onboarding-guides/index.js +4 -4
- package/dist/components/shared/delivery/delivery-lists.d.ts.map +1 -1
- package/dist/components/shared/product-release/product-releases-view.d.ts.map +1 -1
- package/dist/components/tickets/help-center-list.d.ts.map +1 -1
- package/dist/components/tickets/index.cjs +6 -6
- package/dist/components/tickets/index.js +5 -5
- package/dist/components/ui/index.cjs +2 -2
- package/dist/components/ui/index.js +1 -1
- package/dist/index.cjs +6 -6
- package/dist/index.js +5 -5
- package/package.json +1 -1
- package/src/components/__tests__/list-empty-state.test.tsx +106 -0
- package/src/components/features/.command-box.md +2 -1
- package/src/components/features/command-box.tsx +28 -3
- package/src/components/index.ts +1 -0
- package/src/components/list-empty-state.tsx +57 -0
- package/src/components/shared/delivery/delivery-lists.tsx +18 -25
- package/src/components/shared/product-release/product-releases-view.tsx +11 -18
- package/src/components/tickets/help-center-list.tsx +19 -22
- package/dist/chunk-5Y2V24GT.cjs.map +0 -1
- package/dist/chunk-7EV2UHWQ.cjs.map +0 -1
- package/dist/chunk-ADT6RYCG.cjs.map +0 -1
- package/dist/chunk-ALHMMNAZ.js.map +0 -1
- package/dist/chunk-MSEHEEF7.cjs.map +0 -1
- package/dist/chunk-OEXGPFM2.js.map +0 -1
- /package/dist/{chunk-CFZUWKQF.js.map → chunk-6EHXQH7C.js.map} +0 -0
- /package/dist/{chunk-5QUBQ4WP.js.map → chunk-AOGRJ4FT.js.map} +0 -0
- /package/dist/{chunk-5YVZQVSR.js.map → chunk-C7AWXFDL.js.map} +0 -0
- /package/dist/{chunk-A7TZZQGS.js.map → chunk-CIPIND3J.js.map} +0 -0
- /package/dist/{chunk-EYFFIJEY.js.map → chunk-DTCNLA67.js.map} +0 -0
- /package/dist/{chunk-CKL3UD5N.js.map → chunk-DUI764J2.js.map} +0 -0
- /package/dist/{chunk-OHJZD7QU.js.map → chunk-NIX7EG4G.js.map} +0 -0
- /package/dist/{chunk-YEIX26DQ.js.map → chunk-PQZGMNJQ.js.map} +0 -0
- /package/dist/{chunk-F4GW2DPW.js.map → chunk-SNWPBMPV.js.map} +0 -0
- /package/dist/{chunk-NFITQGUP.js.map → chunk-V4OA6SVZ.js.map} +0 -0
- /package/dist/{chunk-L4FR7YIS.js.map → chunk-VW57GX5O.js.map} +0 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `ListEmptyState` — the two cases of an empty filterable list, pinned.
|
|
3
|
+
*
|
|
4
|
+
* 1. a filtered miss renders the `search` EmptyState with a secondary reset button that calls
|
|
5
|
+
* `onClearFilters`;
|
|
6
|
+
* 2. a genuinely empty list renders the `generic` EmptyState, and its button appears ONLY when
|
|
7
|
+
* the caller gave it both a label and an action. Without that guard `EmptyState` falls back to
|
|
8
|
+
* its path-sniffed default ("Browse Vendors") on a surface that never asked for one.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { fireEvent, render, screen } from '@testing-library/react';
|
|
12
|
+
import { describe, expect, it, vi } from 'vitest';
|
|
13
|
+
import { ListEmptyState } from '../list-empty-state';
|
|
14
|
+
|
|
15
|
+
const filtered = { title: 'No tickets found', description: 'Nothing matches your filters.' };
|
|
16
|
+
const empty = { title: 'No tickets yet', description: 'Open one above.' };
|
|
17
|
+
|
|
18
|
+
describe('ListEmptyState', () => {
|
|
19
|
+
it('offers to clear the filters on a filtered miss', () => {
|
|
20
|
+
const onClearFilters = vi.fn();
|
|
21
|
+
const onCtaClick = vi.fn();
|
|
22
|
+
render(
|
|
23
|
+
<ListEmptyState
|
|
24
|
+
isFiltered
|
|
25
|
+
filtered={filtered}
|
|
26
|
+
onClearFilters={onClearFilters}
|
|
27
|
+
empty={{ ...empty, ctaText: 'Create first', onCtaClick }}
|
|
28
|
+
/>,
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
expect(screen.getByRole('heading', { name: 'No tickets found' })).toBeTruthy();
|
|
32
|
+
expect(screen.getByText('Nothing matches your filters.')).toBeTruthy();
|
|
33
|
+
expect(screen.queryByText('Create first')).toBeNull();
|
|
34
|
+
|
|
35
|
+
const clear = screen.getByRole('button', { name: 'Clear filters' });
|
|
36
|
+
expect(clear.className).toContain('border-ods-border');
|
|
37
|
+
fireEvent.click(clear);
|
|
38
|
+
expect(onClearFilters).toHaveBeenCalledTimes(1);
|
|
39
|
+
expect(onCtaClick).not.toHaveBeenCalled();
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
it('uses the caller label for the reset button', () => {
|
|
43
|
+
render(
|
|
44
|
+
<ListEmptyState
|
|
45
|
+
isFiltered
|
|
46
|
+
filtered={{ ...filtered, clearText: 'Reset filters' }}
|
|
47
|
+
onClearFilters={() => undefined}
|
|
48
|
+
empty={empty}
|
|
49
|
+
/>,
|
|
50
|
+
);
|
|
51
|
+
expect(screen.getByRole('button', { name: 'Reset filters' })).toBeTruthy();
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
it('renders the empty list with its own action', () => {
|
|
55
|
+
const onClearFilters = vi.fn();
|
|
56
|
+
const onCtaClick = vi.fn();
|
|
57
|
+
render(
|
|
58
|
+
<ListEmptyState
|
|
59
|
+
isFiltered={false}
|
|
60
|
+
filtered={filtered}
|
|
61
|
+
onClearFilters={onClearFilters}
|
|
62
|
+
empty={{ ...empty, ctaText: 'Create first', onCtaClick }}
|
|
63
|
+
/>,
|
|
64
|
+
);
|
|
65
|
+
|
|
66
|
+
expect(screen.getByRole('heading', { name: 'No tickets yet' })).toBeTruthy();
|
|
67
|
+
const cta = screen.getByRole('button', { name: 'Create first' });
|
|
68
|
+
expect(cta.className).toContain('bg-ods-accent');
|
|
69
|
+
fireEvent.click(cta);
|
|
70
|
+
expect(onCtaClick).toHaveBeenCalledTimes(1);
|
|
71
|
+
expect(onClearFilters).not.toHaveBeenCalled();
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
it('renders no button for an empty list without an action', () => {
|
|
75
|
+
render(<ListEmptyState isFiltered={false} filtered={filtered} onClearFilters={() => undefined} empty={empty} />);
|
|
76
|
+
|
|
77
|
+
expect(screen.getByRole('heading', { name: 'No tickets yet' })).toBeTruthy();
|
|
78
|
+
expect(screen.queryByRole('button')).toBeNull();
|
|
79
|
+
expect(screen.queryByRole('link')).toBeNull();
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
it('renders no button when the empty CTA has a label but no action', () => {
|
|
83
|
+
render(
|
|
84
|
+
<ListEmptyState
|
|
85
|
+
isFiltered={false}
|
|
86
|
+
filtered={filtered}
|
|
87
|
+
onClearFilters={() => undefined}
|
|
88
|
+
empty={{ ...empty, ctaText: 'Create first' }}
|
|
89
|
+
/>,
|
|
90
|
+
);
|
|
91
|
+
expect(screen.queryByRole('button')).toBeNull();
|
|
92
|
+
expect(screen.queryByRole('link')).toBeNull();
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
it('renders the empty CTA as a link when given an href', () => {
|
|
96
|
+
render(
|
|
97
|
+
<ListEmptyState
|
|
98
|
+
isFiltered={false}
|
|
99
|
+
filtered={filtered}
|
|
100
|
+
onClearFilters={() => undefined}
|
|
101
|
+
empty={{ ...empty, ctaText: 'Back to blog', ctaHref: '/blog' }}
|
|
102
|
+
/>,
|
|
103
|
+
);
|
|
104
|
+
expect(screen.getByRole('link', { name: 'Back to blog' }).getAttribute('href')).toBe('/blog');
|
|
105
|
+
});
|
|
106
|
+
});
|
|
@@ -6,7 +6,7 @@ A unified React component for displaying command strings with optional action bu
|
|
|
6
6
|
### Interfaces
|
|
7
7
|
|
|
8
8
|
- **`CommandBoxAction`** — Defines a button's `label`, `onClick` handler, optional `variant` (`accent` | `outline` | `transparent` | `destructive`), `icon`, `disabled`, and `loading` states.
|
|
9
|
-
- **`CommandBoxProps`** — Component props including `command` (required), `title`, `primaryAction`, `secondaryAction`, `className`, `commandClassName`, and `
|
|
9
|
+
- **`CommandBoxProps`** — Component props including `command` (required), `title`, `primaryAction`, `secondaryAction`, `className`, `commandClassName`, `maxLines`, `visibleLines`, `onCopy` and `copyAriaLabel`.
|
|
10
10
|
|
|
11
11
|
### Exports
|
|
12
12
|
|
|
@@ -40,6 +40,7 @@ import { Copy, Play } from 'lucide-react'
|
|
|
40
40
|
|
|
41
41
|
## Notes
|
|
42
42
|
|
|
43
|
+
- **Fixed height** (`visibleLines`): the command area is exactly N rows of the `text-code` line height and scrolls inside with `ScrollShadow`, so boxes in a list line up and live-edited text never shifts the page. It wins over `maxLines`; the copy action always gets the full text.
|
|
43
44
|
- **Line clamping** uses a static `lineClampClasses` map (`1`–`6`) to satisfy Tailwind's build-time static class requirement. Set `maxLines={0}` (default) for unlimited display.
|
|
44
45
|
- Button variants default to `accent` for primary and `outline` for secondary if not specified.
|
|
45
46
|
- Source: [`command-box.tsx`](https://github.com/flamingo-stack/openframe-oss-lib/blob/main/command-box.tsx)
|
|
@@ -4,6 +4,7 @@ import type React from 'react';
|
|
|
4
4
|
import { cn } from '../../utils/cn';
|
|
5
5
|
import { Copy02Icon } from '../icons-v2-generated/documents/copy-02-icon';
|
|
6
6
|
import { Button } from '../ui/button';
|
|
7
|
+
import { ScrollShadow } from '../ui/scroll-fade';
|
|
7
8
|
|
|
8
9
|
export interface CommandBoxAction {
|
|
9
10
|
/** Button label */
|
|
@@ -35,6 +36,14 @@ export interface CommandBoxProps {
|
|
|
35
36
|
commandClassName?: string;
|
|
36
37
|
/** Maximum lines to show (uses line-clamp, 0 for unlimited) */
|
|
37
38
|
maxLines?: number;
|
|
39
|
+
/**
|
|
40
|
+
* Fixed height for the command area, in lines of `text-code`; longer text
|
|
41
|
+
* scrolls inside it with the ODS scroll fade. Unlike `maxLines`, the box is
|
|
42
|
+
* this tall whatever the content: every box in a list lines up, and text
|
|
43
|
+
* that changes live (a template being filled in) never moves the layout.
|
|
44
|
+
* Takes precedence over `maxLines`. Nothing is hidden from `onCopy`.
|
|
45
|
+
*/
|
|
46
|
+
visibleLines?: number;
|
|
38
47
|
/** When set, shows a copy icon button in the top-right corner of the box */
|
|
39
48
|
onCopy?: () => void;
|
|
40
49
|
/** Accessible label for the corner copy button */
|
|
@@ -92,17 +101,19 @@ export function CommandBox({
|
|
|
92
101
|
className,
|
|
93
102
|
commandClassName,
|
|
94
103
|
maxLines = 0,
|
|
104
|
+
visibleLines,
|
|
95
105
|
onCopy,
|
|
96
106
|
copyAriaLabel = 'Copy command',
|
|
97
107
|
}: CommandBoxProps) {
|
|
108
|
+
const fixedHeight = visibleLines !== undefined && visibleLines > 0;
|
|
98
109
|
// Get static line-clamp class or undefined for unlimited
|
|
99
|
-
const lineClampClass = maxLines > 0 ? lineClampClasses[maxLines] : undefined;
|
|
110
|
+
const lineClampClass = !fixedHeight && maxLines > 0 ? lineClampClasses[maxLines] : undefined;
|
|
100
111
|
|
|
101
|
-
const
|
|
112
|
+
const text = (
|
|
102
113
|
<div
|
|
103
114
|
className={cn(
|
|
104
115
|
'break-all text-ods-text-primary text-code',
|
|
105
|
-
onCopy && 'min-w-0 flex-1',
|
|
116
|
+
!fixedHeight && onCopy && 'min-w-0 flex-1',
|
|
106
117
|
lineClampClass,
|
|
107
118
|
commandClassName,
|
|
108
119
|
)}
|
|
@@ -111,6 +122,20 @@ export function CommandBox({
|
|
|
111
122
|
</div>
|
|
112
123
|
);
|
|
113
124
|
|
|
125
|
+
// The height is N rows of the `text-code` line height token, so it follows
|
|
126
|
+
// the responsive type scale instead of a pixel guess.
|
|
127
|
+
const commandText = fixedHeight ? (
|
|
128
|
+
<ScrollShadow
|
|
129
|
+
className={cn(onCopy && 'min-w-0 flex-1')}
|
|
130
|
+
scrollClassName="h-full overscroll-contain"
|
|
131
|
+
style={{ height: `calc(${visibleLines} * var(--font-line-space-h6-caption))` }}
|
|
132
|
+
>
|
|
133
|
+
{text}
|
|
134
|
+
</ScrollShadow>
|
|
135
|
+
) : (
|
|
136
|
+
text
|
|
137
|
+
);
|
|
138
|
+
|
|
114
139
|
return (
|
|
115
140
|
<div className={cn('flex flex-col gap-2', className)}>
|
|
116
141
|
{title && <div className="text-ods-text-primary text-h4">{title}</div>}
|
package/src/components/index.ts
CHANGED
|
@@ -21,6 +21,7 @@ export * from './comment-thread';
|
|
|
21
21
|
export * from './content-loading-container';
|
|
22
22
|
export * from './dynamic-skeleton';
|
|
23
23
|
export * from './empty-state';
|
|
24
|
+
export * from './list-empty-state';
|
|
24
25
|
export * from './faq-accordion';
|
|
25
26
|
// FaqSection sub-folder. Also exposed via the "./components/faq" subpath export
|
|
26
27
|
// in package.json — that subpath is ALSO `"use client"` (tsup banner), so it
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { EmptyState } from './empty-state';
|
|
4
|
+
|
|
5
|
+
export interface ListEmptyStateCopy {
|
|
6
|
+
title: string;
|
|
7
|
+
description: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface ListEmptyStateProps {
|
|
11
|
+
/** A search or filter is narrowing the list, so "nothing to show" is a miss, not an empty list. */
|
|
12
|
+
isFiltered: boolean;
|
|
13
|
+
/** Copy for the filtered miss. `clearText` labels the reset button (default "Clear filters"). */
|
|
14
|
+
filtered: ListEmptyStateCopy & { clearText?: string };
|
|
15
|
+
/** Resets every search and filter the list owns. */
|
|
16
|
+
onClearFilters: () => void;
|
|
17
|
+
/**
|
|
18
|
+
* Copy for a genuinely empty list, with an optional call to action (e.g. "Create the first one").
|
|
19
|
+
* The CTA renders only when `ctaText` comes with `onCtaClick` or `ctaHref`, so an empty list with
|
|
20
|
+
* no action never falls through to `EmptyState`'s path-sniffed default button.
|
|
21
|
+
*/
|
|
22
|
+
empty: ListEmptyStateCopy & { ctaText?: string; onCtaClick?: () => void; ctaHref?: string };
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* THE empty state of a searchable, filterable list: a filtered miss offers to clear the filters
|
|
27
|
+
* (`search` icon, secondary button), a genuinely empty list says so and optionally offers its own
|
|
28
|
+
* action (`generic` icon, primary button). Every list with filters renders this instead of choosing
|
|
29
|
+
* between two `EmptyState`s by hand, so the two cases look and behave the same everywhere.
|
|
30
|
+
*/
|
|
31
|
+
export function ListEmptyState({ isFiltered, filtered, onClearFilters, empty }: ListEmptyStateProps) {
|
|
32
|
+
if (isFiltered) {
|
|
33
|
+
return (
|
|
34
|
+
<EmptyState
|
|
35
|
+
type="search"
|
|
36
|
+
title={filtered.title}
|
|
37
|
+
description={filtered.description}
|
|
38
|
+
ctaText={filtered.clearText ?? 'Clear filters'}
|
|
39
|
+
onCtaClick={onClearFilters}
|
|
40
|
+
ctaVariant="secondary"
|
|
41
|
+
/>
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const hasCta = Boolean(empty.ctaText && (empty.onCtaClick || empty.ctaHref));
|
|
46
|
+
return (
|
|
47
|
+
<EmptyState
|
|
48
|
+
type="generic"
|
|
49
|
+
title={empty.title}
|
|
50
|
+
description={empty.description}
|
|
51
|
+
showCTA={hasCta}
|
|
52
|
+
ctaText={empty.ctaText}
|
|
53
|
+
onCtaClick={empty.onCtaClick}
|
|
54
|
+
ctaHref={empty.ctaHref}
|
|
55
|
+
/>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
@@ -35,7 +35,7 @@ import type { DeliveryItem, DeliveryResponse } from '../../../types/delivery';
|
|
|
35
35
|
import { DEV_SECTION_PARAM_KEYS } from '../../../utils/dev-sections/dev-section-param-keys';
|
|
36
36
|
import { contentFetch } from '../../../utils/embed-content-fetch';
|
|
37
37
|
import { STICKY_HEADER_OFFSET_PX } from '../../../utils/same-page-hash-nav';
|
|
38
|
-
import {
|
|
38
|
+
import { ListEmptyState } from '../../list-empty-state';
|
|
39
39
|
import { LoadError } from '../../ui/error-state';
|
|
40
40
|
import { DeliveryTable } from './delivery-table';
|
|
41
41
|
|
|
@@ -181,30 +181,23 @@ export function DeliveryLists({
|
|
|
181
181
|
return (
|
|
182
182
|
<div className="flex w-full flex-col gap-[40px]">
|
|
183
183
|
{/* Empty state if no results after filtering */}
|
|
184
|
-
{!isLoading &&
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
<EmptyState
|
|
202
|
-
type="generic"
|
|
203
|
-
title="No tasks available"
|
|
204
|
-
description="Check back soon for upcoming tasks!"
|
|
205
|
-
showCTA={false}
|
|
206
|
-
/>
|
|
207
|
-
))}
|
|
184
|
+
{!isLoading && !hasResults && (
|
|
185
|
+
<ListEmptyState
|
|
186
|
+
isFiltered={hasActiveFilters}
|
|
187
|
+
filtered={{
|
|
188
|
+
title: 'No tasks found',
|
|
189
|
+
description: 'No tasks match your current filters. Try adjusting your search or status filter.',
|
|
190
|
+
clearText: 'Reset Filters',
|
|
191
|
+
}}
|
|
192
|
+
onClearFilters={() => {
|
|
193
|
+
const params = new URLSearchParams(searchParams.toString());
|
|
194
|
+
params.delete(searchParamKey);
|
|
195
|
+
params.delete(taskTypeParamKey);
|
|
196
|
+
router.replace(`${pathname}?${params.toString()}`, { scroll: false });
|
|
197
|
+
}}
|
|
198
|
+
empty={{ title: 'No tasks available', description: 'Check back soon for upcoming tasks!' }}
|
|
199
|
+
/>
|
|
200
|
+
)}
|
|
208
201
|
|
|
209
202
|
{/* Completed Tasks Table */}
|
|
210
203
|
{showCompleted && (hasResults || isLoading) && (
|
|
@@ -32,7 +32,7 @@ import { buildProductReleaseCardProps } from '../../chat/entity-cards/product-re
|
|
|
32
32
|
import { useEntityCardLink } from '../../chat/entity-cards/use-entity-card-link';
|
|
33
33
|
import { isModifierClick } from '../../chat/utils/chat-nav-resolution';
|
|
34
34
|
import { executeNavigationImperative } from '../../chat/utils/execute-navigation';
|
|
35
|
-
import {
|
|
35
|
+
import { ListEmptyState } from '../../list-empty-state';
|
|
36
36
|
import { PersistentPaginationWrapper } from '../../persistent-pagination';
|
|
37
37
|
import { LoadError } from '../../ui/error-state';
|
|
38
38
|
import { ProductReleaseCard, type ProductReleaseCardProps } from './product-release-card';
|
|
@@ -194,23 +194,16 @@ export function ProductReleasesView({
|
|
|
194
194
|
<div className="min-h-[600px]">
|
|
195
195
|
{showEmpty ? (
|
|
196
196
|
<div className="flex h-[600px] items-center justify-center">
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
title
|
|
201
|
-
description
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
<EmptyState
|
|
208
|
-
type="generic"
|
|
209
|
-
title="No releases available"
|
|
210
|
-
description="Check back soon for product updates!"
|
|
211
|
-
showCTA={false}
|
|
212
|
-
/>
|
|
213
|
-
)}
|
|
197
|
+
<ListEmptyState
|
|
198
|
+
isFiltered={hasActiveFilters}
|
|
199
|
+
filtered={{
|
|
200
|
+
title: 'No releases found',
|
|
201
|
+
description: 'No releases match your current filters. Try adjusting your search or status filter.',
|
|
202
|
+
clearText: 'Reset Filters',
|
|
203
|
+
}}
|
|
204
|
+
onClearFilters={resetFilters}
|
|
205
|
+
empty={{ title: 'No releases available', description: 'Check back soon for product updates!' }}
|
|
206
|
+
/>
|
|
214
207
|
</div>
|
|
215
208
|
) : (
|
|
216
209
|
<>
|
|
@@ -36,6 +36,7 @@ import { STICKY_HEADER_OFFSET_PX } from '../../utils/same-page-hash-nav';
|
|
|
36
36
|
import { positiveInt } from '../../utils/search-params';
|
|
37
37
|
import { useChatIdentity } from '../chat/hooks/use-chat-identity';
|
|
38
38
|
import { EmptyState } from '../empty-state';
|
|
39
|
+
import { ListEmptyState } from '../list-empty-state';
|
|
39
40
|
import { DevSectionPage } from '../shared/dev-section';
|
|
40
41
|
import { DevCardRowSkeletonList } from '../shared/dev-section/dev-card-row';
|
|
41
42
|
import { Button } from '../ui';
|
|
@@ -334,28 +335,24 @@ function HelpCenterListAuthed({
|
|
|
334
335
|
// response landing.
|
|
335
336
|
<DevCardRowSkeletonList rows={1} />
|
|
336
337
|
) : !hasResults ? (
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
title
|
|
341
|
-
description
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
description="Open one above to start the conversation with the support team."
|
|
356
|
-
showCTA={false}
|
|
357
|
-
/>
|
|
358
|
-
)
|
|
338
|
+
<ListEmptyState
|
|
339
|
+
isFiltered={hasActiveFilters}
|
|
340
|
+
filtered={{
|
|
341
|
+
title: 'No tickets found',
|
|
342
|
+
description: 'No tickets match your current filters. Try clearing them or broadening your search.',
|
|
343
|
+
clearText: 'Reset filters',
|
|
344
|
+
}}
|
|
345
|
+
onClearFilters={() => {
|
|
346
|
+
const params = new URLSearchParams(searchParams.toString());
|
|
347
|
+
params.delete('search');
|
|
348
|
+
params.delete('status');
|
|
349
|
+
router.replace(`${pathname}?${params.toString()}`, { scroll: false });
|
|
350
|
+
}}
|
|
351
|
+
empty={{
|
|
352
|
+
title: 'No tickets yet',
|
|
353
|
+
description: 'Open one above to start the conversation with the support team.',
|
|
354
|
+
}}
|
|
355
|
+
/>
|
|
359
356
|
) : (
|
|
360
357
|
// `overflow-clip` (NOT `overflow-hidden`) — both visually
|
|
361
358
|
// clip the rounded corners, but `hidden` makes the element
|