@synerise/ds-tray 1.1.9 → 1.1.10

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +4 -37
  2. package/README.md +20 -13
  3. package/package.json +8 -8
package/CHANGELOG.md CHANGED
@@ -3,81 +3,48 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## [1.1.9](https://github.com/Synerise/synerise-design/compare/@synerise/ds-tray@1.1.8...@synerise/ds-tray@1.1.9) (2025-11-28)
6
+ ## [1.1.10](https://github.com/Synerise/synerise-design/compare/@synerise/ds-tray@1.1.9...@synerise/ds-tray@1.1.10) (2025-12-15)
7
7
 
8
8
  **Note:** Version bump only for package @synerise/ds-tray
9
9
 
10
+ ## [1.1.9](https://github.com/Synerise/synerise-design/compare/@synerise/ds-tray@1.1.8...@synerise/ds-tray@1.1.9) (2025-11-28)
10
11
 
11
-
12
-
12
+ **Note:** Version bump only for package @synerise/ds-tray
13
13
 
14
14
  ## [1.1.8](https://github.com/Synerise/synerise-design/compare/@synerise/ds-tray@1.1.7...@synerise/ds-tray@1.1.8) (2025-11-06)
15
15
 
16
16
  **Note:** Version bump only for package @synerise/ds-tray
17
17
 
18
-
19
-
20
-
21
-
22
18
  ## [1.1.7](https://github.com/Synerise/synerise-design/compare/@synerise/ds-tray@1.1.6...@synerise/ds-tray@1.1.7) (2025-10-22)
23
19
 
24
20
  **Note:** Version bump only for package @synerise/ds-tray
25
21
 
26
-
27
-
28
-
29
-
30
22
  ## [1.1.6](https://github.com/Synerise/synerise-design/compare/@synerise/ds-tray@1.1.5...@synerise/ds-tray@1.1.6) (2025-10-16)
31
23
 
32
24
  **Note:** Version bump only for package @synerise/ds-tray
33
25
 
34
-
35
-
36
-
37
-
38
26
  ## [1.1.5](https://github.com/Synerise/synerise-design/compare/@synerise/ds-tray@1.1.4...@synerise/ds-tray@1.1.5) (2025-10-10)
39
27
 
40
28
  **Note:** Version bump only for package @synerise/ds-tray
41
29
 
42
-
43
-
44
-
45
-
46
30
  ## [1.1.4](https://github.com/Synerise/synerise-design/compare/@synerise/ds-tray@1.1.3...@synerise/ds-tray@1.1.4) (2025-10-08)
47
31
 
48
32
  **Note:** Version bump only for package @synerise/ds-tray
49
33
 
50
-
51
-
52
-
53
-
54
34
  ## [1.1.3](https://github.com/Synerise/synerise-design/compare/@synerise/ds-tray@1.1.2...@synerise/ds-tray@1.1.3) (2025-09-25)
55
35
 
56
36
  **Note:** Version bump only for package @synerise/ds-tray
57
37
 
58
-
59
-
60
-
61
-
62
38
  ## [1.1.2](https://github.com/Synerise/synerise-design/compare/@synerise/ds-tray@1.1.1...@synerise/ds-tray@1.1.2) (2025-09-19)
63
39
 
64
40
  **Note:** Version bump only for package @synerise/ds-tray
65
41
 
66
-
67
-
68
-
69
-
70
42
  ## [1.1.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-tray@1.1.0...@synerise/ds-tray@1.1.1) (2025-09-16)
71
43
 
72
44
  **Note:** Version bump only for package @synerise/ds-tray
73
45
 
74
-
75
-
76
-
77
-
78
46
  # 1.1.0 (2025-09-05)
79
47
 
80
-
81
48
  ### Features
82
49
 
83
- * **tray:** new component ([4f747b8](https://github.com/Synerise/synerise-design/commit/4f747b8ed29591ec8358d8b7c54d2d7d40374524))
50
+ - **tray:** new component ([4f747b8](https://github.com/Synerise/synerise-design/commit/4f747b8ed29591ec8358d8b7c54d2d7d40374524))
package/README.md CHANGED
@@ -21,6 +21,7 @@ yarn add @synerise/ds-tray
21
21
  - Open/close trays via the `useTray` hook which calls `openTray(id, TrayData)` / `closeTray(id)`.
22
22
 
23
23
  Key source files:
24
+
24
25
  - Component: [`Tray`](packages/components/tray/src/Tray.tsx)
25
26
  - Props type: [`TrayProps`](packages/components/tray/src/Tray.types.ts)
26
27
  - Provider & data shape: [`TrayProvider` / `TrayData`](packages/components/tray/src/components/TrayProvider.tsx)
@@ -29,10 +30,11 @@ Key source files:
29
30
 
30
31
  ## Basic usage
31
32
 
32
- 1) Wrap your app with the provider and mount a `Tray` with a stable id:
33
+ 1. Wrap your app with the provider and mount a `Tray` with a stable id:
33
34
 
34
35
  ```tsx
35
36
  import React from 'react';
37
+
36
38
  import { TrayProvider } from '@synerise/ds-tray';
37
39
  import Tray from '@synerise/ds-tray';
38
40
 
@@ -45,10 +47,11 @@ const App = () => (
45
47
  );
46
48
  ```
47
49
 
48
- 2) Open the tray from anywhere inside the provider using the hook:
50
+ 2. Open the tray from anywhere inside the provider using the hook:
49
51
 
50
52
  ```tsx
51
53
  import React from 'react';
54
+
52
55
  import { useTray } from '@synerise/ds-tray';
53
56
 
54
57
  const Demo = () => {
@@ -59,7 +62,11 @@ const Demo = () => {
59
62
  title: 'Details',
60
63
  content: <div>Tray content</div>,
61
64
  headerRightSide: <span>Extra</span>,
62
- footer: <div><button onClick={() => close('my-tray')}>Close</button></div>,
65
+ footer: (
66
+ <div>
67
+ <button onClick={() => close('my-tray')}>Close</button>
68
+ </div>
69
+ ),
63
70
  onClose: (id) => console.log('closed', id),
64
71
  });
65
72
  };
@@ -71,22 +78,22 @@ const Demo = () => {
71
78
  ## API
72
79
 
73
80
  Tray component props
74
- | Property | Description | Type | Required | |
81
+ | Property | Description | Type | Required | |
75
82
  |-------------------------------|----------------------------------------------------|-----------------------------|----------|-----|
76
- | `id` | Identifier used to bind the tray to provider state | `string | number` | yes |
77
- | any other HTML div attributes | `className`, `style`, `data-*`, etc. | `HTMLDivElement` attributes | no | |
78
-
83
+ | `id` | Identifier used to bind the tray to provider state | `string | number` | yes |
84
+ | any other HTML div attributes | `className`, `style`, `data-*`, etc. | `HTMLDivElement` attributes | no | |
79
85
 
80
86
  Tray data (passed to `open(id, data)`) — [`TrayData`](packages/components/tray/src/components/TrayProvider.tsx)
81
- | Property | Description | Type | |
87
+ | Property | Description | Type | |
82
88
  |-------------------|------------------------------------------------|--------------|------------------|
83
- | `content` | Main content to render inside the tray | `ReactNode` | |
84
- | `title` | Header title (node) | `ReactNode` | |
85
- | `headerRightSide` | Node rendered in header to the right of title | `ReactNode` | |
86
- | `footer` | Footer node rendered at bottom of tray | `ReactNode` | |
87
- | `onClose` | Callback invoked when tray close action occurs | `(id: string | number) => void` |
89
+ | `content` | Main content to render inside the tray | `ReactNode` | |
90
+ | `title` | Header title (node) | `ReactNode` | |
91
+ | `headerRightSide` | Node rendered in header to the right of title | `ReactNode` | |
92
+ | `footer` | Footer node rendered at bottom of tray | `ReactNode` | |
93
+ | `onClose` | Callback invoked when tray close action occurs | `(id: string | number) => void` |
88
94
 
89
95
  Notes
96
+
90
97
  - The `Tray` component reads its state from context (`getTrayState(id)`) and returns `null` if not open. See [`Tray.tsx`](packages/components/tray/src/Tray.tsx).
91
98
  - The provider stores tray entries keyed by id; you can open different trays by using different ids.
92
99
  - The close button in the header calls `closeTray(id)` and triggers `TrayData.onClose` if provided.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-tray",
3
- "version": "1.1.9",
3
+ "version": "1.1.10",
4
4
  "description": "Tray UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -23,7 +23,7 @@
23
23
  "defs": "tsc --declaration --outDir dist/ --emitDeclarationOnly",
24
24
  "prepublish": "npm run build",
25
25
  "types": "tsc --noEmit",
26
- "pack:ci": "npm pack --pack-destination ../../storybook/storybook-static/static",
26
+ "pack:ci": "pnpm pack --pack-destination ../../storybook/storybook-static/static",
27
27
  "test": "jest",
28
28
  "test:watch": "npm run test -- --watchAll",
29
29
  "upgrade:ds": "ncu -f \"@synerise/ds-*\" -u"
@@ -34,16 +34,16 @@
34
34
  ],
35
35
  "types": "dist/index.d.ts",
36
36
  "dependencies": {
37
- "@synerise/ds-button": "^1.5.1",
38
- "@synerise/ds-icon": "^1.9.0",
39
- "@synerise/ds-scrollbar": "^1.2.1",
40
- "@synerise/ds-typography": "^1.0.24",
41
- "@synerise/ds-utils": "^1.5.0"
37
+ "@synerise/ds-button": "^1.5.2",
38
+ "@synerise/ds-icon": "^1.9.1",
39
+ "@synerise/ds-scrollbar": "^1.2.2",
40
+ "@synerise/ds-typography": "^1.0.25",
41
+ "@synerise/ds-utils": "^1.5.1"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "@synerise/ds-core": "*",
45
45
  "react": ">=16.9.0 <= 18.3.1",
46
46
  "styled-components": "^5.3.3"
47
47
  },
48
- "gitHead": "d5bd7fbc9d840ac30e2b79b36c451b486e178445"
48
+ "gitHead": "b1279d5354132a2bf0b6f0cfa343db4c6c928f72"
49
49
  }