@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,564 @@
|
|
|
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/Card/src/Card.ts
|
|
13
|
+
import"../../FeatureItem/src/FeatureItem.js";
|
|
14
|
+
import { html as html2, nothing } from "lit";
|
|
15
|
+
import { property } from "lit/decorators.js";
|
|
16
|
+
|
|
17
|
+
// common/Base/Base.ts
|
|
18
|
+
import { html, LitElement } from "lit";
|
|
19
|
+
|
|
20
|
+
// common/helpers/define-element.ts
|
|
21
|
+
var defineElement = (tag, ctor) => {
|
|
22
|
+
if (typeof customElements === "undefined")
|
|
23
|
+
return;
|
|
24
|
+
if (!customElements.get(tag))
|
|
25
|
+
customElements.define(tag, ctor);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
// common/Base/Base.css
|
|
29
|
+
import { css } from "lit";
|
|
30
|
+
var styles = css`/* Base reset in @layer base ensures it comes before utilities in Tailwind v4 cascade
|
|
31
|
+
This prevents the reset from overriding component utility classes */
|
|
32
|
+
@layer base {
|
|
33
|
+
:host {
|
|
34
|
+
display: block;
|
|
35
|
+
box-sizing: border-box;
|
|
36
|
+
line-height: 1.5;
|
|
37
|
+
-webkit-text-size-adjust: 100%;
|
|
38
|
+
tab-size: 4;
|
|
39
|
+
font-family: var(
|
|
40
|
+
--default-font-family,
|
|
41
|
+
var(--font-sans, ui-sans-serif, system-ui, sans-serif)
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
*,
|
|
46
|
+
*::before,
|
|
47
|
+
*::after {
|
|
48
|
+
box-sizing: inherit;
|
|
49
|
+
margin: 0;
|
|
50
|
+
padding: 0;
|
|
51
|
+
border: 0 solid;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:host h1,
|
|
55
|
+
:host h2,
|
|
56
|
+
:host h3,
|
|
57
|
+
:host h4,
|
|
58
|
+
:host h5,
|
|
59
|
+
:host h6 {
|
|
60
|
+
font-size: inherit;
|
|
61
|
+
font-weight: inherit;
|
|
62
|
+
margin: 0;
|
|
63
|
+
padding: 0;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
`;
|
|
67
|
+
var Base_default = styles;
|
|
68
|
+
|
|
69
|
+
// common/Base/Base.ts
|
|
70
|
+
class Base extends LitElement {
|
|
71
|
+
static styles = Base_default;
|
|
72
|
+
updateTheme(changedProperties, surface) {
|
|
73
|
+
if (changedProperties.has("surface")) {
|
|
74
|
+
if (surface) {
|
|
75
|
+
this.setAttribute("data-theme", surface);
|
|
76
|
+
} else {
|
|
77
|
+
this.removeAttribute("data-theme");
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
emit(name, detail, options = {}) {
|
|
82
|
+
return this.dispatchEvent(new CustomEvent(name, {
|
|
83
|
+
detail,
|
|
84
|
+
bubbles: true,
|
|
85
|
+
composed: true,
|
|
86
|
+
cancelable: options.cancelable ?? false
|
|
87
|
+
}));
|
|
88
|
+
}
|
|
89
|
+
render() {
|
|
90
|
+
return html`<slot></slot>`;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
defineElement("dsgn-base", Base);
|
|
94
|
+
|
|
95
|
+
// common/helpers/enum-validator.ts
|
|
96
|
+
var enumValidator = (propName, enumSet, candidateValue) => {
|
|
97
|
+
if (!enumSet.has(candidateValue)) {
|
|
98
|
+
throw new Error(`Invalid prop ${propName} of value ${candidateValue}. Expected one of: ${Array.from(enumSet).join(", ")}`);
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
// common/helpers/enum-creator.ts
|
|
103
|
+
var enumCreator = (acceptableValues, propName, type, other = {}) => {
|
|
104
|
+
const acceptableValuesSet = new Set(acceptableValues);
|
|
105
|
+
return {
|
|
106
|
+
type,
|
|
107
|
+
hasChanged(newValue, oldValue) {
|
|
108
|
+
if (newValue !== oldValue) {
|
|
109
|
+
enumValidator(propName, acceptableValuesSet, newValue);
|
|
110
|
+
return true;
|
|
111
|
+
}
|
|
112
|
+
return false;
|
|
113
|
+
},
|
|
114
|
+
...other
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
// common/props/surface/surface.props.ts
|
|
119
|
+
var surfaceValues = {
|
|
120
|
+
LIGHT: "light",
|
|
121
|
+
DARK: "dark"
|
|
122
|
+
};
|
|
123
|
+
var surfaceProps = enumCreator(Object.values(surfaceValues), "surface", String, { reflect: true });
|
|
124
|
+
|
|
125
|
+
// components/Card/src/Card.css
|
|
126
|
+
import { css as css2 } from "lit";
|
|
127
|
+
var styles2 = css2`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
|
|
128
|
+
@layer properties;
|
|
129
|
+
@layer theme {
|
|
130
|
+
:root, :host {
|
|
131
|
+
--font-sans: ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
|
|
132
|
+
'Noto Color Emoji';
|
|
133
|
+
--spacing: 0.25rem;
|
|
134
|
+
--text-sm: 0.875rem;
|
|
135
|
+
--text-sm--line-height: calc(1.25 / 0.875);
|
|
136
|
+
--radius-xl: 0.75rem;
|
|
137
|
+
--default-transition-duration: 150ms;
|
|
138
|
+
--default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
139
|
+
--color-card-bg: inherit;
|
|
140
|
+
--color-card-border: inherit;
|
|
141
|
+
--color-surface-default: inherit;
|
|
142
|
+
--color-text-primary: inherit;
|
|
143
|
+
--color-text-secondary: inherit;
|
|
144
|
+
--shadow-card: inherit;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
@layer utilities {
|
|
148
|
+
.static {
|
|
149
|
+
position: static;
|
|
150
|
+
}
|
|
151
|
+
.-mx-\\[1\\.5rem\\] {
|
|
152
|
+
margin-inline: calc(1.5rem * -1);
|
|
153
|
+
}
|
|
154
|
+
.-mx-\\[1rem\\] {
|
|
155
|
+
margin-inline: calc(1rem * -1);
|
|
156
|
+
}
|
|
157
|
+
.-mx-\\[2rem\\] {
|
|
158
|
+
margin-inline: calc(2rem * -1);
|
|
159
|
+
}
|
|
160
|
+
.-mt-\\[1\\.5rem\\] {
|
|
161
|
+
margin-top: calc(1.5rem * -1);
|
|
162
|
+
}
|
|
163
|
+
.-mt-\\[1rem\\] {
|
|
164
|
+
margin-top: calc(1rem * -1);
|
|
165
|
+
}
|
|
166
|
+
.-mt-\\[2rem\\] {
|
|
167
|
+
margin-top: calc(2rem * -1);
|
|
168
|
+
}
|
|
169
|
+
.mt-1 {
|
|
170
|
+
margin-top: calc(var(--spacing) * 1);
|
|
171
|
+
}
|
|
172
|
+
.mt-6 {
|
|
173
|
+
margin-top: calc(var(--spacing) * 6);
|
|
174
|
+
}
|
|
175
|
+
.mb-4 {
|
|
176
|
+
margin-bottom: calc(var(--spacing) * 4);
|
|
177
|
+
}
|
|
178
|
+
.ml-16 {
|
|
179
|
+
margin-left: calc(var(--spacing) * 16);
|
|
180
|
+
}
|
|
181
|
+
.box-border {
|
|
182
|
+
box-sizing: border-box;
|
|
183
|
+
}
|
|
184
|
+
.block {
|
|
185
|
+
display: block;
|
|
186
|
+
}
|
|
187
|
+
.flex {
|
|
188
|
+
display: flex;
|
|
189
|
+
}
|
|
190
|
+
.w-\\[calc\\(100\\%\\+2\\*1\\.5rem\\)\\] {
|
|
191
|
+
width: calc(100% + 2 * 1.5rem);
|
|
192
|
+
}
|
|
193
|
+
.w-\\[calc\\(100\\%\\+2\\*1rem\\)\\] {
|
|
194
|
+
width: calc(100% + 2 * 1rem);
|
|
195
|
+
}
|
|
196
|
+
.w-\\[calc\\(100\\%\\+2\\*2rem\\)\\] {
|
|
197
|
+
width: calc(100% + 2 * 2rem);
|
|
198
|
+
}
|
|
199
|
+
.list-disc {
|
|
200
|
+
list-style-type: disc;
|
|
201
|
+
}
|
|
202
|
+
.flex-col {
|
|
203
|
+
flex-direction: column;
|
|
204
|
+
}
|
|
205
|
+
.gap-1 {
|
|
206
|
+
gap: calc(var(--spacing) * 1);
|
|
207
|
+
}
|
|
208
|
+
.gap-5 {
|
|
209
|
+
gap: calc(var(--spacing) * 5);
|
|
210
|
+
}
|
|
211
|
+
.overflow-hidden {
|
|
212
|
+
overflow: hidden;
|
|
213
|
+
}
|
|
214
|
+
.rounded-xl {
|
|
215
|
+
border-radius: var(--radius-xl);
|
|
216
|
+
}
|
|
217
|
+
.border {
|
|
218
|
+
border-style: var(--tw-border-style);
|
|
219
|
+
border-width: 1px;
|
|
220
|
+
}
|
|
221
|
+
.border-t {
|
|
222
|
+
border-top-style: var(--tw-border-style);
|
|
223
|
+
border-top-width: 1px;
|
|
224
|
+
}
|
|
225
|
+
.border-card-border {
|
|
226
|
+
border-color: var(--color-card-border);
|
|
227
|
+
}
|
|
228
|
+
.bg-card-bg {
|
|
229
|
+
background-color: var(--color-card-bg);
|
|
230
|
+
}
|
|
231
|
+
.bg-surface-default {
|
|
232
|
+
background-color: var(--color-surface-default);
|
|
233
|
+
}
|
|
234
|
+
.bg-transparent {
|
|
235
|
+
background-color: transparent;
|
|
236
|
+
}
|
|
237
|
+
.p-0 {
|
|
238
|
+
padding: calc(var(--spacing) * 0);
|
|
239
|
+
}
|
|
240
|
+
.p-4 {
|
|
241
|
+
padding: calc(var(--spacing) * 4);
|
|
242
|
+
}
|
|
243
|
+
.p-6 {
|
|
244
|
+
padding: calc(var(--spacing) * 6);
|
|
245
|
+
}
|
|
246
|
+
.p-8 {
|
|
247
|
+
padding: calc(var(--spacing) * 8);
|
|
248
|
+
}
|
|
249
|
+
.pt-4 {
|
|
250
|
+
padding-top: calc(var(--spacing) * 4);
|
|
251
|
+
}
|
|
252
|
+
.pb-4 {
|
|
253
|
+
padding-bottom: calc(var(--spacing) * 4);
|
|
254
|
+
}
|
|
255
|
+
.font-sans {
|
|
256
|
+
font-family: var(--font-sans);
|
|
257
|
+
}
|
|
258
|
+
.text-sm {
|
|
259
|
+
font-size: var(--text-sm);
|
|
260
|
+
line-height: var(--tw-leading, var(--text-sm--line-height));
|
|
261
|
+
}
|
|
262
|
+
.text-text-primary {
|
|
263
|
+
color: var(--color-text-primary);
|
|
264
|
+
}
|
|
265
|
+
.text-text-secondary {
|
|
266
|
+
color: var(--color-text-secondary);
|
|
267
|
+
}
|
|
268
|
+
.shadow-card {
|
|
269
|
+
--tw-shadow: inherit;
|
|
270
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
271
|
+
}
|
|
272
|
+
.\\[box-shadow\\:var\\(--shadow-card\\)\\] {
|
|
273
|
+
box-shadow: var(--shadow-card);
|
|
274
|
+
}
|
|
275
|
+
.transition-shadow {
|
|
276
|
+
transition-property: box-shadow;
|
|
277
|
+
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
278
|
+
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
279
|
+
}
|
|
280
|
+
.duration-300 {
|
|
281
|
+
--tw-duration: 300ms;
|
|
282
|
+
transition-duration: 300ms;
|
|
283
|
+
}
|
|
284
|
+
.hover\\:shadow-card {
|
|
285
|
+
&:hover {
|
|
286
|
+
@media (hover: hover) {
|
|
287
|
+
--tw-shadow: inherit;
|
|
288
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
.hover\\:\\[box-shadow\\:var\\(--shadow-card\\)\\] {
|
|
293
|
+
&:hover {
|
|
294
|
+
@media (hover: hover) {
|
|
295
|
+
box-shadow: var(--shadow-card);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
@property --dsgn-border-sweep-angle {
|
|
301
|
+
syntax: '<angle>';
|
|
302
|
+
inherits: false;
|
|
303
|
+
initial-value: 0deg;
|
|
304
|
+
}
|
|
305
|
+
@property --tw-border-style {
|
|
306
|
+
syntax: "*";
|
|
307
|
+
inherits: false;
|
|
308
|
+
initial-value: solid;
|
|
309
|
+
}
|
|
310
|
+
@property --tw-shadow {
|
|
311
|
+
syntax: "*";
|
|
312
|
+
inherits: false;
|
|
313
|
+
initial-value: 0 0 #0000;
|
|
314
|
+
}
|
|
315
|
+
@property --tw-shadow-color {
|
|
316
|
+
syntax: "*";
|
|
317
|
+
inherits: false;
|
|
318
|
+
}
|
|
319
|
+
@property --tw-shadow-alpha {
|
|
320
|
+
syntax: "<percentage>";
|
|
321
|
+
inherits: false;
|
|
322
|
+
initial-value: 100%;
|
|
323
|
+
}
|
|
324
|
+
@property --tw-inset-shadow {
|
|
325
|
+
syntax: "*";
|
|
326
|
+
inherits: false;
|
|
327
|
+
initial-value: 0 0 #0000;
|
|
328
|
+
}
|
|
329
|
+
@property --tw-inset-shadow-color {
|
|
330
|
+
syntax: "*";
|
|
331
|
+
inherits: false;
|
|
332
|
+
}
|
|
333
|
+
@property --tw-inset-shadow-alpha {
|
|
334
|
+
syntax: "<percentage>";
|
|
335
|
+
inherits: false;
|
|
336
|
+
initial-value: 100%;
|
|
337
|
+
}
|
|
338
|
+
@property --tw-ring-color {
|
|
339
|
+
syntax: "*";
|
|
340
|
+
inherits: false;
|
|
341
|
+
}
|
|
342
|
+
@property --tw-ring-shadow {
|
|
343
|
+
syntax: "*";
|
|
344
|
+
inherits: false;
|
|
345
|
+
initial-value: 0 0 #0000;
|
|
346
|
+
}
|
|
347
|
+
@property --tw-inset-ring-color {
|
|
348
|
+
syntax: "*";
|
|
349
|
+
inherits: false;
|
|
350
|
+
}
|
|
351
|
+
@property --tw-inset-ring-shadow {
|
|
352
|
+
syntax: "*";
|
|
353
|
+
inherits: false;
|
|
354
|
+
initial-value: 0 0 #0000;
|
|
355
|
+
}
|
|
356
|
+
@property --tw-ring-inset {
|
|
357
|
+
syntax: "*";
|
|
358
|
+
inherits: false;
|
|
359
|
+
}
|
|
360
|
+
@property --tw-ring-offset-width {
|
|
361
|
+
syntax: "<length>";
|
|
362
|
+
inherits: false;
|
|
363
|
+
initial-value: 0px;
|
|
364
|
+
}
|
|
365
|
+
@property --tw-ring-offset-color {
|
|
366
|
+
syntax: "*";
|
|
367
|
+
inherits: false;
|
|
368
|
+
initial-value: #fff;
|
|
369
|
+
}
|
|
370
|
+
@property --tw-ring-offset-shadow {
|
|
371
|
+
syntax: "*";
|
|
372
|
+
inherits: false;
|
|
373
|
+
initial-value: 0 0 #0000;
|
|
374
|
+
}
|
|
375
|
+
@property --tw-duration {
|
|
376
|
+
syntax: "*";
|
|
377
|
+
inherits: false;
|
|
378
|
+
}
|
|
379
|
+
@layer properties {
|
|
380
|
+
@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
|
|
381
|
+
*, ::before, ::after, ::backdrop {
|
|
382
|
+
--tw-border-style: solid;
|
|
383
|
+
--tw-shadow: 0 0 #0000;
|
|
384
|
+
--tw-shadow-color: initial;
|
|
385
|
+
--tw-shadow-alpha: 100%;
|
|
386
|
+
--tw-inset-shadow: 0 0 #0000;
|
|
387
|
+
--tw-inset-shadow-color: initial;
|
|
388
|
+
--tw-inset-shadow-alpha: 100%;
|
|
389
|
+
--tw-ring-color: initial;
|
|
390
|
+
--tw-ring-shadow: 0 0 #0000;
|
|
391
|
+
--tw-inset-ring-color: initial;
|
|
392
|
+
--tw-inset-ring-shadow: 0 0 #0000;
|
|
393
|
+
--tw-ring-inset: initial;
|
|
394
|
+
--tw-ring-offset-width: 0px;
|
|
395
|
+
--tw-ring-offset-color: #fff;
|
|
396
|
+
--tw-ring-offset-shadow: 0 0 #0000;
|
|
397
|
+
--tw-duration: initial;
|
|
398
|
+
--dsgn-border-sweep-angle: 0deg;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
`;
|
|
403
|
+
var Card_default = styles2;
|
|
404
|
+
|
|
405
|
+
// components/Card/src/Card.props.ts
|
|
406
|
+
var cardVariantValues = {
|
|
407
|
+
ELEVATED: "elevated",
|
|
408
|
+
OUTLINED: "outlined"
|
|
409
|
+
};
|
|
410
|
+
var cardVariantProps = enumCreator(Object.values(cardVariantValues), "variant", String, { reflect: true });
|
|
411
|
+
var cardPaddingValues = {
|
|
412
|
+
NONE: "none",
|
|
413
|
+
SM: "sm",
|
|
414
|
+
MD: "md",
|
|
415
|
+
LG: "lg"
|
|
416
|
+
};
|
|
417
|
+
var cardPaddingProps = enumCreator(Object.values(cardPaddingValues), "padding", String, { reflect: true });
|
|
418
|
+
|
|
419
|
+
// ../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
420
|
+
function r(e) {
|
|
421
|
+
var t, f, n = "";
|
|
422
|
+
if (typeof e == "string" || typeof e == "number")
|
|
423
|
+
n += e;
|
|
424
|
+
else if (typeof e == "object")
|
|
425
|
+
if (Array.isArray(e)) {
|
|
426
|
+
var o = e.length;
|
|
427
|
+
for (t = 0;t < o; t++)
|
|
428
|
+
e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
|
|
429
|
+
} else
|
|
430
|
+
for (f in e)
|
|
431
|
+
e[f] && (n && (n += " "), n += f);
|
|
432
|
+
return n;
|
|
433
|
+
}
|
|
434
|
+
function clsx() {
|
|
435
|
+
for (var e, t, f = 0, n = "", o = arguments.length;f < o; f++)
|
|
436
|
+
(e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
437
|
+
return n;
|
|
438
|
+
}
|
|
439
|
+
var clsx_default = clsx;
|
|
440
|
+
|
|
441
|
+
// components/Card/src/Card.styles.ts
|
|
442
|
+
var baseClasses = [
|
|
443
|
+
"box-border",
|
|
444
|
+
"bg-card-bg",
|
|
445
|
+
"rounded-xl",
|
|
446
|
+
"text-text-primary",
|
|
447
|
+
"overflow-hidden",
|
|
448
|
+
"font-sans",
|
|
449
|
+
"transition-shadow",
|
|
450
|
+
"duration-300",
|
|
451
|
+
"bg-surface-default"
|
|
452
|
+
];
|
|
453
|
+
var variantClasses = {
|
|
454
|
+
[cardVariantValues.ELEVATED]: ["[box-shadow:var(--shadow-card)]"],
|
|
455
|
+
[cardVariantValues.OUTLINED]: [
|
|
456
|
+
"bg-transparent",
|
|
457
|
+
"border",
|
|
458
|
+
"border-card-border",
|
|
459
|
+
"hover:[box-shadow:var(--shadow-card)]"
|
|
460
|
+
]
|
|
461
|
+
};
|
|
462
|
+
var paddingClasses = {
|
|
463
|
+
[cardPaddingValues.NONE]: ["p-0"],
|
|
464
|
+
[cardPaddingValues.SM]: ["p-4"],
|
|
465
|
+
[cardPaddingValues.MD]: ["p-6"],
|
|
466
|
+
[cardPaddingValues.LG]: ["p-8"]
|
|
467
|
+
};
|
|
468
|
+
var mediaBleedClasses = {
|
|
469
|
+
[cardPaddingValues.NONE]: [],
|
|
470
|
+
[cardPaddingValues.SM]: ["-mt-[1rem]", "-mx-[1rem]", "w-[calc(100%+2*1rem)]"],
|
|
471
|
+
[cardPaddingValues.MD]: [
|
|
472
|
+
"-mt-[1.5rem]",
|
|
473
|
+
"-mx-[1.5rem]",
|
|
474
|
+
"w-[calc(100%+2*1.5rem)]"
|
|
475
|
+
],
|
|
476
|
+
[cardPaddingValues.LG]: ["-mt-[2rem]", "-mx-[2rem]", "w-[calc(100%+2*2rem)]"]
|
|
477
|
+
};
|
|
478
|
+
var classNames = (variant, padding) => clsx_default(baseClasses, variantClasses[variant], paddingClasses[padding]);
|
|
479
|
+
var mediaWrapperClasses = (padding) => clsx_default("block", "mb-4", "overflow-hidden", mediaBleedClasses[padding]);
|
|
480
|
+
var badgeClasses = () => clsx_default("block", "pb-4");
|
|
481
|
+
var headerClasses = () => clsx_default("block", "mb-4");
|
|
482
|
+
var bodyWrapperClasses = () => clsx_default("block");
|
|
483
|
+
var featuresClasses = () => clsx_default("flex", "flex-col", "gap-5", "mb-4");
|
|
484
|
+
var featureRowClasses = () => clsx_default("flex", "flex-col", "gap-1");
|
|
485
|
+
var bulletsClasses = () => clsx_default("flex", "flex-col", "gap-1", "mt-1", "ml-16");
|
|
486
|
+
var bulletItemClasses = () => clsx_default("text-sm", "text-text-secondary", "list-disc");
|
|
487
|
+
var footerWrapperClasses = () => clsx_default("block", "mt-6", "pt-4", "border-t", "border-card-border");
|
|
488
|
+
|
|
489
|
+
// components/Card/src/Card.ts
|
|
490
|
+
class Card extends Base {
|
|
491
|
+
constructor() {
|
|
492
|
+
super(...arguments);
|
|
493
|
+
this.surface = surfaceValues.LIGHT;
|
|
494
|
+
this.variant = cardVariantValues.OUTLINED;
|
|
495
|
+
this.padding = cardPaddingValues.MD;
|
|
496
|
+
this.features = [];
|
|
497
|
+
}
|
|
498
|
+
static styles = [Base.styles, Card_default];
|
|
499
|
+
get #hasBadge() {
|
|
500
|
+
return !!this.querySelector('[slot="badge"]');
|
|
501
|
+
}
|
|
502
|
+
get #hasHeading() {
|
|
503
|
+
return !!this.querySelector('[slot="heading"]');
|
|
504
|
+
}
|
|
505
|
+
#renderBadge() {
|
|
506
|
+
return this.#hasBadge ? html2`<div class="${badgeClasses()}"><slot name="badge"></slot></div>` : nothing;
|
|
507
|
+
}
|
|
508
|
+
#renderHeading() {
|
|
509
|
+
return this.#hasHeading ? html2`<div class="${headerClasses()}">
|
|
510
|
+
<slot name="heading"></slot>
|
|
511
|
+
</div>` : nothing;
|
|
512
|
+
}
|
|
513
|
+
#renderFeatures() {
|
|
514
|
+
return this.features.length > 0 ? html2`<div class="${featuresClasses()}">
|
|
515
|
+
${this.features.map((feature) => html2`<div class="${featureRowClasses()}">
|
|
516
|
+
<dsgn-feature-item
|
|
517
|
+
.variant=${feature.variant}
|
|
518
|
+
.icon=${feature.icon}
|
|
519
|
+
.surface=${this.surface}
|
|
520
|
+
>${feature.label}</dsgn-feature-item
|
|
521
|
+
>
|
|
522
|
+
${feature.bullets?.length ? html2`<ul class="${bulletsClasses()}">
|
|
523
|
+
${feature.bullets.map((bullet) => html2`<li class="${bulletItemClasses()}">
|
|
524
|
+
${bullet}
|
|
525
|
+
</li>`)}
|
|
526
|
+
</ul>` : nothing}
|
|
527
|
+
</div>`)}
|
|
528
|
+
</div>` : nothing;
|
|
529
|
+
}
|
|
530
|
+
updated(changedProperties) {
|
|
531
|
+
super.updated(changedProperties);
|
|
532
|
+
this.updateTheme(changedProperties, this.surface);
|
|
533
|
+
}
|
|
534
|
+
render() {
|
|
535
|
+
return html2`
|
|
536
|
+
<article class="${classNames(this.variant, this.padding)}">
|
|
537
|
+
<div class="${mediaWrapperClasses(this.padding)}">
|
|
538
|
+
<slot name="media"></slot>
|
|
539
|
+
</div>
|
|
540
|
+
${this.#renderBadge()} ${this.#renderHeading()}
|
|
541
|
+
<div class="${bodyWrapperClasses()}">${this.#renderFeatures()}</div>
|
|
542
|
+
<div class="${footerWrapperClasses()}">
|
|
543
|
+
<slot name="footer"></slot>
|
|
544
|
+
</div>
|
|
545
|
+
</article>
|
|
546
|
+
`;
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
__legacyDecorateClassTS([
|
|
550
|
+
property({ ...surfaceProps })
|
|
551
|
+
], Card.prototype, "surface", undefined);
|
|
552
|
+
__legacyDecorateClassTS([
|
|
553
|
+
property({ ...cardVariantProps })
|
|
554
|
+
], Card.prototype, "variant", undefined);
|
|
555
|
+
__legacyDecorateClassTS([
|
|
556
|
+
property({ ...cardPaddingProps })
|
|
557
|
+
], Card.prototype, "padding", undefined);
|
|
558
|
+
__legacyDecorateClassTS([
|
|
559
|
+
property({ attribute: false })
|
|
560
|
+
], Card.prototype, "features", undefined);
|
|
561
|
+
defineElement("dsgn-card", Card);
|
|
562
|
+
export {
|
|
563
|
+
Card
|
|
564
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { SVGTemplateResult } from 'lit';
|
|
2
|
+
import type { FeatureItemVariantType } from '../../FeatureItem/src/FeatureItem.props.js';
|
|
3
|
+
export interface CardFeature {
|
|
4
|
+
label: string;
|
|
5
|
+
variant: FeatureItemVariantType;
|
|
6
|
+
icon?: SVGTemplateResult;
|
|
7
|
+
bullets?: string[];
|
|
8
|
+
}
|
|
9
|
+
export declare const cardVariantValues: {
|
|
10
|
+
readonly ELEVATED: "elevated";
|
|
11
|
+
readonly OUTLINED: "outlined";
|
|
12
|
+
};
|
|
13
|
+
export type CardVariantType = (typeof cardVariantValues)[keyof typeof cardVariantValues];
|
|
14
|
+
export declare const cardVariantProps: import("lit").PropertyDeclaration<unknown, unknown>;
|
|
15
|
+
export declare const cardPaddingValues: {
|
|
16
|
+
readonly NONE: "none";
|
|
17
|
+
readonly SM: "sm";
|
|
18
|
+
readonly MD: "md";
|
|
19
|
+
readonly LG: "lg";
|
|
20
|
+
};
|
|
21
|
+
export type CardPaddingType = (typeof cardPaddingValues)[keyof typeof cardPaddingValues];
|
|
22
|
+
export declare const cardPaddingProps: import("lit").PropertyDeclaration<unknown, unknown>;
|
|
@@ -0,0 +1,42 @@
|
|
|
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/Card/src/Card.props.ts
|
|
25
|
+
var cardVariantValues = {
|
|
26
|
+
ELEVATED: "elevated",
|
|
27
|
+
OUTLINED: "outlined"
|
|
28
|
+
};
|
|
29
|
+
var cardVariantProps = enumCreator(Object.values(cardVariantValues), "variant", String, { reflect: true });
|
|
30
|
+
var cardPaddingValues = {
|
|
31
|
+
NONE: "none",
|
|
32
|
+
SM: "sm",
|
|
33
|
+
MD: "md",
|
|
34
|
+
LG: "lg"
|
|
35
|
+
};
|
|
36
|
+
var cardPaddingProps = enumCreator(Object.values(cardPaddingValues), "padding", String, { reflect: true });
|
|
37
|
+
export {
|
|
38
|
+
cardPaddingProps,
|
|
39
|
+
cardPaddingValues,
|
|
40
|
+
cardVariantProps,
|
|
41
|
+
cardVariantValues
|
|
42
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type CardPaddingType, type CardVariantType } from './Card.props.js';
|
|
2
|
+
export declare const classNames: (variant: CardVariantType, padding: CardPaddingType) => string;
|
|
3
|
+
export declare const mediaWrapperClasses: (padding: CardPaddingType) => string;
|
|
4
|
+
export declare const badgeClasses: () => string;
|
|
5
|
+
export declare const headerClasses: () => string;
|
|
6
|
+
export declare const bodyWrapperClasses: () => string;
|
|
7
|
+
export declare const featuresClasses: () => string;
|
|
8
|
+
export declare const featureRowClasses: () => string;
|
|
9
|
+
export declare const bulletsClasses: () => string;
|
|
10
|
+
export declare const bulletItemClasses: () => string;
|
|
11
|
+
export declare const footerWrapperClasses: () => string;
|
|
@@ -0,0 +1,18 @@
|
|
|
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 } from 'lit';
|
|
5
|
+
export declare class CodeBlock extends Base {
|
|
6
|
+
static styles: CSSResultGroup;
|
|
7
|
+
surface: SurfaceType;
|
|
8
|
+
command: string;
|
|
9
|
+
output: string;
|
|
10
|
+
path: string;
|
|
11
|
+
updated(changedProperties: Map<string | number | symbol, unknown>): void;
|
|
12
|
+
render(): import("lit").TemplateResult<1>;
|
|
13
|
+
}
|
|
14
|
+
declare global {
|
|
15
|
+
interface HTMLElementTagNameMap {
|
|
16
|
+
'dsgn-code-block': CodeBlock;
|
|
17
|
+
}
|
|
18
|
+
}
|