@odx/foundation 1.0.0-beta.2 → 1.0.0-beta.4
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/components/list/list-item.d.ts +1 -0
- package/dist/components.js +10 -6
- package/dist/main.js +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -9,6 +9,7 @@ declare global {
|
|
|
9
9
|
declare const OdxListItem_base: import('../../lib/main.js').Constructor<CanBeSelected> & import('../../lib/main.js').Constructor<CanBeExpanded> & typeof BaseButton;
|
|
10
10
|
export declare class OdxListItem extends OdxListItem_base {
|
|
11
11
|
#private;
|
|
12
|
+
expandControl: HTMLElement;
|
|
12
13
|
compact: boolean;
|
|
13
14
|
muted: boolean;
|
|
14
15
|
withControl: boolean;
|
package/dist/components.js
CHANGED
|
@@ -12,7 +12,7 @@ import { g as clamp, R as RovingTabindexController, r as round, i as debounce, m
|
|
|
12
12
|
import { styleMap } from 'lit/directives/style-map.js';
|
|
13
13
|
import { createContext, consume, provide } from '@lit/context';
|
|
14
14
|
|
|
15
|
-
const styles$1b = ":host{display:block}";
|
|
15
|
+
const styles$1b = ":host{display:block;padding-block:var(--odx-size-37)}";
|
|
16
16
|
|
|
17
17
|
var __defProp$1m = Object.defineProperty;
|
|
18
18
|
var __getOwnPropDesc$1m = Object.getOwnPropertyDescriptor;
|
|
@@ -79,7 +79,7 @@ OdxAccordionHeader = __decorateClass$1m([
|
|
|
79
79
|
customElement("odx-accordion-header", [styles$1b])
|
|
80
80
|
], OdxAccordionHeader);
|
|
81
81
|
|
|
82
|
-
const styles$1a = "@layer base{:host{display:block}odx-separator{
|
|
82
|
+
const styles$1a = "@layer base{:host{display:block}odx-separator{--block-space: 0}.content{padding:var(--odx-size-50);padding-block-start:var(--odx-size-12)}:host(:last-of-type) odx-separator{display:none}::slotted(odx-accordion){margin-block:calc(-1 * var(--odx-size-37));margin-inline-end:calc(-1 * var(--odx-size-50))}}";
|
|
83
83
|
|
|
84
84
|
var __defProp$1l = Object.defineProperty;
|
|
85
85
|
var __getOwnPropDesc$1l = Object.getOwnPropertyDescriptor;
|
|
@@ -2345,7 +2345,7 @@ OdxLineClamp = __decorateClass$M([
|
|
|
2345
2345
|
customElement("odx-line-clamp", [styles$I])
|
|
2346
2346
|
], OdxLineClamp);
|
|
2347
2347
|
|
|
2348
|
-
const styles$H = "@layer base{:host{--indent-level: 0;--_block-size: var(--odx-size-300);--_padding-block: var(--odx-size-75);--_padding-inline: var(--odx-size-50);--_margin-icon: 0;display:flex;flex-direction:column;max-inline-size:100%;block-size:auto;place-items:initial}.base,.spinner{padding-inline-start:calc(var(--odx-size-50) + var(--indent-level) * var(--odx-size-200))}.spinner{padding-inline-end:var(--odx-size-100)}.base{block-size:var(--_block-size);text-align:start;place-content:flex-start;outline-offset:calc(-1 * var(--odx-focus-ring-offset));z-index:1;line-height:var(--odx-typography-line-height-2)}.base:after{display:block;block-size:var(--odx-size-px);background-color:var(--odx-color-separator);position:absolute;inset:auto var(--odx-size-37) -1px;transition:var(--odx-transition-reduced);transition-property:opacity;z-index:0}:host(:is(:not(:last-of-type),[expanded]):not(:is([aria-current],[aria-disabled=\"true\"]))) .base:after{content:\"\"}.content{margin-inline-end:auto}.base>*{--odx-focus-ring-offset: 0}[part=control]::part(icon){transition:var(--odx-transition-reduced)
|
|
2348
|
+
const styles$H = "@layer base{:host{--indent-level: 0;--_block-size: var(--odx-size-300);--_padding-block: var(--odx-size-75);--_padding-inline: var(--odx-size-50);--_margin-icon: 0;display:flex;flex-direction:column;max-inline-size:100%;block-size:auto;place-items:initial}.base,.spinner{padding-inline-start:calc(var(--odx-size-50) + var(--indent-level) * var(--odx-size-200))}.spinner{padding-inline-end:var(--odx-size-100)}.base{block-size:var(--_block-size);text-align:start;place-content:flex-start;outline-offset:calc(-1 * var(--odx-focus-ring-offset));z-index:1;line-height:var(--odx-typography-line-height-2)}.base:after{display:block;block-size:var(--odx-size-px);background-color:var(--odx-color-separator);position:absolute;inset:auto var(--odx-size-37) -1px;transition:var(--odx-transition-reduced);transition-property:opacity;z-index:0}:host(:is(:not(:last-of-type),[expanded]):not(:is([aria-current],[aria-disabled=\"true\"]))) .base:after{content:\"\"}.content{margin-inline-end:auto}.base>*{--odx-focus-ring-offset: 0}[part=expand-control]::part(icon){transition:var(--odx-transition-reduced)}}@layer variant{.base:has([part=expand-control]:active){--_color-background-pressed: var(--_color-background-hover)}:host(:not([compact])){::slotted(odx-icon){margin-inline:var(--odx-size-37)}}:host([compact]){--_block-size: var(--odx-size-225);[part=expand-control]{--_icon-size: var(--odx-size-150)}}}@layer state{:host(:not([muted]):hover):after{opacity:0}:host([muted]:not([aria-disabled=\"true\"])){--_color-background-hover: var(--_color-background);--_color-background-pressed: var(--_color-background);cursor:default}:host([aria-current]){--_color-background: var(--odx-color-selected);--_color-background-hover: var(--odx-color-selected-hover)}:host([aria-current][aria-disabled=\"true\"]){--_color-background: var(--odx-color-disabled-fill-selected);--_color-background-hover: var(--_color-background);--_color-background-pressed: var(--_color-background);--_color-foreground: var(--odx-color-disabled-foreground-selected);cursor:not-allowed}:host([aria-expanded=\"true\"]) [part=expand-control]::part(icon){--rotate: 180deg}::slotted(odx-list){--item-indent-level: calc(var(--indent-level) + 1)}}";
|
|
2349
2349
|
|
|
2350
2350
|
var __defProp$L = Object.defineProperty;
|
|
2351
2351
|
var __getOwnPropDesc$L = Object.getOwnPropertyDescriptor;
|
|
@@ -2372,7 +2372,7 @@ let OdxListItem = class extends CanBeSelected(CanBeExpanded(BaseButton)) {
|
|
|
2372
2372
|
this.withControl = false;
|
|
2373
2373
|
this.withExpandedIndicator = false;
|
|
2374
2374
|
__privateAdd$h(this, _handleClick$4, (event) => {
|
|
2375
|
-
const expandControl = this.
|
|
2375
|
+
const expandControl = this.withControl ? this.expandControl : this.shadowRoot?.querySelector(".base");
|
|
2376
2376
|
if (!getElementFromEvent(event, (node) => node === expandControl)) return;
|
|
2377
2377
|
this.toggle();
|
|
2378
2378
|
if (!this.expanded) return;
|
|
@@ -2404,12 +2404,13 @@ let OdxListItem = class extends CanBeSelected(CanBeExpanded(BaseButton)) {
|
|
|
2404
2404
|
`;
|
|
2405
2405
|
}
|
|
2406
2406
|
renderContent() {
|
|
2407
|
+
const controlSize = this.compact ? ButtonSize.SM : void 0;
|
|
2407
2408
|
return html`
|
|
2408
2409
|
${super.renderContent(false)}
|
|
2409
2410
|
${when(
|
|
2410
2411
|
this.withExpandedIndicator || this.isExpandable(),
|
|
2411
2412
|
() => html`
|
|
2412
|
-
<odx-icon-button part="control" icon="core::chevron-down" size=${
|
|
2413
|
+
<odx-icon-button class="expand-control" part="expand-control" icon="core::chevron-down" size=${optionalAttr(controlSize)} variant="ghost" ?disabled=${this.disabled} ?inert=${!this.withControl}>
|
|
2413
2414
|
</odx-icon-button>
|
|
2414
2415
|
`
|
|
2415
2416
|
)}
|
|
@@ -2426,6 +2427,9 @@ let OdxListItem = class extends CanBeSelected(CanBeExpanded(BaseButton)) {
|
|
|
2426
2427
|
}
|
|
2427
2428
|
};
|
|
2428
2429
|
_handleClick$4 = new WeakMap();
|
|
2430
|
+
__decorateClass$L([
|
|
2431
|
+
query(".expand-control")
|
|
2432
|
+
], OdxListItem.prototype, "expandControl", 2);
|
|
2429
2433
|
__decorateClass$L([
|
|
2430
2434
|
property({ type: Boolean, reflect: true })
|
|
2431
2435
|
], OdxListItem.prototype, "compact", 2);
|
|
@@ -4981,7 +4985,7 @@ OdxToggleButton = __decorateClass$4([
|
|
|
4981
4985
|
customElement("odx-toggle-button", [styles$3])
|
|
4982
4986
|
], OdxToggleButton);
|
|
4983
4987
|
|
|
4984
|
-
const styles$2 = "@layer base{:host{display:grid;grid-template-rows:1fr;transition:var(--
|
|
4988
|
+
const styles$2 = "@layer base{:host{--offset-y: calc(-1 * var(--odx-size-25));--transition: var(--odx-transition-default);display:grid;grid-template-rows:1fr;transition:var(--transition)}.base{overflow:hidden}.content{transition:var(--transition);transition-property:opacity,transform,visibility}:host(:last-of-type) odx-separator{display:none}::slotted(*){background-color:transparent}}@layer state{:host([aria-hidden=\"true\"]){grid-template-rows:0fr;.content{opacity:0;transform:translateY(var(--offset-y));visibility:hidden}}}";
|
|
4985
4989
|
|
|
4986
4990
|
var __defProp$3 = Object.defineProperty;
|
|
4987
4991
|
var __getOwnPropDesc$3 = Object.getOwnPropertyDescriptor;
|
package/dist/main.js
CHANGED
|
@@ -155,7 +155,7 @@ class SlotFallbackDirective extends Directive {
|
|
|
155
155
|
}
|
|
156
156
|
const emptySlotFallbackFix = directive(SlotFallbackDirective);
|
|
157
157
|
|
|
158
|
-
const customElementStyles = "@layer reset,base,variant,state;@layer reset{:is(*){box-sizing:border-box;scrollbar-width:thin}:before,:after{box-sizing:border-box}[popover]{border:none;outline:none}img,picture,video,canvas,svg{display:block;max-width:100%;margin:0}input,button,textarea,select{font:inherit;margin:0}p,h1,h2,h3,h4,h5,h6{overflow-wrap:break-word;margin:0}p{text-wrap:pretty}h1,h2,h3,h4,h5,h6{text-wrap:balance}#root,#__next{isolation:isolate;margin:0}}@layer base{h1,h2,h3,h4,h5,h6{display:block;font-family:var(--odx-typography-font-family-brand);font-size:var(--_font-size);font-weight:var(--odx-typography-font-weight-semibold);line-height:var(--_line-height)}h6{--_font-size: var(--odx-breakpoint-font-size-heading-6);--_line-height: var(--odx-breakpoint-line-height-heading-6)}h5{--_font-size: var(--odx-breakpoint-font-size-heading-5);--_line-height: var(--odx-breakpoint-line-height-heading-5)}h4{--_font-size: var(--odx-breakpoint-font-size-heading-4);--_line-height: var(--odx-breakpoint-line-height-heading-4)}h3{--_font-size: var(--odx-breakpoint-font-size-heading-3);--_line-height: var(--odx-breakpoint-line-height-heading-3)}h2{--_font-size: var(--odx-breakpoint-font-size-heading-2);--_line-height: var(--odx-breakpoint-line-height-heading-2)}h1{--_font-size: var(--odx-breakpoint-font-size-heading-1);--_line-height: var(--odx-breakpoint-line-height-heading-1)}[odxPreventTextOverflow]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}@layer reset{:host{border:none;border-color:transparent;outline:none}}";
|
|
158
|
+
const customElementStyles = "@layer reset,base,variant,state;@layer reset{:is(*){box-sizing:border-box;scrollbar-width:thin}:before,:after{box-sizing:border-box}[popover]{border:none;outline:none}img,picture,video,canvas,svg{display:block;max-width:100%;margin:0}input,button,textarea,select{font:inherit;margin:0}p,h1,h2,h3,h4,h5,h6{overflow-wrap:break-word;margin:0}p{text-wrap:pretty}h1,h2,h3,h4,h5,h6{text-wrap:balance}#root,#__next{isolation:isolate;margin:0}}@layer base{h1,h2,h3,h4,h5,h6{display:block;font-family:var(--odx-typography-font-family-brand);font-size:var(--_font-size);font-weight:var(--odx-typography-font-weight-semibold);line-height:var(--_line-height)}h6{--_font-size: var(--odx-breakpoint-font-size-heading-6);--_line-height: var(--odx-breakpoint-line-height-heading-6)}h5{--_font-size: var(--odx-breakpoint-font-size-heading-5);--_line-height: var(--odx-breakpoint-line-height-heading-5)}h4{--_font-size: var(--odx-breakpoint-font-size-heading-4);--_line-height: var(--odx-breakpoint-line-height-heading-4)}h3{--_font-size: var(--odx-breakpoint-font-size-heading-3);--_line-height: var(--odx-breakpoint-line-height-heading-3)}h2{--_font-size: var(--odx-breakpoint-font-size-heading-2);--_line-height: var(--odx-breakpoint-line-height-heading-2)}h1{--_font-size: var(--odx-breakpoint-font-size-heading-1);--_line-height: var(--odx-breakpoint-line-height-heading-1)}odx-icon{transition:var(--odx-transition-default);transition-property:transform;transform:rotate(var(--rotate),0deg)}[odxPreventTextOverflow]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}odx-list-item:has(:is(odx-button,odx-icon-button,odx-list-item::part(control)):not([aria-disabled=true]):active){--_color-background-pressed: var(--_color-background-hover)}}@layer reset{:host{border:none;border-color:transparent;outline:none}}";
|
|
159
159
|
|
|
160
160
|
function mergeStyleSheets(...stylesheets) {
|
|
161
161
|
const mergedStyles = [];
|
package/dist/styles.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer reset,base,variant,state,theme;@layer reset{:is(*){box-sizing:border-box;scrollbar-width:thin}:before,:after{box-sizing:border-box}[popover]{border:none;outline:none}img,picture,video,canvas,svg{display:block;max-width:100%;margin:0}input,button,textarea,select{font:inherit;margin:0}p,h1,h2,h3,h4,h5,h6{overflow-wrap:break-word;margin:0}p{text-wrap:pretty}h1,h2,h3,h4,h5,h6{text-wrap:balance}#root,#__next{isolation:isolate;margin:0}}@layer base{h1,h2,h3,h4,h5,h6{display:block;font-family:var(--odx-typography-font-family-brand);font-size:var(--_font-size);font-weight:var(--odx-typography-font-weight-semibold);line-height:var(--_line-height)}h6{--_font-size: var(--odx-breakpoint-font-size-heading-6);--_line-height: var(--odx-breakpoint-line-height-heading-6)}h5{--_font-size: var(--odx-breakpoint-font-size-heading-5);--_line-height: var(--odx-breakpoint-line-height-heading-5)}h4{--_font-size: var(--odx-breakpoint-font-size-heading-4);--_line-height: var(--odx-breakpoint-line-height-heading-4)}h3{--_font-size: var(--odx-breakpoint-font-size-heading-3);--_line-height: var(--odx-breakpoint-line-height-heading-3)}h2{--_font-size: var(--odx-breakpoint-font-size-heading-2);--_line-height: var(--odx-breakpoint-line-height-heading-2)}h1{--_font-size: var(--odx-breakpoint-font-size-heading-1);--_line-height: var(--odx-breakpoint-line-height-heading-1)}[odxPreventTextOverflow]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}@layer base{:root{--odx-transition-default: all var(--odx-motion-duration-default) var(--odx-motion-easing-default);--odx-transition-slow: all var(--odx-motion-duration-slow) var(--odx-motion-easing-default);--odx-transition-reduced: all var(--odx-motion-duration-fast) var(--odx-motion-easing-reduced);--odx-page-max-inline-size: 1600px;--odx-page-max-inline-size-narrow: 1200px;--odx-page-max-inline-size-wide: 2400px;scrollbar-color:var(--odx-color-primary-rest) var(--odx-palette-transparent)}html,body{margin:0;padding:0}html{scroll-behavior:smooth}body{color:var(--odx-color-foreground-base);background-color:var(--odx-color-background-cool);font-family:var(--odx-typography-font-family-base),"Noto Sans","Kanit",sans-serif;font-size:var(--odx-typography-font-size-base);line-height:var(--odx-typography-line-height-base)}}
|
|
1
|
+
@layer reset,base,variant,state,theme;@layer reset{:is(*){box-sizing:border-box;scrollbar-width:thin}:before,:after{box-sizing:border-box}[popover]{border:none;outline:none}img,picture,video,canvas,svg{display:block;max-width:100%;margin:0}input,button,textarea,select{font:inherit;margin:0}p,h1,h2,h3,h4,h5,h6{overflow-wrap:break-word;margin:0}p{text-wrap:pretty}h1,h2,h3,h4,h5,h6{text-wrap:balance}#root,#__next{isolation:isolate;margin:0}}@layer base{h1,h2,h3,h4,h5,h6{display:block;font-family:var(--odx-typography-font-family-brand);font-size:var(--_font-size);font-weight:var(--odx-typography-font-weight-semibold);line-height:var(--_line-height)}h6{--_font-size: var(--odx-breakpoint-font-size-heading-6);--_line-height: var(--odx-breakpoint-line-height-heading-6)}h5{--_font-size: var(--odx-breakpoint-font-size-heading-5);--_line-height: var(--odx-breakpoint-line-height-heading-5)}h4{--_font-size: var(--odx-breakpoint-font-size-heading-4);--_line-height: var(--odx-breakpoint-line-height-heading-4)}h3{--_font-size: var(--odx-breakpoint-font-size-heading-3);--_line-height: var(--odx-breakpoint-line-height-heading-3)}h2{--_font-size: var(--odx-breakpoint-font-size-heading-2);--_line-height: var(--odx-breakpoint-line-height-heading-2)}h1{--_font-size: var(--odx-breakpoint-font-size-heading-1);--_line-height: var(--odx-breakpoint-line-height-heading-1)}odx-icon{transition:var(--odx-transition-default);transition-property:transform;transform:rotate(var(--rotate),0deg)}[odxPreventTextOverflow]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}odx-list-item:has(:is(odx-button,odx-icon-button,odx-list-item::part(control)):not([aria-disabled=true]):active){--_color-background-pressed: var(--_color-background-hover)}}@layer base{:root{--odx-transition-default: all var(--odx-motion-duration-default) var(--odx-motion-easing-default);--odx-transition-slow: all var(--odx-motion-duration-slow) var(--odx-motion-easing-default);--odx-transition-reduced: all var(--odx-motion-duration-fast) var(--odx-motion-easing-reduced);--odx-page-max-inline-size: 1600px;--odx-page-max-inline-size-narrow: 1200px;--odx-page-max-inline-size-wide: 2400px;scrollbar-color:var(--odx-color-primary-rest) var(--odx-palette-transparent)}html,body{margin:0;padding:0}html{scroll-behavior:smooth}body{color:var(--odx-color-foreground-base);background-color:var(--odx-color-background-cool);font-family:var(--odx-typography-font-family-base),"Noto Sans","Kanit",sans-serif;font-size:var(--odx-typography-font-size-base);line-height:var(--odx-typography-line-height-base)}}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@odx/foundation",
|
|
3
3
|
"description": "A library of Web Component building blocks for ODX",
|
|
4
|
-
"version": "1.0.0-beta.
|
|
4
|
+
"version": "1.0.0-beta.4",
|
|
5
5
|
"author": "Drägerwerk AG & Co.KGaA",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
7
7
|
"homepage": "https://odx.draeger.com",
|