@krumio/trailhand-ui 1.9.5 → 1.9.7
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/popover/index.d.ts +3 -0
- package/dist/components/popover/index.d.ts.map +1 -0
- package/dist/components/popover/index.js +2 -0
- package/dist/components/popover/index.js.map +1 -0
- package/dist/components/popover/popover.d.ts +42 -0
- package/dist/components/popover/popover.d.ts.map +1 -0
- package/dist/components/popover/popover.js +249 -0
- package/dist/components/popover/popover.js.map +1 -0
- package/dist/components/text-input/text-input.d.ts +1 -0
- package/dist/components/text-input/text-input.d.ts.map +1 -1
- package/dist/components/text-input/text-input.js +3 -0
- package/dist/components/text-input/text-input.js.map +1 -1
- package/dist/components/th-form-card/index.d.ts +4 -0
- package/dist/components/th-form-card/index.d.ts.map +1 -0
- package/dist/components/th-form-card/index.js +3 -0
- package/dist/components/th-form-card/index.js.map +1 -0
- package/dist/components/th-form-card/th-form-card.d.ts +37 -0
- package/dist/components/th-form-card/th-form-card.d.ts.map +1 -0
- package/dist/components/th-form-card/th-form-card.js +165 -0
- package/dist/components/th-form-card/th-form-card.js.map +1 -0
- package/dist/components/th-form-card/th-form-row.d.ts +16 -0
- package/dist/components/th-form-card/th-form-row.d.ts.map +1 -0
- package/dist/components/th-form-card/th-form-row.js +68 -0
- package/dist/components/th-form-card/th-form-row.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/styles/colors.css +20 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/popover/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/popover/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { LitElement, TemplateResult } from 'lit';
|
|
2
|
+
import '../icon/icon';
|
|
3
|
+
export type PopoverPlacement = 'top' | 'bottom' | 'left' | 'right';
|
|
4
|
+
export interface PopoverProps {
|
|
5
|
+
open: boolean;
|
|
6
|
+
stayOpen: boolean;
|
|
7
|
+
placement: PopoverPlacement;
|
|
8
|
+
title: string;
|
|
9
|
+
subtitle: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* A popover component that appears on click of a trigger element.
|
|
13
|
+
* Pass any content via the default slot and a custom trigger via the `trigger` slot.
|
|
14
|
+
* Use the `heading` slot to override the title/subtitle with custom markup.
|
|
15
|
+
*/
|
|
16
|
+
export declare class Popover extends LitElement {
|
|
17
|
+
open: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* When true, clicking outside the popover will not close it.
|
|
20
|
+
*/
|
|
21
|
+
stayOpen: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Controls which side of the trigger the popover appears on.
|
|
24
|
+
*/
|
|
25
|
+
placement: PopoverPlacement;
|
|
26
|
+
title: string;
|
|
27
|
+
subtitle: string;
|
|
28
|
+
private _hasHeadingSlot;
|
|
29
|
+
private _boundHandleClickOutside;
|
|
30
|
+
static styles: import("lit").CSSResult;
|
|
31
|
+
constructor();
|
|
32
|
+
connectedCallback(): void;
|
|
33
|
+
disconnectedCallback(): void;
|
|
34
|
+
private _handleClickOutside;
|
|
35
|
+
private _handleTriggerClick;
|
|
36
|
+
private _open;
|
|
37
|
+
private _close;
|
|
38
|
+
private _handleHeadingSlotChange;
|
|
39
|
+
private _renderHeader;
|
|
40
|
+
render(): TemplateResult;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=popover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../../src/components/popover/popover.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,cAAc,EAAW,MAAM,KAAK,CAAC;AAErE,OAAO,cAAc,CAAC;AAEtB,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;AAEnE,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,gBAAgB,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;GAIG;AACH,qBAAa,OAAQ,SAAQ,UAAU;IAErC,IAAI,UAAS;IAEb;;OAEG;IAEH,QAAQ,UAAS;IAEjB;;OAEG;IAEH,SAAS,EAAE,gBAAgB,CAAY;IAGvC,KAAK,SAAM;IAGX,QAAQ,SAAM;IAEL,OAAO,CAAC,eAAe,CAAS;IAEzC,OAAO,CAAC,wBAAwB,CAAqB;IAErD,OAAgB,MAAM,0BAuHpB;;IAOO,iBAAiB,IAAI,IAAI;IAKzB,oBAAoB,IAAI,IAAI;IAKrC,OAAO,CAAC,mBAAmB;IAQ3B,OAAO,CAAC,mBAAmB;IAS3B,OAAO,CAAC,KAAK;IAOb,OAAO,CAAC,MAAM;IAOd,OAAO,CAAC,wBAAwB;IAKhC,OAAO,CAAC,aAAa;IAkBZ,MAAM,IAAI,cAAc;CAuBlC"}
|
|
@@ -0,0 +1,249 @@
|
|
|
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 { LitElement, html, css, nothing } from 'lit';
|
|
8
|
+
import { property, state } from 'lit/decorators.js';
|
|
9
|
+
import '../icon/icon';
|
|
10
|
+
/**
|
|
11
|
+
* A popover component that appears on click of a trigger element.
|
|
12
|
+
* Pass any content via the default slot and a custom trigger via the `trigger` slot.
|
|
13
|
+
* Use the `heading` slot to override the title/subtitle with custom markup.
|
|
14
|
+
*/
|
|
15
|
+
export class Popover extends LitElement {
|
|
16
|
+
constructor() {
|
|
17
|
+
super();
|
|
18
|
+
this.open = false;
|
|
19
|
+
/**
|
|
20
|
+
* When true, clicking outside the popover will not close it.
|
|
21
|
+
*/
|
|
22
|
+
this.stayOpen = false;
|
|
23
|
+
/**
|
|
24
|
+
* Controls which side of the trigger the popover appears on.
|
|
25
|
+
*/
|
|
26
|
+
this.placement = 'bottom';
|
|
27
|
+
this.title = '';
|
|
28
|
+
this.subtitle = '';
|
|
29
|
+
this._hasHeadingSlot = false;
|
|
30
|
+
this._boundHandleClickOutside = this._handleClickOutside.bind(this);
|
|
31
|
+
}
|
|
32
|
+
connectedCallback() {
|
|
33
|
+
super.connectedCallback();
|
|
34
|
+
document.addEventListener('click', this._boundHandleClickOutside);
|
|
35
|
+
}
|
|
36
|
+
disconnectedCallback() {
|
|
37
|
+
super.disconnectedCallback();
|
|
38
|
+
document.removeEventListener('click', this._boundHandleClickOutside);
|
|
39
|
+
}
|
|
40
|
+
_handleClickOutside(e) {
|
|
41
|
+
if (this.stayOpen)
|
|
42
|
+
return;
|
|
43
|
+
const target = e.target;
|
|
44
|
+
if (this.open && !this.contains(target)) {
|
|
45
|
+
this._close();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
_handleTriggerClick(e) {
|
|
49
|
+
e.stopPropagation();
|
|
50
|
+
if (this.open) {
|
|
51
|
+
this._close();
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
this._open();
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
_open() {
|
|
58
|
+
this.open = true;
|
|
59
|
+
this.dispatchEvent(new CustomEvent('popover-open', { bubbles: true, composed: true }));
|
|
60
|
+
}
|
|
61
|
+
_close() {
|
|
62
|
+
this.open = false;
|
|
63
|
+
this.dispatchEvent(new CustomEvent('popover-close', { bubbles: true, composed: true }));
|
|
64
|
+
}
|
|
65
|
+
_handleHeadingSlotChange(e) {
|
|
66
|
+
const slot = e.target;
|
|
67
|
+
this._hasHeadingSlot = slot.assignedNodes({ flatten: true }).length > 0;
|
|
68
|
+
}
|
|
69
|
+
_renderHeader() {
|
|
70
|
+
const hasTitle = this.title || this._hasHeadingSlot;
|
|
71
|
+
if (!hasTitle)
|
|
72
|
+
return nothing;
|
|
73
|
+
return html `
|
|
74
|
+
<div class="popover-header" part="header">
|
|
75
|
+
<slot name="heading" @slotchange=${this._handleHeadingSlotChange}>
|
|
76
|
+
<div class="heading-content">
|
|
77
|
+
<p class="popover-title">${this.title}</p>
|
|
78
|
+
${this.subtitle
|
|
79
|
+
? html `<p class="popover-subtitle">${this.subtitle}</p>`
|
|
80
|
+
: nothing}
|
|
81
|
+
</div>
|
|
82
|
+
</slot>
|
|
83
|
+
</div>
|
|
84
|
+
`;
|
|
85
|
+
}
|
|
86
|
+
render() {
|
|
87
|
+
return html `
|
|
88
|
+
<div
|
|
89
|
+
class="trigger-wrapper"
|
|
90
|
+
@click=${this._handleTriggerClick}
|
|
91
|
+
aria-haspopup="true"
|
|
92
|
+
aria-expanded=${this.open}
|
|
93
|
+
>
|
|
94
|
+
<slot name="trigger"></slot>
|
|
95
|
+
</div>
|
|
96
|
+
|
|
97
|
+
<div
|
|
98
|
+
class="popover-content ${this.open ? 'popover-content--open' : ''}"
|
|
99
|
+
role="dialog"
|
|
100
|
+
aria-hidden=${!this.open}
|
|
101
|
+
>
|
|
102
|
+
${this._renderHeader()}
|
|
103
|
+
<div class="popover-body" part="body">
|
|
104
|
+
<slot></slot>
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
`;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
Popover.styles = css `
|
|
111
|
+
:host {
|
|
112
|
+
display: inline-block;
|
|
113
|
+
position: relative;
|
|
114
|
+
font-family: var(--font-family, 'Poppins', sans-serif);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.trigger-wrapper {
|
|
118
|
+
display: inline-block;
|
|
119
|
+
cursor: pointer;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.popover-content {
|
|
123
|
+
position: absolute;
|
|
124
|
+
z-index: 1000;
|
|
125
|
+
min-width: 200px;
|
|
126
|
+
background-color: var(--th-color-background, #ffffff);
|
|
127
|
+
border: 1px solid var(--th-color-border, #d7d7d7);
|
|
128
|
+
border-radius: 8px;
|
|
129
|
+
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
|
|
130
|
+
overflow: hidden;
|
|
131
|
+
opacity: 0;
|
|
132
|
+
visibility: hidden;
|
|
133
|
+
transition:
|
|
134
|
+
opacity 0.2s ease-in-out,
|
|
135
|
+
transform 0.2s ease-in-out,
|
|
136
|
+
visibility 0.2s ease-in-out;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.popover-content--open {
|
|
140
|
+
opacity: 1;
|
|
141
|
+
visibility: visible;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.popover-header {
|
|
145
|
+
display: flex;
|
|
146
|
+
align-items: center;
|
|
147
|
+
justify-content: space-between;
|
|
148
|
+
gap: 12px;
|
|
149
|
+
padding: 12px 16px;
|
|
150
|
+
border-bottom: 1px solid var(--th-color-border, #d7d7d7);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.heading-content {
|
|
154
|
+
display: flex;
|
|
155
|
+
align-items: baseline;
|
|
156
|
+
gap: 8px;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.popover-title {
|
|
160
|
+
margin: 0;
|
|
161
|
+
font-size: 14px;
|
|
162
|
+
font-weight: 600;
|
|
163
|
+
color: var(--th-color-text-primary, #212121);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.popover-subtitle {
|
|
167
|
+
margin: 0;
|
|
168
|
+
font-size: 12px;
|
|
169
|
+
font-weight: 400;
|
|
170
|
+
color: var(--th-color-text-secondary, #666666);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.popover-body {
|
|
174
|
+
padding: 16px;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/* Placement: bottom (default) */
|
|
178
|
+
:host([placement='bottom']) .popover-content,
|
|
179
|
+
:host(:not([placement])) .popover-content {
|
|
180
|
+
top: calc(100% + 8px);
|
|
181
|
+
left: 50%;
|
|
182
|
+
transform: translateX(-50%) translateY(-6px);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
:host([placement='bottom']) .popover-content--open,
|
|
186
|
+
:host(:not([placement])) .popover-content--open {
|
|
187
|
+
transform: translateX(-50%) translateY(0);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/* Placement: top */
|
|
191
|
+
:host([placement='top']) .popover-content {
|
|
192
|
+
bottom: calc(100% + 8px);
|
|
193
|
+
left: 50%;
|
|
194
|
+
transform: translateX(-50%) translateY(6px);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
:host([placement='top']) .popover-content--open {
|
|
198
|
+
transform: translateX(-50%) translateY(0);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/* Placement: right */
|
|
202
|
+
:host([placement='right']) .popover-content {
|
|
203
|
+
left: calc(100% + 8px);
|
|
204
|
+
top: 50%;
|
|
205
|
+
transform: translateY(-50%) translateX(-6px);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
:host([placement='right']) .popover-content--open {
|
|
209
|
+
transform: translateY(-50%) translateX(0);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/* Placement: left */
|
|
213
|
+
:host([placement='left']) .popover-content {
|
|
214
|
+
right: calc(100% + 8px);
|
|
215
|
+
top: 50%;
|
|
216
|
+
transform: translateY(-50%) translateX(6px);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
:host([placement='left']) .popover-content--open {
|
|
220
|
+
transform: translateY(-50%) translateX(0);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/* Dark mode */
|
|
224
|
+
:host-context([data-theme='dark']) .popover-content {
|
|
225
|
+
background-color: var(--th-color-background, #2a2a2a);
|
|
226
|
+
border-color: var(--th-color-border, #444444);
|
|
227
|
+
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
|
|
228
|
+
}
|
|
229
|
+
`;
|
|
230
|
+
__decorate([
|
|
231
|
+
property({ type: Boolean, reflect: true })
|
|
232
|
+
], Popover.prototype, "open", void 0);
|
|
233
|
+
__decorate([
|
|
234
|
+
property({ type: Boolean, attribute: 'stay-open' })
|
|
235
|
+
], Popover.prototype, "stayOpen", void 0);
|
|
236
|
+
__decorate([
|
|
237
|
+
property({ type: String, reflect: true })
|
|
238
|
+
], Popover.prototype, "placement", void 0);
|
|
239
|
+
__decorate([
|
|
240
|
+
property({ type: String })
|
|
241
|
+
], Popover.prototype, "title", void 0);
|
|
242
|
+
__decorate([
|
|
243
|
+
property({ type: String })
|
|
244
|
+
], Popover.prototype, "subtitle", void 0);
|
|
245
|
+
__decorate([
|
|
246
|
+
state()
|
|
247
|
+
], Popover.prototype, "_hasHeadingSlot", void 0);
|
|
248
|
+
customElements.define('trailhand-popover', Popover);
|
|
249
|
+
//# sourceMappingURL=popover.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover.js","sourceRoot":"","sources":["../../../src/components/popover/popover.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAkB,OAAO,EAAE,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AGjB,IAAI,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAY;IAG9C,KAAK,SAAM;IAGX,QAAQ,UAAS;IAGjB,OAAO,UAAS;IAEhB,OAAO,CAAC,SAAS,CAAmB;IACpC,OAAO,CAAC,MAAM,CAAmB;;IAOjC,MAAM,CAAC,MAAM,0BAqFX;IAEF,iBAAiB;IASjB,KAAK;IAIL,OAAO,CAAC,eAAe;IAavB,OAAO,CAAC,WAAW;IAYnB,YAAY;IAQZ,OAAO,CAAC,eAAe;IAcvB,iBAAiB;IAKjB,mBAAmB,CAAC,QAAQ,EAAE,OAAO;IAIrC,sBAAsB,CAAC,IAAI,EAAE,eAAe,GAAG,IAAI;IAMnD,MAAM,IAAI,cAAc;CAwBzB"}
|
|
@@ -27,6 +27,9 @@ export class TextInput extends LitElement {
|
|
|
27
27
|
this.disabled = true;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
+
focus() {
|
|
31
|
+
this._input?.focus();
|
|
32
|
+
}
|
|
30
33
|
emitChangeEvent() {
|
|
31
34
|
// emit native change event for form integration
|
|
32
35
|
this.dispatchEvent(new Event('change', { bubbles: true, composed: true }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-input.js","sourceRoot":"","sources":["../../../src/components/text-input/text-input.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAkB,MAAM,KAAK,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAa7C,MAAM,OAAO,SAAU,SAAQ,UAAU;IA8BvC;QACE,KAAK,EAAE,CAAC;QA3BV,SAAI,GAAG,EAAE,CAAC;QAGV,UAAK,GAAG,EAAE,CAAC;QAGX,gBAAW,GAAG,EAAE,CAAC;QAGjB,aAAQ,GAAG,KAAK,CAAC;QAGjB,SAAI,GAAiC,QAAQ,CAAC;QAG9C,UAAK,GAAG,EAAE,CAAC;QAGX,aAAQ,GA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C;2CAC1B;AAGjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;uCACI;AAG9C;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wCAChB;AAGX;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;2CACX;AAGjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0CAC3B;AAsMlB,cAAc,CAAC,MAAM,CAAC,sBAAsB,EAAE,SAAS,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/th-form-card/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,YAAY,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/th-form-card/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { LitElement, TemplateResult } from 'lit';
|
|
2
|
+
import '../button/button';
|
|
3
|
+
import './th-form-row';
|
|
4
|
+
export type FormCardButtonVariant = 'primary' | 'secondary' | 'alternate' | 'destructive' | 'confirmation';
|
|
5
|
+
/**
|
|
6
|
+
* A form layout card for use inside a modal (or standalone).
|
|
7
|
+
*
|
|
8
|
+
* Compose with `trailhand-form-row` for multi-section forms with optional
|
|
9
|
+
* section titles and per-row column counts. For simple flat forms, slot fields
|
|
10
|
+
* directly and use the `columns` prop.
|
|
11
|
+
*
|
|
12
|
+
* @fires form-card-submit - Fired when the primary action button is clicked
|
|
13
|
+
* @fires form-card-cancel - Fired when the cancel button is clicked
|
|
14
|
+
*
|
|
15
|
+
* @slot - `trailhand-form-row` elements or direct form fields
|
|
16
|
+
*/
|
|
17
|
+
export declare class ThFormCard extends LitElement {
|
|
18
|
+
/** Number of equal-width columns for the form content grid */
|
|
19
|
+
columns: number;
|
|
20
|
+
/** Show a box shadow (useful when used outside a modal) */
|
|
21
|
+
shadow: boolean;
|
|
22
|
+
/** Show a loading spinner and hide content */
|
|
23
|
+
loading: boolean;
|
|
24
|
+
/** Primary action button label. If empty, no button row is rendered. */
|
|
25
|
+
buttonLabel: string;
|
|
26
|
+
/** Variant for the primary action button */
|
|
27
|
+
buttonVariant: FormCardButtonVariant;
|
|
28
|
+
/** Disables the primary action button */
|
|
29
|
+
buttonDisabled: boolean;
|
|
30
|
+
/** Cancel button label. If empty, no cancel button is rendered. */
|
|
31
|
+
cancelLabel: string;
|
|
32
|
+
static styles: import("lit").CSSResult;
|
|
33
|
+
private _handleSubmit;
|
|
34
|
+
private _handleCancel;
|
|
35
|
+
render(): TemplateResult;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=th-form-card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"th-form-card.d.ts","sourceRoot":"","sources":["../../../src/components/th-form-card/th-form-card.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,cAAc,EAAW,MAAM,KAAK,CAAC;AAErE,OAAO,kBAAkB,CAAC;AAC1B,OAAO,eAAe,CAAC;AAEvB,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG,WAAW,GAAG,WAAW,GAAG,aAAa,GAAG,cAAc,CAAC;AAE3G;;;;;;;;;;;GAWG;AACH,qBAAa,UAAW,SAAQ,UAAU;IACxC,8DAA8D;IAClC,OAAO,SAAK;IAExC,2DAA2D;IACf,MAAM,UAAS;IAE3D,8CAA8C;IACjB,OAAO,UAAS;IAE7C,wEAAwE;IACjB,WAAW,SAAM;IAExE,4CAA4C;IACa,aAAa,EAAE,qBAAqB,CAAa;IAE1G,yCAAyC;IACkB,cAAc,UAAS;IAElF,mEAAmE;IACZ,WAAW,SAAM;IAExE,OAAgB,MAAM,0BA8DpB;IAEF,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,aAAa;IAIZ,MAAM,IAAI,cAAc;CAiClC"}
|
|
@@ -0,0 +1,165 @@
|
|
|
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 { LitElement, html, css, nothing } from 'lit';
|
|
8
|
+
import { property } from 'lit/decorators.js';
|
|
9
|
+
import '../button/button';
|
|
10
|
+
import './th-form-row';
|
|
11
|
+
/**
|
|
12
|
+
* A form layout card for use inside a modal (or standalone).
|
|
13
|
+
*
|
|
14
|
+
* Compose with `trailhand-form-row` for multi-section forms with optional
|
|
15
|
+
* section titles and per-row column counts. For simple flat forms, slot fields
|
|
16
|
+
* directly and use the `columns` prop.
|
|
17
|
+
*
|
|
18
|
+
* @fires form-card-submit - Fired when the primary action button is clicked
|
|
19
|
+
* @fires form-card-cancel - Fired when the cancel button is clicked
|
|
20
|
+
*
|
|
21
|
+
* @slot - `trailhand-form-row` elements or direct form fields
|
|
22
|
+
*/
|
|
23
|
+
export class ThFormCard extends LitElement {
|
|
24
|
+
constructor() {
|
|
25
|
+
super(...arguments);
|
|
26
|
+
/** Number of equal-width columns for the form content grid */
|
|
27
|
+
this.columns = 1;
|
|
28
|
+
/** Show a box shadow (useful when used outside a modal) */
|
|
29
|
+
this.shadow = false;
|
|
30
|
+
/** Show a loading spinner and hide content */
|
|
31
|
+
this.loading = false;
|
|
32
|
+
/** Primary action button label. If empty, no button row is rendered. */
|
|
33
|
+
this.buttonLabel = '';
|
|
34
|
+
/** Variant for the primary action button */
|
|
35
|
+
this.buttonVariant = 'primary';
|
|
36
|
+
/** Disables the primary action button */
|
|
37
|
+
this.buttonDisabled = false;
|
|
38
|
+
/** Cancel button label. If empty, no cancel button is rendered. */
|
|
39
|
+
this.cancelLabel = '';
|
|
40
|
+
}
|
|
41
|
+
_handleSubmit() {
|
|
42
|
+
this.dispatchEvent(new CustomEvent('form-card-submit', { bubbles: true, composed: true }));
|
|
43
|
+
}
|
|
44
|
+
_handleCancel() {
|
|
45
|
+
this.dispatchEvent(new CustomEvent('form-card-cancel', { bubbles: true, composed: true }));
|
|
46
|
+
}
|
|
47
|
+
render() {
|
|
48
|
+
if (this.loading) {
|
|
49
|
+
return html `
|
|
50
|
+
<div class="form-card form-card--loading" part="card">
|
|
51
|
+
<div class="form-card__spinner"></div>
|
|
52
|
+
</div>
|
|
53
|
+
`;
|
|
54
|
+
}
|
|
55
|
+
return html `
|
|
56
|
+
<div class="form-card" part="card">
|
|
57
|
+
<div
|
|
58
|
+
class=${`form-card__content${this.columns > 1 ? ' form-card__content--grid' : ''}`}
|
|
59
|
+
part="content"
|
|
60
|
+
style=${this.columns > 1 ? `--_columns: ${this.columns}` : ''}
|
|
61
|
+
>
|
|
62
|
+
<slot></slot>
|
|
63
|
+
</div>
|
|
64
|
+
${this.buttonLabel || this.cancelLabel
|
|
65
|
+
? html `
|
|
66
|
+
<div class="form-card__actions" part="actions">
|
|
67
|
+
${this.cancelLabel
|
|
68
|
+
? html `<trailhand-button variant="secondary" @button-click=${this._handleCancel}>${this.cancelLabel}</trailhand-button>`
|
|
69
|
+
: nothing}
|
|
70
|
+
${this.buttonLabel
|
|
71
|
+
? html `<trailhand-button variant=${this.buttonVariant} ?disabled=${this.buttonDisabled} @button-click=${this._handleSubmit}>${this.buttonLabel}</trailhand-button>`
|
|
72
|
+
: nothing}
|
|
73
|
+
</div>
|
|
74
|
+
`
|
|
75
|
+
: nothing}
|
|
76
|
+
</div>
|
|
77
|
+
`;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
ThFormCard.styles = css `
|
|
81
|
+
:host {
|
|
82
|
+
display: block;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.form-card {
|
|
86
|
+
display: flex;
|
|
87
|
+
flex-direction: column;
|
|
88
|
+
font-family: var(--font-family, 'Poppins', sans-serif);
|
|
89
|
+
background: var(--th-form-card-bg, transparent);
|
|
90
|
+
border-radius: var(--th-form-card-radius, 8px);
|
|
91
|
+
border: none;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
:host([shadow]) .form-card {
|
|
95
|
+
background: var(--th-form-card-shadow-bg, #ffffff);
|
|
96
|
+
padding: var(--th-form-card-padding, 24px);
|
|
97
|
+
box-shadow: var(--th-form-card-shadow, 0 4px 16px rgba(0, 0, 0, 0.1));
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/* Default: stack rows vertically when using trailhand-form-row children */
|
|
101
|
+
.form-card__content {
|
|
102
|
+
display: flex;
|
|
103
|
+
flex-direction: column;
|
|
104
|
+
gap: var(--th-form-card-gap, 24px);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/* Flat mode: direct fields without rows — driven by the columns prop */
|
|
108
|
+
.form-card__content--grid {
|
|
109
|
+
display: grid;
|
|
110
|
+
grid-template-columns: repeat(var(--_columns), 1fr);
|
|
111
|
+
gap: var(--th-form-card-gap, 16px);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.form-card__actions {
|
|
115
|
+
display: flex;
|
|
116
|
+
justify-content: flex-end;
|
|
117
|
+
gap: 12px;
|
|
118
|
+
margin-top: 24px;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/* Loading */
|
|
122
|
+
.form-card--loading {
|
|
123
|
+
min-height: 160px;
|
|
124
|
+
align-items: center;
|
|
125
|
+
justify-content: center;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.form-card__spinner {
|
|
129
|
+
width: 32px;
|
|
130
|
+
height: 32px;
|
|
131
|
+
border: 3px solid #e5e7eb;
|
|
132
|
+
border-top-color: #3b82f6;
|
|
133
|
+
border-radius: 50%;
|
|
134
|
+
animation: spin 0.8s linear infinite;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
@keyframes spin {
|
|
138
|
+
to {
|
|
139
|
+
transform: rotate(360deg);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
`;
|
|
143
|
+
__decorate([
|
|
144
|
+
property({ type: Number })
|
|
145
|
+
], ThFormCard.prototype, "columns", void 0);
|
|
146
|
+
__decorate([
|
|
147
|
+
property({ type: Boolean, reflect: true })
|
|
148
|
+
], ThFormCard.prototype, "shadow", void 0);
|
|
149
|
+
__decorate([
|
|
150
|
+
property({ type: Boolean })
|
|
151
|
+
], ThFormCard.prototype, "loading", void 0);
|
|
152
|
+
__decorate([
|
|
153
|
+
property({ type: String, attribute: 'button-label' })
|
|
154
|
+
], ThFormCard.prototype, "buttonLabel", void 0);
|
|
155
|
+
__decorate([
|
|
156
|
+
property({ type: String, attribute: 'button-variant' })
|
|
157
|
+
], ThFormCard.prototype, "buttonVariant", void 0);
|
|
158
|
+
__decorate([
|
|
159
|
+
property({ type: Boolean, attribute: 'button-disabled' })
|
|
160
|
+
], ThFormCard.prototype, "buttonDisabled", void 0);
|
|
161
|
+
__decorate([
|
|
162
|
+
property({ type: String, attribute: 'cancel-label' })
|
|
163
|
+
], ThFormCard.prototype, "cancelLabel", void 0);
|
|
164
|
+
customElements.define('trailhand-form-card', ThFormCard);
|
|
165
|
+
//# sourceMappingURL=th-form-card.js.map
|
|
@@ -0,0 +1 @@
|
|
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iB,EAAE,CAAC;kDAAwB;AAG3B;IAAtD,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;+CAAkB;AA6G1E,cAAc,CAAC,MAAM,CAAC,qBAAqB,EAAE,UAAU,CAAC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { LitElement, TemplateResult } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* A section row within a `trailhand-form-card`. Provides an optional title
|
|
4
|
+
* and a configurable CSS-grid for its form fields.
|
|
5
|
+
*
|
|
6
|
+
* @slot - Default slot for form fields, laid out in a grid based on the `columns` prop
|
|
7
|
+
*/
|
|
8
|
+
export declare class ThFormRow extends LitElement {
|
|
9
|
+
/** Optional section title displayed above the field grid */
|
|
10
|
+
title: string;
|
|
11
|
+
/** Number of equal-width columns for this row's field grid */
|
|
12
|
+
columns: number;
|
|
13
|
+
static styles: import("lit").CSSResult;
|
|
14
|
+
render(): TemplateResult;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=th-form-row.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"th-form-row.d.ts","sourceRoot":"","sources":["../../../src/components/th-form-card/th-form-row.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,cAAc,EAAW,MAAM,KAAK,CAAC;AAGrE;;;;;GAKG;AACH,qBAAa,SAAU,SAAQ,UAAU;IACvC,4DAA4D;IAChC,KAAK,SAAM;IAEvC,8DAA8D;IAClC,OAAO,SAAK;IAExC,OAAgB,MAAM,0BAwBpB;IAEO,MAAM,IAAI,cAAc;CAYlC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
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 { LitElement, html, css, nothing } from 'lit';
|
|
8
|
+
import { property } from 'lit/decorators.js';
|
|
9
|
+
/**
|
|
10
|
+
* A section row within a `trailhand-form-card`. Provides an optional title
|
|
11
|
+
* and a configurable CSS-grid for its form fields.
|
|
12
|
+
*
|
|
13
|
+
* @slot - Default slot for form fields, laid out in a grid based on the `columns` prop
|
|
14
|
+
*/
|
|
15
|
+
export class ThFormRow extends LitElement {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
/** Optional section title displayed above the field grid */
|
|
19
|
+
this.title = '';
|
|
20
|
+
/** Number of equal-width columns for this row's field grid */
|
|
21
|
+
this.columns = 1;
|
|
22
|
+
}
|
|
23
|
+
render() {
|
|
24
|
+
return html `
|
|
25
|
+
<div class="form-row" part="row">
|
|
26
|
+
${this.title
|
|
27
|
+
? html `<p class="form-row__title" part="title">${this.title}</p>`
|
|
28
|
+
: nothing}
|
|
29
|
+
<div class="form-row__content" part="content" style="--_columns: ${this.columns}">
|
|
30
|
+
<slot></slot>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
`;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
ThFormRow.styles = css `
|
|
37
|
+
:host {
|
|
38
|
+
display: block;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.form-row {
|
|
42
|
+
display: flex;
|
|
43
|
+
flex-direction: column;
|
|
44
|
+
gap: var(--th-form-row-gap, 8px);
|
|
45
|
+
font-family: var(--font-family, 'Poppins', sans-serif);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.form-row__title {
|
|
49
|
+
margin: 0;
|
|
50
|
+
font-size: 15px;
|
|
51
|
+
font-weight: 600;
|
|
52
|
+
color: var(--th-form-row-title-color, #111827);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.form-row__content {
|
|
56
|
+
display: grid;
|
|
57
|
+
grid-template-columns: repeat(var(--_columns), 1fr);
|
|
58
|
+
gap: var(--th-form-row-field-gap, 16px);
|
|
59
|
+
}
|
|
60
|
+
`;
|
|
61
|
+
__decorate([
|
|
62
|
+
property({ type: String })
|
|
63
|
+
], ThFormRow.prototype, "title", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
property({ type: Number })
|
|
66
|
+
], ThFormRow.prototype, "columns", void 0);
|
|
67
|
+
customElements.define('trailhand-form-row', ThFormRow);
|
|
68
|
+
//# sourceMappingURL=th-form-row.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"th-form-row.js","sourceRoot":"","sources":["../../../src/components/th-form-card/th-form-row.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAkB,OAAO,EAAE,MAAM,KAAK,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C;;;;;GAKG;AACH,MAAM,OAAO,SAAU,SAAQ,UAAU;IAAzC;;QACE,4DAA4D;QAChC,UAAK,GAAG,EAAE,CAAC;QAEvC,8DAA8D;QAClC,YAAO,GAAG,CAAC,CAAC;IAwC1C,CAAC;IAZU,MAAM;QACb,OAAO,IAAI,CAAA;;UAEL,IAAI,CAAC,KAAK;YACV,CAAC,CAAC,IAAI,CAAA,2CAA2C,IAAI,CAAC,KAAK,MAAM;YACjE,CAAC,CAAC,OAAO;2EACwD,IAAI,CAAC,OAAO;;;;KAIlF,CAAC;IACJ,CAAC;;AArCe,gBAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwB3B,AAxBqB,CAwBpB;AA7B0B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wCAAY;AAGX;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0CAAa;AA0C1C,cAAc,CAAC,MAAM,CAAC,oBAAoB,EAAE,SAAS,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -5,8 +5,10 @@ export * from './components/button';
|
|
|
5
5
|
export * from './components/icon';
|
|
6
6
|
export * from './components/th-tag';
|
|
7
7
|
export * from './components/th-card';
|
|
8
|
+
export * from './components/th-form-card';
|
|
8
9
|
export * from './components/progress-bar';
|
|
9
10
|
export * from './components/modal';
|
|
11
|
+
export * from './components/popover';
|
|
10
12
|
export * from './components/checkbox';
|
|
11
13
|
export * from './components/text-input';
|
|
12
14
|
export * from './components/selector';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AAGtC,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AAGtC,cAAc,SAAS,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -6,8 +6,10 @@ export * from './components/button';
|
|
|
6
6
|
export * from './components/icon';
|
|
7
7
|
export * from './components/th-tag';
|
|
8
8
|
export * from './components/th-card';
|
|
9
|
+
export * from './components/th-form-card';
|
|
9
10
|
export * from './components/progress-bar';
|
|
10
11
|
export * from './components/modal';
|
|
12
|
+
export * from './components/popover';
|
|
11
13
|
export * from './components/checkbox';
|
|
12
14
|
export * from './components/text-input';
|
|
13
15
|
export * from './components/selector';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,wBAAwB;AACxB,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AAEtC,mBAAmB;AACnB,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,wBAAwB;AACxB,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AAEtC,mBAAmB;AACnB,cAAc,SAAS,CAAC"}
|
package/dist/styles/colors.css
CHANGED
|
@@ -146,6 +146,19 @@
|
|
|
146
146
|
/* Shadow colors using opacity */
|
|
147
147
|
--th-color-shadow: rgba(0, 0, 0, 0.1);
|
|
148
148
|
--th-color-shadow-medium: rgba(0, 0, 0, 0.15);
|
|
149
|
+
|
|
150
|
+
/* Form Card */
|
|
151
|
+
--th-form-card-bg: transparent;
|
|
152
|
+
--th-form-card-shadow-bg: var(--th-color-white);
|
|
153
|
+
--th-form-card-radius: 8px;
|
|
154
|
+
--th-form-card-padding: 24px;
|
|
155
|
+
--th-form-card-shadow: 0 4px 16px var(--th-color-shadow);
|
|
156
|
+
--th-form-card-gap: 24px;
|
|
157
|
+
|
|
158
|
+
/* Form Row */
|
|
159
|
+
--th-form-row-title-color: var(--th-color-text-primary);
|
|
160
|
+
--th-form-row-gap: 8px;
|
|
161
|
+
--th-form-row-field-gap: 16px;
|
|
149
162
|
}
|
|
150
163
|
|
|
151
164
|
/* Dark Theme Overrides */
|
|
@@ -216,4 +229,11 @@
|
|
|
216
229
|
--th-progress-bar-track-color: var(--th-color-grey-600);
|
|
217
230
|
--th-progress-bar-title-color: var(--th-color-grey-100);
|
|
218
231
|
--th-progress-bar-label-color: var(--th-color-grey-300);
|
|
232
|
+
|
|
233
|
+
/* Form Card */
|
|
234
|
+
--th-form-card-shadow-bg: var(--th-color-grey-700);
|
|
235
|
+
--th-form-card-shadow: 0 4px 16px var(--th-color-shadow-medium);
|
|
236
|
+
|
|
237
|
+
/* Form Row */
|
|
238
|
+
--th-form-row-title-color: var(--th-color-grey-100);
|
|
219
239
|
}
|