@ctrliq/quantic-components 1.70.2 → 1.71.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.
@@ -1,4 +1,5 @@
1
1
  import { story } from '../shared/story';
2
+ import { STORY_IMAGE_WIDE } from '../shared/story-images';
2
3
  import { PanelVariant } from './index.constants';
3
4
  export default {
4
5
  title: 'Components/Layout/Panel',
@@ -99,7 +100,7 @@ export const VariantGhost = story({
99
100
  <quantic-panel variant="${variant}"${highlighted ? ' highlighted' : ''}>
100
101
  <quantic-panel-header slot="header">Ghost Panel</quantic-panel-header>
101
102
  <img
102
- src="https://placehold.co/600x200/e2e8f0/64748b?text=Full+Width+Content"
103
+ src="${STORY_IMAGE_WIDE}"
103
104
  alt="Example"
104
105
  style="width: 100%; display: block; margin: 0 0 1rem;"
105
106
  />
@@ -0,0 +1,6 @@
1
+ export declare const ProseAs: {
2
+ readonly Article: "article";
3
+ readonly Section: "section";
4
+ readonly Div: "div";
5
+ };
6
+ export type ProseAs = (typeof ProseAs)[keyof typeof ProseAs];
@@ -0,0 +1,5 @@
1
+ export const ProseAs = {
2
+ Article: 'article',
3
+ Section: 'section',
4
+ Div: 'div',
5
+ };
@@ -0,0 +1,15 @@
1
+ import { QuanticElement } from '../shared/quantic-element';
2
+ import type { ComponentMeta } from '../shared/meta.types';
3
+ import { ProseAs } from './index.constants';
4
+ export { ProseAs } from './index.constants';
5
+ export declare class Prose extends QuanticElement {
6
+ static meta: ComponentMeta;
7
+ as: ProseAs;
8
+ static styles: import("lit").CSSResult;
9
+ render(): import("lit").TemplateResult;
10
+ }
11
+ declare global {
12
+ interface HTMLElementTagNameMap {
13
+ 'quantic-prose': Prose;
14
+ }
15
+ }
@@ -0,0 +1,96 @@
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 } from 'lit';
8
+ import { html, unsafeStatic } from 'lit/static-html.js';
9
+ import { quanticElement, QuanticElement } from '../shared/quantic-element';
10
+ import { prop } from '../shared/component-meta.decorators';
11
+ import { ProseAs } from './index.constants';
12
+ export { ProseAs } from './index.constants';
13
+ let Prose = class Prose extends QuanticElement {
14
+ constructor() {
15
+ super(...arguments);
16
+ this.as = ProseAs.Article;
17
+ }
18
+ render() {
19
+ const Tag = unsafeStatic(this.as);
20
+ return html `<${Tag}><slot></slot></${Tag}>`;
21
+ }
22
+ };
23
+ Prose.meta = {
24
+ tag: 'quantic-prose',
25
+ description: 'Article context for long-form HTML (markdown, MDX, docs). Typography comes from ' +
26
+ '@ctrliq/quantic-css/prose on the critical path (`@forward` in global.scss) so first paint ' +
27
+ 'matches before the custom element upgrades. The host only wraps slotted content in a ' +
28
+ 'landmark (`as`) for catalog/Storybook — it does not ship article CSS. Use quantic-text for one-off strings.',
29
+ category: 'display',
30
+ slots: {
31
+ '': { description: 'Article content (headings, paragraphs, lists, pre, embedded components).' },
32
+ },
33
+ relatedTo: ['quantic-text', 'quantic-alert'],
34
+ };
35
+ Prose.styles = css `
36
+ :host {
37
+ display: block;
38
+ }
39
+
40
+ /* Slotted siblings ignore document > * + * margins for layout; flex gap handles rhythm. */
41
+ article,
42
+ section,
43
+ div {
44
+ display: flex;
45
+ flex-direction: column;
46
+ row-gap: var(--quantic-spacing-5);
47
+ }
48
+
49
+ slot {
50
+ display: contents;
51
+ }
52
+
53
+ /* prose.scss margins stack with flex gap in the slot — zero them on slotted blocks. */
54
+ ::slotted(h1),
55
+ ::slotted(h2),
56
+ ::slotted(h3),
57
+ ::slotted(h4),
58
+ ::slotted(p),
59
+ ::slotted(ul),
60
+ ::slotted(ol),
61
+ ::slotted(pre),
62
+ ::slotted(blockquote),
63
+ ::slotted(figure),
64
+ ::slotted(table),
65
+ ::slotted(hr),
66
+ ::slotted(quantic-alert) {
67
+ margin-block: 0 !important;
68
+ margin-inline: 0;
69
+ }
70
+
71
+ /* row-gap (spacing-5) + extras mirror prose.scss rhythm without doubling. */
72
+ ::slotted(.lead),
73
+ ::slotted(.lede) {
74
+ margin-block-end: var(--quantic-spacing-3) !important;
75
+ }
76
+
77
+ ::slotted(h2) {
78
+ margin-block-start: var(--quantic-spacing-3) !important;
79
+ }
80
+
81
+ ::slotted(p + p) {
82
+ margin-block-start: var(--quantic-spacing-1) !important;
83
+ }
84
+ `;
85
+ __decorate([
86
+ prop({
87
+ type: 'ProseAs',
88
+ options: Object.values(ProseAs),
89
+ default: ProseAs.Article,
90
+ description: 'Landmark element wrapping the slot (article, section, or div).',
91
+ })
92
+ ], Prose.prototype, "as", void 0);
93
+ Prose = __decorate([
94
+ quanticElement('quantic-prose')
95
+ ], Prose);
96
+ export { Prose };
@@ -0,0 +1,20 @@
1
+ declare const _default: {
2
+ title: string;
3
+ component: string;
4
+ tags: string[];
5
+ render: ({ html }: {
6
+ html: import("../shared/story").HtmlFn;
7
+ }) => unknown;
8
+ parameters: {
9
+ docs: {
10
+ description: {
11
+ component: string;
12
+ };
13
+ story: {
14
+ iframeHeight: string;
15
+ };
16
+ };
17
+ };
18
+ };
19
+ export default _default;
20
+ export declare const Article: import("../shared/story").StoryObject<object>;
@@ -0,0 +1,121 @@
1
+ import { story } from '../shared/story';
2
+ import { STORY_IMAGE_INLINE } from '../shared/story-images';
3
+ import { Alert } from '../alert';
4
+ import { AlertType } from '../alert/index.constants';
5
+ import { Prose } from './index';
6
+ Prose.ensureDefined();
7
+ Alert.ensureDefined();
8
+ const renderFixture = ({ html }) => html `
9
+ <quantic-prose>
10
+ <h1>Getting started</h1>
11
+ <p class="lead">
12
+ Install the package on a supported host, authenticate with the portal, and confirm the
13
+ service is running before you open the dashboard.
14
+ </p>
15
+
16
+ <quantic-alert type="${AlertType.Info}">
17
+ <span slot="title">Portal token required</span>
18
+ Sign in to the customer portal and copy your access token before adding the package
19
+ repository to the host.
20
+ </quantic-alert>
21
+
22
+ <h2>Before you begin</h2>
23
+ <p>
24
+ Make sure the host meets the baseline requirements below. Most teams can finish a first
25
+ install in under ten minutes once outbound network access is in place.
26
+ </p>
27
+ <p>
28
+ If you are upgrading from an older release, skim the supported branches table at the
29
+ bottom of this page before you move production traffic.
30
+ </p>
31
+
32
+ <h3>Configure the repository</h3>
33
+ <p>
34
+ Add the repository for your distribution, then install the package. Confirm the unit is
35
+ active with <code>systemctl status example</code>, or jump ahead to the
36
+ <a href="#installation">installation commands</a>.
37
+ </p>
38
+
39
+ <h4>Prerequisites</h4>
40
+ <ul>
41
+ <li>A supported Linux host (x86_64 or aarch64)</li>
42
+ <li>Outbound access to the package repositories</li>
43
+ <li>An organization and access token from the customer portal</li>
44
+ </ul>
45
+
46
+ <ol>
47
+ <li>Create an account or sign in to the portal</li>
48
+ <li>Create or join an organization</li>
49
+ <li>Copy the access token into your shell environment</li>
50
+ </ol>
51
+
52
+ <blockquote>
53
+ <p>
54
+ Ordered lists in prose use decimal markers. Circle step markers belong on the Steps
55
+ layout component when you are writing a tutorial.
56
+ </p>
57
+ </blockquote>
58
+
59
+ <h2 id="installation">Installation</h2>
60
+ <p>
61
+ Run the commands below on the target host. Long lines scroll inside the block instead of
62
+ wrapping the layout.
63
+ </p>
64
+ <pre><code>sudo dnf config-manager --add-repo https://packages.example.com/example.repo
65
+ sudo dnf install example
66
+ sudo systemctl enable --now example</code></pre>
67
+
68
+ <hr />
69
+
70
+ <figure>
71
+ <img
72
+ src="${STORY_IMAGE_INLINE}"
73
+ alt="Service topology across portal, host, and package repository"
74
+ width="480"
75
+ height="120"
76
+ />
77
+ <figcaption>Figure 1. Request path from the host to the package repository.</figcaption>
78
+ </figure>
79
+
80
+ <table>
81
+ <caption>Supported release branches</caption>
82
+ <thead>
83
+ <tr>
84
+ <th scope="col">Version</th>
85
+ <th scope="col">Status</th>
86
+ </tr>
87
+ </thead>
88
+ <tbody>
89
+ <tr>
90
+ <th scope="row">9.x</th>
91
+ <td>Supported</td>
92
+ </tr>
93
+ <tr>
94
+ <th scope="row">8.x</th>
95
+ <td>Maintenance</td>
96
+ </tr>
97
+ </tbody>
98
+ </table>
99
+ </quantic-prose>
100
+ `;
101
+ export default {
102
+ title: 'Components/Display/Prose',
103
+ component: 'quantic-prose',
104
+ tags: ['autodocs'],
105
+ render: renderFixture,
106
+ parameters: {
107
+ docs: {
108
+ description: {
109
+ component: 'Long-form article context for native HTML (headings, lists, code, tables, blockquotes). ' +
110
+ 'Apps must `@forward \'@ctrliq/quantic-css/prose\'` in global.scss so article typography is on ' +
111
+ 'the critical path and first paint matches before `<quantic-prose>` upgrades. The custom element ' +
112
+ 'only provides a landmark wrapper (`as`) and catalog API. Styles are not in the shadow root. ' +
113
+ 'Tutorial step lists use `<Steps>`, not prose `ol`.',
114
+ },
115
+ story: {
116
+ iframeHeight: '880px',
117
+ },
118
+ },
119
+ },
120
+ };
121
+ export const Article = story().render(renderFixture);
@@ -367,7 +367,7 @@
367
367
  const hasContent = slot
368
368
  .assignedNodes({ flatten: true })
369
369
  .some(__classPrivateFieldGet(this, _AutoHideEmptySlotsClass_isMeaningful, "f"));
370
- slot.style.display = hasContent ? 'block' : '';
370
+ slot.style.display = hasContent ? 'revert-layer' : '';
371
371
  });
372
372
  }
373
373
  static finalizeStyles(styles) {
@@ -65394,7 +65394,7 @@
65394
65394
  this.collapsible = false;
65395
65395
  this.handleToggle = () => {
65396
65396
  this.dispatchEvent(new CustomEvent('expanded-changed', {
65397
- detail: { expanded: !this.isAsideExpanded },
65397
+ detail: { expanded: this.isAsideExpanded === false },
65398
65398
  bubbles: true,
65399
65399
  composed: true,
65400
65400
  }));
@@ -65413,12 +65413,15 @@
65413
65413
  }
65414
65414
  }
65415
65415
  render() {
65416
+ const isAsideExpanded = this.isAsideExpanded !== false;
65417
+ const toggleLabel = isAsideExpanded ? 'Collapse' : 'Expand sidebar';
65418
+ const toggleTitle = isAsideExpanded ? 'Collapse sidebar' : 'Expand sidebar';
65416
65419
  return u$2 `
65417
65420
  <nav
65418
- class=${e$3({ main: true, 'is-aside-expanded': this.isAsideExpanded !== false })}
65421
+ class=${e$3({ main: true, 'is-aside-expanded': isAsideExpanded })}
65419
65422
  role="navigation"
65420
65423
  aria-label=${this.ariaLabel}
65421
- aria-expanded=${this.isAsideExpanded !== false ? 'true' : 'false'}
65424
+ aria-expanded=${isAsideExpanded ? 'true' : 'false'}
65422
65425
  >
65423
65426
  <div class="header">
65424
65427
  <slot name="header"></slot>
@@ -65437,19 +65440,19 @@
65437
65440
  ? u$2 `<div class="toggle-container">
65438
65441
  <quantic-sidebar-menu-item
65439
65442
  @click=${this.handleToggle}
65440
- title=${this.isAsideExpanded ? 'Collapse sidebar' : 'Expand sidebar'}
65441
- label=${this.isAsideExpanded ? 'Collapse' : 'Expand sidebar'}
65443
+ title=${toggleTitle}
65444
+ label=${toggleLabel}
65442
65445
  variant=${SidebarMenuItemVariant.Secondary}
65443
65446
  >
65444
65447
  <quantic-icon-lucide-panel-left-close
65445
65448
  slot="icon"
65446
65449
  size="sm"
65447
- ?hidden=${!this.isAsideExpanded}
65450
+ ?hidden=${!isAsideExpanded}
65448
65451
  ></quantic-icon-lucide-panel-left-close>
65449
65452
  <quantic-icon-lucide-panel-left
65450
65453
  slot="icon"
65451
65454
  size="sm"
65452
- ?hidden=${this.isAsideExpanded}
65455
+ ?hidden=${isAsideExpanded}
65453
65456
  ></quantic-icon-lucide-panel-left>
65454
65457
  </quantic-sidebar-menu-item>
65455
65458
  </div>`
@@ -67130,6 +67133,96 @@
67130
67133
  quanticElement('quantic-progress')
67131
67134
  ], exports.Progress);
67132
67135
 
67136
+ const ProseAs = {
67137
+ Article: 'article',
67138
+ Section: 'section',
67139
+ Div: 'div',
67140
+ };
67141
+
67142
+ exports.Prose = class Prose extends QuanticElement {
67143
+ constructor() {
67144
+ super(...arguments);
67145
+ this.as = ProseAs.Article;
67146
+ }
67147
+ render() {
67148
+ const Tag = s$5(this.as);
67149
+ return u$2 `<${Tag}><slot></slot></${Tag}>`;
67150
+ }
67151
+ };
67152
+ exports.Prose.meta = {
67153
+ tag: 'quantic-prose',
67154
+ description: 'Article context for long-form HTML (markdown, MDX, docs). Typography comes from ' +
67155
+ '@ctrliq/quantic-css/prose on the critical path (`@forward` in global.scss) so first paint ' +
67156
+ 'matches before the custom element upgrades. The host only wraps slotted content in a ' +
67157
+ 'landmark (`as`) for catalog/Storybook — it does not ship article CSS. Use quantic-text for one-off strings.',
67158
+ category: 'display',
67159
+ slots: {
67160
+ '': { description: 'Article content (headings, paragraphs, lists, pre, embedded components).' },
67161
+ },
67162
+ relatedTo: ['quantic-text', 'quantic-alert'],
67163
+ };
67164
+ exports.Prose.styles = i$7 `
67165
+ :host {
67166
+ display: block;
67167
+ }
67168
+
67169
+ /* Slotted siblings ignore document > * + * margins for layout; flex gap handles rhythm. */
67170
+ article,
67171
+ section,
67172
+ div {
67173
+ display: flex;
67174
+ flex-direction: column;
67175
+ row-gap: var(--quantic-spacing-5);
67176
+ }
67177
+
67178
+ slot {
67179
+ display: contents;
67180
+ }
67181
+
67182
+ /* prose.scss margins stack with flex gap in the slot — zero them on slotted blocks. */
67183
+ ::slotted(h1),
67184
+ ::slotted(h2),
67185
+ ::slotted(h3),
67186
+ ::slotted(h4),
67187
+ ::slotted(p),
67188
+ ::slotted(ul),
67189
+ ::slotted(ol),
67190
+ ::slotted(pre),
67191
+ ::slotted(blockquote),
67192
+ ::slotted(figure),
67193
+ ::slotted(table),
67194
+ ::slotted(hr),
67195
+ ::slotted(quantic-alert) {
67196
+ margin-block: 0 !important;
67197
+ margin-inline: 0;
67198
+ }
67199
+
67200
+ /* row-gap (spacing-5) + extras mirror prose.scss rhythm without doubling. */
67201
+ ::slotted(.lead),
67202
+ ::slotted(.lede) {
67203
+ margin-block-end: var(--quantic-spacing-3) !important;
67204
+ }
67205
+
67206
+ ::slotted(h2) {
67207
+ margin-block-start: var(--quantic-spacing-3) !important;
67208
+ }
67209
+
67210
+ ::slotted(p + p) {
67211
+ margin-block-start: var(--quantic-spacing-1) !important;
67212
+ }
67213
+ `;
67214
+ __decorate([
67215
+ prop({
67216
+ type: 'ProseAs',
67217
+ options: Object.values(ProseAs),
67218
+ default: ProseAs.Article,
67219
+ description: 'Landmark element wrapping the slot (article, section, or div).',
67220
+ })
67221
+ ], exports.Prose.prototype, "as", void 0);
67222
+ exports.Prose = __decorate([
67223
+ quanticElement('quantic-prose')
67224
+ ], exports.Prose);
67225
+
67133
67226
  exports.Skeleton = class Skeleton extends QuanticElement {
67134
67227
  render() {
67135
67228
  return b `
@@ -70498,6 +70591,7 @@
70498
70591
  exports.PopoverTrigger = PopoverTrigger;
70499
70592
  exports.ProgressColor = ProgressColor;
70500
70593
  exports.ProgressSize = ProgressSize;
70594
+ exports.ProseAs = ProseAs;
70501
70595
  exports.QuanticElement = QuanticElement;
70502
70596
  exports.RadioGroupGap = RadioGroupGap;
70503
70597
  exports.RadioGroupVariant = RadioGroupVariant;