@synerise/ds-panel 1.1.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/CHANGELOG.md +10 -0
- package/LICENSE.md +21 -0
- package/README.md +39 -0
- package/dist/Panel.const.d.ts +2 -0
- package/dist/Panel.const.js +2 -0
- package/dist/Panel.d.ts +4 -0
- package/dist/Panel.js +16 -0
- package/dist/Panel.styles.d.ts +3 -0
- package/dist/Panel.styles.js +10 -0
- package/dist/Panel.types.d.ts +4 -0
- package/dist/Panel.types.js +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/modules.d.js +1 -0
- package/package.json +45 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
+
|
|
6
|
+
# 1.1.0 (2026-02-02)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **panel:** new component ([a9d4ff8](https://github.com/Synerise/synerise-design/commit/a9d4ff8f766e2a7b6b6fe34068d7231584eb3056))
|
package/LICENSE.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2019 Synerise
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: panel
|
|
3
|
+
title: Panel
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Panel UI Component
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
```
|
|
10
|
+
npm i @synerise/ds-panel
|
|
11
|
+
or
|
|
12
|
+
yarn add @synerise/ds-panel
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
```
|
|
17
|
+
import Panel from '@synerise/ds-panel'
|
|
18
|
+
|
|
19
|
+
<Panel />
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Demo
|
|
24
|
+
|
|
25
|
+
<iframe src="/storybook-static/iframe.html?id=components-panel--default"></iframe>
|
|
26
|
+
|
|
27
|
+
## API
|
|
28
|
+
|
|
29
|
+
### PanelProps
|
|
30
|
+
|
|
31
|
+
| Property | Description | Type | Default | |
|
|
32
|
+
|------------|-------------------------------------------|-----------------------------|---------|---|
|
|
33
|
+
| `radius` | Border radius of the panel in pixels | `number` | `8` | |
|
|
34
|
+
| `p` | Padding applied to the panel | `string \ number` | `8` | |
|
|
35
|
+
| `children` | Panel content | `React.ReactNode` | - | |
|
|
36
|
+
| `ref` | Forward ref to the underlying DOM element | `React.Ref<HTMLDivElement>` | - | |
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
**Note:** Panel also accepts all standard `BoxProps` from `@rebass/grid`, including:
|
package/dist/Panel.d.ts
ADDED
package/dist/Panel.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
var _excluded = ["children"];
|
|
2
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
4
|
+
import React, { forwardRef } from 'react';
|
|
5
|
+
import { DEFAULT_PADDING, DEFAULT_RADIUS } from './Panel.const';
|
|
6
|
+
import * as S from './Panel.styles';
|
|
7
|
+
var Panel = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
8
|
+
var children = _ref.children,
|
|
9
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
10
|
+
return /*#__PURE__*/React.createElement(S.PanelWrapper, _extends({
|
|
11
|
+
ref: ref,
|
|
12
|
+
p: DEFAULT_PADDING,
|
|
13
|
+
radius: DEFAULT_RADIUS
|
|
14
|
+
}, props), children);
|
|
15
|
+
});
|
|
16
|
+
export default Panel;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { Box } from '@synerise/ds-flex-box';
|
|
3
|
+
export var PanelWrapper = styled(Box).withConfig({
|
|
4
|
+
displayName: "Panelstyles__PanelWrapper",
|
|
5
|
+
componentId: "sc-xt9txn-0"
|
|
6
|
+
})(["border:solid 1px ", ";border-radius:", "px;"], function (props) {
|
|
7
|
+
return props.theme.palette['grey-200'];
|
|
8
|
+
}, function (props) {
|
|
9
|
+
return props.radius;
|
|
10
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Panel';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
package/package.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@synerise/ds-panel",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "Panel UI Component for the Synerise Design System",
|
|
5
|
+
"license": "ISC",
|
|
6
|
+
"repository": "Synerise/synerise-design",
|
|
7
|
+
"main": "dist/index.js",
|
|
8
|
+
"files": [
|
|
9
|
+
"/dist",
|
|
10
|
+
"CHANGELOG.md",
|
|
11
|
+
"README.md",
|
|
12
|
+
"package.json",
|
|
13
|
+
"LICENSE.md"
|
|
14
|
+
],
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public"
|
|
17
|
+
},
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "npm run build:js && npm run build:css && npm run defs",
|
|
20
|
+
"build:css": "node ../../../scripts/style/less.js",
|
|
21
|
+
"build:js": "babel --delete-dir-on-start --root-mode upward src --out-dir dist --extensions '.js,.ts,.tsx'",
|
|
22
|
+
"build:watch": "npm run build:js -- --watch",
|
|
23
|
+
"defs": "tsc --declaration --outDir dist/ --emitDeclarationOnly",
|
|
24
|
+
"prepublish": "npm run build",
|
|
25
|
+
"types": "tsc --noEmit",
|
|
26
|
+
"pack:ci": "pnpm pack --pack-destination ../../storybook/storybook-static/static",
|
|
27
|
+
"test": "jest",
|
|
28
|
+
"test:watch": "npm run test -- --watchAll",
|
|
29
|
+
"check:circular-dependencies": "madge --circular --extensions ts,tsx,js,jsx --ts-config tsconfig.json src/ --exclude '/dist/'",
|
|
30
|
+
"upgrade:ds": "ncu -f \"@synerise/ds-*\" -u"
|
|
31
|
+
},
|
|
32
|
+
"sideEffects": [
|
|
33
|
+
"dist/style/*",
|
|
34
|
+
"*.less"
|
|
35
|
+
],
|
|
36
|
+
"types": "dist/index.d.ts",
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@synerise/ds-flex-box": "^1.1.0"
|
|
39
|
+
},
|
|
40
|
+
"peerDependencies": {
|
|
41
|
+
"@synerise/ds-core": "*",
|
|
42
|
+
"react": ">=16.9.0 <= 18.3.1"
|
|
43
|
+
},
|
|
44
|
+
"gitHead": "6a3a82f8bc80e10eeb818795035e05393550e82e"
|
|
45
|
+
}
|