@nuralyui/layout 0.0.3 → 0.1.1
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.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/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.style.d.ts.map +1 -0
- package/dist/layout/footer.component.d.ts.map +1 -0
- package/dist/layout/footer.style.d.ts.map +1 -0
- package/dist/layout/header.component.d.ts.map +1 -0
- package/dist/layout/header.style.d.ts.map +1 -0
- package/dist/layout/index.d.ts.map +1 -0
- package/dist/layout/layout.component.d.ts.map +1 -0
- package/dist/layout/layout.style.d.ts.map +1 -0
- package/dist/layout/layout.types.d.ts.map +1 -0
- package/dist/layout/package.json +43 -0
- package/dist/layout/react.d.ts.map +1 -0
- package/dist/layout/sider.component.d.ts.map +1 -0
- package/dist/layout/sider.style.d.ts.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 -39
- 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.component.js.map → dist/layout/content.component.js.map} +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/{content.style.js.map → dist/layout/content.style.js.map} +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.component.js.map → dist/layout/footer.component.js.map} +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/{footer.style.js.map → dist/layout/footer.style.js.map} +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.component.js.map → dist/layout/header.component.js.map} +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/{header.style.js.map → dist/layout/header.style.js.map} +0 -0
- /package/{index.d.ts → dist/layout/index.d.ts} +0 -0
- /package/{index.js → dist/layout/index.js} +0 -0
- /package/{index.js.map → dist/layout/index.js.map} +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.component.js.map → dist/layout/layout.component.js.map} +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.style.js.map → dist/layout/layout.style.js.map} +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/{layout.types.js.map → dist/layout/layout.types.js.map} +0 -0
- /package/{react.d.ts → dist/layout/react.d.ts} +0 -0
- /package/{react.js → dist/layout/react.js} +0 -0
- /package/{react.js.map → dist/layout/react.js.map} +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.component.js.map → dist/layout/sider.component.js.map} +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/{sider.style.js.map → dist/layout/sider.style.js.map} +0 -0
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
5
|
+
*/
|
|
6
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
7
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
9
|
+
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;
|
|
10
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
11
|
+
};
|
|
12
|
+
import { html, LitElement } from 'lit';
|
|
13
|
+
import { customElement, property, state } from 'lit/decorators.js';
|
|
14
|
+
import { styles } from './col.style.js';
|
|
15
|
+
import { NuralyUIBaseMixin } from '@nuralyui/common/mixins';
|
|
16
|
+
import { BREAKPOINTS, EMPTY_STRING } from './grid.types.js';
|
|
17
|
+
/**
|
|
18
|
+
* Column component for grid layout system
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```html
|
|
22
|
+
* <!-- Basic column with span -->
|
|
23
|
+
* <nr-col span="12">Half width</nr-col>
|
|
24
|
+
* <nr-col span="8">8/24 width</nr-col>
|
|
25
|
+
*
|
|
26
|
+
* <!-- Column with offset -->
|
|
27
|
+
* <nr-col span="12" offset="6">Offset by 6</nr-col>
|
|
28
|
+
*
|
|
29
|
+
* <!-- Responsive column -->
|
|
30
|
+
* <nr-col
|
|
31
|
+
* xs="24"
|
|
32
|
+
* sm="12"
|
|
33
|
+
* md="8"
|
|
34
|
+
* lg="6"
|
|
35
|
+
* >Responsive</nr-col>
|
|
36
|
+
*
|
|
37
|
+
* <!-- Column with order -->
|
|
38
|
+
* <nr-col span="6" order="4">Last</nr-col>
|
|
39
|
+
* <nr-col span="6" order="1">First</nr-col>
|
|
40
|
+
*
|
|
41
|
+
* <!-- Flex column -->
|
|
42
|
+
* <nr-col flex="auto">Auto flex</nr-col>
|
|
43
|
+
* <nr-col flex="1">Flex 1</nr-col>
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* @slot default - Column content
|
|
47
|
+
*/
|
|
48
|
+
let NrColElement = class NrColElement extends NuralyUIBaseMixin(LitElement) {
|
|
49
|
+
constructor() {
|
|
50
|
+
super(...arguments);
|
|
51
|
+
/** Number of columns to offset */
|
|
52
|
+
this.offset = 0;
|
|
53
|
+
/** Number of columns to pull */
|
|
54
|
+
this.pull = 0;
|
|
55
|
+
/** Number of columns to push */
|
|
56
|
+
this.push = 0;
|
|
57
|
+
/** Flex layout style */
|
|
58
|
+
this.flex = EMPTY_STRING;
|
|
59
|
+
/** Current breakpoint */
|
|
60
|
+
this.currentBreakpoint = "xs" /* GridBreakpoint.XS */;
|
|
61
|
+
}
|
|
62
|
+
connectedCallback() {
|
|
63
|
+
super.connectedCallback();
|
|
64
|
+
this.setupResponsive();
|
|
65
|
+
}
|
|
66
|
+
disconnectedCallback() {
|
|
67
|
+
var _a;
|
|
68
|
+
super.disconnectedCallback();
|
|
69
|
+
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Setup responsive breakpoint detection
|
|
73
|
+
*/
|
|
74
|
+
setupResponsive() {
|
|
75
|
+
this.updateBreakpoint();
|
|
76
|
+
this.resizeObserver = new ResizeObserver(() => {
|
|
77
|
+
this.updateBreakpoint();
|
|
78
|
+
});
|
|
79
|
+
this.resizeObserver.observe(document.documentElement);
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Update current breakpoint based on window width
|
|
83
|
+
*/
|
|
84
|
+
updateBreakpoint() {
|
|
85
|
+
const width = window.innerWidth;
|
|
86
|
+
let newBreakpoint;
|
|
87
|
+
if (width >= BREAKPOINTS.xxl) {
|
|
88
|
+
newBreakpoint = "xxl" /* GridBreakpoint.XXL */;
|
|
89
|
+
}
|
|
90
|
+
else if (width >= BREAKPOINTS.xl) {
|
|
91
|
+
newBreakpoint = "xl" /* GridBreakpoint.XL */;
|
|
92
|
+
}
|
|
93
|
+
else if (width >= BREAKPOINTS.lg) {
|
|
94
|
+
newBreakpoint = "lg" /* GridBreakpoint.LG */;
|
|
95
|
+
}
|
|
96
|
+
else if (width >= BREAKPOINTS.md) {
|
|
97
|
+
newBreakpoint = "md" /* GridBreakpoint.MD */;
|
|
98
|
+
}
|
|
99
|
+
else if (width >= BREAKPOINTS.sm) {
|
|
100
|
+
newBreakpoint = "sm" /* GridBreakpoint.SM */;
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
newBreakpoint = "xs" /* GridBreakpoint.XS */;
|
|
104
|
+
}
|
|
105
|
+
if (newBreakpoint !== this.currentBreakpoint) {
|
|
106
|
+
this.currentBreakpoint = newBreakpoint;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Get responsive configuration for current breakpoint
|
|
111
|
+
*/
|
|
112
|
+
getResponsiveConfig() {
|
|
113
|
+
const breakpoints = [
|
|
114
|
+
this.currentBreakpoint,
|
|
115
|
+
"xl" /* GridBreakpoint.XL */,
|
|
116
|
+
"lg" /* GridBreakpoint.LG */,
|
|
117
|
+
"md" /* GridBreakpoint.MD */,
|
|
118
|
+
"sm" /* GridBreakpoint.SM */,
|
|
119
|
+
"xs" /* GridBreakpoint.XS */
|
|
120
|
+
];
|
|
121
|
+
for (const bp of breakpoints) {
|
|
122
|
+
const value = this[bp];
|
|
123
|
+
if (value !== undefined) {
|
|
124
|
+
if (typeof value === 'number') {
|
|
125
|
+
return { span: value };
|
|
126
|
+
}
|
|
127
|
+
return value;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return {};
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Get computed column properties
|
|
134
|
+
*/
|
|
135
|
+
getColProperties() {
|
|
136
|
+
var _a, _b, _c, _d, _e;
|
|
137
|
+
const responsive = this.getResponsiveConfig();
|
|
138
|
+
return {
|
|
139
|
+
span: (_a = responsive.span) !== null && _a !== void 0 ? _a : this.span,
|
|
140
|
+
offset: (_b = responsive.offset) !== null && _b !== void 0 ? _b : this.offset,
|
|
141
|
+
order: (_c = responsive.order) !== null && _c !== void 0 ? _c : this.order,
|
|
142
|
+
pull: (_d = responsive.pull) !== null && _d !== void 0 ? _d : this.pull,
|
|
143
|
+
push: (_e = responsive.push) !== null && _e !== void 0 ? _e : this.push
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Get gutter from parent row
|
|
148
|
+
*/
|
|
149
|
+
getGutterFromParent() {
|
|
150
|
+
const parent = this.closest('nr-row');
|
|
151
|
+
if (parent) {
|
|
152
|
+
const gutter = parent.getAttribute('data-gutter');
|
|
153
|
+
return gutter ? parseInt(gutter, 10) : 0;
|
|
154
|
+
}
|
|
155
|
+
return 0;
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Get inline styles for column
|
|
159
|
+
*/
|
|
160
|
+
getColStyle() {
|
|
161
|
+
const styles = {};
|
|
162
|
+
const gutter = this.getGutterFromParent();
|
|
163
|
+
if (gutter > 0) {
|
|
164
|
+
styles['padding-left'] = `${gutter / 2}px`;
|
|
165
|
+
styles['padding-right'] = `${gutter / 2}px`;
|
|
166
|
+
}
|
|
167
|
+
if (this.flex) {
|
|
168
|
+
if (this.flex === 'auto') {
|
|
169
|
+
styles['flex'] = '1 1 auto';
|
|
170
|
+
}
|
|
171
|
+
else if (this.flex === 'none') {
|
|
172
|
+
styles['flex'] = '0 0 auto';
|
|
173
|
+
}
|
|
174
|
+
else if (typeof this.flex === 'number') {
|
|
175
|
+
styles['flex'] = `${this.flex} ${this.flex} auto`;
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
styles['flex'] = this.flex;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
return styles;
|
|
182
|
+
}
|
|
183
|
+
render() {
|
|
184
|
+
var _a;
|
|
185
|
+
const colStyle = this.getColStyle();
|
|
186
|
+
const props = this.getColProperties();
|
|
187
|
+
// Apply data attributes to :host for proper styling
|
|
188
|
+
this.setAttribute('data-span', ((_a = props.span) === null || _a === void 0 ? void 0 : _a.toString()) || '');
|
|
189
|
+
this.setAttribute('data-offset', props.offset.toString());
|
|
190
|
+
if (props.order !== undefined) {
|
|
191
|
+
this.setAttribute('data-order', props.order.toString());
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
this.removeAttribute('data-order');
|
|
195
|
+
}
|
|
196
|
+
this.setAttribute('data-pull', props.pull.toString());
|
|
197
|
+
this.setAttribute('data-push', props.push.toString());
|
|
198
|
+
this.setAttribute('data-theme', this.currentTheme);
|
|
199
|
+
return html `
|
|
200
|
+
<div
|
|
201
|
+
class="nr-col"
|
|
202
|
+
style="${Object.entries(colStyle).map(([key, value]) => `${key}: ${value}`).join('; ')}"
|
|
203
|
+
>
|
|
204
|
+
<slot></slot>
|
|
205
|
+
</div>
|
|
206
|
+
`;
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
NrColElement.styles = styles;
|
|
210
|
+
__decorate([
|
|
211
|
+
property({ type: Number })
|
|
212
|
+
], NrColElement.prototype, "span", void 0);
|
|
213
|
+
__decorate([
|
|
214
|
+
property({ type: Number })
|
|
215
|
+
], NrColElement.prototype, "offset", void 0);
|
|
216
|
+
__decorate([
|
|
217
|
+
property({ type: Number })
|
|
218
|
+
], NrColElement.prototype, "order", void 0);
|
|
219
|
+
__decorate([
|
|
220
|
+
property({ type: Number })
|
|
221
|
+
], NrColElement.prototype, "pull", void 0);
|
|
222
|
+
__decorate([
|
|
223
|
+
property({ type: Number })
|
|
224
|
+
], NrColElement.prototype, "push", void 0);
|
|
225
|
+
__decorate([
|
|
226
|
+
property({ type: String })
|
|
227
|
+
], NrColElement.prototype, "flex", void 0);
|
|
228
|
+
__decorate([
|
|
229
|
+
property({ type: Object })
|
|
230
|
+
], NrColElement.prototype, "xs", void 0);
|
|
231
|
+
__decorate([
|
|
232
|
+
property({ type: Object })
|
|
233
|
+
], NrColElement.prototype, "sm", void 0);
|
|
234
|
+
__decorate([
|
|
235
|
+
property({ type: Object })
|
|
236
|
+
], NrColElement.prototype, "md", void 0);
|
|
237
|
+
__decorate([
|
|
238
|
+
property({ type: Object })
|
|
239
|
+
], NrColElement.prototype, "lg", void 0);
|
|
240
|
+
__decorate([
|
|
241
|
+
property({ type: Object })
|
|
242
|
+
], NrColElement.prototype, "xl", void 0);
|
|
243
|
+
__decorate([
|
|
244
|
+
property({ type: Object })
|
|
245
|
+
], NrColElement.prototype, "xxl", void 0);
|
|
246
|
+
__decorate([
|
|
247
|
+
state()
|
|
248
|
+
], NrColElement.prototype, "currentBreakpoint", void 0);
|
|
249
|
+
NrColElement = __decorate([
|
|
250
|
+
customElement('nr-col')
|
|
251
|
+
], NrColElement);
|
|
252
|
+
export { NrColElement };
|
|
253
|
+
//# sourceMappingURL=col.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"col.component.js","sourceRoot":"","sources":["../../../src/components/grid/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F,CAAA;AAlNiB,mBAAM,GAAG,MAAO,CAAA;AAIhC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0CACb;AAId;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAChB;AAIX;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CACZ;AAIf;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0CAClB;AAIT;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0CAClB;AAIT;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0CACQ;AAInC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wCACL;AAItB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wCACL;AAItB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wCACL;AAItB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wCACL;AAItB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wCACL;AAItB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCACJ;AAIvB;IADC,KAAK,EAAE;uDACsD;AArDnD,YAAY;IADxB,aAAa,CAAC,QAAQ,CAAC;GACX,YAAY,CAmNxB;SAnNY,YAAY","sourcesContent":["/**\n * @license\n * Copyright 2023 Nuraly, Laabidi Aymen\n * SPDX-License-Identifier: MIT\n */\n\nimport { html, LitElement } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { styles } from './col.style.js';\nimport { NuralyUIBaseMixin } from '@nuralyui/common/mixins';\nimport { ColSize, FlexType, GridBreakpoint, BREAKPOINTS, EMPTY_STRING } from './grid.types.js';\n\n/**\n * Column component for grid layout system\n * \n * @example\n * ```html\n * <!-- Basic column with span -->\n * <nr-col span=\"12\">Half width</nr-col>\n * <nr-col span=\"8\">8/24 width</nr-col>\n * \n * <!-- Column with offset -->\n * <nr-col span=\"12\" offset=\"6\">Offset by 6</nr-col>\n * \n * <!-- Responsive column -->\n * <nr-col \n * xs=\"24\" \n * sm=\"12\" \n * md=\"8\" \n * lg=\"6\"\n * >Responsive</nr-col>\n * \n * <!-- Column with order -->\n * <nr-col span=\"6\" order=\"4\">Last</nr-col>\n * <nr-col span=\"6\" order=\"1\">First</nr-col>\n * \n * <!-- Flex column -->\n * <nr-col flex=\"auto\">Auto flex</nr-col>\n * <nr-col flex=\"1\">Flex 1</nr-col>\n * ```\n * \n * @slot default - Column content\n */\n@customElement('nr-col')\nexport class NrColElement extends NuralyUIBaseMixin(LitElement) {\n static override styles = styles;\n\n /** Number of columns to span (out of 24) */\n @property({ type: Number })\n span?: number;\n\n /** Number of columns to offset */\n @property({ type: Number })\n offset = 0;\n\n /** Order of the column */\n @property({ type: Number })\n order?: number;\n\n /** Number of columns to pull */\n @property({ type: Number })\n pull = 0;\n\n /** Number of columns to push */\n @property({ type: Number })\n push = 0;\n\n /** Flex layout style */\n @property({ type: String })\n flex: FlexType | '' = EMPTY_STRING;\n\n /** Extra small devices (<576px) */\n @property({ type: Object })\n xs?: number | ColSize;\n\n /** Small devices (≥576px) */\n @property({ type: Object })\n sm?: number | ColSize;\n\n /** Medium devices (≥768px) */\n @property({ type: Object })\n md?: number | ColSize;\n\n /** Large devices (≥992px) */\n @property({ type: Object })\n lg?: number | ColSize;\n\n /** Extra large devices (≥1200px) */\n @property({ type: Object })\n xl?: number | ColSize;\n\n /** Extra extra large devices (≥1600px) */\n @property({ type: Object })\n xxl?: number | ColSize;\n\n /** Current breakpoint */\n @state()\n private currentBreakpoint: GridBreakpoint = GridBreakpoint.XS;\n\n private resizeObserver?: ResizeObserver;\n\n override connectedCallback() {\n super.connectedCallback();\n this.setupResponsive();\n }\n\n override disconnectedCallback() {\n super.disconnectedCallback();\n this.resizeObserver?.disconnect();\n }\n\n /**\n * Setup responsive breakpoint detection\n */\n private setupResponsive() {\n this.updateBreakpoint();\n \n this.resizeObserver = new ResizeObserver(() => {\n this.updateBreakpoint();\n });\n \n this.resizeObserver.observe(document.documentElement);\n }\n\n /**\n * Update current breakpoint based on window width\n */\n private updateBreakpoint() {\n const width = window.innerWidth;\n let newBreakpoint: GridBreakpoint;\n \n if (width >= BREAKPOINTS.xxl) {\n newBreakpoint = GridBreakpoint.XXL;\n } else if (width >= BREAKPOINTS.xl) {\n newBreakpoint = GridBreakpoint.XL;\n } else if (width >= BREAKPOINTS.lg) {\n newBreakpoint = GridBreakpoint.LG;\n } else if (width >= BREAKPOINTS.md) {\n newBreakpoint = GridBreakpoint.MD;\n } else if (width >= BREAKPOINTS.sm) {\n newBreakpoint = GridBreakpoint.SM;\n } else {\n newBreakpoint = GridBreakpoint.XS;\n }\n \n if (newBreakpoint !== this.currentBreakpoint) {\n this.currentBreakpoint = newBreakpoint;\n }\n }\n\n /**\n * Get responsive configuration for current breakpoint\n */\n private getResponsiveConfig(): ColSize {\n const breakpoints: GridBreakpoint[] = [\n this.currentBreakpoint,\n GridBreakpoint.XL,\n GridBreakpoint.LG,\n GridBreakpoint.MD,\n GridBreakpoint.SM,\n GridBreakpoint.XS\n ];\n \n for (const bp of breakpoints) {\n const value = this[bp];\n if (value !== undefined) {\n if (typeof value === 'number') {\n return { span: value };\n }\n return value;\n }\n }\n \n return {};\n }\n\n /**\n * Get computed column properties\n */\n private getColProperties() {\n const responsive = this.getResponsiveConfig();\n \n return {\n span: responsive.span ?? this.span,\n offset: responsive.offset ?? this.offset,\n order: responsive.order ?? this.order,\n pull: responsive.pull ?? this.pull,\n push: responsive.push ?? this.push\n };\n }\n\n /**\n * Get gutter from parent row\n */\n private getGutterFromParent(): number {\n const parent = this.closest('nr-row');\n if (parent) {\n const gutter = parent.getAttribute('data-gutter');\n return gutter ? parseInt(gutter, 10) : 0;\n }\n return 0;\n }\n\n /**\n * Get inline styles for column\n */\n private getColStyle() {\n const styles: Record<string, string> = {};\n const gutter = this.getGutterFromParent();\n \n if (gutter > 0) {\n styles['padding-left'] = `${gutter / 2}px`;\n styles['padding-right'] = `${gutter / 2}px`;\n }\n \n if (this.flex) {\n if (this.flex === 'auto') {\n styles['flex'] = '1 1 auto';\n } else if (this.flex === 'none') {\n styles['flex'] = '0 0 auto';\n } else if (typeof this.flex === 'number') {\n styles['flex'] = `${this.flex} ${this.flex} auto`;\n } else {\n styles['flex'] = this.flex;\n }\n }\n \n return styles;\n }\n\n override render() {\n const colStyle = this.getColStyle();\n const props = this.getColProperties();\n\n // Apply data attributes to :host for proper styling\n this.setAttribute('data-span', props.span?.toString() || '');\n this.setAttribute('data-offset', props.offset.toString());\n if (props.order !== undefined) {\n this.setAttribute('data-order', props.order.toString());\n } else {\n this.removeAttribute('data-order');\n }\n this.setAttribute('data-pull', props.pull.toString());\n this.setAttribute('data-push', props.push.toString());\n this.setAttribute('data-theme', this.currentTheme);\n\n return html`\n <div\n class=\"nr-col\"\n style=\"${Object.entries(colStyle).map(([key, value]) => `${key}: ${value}`).join('; ')}\"\n >\n <slot></slot>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nr-col': NrColElement;\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"col.style.d.ts","sourceRoot":"","sources":["../../../src/components/grid/col.style.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,eAAO,MAAM,MAAM,yBA8GlB,CAAC"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* Column component styles for the Grid system
|
|
4
|
+
* Using shared CSS variables from /src/shared/themes/
|
|
5
|
+
*/
|
|
6
|
+
export const styles = css `
|
|
7
|
+
:host {
|
|
8
|
+
display: block;
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
flex-shrink: 0;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.nr-col {
|
|
14
|
+
position: relative;
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
width: 100%;
|
|
17
|
+
height: 100%;
|
|
18
|
+
|
|
19
|
+
/* Theme-aware */
|
|
20
|
+
color: var(--nuraly-color-text);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* Column spans (1-24) - Apply flex to :host */
|
|
24
|
+
:host([data-span="1"]) { flex: 0 0 4.16666667%; max-width: 4.16666667%; }
|
|
25
|
+
:host([data-span="2"]) { flex: 0 0 8.33333333%; max-width: 8.33333333%; }
|
|
26
|
+
:host([data-span="3"]) { flex: 0 0 12.5%; max-width: 12.5%; }
|
|
27
|
+
:host([data-span="4"]) { flex: 0 0 16.66666667%; max-width: 16.66666667%; }
|
|
28
|
+
:host([data-span="5"]) { flex: 0 0 20.83333333%; max-width: 20.83333333%; }
|
|
29
|
+
:host([data-span="6"]) { flex: 0 0 25%; max-width: 25%; }
|
|
30
|
+
:host([data-span="7"]) { flex: 0 0 29.16666667%; max-width: 29.16666667%; }
|
|
31
|
+
:host([data-span="8"]) { flex: 0 0 33.33333333%; max-width: 33.33333333%; }
|
|
32
|
+
:host([data-span="9"]) { flex: 0 0 37.5%; max-width: 37.5%; }
|
|
33
|
+
:host([data-span="10"]) { flex: 0 0 41.66666667%; max-width: 41.66666667%; }
|
|
34
|
+
:host([data-span="11"]) { flex: 0 0 45.83333333%; max-width: 45.83333333%; }
|
|
35
|
+
:host([data-span="12"]) { flex: 0 0 50%; max-width: 50%; }
|
|
36
|
+
:host([data-span="13"]) { flex: 0 0 54.16666667%; max-width: 54.16666667%; }
|
|
37
|
+
:host([data-span="14"]) { flex: 0 0 58.33333333%; max-width: 58.33333333%; }
|
|
38
|
+
:host([data-span="15"]) { flex: 0 0 62.5%; max-width: 62.5%; }
|
|
39
|
+
:host([data-span="16"]) { flex: 0 0 66.66666667%; max-width: 66.66666667%; }
|
|
40
|
+
:host([data-span="17"]) { flex: 0 0 70.83333333%; max-width: 70.83333333%; }
|
|
41
|
+
:host([data-span="18"]) { flex: 0 0 75%; max-width: 75%; }
|
|
42
|
+
:host([data-span="19"]) { flex: 0 0 79.16666667%; max-width: 79.16666667%; }
|
|
43
|
+
:host([data-span="20"]) { flex: 0 0 83.33333333%; max-width: 83.33333333%; }
|
|
44
|
+
:host([data-span="21"]) { flex: 0 0 87.5%; max-width: 87.5%; }
|
|
45
|
+
:host([data-span="22"]) { flex: 0 0 91.66666667%; max-width: 91.66666667%; }
|
|
46
|
+
:host([data-span="23"]) { flex: 0 0 95.83333333%; max-width: 95.83333333%; }
|
|
47
|
+
:host([data-span="24"]) { flex: 0 0 100%; max-width: 100%; }
|
|
48
|
+
|
|
49
|
+
/* Column offsets (0-24) - Apply to :host */
|
|
50
|
+
:host([data-offset="0"]) { margin-left: 0; }
|
|
51
|
+
:host([data-offset="1"]) { margin-left: 4.16666667%; }
|
|
52
|
+
:host([data-offset="2"]) { margin-left: 8.33333333%; }
|
|
53
|
+
:host([data-offset="3"]) { margin-left: 12.5%; }
|
|
54
|
+
:host([data-offset="4"]) { margin-left: 16.66666667%; }
|
|
55
|
+
:host([data-offset="5"]) { margin-left: 20.83333333%; }
|
|
56
|
+
:host([data-offset="6"]) { margin-left: 25%; }
|
|
57
|
+
:host([data-offset="7"]) { margin-left: 29.16666667%; }
|
|
58
|
+
:host([data-offset="8"]) { margin-left: 33.33333333%; }
|
|
59
|
+
:host([data-offset="9"]) { margin-left: 37.5%; }
|
|
60
|
+
:host([data-offset="10"]) { margin-left: 41.66666667%; }
|
|
61
|
+
:host([data-offset="11"]) { margin-left: 45.83333333%; }
|
|
62
|
+
:host([data-offset="12"]) { margin-left: 50%; }
|
|
63
|
+
:host([data-offset="13"]) { margin-left: 54.16666667%; }
|
|
64
|
+
:host([data-offset="14"]) { margin-left: 58.33333333%; }
|
|
65
|
+
:host([data-offset="15"]) { margin-left: 62.5%; }
|
|
66
|
+
:host([data-offset="16"]) { margin-left: 66.66666667%; }
|
|
67
|
+
:host([data-offset="17"]) { margin-left: 70.83333333%; }
|
|
68
|
+
:host([data-offset="18"]) { margin-left: 75%; }
|
|
69
|
+
:host([data-offset="19"]) { margin-left: 79.16666667%; }
|
|
70
|
+
:host([data-offset="20"]) { margin-left: 83.33333333%; }
|
|
71
|
+
:host([data-offset="21"]) { margin-left: 87.5%; }
|
|
72
|
+
:host([data-offset="22"]) { margin-left: 91.66666667%; }
|
|
73
|
+
:host([data-offset="23"]) { margin-left: 95.83333333%; }
|
|
74
|
+
|
|
75
|
+
/* Order - Apply to :host */
|
|
76
|
+
:host([data-order="1"]) { order: 1; }
|
|
77
|
+
:host([data-order="2"]) { order: 2; }
|
|
78
|
+
:host([data-order="3"]) { order: 3; }
|
|
79
|
+
:host([data-order="4"]) { order: 4; }
|
|
80
|
+
:host([data-order="5"]) { order: 5; }
|
|
81
|
+
:host([data-order="6"]) { order: 6; }
|
|
82
|
+
:host([data-order="7"]) { order: 7; }
|
|
83
|
+
:host([data-order="8"]) { order: 8; }
|
|
84
|
+
:host([data-order="9"]) { order: 9; }
|
|
85
|
+
:host([data-order="10"]) { order: 10; }
|
|
86
|
+
|
|
87
|
+
/* Pull (right positioning) - Apply to :host */
|
|
88
|
+
:host([data-pull="0"]) { right: auto; }
|
|
89
|
+
:host([data-pull="1"]) { right: 4.16666667%; }
|
|
90
|
+
:host([data-pull="2"]) { right: 8.33333333%; }
|
|
91
|
+
:host([data-pull="3"]) { right: 12.5%; }
|
|
92
|
+
:host([data-pull="4"]) { right: 16.66666667%; }
|
|
93
|
+
:host([data-pull="5"]) { right: 20.83333333%; }
|
|
94
|
+
:host([data-pull="6"]) { right: 25%; }
|
|
95
|
+
:host([data-pull="7"]) { right: 29.16666667%; }
|
|
96
|
+
:host([data-pull="8"]) { right: 33.33333333%; }
|
|
97
|
+
:host([data-pull="9"]) { right: 37.5%; }
|
|
98
|
+
:host([data-pull="10"]) { right: 41.66666667%; }
|
|
99
|
+
:host([data-pull="11"]) { right: 45.83333333%; }
|
|
100
|
+
:host([data-pull="12"]) { right: 50%; }
|
|
101
|
+
|
|
102
|
+
/* Push (left positioning) - Apply to :host */
|
|
103
|
+
:host([data-push="0"]) { left: auto; }
|
|
104
|
+
:host([data-push="1"]) { left: 4.16666667%; }
|
|
105
|
+
:host([data-push="2"]) { left: 8.33333333%; }
|
|
106
|
+
:host([data-push="3"]) { left: 12.5%; }
|
|
107
|
+
:host([data-push="4"]) { left: 16.66666667%; }
|
|
108
|
+
:host([data-push="5"]) { left: 20.83333333%; }
|
|
109
|
+
:host([data-push="6"]) { left: 25%; }
|
|
110
|
+
:host([data-push="7"]) { left: 29.16666667%; }
|
|
111
|
+
:host([data-push="8"]) { left: 33.33333333%; }
|
|
112
|
+
:host([data-push="9"]) { left: 37.5%; }
|
|
113
|
+
:host([data-push="10"]) { left: 41.66666667%; }
|
|
114
|
+
:host([data-push="11"]) { left: 45.83333333%; }
|
|
115
|
+
:host([data-push="12"]) { left: 50%; }
|
|
116
|
+
`;
|
|
117
|
+
//# sourceMappingURL=col.style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"col.style.js","sourceRoot":"","sources":["../../../src/components/grid/col.style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8GxB,CAAC","sourcesContent":["import { css } from 'lit';\n\n/**\n * Column component styles for the Grid system\n * Using shared CSS variables from /src/shared/themes/\n */\nexport const styles = css`\n :host {\n display: block;\n box-sizing: border-box;\n flex-shrink: 0;\n }\n\n .nr-col {\n position: relative;\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n \n /* Theme-aware */\n color: var(--nuraly-color-text);\n }\n\n /* Column spans (1-24) - Apply flex to :host */\n :host([data-span=\"1\"]) { flex: 0 0 4.16666667%; max-width: 4.16666667%; }\n :host([data-span=\"2\"]) { flex: 0 0 8.33333333%; max-width: 8.33333333%; }\n :host([data-span=\"3\"]) { flex: 0 0 12.5%; max-width: 12.5%; }\n :host([data-span=\"4\"]) { flex: 0 0 16.66666667%; max-width: 16.66666667%; }\n :host([data-span=\"5\"]) { flex: 0 0 20.83333333%; max-width: 20.83333333%; }\n :host([data-span=\"6\"]) { flex: 0 0 25%; max-width: 25%; }\n :host([data-span=\"7\"]) { flex: 0 0 29.16666667%; max-width: 29.16666667%; }\n :host([data-span=\"8\"]) { flex: 0 0 33.33333333%; max-width: 33.33333333%; }\n :host([data-span=\"9\"]) { flex: 0 0 37.5%; max-width: 37.5%; }\n :host([data-span=\"10\"]) { flex: 0 0 41.66666667%; max-width: 41.66666667%; }\n :host([data-span=\"11\"]) { flex: 0 0 45.83333333%; max-width: 45.83333333%; }\n :host([data-span=\"12\"]) { flex: 0 0 50%; max-width: 50%; }\n :host([data-span=\"13\"]) { flex: 0 0 54.16666667%; max-width: 54.16666667%; }\n :host([data-span=\"14\"]) { flex: 0 0 58.33333333%; max-width: 58.33333333%; }\n :host([data-span=\"15\"]) { flex: 0 0 62.5%; max-width: 62.5%; }\n :host([data-span=\"16\"]) { flex: 0 0 66.66666667%; max-width: 66.66666667%; }\n :host([data-span=\"17\"]) { flex: 0 0 70.83333333%; max-width: 70.83333333%; }\n :host([data-span=\"18\"]) { flex: 0 0 75%; max-width: 75%; }\n :host([data-span=\"19\"]) { flex: 0 0 79.16666667%; max-width: 79.16666667%; }\n :host([data-span=\"20\"]) { flex: 0 0 83.33333333%; max-width: 83.33333333%; }\n :host([data-span=\"21\"]) { flex: 0 0 87.5%; max-width: 87.5%; }\n :host([data-span=\"22\"]) { flex: 0 0 91.66666667%; max-width: 91.66666667%; }\n :host([data-span=\"23\"]) { flex: 0 0 95.83333333%; max-width: 95.83333333%; }\n :host([data-span=\"24\"]) { flex: 0 0 100%; max-width: 100%; }\n\n /* Column offsets (0-24) - Apply to :host */\n :host([data-offset=\"0\"]) { margin-left: 0; }\n :host([data-offset=\"1\"]) { margin-left: 4.16666667%; }\n :host([data-offset=\"2\"]) { margin-left: 8.33333333%; }\n :host([data-offset=\"3\"]) { margin-left: 12.5%; }\n :host([data-offset=\"4\"]) { margin-left: 16.66666667%; }\n :host([data-offset=\"5\"]) { margin-left: 20.83333333%; }\n :host([data-offset=\"6\"]) { margin-left: 25%; }\n :host([data-offset=\"7\"]) { margin-left: 29.16666667%; }\n :host([data-offset=\"8\"]) { margin-left: 33.33333333%; }\n :host([data-offset=\"9\"]) { margin-left: 37.5%; }\n :host([data-offset=\"10\"]) { margin-left: 41.66666667%; }\n :host([data-offset=\"11\"]) { margin-left: 45.83333333%; }\n :host([data-offset=\"12\"]) { margin-left: 50%; }\n :host([data-offset=\"13\"]) { margin-left: 54.16666667%; }\n :host([data-offset=\"14\"]) { margin-left: 58.33333333%; }\n :host([data-offset=\"15\"]) { margin-left: 62.5%; }\n :host([data-offset=\"16\"]) { margin-left: 66.66666667%; }\n :host([data-offset=\"17\"]) { margin-left: 70.83333333%; }\n :host([data-offset=\"18\"]) { margin-left: 75%; }\n :host([data-offset=\"19\"]) { margin-left: 79.16666667%; }\n :host([data-offset=\"20\"]) { margin-left: 83.33333333%; }\n :host([data-offset=\"21\"]) { margin-left: 87.5%; }\n :host([data-offset=\"22\"]) { margin-left: 91.66666667%; }\n :host([data-offset=\"23\"]) { margin-left: 95.83333333%; }\n\n /* Order - Apply to :host */\n :host([data-order=\"1\"]) { order: 1; }\n :host([data-order=\"2\"]) { order: 2; }\n :host([data-order=\"3\"]) { order: 3; }\n :host([data-order=\"4\"]) { order: 4; }\n :host([data-order=\"5\"]) { order: 5; }\n :host([data-order=\"6\"]) { order: 6; }\n :host([data-order=\"7\"]) { order: 7; }\n :host([data-order=\"8\"]) { order: 8; }\n :host([data-order=\"9\"]) { order: 9; }\n :host([data-order=\"10\"]) { order: 10; }\n\n /* Pull (right positioning) - Apply to :host */\n :host([data-pull=\"0\"]) { right: auto; }\n :host([data-pull=\"1\"]) { right: 4.16666667%; }\n :host([data-pull=\"2\"]) { right: 8.33333333%; }\n :host([data-pull=\"3\"]) { right: 12.5%; }\n :host([data-pull=\"4\"]) { right: 16.66666667%; }\n :host([data-pull=\"5\"]) { right: 20.83333333%; }\n :host([data-pull=\"6\"]) { right: 25%; }\n :host([data-pull=\"7\"]) { right: 29.16666667%; }\n :host([data-pull=\"8\"]) { right: 33.33333333%; }\n :host([data-pull=\"9\"]) { right: 37.5%; }\n :host([data-pull=\"10\"]) { right: 41.66666667%; }\n :host([data-pull=\"11\"]) { right: 45.83333333%; }\n :host([data-pull=\"12\"]) { right: 50%; }\n\n /* Push (left positioning) - Apply to :host */\n :host([data-push=\"0\"]) { left: auto; }\n :host([data-push=\"1\"]) { left: 4.16666667%; }\n :host([data-push=\"2\"]) { left: 8.33333333%; }\n :host([data-push=\"3\"]) { left: 12.5%; }\n :host([data-push=\"4\"]) { left: 16.66666667%; }\n :host([data-push=\"5\"]) { left: 20.83333333%; }\n :host([data-push=\"6\"]) { left: 25%; }\n :host([data-push=\"7\"]) { left: 29.16666667%; }\n :host([data-push=\"8\"]) { left: 33.33333333%; }\n :host([data-push=\"9\"]) { left: 37.5%; }\n :host([data-push=\"10\"]) { left: 41.66666667%; }\n :host([data-push=\"11\"]) { left: 45.83333333%; }\n :host([data-push=\"12\"]) { left: 50%; }\n`;\n"]}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Grid system types and constants
|
|
3
|
+
*/
|
|
4
|
+
export declare const EMPTY_STRING = "";
|
|
5
|
+
/**
|
|
6
|
+
* Responsive breakpoints matching Ant Design
|
|
7
|
+
*/
|
|
8
|
+
export declare const enum GridBreakpoint {
|
|
9
|
+
XS = "xs",
|
|
10
|
+
SM = "sm",
|
|
11
|
+
MD = "md",
|
|
12
|
+
LG = "lg",
|
|
13
|
+
XL = "xl",
|
|
14
|
+
XXL = "xxl"
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Breakpoint pixel values
|
|
18
|
+
*/
|
|
19
|
+
export declare const BREAKPOINTS: {
|
|
20
|
+
readonly xs: 0;
|
|
21
|
+
readonly sm: 576;
|
|
22
|
+
readonly md: 768;
|
|
23
|
+
readonly lg: 992;
|
|
24
|
+
readonly xl: 1200;
|
|
25
|
+
readonly xxl: 1600;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Horizontal alignment of flex items
|
|
29
|
+
*/
|
|
30
|
+
export declare const enum RowAlign {
|
|
31
|
+
Top = "top",
|
|
32
|
+
Middle = "middle",
|
|
33
|
+
Bottom = "bottom",
|
|
34
|
+
Stretch = "stretch"
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Horizontal arrangement of columns
|
|
38
|
+
*/
|
|
39
|
+
export declare const enum RowJustify {
|
|
40
|
+
Start = "start",
|
|
41
|
+
End = "end",
|
|
42
|
+
Center = "center",
|
|
43
|
+
SpaceAround = "space-around",
|
|
44
|
+
SpaceBetween = "space-between",
|
|
45
|
+
SpaceEvenly = "space-evenly"
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Gutter configuration - can be number, array, or object
|
|
49
|
+
*/
|
|
50
|
+
export declare type Gutter = number | [number, number] | Partial<Record<GridBreakpoint, number | [number, number]>>;
|
|
51
|
+
/**
|
|
52
|
+
* Column span configuration for responsive breakpoints
|
|
53
|
+
*/
|
|
54
|
+
export interface ColSize {
|
|
55
|
+
span?: number;
|
|
56
|
+
offset?: number;
|
|
57
|
+
order?: number;
|
|
58
|
+
pull?: number;
|
|
59
|
+
push?: number;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Responsive column configuration
|
|
63
|
+
*/
|
|
64
|
+
export declare type ResponsiveCol = number | ColSize;
|
|
65
|
+
/**
|
|
66
|
+
* Column configuration for all breakpoints
|
|
67
|
+
*/
|
|
68
|
+
export interface ColResponsive {
|
|
69
|
+
xs?: ResponsiveCol;
|
|
70
|
+
sm?: ResponsiveCol;
|
|
71
|
+
md?: ResponsiveCol;
|
|
72
|
+
lg?: ResponsiveCol;
|
|
73
|
+
xl?: ResponsiveCol;
|
|
74
|
+
xxl?: ResponsiveCol;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Flex properties
|
|
78
|
+
*/
|
|
79
|
+
export declare type FlexType = number | 'none' | 'auto' | string;
|
|
80
|
+
//# sourceMappingURL=grid.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grid.types.d.ts","sourceRoot":"","sources":["../../../src/components/grid/grid.types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,YAAY,KAAK,CAAC;AAE/B;;GAEG;AACH,0BAAkB,cAAc;IAC9B,EAAE,OAAO;IACT,EAAE,OAAO;IACT,EAAE,OAAO;IACT,EAAE,OAAO;IACT,EAAE,OAAO;IACT,GAAG,QAAQ;CACZ;AAED;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;;CAOd,CAAC;AAEX;;GAEG;AACH,0BAAkB,QAAQ;IACxB,GAAG,QAAQ;IACX,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED;;GAEG;AACH,0BAAkB,UAAU;IAC1B,KAAK,UAAU;IACf,GAAG,QAAQ;IACX,MAAM,WAAW;IACjB,WAAW,iBAAiB;IAC5B,YAAY,kBAAkB;IAC9B,WAAW,iBAAiB;CAC7B;AAED;;GAEG;AACH,oBAAY,MAAM,GAAG,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;AAE5G;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,oBAAY,aAAa,GAAG,MAAM,GAAG,OAAO,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,EAAE,CAAC,EAAE,aAAa,CAAC;IACnB,EAAE,CAAC,EAAE,aAAa,CAAC;IACnB,EAAE,CAAC,EAAE,aAAa,CAAC;IACnB,EAAE,CAAC,EAAE,aAAa,CAAC;IACnB,EAAE,CAAC,EAAE,aAAa,CAAC;IACnB,GAAG,CAAC,EAAE,aAAa,CAAC;CACrB;AAED;;GAEG;AACH,oBAAY,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Grid system types and constants
|
|
3
|
+
*/
|
|
4
|
+
export const EMPTY_STRING = '';
|
|
5
|
+
/**
|
|
6
|
+
* Breakpoint pixel values
|
|
7
|
+
*/
|
|
8
|
+
export const BREAKPOINTS = {
|
|
9
|
+
xs: 0,
|
|
10
|
+
sm: 576,
|
|
11
|
+
md: 768,
|
|
12
|
+
lg: 992,
|
|
13
|
+
xl: 1200,
|
|
14
|
+
xxl: 1600
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=grid.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grid.types.js","sourceRoot":"","sources":["../../../src/components/grid/grid.types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAC,MAAM,YAAY,GAAG,EAAE,CAAC;AAc/B;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,GAAG;IACP,EAAE,EAAE,GAAG;IACP,EAAE,EAAE,GAAG;IACP,EAAE,EAAE,IAAI;IACR,GAAG,EAAE,IAAI;CACD,CAAC","sourcesContent":["/**\n * Grid system types and constants\n */\n\nexport const EMPTY_STRING = '';\n\n/**\n * Responsive breakpoints matching Ant Design\n */\nexport const enum GridBreakpoint {\n XS = 'xs', // < 576px\n SM = 'sm', // >= 576px\n MD = 'md', // >= 768px\n LG = 'lg', // >= 992px\n XL = 'xl', // >= 1200px\n XXL = 'xxl' // >= 1600px\n}\n\n/**\n * Breakpoint pixel values\n */\nexport const BREAKPOINTS = {\n xs: 0,\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1600\n} as const;\n\n/**\n * Horizontal alignment of flex items\n */\nexport const enum RowAlign {\n Top = 'top',\n Middle = 'middle',\n Bottom = 'bottom',\n Stretch = 'stretch'\n}\n\n/**\n * Horizontal arrangement of columns\n */\nexport const enum RowJustify {\n Start = 'start',\n End = 'end',\n Center = 'center',\n SpaceAround = 'space-around',\n SpaceBetween = 'space-between',\n SpaceEvenly = 'space-evenly'\n}\n\n/**\n * Gutter configuration - can be number, array, or object\n */\nexport type Gutter = number | [number, number] | Partial<Record<GridBreakpoint, number | [number, number]>>;\n\n/**\n * Column span configuration for responsive breakpoints\n */\nexport interface ColSize {\n span?: number;\n offset?: number;\n order?: number;\n pull?: number;\n push?: number;\n}\n\n/**\n * Responsive column configuration\n */\nexport type ResponsiveCol = number | ColSize;\n\n/**\n * Column configuration for all breakpoints\n */\nexport interface ColResponsive {\n xs?: ResponsiveCol;\n sm?: ResponsiveCol;\n md?: ResponsiveCol;\n lg?: ResponsiveCol;\n xl?: ResponsiveCol;\n xxl?: ResponsiveCol;\n}\n\n/**\n * Flex properties\n */\nexport type FlexType = number | 'none' | 'auto' | string;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/grid/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/grid/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC","sourcesContent":["export * from './row.component.js';\nexport * from './col.component.js';\nexport * from './grid.types.js';\n"]}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nuralyui/grid",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"description": "Grid layout system (Row and Col) components for NuralyUI library",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"import": "./index.js"
|
|
10
|
+
},
|
|
11
|
+
"./bundle": {
|
|
12
|
+
"import": "./bundle.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"*.js",
|
|
17
|
+
"*.d.ts",
|
|
18
|
+
"*.js.map",
|
|
19
|
+
"grid.bundled.js",
|
|
20
|
+
"bundle.js"
|
|
21
|
+
],
|
|
22
|
+
"scripts": {
|
|
23
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
24
|
+
},
|
|
25
|
+
"repository": {
|
|
26
|
+
"type": "git",
|
|
27
|
+
"url": "https://github.com/Nuralyio/NuralyUI.git",
|
|
28
|
+
"directory": "src/components/grid"
|
|
29
|
+
},
|
|
30
|
+
"keywords": [
|
|
31
|
+
"grid",
|
|
32
|
+
"row",
|
|
33
|
+
"col",
|
|
34
|
+
"column",
|
|
35
|
+
"layout",
|
|
36
|
+
"responsive",
|
|
37
|
+
"flexbox",
|
|
38
|
+
"web-components",
|
|
39
|
+
"lit-element",
|
|
40
|
+
"nuralyui",
|
|
41
|
+
"ui-components"
|
|
42
|
+
],
|
|
43
|
+
"author": "Nuraly, Laabidi Aymen",
|
|
44
|
+
"license": "MIT",
|
|
45
|
+
"bugs": {
|
|
46
|
+
"url": "https://github.com/Nuralyio/NuralyUI/issues"
|
|
47
|
+
},
|
|
48
|
+
"homepage": "https://github.com/Nuralyio/NuralyUI#readme",
|
|
49
|
+
"publishConfig": {
|
|
50
|
+
"access": "public"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { NrRowElement } from './row.component.js';
|
|
2
|
+
import { NrColElement } from './col.component.js';
|
|
3
|
+
export declare const NrRow: import("@lit-labs/react").ReactWebComponent<NrRowElement, {}>;
|
|
4
|
+
export declare const NrCol: import("@lit-labs/react").ReactWebComponent<NrColElement, {}>;
|
|
5
|
+
//# sourceMappingURL=react.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../../src/components/grid/react.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,eAAO,MAAM,KAAK,+DAKhB,CAAC;AACH,eAAO,MAAM,KAAK,+DAKhB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { createComponent } from '@lit-labs/react';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { NrRowElement } from './row.component.js';
|
|
4
|
+
import { NrColElement } from './col.component.js';
|
|
5
|
+
export const NrRow = createComponent({
|
|
6
|
+
tagName: 'nr-row',
|
|
7
|
+
elementClass: NrRowElement,
|
|
8
|
+
react: React,
|
|
9
|
+
events: {},
|
|
10
|
+
});
|
|
11
|
+
export const NrCol = createComponent({
|
|
12
|
+
tagName: 'nr-col',
|
|
13
|
+
elementClass: NrColElement,
|
|
14
|
+
react: React,
|
|
15
|
+
events: {},
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=react.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react.js","sourceRoot":"","sources":["../../../src/components/grid/react.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,MAAM,CAAC,MAAM,KAAK,GAAG,eAAe,CAAC;IACnC,OAAO,EAAE,QAAQ;IACjB,YAAY,EAAE,YAAY;IAC1B,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE,EAAE;CACX,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,eAAe,CAAC;IACnC,OAAO,EAAE,QAAQ;IACjB,YAAY,EAAE,YAAY;IAC1B,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE,EAAE;CACX,CAAC,CAAC","sourcesContent":["import { createComponent } from '@lit-labs/react';\nimport * as React from 'react';\nimport { NrRowElement } from './row.component.js';\nimport { NrColElement } from './col.component.js';\nexport const NrRow = createComponent({\n tagName: 'nr-row',\n elementClass: NrRowElement,\n react: React,\n events: {},\n});\nexport const NrCol = createComponent({\n tagName: 'nr-col',\n elementClass: NrColElement,\n react: React,\n events: {},\n});\n"]}
|