@ctrliq/quantic-components 1.64.4 → 1.66.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/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/layout/page.component.d.ts +1 -0
- package/dist/layout/page.component.js +19 -0
- package/dist/layout/page.stories.d.ts +10 -0
- package/dist/layout/page.stories.js +23 -0
- package/dist/meta/index.js +2 -0
- package/dist/meta/index.js.map +1 -1
- package/dist/quantic-components.js +88 -0
- package/dist/quantic-components.js.map +1 -1
- package/dist/quantic-components.min.js +53 -3
- package/dist/quantic-components.min.js.map +1 -1
- package/dist/skeleton/index.d.ts +1 -0
- package/dist/skeleton/index.js +1 -0
- package/dist/skeleton/index.stories.d.ts +41 -0
- package/dist/skeleton/index.stories.js +35 -0
- package/dist/skeleton/skeleton.component.d.ts +10 -0
- package/dist/skeleton/skeleton.component.js +79 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/layout/page.component.d.ts +1 -0
- package/dist/types/layout/page.stories.d.ts +10 -0
- package/dist/types/skeleton/index.d.ts +1 -0
- package/dist/types/skeleton/index.stories.d.ts +41 -0
- package/dist/types/skeleton/skeleton.component.d.ts +10 -0
- package/package.json +3 -3
|
@@ -13,6 +13,7 @@ let Page = class Page extends QuanticElement {
|
|
|
13
13
|
super(...arguments);
|
|
14
14
|
this.fill = false;
|
|
15
15
|
this.bleeds = false;
|
|
16
|
+
this.contained = false;
|
|
16
17
|
}
|
|
17
18
|
render() {
|
|
18
19
|
return html `
|
|
@@ -32,6 +33,8 @@ Page.meta = {
|
|
|
32
33
|
Page.styles = css `
|
|
33
34
|
:host {
|
|
34
35
|
--quantic-component-page-padding: var(--quantic-spacing-4);
|
|
36
|
+
--quantic-component-page-max-width: 80rem;
|
|
37
|
+
--quantic-component-page-contained-padding-inline: calc(2 * var(--quantic-component-page-padding));
|
|
35
38
|
display: block;
|
|
36
39
|
width: 100%;
|
|
37
40
|
height: 100%;
|
|
@@ -57,6 +60,14 @@ Page.styles = css `
|
|
|
57
60
|
:host([fill]) .main {
|
|
58
61
|
overflow: hidden;
|
|
59
62
|
}
|
|
63
|
+
|
|
64
|
+
@media (min-width: 48rem) {
|
|
65
|
+
:host([contained]:not([bleeds])) .main {
|
|
66
|
+
max-width: var(--quantic-component-page-max-width);
|
|
67
|
+
margin-inline: auto;
|
|
68
|
+
padding-inline: var(--quantic-component-page-contained-padding-inline);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
60
71
|
`;
|
|
61
72
|
__decorate([
|
|
62
73
|
prop({
|
|
@@ -74,6 +85,14 @@ __decorate([
|
|
|
74
85
|
description: 'Remove the default padding so content extends edge-to-edge. Useful for full-bleed layouts such as maps, images, or custom-padded regions.',
|
|
75
86
|
})
|
|
76
87
|
], Page.prototype, "bleeds", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
prop({
|
|
90
|
+
type: 'boolean',
|
|
91
|
+
default: 'false',
|
|
92
|
+
reflect: true,
|
|
93
|
+
description: 'Constrain the page content to a maximum width and center it horizontally on viewports wider than the md breakpoint. Override the width via --quantic-component-page-max-width and inline padding via --quantic-component-page-contained-padding-inline.',
|
|
94
|
+
})
|
|
95
|
+
], Page.prototype, "contained", void 0);
|
|
77
96
|
Page = __decorate([
|
|
78
97
|
quanticElement('quantic-page')
|
|
79
98
|
], Page);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
title: string;
|
|
3
|
+
component: string;
|
|
4
|
+
tags: string[];
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
|
7
|
+
export declare const Default: import("../shared/story").StoryObject<object>;
|
|
8
|
+
export declare const Contained: import("../shared/story").StoryObject<object>;
|
|
9
|
+
export declare const ContainedCustomWidth: import("../shared/story").StoryObject<object>;
|
|
10
|
+
export declare const Bleeds: import("../shared/story").StoryObject<object>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { story } from '../shared/story';
|
|
2
|
+
export default {
|
|
3
|
+
title: 'Components/Layout/Page',
|
|
4
|
+
component: 'quantic-page',
|
|
5
|
+
tags: ['autodocs'],
|
|
6
|
+
};
|
|
7
|
+
const box = `<div style="background: var(--quantic-bg-secondary); border: 1px solid var(--quantic-border-primary); border-radius: var(--quantic-radius-lg); height: 80px; display: flex; align-items: center; justify-content: center; color: var(--quantic-text-tertiary); font-size: var(--quantic-font-size-body-sm);">Content</div>`;
|
|
8
|
+
export const Default = story().render(() => `<quantic-page style="height: 200px; border: 1px solid var(--quantic-border-primary);">
|
|
9
|
+
${box}
|
|
10
|
+
<p>Page content renders inside a semantic <main> element with default padding.</p>
|
|
11
|
+
</quantic-page>`);
|
|
12
|
+
export const Contained = story().render(() => `<quantic-page contained style="height: 200px; border: 1px solid var(--quantic-border-primary);">
|
|
13
|
+
${box}
|
|
14
|
+
<p>Content is constrained to <code>--quantic-component-page-max-width</code> (default 80rem) and centered on viewports wider than the md breakpoint.</p>
|
|
15
|
+
</quantic-page>`);
|
|
16
|
+
export const ContainedCustomWidth = story().render(() => `<quantic-page contained style="--quantic-component-page-max-width: 40rem; height: 200px;">
|
|
17
|
+
${box}
|
|
18
|
+
<p>Override <code>--quantic-component-page-max-width</code> to control the constraint. Here it is set to 40rem.</p>
|
|
19
|
+
</quantic-page>`);
|
|
20
|
+
export const Bleeds = story().render(() => `<quantic-page bleeds style="height: 200px; border: 1px solid var(--quantic-border-primary);">
|
|
21
|
+
${box}
|
|
22
|
+
<p style="padding-block: var(--quantic-spacing-4);">Content extends edge-to-edge — no default padding applied.</p>
|
|
23
|
+
</quantic-page>`);
|
package/dist/meta/index.js
CHANGED
|
@@ -48,6 +48,7 @@ import { Progress } from '../progress/index';
|
|
|
48
48
|
import { Radio } from '../radio/radio.component';
|
|
49
49
|
import { RadioGroup } from '../radio/radio-group.component';
|
|
50
50
|
import { Select } from '../select/index';
|
|
51
|
+
import { Skeleton } from '../skeleton/skeleton.component';
|
|
51
52
|
import { Sparkline } from '../sparkline/index';
|
|
52
53
|
import { Spinner } from '../spinner/index';
|
|
53
54
|
import { SplitterGroup } from '../splitter/splitter-group.component';
|
|
@@ -123,6 +124,7 @@ export const allMeta = [
|
|
|
123
124
|
Radio.meta,
|
|
124
125
|
RadioGroup.meta,
|
|
125
126
|
Select.meta,
|
|
127
|
+
Skeleton.meta,
|
|
126
128
|
Sparkline.meta,
|
|
127
129
|
Spinner.meta,
|
|
128
130
|
SplitterGroup.meta,
|