@peektravel/app-utilities 0.1.2 → 0.1.3
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/ui/index.cjs +9 -3
- package/dist/ui/index.cjs.map +1 -1
- package/dist/ui/index.d.cts +2 -0
- package/dist/ui/index.d.ts +2 -0
- package/dist/ui/index.js +9 -3
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/odyssey.css +1 -0
- package/package.json +1 -1
package/dist/ui/index.d.cts
CHANGED
|
@@ -173,6 +173,8 @@ declare class OdyAlert extends OdyElement {
|
|
|
173
173
|
* Attributes:
|
|
174
174
|
* - `bar-color` — CSS colour for the accent bar (default neutral-200).
|
|
175
175
|
* - `clickable` — adds pointer affordance (emit your own click handling).
|
|
176
|
+
* - `no-bar` — omits the accent bar entirely, rendering a plain bordered
|
|
177
|
+
* container (the default generic card).
|
|
176
178
|
*/
|
|
177
179
|
declare class OdyCard extends OdyElement {
|
|
178
180
|
static observedAttributes: string[];
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -173,6 +173,8 @@ declare class OdyAlert extends OdyElement {
|
|
|
173
173
|
* Attributes:
|
|
174
174
|
* - `bar-color` — CSS colour for the accent bar (default neutral-200).
|
|
175
175
|
* - `clickable` — adds pointer affordance (emit your own click handling).
|
|
176
|
+
* - `no-bar` — omits the accent bar entirely, rendering a plain bordered
|
|
177
|
+
* container (the default generic card).
|
|
176
178
|
*/
|
|
177
179
|
declare class OdyCard extends OdyElement {
|
|
178
180
|
static observedAttributes: string[];
|
package/dist/ui/index.js
CHANGED
|
@@ -809,13 +809,19 @@ define("ody-alert", OdyAlert);
|
|
|
809
809
|
|
|
810
810
|
// src/ui/components/card.ts
|
|
811
811
|
var OdyCard = class extends OdyElement {
|
|
812
|
-
static observedAttributes = ["bar-color", "clickable"];
|
|
812
|
+
static observedAttributes = ["bar-color", "clickable", "no-bar"];
|
|
813
813
|
render() {
|
|
814
|
+
const noBar = this.flag("no-bar");
|
|
814
815
|
const barColor = this.attr("bar-color");
|
|
815
816
|
const barStyle = barColor ? ` style="background-color:${this.esc(barColor)}"` : "";
|
|
816
|
-
const cls = classes(
|
|
817
|
+
const cls = classes(
|
|
818
|
+
"ody-card__container",
|
|
819
|
+
this.flag("clickable") && "ody-card--clickable",
|
|
820
|
+
noBar && "ody-card--no-bar"
|
|
821
|
+
);
|
|
822
|
+
const bar = noBar ? "" : `<div class="ody-card__container__bar"${barStyle}></div>`;
|
|
817
823
|
this.mount(
|
|
818
|
-
`<div class="${cls}" style="display:flex"
|
|
824
|
+
`<div class="${cls}" style="display:flex">` + bar + `<div class="ody-card__container__content" data-ody-slot></div></div>`
|
|
819
825
|
);
|
|
820
826
|
}
|
|
821
827
|
};
|