@ds-gn/ui 0.0.0-stage → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +155 -2
- package/THIRD_PARTY_NOTICES +167 -0
- package/assets/logo-full-dark.svg +4 -0
- package/assets/logo-full.svg +4 -0
- package/assets/logo-mark.svg +3 -0
- package/custom-elements.json +4696 -0
- package/dist/common/Base/Base.d.ts +22 -0
- package/dist/common/controllers/AuroraMeshController.d.ts +68 -0
- package/dist/common/controllers/AutoRotateController.d.ts +38 -0
- package/dist/common/controllers/BreakpointController.d.ts +30 -0
- package/dist/common/controllers/LayoutChangeController.d.ts +28 -0
- package/dist/common/controllers/WordCycleController.d.ts +36 -0
- package/dist/common/helpers/aurora-mesh.d.ts +11 -0
- package/dist/common/helpers/define-element.d.ts +14 -0
- package/dist/common/helpers/enum-creator.d.ts +2 -0
- package/dist/common/helpers/enum-validator.d.ts +1 -0
- package/dist/common/helpers/layout-change.d.ts +39 -0
- package/dist/common/helpers/layout-change.testing.d.ts +15 -0
- package/dist/common/helpers/logo.string.d.ts +23 -0
- package/dist/common/helpers/logo.string.js +43 -0
- package/dist/common/helpers/logo.utils.d.ts +8 -0
- package/dist/common/helpers/motion.d.ts +9 -0
- package/dist/common/helpers/story.utils.d.ts +32 -0
- package/dist/common/props/surface/surface.props.d.ts +6 -0
- package/dist/components/Background/src/Background.d.ts +44 -0
- package/dist/components/Background/src/Background.js +576 -0
- package/dist/components/Background/src/Background.props.d.ts +20 -0
- package/dist/components/Background/src/Background.props.js +47 -0
- package/dist/components/Background/src/Background.styles.d.ts +3 -0
- package/dist/components/Badge/src/Badge.d.ts +28 -0
- package/dist/components/Badge/src/Badge.js +429 -0
- package/dist/components/Badge/src/Badge.playground.d.ts +2 -0
- package/dist/components/Badge/src/Badge.props.d.ts +16 -0
- package/dist/components/Badge/src/Badge.props.js +44 -0
- package/dist/components/Badge/src/Badge.styles.d.ts +2 -0
- package/dist/components/Button/src/Button.d.ts +138 -0
- package/dist/components/Button/src/Button.js +1102 -0
- package/dist/components/Button/src/Button.playground.d.ts +2 -0
- package/dist/components/Button/src/Button.props.d.ts +47 -0
- package/dist/components/Button/src/Button.props.js +79 -0
- package/dist/components/Button/src/Button.styles.d.ts +11 -0
- package/dist/components/Card/src/Card.d.ts +39 -0
- package/dist/components/Card/src/Card.js +564 -0
- package/dist/components/Card/src/Card.playground.d.ts +2 -0
- package/dist/components/Card/src/Card.props.d.ts +22 -0
- package/dist/components/Card/src/Card.props.js +42 -0
- package/dist/components/Card/src/Card.styles.d.ts +11 -0
- package/dist/components/CodeBlock/src/CodeBlock.d.ts +18 -0
- package/dist/components/CodeBlock/src/CodeBlock.js +372 -0
- package/dist/components/CodeBlock/src/CodeBlock.props.d.ts +1 -0
- package/dist/components/CodeBlock/src/CodeBlock.props.js +5 -0
- package/dist/components/CodeBlock/src/CodeBlock.styles.d.ts +9 -0
- package/dist/components/Container/src/Container.d.ts +26 -0
- package/dist/components/Container/src/Container.js +354 -0
- package/dist/components/Container/src/Container.props.d.ts +20 -0
- package/dist/components/Container/src/Container.props.js +49 -0
- package/dist/components/Container/src/Container.styles.d.ts +2 -0
- package/dist/components/Divider/src/Divider.d.ts +23 -0
- package/dist/components/Divider/src/Divider.js +250 -0
- package/dist/components/Divider/src/Divider.props.d.ts +7 -0
- package/dist/components/Divider/src/Divider.props.js +34 -0
- package/dist/components/Divider/src/Divider.styles.d.ts +2 -0
- package/dist/components/FeatureItem/src/FeatureItem.d.ts +30 -0
- package/dist/components/FeatureItem/src/FeatureItem.js +368 -0
- package/dist/components/FeatureItem/src/FeatureItem.props.d.ts +10 -0
- package/dist/components/FeatureItem/src/FeatureItem.props.js +37 -0
- package/dist/components/FeatureItem/src/FeatureItem.styles.d.ts +3 -0
- package/dist/components/FeatureTabs/src/FeatureTabs.d.ts +48 -0
- package/dist/components/FeatureTabs/src/FeatureTabs.js +1333 -0
- package/dist/components/FeatureTabs/src/FeatureTabs.props.d.ts +27 -0
- package/dist/components/FeatureTabs/src/FeatureTabs.props.js +80 -0
- package/dist/components/FeatureTabs/src/FeatureTabs.styles.d.ts +35 -0
- package/dist/components/Footer/src/Footer.d.ts +39 -0
- package/dist/components/Footer/src/Footer.js +361 -0
- package/dist/components/Footer/src/Footer.styles.d.ts +6 -0
- package/dist/components/FormBlock/src/FormBlock.d.ts +40 -0
- package/dist/components/FormBlock/src/FormBlock.js +476 -0
- package/dist/components/FormBlock/src/FormBlock.props.d.ts +5 -0
- package/dist/components/FormBlock/src/FormBlock.props.js +8 -0
- package/dist/components/FormBlock/src/FormBlock.styles.d.ts +6 -0
- package/dist/components/Grid/src/Grid.d.ts +35 -0
- package/dist/components/Grid/src/Grid.js +381 -0
- package/dist/components/Grid/src/Grid.props.d.ts +28 -0
- package/dist/components/Grid/src/Grid.props.js +57 -0
- package/dist/components/Grid/src/Grid.styles.d.ts +3 -0
- package/dist/components/Heading/src/Heading.d.ts +26 -0
- package/dist/components/Heading/src/Heading.js +755 -0
- package/dist/components/Heading/src/Heading.playground.d.ts +2 -0
- package/dist/components/Heading/src/Heading.props.d.ts +19 -0
- package/dist/components/Heading/src/Heading.props.js +47 -0
- package/dist/components/Heading/src/Heading.styles.d.ts +4 -0
- package/dist/components/HeadingBlock/src/HeadingBlock.d.ts +28 -0
- package/dist/components/HeadingBlock/src/HeadingBlock.js +288 -0
- package/dist/components/HeadingBlock/src/HeadingBlock.playground.d.ts +2 -0
- package/dist/components/HeadingBlock/src/HeadingBlock.props.d.ts +6 -0
- package/dist/components/HeadingBlock/src/HeadingBlock.props.js +33 -0
- package/dist/components/HeadingBlock/src/HeadingBlock.styles.d.ts +2 -0
- package/dist/components/Hero/src/Hero.d.ts +42 -0
- package/dist/components/Hero/src/Hero.js +506 -0
- package/dist/components/Hero/src/Hero.props.d.ts +22 -0
- package/dist/components/Hero/src/Hero.props.js +51 -0
- package/dist/components/Hero/src/Hero.styles.d.ts +10 -0
- package/dist/components/Icon/src/Icon.d.ts +67 -0
- package/dist/components/Icon/src/Icon.js +303 -0
- package/dist/components/Icon/src/Icon.props.d.ts +8 -0
- package/dist/components/Icon/src/Icon.props.js +35 -0
- package/dist/components/Icon/src/Icon.styles.d.ts +3 -0
- package/dist/components/Icon/src/icons/arrow-left.d.ts +1 -0
- package/dist/components/Icon/src/icons/arrow-left.js +6 -0
- package/dist/components/Icon/src/icons/arrow-right.d.ts +1 -0
- package/dist/components/Icon/src/icons/arrow-right.js +6 -0
- package/dist/components/Icon/src/icons/calendar.d.ts +1 -0
- package/dist/components/Icon/src/icons/calendar.js +6 -0
- package/dist/components/Icon/src/icons/check.d.ts +1 -0
- package/dist/components/Icon/src/icons/check.js +6 -0
- package/dist/components/Icon/src/icons/chevron-down.d.ts +1 -0
- package/dist/components/Icon/src/icons/chevron-down.js +6 -0
- package/dist/components/Icon/src/icons/chevron-left.d.ts +1 -0
- package/dist/components/Icon/src/icons/chevron-left.js +6 -0
- package/dist/components/Icon/src/icons/chevron-right.d.ts +1 -0
- package/dist/components/Icon/src/icons/chevron-right.js +6 -0
- package/dist/components/Icon/src/icons/chevron-up.d.ts +1 -0
- package/dist/components/Icon/src/icons/chevron-up.js +6 -0
- package/dist/components/Icon/src/icons/circle-alert.d.ts +1 -0
- package/dist/components/Icon/src/icons/circle-alert.js +6 -0
- package/dist/components/Icon/src/icons/circle-check.d.ts +1 -0
- package/dist/components/Icon/src/icons/circle-check.js +6 -0
- package/dist/components/Icon/src/icons/circle-x.d.ts +1 -0
- package/dist/components/Icon/src/icons/circle-x.js +6 -0
- package/dist/components/Icon/src/icons/copy.d.ts +1 -0
- package/dist/components/Icon/src/icons/copy.js +6 -0
- package/dist/components/Icon/src/icons/download.d.ts +1 -0
- package/dist/components/Icon/src/icons/download.js +6 -0
- package/dist/components/Icon/src/icons/ellipsis-vertical.d.ts +1 -0
- package/dist/components/Icon/src/icons/ellipsis-vertical.js +6 -0
- package/dist/components/Icon/src/icons/ellipsis.d.ts +1 -0
- package/dist/components/Icon/src/icons/ellipsis.js +6 -0
- package/dist/components/Icon/src/icons/external-link.d.ts +1 -0
- package/dist/components/Icon/src/icons/external-link.js +6 -0
- package/dist/components/Icon/src/icons/eye-off.d.ts +1 -0
- package/dist/components/Icon/src/icons/eye-off.js +6 -0
- package/dist/components/Icon/src/icons/eye.d.ts +1 -0
- package/dist/components/Icon/src/icons/eye.js +6 -0
- package/dist/components/Icon/src/icons/icon-names.d.ts +2 -0
- package/dist/components/Icon/src/icons/icon-names.js +36 -0
- package/dist/components/Icon/src/icons/index.d.ts +34 -0
- package/dist/components/Icon/src/icons/index.js +35 -0
- package/dist/components/Icon/src/icons/info.d.ts +1 -0
- package/dist/components/Icon/src/icons/info.js +6 -0
- package/dist/components/Icon/src/icons/loader.d.ts +1 -0
- package/dist/components/Icon/src/icons/loader.js +6 -0
- package/dist/components/Icon/src/icons/mail.d.ts +1 -0
- package/dist/components/Icon/src/icons/mail.js +6 -0
- package/dist/components/Icon/src/icons/menu.d.ts +1 -0
- package/dist/components/Icon/src/icons/menu.js +6 -0
- package/dist/components/Icon/src/icons/minus.d.ts +1 -0
- package/dist/components/Icon/src/icons/minus.js +6 -0
- package/dist/components/Icon/src/icons/pencil.d.ts +1 -0
- package/dist/components/Icon/src/icons/pencil.js +6 -0
- package/dist/components/Icon/src/icons/plus.d.ts +1 -0
- package/dist/components/Icon/src/icons/plus.js +6 -0
- package/dist/components/Icon/src/icons/search.d.ts +1 -0
- package/dist/components/Icon/src/icons/search.js +6 -0
- package/dist/components/Icon/src/icons/settings.d.ts +1 -0
- package/dist/components/Icon/src/icons/settings.js +6 -0
- package/dist/components/Icon/src/icons/trash-2.d.ts +1 -0
- package/dist/components/Icon/src/icons/trash-2.js +6 -0
- package/dist/components/Icon/src/icons/triangle-alert.d.ts +1 -0
- package/dist/components/Icon/src/icons/triangle-alert.js +6 -0
- package/dist/components/Icon/src/icons/upload.d.ts +1 -0
- package/dist/components/Icon/src/icons/upload.js +6 -0
- package/dist/components/Icon/src/icons/user.d.ts +1 -0
- package/dist/components/Icon/src/icons/user.js +6 -0
- package/dist/components/Icon/src/icons/x.d.ts +1 -0
- package/dist/components/Icon/src/icons/x.js +6 -0
- package/dist/components/Image/src/Image.d.ts +76 -0
- package/dist/components/Image/src/Image.js +456 -0
- package/dist/components/Image/src/Image.props.d.ts +35 -0
- package/dist/components/Image/src/Image.props.js +65 -0
- package/dist/components/Image/src/Image.styles.d.ts +4 -0
- package/dist/components/Input/src/Input.d.ts +60 -0
- package/dist/components/Input/src/Input.js +648 -0
- package/dist/components/Input/src/Input.playground.d.ts +2 -0
- package/dist/components/Input/src/Input.props.d.ts +13 -0
- package/dist/components/Input/src/Input.props.js +41 -0
- package/dist/components/Input/src/Input.styles.d.ts +6 -0
- package/dist/components/Modal/src/Modal.d.ts +166 -0
- package/dist/components/Modal/src/Modal.js +1434 -0
- package/dist/components/Modal/src/Modal.playground.d.ts +2 -0
- package/dist/components/Modal/src/Modal.props.d.ts +66 -0
- package/dist/components/Modal/src/Modal.props.js +65 -0
- package/dist/components/Modal/src/Modal.styles.d.ts +29 -0
- package/dist/components/Nav/src/Nav.d.ts +66 -0
- package/dist/components/Nav/src/Nav.js +750 -0
- package/dist/components/Nav/src/Nav.props.d.ts +8 -0
- package/dist/components/Nav/src/Nav.props.js +13 -0
- package/dist/components/Nav/src/Nav.styles.d.ts +10 -0
- package/dist/components/NavDropdownColumn/src/NavDropdownColumn.d.ts +17 -0
- package/dist/components/NavDropdownColumn/src/NavDropdownColumn.js +170 -0
- package/dist/components/NavDropdownColumn/src/NavDropdownColumn.styles.d.ts +1 -0
- package/dist/components/NavLink/src/NavLink.d.ts +191 -0
- package/dist/components/NavLink/src/NavLink.js +1916 -0
- package/dist/components/NavLink/src/NavLink.props.d.ts +38 -0
- package/dist/components/NavLink/src/NavLink.props.js +58 -0
- package/dist/components/NavLink/src/NavLink.styles.d.ts +22 -0
- package/dist/components/Stack/src/Stack.d.ts +30 -0
- package/dist/components/Stack/src/Stack.js +300 -0
- package/dist/components/Stack/src/Stack.props.d.ts +24 -0
- package/dist/components/Stack/src/Stack.props.js +53 -0
- package/dist/components/Stack/src/Stack.styles.d.ts +2 -0
- package/dist/components/Text/src/Text.d.ts +32 -0
- package/dist/components/Text/src/Text.js +327 -0
- package/dist/components/Text/src/Text.props.d.ts +23 -0
- package/dist/components/Text/src/Text.props.js +52 -0
- package/dist/components/Text/src/Text.styles.d.ts +2 -0
- package/dist/playground/types.d.ts +29 -0
- package/dist/playground-manifest.d.ts +6 -0
- package/dist/playground-manifest.js +556 -0
- package/dist/react/Background.d.ts +6 -0
- package/dist/react/Background.js +13 -0
- package/dist/react/Badge.d.ts +6 -0
- package/dist/react/Badge.js +13 -0
- package/dist/react/Button.d.ts +6 -0
- package/dist/react/Button.js +13 -0
- package/dist/react/Card.d.ts +6 -0
- package/dist/react/Card.js +13 -0
- package/dist/react/CodeBlock.d.ts +6 -0
- package/dist/react/CodeBlock.js +13 -0
- package/dist/react/Container.d.ts +6 -0
- package/dist/react/Container.js +13 -0
- package/dist/react/Divider.d.ts +6 -0
- package/dist/react/Divider.js +13 -0
- package/dist/react/FeatureItem.d.ts +6 -0
- package/dist/react/FeatureItem.js +13 -0
- package/dist/react/FeatureTabs.d.ts +6 -0
- package/dist/react/FeatureTabs.js +13 -0
- package/dist/react/Footer.d.ts +6 -0
- package/dist/react/Footer.js +13 -0
- package/dist/react/FormBlock.d.ts +6 -0
- package/dist/react/FormBlock.js +13 -0
- package/dist/react/Grid.d.ts +6 -0
- package/dist/react/Grid.js +13 -0
- package/dist/react/Heading.d.ts +6 -0
- package/dist/react/Heading.js +13 -0
- package/dist/react/HeadingBlock.d.ts +6 -0
- package/dist/react/HeadingBlock.js +13 -0
- package/dist/react/Hero.d.ts +6 -0
- package/dist/react/Hero.js +13 -0
- package/dist/react/Icon.d.ts +6 -0
- package/dist/react/Icon.js +13 -0
- package/dist/react/Image.d.ts +8 -0
- package/dist/react/Image.js +13 -0
- package/dist/react/Input.d.ts +8 -0
- package/dist/react/Input.js +13 -0
- package/dist/react/Modal.d.ts +10 -0
- package/dist/react/Modal.js +17 -0
- package/dist/react/Nav.d.ts +6 -0
- package/dist/react/Nav.js +13 -0
- package/dist/react/NavDropdownColumn.d.ts +6 -0
- package/dist/react/NavDropdownColumn.js +13 -0
- package/dist/react/NavLink.d.ts +8 -0
- package/dist/react/NavLink.js +13 -0
- package/dist/react/Stack.d.ts +6 -0
- package/dist/react/Stack.js +13 -0
- package/dist/react/Text.d.ts +6 -0
- package/dist/react/Text.js +13 -0
- package/dist/react/index.d.ts +24 -0
- package/dist/react/index.js +25 -0
- package/dist/surface/surface.props.js +33 -0
- package/package.json +352 -4
|
@@ -0,0 +1,506 @@
|
|
|
1
|
+
var __legacyDecorateClassTS = function(decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
4
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else
|
|
6
|
+
for (var i = decorators.length - 1;i >= 0; i--)
|
|
7
|
+
if (d = decorators[i])
|
|
8
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
9
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
// components/Hero/src/Hero.ts
|
|
13
|
+
import"../../Container/src/Container.js";
|
|
14
|
+
import"../../FormBlock/src/FormBlock.js";
|
|
15
|
+
import"../../Grid/src/Grid.js";
|
|
16
|
+
import"../../HeadingBlock/src/HeadingBlock.js";
|
|
17
|
+
import { html as html2 } from "lit";
|
|
18
|
+
import { property } from "lit/decorators.js";
|
|
19
|
+
|
|
20
|
+
// common/Base/Base.ts
|
|
21
|
+
import { html, LitElement } from "lit";
|
|
22
|
+
|
|
23
|
+
// common/helpers/define-element.ts
|
|
24
|
+
var defineElement = (tag, ctor) => {
|
|
25
|
+
if (typeof customElements === "undefined")
|
|
26
|
+
return;
|
|
27
|
+
if (!customElements.get(tag))
|
|
28
|
+
customElements.define(tag, ctor);
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
// common/Base/Base.css
|
|
32
|
+
import { css } from "lit";
|
|
33
|
+
var styles = css`/* Base reset in @layer base ensures it comes before utilities in Tailwind v4 cascade
|
|
34
|
+
This prevents the reset from overriding component utility classes */
|
|
35
|
+
@layer base {
|
|
36
|
+
:host {
|
|
37
|
+
display: block;
|
|
38
|
+
box-sizing: border-box;
|
|
39
|
+
line-height: 1.5;
|
|
40
|
+
-webkit-text-size-adjust: 100%;
|
|
41
|
+
tab-size: 4;
|
|
42
|
+
font-family: var(
|
|
43
|
+
--default-font-family,
|
|
44
|
+
var(--font-sans, ui-sans-serif, system-ui, sans-serif)
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
*,
|
|
49
|
+
*::before,
|
|
50
|
+
*::after {
|
|
51
|
+
box-sizing: inherit;
|
|
52
|
+
margin: 0;
|
|
53
|
+
padding: 0;
|
|
54
|
+
border: 0 solid;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
:host h1,
|
|
58
|
+
:host h2,
|
|
59
|
+
:host h3,
|
|
60
|
+
:host h4,
|
|
61
|
+
:host h5,
|
|
62
|
+
:host h6 {
|
|
63
|
+
font-size: inherit;
|
|
64
|
+
font-weight: inherit;
|
|
65
|
+
margin: 0;
|
|
66
|
+
padding: 0;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
`;
|
|
70
|
+
var Base_default = styles;
|
|
71
|
+
|
|
72
|
+
// common/Base/Base.ts
|
|
73
|
+
class Base extends LitElement {
|
|
74
|
+
static styles = Base_default;
|
|
75
|
+
updateTheme(changedProperties, surface) {
|
|
76
|
+
if (changedProperties.has("surface")) {
|
|
77
|
+
if (surface) {
|
|
78
|
+
this.setAttribute("data-theme", surface);
|
|
79
|
+
} else {
|
|
80
|
+
this.removeAttribute("data-theme");
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
emit(name, detail, options = {}) {
|
|
85
|
+
return this.dispatchEvent(new CustomEvent(name, {
|
|
86
|
+
detail,
|
|
87
|
+
bubbles: true,
|
|
88
|
+
composed: true,
|
|
89
|
+
cancelable: options.cancelable ?? false
|
|
90
|
+
}));
|
|
91
|
+
}
|
|
92
|
+
render() {
|
|
93
|
+
return html`<slot></slot>`;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
defineElement("dsgn-base", Base);
|
|
97
|
+
|
|
98
|
+
// common/helpers/enum-validator.ts
|
|
99
|
+
var enumValidator = (propName, enumSet, candidateValue) => {
|
|
100
|
+
if (!enumSet.has(candidateValue)) {
|
|
101
|
+
throw new Error(`Invalid prop ${propName} of value ${candidateValue}. Expected one of: ${Array.from(enumSet).join(", ")}`);
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
// common/helpers/enum-creator.ts
|
|
106
|
+
var enumCreator = (acceptableValues, propName, type, other = {}) => {
|
|
107
|
+
const acceptableValuesSet = new Set(acceptableValues);
|
|
108
|
+
return {
|
|
109
|
+
type,
|
|
110
|
+
hasChanged(newValue, oldValue) {
|
|
111
|
+
if (newValue !== oldValue) {
|
|
112
|
+
enumValidator(propName, acceptableValuesSet, newValue);
|
|
113
|
+
return true;
|
|
114
|
+
}
|
|
115
|
+
return false;
|
|
116
|
+
},
|
|
117
|
+
...other
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
// common/props/surface/surface.props.ts
|
|
122
|
+
var surfaceValues = {
|
|
123
|
+
LIGHT: "light",
|
|
124
|
+
DARK: "dark"
|
|
125
|
+
};
|
|
126
|
+
var surfaceProps = enumCreator(Object.values(surfaceValues), "surface", String, { reflect: true });
|
|
127
|
+
|
|
128
|
+
// components/Hero/src/Hero.ts
|
|
129
|
+
import { containerSizeValues } from "../../Container/src/Container.props.js";
|
|
130
|
+
import {
|
|
131
|
+
gridAlignValues,
|
|
132
|
+
gridColsValues,
|
|
133
|
+
gridGapValues
|
|
134
|
+
} from "../../Grid/src/Grid.props.js";
|
|
135
|
+
|
|
136
|
+
// components/Hero/src/Hero.css
|
|
137
|
+
import { css as css2 } from "lit";
|
|
138
|
+
var styles2 = css2`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
|
|
139
|
+
@layer properties;
|
|
140
|
+
@layer theme {
|
|
141
|
+
:root, :host {
|
|
142
|
+
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
|
|
143
|
+
monospace;
|
|
144
|
+
--color-black: #000;
|
|
145
|
+
--spacing: 0.25rem;
|
|
146
|
+
--text-xs: 0.75rem;
|
|
147
|
+
--text-xs--line-height: calc(1 / 0.75);
|
|
148
|
+
--color-text-tertiary: inherit;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
@layer utilities {
|
|
152
|
+
.absolute {
|
|
153
|
+
position: absolute;
|
|
154
|
+
}
|
|
155
|
+
.relative {
|
|
156
|
+
position: relative;
|
|
157
|
+
}
|
|
158
|
+
.static {
|
|
159
|
+
position: static;
|
|
160
|
+
}
|
|
161
|
+
.inset-0 {
|
|
162
|
+
inset: calc(var(--spacing) * 0);
|
|
163
|
+
}
|
|
164
|
+
.z-10 {
|
|
165
|
+
z-index: 10;
|
|
166
|
+
}
|
|
167
|
+
.z-\\[1\\] {
|
|
168
|
+
z-index: 1;
|
|
169
|
+
}
|
|
170
|
+
.col-1 {
|
|
171
|
+
grid-column: 1;
|
|
172
|
+
}
|
|
173
|
+
.col-2 {
|
|
174
|
+
grid-column: 2;
|
|
175
|
+
}
|
|
176
|
+
.-mx-4 {
|
|
177
|
+
margin-inline: calc(var(--spacing) * -4);
|
|
178
|
+
}
|
|
179
|
+
.mt-14 {
|
|
180
|
+
margin-top: calc(var(--spacing) * 14);
|
|
181
|
+
}
|
|
182
|
+
.flex {
|
|
183
|
+
display: flex;
|
|
184
|
+
}
|
|
185
|
+
.grid {
|
|
186
|
+
display: grid;
|
|
187
|
+
}
|
|
188
|
+
.h-64 {
|
|
189
|
+
height: calc(var(--spacing) * 64);
|
|
190
|
+
}
|
|
191
|
+
.h-full {
|
|
192
|
+
height: 100%;
|
|
193
|
+
}
|
|
194
|
+
.min-h-96 {
|
|
195
|
+
min-height: calc(var(--spacing) * 96);
|
|
196
|
+
}
|
|
197
|
+
.min-h-\\[32rem\\] {
|
|
198
|
+
min-height: 32rem;
|
|
199
|
+
}
|
|
200
|
+
.min-h-\\[40rem\\] {
|
|
201
|
+
min-height: 40rem;
|
|
202
|
+
}
|
|
203
|
+
.min-h-\\[inherit\\] {
|
|
204
|
+
min-height: inherit;
|
|
205
|
+
}
|
|
206
|
+
.min-h-screen {
|
|
207
|
+
min-height: 100vh;
|
|
208
|
+
}
|
|
209
|
+
.w-full {
|
|
210
|
+
width: 100%;
|
|
211
|
+
}
|
|
212
|
+
.flex-col {
|
|
213
|
+
flex-direction: column;
|
|
214
|
+
}
|
|
215
|
+
.flex-wrap {
|
|
216
|
+
flex-wrap: wrap;
|
|
217
|
+
}
|
|
218
|
+
.items-center {
|
|
219
|
+
align-items: center;
|
|
220
|
+
}
|
|
221
|
+
.items-stretch {
|
|
222
|
+
align-items: stretch;
|
|
223
|
+
}
|
|
224
|
+
.justify-center {
|
|
225
|
+
justify-content: center;
|
|
226
|
+
}
|
|
227
|
+
.justify-start {
|
|
228
|
+
justify-content: flex-start;
|
|
229
|
+
}
|
|
230
|
+
.gap-10 {
|
|
231
|
+
gap: calc(var(--spacing) * 10);
|
|
232
|
+
}
|
|
233
|
+
.overflow-hidden {
|
|
234
|
+
overflow: hidden;
|
|
235
|
+
}
|
|
236
|
+
.bg-black\\/50 {
|
|
237
|
+
background-color: color-mix(in srgb, #000 50%, transparent);
|
|
238
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
239
|
+
background-color: color-mix(in oklab, var(--color-black) 50%, transparent);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
.pb-6 {
|
|
243
|
+
padding-bottom: calc(var(--spacing) * 6);
|
|
244
|
+
}
|
|
245
|
+
.font-mono {
|
|
246
|
+
font-family: var(--font-mono);
|
|
247
|
+
}
|
|
248
|
+
.text-xs {
|
|
249
|
+
font-size: var(--text-xs);
|
|
250
|
+
line-height: var(--tw-leading, var(--text-xs--line-height));
|
|
251
|
+
}
|
|
252
|
+
.tracking-\\[0\\.02em\\] {
|
|
253
|
+
--tw-tracking: 0.02em;
|
|
254
|
+
letter-spacing: 0.02em;
|
|
255
|
+
}
|
|
256
|
+
.text-text-tertiary {
|
|
257
|
+
color: var(--color-text-tertiary);
|
|
258
|
+
}
|
|
259
|
+
.uppercase {
|
|
260
|
+
text-transform: uppercase;
|
|
261
|
+
}
|
|
262
|
+
.sm\\:-mx-6 {
|
|
263
|
+
@media (width >= 40rem) {
|
|
264
|
+
margin-inline: calc(var(--spacing) * -6);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
.lg\\:-mx-8 {
|
|
268
|
+
@media (width >= 64rem) {
|
|
269
|
+
margin-inline: calc(var(--spacing) * -8);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
.lg\\:h-auto {
|
|
273
|
+
@media (width >= 64rem) {
|
|
274
|
+
height: auto;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
.lg\\:min-h-\\[inherit\\] {
|
|
278
|
+
@media (width >= 64rem) {
|
|
279
|
+
min-height: inherit;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
.\\[\\&\\>\\*\\]\\:absolute {
|
|
283
|
+
&>* {
|
|
284
|
+
position: absolute;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
.\\[\\&\\>\\*\\]\\:inset-0 {
|
|
288
|
+
&>* {
|
|
289
|
+
inset: calc(var(--spacing) * 0);
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
.\\[\\&\\>\\*\\]\\:h-full {
|
|
293
|
+
&>* {
|
|
294
|
+
height: 100%;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
.\\[\\&\\>\\*\\]\\:w-full {
|
|
298
|
+
&>* {
|
|
299
|
+
width: 100%;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
.\\[\\&\\>\\*\\]\\:object-cover {
|
|
303
|
+
&>* {
|
|
304
|
+
object-fit: cover;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
@property --dsgn-border-sweep-angle {
|
|
309
|
+
syntax: '<angle>';
|
|
310
|
+
inherits: false;
|
|
311
|
+
initial-value: 0deg;
|
|
312
|
+
}
|
|
313
|
+
@property --tw-tracking {
|
|
314
|
+
syntax: "*";
|
|
315
|
+
inherits: false;
|
|
316
|
+
}
|
|
317
|
+
@layer properties {
|
|
318
|
+
@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
|
|
319
|
+
*, ::before, ::after, ::backdrop {
|
|
320
|
+
--tw-tracking: initial;
|
|
321
|
+
--dsgn-border-sweep-angle: 0deg;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
`;
|
|
326
|
+
var Hero_default = styles2;
|
|
327
|
+
|
|
328
|
+
// components/Hero/src/Hero.props.ts
|
|
329
|
+
var heroLayoutValues = {
|
|
330
|
+
ASSET_RIGHT: "asset-right",
|
|
331
|
+
ASSET_LEFT: "asset-left",
|
|
332
|
+
ASSET_BACKGROUND: "asset-background",
|
|
333
|
+
CENTERED: "centered"
|
|
334
|
+
};
|
|
335
|
+
var heroLayoutProps = enumCreator(Object.values(heroLayoutValues), "layout", String, { reflect: true });
|
|
336
|
+
var heroContentAlignValues = {
|
|
337
|
+
START: "start",
|
|
338
|
+
CENTER: "center"
|
|
339
|
+
};
|
|
340
|
+
var heroContentAlignProps = enumCreator(Object.values(heroContentAlignValues), "content-align", String, { attribute: "content-align", reflect: true });
|
|
341
|
+
var heroMinHeightValues = {
|
|
342
|
+
SM: "sm",
|
|
343
|
+
MD: "md",
|
|
344
|
+
LG: "lg",
|
|
345
|
+
FULL: "full"
|
|
346
|
+
};
|
|
347
|
+
var heroMinHeightProps = enumCreator(Object.values(heroMinHeightValues), "min-height", String, { attribute: "min-height", reflect: true });
|
|
348
|
+
|
|
349
|
+
// ../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
350
|
+
function r(e) {
|
|
351
|
+
var t, f, n = "";
|
|
352
|
+
if (typeof e == "string" || typeof e == "number")
|
|
353
|
+
n += e;
|
|
354
|
+
else if (typeof e == "object")
|
|
355
|
+
if (Array.isArray(e)) {
|
|
356
|
+
var o = e.length;
|
|
357
|
+
for (t = 0;t < o; t++)
|
|
358
|
+
e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
|
|
359
|
+
} else
|
|
360
|
+
for (f in e)
|
|
361
|
+
e[f] && (n && (n += " "), n += f);
|
|
362
|
+
return n;
|
|
363
|
+
}
|
|
364
|
+
function clsx() {
|
|
365
|
+
for (var e, t, f = 0, n = "", o = arguments.length;f < o; f++)
|
|
366
|
+
(e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
367
|
+
return n;
|
|
368
|
+
}
|
|
369
|
+
var clsx_default = clsx;
|
|
370
|
+
|
|
371
|
+
// components/Hero/src/Hero.styles.ts
|
|
372
|
+
var minHeightClasses = {
|
|
373
|
+
sm: ["min-h-96"],
|
|
374
|
+
md: ["min-h-[32rem]"],
|
|
375
|
+
lg: ["min-h-[40rem]"],
|
|
376
|
+
full: ["min-h-screen"]
|
|
377
|
+
};
|
|
378
|
+
var wrapperClassNames = (layout, minHeight) => {
|
|
379
|
+
return clsx_default("relative", "w-full", "overflow-hidden", "flex", "flex-col", "justify-center", minHeightClasses[minHeight]);
|
|
380
|
+
};
|
|
381
|
+
var backgroundInnerClassNames = () => {
|
|
382
|
+
return clsx_default("relative", "flex", "items-center", "justify-center", "w-full", "min-h-[inherit]", "z-10");
|
|
383
|
+
};
|
|
384
|
+
var centeredInnerClassNames = () => {
|
|
385
|
+
return clsx_default("flex", "flex-col", "items-stretch", "justify-center", "min-h-[inherit]");
|
|
386
|
+
};
|
|
387
|
+
var assetClassNames = (layout) => {
|
|
388
|
+
if (layout === "asset-background") {
|
|
389
|
+
return clsx_default("absolute", "inset-0", "-mx-4", "sm:-mx-6", "lg:-mx-8");
|
|
390
|
+
}
|
|
391
|
+
return clsx_default("w-full", "h-64", "lg:h-auto", "lg:min-h-[inherit]");
|
|
392
|
+
};
|
|
393
|
+
var assetInnerClassNames = (layout) => {
|
|
394
|
+
return clsx_default("w-full", "h-full", "[&>*]:w-full", "[&>*]:h-full", "[&>*]:object-cover", layout === "asset-background" && "[&>*]:absolute [&>*]:inset-0");
|
|
395
|
+
};
|
|
396
|
+
var overlayClassNames = () => {
|
|
397
|
+
return clsx_default("absolute", "inset-0", "bg-black/50", "z-[1]");
|
|
398
|
+
};
|
|
399
|
+
var featuresClassNames = () => {
|
|
400
|
+
return clsx_default("mt-14", "pb-6", "relative", "z-10");
|
|
401
|
+
};
|
|
402
|
+
var featuresContentClassNames = (layout, contentAlign) => {
|
|
403
|
+
return clsx_default("flex", "gap-10", "flex-wrap", "font-mono", "text-xs", "text-text-tertiary", "tracking-[0.02em]", "uppercase", layout === "centered" && contentAlign === "center" && "justify-center");
|
|
404
|
+
};
|
|
405
|
+
var centeredFormClassNames = (contentAlign) => {
|
|
406
|
+
return clsx_default("flex", "w-full", contentAlign === "center" ? "justify-center" : "justify-start");
|
|
407
|
+
};
|
|
408
|
+
|
|
409
|
+
// components/Hero/src/Hero.ts
|
|
410
|
+
class Hero extends Base {
|
|
411
|
+
constructor() {
|
|
412
|
+
super(...arguments);
|
|
413
|
+
this.surface = surfaceValues.DARK;
|
|
414
|
+
this.layout = heroLayoutValues.ASSET_RIGHT;
|
|
415
|
+
this.minHeight = heroMinHeightValues.MD;
|
|
416
|
+
this.contentAlign = heroContentAlignValues.START;
|
|
417
|
+
}
|
|
418
|
+
static styles = [Base.styles, Hero_default];
|
|
419
|
+
updated(changedProperties) {
|
|
420
|
+
super.updated(changedProperties);
|
|
421
|
+
this.updateTheme(changedProperties, this.surface);
|
|
422
|
+
}
|
|
423
|
+
render() {
|
|
424
|
+
if (this.layout === heroLayoutValues.ASSET_BACKGROUND) {
|
|
425
|
+
return html2`
|
|
426
|
+
<div class="${wrapperClassNames(this.layout, this.minHeight)}">
|
|
427
|
+
<div class="${assetClassNames("asset-background")}">
|
|
428
|
+
<div class="${assetInnerClassNames("asset-background")}">
|
|
429
|
+
<slot name="asset"></slot>
|
|
430
|
+
</div>
|
|
431
|
+
</div>
|
|
432
|
+
<div class="${overlayClassNames()}"></div>
|
|
433
|
+
<dsgn-container size="${containerSizeValues.XXL}">
|
|
434
|
+
<div class="${backgroundInnerClassNames()}">
|
|
435
|
+
<slot name="content"></slot>
|
|
436
|
+
<slot name="form"></slot>
|
|
437
|
+
</div>
|
|
438
|
+
<div class="${featuresClassNames()}">
|
|
439
|
+
<div class="${featuresContentClassNames(this.layout)}">
|
|
440
|
+
<slot name="features"></slot>
|
|
441
|
+
</div>
|
|
442
|
+
</div>
|
|
443
|
+
</dsgn-container>
|
|
444
|
+
</div>
|
|
445
|
+
`;
|
|
446
|
+
}
|
|
447
|
+
if (this.layout === heroLayoutValues.CENTERED) {
|
|
448
|
+
return html2`
|
|
449
|
+
<div class="${wrapperClassNames(this.layout, this.minHeight)}">
|
|
450
|
+
<dsgn-container size="${containerSizeValues.XXL}">
|
|
451
|
+
<div class="${centeredInnerClassNames()}">
|
|
452
|
+
<slot name="content"></slot>
|
|
453
|
+
<div class="${centeredFormClassNames(this.contentAlign)}">
|
|
454
|
+
<slot name="form"></slot>
|
|
455
|
+
</div>
|
|
456
|
+
<div class="${featuresClassNames()}">
|
|
457
|
+
<div
|
|
458
|
+
class="${featuresContentClassNames(this.layout, this.contentAlign)}"
|
|
459
|
+
>
|
|
460
|
+
<slot name="features"></slot>
|
|
461
|
+
</div>
|
|
462
|
+
</div>
|
|
463
|
+
</div>
|
|
464
|
+
</dsgn-container>
|
|
465
|
+
</div>
|
|
466
|
+
`;
|
|
467
|
+
}
|
|
468
|
+
return html2`
|
|
469
|
+
<div class="${wrapperClassNames(this.layout, this.minHeight)}">
|
|
470
|
+
<dsgn-container size="${containerSizeValues.XXL}">
|
|
471
|
+
<dsgn-grid
|
|
472
|
+
.cols=${gridColsValues.EIGHT_FOUR}
|
|
473
|
+
.gap=${gridGapValues.LG}
|
|
474
|
+
.align=${gridAlignValues.CENTER}
|
|
475
|
+
?reverse=${this.layout === heroLayoutValues.ASSET_LEFT}
|
|
476
|
+
>
|
|
477
|
+
<slot name="content" slot="col-1"></slot>
|
|
478
|
+
<slot name="form" slot="col-1"></slot>
|
|
479
|
+
<slot name="asset" slot="col-2"></slot>
|
|
480
|
+
</dsgn-grid>
|
|
481
|
+
<div class="${featuresClassNames()}">
|
|
482
|
+
<div class="${featuresContentClassNames(this.layout)}">
|
|
483
|
+
<slot name="features"></slot>
|
|
484
|
+
</div>
|
|
485
|
+
</div>
|
|
486
|
+
</dsgn-container>
|
|
487
|
+
</div>
|
|
488
|
+
`;
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
__legacyDecorateClassTS([
|
|
492
|
+
property({ ...surfaceProps })
|
|
493
|
+
], Hero.prototype, "surface", undefined);
|
|
494
|
+
__legacyDecorateClassTS([
|
|
495
|
+
property({ ...heroLayoutProps })
|
|
496
|
+
], Hero.prototype, "layout", undefined);
|
|
497
|
+
__legacyDecorateClassTS([
|
|
498
|
+
property({ ...heroMinHeightProps })
|
|
499
|
+
], Hero.prototype, "minHeight", undefined);
|
|
500
|
+
__legacyDecorateClassTS([
|
|
501
|
+
property({ ...heroContentAlignProps })
|
|
502
|
+
], Hero.prototype, "contentAlign", undefined);
|
|
503
|
+
defineElement("dsgn-hero", Hero);
|
|
504
|
+
export {
|
|
505
|
+
Hero
|
|
506
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const heroLayoutValues: {
|
|
2
|
+
readonly ASSET_RIGHT: "asset-right";
|
|
3
|
+
readonly ASSET_LEFT: "asset-left";
|
|
4
|
+
readonly ASSET_BACKGROUND: "asset-background";
|
|
5
|
+
readonly CENTERED: "centered";
|
|
6
|
+
};
|
|
7
|
+
export type HeroLayoutType = (typeof heroLayoutValues)[keyof typeof heroLayoutValues];
|
|
8
|
+
export declare const heroLayoutProps: import("lit").PropertyDeclaration<unknown, unknown>;
|
|
9
|
+
export declare const heroContentAlignValues: {
|
|
10
|
+
readonly START: "start";
|
|
11
|
+
readonly CENTER: "center";
|
|
12
|
+
};
|
|
13
|
+
export type HeroContentAlignType = (typeof heroContentAlignValues)[keyof typeof heroContentAlignValues];
|
|
14
|
+
export declare const heroContentAlignProps: import("lit").PropertyDeclaration<unknown, unknown>;
|
|
15
|
+
export declare const heroMinHeightValues: {
|
|
16
|
+
readonly SM: "sm";
|
|
17
|
+
readonly MD: "md";
|
|
18
|
+
readonly LG: "lg";
|
|
19
|
+
readonly FULL: "full";
|
|
20
|
+
};
|
|
21
|
+
export type HeroMinHeightType = (typeof heroMinHeightValues)[keyof typeof heroMinHeightValues];
|
|
22
|
+
export declare const heroMinHeightProps: import("lit").PropertyDeclaration<unknown, unknown>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// common/helpers/enum-validator.ts
|
|
2
|
+
var enumValidator = (propName, enumSet, candidateValue) => {
|
|
3
|
+
if (!enumSet.has(candidateValue)) {
|
|
4
|
+
throw new Error(`Invalid prop ${propName} of value ${candidateValue}. Expected one of: ${Array.from(enumSet).join(", ")}`);
|
|
5
|
+
}
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
// common/helpers/enum-creator.ts
|
|
9
|
+
var enumCreator = (acceptableValues, propName, type, other = {}) => {
|
|
10
|
+
const acceptableValuesSet = new Set(acceptableValues);
|
|
11
|
+
return {
|
|
12
|
+
type,
|
|
13
|
+
hasChanged(newValue, oldValue) {
|
|
14
|
+
if (newValue !== oldValue) {
|
|
15
|
+
enumValidator(propName, acceptableValuesSet, newValue);
|
|
16
|
+
return true;
|
|
17
|
+
}
|
|
18
|
+
return false;
|
|
19
|
+
},
|
|
20
|
+
...other
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
// components/Hero/src/Hero.props.ts
|
|
25
|
+
var heroLayoutValues = {
|
|
26
|
+
ASSET_RIGHT: "asset-right",
|
|
27
|
+
ASSET_LEFT: "asset-left",
|
|
28
|
+
ASSET_BACKGROUND: "asset-background",
|
|
29
|
+
CENTERED: "centered"
|
|
30
|
+
};
|
|
31
|
+
var heroLayoutProps = enumCreator(Object.values(heroLayoutValues), "layout", String, { reflect: true });
|
|
32
|
+
var heroContentAlignValues = {
|
|
33
|
+
START: "start",
|
|
34
|
+
CENTER: "center"
|
|
35
|
+
};
|
|
36
|
+
var heroContentAlignProps = enumCreator(Object.values(heroContentAlignValues), "content-align", String, { attribute: "content-align", reflect: true });
|
|
37
|
+
var heroMinHeightValues = {
|
|
38
|
+
SM: "sm",
|
|
39
|
+
MD: "md",
|
|
40
|
+
LG: "lg",
|
|
41
|
+
FULL: "full"
|
|
42
|
+
};
|
|
43
|
+
var heroMinHeightProps = enumCreator(Object.values(heroMinHeightValues), "min-height", String, { attribute: "min-height", reflect: true });
|
|
44
|
+
export {
|
|
45
|
+
heroContentAlignProps,
|
|
46
|
+
heroContentAlignValues,
|
|
47
|
+
heroLayoutProps,
|
|
48
|
+
heroLayoutValues,
|
|
49
|
+
heroMinHeightProps,
|
|
50
|
+
heroMinHeightValues
|
|
51
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HeroContentAlignType, HeroLayoutType, HeroMinHeightType } from './Hero.props.js';
|
|
2
|
+
export declare const wrapperClassNames: (layout: HeroLayoutType, minHeight: HeroMinHeightType) => string;
|
|
3
|
+
export declare const backgroundInnerClassNames: () => string;
|
|
4
|
+
export declare const centeredInnerClassNames: () => string;
|
|
5
|
+
export declare const assetClassNames: (layout: HeroLayoutType) => string;
|
|
6
|
+
export declare const assetInnerClassNames: (layout: HeroLayoutType) => string;
|
|
7
|
+
export declare const overlayClassNames: () => string;
|
|
8
|
+
export declare const featuresClassNames: () => string;
|
|
9
|
+
export declare const featuresContentClassNames: (layout?: HeroLayoutType, contentAlign?: HeroContentAlignType) => string;
|
|
10
|
+
export declare const centeredFormClassNames: (contentAlign?: HeroContentAlignType) => string;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import '../../../types/global.d.ts';
|
|
2
|
+
import { Base } from '../../../common/Base/Base.js';
|
|
3
|
+
import { type SurfaceType } from '../../../common/props/surface/surface.props.js';
|
|
4
|
+
import { type CSSResultGroup, type SVGTemplateResult } from 'lit';
|
|
5
|
+
import type { IconSizeType } from './Icon.props.js';
|
|
6
|
+
import type { IconName } from './icons/icon-names.js';
|
|
7
|
+
export declare class Icon extends Base {
|
|
8
|
+
static styles: CSSResultGroup;
|
|
9
|
+
private static _registry;
|
|
10
|
+
/**
|
|
11
|
+
* Register icons for use with the `icon-name` attribute.
|
|
12
|
+
* Call this once at your app entry point with whichever icons you need:
|
|
13
|
+
*
|
|
14
|
+
* import { Icon } from '@ds-gn/ui/icon';
|
|
15
|
+
* import * as allIcons from '@ds-gn/ui/icon/icons';
|
|
16
|
+
* Icon.registerIcons(allIcons);
|
|
17
|
+
*
|
|
18
|
+
* Custom icons work too — any SVGTemplateResult keyed by name:
|
|
19
|
+
*
|
|
20
|
+
* import { svg } from 'lit';
|
|
21
|
+
* Icon.registerIcons({ myIcon: svg`<path d="..."/>` });
|
|
22
|
+
*/
|
|
23
|
+
static registerIcons(registry: Record<string, SVGTemplateResult>): void;
|
|
24
|
+
/**
|
|
25
|
+
* Surface theme variant (light or dark)
|
|
26
|
+
*/
|
|
27
|
+
surface: SurfaceType;
|
|
28
|
+
/**
|
|
29
|
+
* Icon size variant
|
|
30
|
+
* sm = 16px, md = 20px, lg = 24px (default), xl = 32px
|
|
31
|
+
*/
|
|
32
|
+
size: IconSizeType;
|
|
33
|
+
/**
|
|
34
|
+
* SVG template content for the icon.
|
|
35
|
+
* Pass an imported icon definition directly for tree-shakeable usage:
|
|
36
|
+
*
|
|
37
|
+
* import { arrowRight } from '@ds-gn/ui/icon/icons';
|
|
38
|
+
* html`<dsgn-icon .icon=${arrowRight}></dsgn-icon>`
|
|
39
|
+
*/
|
|
40
|
+
icon?: SVGTemplateResult;
|
|
41
|
+
/**
|
|
42
|
+
* Icon name for declarative/SSR/CMS usage.
|
|
43
|
+
* Requires icons to be registered via Icon.registerIcons() at app entry:
|
|
44
|
+
*
|
|
45
|
+
* <dsgn-icon icon-name="arrowRight"></dsgn-icon>
|
|
46
|
+
*/
|
|
47
|
+
iconName: IconName | '';
|
|
48
|
+
/**
|
|
49
|
+
* Accessible label for the icon.
|
|
50
|
+
* When provided, the icon is announced by screen readers.
|
|
51
|
+
* When omitted, the icon is treated as decorative (aria-hidden).
|
|
52
|
+
*/
|
|
53
|
+
label: string;
|
|
54
|
+
willUpdate(changedProperties: Map<string | number | symbol, unknown>): void;
|
|
55
|
+
firstUpdated(): void;
|
|
56
|
+
updated(changedProperties: Map<string | number | symbol, unknown>): void;
|
|
57
|
+
/**
|
|
58
|
+
* Render the icon wrapped in an SVG element with proper sizing,
|
|
59
|
+
* stroke attributes, and accessibility markup.
|
|
60
|
+
*/
|
|
61
|
+
render(): import("lit").TemplateResult<1>;
|
|
62
|
+
}
|
|
63
|
+
declare global {
|
|
64
|
+
interface HTMLElementTagNameMap {
|
|
65
|
+
'dsgn-icon': Icon;
|
|
66
|
+
}
|
|
67
|
+
}
|