@nuralyui/layout 0.0.1 → 0.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/README.md +77 -0
- package/dist/LICENSE +28 -0
- package/dist/README.md +77 -0
- package/dist/VERSIONS.md +13 -0
- package/dist/card/card.component.d.ts +30 -0
- package/dist/card/card.component.d.ts.map +1 -0
- package/dist/card/card.component.js +64 -0
- package/dist/card/card.component.js.map +1 -0
- package/dist/card/card.style.d.ts +2 -0
- package/dist/card/card.style.d.ts.map +1 -0
- package/dist/card/card.style.js +62 -0
- package/dist/card/card.style.js.map +1 -0
- package/dist/card/card.type.d.ts +6 -0
- package/dist/card/card.type.d.ts.map +1 -0
- package/dist/card/card.type.js +2 -0
- package/dist/card/card.type.js.map +1 -0
- package/dist/card/card.types.d.ts +17 -0
- package/dist/card/card.types.d.ts.map +1 -0
- package/dist/card/card.types.js +2 -0
- package/dist/card/card.types.js.map +1 -0
- package/dist/card/demo/hy-card-demo.d.ts +8 -0
- package/dist/card/demo/hy-card-demo.d.ts.map +1 -0
- package/dist/card/demo/hy-card-demo.js +44 -0
- package/dist/card/demo/hy-card-demo.js.map +1 -0
- package/dist/card/index.d.ts +3 -0
- package/dist/card/index.d.ts.map +1 -0
- package/dist/card/index.js +3 -0
- package/dist/card/index.js.map +1 -0
- package/dist/card/package.json +26 -0
- package/dist/card/react.d.ts +5 -0
- package/dist/card/react.d.ts.map +1 -0
- package/dist/card/react.js +12 -0
- package/dist/card/react.js.map +1 -0
- package/dist/flex/flex.component.d.ts +89 -0
- package/dist/flex/flex.component.d.ts.map +1 -0
- package/dist/flex/flex.component.js +178 -0
- package/dist/flex/flex.component.js.map +1 -0
- package/dist/flex/flex.style.d.ts +6 -0
- package/dist/flex/flex.style.d.ts.map +1 -0
- package/dist/flex/flex.style.js +101 -0
- package/dist/flex/flex.style.js.map +1 -0
- package/dist/flex/flex.types.d.ts +63 -0
- package/dist/flex/flex.types.d.ts.map +1 -0
- package/dist/flex/flex.types.js +5 -0
- package/dist/flex/flex.types.js.map +1 -0
- package/dist/flex/index.d.ts +3 -0
- package/dist/flex/index.d.ts.map +1 -0
- package/dist/flex/index.js +3 -0
- package/dist/flex/index.js.map +1 -0
- package/dist/flex/package.json +49 -0
- package/dist/flex/react.d.ts +3 -0
- package/dist/flex/react.d.ts.map +1 -0
- package/dist/flex/react.js +10 -0
- package/dist/flex/react.js.map +1 -0
- package/dist/grid/col.component.d.ts +103 -0
- package/dist/grid/col.component.d.ts.map +1 -0
- package/dist/grid/col.component.js +253 -0
- package/dist/grid/col.component.js.map +1 -0
- package/dist/grid/col.style.d.ts +6 -0
- package/dist/grid/col.style.d.ts.map +1 -0
- package/dist/grid/col.style.js +117 -0
- package/dist/grid/col.style.js.map +1 -0
- package/dist/grid/grid.types.d.ts +80 -0
- package/dist/grid/grid.types.d.ts.map +1 -0
- package/dist/grid/grid.types.js +16 -0
- package/dist/grid/grid.types.js.map +1 -0
- package/dist/grid/index.d.ts +4 -0
- package/dist/grid/index.d.ts.map +1 -0
- package/dist/grid/index.js +4 -0
- package/dist/grid/index.js.map +1 -0
- package/dist/grid/package.json +52 -0
- package/dist/grid/react.d.ts +5 -0
- package/dist/grid/react.d.ts.map +1 -0
- package/dist/grid/react.js +17 -0
- package/dist/grid/react.js.map +1 -0
- package/dist/grid/row.component.d.ts +83 -0
- package/dist/grid/row.component.d.ts.map +1 -0
- package/dist/grid/row.component.js +197 -0
- package/dist/grid/row.component.js.map +1 -0
- package/dist/grid/row.style.d.ts +6 -0
- package/dist/grid/row.style.d.ts.map +1 -0
- package/dist/grid/row.style.js +68 -0
- package/dist/grid/row.style.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/layout/content.component.d.ts.map +1 -0
- package/dist/layout/content.component.js.map +1 -0
- package/dist/layout/content.style.d.ts.map +1 -0
- package/dist/layout/content.style.js.map +1 -0
- package/dist/layout/footer.component.d.ts.map +1 -0
- package/dist/layout/footer.component.js.map +1 -0
- package/dist/layout/footer.style.d.ts.map +1 -0
- package/dist/layout/footer.style.js.map +1 -0
- package/dist/layout/header.component.d.ts.map +1 -0
- package/dist/layout/header.component.js.map +1 -0
- package/dist/layout/header.style.d.ts.map +1 -0
- package/dist/layout/header.style.js.map +1 -0
- package/dist/layout/index.d.ts.map +1 -0
- package/dist/layout/index.js.map +1 -0
- package/dist/layout/layout.component.d.ts.map +1 -0
- package/dist/layout/layout.component.js.map +1 -0
- package/dist/layout/layout.style.d.ts.map +1 -0
- package/dist/layout/layout.style.js.map +1 -0
- package/dist/layout/layout.types.d.ts.map +1 -0
- package/dist/layout/layout.types.js.map +1 -0
- package/dist/layout/package.json +38 -0
- package/dist/layout/react.d.ts.map +1 -0
- package/dist/layout/react.js.map +1 -0
- package/dist/layout/sider.component.d.ts.map +1 -0
- package/dist/layout/sider.component.js.map +1 -0
- package/dist/layout/sider.style.d.ts.map +1 -0
- package/dist/layout/sider.style.js.map +1 -0
- package/dist/react.d.ts +4 -0
- package/dist/react.js +4 -0
- package/dist/versions.json +6 -0
- package/package.json +73 -34
- package/bundle.js +0 -297
- /package/{content.component.d.ts → dist/layout/content.component.d.ts} +0 -0
- /package/{content.component.js → dist/layout/content.component.js} +0 -0
- /package/{content.style.d.ts → dist/layout/content.style.d.ts} +0 -0
- /package/{content.style.js → dist/layout/content.style.js} +0 -0
- /package/{footer.component.d.ts → dist/layout/footer.component.d.ts} +0 -0
- /package/{footer.component.js → dist/layout/footer.component.js} +0 -0
- /package/{footer.style.d.ts → dist/layout/footer.style.d.ts} +0 -0
- /package/{footer.style.js → dist/layout/footer.style.js} +0 -0
- /package/{header.component.d.ts → dist/layout/header.component.d.ts} +0 -0
- /package/{header.component.js → dist/layout/header.component.js} +0 -0
- /package/{header.style.d.ts → dist/layout/header.style.d.ts} +0 -0
- /package/{header.style.js → dist/layout/header.style.js} +0 -0
- /package/{index.d.ts → dist/layout/index.d.ts} +0 -0
- /package/{index.js → dist/layout/index.js} +0 -0
- /package/{layout.component.d.ts → dist/layout/layout.component.d.ts} +0 -0
- /package/{layout.component.js → dist/layout/layout.component.js} +0 -0
- /package/{layout.style.d.ts → dist/layout/layout.style.d.ts} +0 -0
- /package/{layout.style.js → dist/layout/layout.style.js} +0 -0
- /package/{layout.types.d.ts → dist/layout/layout.types.d.ts} +0 -0
- /package/{layout.types.js → dist/layout/layout.types.js} +0 -0
- /package/{react.d.ts → dist/layout/react.d.ts} +0 -0
- /package/{react.js → dist/layout/react.js} +0 -0
- /package/{sider.component.d.ts → dist/layout/sider.component.d.ts} +0 -0
- /package/{sider.component.js → dist/layout/sider.component.js} +0 -0
- /package/{sider.style.d.ts → dist/layout/sider.style.d.ts} +0 -0
- /package/{sider.style.js → dist/layout/sider.style.js} +0 -0
package/README.md
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# @nuralyui/layout
|
|
2
|
+
|
|
3
|
+
Layout components package for Nuraly UI Library. This package contains responsive layout and container components.
|
|
4
|
+
|
|
5
|
+
[](https://badge.fury.io/js/@nuralyui%2Flayout)
|
|
6
|
+
[](https://opensource.org/licenses/BSD-3-Clause)
|
|
7
|
+
|
|
8
|
+
## 📦 Included Components
|
|
9
|
+
|
|
10
|
+
- **layout** - Main layout container with header, footer, sider support
|
|
11
|
+
- **grid** - Responsive grid system
|
|
12
|
+
- **flex** - Flexbox layout utilities
|
|
13
|
+
- **card** - Content cards with header and actions
|
|
14
|
+
|
|
15
|
+
## 🚀 Installation
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install @nuralyui/layout
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## 📖 Usage
|
|
22
|
+
|
|
23
|
+
### Import All Layout Components
|
|
24
|
+
|
|
25
|
+
```javascript
|
|
26
|
+
import '@nuralyui/layout';
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Import Individual Components
|
|
30
|
+
|
|
31
|
+
```javascript
|
|
32
|
+
import '@nuralyui/layout/layout';
|
|
33
|
+
import '@nuralyui/layout/grid';
|
|
34
|
+
import '@nuralyui/layout/flex';
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### HTML Usage
|
|
38
|
+
|
|
39
|
+
```html
|
|
40
|
+
<nr-layout>
|
|
41
|
+
<nr-header slot="header">Header</nr-header>
|
|
42
|
+
<nr-content>Main Content</nr-content>
|
|
43
|
+
<nr-footer slot="footer">Footer</nr-footer>
|
|
44
|
+
</nr-layout>
|
|
45
|
+
|
|
46
|
+
<nr-grid cols="3" gap="1rem">
|
|
47
|
+
<div>Column 1</div>
|
|
48
|
+
<div>Column 2</div>
|
|
49
|
+
<div>Column 3</div>
|
|
50
|
+
</nr-grid>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### React Usage
|
|
54
|
+
|
|
55
|
+
```tsx
|
|
56
|
+
import { NrLayout, NrHeader, NrContent, NrFooter, NrGrid } from '@nuralyui/layout/react';
|
|
57
|
+
|
|
58
|
+
function App() {
|
|
59
|
+
return (
|
|
60
|
+
<NrLayout>
|
|
61
|
+
<NrHeader slot="header">My App</NrHeader>
|
|
62
|
+
<NrContent>Main content here</NrContent>
|
|
63
|
+
<NrFooter slot="footer">© 2025</NrFooter>
|
|
64
|
+
</NrLayout>
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## 📊 Component Versions
|
|
70
|
+
|
|
71
|
+
See the `VERSIONS.md` file in the package for component version information.
|
|
72
|
+
|
|
73
|
+
## 🔗 Links
|
|
74
|
+
|
|
75
|
+
- [GitHub Repository](https://github.com/NuralyUI/NuralyUI)
|
|
76
|
+
- [Documentation](https://nuralyui.github.io)
|
|
77
|
+
- [NPM Organization](https://www.npmjs.com/org/nuralyui)
|
package/dist/LICENSE
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2019 Google LLC. All rights reserved.
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
9
|
+
list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
+
this list of conditions and the following disclaimer in the documentation
|
|
13
|
+
and/or other materials provided with the distribution.
|
|
14
|
+
|
|
15
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
16
|
+
contributors may be used to endorse or promote products derived from
|
|
17
|
+
this software without specific prior written permission.
|
|
18
|
+
|
|
19
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
20
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
21
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
22
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
23
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
24
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
25
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
26
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
27
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
28
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
package/dist/README.md
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# @nuralyui/layout
|
|
2
|
+
|
|
3
|
+
Layout components package for Nuraly UI Library. This package contains responsive layout and container components.
|
|
4
|
+
|
|
5
|
+
[](https://badge.fury.io/js/@nuralyui%2Flayout)
|
|
6
|
+
[](https://opensource.org/licenses/BSD-3-Clause)
|
|
7
|
+
|
|
8
|
+
## 📦 Included Components
|
|
9
|
+
|
|
10
|
+
- **layout** - Main layout container with header, footer, sider support
|
|
11
|
+
- **grid** - Responsive grid system
|
|
12
|
+
- **flex** - Flexbox layout utilities
|
|
13
|
+
- **card** - Content cards with header and actions
|
|
14
|
+
|
|
15
|
+
## 🚀 Installation
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install @nuralyui/layout
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## 📖 Usage
|
|
22
|
+
|
|
23
|
+
### Import All Layout Components
|
|
24
|
+
|
|
25
|
+
```javascript
|
|
26
|
+
import '@nuralyui/layout';
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Import Individual Components
|
|
30
|
+
|
|
31
|
+
```javascript
|
|
32
|
+
import '@nuralyui/layout/layout';
|
|
33
|
+
import '@nuralyui/layout/grid';
|
|
34
|
+
import '@nuralyui/layout/flex';
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### HTML Usage
|
|
38
|
+
|
|
39
|
+
```html
|
|
40
|
+
<nr-layout>
|
|
41
|
+
<nr-header slot="header">Header</nr-header>
|
|
42
|
+
<nr-content>Main Content</nr-content>
|
|
43
|
+
<nr-footer slot="footer">Footer</nr-footer>
|
|
44
|
+
</nr-layout>
|
|
45
|
+
|
|
46
|
+
<nr-grid cols="3" gap="1rem">
|
|
47
|
+
<div>Column 1</div>
|
|
48
|
+
<div>Column 2</div>
|
|
49
|
+
<div>Column 3</div>
|
|
50
|
+
</nr-grid>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### React Usage
|
|
54
|
+
|
|
55
|
+
```tsx
|
|
56
|
+
import { NrLayout, NrHeader, NrContent, NrFooter, NrGrid } from '@nuralyui/layout/react';
|
|
57
|
+
|
|
58
|
+
function App() {
|
|
59
|
+
return (
|
|
60
|
+
<NrLayout>
|
|
61
|
+
<NrHeader slot="header">My App</NrHeader>
|
|
62
|
+
<NrContent>Main content here</NrContent>
|
|
63
|
+
<NrFooter slot="footer">© 2025</NrFooter>
|
|
64
|
+
</NrLayout>
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## 📊 Component Versions
|
|
70
|
+
|
|
71
|
+
See the `VERSIONS.md` file in the package for component version information.
|
|
72
|
+
|
|
73
|
+
## 🔗 Links
|
|
74
|
+
|
|
75
|
+
- [GitHub Repository](https://github.com/NuralyUI/NuralyUI)
|
|
76
|
+
- [Documentation](https://nuralyui.github.io)
|
|
77
|
+
- [NPM Organization](https://www.npmjs.com/org/nuralyui)
|
package/dist/VERSIONS.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Component Versions
|
|
2
|
+
|
|
3
|
+
This package includes the following layout components with their respective versions:
|
|
4
|
+
|
|
5
|
+
- **layout**: v0.0.1
|
|
6
|
+
- **grid**: v0.0.1
|
|
7
|
+
- **flex**: v0.0.1
|
|
8
|
+
- **card**: v0.0.6
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
**Package Version**: 0.1.0
|
|
13
|
+
**Build Date**: 2025-10-14
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import { CardSize } from './card.types.js';
|
|
3
|
+
declare const NrCardElement_base: (new (...args: any[]) => import("../../shared/dependency-mixin.js").DependencyAware) & (new (...args: any[]) => import("../../shared/theme-mixin.js").ThemeAware) & (new (...args: any[]) => import("../../shared/event-handler-mixin.js").EventHandlerCapable) & typeof LitElement;
|
|
4
|
+
/**
|
|
5
|
+
* Card component for displaying content in a structured container
|
|
6
|
+
*
|
|
7
|
+
* @element nr-card
|
|
8
|
+
* @slot content - Content to be displayed in the card body
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```html
|
|
12
|
+
* <nr-card header="Card Title" size="medium">
|
|
13
|
+
* <div slot="content">Card content goes here</div>
|
|
14
|
+
* </nr-card>
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare class NrCardElement extends NrCardElement_base {
|
|
18
|
+
static styles: import("lit").CSSResult;
|
|
19
|
+
/**
|
|
20
|
+
* Header text displayed at the top of the card
|
|
21
|
+
*/
|
|
22
|
+
header: string;
|
|
23
|
+
/**
|
|
24
|
+
* Size variant of the card
|
|
25
|
+
*/
|
|
26
|
+
size: CardSize;
|
|
27
|
+
render(): import("lit").TemplateResult<1>;
|
|
28
|
+
}
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=card.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.component.d.ts","sourceRoot":"","sources":["../../../src/components/card/card.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,UAAU,EAAE,MAAM,KAAK,CAAC;AAGvC,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;;AAI3C;;;;;;;;;;;;GAYG;AACH,qBACa,aAAc,SAAQ,kBAA6B;IAC9D,OAAgB,MAAM,0BAAU;IAEhC;;OAEG;IACyB,MAAM,SAAM;IAExC;;OAEG;IACyB,IAAI,WAAoB;IAE3C,MAAM;CAehB"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { html, LitElement } from 'lit';
|
|
8
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
9
|
+
import { styles } from './card.style.js';
|
|
10
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
11
|
+
import { NuralyUIBaseMixin } from '../../shared/base-mixin.js';
|
|
12
|
+
/**
|
|
13
|
+
* Card component for displaying content in a structured container
|
|
14
|
+
*
|
|
15
|
+
* @element nr-card
|
|
16
|
+
* @slot content - Content to be displayed in the card body
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```html
|
|
20
|
+
* <nr-card header="Card Title" size="medium">
|
|
21
|
+
* <div slot="content">Card content goes here</div>
|
|
22
|
+
* </nr-card>
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
let NrCardElement = class NrCardElement extends NuralyUIBaseMixin(LitElement) {
|
|
26
|
+
constructor() {
|
|
27
|
+
super(...arguments);
|
|
28
|
+
/**
|
|
29
|
+
* Header text displayed at the top of the card
|
|
30
|
+
*/
|
|
31
|
+
this.header = '';
|
|
32
|
+
/**
|
|
33
|
+
* Size variant of the card
|
|
34
|
+
*/
|
|
35
|
+
this.size = "default" /* CardSize.Default */;
|
|
36
|
+
}
|
|
37
|
+
render() {
|
|
38
|
+
return html `
|
|
39
|
+
<div
|
|
40
|
+
class="card ${classMap({
|
|
41
|
+
'card--small': this.size === "small" /* CardSize.Small */,
|
|
42
|
+
'card--large': this.size === "large" /* CardSize.Large */
|
|
43
|
+
})}"
|
|
44
|
+
>
|
|
45
|
+
${this.header ? html `<div class="card__header">${this.header}</div>` : ''}
|
|
46
|
+
<div class="card__content">
|
|
47
|
+
<slot name="content"></slot>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
`;
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
NrCardElement.styles = styles;
|
|
54
|
+
__decorate([
|
|
55
|
+
property({ type: String })
|
|
56
|
+
], NrCardElement.prototype, "header", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
property({ type: String })
|
|
59
|
+
], NrCardElement.prototype, "size", void 0);
|
|
60
|
+
NrCardElement = __decorate([
|
|
61
|
+
customElement('nr-card')
|
|
62
|
+
], NrCardElement);
|
|
63
|
+
export { NrCardElement };
|
|
64
|
+
//# sourceMappingURL=card.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.component.js","sourceRoot":"","sources":["../../../src/components/card/card.component.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D;;;;;;;;;;;;GAYG;AAEH,IAAa,aAAa,GAA1B,MAAa,aAAc,SAAQ,iBAAiB,CAAC,UAAU,CAAC;IAAhE;;QAGE;;WAEG;QACyB,WAAM,GAAG,EAAE,CAAC;QAExC;;WAEG;QACyB,SAAI,oCAAoB;IAiBtD,CAAC;IAfU,MAAM;QACb,OAAO,IAAI,CAAA;;sBAEO,QAAQ,CAAC;YACrB,aAAa,EAAE,IAAI,CAAC,IAAI,iCAAmB;YAC3C,aAAa,EAAE,IAAI,CAAC,IAAI,iCAAmB;SAC5C,CAAC;;UAEA,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAA,6BAA6B,IAAI,CAAC,MAAM,QAAQ,CAAC,CAAC,CAAC,EAAE;;;;;KAK5E,CAAC;IACJ,CAAC;CACF,CAAA;AA3BiB,oBAAM,GAAG,MAAO,CAAA;AAKJ;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CAAa;AAKZ;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CAAyB;AAXzC,aAAa;IADzB,aAAa,CAAC,SAAS,CAAC;GACZ,aAAa,CA4BzB;SA5BY,aAAa","sourcesContent":["import { html, LitElement } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { styles } from './card.style.js';\nimport { CardSize } from './card.types.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { NuralyUIBaseMixin } from '../../shared/base-mixin.js';\n\n/**\n * Card component for displaying content in a structured container\n * \n * @element nr-card\n * @slot content - Content to be displayed in the card body\n * \n * @example\n * ```html\n * <nr-card header=\"Card Title\" size=\"medium\">\n * <div slot=\"content\">Card content goes here</div>\n * </nr-card>\n * ```\n */\n@customElement('nr-card')\nexport class NrCardElement extends NuralyUIBaseMixin(LitElement) {\n static override styles = styles;\n\n /**\n * Header text displayed at the top of the card\n */\n @property({ type: String }) header = '';\n\n /**\n * Size variant of the card\n */\n @property({ type: String }) size = CardSize.Default;\n\n override render() {\n return html`\n <div\n class=\"card ${classMap({\n 'card--small': this.size === CardSize.Small,\n 'card--large': this.size === CardSize.Large\n })}\"\n >\n ${this.header ? html`<div class=\"card__header\">${this.header}</div>` : ''}\n <div class=\"card__content\">\n <slot name=\"content\"></slot>\n </div>\n </div>\n `;\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.style.d.ts","sourceRoot":"","sources":["../../../src/components/card/card.style.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,yBA2DlB,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
export const styles = css `
|
|
3
|
+
:host {
|
|
4
|
+
display: block;
|
|
5
|
+
color: var(--nuraly-color-text);
|
|
6
|
+
background-color: var(--nuraly-color-background);
|
|
7
|
+
font-family: var(--nuraly-card-font-family);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.card {
|
|
11
|
+
background-color: var(--nuraly-card-background-color);
|
|
12
|
+
border-radius: var(--nuraly-card-border-radius);
|
|
13
|
+
border: var(--nuraly-card-border);
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
transition: var(--nuraly-card-transition);
|
|
16
|
+
box-shadow: var(--nuraly-card-shadow);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.card:hover {
|
|
20
|
+
cursor: var(--nuraly-card-cursor);
|
|
21
|
+
box-shadow: var(--nuraly-card-hover-shadow);
|
|
22
|
+
background-color: var(--nuraly-card-hover-background-color);
|
|
23
|
+
border-color: var(--nuraly-card-hover-border-color);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.card__header {
|
|
27
|
+
font-weight: var(--nuraly-card-header-font-weight);
|
|
28
|
+
border-bottom: var(--nuraly-card-header-border-bottom);
|
|
29
|
+
padding: var(--nuraly-card-padding);
|
|
30
|
+
background-color: var(--nuraly-card-header-background-color);
|
|
31
|
+
font-size: var(--nuraly-card-font-size);
|
|
32
|
+
color: var(--nuraly-card-header-color);
|
|
33
|
+
line-height: var(--nuraly-card-line-height);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.card__content {
|
|
37
|
+
padding: var(--nuraly-card-padding);
|
|
38
|
+
color: var(--nuraly-card-content-color);
|
|
39
|
+
font-size: var(--nuraly-card-font-size);
|
|
40
|
+
line-height: var(--nuraly-card-line-height);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/* Size variants */
|
|
44
|
+
.card--small .card__header,
|
|
45
|
+
.card--small .card__content {
|
|
46
|
+
padding: var(--nuraly-card-small-padding);
|
|
47
|
+
font-size: var(--nuraly-card-small-font-size);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.card--large .card__header,
|
|
51
|
+
.card--large .card__content {
|
|
52
|
+
padding: var(--nuraly-card-large-padding);
|
|
53
|
+
font-size: var(--nuraly-card-large-font-size);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* Focus styles for accessibility */
|
|
57
|
+
.card:focus-within {
|
|
58
|
+
outline: var(--nuraly-card-focus-outline);
|
|
59
|
+
outline-offset: var(--nuraly-card-focus-offset);
|
|
60
|
+
}
|
|
61
|
+
`;
|
|
62
|
+
//# sourceMappingURL=card.style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.style.js","sourceRoot":"","sources":["../../../src/components/card/card.style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2DxB,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css`\n :host {\n display: block;\n color: var(--nuraly-color-text);\n background-color: var(--nuraly-color-background);\n font-family: var(--nuraly-card-font-family);\n }\n\n .card {\n background-color: var(--nuraly-card-background-color);\n border-radius: var(--nuraly-card-border-radius);\n border: var(--nuraly-card-border);\n overflow: hidden;\n transition: var(--nuraly-card-transition);\n box-shadow: var(--nuraly-card-shadow);\n }\n\n .card:hover {\n cursor: var(--nuraly-card-cursor);\n box-shadow: var(--nuraly-card-hover-shadow);\n background-color: var(--nuraly-card-hover-background-color);\n border-color: var(--nuraly-card-hover-border-color);\n }\n\n .card__header {\n font-weight: var(--nuraly-card-header-font-weight);\n border-bottom: var(--nuraly-card-header-border-bottom);\n padding: var(--nuraly-card-padding);\n background-color: var(--nuraly-card-header-background-color);\n font-size: var(--nuraly-card-font-size);\n color: var(--nuraly-card-header-color);\n line-height: var(--nuraly-card-line-height);\n }\n\n .card__content {\n padding: var(--nuraly-card-padding);\n color: var(--nuraly-card-content-color);\n font-size: var(--nuraly-card-font-size);\n line-height: var(--nuraly-card-line-height);\n }\n\n /* Size variants */\n .card--small .card__header,\n .card--small .card__content {\n padding: var(--nuraly-card-small-padding);\n font-size: var(--nuraly-card-small-font-size);\n }\n\n .card--large .card__header,\n .card--large .card__content {\n padding: var(--nuraly-card-large-padding);\n font-size: var(--nuraly-card-large-font-size);\n }\n\n /* Focus styles for accessibility */\n .card:focus-within {\n outline: var(--nuraly-card-focus-outline);\n outline-offset: var(--nuraly-card-focus-offset);\n }\n`;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.type.d.ts","sourceRoot":"","sources":["../../../src/components/card/card.type.ts"],"names":[],"mappings":"AAAA,0BAAkB,QAAQ;IACxB,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,KAAK,UAAU;CAChB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.type.js","sourceRoot":"","sources":["../../../src/components/card/card.type.ts"],"names":[],"mappings":"","sourcesContent":["export const enum CardSize {\n Small = 'small',\n Default = 'default',\n Large = 'large',\n}\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Card size variants
|
|
3
|
+
*/
|
|
4
|
+
export declare const enum CardSize {
|
|
5
|
+
Small = "small",
|
|
6
|
+
Default = "default",
|
|
7
|
+
Large = "large"
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Card configuration interface
|
|
11
|
+
*/
|
|
12
|
+
export interface CardConfig {
|
|
13
|
+
header?: string;
|
|
14
|
+
size?: CardSize;
|
|
15
|
+
clickable?: boolean;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=card.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.types.d.ts","sourceRoot":"","sources":["../../../src/components/card/card.types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,0BAAkB,QAAQ;IACxB,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,KAAK,UAAU;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.types.js","sourceRoot":"","sources":["../../../src/components/card/card.types.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Card size variants\n */\nexport const enum CardSize {\n Small = 'small',\n Default = 'default',\n Large = 'large',\n}\n\n/**\n * Card configuration interface\n */\nexport interface CardConfig {\n header?: string;\n size?: CardSize;\n clickable?: boolean;\n}\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import '../card.component.js';
|
|
3
|
+
import '../../button/demo/buttons-demo.js';
|
|
4
|
+
export declare class HyCardDemo extends LitElement {
|
|
5
|
+
static styles: import("lit").CSSResult;
|
|
6
|
+
render(): import("lit").TemplateResult<1>;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=hy-card-demo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hy-card-demo.d.ts","sourceRoot":"","sources":["../../../../src/components/card/demo/hy-card-demo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,sBAAsB,CAAC;AAE9B,OAAO,mCAAmC,CAAC;AAE3C,qBACa,UAAW,SAAQ,UAAU;IACxC,OAAgB,MAAM,0BAKpB;IACO,MAAM;CAqBhB"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { css, html, LitElement } from 'lit';
|
|
8
|
+
import '../card.component.js';
|
|
9
|
+
import { customElement } from 'lit/decorators.js';
|
|
10
|
+
import '../../button/demo/buttons-demo.js';
|
|
11
|
+
let HyCardDemo = class HyCardDemo extends LitElement {
|
|
12
|
+
render() {
|
|
13
|
+
return html `
|
|
14
|
+
Default
|
|
15
|
+
<hy-card .header=${'welcome'}>
|
|
16
|
+
<p slot="content">hello</p>
|
|
17
|
+
</hy-card>
|
|
18
|
+
<br />
|
|
19
|
+
Small
|
|
20
|
+
|
|
21
|
+
<hy-card .size=${'small'} .header=${'welcome small'}>
|
|
22
|
+
<p slot="content">hello</p>
|
|
23
|
+
</hy-card>
|
|
24
|
+
<br />
|
|
25
|
+
|
|
26
|
+
Large
|
|
27
|
+
|
|
28
|
+
<hy-card .size=${'large'} .header=${'welcome large'}>
|
|
29
|
+
<p slot="content">hello</p>
|
|
30
|
+
</hy-card>
|
|
31
|
+
`;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
HyCardDemo.styles = css `
|
|
35
|
+
:host {
|
|
36
|
+
display: block;
|
|
37
|
+
width: 25%;
|
|
38
|
+
}
|
|
39
|
+
`;
|
|
40
|
+
HyCardDemo = __decorate([
|
|
41
|
+
customElement('hy-card-demo')
|
|
42
|
+
], HyCardDemo);
|
|
43
|
+
export { HyCardDemo };
|
|
44
|
+
//# sourceMappingURL=hy-card-demo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hy-card-demo.js","sourceRoot":"","sources":["../../../../src/components/card/demo/hy-card-demo.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,sBAAsB,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,mCAAmC,CAAC;AAG3C,IAAa,UAAU,GAAvB,MAAa,UAAW,SAAQ,UAAU;IAO/B,MAAM;QACb,OAAO,IAAI,CAAA;;yBAEU,SAAS;;;;;;uBAMX,OAAO,YAAY,eAAe;;;;;;;uBAOlC,OAAO,YAAY,eAAe;;;KAGpD,CAAC;IACJ,CAAC;CACF,CAAA;AA3BiB,iBAAM,GAAG,GAAG,CAAA;;;;;GAK1B,CAAA;AANS,UAAU;IADtB,aAAa,CAAC,cAAc,CAAC;GACjB,UAAU,CA4BtB;SA5BY,UAAU","sourcesContent":["import { css, html, LitElement } from 'lit';\nimport '../card.component.js';\nimport { customElement } from 'lit/decorators.js';\nimport '../../button/demo/buttons-demo.js';\n\n@customElement('hy-card-demo')\nexport class HyCardDemo extends LitElement {\n static override styles = css`\n :host {\n display: block;\n width: 25%;\n }\n `;\n override render() {\n return html`\n Default\n <hy-card .header=${'welcome'}>\n <p slot=\"content\">hello</p>\n </hy-card>\n <br />\n Small\n\n <hy-card .size=${'small'} .header=${'welcome small'}>\n <p slot=\"content\">hello</p>\n </hy-card>\n <br />\n\n Large\n\n <hy-card .size=${'large'} .header=${'welcome large'}>\n <p slot=\"content\">hello</p>\n </hy-card>\n `;\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/card/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/card/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC","sourcesContent":["export * from './card.component.js';\nexport * from './card.types.js';\n"]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nuralyui/card",
|
|
3
|
+
"version": "0.0.6",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
9
|
+
},
|
|
10
|
+
"author": "Labidi Aymen",
|
|
11
|
+
"license": "ISC",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"import": "./index.js"
|
|
15
|
+
},
|
|
16
|
+
"./bundle": {
|
|
17
|
+
"import": "./bundle.js"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"bundle.js",
|
|
22
|
+
"*.js",
|
|
23
|
+
"*.d.ts",
|
|
24
|
+
"*.js.map"
|
|
25
|
+
]
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../../src/components/card/react.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,eAAO,MAAM,MAAM;;EAOjB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createComponent } from '@lit-labs/react';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { NrCardElement } from './card.component.js';
|
|
4
|
+
export const NrCard = createComponent({
|
|
5
|
+
tagName: 'nr-card',
|
|
6
|
+
elementClass: NrCardElement,
|
|
7
|
+
react: React,
|
|
8
|
+
events: {
|
|
9
|
+
click: 'click',
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=react.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react.js","sourceRoot":"","sources":["../../../src/components/card/react.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,CAAC,MAAM,MAAM,GAAG,eAAe,CAAC;IACpC,OAAO,EAAE,SAAS;IAClB,YAAY,EAAE,aAAa;IAC3B,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE;QACN,KAAK,EAAE,OAAO;KACf;CACF,CAAC,CAAC","sourcesContent":["import { createComponent } from '@lit-labs/react';\nimport * as React from 'react';\nimport { NrCardElement } from './card.component.js';\n\nexport const NrCard = createComponent({\n tagName: 'nr-card',\n elementClass: NrCardElement,\n react: React,\n events: {\n click: 'click',\n },\n});\n"]}
|