godown 3.0.0-canary.8 → 3.0.0-canary.9
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/components/alert.js +1 -1
- package/components/avatar.d.ts +1 -0
- package/components/avatar.d.ts.map +1 -1
- package/components/avatar.js +3 -2
- package/components/avatar.js.map +1 -1
- package/components/breath.d.ts +1 -0
- package/components/breath.d.ts.map +1 -1
- package/components/breath.js +3 -2
- package/components/breath.js.map +1 -1
- package/components/button.d.ts +12 -6
- package/components/button.d.ts.map +1 -1
- package/components/button.js +14 -11
- package/components/button.js.map +1 -1
- package/components/card.d.ts +1 -2
- package/components/card.d.ts.map +1 -1
- package/components/card.js +5 -10
- package/components/card.js.map +1 -1
- package/components/carousel.d.ts +5 -4
- package/components/carousel.d.ts.map +1 -1
- package/components/carousel.js +2 -1
- package/components/carousel.js.map +1 -1
- package/components/details.d.ts +4 -1
- package/components/details.d.ts.map +1 -1
- package/components/details.js +4 -1
- package/components/details.js.map +1 -1
- package/components/dialog.d.ts +4 -1
- package/components/dialog.d.ts.map +1 -1
- package/components/dialog.js +5 -2
- package/components/dialog.js.map +1 -1
- package/components/dragbox.d.ts +7 -7
- package/components/dragbox.d.ts.map +1 -1
- package/components/dragbox.js +1 -1
- package/components/dragbox.js.map +1 -1
- package/components/flex.d.ts +1 -0
- package/components/flex.d.ts.map +1 -1
- package/components/flex.js +8 -0
- package/components/flex.js.map +1 -1
- package/components/form.d.ts +0 -2
- package/components/form.d.ts.map +1 -1
- package/components/form.js +0 -2
- package/components/form.js.map +1 -1
- package/components/grid.d.ts +7 -2
- package/components/grid.d.ts.map +1 -1
- package/components/grid.js +1 -0
- package/components/grid.js.map +1 -1
- package/components/input.d.ts +2 -2
- package/components/input.d.ts.map +1 -1
- package/components/input.js +2 -2
- package/components/input.js.map +1 -1
- package/components/layout.d.ts +2 -5
- package/components/layout.d.ts.map +1 -1
- package/components/layout.js +16 -4
- package/components/layout.js.map +1 -1
- package/components/link.d.ts +3 -1
- package/components/link.d.ts.map +1 -1
- package/components/link.js +3 -1
- package/components/link.js.map +1 -1
- package/components/progress.d.ts +1 -10
- package/components/progress.d.ts.map +1 -1
- package/components/progress.js +5 -14
- package/components/progress.js.map +1 -1
- package/components/range.d.ts +12 -11
- package/components/range.d.ts.map +1 -1
- package/components/range.js +4 -11
- package/components/range.js.map +1 -1
- package/components/rotate.d.ts +1 -1
- package/components/rotate.d.ts.map +1 -1
- package/components/rotate.js +1 -1
- package/components/rotate.js.map +1 -1
- package/components/router.d.ts +6 -8
- package/components/router.d.ts.map +1 -1
- package/components/router.js +9 -9
- package/components/router.js.map +1 -1
- package/components/select.d.ts +1 -2
- package/components/select.d.ts.map +1 -1
- package/components/select.js +1 -2
- package/components/select.js.map +1 -1
- package/components/skeleton.d.ts.map +1 -1
- package/components/skeleton.js +2 -2
- package/components/skeleton.js.map +1 -1
- package/components/split.d.ts +17 -0
- package/components/split.d.ts.map +1 -1
- package/components/split.js +42 -17
- package/components/split.js.map +1 -1
- package/components/switch.d.ts +3 -3
- package/components/switch.d.ts.map +1 -1
- package/components/switch.js +5 -5
- package/components/switch.js.map +1 -1
- package/components/text.js +2 -2
- package/components/time.d.ts +4 -4
- package/components/time.d.ts.map +1 -1
- package/components/time.js +1 -9
- package/components/time.js.map +1 -1
- package/components/tooltip.d.ts +11 -1
- package/components/tooltip.d.ts.map +1 -1
- package/components/tooltip.js +19 -5
- package/components/tooltip.js.map +1 -1
- package/components/typewriter.d.ts +2 -2
- package/components/typewriter.d.ts.map +1 -1
- package/components/typewriter.js +2 -2
- package/components/typewriter.js.map +1 -1
- package/core/global-style.d.ts.map +1 -1
- package/core/global-style.js +8 -1
- package/core/global-style.js.map +1 -1
- package/core/super-anchor.js +1 -1
- package/core/super-input.d.ts +2 -2
- package/core/super-input.d.ts.map +1 -1
- package/core/super-input.js.map +1 -1
- package/custom-elements.json +1 -1
- package/dev/components/avatar.d.ts +1 -0
- package/dev/components/avatar.d.ts.map +1 -1
- package/dev/components/avatar.js +1 -3
- package/dev/components/avatar.js.map +1 -1
- package/dev/components/breath.d.ts +1 -0
- package/dev/components/breath.d.ts.map +1 -1
- package/dev/components/breath.js +1 -0
- package/dev/components/breath.js.map +1 -1
- package/dev/components/button.d.ts +12 -6
- package/dev/components/button.d.ts.map +1 -1
- package/dev/components/button.js +18 -13
- package/dev/components/button.js.map +1 -1
- package/dev/components/card.d.ts +1 -2
- package/dev/components/card.d.ts.map +1 -1
- package/dev/components/card.js +21 -28
- package/dev/components/card.js.map +1 -1
- package/dev/components/carousel.d.ts +5 -4
- package/dev/components/carousel.d.ts.map +1 -1
- package/dev/components/carousel.js +1 -0
- package/dev/components/carousel.js.map +1 -1
- package/dev/components/details.d.ts +4 -1
- package/dev/components/details.d.ts.map +1 -1
- package/dev/components/details.js +3 -0
- package/dev/components/details.js.map +1 -1
- package/dev/components/dialog.d.ts +4 -1
- package/dev/components/dialog.d.ts.map +1 -1
- package/dev/components/dialog.js +4 -1
- package/dev/components/dialog.js.map +1 -1
- package/dev/components/dragbox.d.ts +7 -7
- package/dev/components/dragbox.d.ts.map +1 -1
- package/dev/components/dragbox.js.map +1 -1
- package/dev/components/flex.d.ts +1 -0
- package/dev/components/flex.d.ts.map +1 -1
- package/dev/components/flex.js +8 -0
- package/dev/components/flex.js.map +1 -1
- package/dev/components/form.d.ts +0 -2
- package/dev/components/form.d.ts.map +1 -1
- package/dev/components/form.js +0 -2
- package/dev/components/form.js.map +1 -1
- package/dev/components/grid.d.ts +7 -2
- package/dev/components/grid.d.ts.map +1 -1
- package/dev/components/grid.js +1 -0
- package/dev/components/grid.js.map +1 -1
- package/dev/components/input.d.ts +2 -2
- package/dev/components/input.d.ts.map +1 -1
- package/dev/components/input.js +1 -1
- package/dev/components/input.js.map +1 -1
- package/dev/components/layout.d.ts +2 -5
- package/dev/components/layout.d.ts.map +1 -1
- package/dev/components/layout.js +15 -3
- package/dev/components/layout.js.map +1 -1
- package/dev/components/link.d.ts +3 -1
- package/dev/components/link.d.ts.map +1 -1
- package/dev/components/link.js +3 -1
- package/dev/components/link.js.map +1 -1
- package/dev/components/progress.d.ts +1 -10
- package/dev/components/progress.d.ts.map +1 -1
- package/dev/components/progress.js +3 -12
- package/dev/components/progress.js.map +1 -1
- package/dev/components/range.d.ts +12 -11
- package/dev/components/range.d.ts.map +1 -1
- package/dev/components/range.js +3 -10
- package/dev/components/range.js.map +1 -1
- package/dev/components/rotate.d.ts +1 -1
- package/dev/components/rotate.d.ts.map +1 -1
- package/dev/components/rotate.js.map +1 -1
- package/dev/components/router.d.ts +6 -8
- package/dev/components/router.d.ts.map +1 -1
- package/dev/components/router.js +9 -9
- package/dev/components/router.js.map +1 -1
- package/dev/components/select.d.ts +1 -2
- package/dev/components/select.d.ts.map +1 -1
- package/dev/components/select.js +0 -1
- package/dev/components/select.js.map +1 -1
- package/dev/components/skeleton.d.ts.map +1 -1
- package/dev/components/skeleton.js.map +1 -1
- package/dev/components/split.d.ts +17 -0
- package/dev/components/split.d.ts.map +1 -1
- package/dev/components/split.js +41 -16
- package/dev/components/split.js.map +1 -1
- package/dev/components/switch.d.ts +3 -3
- package/dev/components/switch.d.ts.map +1 -1
- package/dev/components/switch.js +7 -7
- package/dev/components/switch.js.map +1 -1
- package/dev/components/time.d.ts +4 -4
- package/dev/components/time.d.ts.map +1 -1
- package/dev/components/time.js +1 -9
- package/dev/components/time.js.map +1 -1
- package/dev/components/tooltip.d.ts +11 -1
- package/dev/components/tooltip.d.ts.map +1 -1
- package/dev/components/tooltip.js +28 -8
- package/dev/components/tooltip.js.map +1 -1
- package/dev/components/typewriter.d.ts +2 -2
- package/dev/components/typewriter.d.ts.map +1 -1
- package/dev/components/typewriter.js +0 -1
- package/dev/components/typewriter.js.map +1 -1
- package/dev/core/global-style.d.ts.map +1 -1
- package/dev/core/global-style.js +8 -9
- package/dev/core/global-style.js.map +1 -1
- package/dev/core/super-input.d.ts +2 -2
- package/dev/core/super-input.d.ts.map +1 -1
- package/dev/core/super-input.js.map +1 -1
- package/index.js +13 -13
- package/package.json +1 -1
- package/src/components/avatar.ts +2 -3
- package/src/components/breath.ts +2 -0
- package/src/components/button.ts +26 -16
- package/src/components/card.ts +22 -27
- package/src/components/carousel.ts +7 -4
- package/src/components/details.ts +5 -1
- package/src/components/dialog.ts +6 -1
- package/src/components/dragbox.ts +8 -7
- package/src/components/flex.ts +6 -1
- package/src/components/form.ts +1 -2
- package/src/components/grid.ts +11 -2
- package/src/components/input.ts +3 -2
- package/src/components/layout.ts +6 -8
- package/src/components/link.ts +3 -1
- package/src/components/progress.ts +6 -12
- package/src/components/range.ts +15 -20
- package/src/components/rotate.ts +1 -1
- package/src/components/router.ts +18 -9
- package/src/components/select.ts +2 -2
- package/src/components/skeleton.ts +2 -0
- package/src/components/split.ts +48 -17
- package/src/components/switch.ts +12 -8
- package/src/components/time.ts +8 -4
- package/src/components/tooltip.ts +29 -8
- package/src/components/typewriter.ts +10 -3
- package/src/core/global-style.ts +9 -9
- package/src/core/super-input.ts +2 -2
- package/vscode.html-custom-data.json +1 -1
- package/web-types.json +1 -1
package/dev/core/global-style.js
CHANGED
@@ -2,6 +2,7 @@ import { presetsRGB } from "@godown/colors/presets-rgb.js";
|
|
2
2
|
import { travel } from "@godown/colors/travel.js";
|
3
3
|
import GodownElement from "@godown/element";
|
4
4
|
import GodownConfig from "@godown/element/config.js";
|
5
|
+
import { joinProperties } from "@godown/element/tools/css.js";
|
5
6
|
import { trim } from "@godown/element/tools/lib.js";
|
6
7
|
import { css, unsafeCSS } from "lit";
|
7
8
|
GodownElement.godownConfig ||= new GodownConfig();
|
@@ -36,17 +37,15 @@ GlobalStyle.styles = [
|
|
36
37
|
const colorKey = scopePrefix("color", 2) + endKey;
|
37
38
|
return `${colorKey}:rgb(${rgb});`;
|
38
39
|
}, presetsRGB).join("")
|
40
|
+
+ joinProperties({
|
41
|
+
[cssGlobalVars.background + ""]: `var(${cssGlobalVars._colors.darkgray[9]})`,
|
42
|
+
[cssGlobalVars.foreground + ""]: `var(${cssGlobalVars._colors.lightgray[0]})`,
|
43
|
+
[cssGlobalVars.active + ""]: `var(${cssGlobalVars._colors.blue[6]})`,
|
44
|
+
[cssGlobalVars.passive + ""]: `var(${cssGlobalVars._colors.darkgray[6]})`,
|
45
|
+
[cssGlobalVars.clipBackground + ""]: `linear-gradient(to bottom, var(${cssGlobalVars.foreground}), var(${cssGlobalVars.passive}))`,
|
46
|
+
})
|
39
47
|
+ "}"),
|
40
48
|
css `
|
41
|
-
:host {
|
42
|
-
${cssGlobalVars.background}: var(${cssGlobalVars._colors.darkgray[9]});
|
43
|
-
${cssGlobalVars.foreground}: var(${cssGlobalVars._colors.lightgray[0]});
|
44
|
-
${cssGlobalVars.active}: var(${cssGlobalVars._colors.blue[6]});
|
45
|
-
${cssGlobalVars.passive}: var(${cssGlobalVars._colors.darkgray[6]});
|
46
|
-
${cssGlobalVars.clipBackground}: linear-gradient(180deg, var(${cssGlobalVars.foreground}), var(${cssGlobalVars.passive}));
|
47
|
-
}
|
48
|
-
`,
|
49
|
-
css `
|
50
49
|
* {
|
51
50
|
border: 0;
|
52
51
|
outline: 0;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"global-style.js","sourceRoot":"","sources":["../../src/core/global-style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,YAAY,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACpD,OAAO,EAAE,GAAG,EAAa,SAAS,EAAE,MAAM,KAAK,CAAC;AAEhD,aAAa,CAAC,YAAY,KAAK,IAAI,YAAY,EAAE,CAAC;AAElD,MAAM,OAAO,WAAY,SAAQ,aAAa;CAC7C;AAED,MAAM,MAAM,GAAG,IAAI,CAAC,WAAW,C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OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG;YAC5E,CAAC,aAAa,CAAC,UAAU,GAAG,EAAE,CAAC,EAAE,OAAO,aAAa,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG;YAC7E,CAAC,aAAa,CAAC,MAAM,GAAG,EAAE,CAAC,EAAE,OAAO,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG;YACpE,CAAC,aAAa,CAAC,OAAO,GAAG,EAAE,CAAC,EAAE,OAAO,aAAa,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG;YACzE,CAAC,aAAa,CAAC,cAAc,GAAG,EAAE,CAAC,EACjC,kCAAkC,aAAa,CAAC,UAAU,UAAU,aAAa,CAAC,OAAO,IAAI;SAChG,CAAC;UACA,GAAG,CACR;IACD,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BF;CACF,CAAC"}
|
@@ -12,14 +12,14 @@ declare class SuperInput extends GlobalStyle {
|
|
12
12
|
* default property records the default or initial value and is used to reset the input.
|
13
13
|
*/
|
14
14
|
default: any;
|
15
|
-
_input: HTMLInputElement;
|
15
|
+
protected _input: HTMLInputElement;
|
16
16
|
/**
|
17
17
|
* Returns true when the input is compositing.
|
18
18
|
*/
|
19
19
|
compositing: boolean;
|
20
20
|
set defaultValue(value: typeof this.default);
|
21
21
|
get defaultValue(): typeof this.default;
|
22
|
-
makeId: string;
|
22
|
+
protected makeId: string;
|
23
23
|
namevalue(): [string, any];
|
24
24
|
nameValue: () => [string, any];
|
25
25
|
reset(): void;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"super-input.d.ts","sourceRoot":"","sources":["../../src/core/super-input.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAK/D,OAAO,EAAiB,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAoE/D,cACM,UAAW,SAAQ,WA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,IAAI,CAAC,MAAM,kBAClC,IAAI,CAAC,IAAI,KAAK,UAAU;YACtB,CAAC,CAAC,IAAI,CAAA;;;;wBAIU,GAAG,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC;sBACrC,GAAG,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC;yBAClC,GAAG,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC;WACnD,gBAAgB,EAAE,MAAM;YAC3B,CAAC,CAAC,QAAQ,CAAC,QAAQ,CACvB;;WAEO,CAAC;IACV,CAAC;CACF,CAAA;AA7HC;IADC,QAAQ,EAAE;gDACoB;AAG/B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;4CACzB;AAGlB;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;wCACZ;AAGhB;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;+CACR;AAGpB;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;wCACf;AAGb;IADC,QAAQ,EAAE;yCACA;AAMX;IADC,QAAQ,EAAE;2CACE;AAGH;IADT,IAAI,CAAC,OAAO,CAAC;0CACqB;AA3B/B,UAAU;IADf,MAAM,CAAC,UAAU,EAAE,UAAU,CAAC;GACzB,UAAU,CAgIf;AAED,eAAe,UAAU,CAAC"}
|
package/index.js
CHANGED
@@ -26,6 +26,19 @@ import './text.js';
|
|
26
26
|
import './time.js';
|
27
27
|
import './tooltip.js';
|
28
28
|
import './typewriter.js';
|
29
|
+
export { default as Alert } from './components/alert.js';
|
30
|
+
export { default as Avatar } from './components/avatar.js';
|
31
|
+
export { default as Breath } from './components/breath.js';
|
32
|
+
export { default as Button } from './components/button.js';
|
33
|
+
export { default as Card } from './components/card.js';
|
34
|
+
export { default as Carousel } from './components/carousel.js';
|
35
|
+
export { default as Details } from './components/details.js';
|
36
|
+
export { default as Dialog } from './components/dialog.js';
|
37
|
+
export { default as Divider } from './components/divider.js';
|
38
|
+
export { default as Dragbox } from './components/dragbox.js';
|
39
|
+
export { default as Flex } from './components/flex.js';
|
40
|
+
export { default as Form } from './components/form.js';
|
41
|
+
export { default as Grid } from './components/grid.js';
|
29
42
|
export { default as Input } from './components/input.js';
|
30
43
|
export { default as Layout } from './components/layout.js';
|
31
44
|
export { default as Link } from './components/link.js';
|
@@ -41,17 +54,4 @@ export { default as Text } from './components/text.js';
|
|
41
54
|
export { default as Time } from './components/time.js';
|
42
55
|
export { default as Tooltip } from './components/tooltip.js';
|
43
56
|
export { default as Typewriter } from './components/typewriter.js';
|
44
|
-
export { default as Alert } from './components/alert.js';
|
45
|
-
export { default as Avatar } from './components/avatar.js';
|
46
|
-
export { default as Breath } from './components/breath.js';
|
47
|
-
export { default as Button } from './components/button.js';
|
48
|
-
export { default as Card } from './components/card.js';
|
49
|
-
export { default as Carousel } from './components/carousel.js';
|
50
|
-
export { default as Details } from './components/details.js';
|
51
|
-
export { default as Dialog } from './components/dialog.js';
|
52
|
-
export { default as Divider } from './components/divider.js';
|
53
|
-
export { default as Dragbox } from './components/dragbox.js';
|
54
|
-
export { default as Flex } from './components/flex.js';
|
55
|
-
export { default as Form } from './components/form.js';
|
56
|
-
export { default as Grid } from './components/grid.js';
|
57
57
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
package/src/components/avatar.ts
CHANGED
@@ -14,6 +14,7 @@ const cssScope = scopePrefix(protoName);
|
|
14
14
|
* Renders as an image if it has a src property,
|
15
15
|
* otherwise falls back to name or nameless slot.
|
16
16
|
*
|
17
|
+
* @slot - Display content if no `src` or `name` provided.
|
17
18
|
* @category display
|
18
19
|
*/
|
19
20
|
@godown(protoName)
|
@@ -43,9 +44,6 @@ const cssScope = scopePrefix(protoName);
|
|
43
44
|
border-radius: inherit;
|
44
45
|
width: 100%;
|
45
46
|
height: 100%;
|
46
|
-
}
|
47
|
-
|
48
|
-
[part="root"] {
|
49
47
|
display: flex;
|
50
48
|
align-items: center;
|
51
49
|
justify-content: center;
|
@@ -58,6 +56,7 @@ class Avatar extends GlobalStyle {
|
|
58
56
|
*/
|
59
57
|
@property()
|
60
58
|
src: string | undefined | null;
|
59
|
+
|
61
60
|
/**
|
62
61
|
* If the image is not available, the {@linkcode Avatar.format} will be displayed.
|
63
62
|
*/
|
package/src/components/breath.ts
CHANGED
@@ -21,6 +21,7 @@ const cssScope = scopePrefix(defineName);
|
|
21
21
|
*
|
22
22
|
* Inspired by Vercel home page (2023).
|
23
23
|
*
|
24
|
+
* @slot - Breathing parts.
|
24
25
|
* @category effect
|
25
26
|
*/
|
26
27
|
@godown(defineName)
|
@@ -91,6 +92,7 @@ class Breath extends GlobalStyle {
|
|
91
92
|
*/
|
92
93
|
@property()
|
93
94
|
text: string | string[];
|
95
|
+
|
94
96
|
/**
|
95
97
|
* Effect duration, ending in s or ms.
|
96
98
|
*/
|
package/src/components/button.ts
CHANGED
@@ -12,8 +12,8 @@ import { cssGlobalVars, GlobalStyle, scopePrefix } from "../core/global-style.js
|
|
12
12
|
const protoName = "button";
|
13
13
|
const cssScope = scopePrefix(protoName);
|
14
14
|
|
15
|
-
const whiteFont = cssGlobalVars.
|
16
|
-
const blackFont = cssGlobalVars.
|
15
|
+
const whiteFont = cssGlobalVars.white;
|
16
|
+
const blackFont = cssGlobalVars.black;
|
17
17
|
|
18
18
|
const colors = constructCSSObject(
|
19
19
|
["color", "background", "gradients"].map((k) => `${cssScope}--${k}`),
|
@@ -21,7 +21,7 @@ const colors = constructCSSObject(
|
|
21
21
|
black: [
|
22
22
|
whiteFont, // color
|
23
23
|
cssGlobalVars._colors.darkgray[7], // background
|
24
|
-
cssGlobalVars._colors.darkgray[
|
24
|
+
cssGlobalVars._colors.darkgray[5], // gradients
|
25
25
|
],
|
26
26
|
gray: [
|
27
27
|
whiteFont, // color
|
@@ -81,7 +81,13 @@ const colors = constructCSSObject(
|
|
81
81
|
/**
|
82
82
|
* {@linkcode Button} renders a button.
|
83
83
|
*
|
84
|
-
*
|
84
|
+
* Create modal animation upon clicking.
|
85
|
+
*
|
86
|
+
* Available colors (background): none, black, gray, white, blue, green, red, orange, pink, purple, yellow, teal.
|
87
|
+
*
|
88
|
+
* Default color is `black`.
|
89
|
+
*
|
90
|
+
* Set the color to `none` to prevent applying styles.
|
85
91
|
*
|
86
92
|
* @category input
|
87
93
|
*/
|
@@ -168,7 +174,7 @@ const colors = constructCSSObject(
|
|
168
174
|
@keyframes kf {
|
169
175
|
0% {
|
170
176
|
transform: scale(0) translate(-50%, -50%);
|
171
|
-
opacity: var(${cssScope}--modal-opacity, 0.
|
177
|
+
opacity: var(${cssScope}--modal-opacity, 0.1);
|
172
178
|
}
|
173
179
|
80% {
|
174
180
|
transform: scale(1) translate(-50%, -50%);
|
@@ -185,46 +191,50 @@ class Button extends GlobalStyle {
|
|
185
191
|
*/
|
186
192
|
@property({ type: Boolean, reflect: true })
|
187
193
|
disabled: boolean;
|
194
|
+
|
188
195
|
/**
|
189
196
|
* Invert font and background color.
|
190
197
|
*/
|
191
198
|
@property({ type: Boolean, reflect: true })
|
192
199
|
ghost: boolean;
|
200
|
+
|
193
201
|
/**
|
194
202
|
* Whether this element is active or not.
|
195
203
|
*/
|
196
204
|
@property({ type: Boolean, reflect: true })
|
197
205
|
active: boolean;
|
206
|
+
|
198
207
|
/**
|
199
208
|
* Enables rounded corners to appear capsule shaped.
|
200
209
|
*/
|
201
210
|
@property({ type: Boolean, reflect: true })
|
202
211
|
round: boolean;
|
212
|
+
|
203
213
|
/**
|
204
214
|
* The primary color.
|
205
215
|
*/
|
206
216
|
@property({ reflect: true })
|
207
217
|
color: "none" | keyof typeof colors = "black";
|
218
|
+
|
208
219
|
/**
|
209
|
-
*
|
220
|
+
* Content text.
|
210
221
|
*/
|
211
222
|
@property()
|
212
|
-
|
223
|
+
content: string;
|
213
224
|
|
214
225
|
@part("modal-root")
|
215
|
-
_modalRoot: HTMLElement;
|
226
|
+
protected _modalRoot: HTMLElement;
|
216
227
|
@part("root")
|
217
|
-
_root: HTMLElement;
|
228
|
+
protected _root: HTMLElement;
|
218
229
|
|
219
230
|
protected render() {
|
220
231
|
const color = this.nextColor();
|
221
|
-
return
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
</div
|
226
|
-
|
227
|
-
];
|
232
|
+
return html`<div part="root">
|
233
|
+
<span part="modal-root"></span>
|
234
|
+
<div part="slot">
|
235
|
+
${[this.content || htmlSlot(), htmlStyle(colors[color])]}
|
236
|
+
</div>
|
237
|
+
</div>`;
|
228
238
|
}
|
229
239
|
|
230
240
|
focus() {
|
package/src/components/card.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { godown } from "@godown/element/decorators/godown.js";
|
2
2
|
import { styles } from "@godown/element/decorators/styles.js";
|
3
3
|
import { htmlSlot } from "@godown/element/directives/html-slot.js";
|
4
|
-
import { css
|
4
|
+
import { css } from "lit";
|
5
5
|
import { property } from "lit/decorators.js";
|
6
6
|
|
7
7
|
import { cssGlobalVars, GlobalStyle, scopePrefix } from "../core/global-style.js";
|
@@ -26,58 +26,53 @@ const cssScope = scopePrefix(protoName);
|
|
26
26
|
@styles(
|
27
27
|
css`
|
28
28
|
:host {
|
29
|
-
${cssScope}--shadow-width: .0375em;
|
30
|
-
${cssScope}--shadow-color: transparent;
|
31
29
|
${cssScope}--background: var(${cssGlobalVars.background});
|
32
|
-
${cssScope}--
|
33
|
-
${cssScope}--
|
34
|
-
${cssScope}--
|
30
|
+
${cssScope}--border-width: .0375em;
|
31
|
+
${cssScope}--border-color: transparent;
|
32
|
+
${cssScope}--border-background: var(${cssGlobalVars.passive});
|
35
33
|
${cssScope}--padding: .75em;
|
36
34
|
color: var(${cssGlobalVars.foreground});
|
37
35
|
background: var(${cssScope}--background);
|
36
|
+
border-width: var(${cssScope}--border-width);
|
38
37
|
display: block;
|
39
38
|
flex-shrink: 0;
|
40
39
|
position: relative;
|
41
40
|
overflow: hidden;
|
42
41
|
box-sizing: border-box;
|
43
|
-
border-radius: 0.25em;
|
44
|
-
transition: box-shadow .1s ease-in-out;
|
45
|
-
}
|
46
|
-
|
47
|
-
:host([shadow="hover"]:hover),
|
48
|
-
:host([shadow="always"]) {
|
49
|
-
${cssScope}--shadow-color: var(${cssScope}--divider-background);
|
50
|
-
box-shadow: inset 0 0 0px var(${cssScope}--shadow-width) var(${cssScope}--shadow-color);
|
51
|
-
}
|
52
|
-
|
53
|
-
[part="divider"] {
|
54
|
-
margin: auto;
|
55
|
-
width: var(${cssScope}--divider-width);
|
56
|
-
height: var(${cssScope}--divider-height);
|
57
|
-
background: var(${cssScope}--divider-background);
|
58
42
|
}
|
59
43
|
|
60
44
|
slot {
|
61
45
|
display: block;
|
62
46
|
padding: var(${cssScope}--padding);
|
63
47
|
}
|
48
|
+
|
49
|
+
:host,
|
50
|
+
slot {
|
51
|
+
border-color: var(${cssScope}--border-background);
|
52
|
+
border-style: solid;
|
53
|
+
}
|
54
|
+
|
55
|
+
[name="footer"]{
|
56
|
+
border-top-width: var(${cssScope}--border-width);
|
57
|
+
}
|
58
|
+
|
59
|
+
[name="header"]{
|
60
|
+
border-bottom-width: var(${cssScope}--border-width);
|
61
|
+
}
|
64
62
|
`,
|
65
63
|
)
|
66
64
|
class Card extends GlobalStyle {
|
67
|
-
@property({ reflect: true })
|
68
|
-
shadow: "none" | "always" | "hover" = "hover";
|
69
|
-
|
70
65
|
@property({ type: Boolean })
|
71
66
|
footer = false;
|
67
|
+
|
72
68
|
@property({ type: Boolean })
|
73
69
|
header = false;
|
74
70
|
|
75
71
|
protected render() {
|
76
|
-
const hr = html`<hr part="divider">`;
|
77
72
|
return [
|
78
|
-
this.header ?
|
73
|
+
this.header ? htmlSlot("header") : "",
|
79
74
|
htmlSlot(),
|
80
|
-
this.footer ?
|
75
|
+
this.footer ? htmlSlot("footer") : "",
|
81
76
|
];
|
82
77
|
}
|
83
78
|
}
|
@@ -22,6 +22,7 @@ const protoName = "carousel";
|
|
22
22
|
*
|
23
23
|
* If no width, it will be the width of the first element.
|
24
24
|
*
|
25
|
+
* @slot - Carousel items, should maintain the same size.
|
25
26
|
* @category display
|
26
27
|
*/
|
27
28
|
@godown(protoName)
|
@@ -76,11 +77,13 @@ class Carousel extends GlobalStyle {
|
|
76
77
|
*/
|
77
78
|
@property({ type: Number })
|
78
79
|
index = 0;
|
80
|
+
|
79
81
|
/**
|
80
82
|
* If autoChange > 0, the rotation will be automated.
|
81
83
|
*/
|
82
84
|
@property({ type: Number })
|
83
85
|
autoChange = 0;
|
86
|
+
|
84
87
|
/**
|
85
88
|
* Element width.
|
86
89
|
*/
|
@@ -88,13 +91,13 @@ class Carousel extends GlobalStyle {
|
|
88
91
|
width: string;
|
89
92
|
|
90
93
|
@part("move-root")
|
91
|
-
_moveRoot: HTMLElement;
|
94
|
+
protected _moveRoot: HTMLElement;
|
92
95
|
|
93
|
-
intervalID: number;
|
96
|
+
protected intervalID: number;
|
94
97
|
|
95
|
-
_cloneFirst: HTMLElement | undefined;
|
98
|
+
private _cloneFirst: HTMLElement | undefined;
|
96
99
|
|
97
|
-
_cloneLast: HTMLElement | undefined;
|
100
|
+
private _cloneLast: HTMLElement | undefined;
|
98
101
|
|
99
102
|
protected render() {
|
100
103
|
return [
|
@@ -15,6 +15,9 @@ const cssScope = scopePrefix(protoName);
|
|
15
15
|
/**
|
16
16
|
* {@linkcode Details} similar to `<details>`.
|
17
17
|
*
|
18
|
+
* @slot summary - Details summary if no `summary` is provided.
|
19
|
+
* @slot - Details content.
|
20
|
+
* @fires change - Fired when the details is toggled.
|
18
21
|
* @category display
|
19
22
|
*/
|
20
23
|
@godown(protoName)
|
@@ -87,6 +90,7 @@ class Details extends SuperOpenable {
|
|
87
90
|
*/
|
88
91
|
@property({ type: Boolean })
|
89
92
|
fill = false;
|
93
|
+
|
90
94
|
/**
|
91
95
|
* Summary text.
|
92
96
|
*/
|
@@ -94,7 +98,7 @@ class Details extends SuperOpenable {
|
|
94
98
|
summary = "";
|
95
99
|
|
96
100
|
@query("dd")
|
97
|
-
_dd: HTMLDataListElement;
|
101
|
+
protected _dd: HTMLDataListElement;
|
98
102
|
|
99
103
|
protected render() {
|
100
104
|
return html`<dl part="root">
|
package/src/components/dialog.ts
CHANGED
@@ -16,7 +16,7 @@ const cssScope = scopePrefix(protoName);
|
|
16
16
|
*
|
17
17
|
* Like dialog, it listens for submit events and closes itself when the target method is "dialog".
|
18
18
|
*
|
19
|
-
* It listens for the keydown event and also closes itself when the {@linkcode key} contained in the key is pressed
|
19
|
+
* It listens for the keydown event and also closes itself when the {@linkcode key} contained in the key is pressed.
|
20
20
|
*
|
21
21
|
* @category feedback
|
22
22
|
*/
|
@@ -87,13 +87,18 @@ const cssScope = scopePrefix(protoName);
|
|
87
87
|
`,
|
88
88
|
)
|
89
89
|
class Dialog extends SuperOpenable {
|
90
|
+
/**
|
91
|
+
* Direction of the opening animation.
|
92
|
+
*/
|
90
93
|
@property()
|
91
94
|
direction: Direction9 = "center";
|
95
|
+
|
92
96
|
/**
|
93
97
|
* Enable modal, blocking event penetration.
|
94
98
|
*/
|
95
99
|
@property({ type: Boolean, reflect: true })
|
96
100
|
modal = false;
|
101
|
+
|
97
102
|
/**
|
98
103
|
* Close key.
|
99
104
|
*/
|
@@ -43,17 +43,18 @@ class Dragbox extends GlobalStyle {
|
|
43
43
|
return this.offsetParent?.clientHeight ?? document.body.offsetHeight;
|
44
44
|
}
|
45
45
|
|
46
|
-
drag: boolean;
|
47
|
-
t: number;
|
48
|
-
l: number;
|
49
|
-
cx: number;
|
50
|
-
cy: number;
|
46
|
+
private drag: boolean;
|
47
|
+
private t: number;
|
48
|
+
private l: number;
|
49
|
+
private cx: number;
|
50
|
+
private cy: number;
|
51
51
|
|
52
52
|
/**
|
53
53
|
* Position x.
|
54
54
|
*/
|
55
55
|
@property()
|
56
56
|
x = "auto";
|
57
|
+
|
57
58
|
/**
|
58
59
|
* Position y.
|
59
60
|
*/
|
@@ -78,8 +79,8 @@ class Dragbox extends GlobalStyle {
|
|
78
79
|
this._handleMouseLeave = this.events.add(document, "mouseleave", this._handleDragEnd.bind(this));
|
79
80
|
}
|
80
81
|
|
81
|
-
_handleMouseMove: EventListenerFunc;
|
82
|
-
_handleMouseLeave: EventListenerFunc;
|
82
|
+
protected _handleMouseMove: EventListenerFunc;
|
83
|
+
protected _handleMouseLeave: EventListenerFunc;
|
83
84
|
|
84
85
|
protected _handleDragEnd() {
|
85
86
|
this.drag = false;
|
package/src/components/flex.ts
CHANGED
@@ -13,6 +13,7 @@ const protoName = "flex";
|
|
13
13
|
/**
|
14
14
|
* {@linkcode Flex} provides flex layout.
|
15
15
|
*
|
16
|
+
* @slot - Flex items.
|
16
17
|
* @category layout
|
17
18
|
*/
|
18
19
|
@godown(protoName)
|
@@ -23,26 +24,30 @@ class Flex extends GlobalStyle {
|
|
23
24
|
*/
|
24
25
|
@property({ attribute: "flex-flow" })
|
25
26
|
flexFlow: string;
|
27
|
+
|
26
28
|
/**
|
27
29
|
* CSS property `gap`.
|
28
30
|
*/
|
29
31
|
@property()
|
30
32
|
gap: string;
|
33
|
+
|
31
34
|
/**
|
32
35
|
* CSS property `justify-content`.
|
33
36
|
*/
|
34
37
|
@property()
|
35
38
|
content: string;
|
39
|
+
|
36
40
|
/**
|
37
41
|
* CSS property `align-items`.
|
38
42
|
*/
|
39
43
|
@property()
|
40
44
|
items: string;
|
45
|
+
|
41
46
|
/**
|
42
47
|
* If true, set flex-direction to "column".
|
43
48
|
*/
|
44
49
|
@property({ type: Boolean })
|
45
|
-
vertical
|
50
|
+
vertical = false;
|
46
51
|
|
47
52
|
protected render() {
|
48
53
|
return [
|
package/src/components/form.ts
CHANGED
@@ -12,8 +12,6 @@ const protoName = "form";
|
|
12
12
|
* {@linkcode Form} Gets child element key-value object,
|
13
13
|
* which will be nested if the child element is the same as this element.
|
14
14
|
*
|
15
|
-
* @slot - Child elements.
|
16
|
-
*
|
17
15
|
* @category form
|
18
16
|
*/
|
19
17
|
@godown(protoName)
|
@@ -27,6 +25,7 @@ const protoName = "form";
|
|
27
25
|
class Form<T = object> extends GlobalStyle {
|
28
26
|
@property()
|
29
27
|
name = "";
|
28
|
+
|
30
29
|
get value(): T {
|
31
30
|
return Form.buildValue(this._slot.assignedElements()) as T;
|
32
31
|
}
|
package/src/components/grid.ts
CHANGED
@@ -14,6 +14,7 @@ const protoName = "grid";
|
|
14
14
|
/**
|
15
15
|
* {@linkcode Grid} provides gird layout.
|
16
16
|
*
|
17
|
+
* @slot - Grid items.
|
17
18
|
* @category layout
|
18
19
|
*/
|
19
20
|
@godown(protoName)
|
@@ -24,21 +25,29 @@ class Grid extends GlobalStyle {
|
|
24
25
|
*/
|
25
26
|
@property()
|
26
27
|
gap: string;
|
28
|
+
|
27
29
|
/**
|
28
|
-
* CSS property `grid-template-columns
|
30
|
+
* CSS property `grid-template-columns`.
|
31
|
+
*
|
32
|
+
* If columns is numerical, divide columns equally.
|
29
33
|
*/
|
30
34
|
@property()
|
31
35
|
columns: string | number;
|
36
|
+
|
32
37
|
/**
|
33
|
-
* CSS property `grid-template-rows
|
38
|
+
* CSS property `grid-template-rows`.
|
39
|
+
*
|
40
|
+
* If rows is numerical, divide rows equally.
|
34
41
|
*/
|
35
42
|
@property()
|
36
43
|
rows: string | number;
|
44
|
+
|
37
45
|
/**
|
38
46
|
* CSS property `place-content` (`align-content justify-content`).
|
39
47
|
*/
|
40
48
|
@property()
|
41
49
|
content: string;
|
50
|
+
|
42
51
|
/**
|
43
52
|
* CSS property `place-items` (`align-items justify-items`).
|
44
53
|
*/
|
package/src/components/input.ts
CHANGED
@@ -11,7 +11,7 @@ import SuperInput from "../core/super-input.js";
|
|
11
11
|
const protoName = "input";
|
12
12
|
|
13
13
|
/**
|
14
|
-
* {@linkcode Input}
|
14
|
+
* {@linkcode Input} renders a text input.
|
15
15
|
*
|
16
16
|
* @category input
|
17
17
|
*/
|
@@ -30,6 +30,7 @@ const protoName = "input";
|
|
30
30
|
)
|
31
31
|
class Input extends SuperInput {
|
32
32
|
type: "text" | "search" | "tel" | "url" | "email" | "password" = "text";
|
33
|
+
|
33
34
|
value: string;
|
34
35
|
|
35
36
|
/**
|
@@ -39,7 +40,7 @@ class Input extends SuperInput {
|
|
39
40
|
variant: "default" | "outline" = "default";
|
40
41
|
|
41
42
|
@part("input")
|
42
|
-
_input: HTMLInputElement;
|
43
|
+
protected _input: HTMLInputElement;
|
43
44
|
|
44
45
|
protected render() {
|
45
46
|
return html`<div part="root" class="${classList("input-field", this.variant)}">
|