godown 3.6.1 → 3.7.1

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/index.d.ts CHANGED
@@ -25,6 +25,7 @@ export { default as Skeleton } from "./skeleton.js";
25
25
  export { default as Split } from "./split.js";
26
26
  export { default as Switch } from "./switch.js";
27
27
  export { default as Text } from "./text.js";
28
+ export { default as Tabs } from "./tabs.js";
28
29
  export { default as Time } from "./time.js";
29
30
  export { default as Tooltip } from "./tooltip.js";
30
31
  export { default as Typewriter } from "./typewriter.js";
package/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,iBAAiB,CAAC"}
package/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import"./alert.js";import"./avatar.js";import"./badge.js";import"./breath.js";import"./button.js";import"./card.js";import"./carousel.js";import"./details.js";import"./dialog.js";import"./divider.js";import"./dragbox.js";import"./flex.js";import"./form.js";import"./grid.js";import"./heading.js";import"./input.js";import"./layout.js";import"./link.js";import"./progress.js";import"./range.js";import"./rotate.js";import"./router.js";import"./select.js";import"./skeleton.js";import"./split.js";import"./switch.js";import"./text.js";import"./time.js";import"./tooltip.js";import"./typewriter.js";export{default as Alert}from"./components/alert.js";export{default as Avatar}from"./components/avatar.js";export{default as Badge}from"./components/badge.js";export{default as Breath}from"./components/breath.js";export{default as Button}from"./components/button.js";export{default as Card}from"./components/card.js";export{default as Carousel}from"./components/carousel.js";export{default as Details}from"./components/details.js";export{default as Dialog}from"./components/dialog.js";export{default as Divider}from"./components/divider.js";export{default as Dragbox}from"./components/dragbox.js";export{default as Flex}from"./components/flex.js";export{default as Form}from"./components/form.js";export{default as Grid}from"./components/grid.js";export{default as Heading}from"./components/heading.js";export{default as Input}from"./components/input.js";export{default as Layout}from"./components/layout.js";export{default as Link}from"./components/link.js";export{default as Progress}from"./components/progress.js";export{default as Range}from"./components/range.js";export{default as Rotate}from"./components/rotate.js";export{default as Router}from"./components/router.js";export{default as Select}from"./components/select.js";export{default as Skeleton}from"./components/skeleton.js";export{default as Split}from"./components/split.js";export{default as Switch}from"./components/switch.js";export{default as Text}from"./components/text.js";export{default as Time}from"./components/time.js";export{default as Tooltip}from"./components/tooltip.js";export{default as Typewriter}from"./components/typewriter.js";
1
+ import"./alert.js";import"./avatar.js";import"./badge.js";import"./breath.js";import"./button.js";import"./card.js";import"./carousel.js";import"./details.js";import"./dialog.js";import"./divider.js";import"./dragbox.js";import"./flex.js";import"./form.js";import"./grid.js";import"./heading.js";import"./input.js";import"./layout.js";import"./link.js";import"./progress.js";import"./range.js";import"./rotate.js";import"./router.js";import"./select.js";import"./skeleton.js";import"./split.js";import"./switch.js";import"./text.js";import"./tabs.js";import"./time.js";import"./tooltip.js";import"./typewriter.js";export{default as Alert}from"./components/alert.js";export{default as Avatar}from"./components/avatar.js";export{default as Badge}from"./components/badge.js";export{default as Breath}from"./components/breath.js";export{default as Button}from"./components/button.js";export{default as Card}from"./components/card.js";export{default as Carousel}from"./components/carousel.js";export{default as Details}from"./components/details.js";export{default as Dialog}from"./components/dialog.js";export{default as Divider}from"./components/divider.js";export{default as Dragbox}from"./components/dragbox.js";export{default as Flex}from"./components/flex.js";export{default as Form}from"./components/form.js";export{default as Grid}from"./components/grid.js";export{default as Heading}from"./components/heading.js";export{default as Input}from"./components/input.js";export{default as Layout}from"./components/layout.js";export{default as Link}from"./components/link.js";export{default as Progress}from"./components/progress.js";export{default as Range}from"./components/range.js";export{default as Rotate}from"./components/rotate.js";export{default as Router}from"./components/router.js";export{default as Select}from"./components/select.js";export{default as Skeleton}from"./components/skeleton.js";export{default as Split}from"./components/split.js";export{default as Switch}from"./components/switch.js";export{default as Text}from"./components/text.js";export{default as Tabs}from"./components/tabs.js";export{default as Time}from"./components/time.js";export{default as Tooltip}from"./components/tooltip.js";export{default as Typewriter}from"./components/typewriter.js";
2
2
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "godown",
3
- "version": "3.6.1",
3
+ "version": "3.7.1",
4
4
  "description": "Non Composite Web Components Library",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -19,9 +19,9 @@
19
19
  "fmtime": "^0.0.3",
20
20
  "lit": "^3.0.0",
21
21
  "tslib": "^2.7.0",
22
- "@godown/element": "^1.3.1",
23
22
  "@godown/colors": "^1.0.0",
24
- "@godown/f7-icon": "^1.0.4"
23
+ "@godown/element": "^1.4.0",
24
+ "@godown/f7-icon": "^1.0.5"
25
25
  },
26
26
  "publishConfig": {
27
27
  "access": "public"
@@ -0,0 +1,227 @@
1
+ import { attr, godown, htmlSlot, styles, tokenList } from "@godown/element";
2
+ import { cssGlobalVars, GlobalStyle, scopePrefix } from "../core/global-style.js";
3
+ import { css, html, type TemplateResult } from "lit";
4
+ import { property, queryAll } from "lit/decorators.js";
5
+ import { OutlineBuilder, type OutlineType } from "../core/outline.js";
6
+
7
+ const protoName = "tabs";
8
+ const cssScope = scopePrefix(protoName);
9
+
10
+ const mouseEnterAddedToken = "hover";
11
+
12
+ /**
13
+ * {@linkcode Tabs} used to render a set of tabs.
14
+ *
15
+ * It accepts "tabs" to present the sub-content.
16
+ *
17
+ * When "useSlot" is enabled, each item in "tabs" becomes a named slot with the same name as itself,
18
+ * while for non-slot tabs, the content is rendered as a horizontally padded string.
19
+ *
20
+ * When "mouseenter" and "mouseleave" are triggered on an individual tab, the indicator will move.
21
+ *
22
+ * The moving indicator will start from the position of the item that was last entered.
23
+ *
24
+ * If the pointer moves out of the root element or the element is connected to the document,
25
+ * the starting position of the indicator will be regarded as the current selection.
26
+ *
27
+ * Apply "flex-direction: column" to the tabs to arrange them vertically.
28
+ *
29
+ * @csspart root - The root element.
30
+ * @csspart item - The tab items.
31
+ * @csspart indicator - The indicator.
32
+ * @csspart selected - The selected tab item.
33
+ * @csspart hover - The hovered tab item.
34
+ * @fires select - Fires when the tab is selected.
35
+ * @category display
36
+ */
37
+ @godown(protoName)
38
+ @styles(
39
+ new OutlineBuilder({
40
+ width: `${cssScope}--outline-width`,
41
+ color: `${cssScope}--outline-color`,
42
+ }).css,
43
+ css`
44
+ :host {
45
+ ${cssScope}--indicator-background: var(${cssGlobalVars._colors.darkgray[7]});
46
+ ${cssScope}--outline-color: var(${cssGlobalVars.passive});
47
+ ${cssScope}--outline-width: 0.075em;
48
+ ${cssScope}--space: 0.25em;
49
+ border-radius: var(${cssGlobalVars.borderRadius});
50
+ transition: 0.2s ease-in-out;
51
+ width: fit-content;
52
+ display: flex;
53
+ cursor: default;
54
+ }
55
+
56
+ [part="root"] {
57
+ position: relative;
58
+ z-index: 1;
59
+ display: flex;
60
+ flex-direction: inherit;
61
+ overflow-x: clip;
62
+ border-radius: inherit;
63
+ transition: inherit;
64
+ transition-property: width, transform, opacity;
65
+ padding: var(${cssScope}--space);
66
+ gap: var(${cssScope}--space);
67
+ }
68
+
69
+ [useslot] [part~="item"] {
70
+ padding: 0;
71
+ }
72
+
73
+ [part~="item"] {
74
+ width: 100%;
75
+ display: block;
76
+ padding: 0 0.4em;
77
+ position: relative;
78
+ transition: inherit;
79
+ border-radius: inherit;
80
+ transition-property: inherit;
81
+ }
82
+
83
+ [part="indicator"] {
84
+ width: 100%;
85
+ height: 100%;
86
+ inset: 0;
87
+ opacity: 0;
88
+ z-index: -1;
89
+ position: absolute;
90
+ transition: inherit;
91
+ border-radius: inherit;
92
+ transition-property: inherit;
93
+ background: var(${cssScope}--indicator-background);
94
+ }
95
+
96
+ [part~="selected"] {
97
+ background: var(${cssScope}--indicator-background);
98
+ }
99
+
100
+ [part~="selected"] [part="indicator"],
101
+ [part~="hover"] [part="indicator"] {
102
+ opacity: 1;
103
+ }
104
+ `,
105
+ )
106
+ class Tabs extends GlobalStyle {
107
+ @property({ attribute: "outline-type" })
108
+ outlineType: OutlineType = "border";
109
+
110
+ /**
111
+ * Determines whether the tabs should use a slot for their content instead of a string.
112
+ */
113
+ @property({ type: Boolean })
114
+ useSlot = false;
115
+
116
+ /**
117
+ * An array of strings or slot content representing the tabs.
118
+ */
119
+ @property({ type: Array })
120
+ tabs: string[];
121
+
122
+ /**
123
+ * The index of the currently selected tab.
124
+ */
125
+ @property({ type: Number })
126
+ index = 0;
127
+
128
+ protected _lastIndex: number;
129
+
130
+ @queryAll("[part~=item]")
131
+ protected _items: HTMLCollectionOf<HTMLLIElement>;
132
+
133
+ @queryAll("[part=indicator]")
134
+ protected _indicators: HTMLCollectionOf<HTMLDivElement>;
135
+
136
+ render(): TemplateResult<1> {
137
+ return html`
138
+ <ul
139
+ part="root"
140
+ ${attr(this.observedRecord)}
141
+ @mouseleave="${this._handleMouseLeave}"
142
+ >
143
+ ${this.tabs.map((tab, index) => {
144
+ return html`
145
+ <li
146
+ part="${tokenList("item", {
147
+ selected: this.index === index,
148
+ })}"
149
+ @mouseenter=${() => {
150
+ this.move(this._lastIndex, index);
151
+ this._lastIndex = index;
152
+ }}
153
+ @click=${() => this.select(index)}
154
+ >
155
+ ${this.useSlot ? htmlSlot(tab) : tab}
156
+ <div part="indicator"></div>
157
+ </li>
158
+ `;
159
+ })}
160
+ </ul>
161
+ `;
162
+ }
163
+
164
+ connectedCallback(): void {
165
+ super.connectedCallback();
166
+ this._lastIndex = this.index;
167
+ }
168
+
169
+ protected _handleMouseLeave(): void {
170
+ const lastItem = this._items[this._lastIndex];
171
+ if (lastItem) {
172
+ lastItem.part.remove(mouseEnterAddedToken);
173
+ }
174
+ this._lastIndex = this.index;
175
+ }
176
+
177
+ move(from: number, to: number): void {
178
+ if (from === to) {
179
+ return;
180
+ }
181
+ const { _items, _indicators } = this;
182
+ const toItem = _items[to];
183
+ if (!toItem) {
184
+ return;
185
+ }
186
+ toItem.part.add(mouseEnterAddedToken);
187
+ const fromItem = _items[from];
188
+ if (!fromItem) {
189
+ return;
190
+ }
191
+ fromItem.part.remove(mouseEnterAddedToken);
192
+ const toIndicator = _indicators[to];
193
+ const fromIndicator = _indicators[from];
194
+ if (!toIndicator || !fromIndicator) {
195
+ return;
196
+ }
197
+ const fromIndicatorRect = fromIndicator.getBoundingClientRect();
198
+ const toItemRect = toItem.getBoundingClientRect();
199
+ const transformX = fromIndicatorRect.x - toItemRect.x;
200
+ const transformY = fromIndicatorRect.y - toItemRect.y;
201
+ const fromWidth = fromIndicatorRect.width;
202
+
203
+ const { style } = toIndicator;
204
+ const cssNone = "none";
205
+
206
+ style.transform = `translate3d(${transformX}px,${transformY}px,0)`;
207
+ style.width = fromWidth + "px";
208
+ style.transition = fromIndicator.style.transition = cssNone;
209
+
210
+ toIndicator.getBoundingClientRect();
211
+
212
+ style.width = style.transform = style.transition = fromIndicator.style.transition = "";
213
+ }
214
+
215
+ select(selected: number): void {
216
+ if (this.index === selected) {
217
+ return;
218
+ }
219
+ this.dispatchCustomEvent("select", selected);
220
+ this.move(this._lastIndex, selected);
221
+ this._lastIndex = selected;
222
+ this.index = selected;
223
+ }
224
+ }
225
+
226
+ export default Tabs;
227
+ export { Tabs };
package/src/index.ts CHANGED
@@ -25,6 +25,7 @@ export { default as Skeleton } from "./skeleton.js";
25
25
  export { default as Split } from "./split.js";
26
26
  export { default as Switch } from "./switch.js";
27
27
  export { default as Text } from "./text.js";
28
+ export { default as Tabs } from "./tabs.js";
28
29
  export { default as Time } from "./time.js";
29
30
  export { default as Tooltip } from "./tooltip.js";
30
31
  export { default as Typewriter } from "./typewriter.js";
package/src/tabs.ts ADDED
@@ -0,0 +1,13 @@
1
+ import Tabs from "./components/tabs.js";
2
+
3
+ Tabs.define();
4
+
5
+ export default Tabs;
6
+
7
+ export * from "./components/tabs.js";
8
+
9
+ declare global {
10
+ interface HTMLElementTagNameMap {
11
+ "godown-tabs": Tabs;
12
+ }
13
+ }
package/tabs.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ import Tabs from "./components/tabs.js";
2
+ export default Tabs;
3
+ export * from "./components/tabs.js";
4
+ declare global {
5
+ interface HTMLElementTagNameMap {
6
+ "godown-tabs": Tabs;
7
+ }
8
+ }
9
+ //# sourceMappingURL=tabs.d.ts.map
package/tabs.d.ts.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["src/tabs.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,sBAAsB,CAAC;AAIxC,eAAe,IAAI,CAAC;AAEpB,cAAc,sBAAsB,CAAC;AAErC,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,IAAI,CAAC;KACrB;CACF"}
package/tabs.js ADDED
@@ -0,0 +1,2 @@
1
+ import o from"./components/tabs.js";export{Tabs}from"./components/tabs.js";o.define();export{o as default};
2
+ //# sourceMappingURL=tabs.js.map
package/tabs.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tabs.js","sources":["src/tabs.ts"],"sourcesContent":null,"names":["Tabs","define"],"mappings":"2EAEAA,EAAKC"}
@@ -1 +1 @@
1
- {"version":1.1,"properties":[],"pseudoElements":[]}
1
+ {"version":1.1,"properties":[],"pseudoElements":[{"name":"::part(root)","description":"The root element."},{"name":"::part(item)","description":"The tab items."},{"name":"::part(indicator)","description":"The indicator."},{"name":"::part(selected)","description":"The selected tab item."},{"name":"::part(hover)","description":"The hovered tab item."}]}
@@ -1 +1 @@
1
- {"version":1.1,"tags":[{"name":"godown-typewriter","description":"Typewriter renders a typewriter effect to text.\n---\n### **Events:**\n ","attributes":[{"name":"content","description":"Raw text.","values":[]},{"name":"ended","description":"If true, hide the cursor","values":[]},{"name":"max","description":"Maximum random time.","values":[]},{"name":"min","description":"Minimum random time.","values":[]},{"name":"delay","description":"Fixed time.","values":[]},{"name":"index","description":"The index at the beginning.","values":[]}],"references":[]},{"name":"godown-tooltip","description":"Tooltip provide tooltip for slot elements.\nIf it has the tip property, ignore the slot tip.\n---\n### **Events:**\n - **change**\n### **Slots:**\n - **tip** - Tip element if no `tip` provided.\n- _default_ - Content.","attributes":[{"name":"tip","description":"Tip text, if there is a value, the slot will be ignored.","values":[]},{"name":"direction","description":"Direction of opening the tip.","values":[{"name":"DirectionCardinal"},{"name":"DirectionCorner"}]},{"name":"align","description":"Content alignment.","values":[{"name":"center"},{"name":"flex-start"},{"name":"flex-end"},{"name":"start"},{"name":"end"}]},{"name":"propagation","description":"If true, allow penetration of the tip.","values":[]},{"name":"type","description":"How can tips be triggered.\nIf `focus`, element will be focusable, open tip when focused.\nIf `hover`, element will open tip when hovered.","values":[{"name":"hover"},{"name":"focus"}]},{"name":"open","description":"Open the content.","values":[]}],"references":[]},{"name":"godown-time","description":"Time renders a formatting time.\n---\n### **Events:**\n - **time** - Fires when the time changes.","attributes":[{"name":"escape","description":"Escape symbol.","values":[]},{"name":"format","description":"Format strings.","values":[]},{"name":"time","description":"Time.","values":[{"name":"Date"}]},{"name":"timeout","description":"If there is a value, update every gap or timeout.","values":[]},{"name":"gap","description":"The number of milliseconds that change with each update.","values":[]}],"references":[]},{"name":"godown-text","description":"Text renders nowrap text.\n---\n","attributes":[{"name":"underline","description":"Underline behavior.","values":[{"name":"none"},{"name":"hover"},{"name":"active"},{"name":"always"}]},{"name":"clip","description":"Set background-clip to text.","values":[]}],"references":[]},{"name":"godown-switch","description":"Switch renders a switch.\n---\n### **Events:**\n - **change** - Fires when the switch is switched.\n- **input**","attributes":[{"name":"default","description":"Default checked state.","values":[]},{"name":"checked","description":"The current value of the switch component. Reflects the \"checked\" attribute.","values":[]},{"name":"autocomplete","values":[]},{"name":"outline-type","values":[{"name":"OutlineType"}]},{"name":"disabled","values":[]},{"name":"type","values":[{"name":"InputType"}]},{"name":"placeholder","values":[]},{"name":"name","values":[]},{"name":"value","values":[{"name":"V"}]}],"references":[]},{"name":"godown-split","description":"Split renders multiple input boxes.\nInput: will move the focus box backward until the complete input from start to end.\nDelete: will move the focus box forward until the first and no inputs for each.\n---\n### **Events:**\n - **input** - Fires when the input value changes.\n- **focus** - Fires when the input is focused.\n- **blur** - Fires when the input is blurred.\n- **change** - Fires when the input value changes.\n### **Methods:**\n ","attributes":[{"name":"len","description":"The number of input boxes.","values":[]},{"name":"index","description":"Focus index.","values":[]},{"name":"autocomplete","values":[]},{"name":"outline-type","values":[{"name":"OutlineType"}]},{"name":"disabled","values":[]},{"name":"type","values":[{"name":"InputType"}]},{"name":"placeholder","values":[]},{"name":"name","values":[]},{"name":"value","values":[{"name":"V"}]},{"name":"default","description":"default property records the default or initial value and is used to reset the input.","values":[]}],"references":[]},{"name":"godown-skeleton","description":"Skeleton renders a skeleton screen.\n---\n### **Slots:**\n - **loading** - The content if loading is true.\n- _default_ - The content if loading is false.","attributes":[{"name":"type","description":"If \"image\", render a image placeholder.","values":[{"name":"text"},{"name":"image"}]},{"name":"animation","description":"Animation type.\nopacity animation only effect on slotted element and image icon.","values":[{"name":"position"},{"name":"opacity"}]}],"references":[]},{"name":"godown-select","description":"Select is similar to `<select>`.\nElements with the value attribute/property can be used as options.\nThe checked attribute will be added to the selected element.\nMulti-selected state looks the same as single-selected.\nInput will filter the element.\n---\n### **Events:**\n - **select** - Fires when select an option.\n- **input** - Fires when the input value changes.\n- **change** - Fires when the input value changes.\n### **Slots:**\n - _default_ - Options.","attributes":[{"name":"text","description":"Selected texts.","values":[]},{"name":"direction","values":[{"name":"DirectionCardinalY"}]},{"name":"multiple","values":[]},{"name":"visible","values":[]},{"name":"variant","description":"If outline, the outline is always present.","values":[{"name":"default"},{"name":"outline"}]},{"name":"autocomplete","values":[]},{"name":"outline-type","values":[{"name":"OutlineType"}]},{"name":"disabled","values":[]},{"name":"type","values":[{"name":"InputType"}]},{"name":"placeholder","values":[]},{"name":"name","values":[]},{"name":"value","values":[{"name":"V"}]},{"name":"default","description":"default property records the default or initial value and is used to reset the input.","values":[]}],"references":[]},{"name":"godown-router","description":"Router has basic routing control.\nTo switch routes, use `router-link component`.\nIt has two methods to collect routes.\n1. From field `routes`, an array, each elements require \"path\".\n2. From child elements, which have the slot attribute for matching routes.\nIf only the method 1 is used, set `type` to `\"field\"`.\nIf only the method 2 is used, set `type` to `\"slotted\"`.\n`type` defaults to `\"united\"`, which will try method 1, then method 2.\nIf no routes are matched, the default value (no named slot) will be rendered.\n---\n### **Events:**\n - **change**\n### **Methods:**\n - **fieldComponent(query: _string_): _unknown_** - Get component from routes by query.\n- **slottedComponent(query: _string_): _TemplateResult<1>_** - Get component from slotted elements by query.\n- **collectSlottedRoutes(): _void_** - Reset the route tree, clear cache, collect routes from child elements.\n- **collectFieldRoutes(value: _typeof this.routes_): _void_** - Reset the route tree, clear cache, collect routes from value.\n### **Slots:**\n - _default_ - Display slot when there is no match.\n- ***** - Matching slot will be displayed.","attributes":[{"name":"pathname","description":"Current pathname (equals to location.pathname).","values":[]},{"name":"type","description":"The type of routing sources.\nIf field, it won't collect the slot attribute of the child elements.\nThis property should not be changed after the rendering is complete.","values":[{"name":"RouterType"}]},{"name":"cache","description":"Cache accessed records.\nEmptied at each re-collection.","values":[]}],"references":[]},{"name":"godown-rotate","description":"Rotate Make child elements rotate.\n---\n### **Methods:**\n ","attributes":[],"references":[]},{"name":"godown-range","description":"Range is similar to `<input type=\"range\">`.\nValue accepts number, or array.\nNumber has 1 handle, the array has the number of its elements.\n---\n### **Events:**\n - **focus** - Fires when the handle is focused.\n- **blur** - Fires when the handle is blurred.\n- **range** - Fires when the value changes.\n- **input** - Fires when the input value changes.\n- **change** - Fires when the input value changes.\n### **Methods:**\n - **padValue(len: _number_, value): _number[]_** - Pad the value to the specified length.\n- **focusHandle(index: _number_): _void_** - Focuses the handle at the given index, updates the focus stack, and dispatches a \"focus\" event.\n- **blurHandle(): _void_** - Removes the focus from the currently focused handle and dispatches a \"blur\" event.\n","attributes":[{"name":"min","description":"Minimum value.","values":[]},{"name":"max","description":"Maximum value.","values":[]},{"name":"step","description":"Sliding step length.","values":[]},{"name":"vertical","description":"Whether to display the range vertically.","values":[]},{"name":"value","description":"Value, or each of values, will render a handle.\nAccepts number or array of numbers.","values":[{"name":"V"}]},{"name":"default","description":"The default of `this.value`.","values":[]},{"name":"autocomplete","values":[]},{"name":"outline-type","values":[{"name":"OutlineType"}]},{"name":"disabled","values":[]},{"name":"type","values":[{"name":"InputType"}]},{"name":"placeholder","values":[]},{"name":"name","values":[]}],"references":[]},{"name":"godown-progress","description":"Progress similar to `<progress>`.\n---\n","attributes":[{"name":"max","values":[]},{"name":"min","values":[]},{"name":"value","values":[]}],"references":[]},{"name":"godown-link","description":"Link is used for link jumping, works standalone or in Router.\nSet `type` to `\"normal\"`,\nbehave like a normal anchor.\nSet `type` to `\"push\" `or `\"replace\"`,\nupdate history state by `history.pushState` or `history.replaceState`,\nupdate all routers whether current pathname is registered or not.\nSet `type` to `\"auto\"`,\nonly update the routers if the current pathname is registered,\nif not registered, behave like `\"normal\"`.\n`replace` property will enforce `history.replaceState`.\n---\n### **Events:**\n - **navigate** - Fires when the link is clicked.","attributes":[{"name":"type","description":"If `\"normal\"`, behave like a normal anchor.\nIf `\"auto\"` or `\"push\"`, call `history.pushState` if `replace` is false,\nIf `\"replace\"`, call `history.replaceState`.","values":[{"name":"LinkType"}]},{"name":"suppress","description":"If `true`, the Router will not be updated.","values":[]},{"name":"replace","description":"Use `replaceState` instead of `pushState`.","values":[]},{"name":"href","description":"A element href.","values":[]},{"name":"target","description":"A element target.","values":[{"name":"_blank"},{"name":"_self"},{"name":"_parent"},{"name":"_top"}]}],"references":[]},{"name":"godown-layout","description":"Layout renders main content, top header, bottom footer.\nIf `sticky` is set to `true`, the header will be sticky.\nMain content will take up the remaining space.\nElement display should be `(inline-)flex` or `(inline-)grid`.\n---\n### **Slots:**\n - _default_ - The main content of the layout.\n- **header** - The header of the layout.\n- **footer** - The footer of the layout.","attributes":[{"name":"sticky","description":"If `true`, header will sticky.","values":[]}],"references":[]},{"name":"godown-input","description":"Input renders a text input.\n---\n### **Events:**\n - **input** - Fires when the input value changes.\n- **change** - Fires when the input value changes.","attributes":[{"name":"variant","description":"If outline, the outline is always present.","values":[{"name":"default"},{"name":"outline"}]},{"name":"autocomplete","values":[]},{"name":"outline-type","values":[{"name":"OutlineType"}]},{"name":"disabled","values":[]},{"name":"type","values":[{"name":"InputType"}]},{"name":"placeholder","values":[]},{"name":"name","values":[]},{"name":"value","values":[{"name":"V"}]},{"name":"default","description":"default property records the default or initial value and is used to reset the input.","values":[]}],"references":[]},{"name":"godown-heading","description":"Heading renders a heading.\nIf the id is provided, the anchor will be displayed.\n---\n### **Slots:**\n - _default_ - Heading content.","attributes":[{"name":"as","description":"The heading level.","values":[{"name":"h1"},{"name":"h2"},{"name":"h3"},{"name":"h4"},{"name":"h5"},{"name":"h6"}]},{"name":"anchor","description":"The anchor prefix.\nElement must have an id to be displayed.","values":[]},{"name":"side","description":"The anchor side.","values":[{"name":"left"},{"name":"right"}]}],"references":[]},{"name":"godown-grid","description":"Grid provides gird layout.\n---\n### **Slots:**\n - _default_ - Grid items.","attributes":[{"name":"gap","description":"CSS property `gap`.","values":[]},{"name":"columns","description":"CSS property `grid-template-columns`.\nIf columns is numerical, divide columns equally.","values":[]},{"name":"rows","description":"CSS property `grid-template-rows`.\nIf rows is numerical, divide rows equally.","values":[]},{"name":"content","description":"CSS property `place-content` (`align-content justify-content`).","values":[]},{"name":"items","description":"CSS property `place-items` (`align-items justify-items`).","values":[]}],"references":[]},{"name":"godown-form","description":"Form Gets child element key-value object,\nwhich will be nested if the child element is the same as this element.\n---\n","attributes":[{"name":"name","values":[]}],"references":[]},{"name":"godown-flex","description":"Flex provides flex layout.\n---\n### **Slots:**\n - _default_ - Flex items.","attributes":[{"name":"flex-flow","description":"CSS property `flex-flow` (`flex-direction flex-wrap`).","values":[]},{"name":"gap","description":"CSS property `gap`.","values":[]},{"name":"content","description":"CSS property `justify-content`.","values":[]},{"name":"items","description":"CSS property `align-items`.","values":[]},{"name":"vertical","description":"If true, set flex-direction to \"column\".","values":[]}],"references":[]},{"name":"godown-dragbox","description":"Dragbox does not extend beyond the range of Dragbox.offsetsWidth and Dragbox.offsetsHeight.\n---\n","attributes":[{"name":"x","description":"Position x.","values":[]},{"name":"y","description":"Position y.","values":[]}],"references":[]},{"name":"godown-divider","description":"Divider similar to `<hr>`.\n---\n","attributes":[{"name":"vertical","description":"Whether to display the divider vertically.","values":[]}],"references":[]},{"name":"godown-dialog","description":"Dialog similar to `<dialog>`.\nLike dialog, it listens for submit events and closes itself when the target method is \"dialog\".\nIt listens for the keydown event and also closes itself when the key contained in the key is pressed.\n---\n### **Events:**\n - **change** - Fires when the open changes.","attributes":[{"name":"modal","description":"Indicates whether the dialog should be displayed as a modal.","values":[]},{"name":"key","description":"The keys will close the dialog when pressed.","values":[]},{"name":"open","description":"Open the content.","values":[]}],"references":[]},{"name":"godown-details","description":"Details similar to `<details>`.\n---\n### **Events:**\n - **change** - Fires when the open changes.\n### **Slots:**\n - **summary** - Details summary if no `summary` is provided.\n- _default_ - Details content.","attributes":[{"name":"float","description":"Determines whether the details component should float.","values":[]},{"name":"fill","description":"Determines whether the details component should fill the available space.","values":[]},{"name":"summary","description":"The summary text to display in the details component.","values":[]},{"name":"open","description":"Open the content.","values":[]}],"references":[]},{"name":"godown-carousel","description":"Carousel make the content display as a carousel.\nWhen this component is `firstUpdated`,\nclone the first and last element and make the matching element visible when switching index.\n---\n### **Events:**\n - **change** - Fires when the index changes.\n### **Slots:**\n - _default_ - Carousel items, should maintain the same size.","attributes":[{"name":"index","description":"The index of the current item.","values":[]},{"name":"autoChange","description":"The duration of the transition.","values":[]}],"references":[]},{"name":"godown-card","description":"Card renders a card.\nThis may be similar to Layout,\nbut it needs to be specified to enable header and footer.\n---\n### **Slots:**\n - _default_ - The main content of the card.\n- **header** - The header of the card.\n- **footer** - The footer of the card.","attributes":[{"name":"footer","description":"Whether to display the header.","values":[]},{"name":"header","description":"Whether to display the footer.","values":[]}],"references":[]},{"name":"godown-button","description":"Button renders a button.\nCreate modal animation upon clicking.\nAvailable colors (background): none, black, gray, white, blue, green, red, orange, pink, purple, yellow, teal.\nDefault color is `black`.\nSet the color to `none` to prevent applying styles.\n---\n","attributes":[{"name":"plain","description":"If true, remove gradient, modal animation, focus scale.","values":[]},{"name":"disabled","description":"Whether this element is disabled or not.","values":[]},{"name":"ghost","description":"Whether this element should be rendered as a \"ghost\" button.\nA ghost button is a button with a transparent background and a border.","values":[]},{"name":"active","description":"Whether this element is active or not.","values":[]},{"name":"round","description":"Display rounded.","values":[]},{"name":"color","description":"The primary color.","values":[{"name":"none"},{"name":"keyof typeof colors"}]},{"name":"content","description":"Content text.","values":[]}],"references":[]},{"name":"godown-breath","description":"Breath render the text with a breathing effect.\nDynamically generate a breathing effect based on the length of the split text.\nIf there is not enough CSS variable, overrun elements will use the.\ngodown was a css library in its earliest days,\nand this is the component version of its first effect.\nInspired by Vercel home page (2023).\n---\n### **Slots:**\n - _default_ - Breathing parts.","attributes":[{"name":"content","description":"Strings or array of strings,\nif array, divided each element into chunks,\notherwise split strings by whitespace.","values":[{"name":"string[]"}]},{"name":"duration","description":"Effect duration.","values":[]}],"references":[]},{"name":"godown-badge","description":"Badge renders a badge.\n---\n### **Slots:**\n - _default_ - Badge content.","attributes":[{"name":"position","description":"The position of the badge relative to its parent element.\nPossible values are `\"top-left\"`, `\"top-right\"`, `\"bottom-left\"`, and `\"bottom-right\"`.","values":[{"name":"DirectionCorner"}]},{"name":"value","values":[]},{"name":"dot","description":"If `true`, render a dot badge.","values":[]},{"name":"max","description":"The maximum value that can be displayed in the badge\nValues greater than this will be displayed as `max+` by default.","values":[]}],"references":[]},{"name":"godown-avatar","description":"Avatar renders a avatar.\nRenders as an image if it has a src property,\notherwise falls back to name or nameless slot.\n---\n### **Slots:**\n - _default_ - Display content if no `src` or `name` provided.","attributes":[{"name":"src","description":"The `src` property specifies the URL of the avatar image.\nIf `src` is not provided, the component will display the `name` property instead.","values":[]},{"name":"name","description":"Specifies the name or initials to display if no `src` is provided","values":[]},{"name":"round","description":"If `true`, will make the avatar display as a circle.","values":[]}],"references":[]},{"name":"godown-alert","description":"Alert renders a alert.\nColor defaults to blue.\n---\n### **Events:**\n - **close** - Fires when the alert is closed.\n### **Slots:**\n - _default_ - Alert content.\n- **title** - Alert title.\n- **icon** - Alert icon.","attributes":[{"name":"call","description":"If it is a legal value, the icon and preset color will be rendered.","values":[{"name":"tip"},{"name":"success"},{"name":"info"},{"name":"warning"},{"name":"danger"},{"name":"error"},{"name":"help"},{"name":"deprecated"}]},{"name":"color","description":"The tone of the component.\nOverrides the color of the call.","values":[{"name":""},{"name":"white"},{"name":"black"},{"name":"gray"},{"name":"green"},{"name":"teal"},{"name":"blue"},{"name":"red"},{"name":"purple"},{"name":"orange"},{"name":"yellow"},{"name":"pink"},{"name":"none"}]},{"name":"autoclose","description":"Close delay, if 0, it will not be closed automatically.","values":[]},{"name":"title","description":"The title is bold and the icon height is the same as it.","values":[]},{"name":"content","description":"Content, if zero value, will be rendered as an unnamed slot.","values":[]},{"name":"hideClose","description":"Set true to hide the close button.\nThe behavior may change due to the variant property.","values":[]},{"name":"variant","description":"Alert variant, if set to `blockquote`, the alert will be rendered as a blockquote.\nIf variant is `\"blockquote\"`, hide the close button.","values":[{"name":"blockquote"},{"name":"dark"}]}],"references":[]}]}
1
+ {"version":1.1,"tags":[{"name":"godown-typewriter","description":"Typewriter renders a typewriter effect to text.\n---\n### **Events:**\n ","attributes":[{"name":"content","description":"Raw text.","values":[]},{"name":"ended","description":"If true, hide the cursor","values":[]},{"name":"max","description":"Maximum random time.","values":[]},{"name":"min","description":"Minimum random time.","values":[]},{"name":"delay","description":"Fixed time.","values":[]},{"name":"index","description":"The index at the beginning.","values":[]}],"references":[]},{"name":"godown-tooltip","description":"Tooltip provide tooltip for slot elements.\nIf it has the tip property, ignore the slot tip.\n---\n### **Events:**\n - **change**\n### **Slots:**\n - **tip** - Tip element if no `tip` provided.\n- _default_ - Content.","attributes":[{"name":"tip","description":"Tip text, if there is a value, the slot will be ignored.","values":[]},{"name":"direction","description":"Direction of opening the tip.","values":[{"name":"DirectionCardinal"},{"name":"DirectionCorner"}]},{"name":"align","description":"Content alignment.","values":[{"name":"center"},{"name":"flex-start"},{"name":"flex-end"},{"name":"start"},{"name":"end"}]},{"name":"propagation","description":"If true, allow penetration of the tip.","values":[]},{"name":"type","description":"How can tips be triggered.\nIf `focus`, element will be focusable, open tip when focused.\nIf `hover`, element will open tip when hovered.","values":[{"name":"hover"},{"name":"focus"}]},{"name":"open","description":"Open the content.","values":[]}],"references":[]},{"name":"godown-time","description":"Time renders a formatting time.\n---\n### **Events:**\n - **time** - Fires when the time changes.","attributes":[{"name":"escape","description":"Escape symbol.","values":[]},{"name":"format","description":"Format strings.","values":[]},{"name":"time","description":"Time.","values":[{"name":"Date"}]},{"name":"timeout","description":"If there is a value, update every gap or timeout.","values":[]},{"name":"gap","description":"The number of milliseconds that change with each update.","values":[]}],"references":[]},{"name":"godown-text","description":"Text renders nowrap text.\n---\n","attributes":[{"name":"underline","description":"Underline behavior.","values":[{"name":"none"},{"name":"hover"},{"name":"active"},{"name":"always"}]},{"name":"clip","description":"Set background-clip to text.","values":[]}],"references":[]},{"name":"godown-tabs","description":"Tabs used to render a set of tabs.\nIt accepts \"tabs\" to present the sub-content.\nWhen \"useSlot\" is enabled, each item in \"tabs\" becomes a named slot with the same name as itself,\nwhile for non-slot tabs, the content is rendered as a horizontally padded string.\nWhen \"mouseenter\" and \"mouseleave\" are triggered on an individual tab, the indicator will move.\nThe moving indicator will start from the position of the item that was last entered.\nIf the pointer moves out of the root element or the element is connected to the document,\nthe starting position of the indicator will be regarded as the current selection.\nApply \"flex-direction: column\" to the tabs to arrange them vertically.\n---\n### **Events:**\n - **select** - Fires when the tab is selected.\n### **CSS Parts:**\n - **root** - The root element.\n- **item** - The tab items.\n- **indicator** - The indicator.\n- **selected** - The selected tab item.\n- **hover** - The hovered tab item.","attributes":[{"name":"outline-type","values":[{"name":"OutlineType"}]},{"name":"useSlot","description":"Determines whether the tabs should use a slot for their content instead of a string.","values":[]},{"name":"tabs","description":"An array of strings or slot content representing the tabs.","values":[{"name":"string[]"}]},{"name":"index","description":"The index of the currently selected tab.","values":[]}],"references":[]},{"name":"godown-switch","description":"Switch renders a switch.\n---\n### **Events:**\n - **change** - Fires when the switch is switched.\n- **input**","attributes":[{"name":"default","description":"Default checked state.","values":[]},{"name":"checked","description":"The current value of the switch component. Reflects the \"checked\" attribute.","values":[]},{"name":"autocomplete","values":[]},{"name":"outline-type","values":[{"name":"OutlineType"}]},{"name":"disabled","values":[]},{"name":"type","values":[{"name":"InputType"}]},{"name":"placeholder","values":[]},{"name":"name","values":[]},{"name":"value","values":[{"name":"V"}]}],"references":[]},{"name":"godown-split","description":"Split renders multiple input boxes.\nInput: will move the focus box backward until the complete input from start to end.\nDelete: will move the focus box forward until the first and no inputs for each.\n---\n### **Events:**\n - **input** - Fires when the input value changes.\n- **focus** - Fires when the input is focused.\n- **blur** - Fires when the input is blurred.\n- **change** - Fires when the input value changes.\n### **Methods:**\n ","attributes":[{"name":"len","description":"The number of input boxes.","values":[]},{"name":"index","description":"Focus index.","values":[]},{"name":"autocomplete","values":[]},{"name":"outline-type","values":[{"name":"OutlineType"}]},{"name":"disabled","values":[]},{"name":"type","values":[{"name":"InputType"}]},{"name":"placeholder","values":[]},{"name":"name","values":[]},{"name":"value","values":[{"name":"V"}]},{"name":"default","description":"default property records the default or initial value and is used to reset the input.","values":[]}],"references":[]},{"name":"godown-skeleton","description":"Skeleton renders a skeleton screen.\n---\n### **Slots:**\n - **loading** - The content if loading is true.\n- _default_ - The content if loading is false.","attributes":[{"name":"type","description":"If \"image\", render a image placeholder.","values":[{"name":"text"},{"name":"image"}]},{"name":"animation","description":"Animation type.\nopacity animation only effect on slotted element and image icon.","values":[{"name":"position"},{"name":"opacity"}]}],"references":[]},{"name":"godown-select","description":"Select is similar to `<select>`.\nElements with the value attribute/property can be used as options.\nThe checked attribute will be added to the selected element.\nMulti-selected state looks the same as single-selected.\nInput will filter the element.\n---\n### **Events:**\n - **select** - Fires when select an option.\n- **input** - Fires when the input value changes.\n- **change** - Fires when the input value changes.\n### **Slots:**\n - _default_ - Options.","attributes":[{"name":"text","description":"Selected texts.","values":[]},{"name":"direction","values":[{"name":"DirectionCardinalY"}]},{"name":"multiple","values":[]},{"name":"visible","values":[]},{"name":"variant","description":"If outline, the outline is always present.","values":[{"name":"default"},{"name":"outline"}]},{"name":"autocomplete","values":[]},{"name":"outline-type","values":[{"name":"OutlineType"}]},{"name":"disabled","values":[]},{"name":"type","values":[{"name":"InputType"}]},{"name":"placeholder","values":[]},{"name":"name","values":[]},{"name":"value","values":[{"name":"V"}]},{"name":"default","description":"default property records the default or initial value and is used to reset the input.","values":[]}],"references":[]},{"name":"godown-router","description":"Router has basic routing control.\nTo switch routes, use `router-link component`.\nIt has two methods to collect routes.\n1. From field `routes`, an array, each elements require \"path\".\n2. From child elements, which have the slot attribute for matching routes.\nIf only the method 1 is used, set `type` to `\"field\"`.\nIf only the method 2 is used, set `type` to `\"slotted\"`.\n`type` defaults to `\"united\"`, which will try method 1, then method 2.\nIf no routes are matched, the default value (no named slot) will be rendered.\n---\n### **Events:**\n - **change**\n### **Methods:**\n - **fieldComponent(query: _string_): _unknown_** - Get component from routes by query.\n- **slottedComponent(query: _string_): _TemplateResult<1>_** - Get component from slotted elements by query.\n- **collectSlottedRoutes(): _void_** - Reset the route tree, clear cache, collect routes from child elements.\n- **collectFieldRoutes(value: _typeof this.routes_): _void_** - Reset the route tree, clear cache, collect routes from value.\n### **Slots:**\n - _default_ - Display slot when there is no match.\n- ***** - Matching slot will be displayed.","attributes":[{"name":"pathname","description":"Current pathname (equals to location.pathname).","values":[]},{"name":"type","description":"The type of routing sources.\nIf field, it won't collect the slot attribute of the child elements.\nThis property should not be changed after the rendering is complete.","values":[{"name":"RouterType"}]},{"name":"cache","description":"Cache accessed records.\nEmptied at each re-collection.","values":[]}],"references":[]},{"name":"godown-rotate","description":"Rotate Make child elements rotate.\n---\n### **Methods:**\n ","attributes":[],"references":[]},{"name":"godown-range","description":"Range is similar to `<input type=\"range\">`.\nValue accepts number, or array.\nNumber has 1 handle, the array has the number of its elements.\n---\n### **Events:**\n - **focus** - Fires when the handle is focused.\n- **blur** - Fires when the handle is blurred.\n- **range** - Fires when the value changes.\n- **input** - Fires when the input value changes.\n- **change** - Fires when the input value changes.\n### **Methods:**\n - **padValue(len: _number_, value): _number[]_** - Pad the value to the specified length.\n- **focusHandle(index: _number_): _void_** - Focuses the handle at the given index, updates the focus stack, and dispatches a \"focus\" event.\n- **blurHandle(): _void_** - Removes the focus from the currently focused handle and dispatches a \"blur\" event.\n","attributes":[{"name":"min","description":"Minimum value.","values":[]},{"name":"max","description":"Maximum value.","values":[]},{"name":"step","description":"Sliding step length.","values":[]},{"name":"vertical","description":"Whether to display the range vertically.","values":[]},{"name":"value","description":"Value, or each of values, will render a handle.\nAccepts number or array of numbers.","values":[{"name":"V"}]},{"name":"default","description":"The default of `this.value`.","values":[]},{"name":"autocomplete","values":[]},{"name":"outline-type","values":[{"name":"OutlineType"}]},{"name":"disabled","values":[]},{"name":"type","values":[{"name":"InputType"}]},{"name":"placeholder","values":[]},{"name":"name","values":[]}],"references":[]},{"name":"godown-progress","description":"Progress similar to `<progress>`.\n---\n","attributes":[{"name":"max","values":[]},{"name":"min","values":[]},{"name":"value","values":[]}],"references":[]},{"name":"godown-link","description":"Link is used for link jumping, works standalone or in Router.\nSet `type` to `\"normal\"`,\nbehave like a normal anchor.\nSet `type` to `\"push\" `or `\"replace\"`,\nupdate history state by `history.pushState` or `history.replaceState`,\nupdate all routers whether current pathname is registered or not.\nSet `type` to `\"auto\"`,\nonly update the routers if the current pathname is registered,\nif not registered, behave like `\"normal\"`.\n`replace` property will enforce `history.replaceState`.\n---\n### **Events:**\n - **navigate** - Fires when the link is clicked.","attributes":[{"name":"type","description":"If `\"normal\"`, behave like a normal anchor.\nIf `\"auto\"` or `\"push\"`, call `history.pushState` if `replace` is false,\nIf `\"replace\"`, call `history.replaceState`.","values":[{"name":"LinkType"}]},{"name":"suppress","description":"If `true`, the Router will not be updated.","values":[]},{"name":"replace","description":"Use `replaceState` instead of `pushState`.","values":[]},{"name":"href","description":"A element href.","values":[]},{"name":"target","description":"A element target.","values":[{"name":"_blank"},{"name":"_self"},{"name":"_parent"},{"name":"_top"}]}],"references":[]},{"name":"godown-layout","description":"Layout renders main content, top header, bottom footer.\nIf `sticky` is set to `true`, the header will be sticky.\nMain content will take up the remaining space.\nElement display should be `(inline-)flex` or `(inline-)grid`.\n---\n### **Slots:**\n - _default_ - The main content of the layout.\n- **header** - The header of the layout.\n- **footer** - The footer of the layout.","attributes":[{"name":"sticky","description":"If `true`, header will sticky.","values":[]}],"references":[]},{"name":"godown-input","description":"Input renders a text input.\n---\n### **Events:**\n - **input** - Fires when the input value changes.\n- **change** - Fires when the input value changes.","attributes":[{"name":"variant","description":"If outline, the outline is always present.","values":[{"name":"default"},{"name":"outline"}]},{"name":"autocomplete","values":[]},{"name":"outline-type","values":[{"name":"OutlineType"}]},{"name":"disabled","values":[]},{"name":"type","values":[{"name":"InputType"}]},{"name":"placeholder","values":[]},{"name":"name","values":[]},{"name":"value","values":[{"name":"V"}]},{"name":"default","description":"default property records the default or initial value and is used to reset the input.","values":[]}],"references":[]},{"name":"godown-heading","description":"Heading renders a heading.\nIf the id is provided, the anchor will be displayed.\n---\n### **Slots:**\n - _default_ - Heading content.","attributes":[{"name":"as","description":"The heading level.","values":[{"name":"h1"},{"name":"h2"},{"name":"h3"},{"name":"h4"},{"name":"h5"},{"name":"h6"}]},{"name":"anchor","description":"The anchor prefix.\nElement must have an id to be displayed.","values":[]},{"name":"side","description":"The anchor side.","values":[{"name":"left"},{"name":"right"}]}],"references":[]},{"name":"godown-grid","description":"Grid provides gird layout.\n---\n### **Slots:**\n - _default_ - Grid items.","attributes":[{"name":"gap","description":"CSS property `gap`.","values":[]},{"name":"columns","description":"CSS property `grid-template-columns`.\nIf columns is numerical, divide columns equally.","values":[]},{"name":"rows","description":"CSS property `grid-template-rows`.\nIf rows is numerical, divide rows equally.","values":[]},{"name":"content","description":"CSS property `place-content` (`align-content justify-content`).","values":[]},{"name":"items","description":"CSS property `place-items` (`align-items justify-items`).","values":[]}],"references":[]},{"name":"godown-form","description":"Form Gets child element key-value object,\nwhich will be nested if the child element is the same as this element.\n---\n","attributes":[{"name":"name","values":[]}],"references":[]},{"name":"godown-flex","description":"Flex provides flex layout.\n---\n### **Slots:**\n - _default_ - Flex items.","attributes":[{"name":"flex-flow","description":"CSS property `flex-flow` (`flex-direction flex-wrap`).","values":[]},{"name":"gap","description":"CSS property `gap`.","values":[]},{"name":"content","description":"CSS property `justify-content`.","values":[]},{"name":"items","description":"CSS property `align-items`.","values":[]},{"name":"vertical","description":"If true, set flex-direction to \"column\".","values":[]}],"references":[]},{"name":"godown-dragbox","description":"Dragbox does not extend beyond the range of Dragbox.offsetsWidth and Dragbox.offsetsHeight.\n---\n","attributes":[{"name":"x","description":"Position x.","values":[]},{"name":"y","description":"Position y.","values":[]}],"references":[]},{"name":"godown-divider","description":"Divider similar to `<hr>`.\n---\n","attributes":[{"name":"vertical","description":"Whether to display the divider vertically.","values":[]}],"references":[]},{"name":"godown-dialog","description":"Dialog similar to `<dialog>`.\nLike dialog, it listens for submit events and closes itself when the target method is \"dialog\".\nIt listens for the keydown event and also closes itself when the key contained in the key is pressed.\n---\n### **Events:**\n - **change** - Fires when the open changes.","attributes":[{"name":"modal","description":"Indicates whether the dialog should be displayed as a modal.","values":[]},{"name":"key","description":"The keys will close the dialog when pressed.","values":[]},{"name":"open","description":"Open the content.","values":[]}],"references":[]},{"name":"godown-details","description":"Details similar to `<details>`.\n---\n### **Events:**\n - **change** - Fires when the open changes.\n### **Slots:**\n - **summary** - Details summary if no `summary` is provided.\n- _default_ - Details content.","attributes":[{"name":"float","description":"Determines whether the details component should float.","values":[]},{"name":"fill","description":"Determines whether the details component should fill the available space.","values":[]},{"name":"summary","description":"The summary text to display in the details component.","values":[]},{"name":"open","description":"Open the content.","values":[]}],"references":[]},{"name":"godown-carousel","description":"Carousel make the content display as a carousel.\nWhen this component is `firstUpdated`,\nclone the first and last element and make the matching element visible when switching index.\n---\n### **Events:**\n - **change** - Fires when the index changes.\n### **Slots:**\n - _default_ - Carousel items, should maintain the same size.","attributes":[{"name":"index","description":"The index of the current item.","values":[]},{"name":"autoChange","description":"The duration of the transition.","values":[]}],"references":[]},{"name":"godown-card","description":"Card renders a card.\nThis may be similar to Layout,\nbut it needs to be specified to enable header and footer.\n---\n### **Slots:**\n - _default_ - The main content of the card.\n- **header** - The header of the card.\n- **footer** - The footer of the card.","attributes":[{"name":"footer","description":"Whether to display the header.","values":[]},{"name":"header","description":"Whether to display the footer.","values":[]}],"references":[]},{"name":"godown-button","description":"Button renders a button.\nCreate modal animation upon clicking.\nAvailable colors (background): none, black, gray, white, blue, green, red, orange, pink, purple, yellow, teal.\nDefault color is `black`.\nSet the color to `none` to prevent applying styles.\n---\n","attributes":[{"name":"plain","description":"If true, remove gradient, modal animation, focus scale.","values":[]},{"name":"disabled","description":"Whether this element is disabled or not.","values":[]},{"name":"ghost","description":"Whether this element should be rendered as a \"ghost\" button.\nA ghost button is a button with a transparent background and a border.","values":[]},{"name":"active","description":"Whether this element is active or not.","values":[]},{"name":"round","description":"Display rounded.","values":[]},{"name":"color","description":"The primary color.","values":[{"name":"none"},{"name":"keyof typeof colors"}]},{"name":"content","description":"Content text.","values":[]}],"references":[]},{"name":"godown-breath","description":"Breath render the text with a breathing effect.\nDynamically generate a breathing effect based on the length of the split text.\nIf there is not enough CSS variable, overrun elements will use the.\ngodown was a css library in its earliest days,\nand this is the component version of its first effect.\nInspired by Vercel home page (2023).\n---\n### **Slots:**\n - _default_ - Breathing parts.","attributes":[{"name":"content","description":"Strings or array of strings,\nif array, divided each element into chunks,\notherwise split strings by whitespace.","values":[{"name":"string[]"}]},{"name":"duration","description":"Effect duration.","values":[]}],"references":[]},{"name":"godown-badge","description":"Badge renders a badge.\n---\n### **Slots:**\n - _default_ - Badge content.","attributes":[{"name":"position","description":"The position of the badge relative to its parent element.\nPossible values are `\"top-left\"`, `\"top-right\"`, `\"bottom-left\"`, and `\"bottom-right\"`.","values":[{"name":"DirectionCorner"}]},{"name":"value","values":[]},{"name":"dot","description":"If `true`, render a dot badge.","values":[]},{"name":"max","description":"The maximum value that can be displayed in the badge\nValues greater than this will be displayed as `max+` by default.","values":[]}],"references":[]},{"name":"godown-avatar","description":"Avatar renders a avatar.\nRenders as an image if it has a src property,\notherwise falls back to name or nameless slot.\n---\n### **Slots:**\n - _default_ - Display content if no `src` or `name` provided.","attributes":[{"name":"src","description":"The `src` property specifies the URL of the avatar image.\nIf `src` is not provided, the component will display the `name` property instead.","values":[]},{"name":"name","description":"Specifies the name or initials to display if no `src` is provided","values":[]},{"name":"round","description":"If `true`, will make the avatar display as a circle.","values":[]}],"references":[]},{"name":"godown-alert","description":"Alert renders a alert.\nColor defaults to blue.\n---\n### **Events:**\n - **close** - Fires when the alert is closed.\n### **Slots:**\n - _default_ - Alert content.\n- **title** - Alert title.\n- **icon** - Alert icon.","attributes":[{"name":"call","description":"If it is a legal value, the icon and preset color will be rendered.","values":[{"name":"tip"},{"name":"success"},{"name":"info"},{"name":"warning"},{"name":"danger"},{"name":"error"},{"name":"help"},{"name":"deprecated"}]},{"name":"color","description":"The tone of the component.\nOverrides the color of the call.","values":[{"name":""},{"name":"white"},{"name":"black"},{"name":"gray"},{"name":"green"},{"name":"teal"},{"name":"blue"},{"name":"red"},{"name":"purple"},{"name":"orange"},{"name":"yellow"},{"name":"pink"},{"name":"none"}]},{"name":"autoclose","description":"Close delay, if 0, it will not be closed automatically.","values":[]},{"name":"title","description":"The title is bold and the icon height is the same as it.","values":[]},{"name":"content","description":"Content, if zero value, will be rendered as an unnamed slot.","values":[]},{"name":"hideClose","description":"Set true to hide the close button.\nThe behavior may change due to the variant property.","values":[]},{"name":"variant","description":"Alert variant, if set to `blockquote`, the alert will be rendered as a blockquote.\nIf variant is `\"blockquote\"`, hide the close button.","values":[{"name":"blockquote"},{"name":"dark"}]}],"references":[]}]}