@orange-halo/components 1.0.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/custom-elements.json +186 -0
- package/dist/base.d.ts +30 -0
- package/dist/base.d.ts.map +1 -0
- package/dist/base.js +78 -0
- package/dist/base.js.map +1 -0
- package/dist/index.d.ts +83 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +72 -0
- package/dist/index.js.map +1 -0
- package/dist/oh-accordion.d.ts +47 -0
- package/dist/oh-accordion.d.ts.map +1 -0
- package/dist/oh-accordion.js +387 -0
- package/dist/oh-accordion.js.map +1 -0
- package/dist/oh-alert.d.ts +48 -0
- package/dist/oh-alert.d.ts.map +1 -0
- package/dist/oh-alert.js +343 -0
- package/dist/oh-alert.js.map +1 -0
- package/dist/oh-badge.d.ts +38 -0
- package/dist/oh-badge.d.ts.map +1 -0
- package/dist/oh-badge.js +176 -0
- package/dist/oh-badge.js.map +1 -0
- package/dist/oh-breadcrumb.d.ts +39 -0
- package/dist/oh-breadcrumb.d.ts.map +1 -0
- package/dist/oh-breadcrumb.js +277 -0
- package/dist/oh-breadcrumb.js.map +1 -0
- package/dist/oh-button.d.ts +62 -0
- package/dist/oh-button.d.ts.map +1 -0
- package/dist/oh-button.figma.d.ts +2 -0
- package/dist/oh-button.figma.d.ts.map +1 -0
- package/dist/oh-button.figma.js +20 -0
- package/dist/oh-button.figma.js.map +1 -0
- package/dist/oh-button.js +490 -0
- package/dist/oh-button.js.map +1 -0
- package/dist/oh-card.d.ts +44 -0
- package/dist/oh-card.d.ts.map +1 -0
- package/dist/oh-card.js +340 -0
- package/dist/oh-card.js.map +1 -0
- package/dist/oh-checkbox-group.d.ts +39 -0
- package/dist/oh-checkbox-group.d.ts.map +1 -0
- package/dist/oh-checkbox-group.figma.d.ts +2 -0
- package/dist/oh-checkbox-group.figma.d.ts.map +1 -0
- package/dist/oh-checkbox-group.figma.js +24 -0
- package/dist/oh-checkbox-group.figma.js.map +1 -0
- package/dist/oh-checkbox-group.js +309 -0
- package/dist/oh-checkbox-group.js.map +1 -0
- package/dist/oh-checkbox.d.ts +50 -0
- package/dist/oh-checkbox.d.ts.map +1 -0
- package/dist/oh-checkbox.js +315 -0
- package/dist/oh-checkbox.js.map +1 -0
- package/dist/oh-cluster.d.ts +38 -0
- package/dist/oh-cluster.d.ts.map +1 -0
- package/dist/oh-cluster.js +141 -0
- package/dist/oh-cluster.js.map +1 -0
- package/dist/oh-container.d.ts +38 -0
- package/dist/oh-container.d.ts.map +1 -0
- package/dist/oh-container.js +116 -0
- package/dist/oh-container.js.map +1 -0
- package/dist/oh-drawer.d.ts +66 -0
- package/dist/oh-drawer.d.ts.map +1 -0
- package/dist/oh-drawer.js +284 -0
- package/dist/oh-drawer.js.map +1 -0
- package/dist/oh-footer.d.ts +40 -0
- package/dist/oh-footer.d.ts.map +1 -0
- package/dist/oh-footer.js +112 -0
- package/dist/oh-footer.js.map +1 -0
- package/dist/oh-grid.d.ts +40 -0
- package/dist/oh-grid.d.ts.map +1 -0
- package/dist/oh-grid.js +168 -0
- package/dist/oh-grid.js.map +1 -0
- package/dist/oh-hero.d.ts +28 -0
- package/dist/oh-hero.d.ts.map +1 -0
- package/dist/oh-hero.js +242 -0
- package/dist/oh-hero.js.map +1 -0
- package/dist/oh-icon.d.ts +44 -0
- package/dist/oh-icon.d.ts.map +1 -0
- package/dist/oh-icon.js +321 -0
- package/dist/oh-icon.js.map +1 -0
- package/dist/oh-input.d.ts +56 -0
- package/dist/oh-input.d.ts.map +1 -0
- package/dist/oh-input.figma.d.ts +2 -0
- package/dist/oh-input.figma.d.ts.map +1 -0
- package/dist/oh-input.figma.js +36 -0
- package/dist/oh-input.figma.js.map +1 -0
- package/dist/oh-input.js +320 -0
- package/dist/oh-input.js.map +1 -0
- package/dist/oh-link.d.ts +45 -0
- package/dist/oh-link.d.ts.map +1 -0
- package/dist/oh-link.js +392 -0
- package/dist/oh-link.js.map +1 -0
- package/dist/oh-modal.d.ts +54 -0
- package/dist/oh-modal.d.ts.map +1 -0
- package/dist/oh-modal.js +450 -0
- package/dist/oh-modal.js.map +1 -0
- package/dist/oh-navbar.d.ts +49 -0
- package/dist/oh-navbar.d.ts.map +1 -0
- package/dist/oh-navbar.js +185 -0
- package/dist/oh-navbar.js.map +1 -0
- package/dist/oh-progress.d.ts +56 -0
- package/dist/oh-progress.d.ts.map +1 -0
- package/dist/oh-progress.js +299 -0
- package/dist/oh-progress.js.map +1 -0
- package/dist/oh-radio-group.d.ts +43 -0
- package/dist/oh-radio-group.d.ts.map +1 -0
- package/dist/oh-radio-group.figma.d.ts +2 -0
- package/dist/oh-radio-group.figma.d.ts.map +1 -0
- package/dist/oh-radio-group.figma.js +22 -0
- package/dist/oh-radio-group.figma.js.map +1 -0
- package/dist/oh-radio-group.js +324 -0
- package/dist/oh-radio-group.js.map +1 -0
- package/dist/oh-radio.d.ts +50 -0
- package/dist/oh-radio.d.ts.map +1 -0
- package/dist/oh-radio.js +314 -0
- package/dist/oh-radio.js.map +1 -0
- package/dist/oh-select.d.ts +82 -0
- package/dist/oh-select.d.ts.map +1 -0
- package/dist/oh-select.js +638 -0
- package/dist/oh-select.js.map +1 -0
- package/dist/oh-skip-link.d.ts +37 -0
- package/dist/oh-skip-link.d.ts.map +1 -0
- package/dist/oh-skip-link.js +145 -0
- package/dist/oh-skip-link.js.map +1 -0
- package/dist/oh-stack.d.ts +36 -0
- package/dist/oh-stack.d.ts.map +1 -0
- package/dist/oh-stack.js +112 -0
- package/dist/oh-stack.js.map +1 -0
- package/dist/oh-tabs.d.ts +85 -0
- package/dist/oh-tabs.d.ts.map +1 -0
- package/dist/oh-tabs.js +417 -0
- package/dist/oh-tabs.js.map +1 -0
- package/dist/oh-toggle.d.ts +51 -0
- package/dist/oh-toggle.d.ts.map +1 -0
- package/dist/oh-toggle.js +219 -0
- package/dist/oh-toggle.js.map +1 -0
- package/dist/styles/typography.d.ts +15 -0
- package/dist/styles/typography.d.ts.map +1 -0
- package/dist/styles/typography.js +235 -0
- package/dist/styles/typography.js.map +1 -0
- package/package.json +140 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* oh-cluster
|
|
3
|
+
*
|
|
4
|
+
* Horizontal grouping with wrap and gap.
|
|
5
|
+
* Perfect for button groups, tags, navigation items.
|
|
6
|
+
*
|
|
7
|
+
* DESIGN DECISIONS:
|
|
8
|
+
* βββββββββββββββββ
|
|
9
|
+
* 1. FLEX WRAP BY DEFAULT
|
|
10
|
+
* - Items wrap to next line when needed
|
|
11
|
+
* - Consistent gaps in both directions
|
|
12
|
+
*
|
|
13
|
+
* 2. JUSTIFY OPTIONS
|
|
14
|
+
* - start, center, end, between, around
|
|
15
|
+
*
|
|
16
|
+
* 3. ALIGNMENT OPTIONS
|
|
17
|
+
* - start, center, end, baseline
|
|
18
|
+
*
|
|
19
|
+
* @element oh-cluster
|
|
20
|
+
*/
|
|
21
|
+
import { OhElement } from "./base.js";
|
|
22
|
+
export type ClusterGap = "none" | "xs" | "sm" | "md" | "lg" | "xl";
|
|
23
|
+
export type ClusterJustify = "start" | "center" | "end" | "between" | "around";
|
|
24
|
+
export type ClusterAlign = "start" | "center" | "end" | "baseline";
|
|
25
|
+
export declare class OhCluster extends OhElement {
|
|
26
|
+
static styles: import("lit").CSSResult[];
|
|
27
|
+
gap: ClusterGap;
|
|
28
|
+
justify: ClusterJustify;
|
|
29
|
+
align: ClusterAlign;
|
|
30
|
+
nowrap: boolean;
|
|
31
|
+
render(): import("lit").TemplateResult<1>;
|
|
32
|
+
}
|
|
33
|
+
declare global {
|
|
34
|
+
interface HTMLElementTagNameMap {
|
|
35
|
+
"oh-cluster": OhCluster;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=oh-cluster.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oh-cluster.d.ts","sourceRoot":"","sources":["../src/oh-cluster.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH,OAAO,EAAE,SAAS,EAAc,MAAM,WAAW,CAAC;AAElD,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AACnE,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,GAAG,QAAQ,CAAC;AAC/E,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,UAAU,CAAC;AAEnE,qBACa,SAAU,SAAQ,SAAS;IACtC,OAAgB,MAAM,4BAkFpB;IAGF,GAAG,EAAE,UAAU,CAAQ;IAGvB,OAAO,EAAE,cAAc,CAAW;IAGlC,KAAK,EAAE,YAAY,CAAY;IAG/B,MAAM,UAAS;IAEf,MAAM;CAGP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,SAAS,CAAC;KACzB;CACF"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* oh-cluster
|
|
3
|
+
*
|
|
4
|
+
* Horizontal grouping with wrap and gap.
|
|
5
|
+
* Perfect for button groups, tags, navigation items.
|
|
6
|
+
*
|
|
7
|
+
* DESIGN DECISIONS:
|
|
8
|
+
* βββββββββββββββββ
|
|
9
|
+
* 1. FLEX WRAP BY DEFAULT
|
|
10
|
+
* - Items wrap to next line when needed
|
|
11
|
+
* - Consistent gaps in both directions
|
|
12
|
+
*
|
|
13
|
+
* 2. JUSTIFY OPTIONS
|
|
14
|
+
* - start, center, end, between, around
|
|
15
|
+
*
|
|
16
|
+
* 3. ALIGNMENT OPTIONS
|
|
17
|
+
* - start, center, end, baseline
|
|
18
|
+
*
|
|
19
|
+
* @element oh-cluster
|
|
20
|
+
*/
|
|
21
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
22
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
23
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
24
|
+
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;
|
|
25
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
26
|
+
};
|
|
27
|
+
import { html, css } from "lit";
|
|
28
|
+
import { customElement, property } from "lit/decorators.js";
|
|
29
|
+
import { OhElement, baseStyles } from "./base.js";
|
|
30
|
+
let OhCluster = class OhCluster extends OhElement {
|
|
31
|
+
constructor() {
|
|
32
|
+
super(...arguments);
|
|
33
|
+
this.gap = "md";
|
|
34
|
+
this.justify = "start";
|
|
35
|
+
this.align = "center";
|
|
36
|
+
this.nowrap = false;
|
|
37
|
+
}
|
|
38
|
+
static { this.styles = [
|
|
39
|
+
baseStyles,
|
|
40
|
+
css `
|
|
41
|
+
/* βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
42
|
+
ORANGE HALO CLUSTER
|
|
43
|
+
Horizontal grouping β’ Flex wrap β’ Consistent gaps
|
|
44
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ */
|
|
45
|
+
|
|
46
|
+
:host {
|
|
47
|
+
display: flex;
|
|
48
|
+
flex-wrap: wrap;
|
|
49
|
+
width: 100%;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* No wrap option */
|
|
53
|
+
:host([nowrap]) {
|
|
54
|
+
flex-wrap: nowrap;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* Gap variants */
|
|
58
|
+
:host([gap="none"]) {
|
|
59
|
+
gap: 0;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
:host([gap="xs"]) {
|
|
63
|
+
gap: var(--oh-spacing-1);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
:host([gap="sm"]) {
|
|
67
|
+
gap: var(--oh-spacing-2);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
:host([gap="md"]) {
|
|
71
|
+
gap: var(--oh-spacing-4);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
:host([gap="lg"]) {
|
|
75
|
+
gap: var(--oh-spacing-6);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
:host([gap="xl"]) {
|
|
79
|
+
gap: var(--oh-spacing-8);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/* Justify variants */
|
|
83
|
+
:host([justify="start"]) {
|
|
84
|
+
justify-content: flex-start;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
:host([justify="center"]) {
|
|
88
|
+
justify-content: center;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
:host([justify="end"]) {
|
|
92
|
+
justify-content: flex-end;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
:host([justify="between"]) {
|
|
96
|
+
justify-content: space-between;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
:host([justify="around"]) {
|
|
100
|
+
justify-content: space-around;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* Alignment variants */
|
|
104
|
+
:host([align="start"]) {
|
|
105
|
+
align-items: flex-start;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
:host([align="center"]) {
|
|
109
|
+
align-items: center;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
:host([align="end"]) {
|
|
113
|
+
align-items: flex-end;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
:host([align="baseline"]) {
|
|
117
|
+
align-items: baseline;
|
|
118
|
+
}
|
|
119
|
+
`,
|
|
120
|
+
]; }
|
|
121
|
+
render() {
|
|
122
|
+
return html `<slot></slot>`;
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
__decorate([
|
|
126
|
+
property({ type: String, reflect: true })
|
|
127
|
+
], OhCluster.prototype, "gap", void 0);
|
|
128
|
+
__decorate([
|
|
129
|
+
property({ type: String, reflect: true })
|
|
130
|
+
], OhCluster.prototype, "justify", void 0);
|
|
131
|
+
__decorate([
|
|
132
|
+
property({ type: String, reflect: true })
|
|
133
|
+
], OhCluster.prototype, "align", void 0);
|
|
134
|
+
__decorate([
|
|
135
|
+
property({ type: Boolean, reflect: true })
|
|
136
|
+
], OhCluster.prototype, "nowrap", void 0);
|
|
137
|
+
OhCluster = __decorate([
|
|
138
|
+
customElement("oh-cluster")
|
|
139
|
+
], OhCluster);
|
|
140
|
+
export { OhCluster };
|
|
141
|
+
//# sourceMappingURL=oh-cluster.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oh-cluster.js","sourceRoot":"","sources":["../src/oh-cluster.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;AAEH,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAO3C,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,SAAS;IAAjC;;QAsFL,QAAG,GAAe,IAAI,CAAC;QAGvB,YAAO,GAAmB,OAAO,CAAC;QAGlC,UAAK,GAAiB,QAAQ,CAAC;QAG/B,WAAM,GAAG,KAAK,CAAC;IAKjB,CAAC;aAnGiB,WAAM,GAAG;QACvB,UAAU;QACV,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA+EF;KACF,AAlFqB,CAkFpB;IAcF,MAAM;QACJ,OAAO,IAAI,CAAA,eAAe,CAAC;IAC7B,CAAC;;AAbD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;sCACnB;AAGvB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0CACR;AAGlC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;wCACX;AAG/B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCAC5B;AA/FJ,SAAS;IADrB,aAAa,CAAC,YAAY,CAAC;GACf,SAAS,CAoGrB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* oh-container
|
|
3
|
+
*
|
|
4
|
+
* Max-width wrapper with centered content.
|
|
5
|
+
* Used to constrain content width and provide consistent horizontal padding.
|
|
6
|
+
*
|
|
7
|
+
* DESIGN DECISIONS:
|
|
8
|
+
* βββββββββββββββββ
|
|
9
|
+
* 1. RESPONSIVE MAX-WIDTHS
|
|
10
|
+
* - sm: 640px (tight, focused content)
|
|
11
|
+
* - md: 768px (articles, forms)
|
|
12
|
+
* - lg: 1024px (standard pages)
|
|
13
|
+
* - xl: 1280px (wide layouts)
|
|
14
|
+
* - full: 100% (edge-to-edge)
|
|
15
|
+
*
|
|
16
|
+
* 2. CONSISTENT PADDING
|
|
17
|
+
* - Uses spacing tokens for horizontal padding
|
|
18
|
+
* - Responsive padding on smaller screens
|
|
19
|
+
*
|
|
20
|
+
* 3. CENTERED BY DEFAULT
|
|
21
|
+
* - margin: 0 auto for horizontal centering
|
|
22
|
+
*
|
|
23
|
+
* @element oh-container
|
|
24
|
+
*/
|
|
25
|
+
import { OhElement } from "./base.js";
|
|
26
|
+
export type ContainerSize = "sm" | "md" | "lg" | "xl" | "full";
|
|
27
|
+
export declare class OhContainer extends OhElement {
|
|
28
|
+
static styles: import("lit").CSSResult[];
|
|
29
|
+
size: ContainerSize;
|
|
30
|
+
center: boolean;
|
|
31
|
+
render(): import("lit").TemplateResult<1>;
|
|
32
|
+
}
|
|
33
|
+
declare global {
|
|
34
|
+
interface HTMLElementTagNameMap {
|
|
35
|
+
"oh-container": OhContainer;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=oh-container.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oh-container.d.ts","sourceRoot":"","sources":["../src/oh-container.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAIH,OAAO,EAAE,SAAS,EAAc,MAAM,WAAW,CAAC;AAElD,MAAM,MAAM,aAAa,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;AAE/D,qBACa,WAAY,SAAQ,SAAS;IACxC,OAAgB,MAAM,4BA6DpB;IAGF,IAAI,EAAE,aAAa,CAAQ;IAG3B,MAAM,UAAS;IAEf,MAAM;CAGP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,WAAW,CAAC;KAC7B;CACF"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* oh-container
|
|
3
|
+
*
|
|
4
|
+
* Max-width wrapper with centered content.
|
|
5
|
+
* Used to constrain content width and provide consistent horizontal padding.
|
|
6
|
+
*
|
|
7
|
+
* DESIGN DECISIONS:
|
|
8
|
+
* βββββββββββββββββ
|
|
9
|
+
* 1. RESPONSIVE MAX-WIDTHS
|
|
10
|
+
* - sm: 640px (tight, focused content)
|
|
11
|
+
* - md: 768px (articles, forms)
|
|
12
|
+
* - lg: 1024px (standard pages)
|
|
13
|
+
* - xl: 1280px (wide layouts)
|
|
14
|
+
* - full: 100% (edge-to-edge)
|
|
15
|
+
*
|
|
16
|
+
* 2. CONSISTENT PADDING
|
|
17
|
+
* - Uses spacing tokens for horizontal padding
|
|
18
|
+
* - Responsive padding on smaller screens
|
|
19
|
+
*
|
|
20
|
+
* 3. CENTERED BY DEFAULT
|
|
21
|
+
* - margin: 0 auto for horizontal centering
|
|
22
|
+
*
|
|
23
|
+
* @element oh-container
|
|
24
|
+
*/
|
|
25
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
26
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
27
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
28
|
+
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;
|
|
29
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
30
|
+
};
|
|
31
|
+
import { html, css } from "lit";
|
|
32
|
+
import { customElement, property } from "lit/decorators.js";
|
|
33
|
+
import { OhElement, baseStyles } from "./base.js";
|
|
34
|
+
let OhContainer = class OhContainer extends OhElement {
|
|
35
|
+
constructor() {
|
|
36
|
+
super(...arguments);
|
|
37
|
+
this.size = "lg";
|
|
38
|
+
this.center = false;
|
|
39
|
+
}
|
|
40
|
+
static { this.styles = [
|
|
41
|
+
baseStyles,
|
|
42
|
+
css `
|
|
43
|
+
/* βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
44
|
+
ORANGE HALO CONTAINER
|
|
45
|
+
Max-width wrapper β’ Centered content β’ Responsive padding
|
|
46
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ */
|
|
47
|
+
|
|
48
|
+
:host {
|
|
49
|
+
display: block;
|
|
50
|
+
width: 100%;
|
|
51
|
+
margin-left: auto;
|
|
52
|
+
margin-right: auto;
|
|
53
|
+
padding-left: var(--oh-spacing-4, 16px);
|
|
54
|
+
padding-right: var(--oh-spacing-4, 16px);
|
|
55
|
+
box-sizing: border-box;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* Size variants */
|
|
59
|
+
:host([size="sm"]) {
|
|
60
|
+
max-width: 640px;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
:host([size="md"]) {
|
|
64
|
+
max-width: 768px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
:host([size="lg"]) {
|
|
68
|
+
max-width: 1024px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
:host([size="xl"]) {
|
|
72
|
+
max-width: 1280px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
:host([size="full"]) {
|
|
76
|
+
max-width: 100%;
|
|
77
|
+
padding-left: 0;
|
|
78
|
+
padding-right: 0;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* Responsive padding */
|
|
82
|
+
@media (min-width: 640px) {
|
|
83
|
+
:host {
|
|
84
|
+
padding-left: var(--oh-spacing-6, 24px);
|
|
85
|
+
padding-right: var(--oh-spacing-6, 24px);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@media (min-width: 1024px) {
|
|
90
|
+
:host {
|
|
91
|
+
padding-left: var(--oh-spacing-8, 32px);
|
|
92
|
+
padding-right: var(--oh-spacing-8, 32px);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/* Center alignment option */
|
|
97
|
+
:host([center]) {
|
|
98
|
+
text-align: center;
|
|
99
|
+
}
|
|
100
|
+
`,
|
|
101
|
+
]; }
|
|
102
|
+
render() {
|
|
103
|
+
return html `<slot></slot>`;
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
__decorate([
|
|
107
|
+
property({ type: String, reflect: true })
|
|
108
|
+
], OhContainer.prototype, "size", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
property({ type: Boolean, reflect: true })
|
|
111
|
+
], OhContainer.prototype, "center", void 0);
|
|
112
|
+
OhContainer = __decorate([
|
|
113
|
+
customElement("oh-container")
|
|
114
|
+
], OhContainer);
|
|
115
|
+
export { OhContainer };
|
|
116
|
+
//# sourceMappingURL=oh-container.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oh-container.js","sourceRoot":"","sources":["../src/oh-container.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;;;;;;;AAEH,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAK3C,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,SAAS;IAAnC;;QAiEL,SAAI,GAAkB,IAAI,CAAC;QAG3B,WAAM,GAAG,KAAK,CAAC;IAKjB,CAAC;aAxEiB,WAAM,GAAG;QACvB,UAAU;QACV,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA0DF;KACF,AA7DqB,CA6DpB;IAQF,MAAM;QACJ,OAAO,IAAI,CAAA,eAAe,CAAC;IAC7B,CAAC;;AAPD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCACf;AAG3B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2CAC5B;AApEJ,WAAW;IADvB,aAAa,CAAC,cAAc,CAAC;GACjB,WAAW,CAyEvB"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* oh-drawer
|
|
3
|
+
*
|
|
4
|
+
* A slide-out drawer component for mobile navigation and side panels.
|
|
5
|
+
*
|
|
6
|
+
* DESIGN DECISIONS:
|
|
7
|
+
* βββββββββββββββββ
|
|
8
|
+
* 1. POSITIONING
|
|
9
|
+
* - Slides in from left or right
|
|
10
|
+
* - Full height, configurable width
|
|
11
|
+
* - Overlays content with warm backdrop
|
|
12
|
+
*
|
|
13
|
+
* 2. STYLING
|
|
14
|
+
* - Chunky border on the edge
|
|
15
|
+
* - Warm surface background
|
|
16
|
+
* - Smooth slide animation
|
|
17
|
+
*
|
|
18
|
+
* 3. ACCESSIBILITY
|
|
19
|
+
* - Focus trap when open
|
|
20
|
+
* - Escape key closes
|
|
21
|
+
* - aria-modal and role="dialog"
|
|
22
|
+
* - Returns focus to trigger on close
|
|
23
|
+
*
|
|
24
|
+
* @element oh-drawer
|
|
25
|
+
*
|
|
26
|
+
* @slot - Default slot for drawer content
|
|
27
|
+
*
|
|
28
|
+
* @fires oh-close - When the drawer is closed
|
|
29
|
+
*
|
|
30
|
+
* @cssprop --oh-drawer-width - Width of the drawer (default: 280px)
|
|
31
|
+
*/
|
|
32
|
+
import { OhElement } from "./base.js";
|
|
33
|
+
import "./oh-button.js";
|
|
34
|
+
import "./oh-icon.js";
|
|
35
|
+
export declare class OhDrawer extends OhElement {
|
|
36
|
+
static styles: import("lit").CSSResult[];
|
|
37
|
+
/** Whether the drawer is open */
|
|
38
|
+
open: boolean;
|
|
39
|
+
/** Position of the drawer */
|
|
40
|
+
position: "left" | "right";
|
|
41
|
+
/** Title shown in the drawer header */
|
|
42
|
+
heading?: string;
|
|
43
|
+
/** Element that triggered the drawer (for focus return) */
|
|
44
|
+
private _triggerElement;
|
|
45
|
+
private _drawer;
|
|
46
|
+
private _cleanupFocusTrap?;
|
|
47
|
+
connectedCallback(): void;
|
|
48
|
+
disconnectedCallback(): void;
|
|
49
|
+
updated(changedProperties: Map<string, unknown>): void;
|
|
50
|
+
private _onOpen;
|
|
51
|
+
private _onClose;
|
|
52
|
+
private _handleKeydown;
|
|
53
|
+
private _close;
|
|
54
|
+
private _handleBackdropClick;
|
|
55
|
+
/** Public method to open the drawer */
|
|
56
|
+
show(): void;
|
|
57
|
+
/** Public method to close the drawer */
|
|
58
|
+
hide(): void;
|
|
59
|
+
render(): import("lit").TemplateResult<1>;
|
|
60
|
+
}
|
|
61
|
+
declare global {
|
|
62
|
+
interface HTMLElementTagNameMap {
|
|
63
|
+
"oh-drawer": OhDrawer;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=oh-drawer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oh-drawer.d.ts","sourceRoot":"","sources":["../src/oh-drawer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAIH,OAAO,EAAE,SAAS,EAAc,MAAM,WAAW,CAAC;AAGlD,OAAO,gBAAgB,CAAC;AACxB,OAAO,cAAc,CAAC;AAEtB,qBACa,QAAS,SAAQ,SAAS;IACrC,OAAgB,MAAM,4BA+FpB;IAEF,iCAAiC;IAEjC,IAAI,UAAS;IAEb,6BAA6B;IAE7B,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAU;IAEpC,uCAAuC;IAEvC,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,2DAA2D;IAE3D,OAAO,CAAC,eAAe,CAA4B;IAGnD,OAAO,CAAC,OAAO,CAAe;IAE9B,OAAO,CAAC,iBAAiB,CAAC,CAAa;IAEvC,iBAAiB;IAKjB,oBAAoB;IAMpB,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IAU/C,OAAO,CAAC,OAAO;IAqBf,OAAO,CAAC,QAAQ;IAgBhB,OAAO,CAAC,cAAc;IAOtB,OAAO,CAAC,MAAM;IAKd,OAAO,CAAC,oBAAoB;IAI5B,uCAAuC;IACvC,IAAI;IAIJ,wCAAwC;IACxC,IAAI;IAIJ,MAAM;CA+CP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
|