@itsyouagency/ui 1.45.0 → 1.47.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/README.md +93 -0
- package/dist/assets/css/design-system.css +3566 -0
- package/dist/assets/icons/bell-01.svg +1 -1
- package/dist/components/base/Button.d.ts +6 -2
- package/dist/components/base/IconButton.d.ts +10 -10
- package/dist/components/base/Input.d.ts +2 -3
- package/dist/components/base/InputWrapper.d.ts +3 -1
- package/dist/components/base/MobileSideBar.d.ts +2 -1
- package/dist/components/base/Tabs.d.ts +8 -1
- package/dist/components/base/TextArea.d.ts +2 -2
- package/dist/components/chat/ChatConversationList.d.ts +11 -0
- package/dist/components/chat/ChatCreatePage.d.ts +9 -0
- package/dist/components/chat/ChatGroupDialog.d.ts +1 -0
- package/dist/components/chat/ChatGroupForm.d.ts +14 -0
- package/dist/components/chat/ChatRequestPicker.d.ts +10 -0
- package/dist/components/chat/ChatThread.d.ts +19 -0
- package/dist/components/chat/ChatWorkspace.d.ts +12 -0
- package/dist/components/chat/RequestChat.d.ts +7 -0
- package/dist/components/chat/api.d.ts +36 -0
- package/dist/components/chat/grouping.d.ts +7 -0
- package/dist/components/chat/index.d.ts +6 -0
- package/dist/components/chat/labels.d.ts +155 -0
- package/dist/components/chat/types.d.ts +73 -0
- package/dist/components/chat/utils.d.ts +5 -0
- package/dist/components/request-files/FileDownloadButton.d.ts +5 -0
- package/dist/components/request-files/RequestContracts.d.ts +14 -0
- package/dist/components/request-files/RequestFileDialog.d.ts +11 -0
- package/dist/components/request-files/RequestResources.d.ts +15 -0
- package/dist/components/request-files/api.d.ts +8 -0
- package/dist/components/workspace/ActionDialog.d.ts +11 -0
- package/dist/components/workspace/ChoiceChips.d.ts +11 -0
- package/dist/components/workspace/CommandMenu.d.ts +8 -0
- package/dist/components/workspace/ContactDetails.d.ts +25 -0
- package/dist/components/workspace/ContractFields.d.ts +23 -0
- package/dist/components/workspace/DataRegion.d.ts +19 -0
- package/dist/components/workspace/DocumentEditor.d.ts +12 -0
- package/dist/components/workspace/DocumentPreview.d.ts +5 -0
- package/dist/components/workspace/Feedback.d.ts +27 -0
- package/dist/components/workspace/FilterTabs.d.ts +17 -0
- package/dist/components/workspace/FormActions.d.ts +6 -0
- package/dist/components/workspace/FormField.d.ts +24 -0
- package/dist/components/workspace/MetricCard.d.ts +13 -0
- package/dist/components/workspace/NotificationMenu.d.ts +8 -0
- package/dist/components/workspace/PageHeader.d.ts +9 -0
- package/dist/components/workspace/Pagination.d.ts +14 -0
- package/dist/components/workspace/Panel.d.ts +12 -0
- package/dist/components/workspace/Progress.d.ts +5 -0
- package/dist/components/workspace/SearchMultiSelect.d.ts +11 -0
- package/dist/components/workspace/SearchSelect.d.ts +24 -0
- package/dist/components/workspace/SettingToggle.d.ts +12 -0
- package/dist/components/workspace/WorkspaceNav.d.ts +7 -0
- package/dist/components/workspace/index.d.ts +27 -0
- package/dist/components/workspace/navigation.d.ts +32 -0
- package/dist/components/workspace/search.d.ts +10 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -2
- package/dist/layouts/dashboard.d.ts +3 -1
- package/dist/layouts/index.d.ts +2 -0
- package/dist/layouts/workspace.d.ts +29 -0
- package/dist/layouts/workspaceAuth.d.ts +13 -0
- package/dist/tailwind.workspace.config.d.ts +3 -0
- package/dist/tailwind.workspace.config.js +1 -0
- package/package.json +12 -10
- package/dist/assets/logos/mark.svg +0 -10
- package/dist/index.js.LICENSE.txt +0 -40
package/README.md
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# IT’S YOU UI
|
|
2
|
+
|
|
3
|
+
The shared design system for admin and model. Import components from `@itsyouagency/ui`; keep data fetching, permissions, translations and business rules in the apps.
|
|
4
|
+
|
|
5
|
+
## Use in a workspace app
|
|
6
|
+
|
|
7
|
+
Set `"@itsyouagency/ui": "workspace:*"` in the app package. Build with `pnpm build-lib` from the workspace root, or run `pnpm --filter @itsyouagency/ui dev` alongside the app server to rebuild shared changes automatically.
|
|
8
|
+
|
|
9
|
+
Import these styles in the app entry, after app Tailwind styles:
|
|
10
|
+
|
|
11
|
+
```tsx
|
|
12
|
+
import '@itsyouagency/ui/dist/assets/css/fonts.css';
|
|
13
|
+
import '@itsyouagency/ui/dist/assets/css/design-system.css';
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Use `@itsyouagency/ui/dist/tailwind.workspace.config` as a Tailwind preset and scan `./node_modules/@itsyouagency/ui/dist/**/*.{js,ts,jsx,tsx}`. Color, radius, spacing and typography tokens live in `src/assets/css/design-system.css`. The `ui-` namespace avoids app-specific CSS coupling. Components are monochrome; statuses use text, outlines and dots as well as shade.
|
|
17
|
+
|
|
18
|
+
## Components and responsibility
|
|
19
|
+
|
|
20
|
+
- `WorkspaceLayout`: responsive navigation, account menu, breadcrumbs, skip link and keyboard page search. Pass navigation, current path, account actions and localized labels. It does not fetch sessions or enforce authorization.
|
|
21
|
+
- `WorkspaceAuthLayout`: shared split-screen authentication frame with branding and form slots.
|
|
22
|
+
- `PageHeader`, `Panel`, `MetricCard`: page and content structure. `Panel` supports accessible collapsible sections.
|
|
23
|
+
- `Button`, `IconButton`, `Input`, `TextArea`, `TextInput`, `Select`, `FormField`, `FormCard`: form primitives. React Hook Form adapters belong in the consuming app.
|
|
24
|
+
- `SearchSelect`: searchable single selection with a controlled string identifier, ref forwarding, keyboard navigation, empty/loading/error states and a virtualized list. Supply `label`, `value`, `options` and `onChange`; `name` adds a hidden field with the selected ID. Display labels and secondary metadata separately. Extra `keywords` can include contact details and numbers. Search ignores accents, punctuation and phone formatting, and matches all entered terms. Use it for clients and long option lists; use `Select` for short, fixed choices.
|
|
25
|
+
- `SettingToggle`: accessible immediate-save settings with labels, descriptions and disabled/pending states.
|
|
26
|
+
- `ContactDetails`, `ContactPopover`, `CopyButton`: full contact details and clipboard feedback, with localized labels.
|
|
27
|
+
- `ActionDialog`, `FormActions`, `ChoiceChips`: modal actions, persistent form actions and accessible multiple-choice controls.
|
|
28
|
+
- `FilterTabs`, `Pagination`, `Badge`, `Progress`, `EmptyState`, `Skeleton`, `InlineNotice`, `WorkspaceLoading`: shared filtering and feedback. Filter buttons use `aria-pressed`, not tab semantics without associated panels.
|
|
29
|
+
|
|
30
|
+
```tsx
|
|
31
|
+
<SearchSelect
|
|
32
|
+
label="Client"
|
|
33
|
+
name="clientId"
|
|
34
|
+
value={clientId}
|
|
35
|
+
onChange={setClientId}
|
|
36
|
+
options={[
|
|
37
|
+
{
|
|
38
|
+
value: 'client-id',
|
|
39
|
+
label: 'Müller Studio',
|
|
40
|
+
meta: '#1042',
|
|
41
|
+
description: 'Anna · Wien',
|
|
42
|
+
keywords: ['anna@example.test', '+43 660 1234567'],
|
|
43
|
+
},
|
|
44
|
+
]}
|
|
45
|
+
/>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Admin's `ClientSelect` maps API data to these options. Both client-request and order creation use it. Admin and model also use `SearchSelect` for long country and profile option lists through their form adapters. UI never imports application hooks or domain models.
|
|
49
|
+
|
|
50
|
+
## Development
|
|
51
|
+
|
|
52
|
+
- `pnpm --filter @itsyouagency/ui build`: bundle and declarations, styles and Tailwind presets.
|
|
53
|
+
- `pnpm --filter @itsyouagency/ui test`: build, then run search, navigation, accessible output and pagination checks, including a 10,000-item directory.
|
|
54
|
+
- `pnpm --filter @itsyouagency/ui storybook`: inspect `Design system/Workspace`, including form and feedback examples.
|
|
55
|
+
|
|
56
|
+
React, Next and other runtime dependencies are external to the bundle so applications share their own router and context instances. Existing exports and the legacy `DashboardLayout` and Tailwind preset remain available for other consumers.
|
|
57
|
+
|
|
58
|
+
### Group chat
|
|
59
|
+
|
|
60
|
+
`ChatWorkspace` is the shared messaging screen used by all three portals. Pass
|
|
61
|
+
`apiBaseUrl`, `locale` (`en`/`de`), and `allowManagement` in the admin app.
|
|
62
|
+
Admin uses `grouping="client"`; client and model use `grouping="none"` (the default).
|
|
63
|
+
Admin client headers contain chat rows directly, with no request subgroups.
|
|
64
|
+
Client/model lists and embedded request chats are flat, ordered by activity.
|
|
65
|
+
Unlinked admin chats remain in General. Search includes project and client names. The API's
|
|
66
|
+
`viewer.canManage` must also be true before management controls appear. Optional
|
|
67
|
+
`selectedChatId`/`onSelectChat` props connect selection to the app router for
|
|
68
|
+
shareable URLs. Applications import the existing `design-system.css`; no extra
|
|
69
|
+
styles or runtime packages are needed.
|
|
70
|
+
|
|
71
|
+
The screen includes conversation search, unread filtering/counts, a responsive
|
|
72
|
+
message thread, participant details, paginated history, retained per-chat drafts,
|
|
73
|
+
retryable sends and staff-only group editing. New messages update automatically;
|
|
74
|
+
read markers advance only when the visible, focused thread is at the bottom.
|
|
75
|
+
|
|
76
|
+
`ChatCreatePage` opens the shared participant form on a separate page, using
|
|
77
|
+
`clientRequestId` to load models with signed request contracts, the client's portal users, and the
|
|
78
|
+
creating staff member. It keeps the request association and allows participant
|
|
79
|
+
review. Models without accounts and clients without portal access are called out.
|
|
80
|
+
`RequestChat` embeds the same conversation list, message history, and composer in
|
|
81
|
+
request details, scoped by `clientRequestId` and membership. With no accessible
|
|
82
|
+
chat it shows an empty state. Read markers require the latest messages to be in
|
|
83
|
+
view, including when the embedded chat starts below the request brief.
|
|
84
|
+
|
|
85
|
+
Browser checks use mocked sessions and chat endpoints against running local
|
|
86
|
+
admin/client/model apps, without changing real accounts or chats:
|
|
87
|
+
|
|
88
|
+
```sh
|
|
89
|
+
node tests/chat.browser.cjs
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Set `CHAT_ADMIN_URL`, `CHAT_CLIENT_URL`, `CHAT_MODEL_URL`, or `CHAT_SCREENSHOTS` to override the local
|
|
93
|
+
app addresses and screenshot directory. The browser check uses installed Chrome.
|