@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,354 @@
|
|
|
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/Container/src/Container.ts
|
|
13
|
+
import { html as html2 } from "lit";
|
|
14
|
+
import { property } from "lit/decorators.js";
|
|
15
|
+
|
|
16
|
+
// common/Base/Base.ts
|
|
17
|
+
import { html, LitElement } from "lit";
|
|
18
|
+
|
|
19
|
+
// common/helpers/define-element.ts
|
|
20
|
+
var defineElement = (tag, ctor) => {
|
|
21
|
+
if (typeof customElements === "undefined")
|
|
22
|
+
return;
|
|
23
|
+
if (!customElements.get(tag))
|
|
24
|
+
customElements.define(tag, ctor);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
// common/Base/Base.css
|
|
28
|
+
import { css } from "lit";
|
|
29
|
+
var styles = css`/* Base reset in @layer base ensures it comes before utilities in Tailwind v4 cascade
|
|
30
|
+
This prevents the reset from overriding component utility classes */
|
|
31
|
+
@layer base {
|
|
32
|
+
:host {
|
|
33
|
+
display: block;
|
|
34
|
+
box-sizing: border-box;
|
|
35
|
+
line-height: 1.5;
|
|
36
|
+
-webkit-text-size-adjust: 100%;
|
|
37
|
+
tab-size: 4;
|
|
38
|
+
font-family: var(
|
|
39
|
+
--default-font-family,
|
|
40
|
+
var(--font-sans, ui-sans-serif, system-ui, sans-serif)
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
*,
|
|
45
|
+
*::before,
|
|
46
|
+
*::after {
|
|
47
|
+
box-sizing: inherit;
|
|
48
|
+
margin: 0;
|
|
49
|
+
padding: 0;
|
|
50
|
+
border: 0 solid;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
:host h1,
|
|
54
|
+
:host h2,
|
|
55
|
+
:host h3,
|
|
56
|
+
:host h4,
|
|
57
|
+
:host h5,
|
|
58
|
+
:host h6 {
|
|
59
|
+
font-size: inherit;
|
|
60
|
+
font-weight: inherit;
|
|
61
|
+
margin: 0;
|
|
62
|
+
padding: 0;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
`;
|
|
66
|
+
var Base_default = styles;
|
|
67
|
+
|
|
68
|
+
// common/Base/Base.ts
|
|
69
|
+
class Base extends LitElement {
|
|
70
|
+
static styles = Base_default;
|
|
71
|
+
updateTheme(changedProperties, surface) {
|
|
72
|
+
if (changedProperties.has("surface")) {
|
|
73
|
+
if (surface) {
|
|
74
|
+
this.setAttribute("data-theme", surface);
|
|
75
|
+
} else {
|
|
76
|
+
this.removeAttribute("data-theme");
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
emit(name, detail, options = {}) {
|
|
81
|
+
return this.dispatchEvent(new CustomEvent(name, {
|
|
82
|
+
detail,
|
|
83
|
+
bubbles: true,
|
|
84
|
+
composed: true,
|
|
85
|
+
cancelable: options.cancelable ?? false
|
|
86
|
+
}));
|
|
87
|
+
}
|
|
88
|
+
render() {
|
|
89
|
+
return html`<slot></slot>`;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
defineElement("dsgn-base", Base);
|
|
93
|
+
|
|
94
|
+
// components/Container/src/Container.css
|
|
95
|
+
import { css as css2 } from "lit";
|
|
96
|
+
var styles2 = css2`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
|
|
97
|
+
@layer properties;
|
|
98
|
+
@layer theme {
|
|
99
|
+
:root, :host {
|
|
100
|
+
--spacing: 0.25rem;
|
|
101
|
+
--breakpoint-sm: 40rem;
|
|
102
|
+
--breakpoint-md: 48rem;
|
|
103
|
+
--breakpoint-lg: 64rem;
|
|
104
|
+
--breakpoint-xl: 80rem;
|
|
105
|
+
--breakpoint-2xl: 96rem;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
@layer utilities {
|
|
109
|
+
.static {
|
|
110
|
+
position: static;
|
|
111
|
+
}
|
|
112
|
+
.container {
|
|
113
|
+
width: 100%;
|
|
114
|
+
@media (width >= 40rem) {
|
|
115
|
+
max-width: 40rem;
|
|
116
|
+
}
|
|
117
|
+
@media (width >= 48rem) {
|
|
118
|
+
max-width: 48rem;
|
|
119
|
+
}
|
|
120
|
+
@media (width >= 64rem) {
|
|
121
|
+
max-width: 64rem;
|
|
122
|
+
}
|
|
123
|
+
@media (width >= 80rem) {
|
|
124
|
+
max-width: 80rem;
|
|
125
|
+
}
|
|
126
|
+
@media (width >= 96rem) {
|
|
127
|
+
max-width: 96rem;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
.mx-auto {
|
|
131
|
+
margin-inline: auto;
|
|
132
|
+
}
|
|
133
|
+
.w-full {
|
|
134
|
+
width: 100%;
|
|
135
|
+
}
|
|
136
|
+
.max-w-full {
|
|
137
|
+
max-width: 100%;
|
|
138
|
+
}
|
|
139
|
+
.max-w-screen-2xl {
|
|
140
|
+
max-width: var(--breakpoint-2xl);
|
|
141
|
+
}
|
|
142
|
+
.max-w-screen-lg {
|
|
143
|
+
max-width: var(--breakpoint-lg);
|
|
144
|
+
}
|
|
145
|
+
.max-w-screen-md {
|
|
146
|
+
max-width: var(--breakpoint-md);
|
|
147
|
+
}
|
|
148
|
+
.max-w-screen-sm {
|
|
149
|
+
max-width: var(--breakpoint-sm);
|
|
150
|
+
}
|
|
151
|
+
.max-w-screen-xl {
|
|
152
|
+
max-width: var(--breakpoint-xl);
|
|
153
|
+
}
|
|
154
|
+
.px-2 {
|
|
155
|
+
padding-inline: calc(var(--spacing) * 2);
|
|
156
|
+
}
|
|
157
|
+
.px-4 {
|
|
158
|
+
padding-inline: calc(var(--spacing) * 4);
|
|
159
|
+
}
|
|
160
|
+
.px-6 {
|
|
161
|
+
padding-inline: calc(var(--spacing) * 6);
|
|
162
|
+
}
|
|
163
|
+
.px-8 {
|
|
164
|
+
padding-inline: calc(var(--spacing) * 8);
|
|
165
|
+
}
|
|
166
|
+
.py-4 {
|
|
167
|
+
padding-block: calc(var(--spacing) * 4);
|
|
168
|
+
}
|
|
169
|
+
.py-8 {
|
|
170
|
+
padding-block: calc(var(--spacing) * 8);
|
|
171
|
+
}
|
|
172
|
+
.py-12 {
|
|
173
|
+
padding-block: calc(var(--spacing) * 12);
|
|
174
|
+
}
|
|
175
|
+
.py-16 {
|
|
176
|
+
padding-block: calc(var(--spacing) * 16);
|
|
177
|
+
}
|
|
178
|
+
.sm\\:px-3 {
|
|
179
|
+
@media (width >= 40rem) {
|
|
180
|
+
padding-inline: calc(var(--spacing) * 3);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
.sm\\:px-6 {
|
|
184
|
+
@media (width >= 40rem) {
|
|
185
|
+
padding-inline: calc(var(--spacing) * 6);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
.sm\\:px-8 {
|
|
189
|
+
@media (width >= 40rem) {
|
|
190
|
+
padding-inline: calc(var(--spacing) * 8);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
.sm\\:px-10 {
|
|
194
|
+
@media (width >= 40rem) {
|
|
195
|
+
padding-inline: calc(var(--spacing) * 10);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
.lg\\:px-4 {
|
|
199
|
+
@media (width >= 64rem) {
|
|
200
|
+
padding-inline: calc(var(--spacing) * 4);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
.lg\\:px-8 {
|
|
204
|
+
@media (width >= 64rem) {
|
|
205
|
+
padding-inline: calc(var(--spacing) * 8);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
.lg\\:px-12 {
|
|
209
|
+
@media (width >= 64rem) {
|
|
210
|
+
padding-inline: calc(var(--spacing) * 12);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
.lg\\:px-16 {
|
|
214
|
+
@media (width >= 64rem) {
|
|
215
|
+
padding-inline: calc(var(--spacing) * 16);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
@property --dsgn-border-sweep-angle {
|
|
220
|
+
syntax: '<angle>';
|
|
221
|
+
inherits: false;
|
|
222
|
+
initial-value: 0deg;
|
|
223
|
+
}
|
|
224
|
+
@layer properties {
|
|
225
|
+
@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
|
|
226
|
+
*, ::before, ::after, ::backdrop {
|
|
227
|
+
--dsgn-border-sweep-angle: 0deg;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
`;
|
|
232
|
+
var Container_default = styles2;
|
|
233
|
+
|
|
234
|
+
// common/helpers/enum-validator.ts
|
|
235
|
+
var enumValidator = (propName, enumSet, candidateValue) => {
|
|
236
|
+
if (!enumSet.has(candidateValue)) {
|
|
237
|
+
throw new Error(`Invalid prop ${propName} of value ${candidateValue}. Expected one of: ${Array.from(enumSet).join(", ")}`);
|
|
238
|
+
}
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
// common/helpers/enum-creator.ts
|
|
242
|
+
var enumCreator = (acceptableValues, propName, type, other = {}) => {
|
|
243
|
+
const acceptableValuesSet = new Set(acceptableValues);
|
|
244
|
+
return {
|
|
245
|
+
type,
|
|
246
|
+
hasChanged(newValue, oldValue) {
|
|
247
|
+
if (newValue !== oldValue) {
|
|
248
|
+
enumValidator(propName, acceptableValuesSet, newValue);
|
|
249
|
+
return true;
|
|
250
|
+
}
|
|
251
|
+
return false;
|
|
252
|
+
},
|
|
253
|
+
...other
|
|
254
|
+
};
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
// components/Container/src/Container.props.ts
|
|
258
|
+
var containerSizeValues = {
|
|
259
|
+
SM: "sm",
|
|
260
|
+
MD: "md",
|
|
261
|
+
LG: "lg",
|
|
262
|
+
XL: "xl",
|
|
263
|
+
XXL: "2xl",
|
|
264
|
+
FULL: "full"
|
|
265
|
+
};
|
|
266
|
+
var containerSizeProps = enumCreator(Object.values(containerSizeValues), "size", String, { reflect: true });
|
|
267
|
+
var containerPaddingValues = {
|
|
268
|
+
NONE: "none",
|
|
269
|
+
SM: "sm",
|
|
270
|
+
MD: "md",
|
|
271
|
+
LG: "lg",
|
|
272
|
+
XL: "xl"
|
|
273
|
+
};
|
|
274
|
+
var containerPaddingXProps = enumCreator(Object.values(containerPaddingValues), "padding-x", String, { reflect: true, attribute: "padding-x" });
|
|
275
|
+
var containerPaddingYProps = enumCreator(Object.values(containerPaddingValues), "padding-y", String, { reflect: true, attribute: "padding-y" });
|
|
276
|
+
|
|
277
|
+
// ../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
278
|
+
function r(e) {
|
|
279
|
+
var t, f, n = "";
|
|
280
|
+
if (typeof e == "string" || typeof e == "number")
|
|
281
|
+
n += e;
|
|
282
|
+
else if (typeof e == "object")
|
|
283
|
+
if (Array.isArray(e)) {
|
|
284
|
+
var o = e.length;
|
|
285
|
+
for (t = 0;t < o; t++)
|
|
286
|
+
e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
|
|
287
|
+
} else
|
|
288
|
+
for (f in e)
|
|
289
|
+
e[f] && (n && (n += " "), n += f);
|
|
290
|
+
return n;
|
|
291
|
+
}
|
|
292
|
+
function clsx() {
|
|
293
|
+
for (var e, t, f = 0, n = "", o = arguments.length;f < o; f++)
|
|
294
|
+
(e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
295
|
+
return n;
|
|
296
|
+
}
|
|
297
|
+
var clsx_default = clsx;
|
|
298
|
+
|
|
299
|
+
// components/Container/src/Container.styles.ts
|
|
300
|
+
var baseClasses = ["mx-auto", "w-full"];
|
|
301
|
+
var sizeClasses = {
|
|
302
|
+
sm: ["max-w-screen-sm"],
|
|
303
|
+
md: ["max-w-screen-md"],
|
|
304
|
+
lg: ["max-w-screen-lg"],
|
|
305
|
+
xl: ["max-w-screen-xl"],
|
|
306
|
+
"2xl": ["max-w-screen-2xl"],
|
|
307
|
+
full: ["max-w-full"]
|
|
308
|
+
};
|
|
309
|
+
var paddingXClasses = {
|
|
310
|
+
none: [],
|
|
311
|
+
sm: ["px-2", "sm:px-3", "lg:px-4"],
|
|
312
|
+
md: ["px-4", "sm:px-6", "lg:px-8"],
|
|
313
|
+
lg: ["px-6", "sm:px-8", "lg:px-12"],
|
|
314
|
+
xl: ["px-8", "sm:px-10", "lg:px-16"]
|
|
315
|
+
};
|
|
316
|
+
var paddingYClasses = {
|
|
317
|
+
none: [],
|
|
318
|
+
sm: ["py-4"],
|
|
319
|
+
md: ["py-8"],
|
|
320
|
+
lg: ["py-12"],
|
|
321
|
+
xl: ["py-16"]
|
|
322
|
+
};
|
|
323
|
+
var classNames = (size, paddingX, paddingY) => clsx_default(baseClasses, sizeClasses[size], paddingXClasses[paddingX], paddingYClasses[paddingY]);
|
|
324
|
+
|
|
325
|
+
// components/Container/src/Container.ts
|
|
326
|
+
class Container extends Base {
|
|
327
|
+
constructor() {
|
|
328
|
+
super(...arguments);
|
|
329
|
+
this.size = containerSizeValues.LG;
|
|
330
|
+
this.paddingX = containerPaddingValues.MD;
|
|
331
|
+
this.paddingY = containerPaddingValues.NONE;
|
|
332
|
+
}
|
|
333
|
+
static styles = [Base.styles, Container_default];
|
|
334
|
+
render() {
|
|
335
|
+
return html2`<div
|
|
336
|
+
class="${classNames(this.size, this.paddingX, this.paddingY)}"
|
|
337
|
+
>
|
|
338
|
+
<slot></slot>
|
|
339
|
+
</div>`;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
__legacyDecorateClassTS([
|
|
343
|
+
property({ ...containerSizeProps })
|
|
344
|
+
], Container.prototype, "size", undefined);
|
|
345
|
+
__legacyDecorateClassTS([
|
|
346
|
+
property({ ...containerPaddingXProps })
|
|
347
|
+
], Container.prototype, "paddingX", undefined);
|
|
348
|
+
__legacyDecorateClassTS([
|
|
349
|
+
property({ ...containerPaddingYProps })
|
|
350
|
+
], Container.prototype, "paddingY", undefined);
|
|
351
|
+
defineElement("dsgn-container", Container);
|
|
352
|
+
export {
|
|
353
|
+
Container
|
|
354
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const containerSizeValues: {
|
|
2
|
+
readonly SM: "sm";
|
|
3
|
+
readonly MD: "md";
|
|
4
|
+
readonly LG: "lg";
|
|
5
|
+
readonly XL: "xl";
|
|
6
|
+
readonly XXL: "2xl";
|
|
7
|
+
readonly FULL: "full";
|
|
8
|
+
};
|
|
9
|
+
export type ContainerSizeType = (typeof containerSizeValues)[keyof typeof containerSizeValues];
|
|
10
|
+
export declare const containerSizeProps: import("lit").PropertyDeclaration<unknown, unknown>;
|
|
11
|
+
export declare const containerPaddingValues: {
|
|
12
|
+
readonly NONE: "none";
|
|
13
|
+
readonly SM: "sm";
|
|
14
|
+
readonly MD: "md";
|
|
15
|
+
readonly LG: "lg";
|
|
16
|
+
readonly XL: "xl";
|
|
17
|
+
};
|
|
18
|
+
export type ContainerPaddingType = (typeof containerPaddingValues)[keyof typeof containerPaddingValues];
|
|
19
|
+
export declare const containerPaddingXProps: import("lit").PropertyDeclaration<unknown, unknown>;
|
|
20
|
+
export declare const containerPaddingYProps: import("lit").PropertyDeclaration<unknown, unknown>;
|
|
@@ -0,0 +1,49 @@
|
|
|
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/Container/src/Container.props.ts
|
|
25
|
+
var containerSizeValues = {
|
|
26
|
+
SM: "sm",
|
|
27
|
+
MD: "md",
|
|
28
|
+
LG: "lg",
|
|
29
|
+
XL: "xl",
|
|
30
|
+
XXL: "2xl",
|
|
31
|
+
FULL: "full"
|
|
32
|
+
};
|
|
33
|
+
var containerSizeProps = enumCreator(Object.values(containerSizeValues), "size", String, { reflect: true });
|
|
34
|
+
var containerPaddingValues = {
|
|
35
|
+
NONE: "none",
|
|
36
|
+
SM: "sm",
|
|
37
|
+
MD: "md",
|
|
38
|
+
LG: "lg",
|
|
39
|
+
XL: "xl"
|
|
40
|
+
};
|
|
41
|
+
var containerPaddingXProps = enumCreator(Object.values(containerPaddingValues), "padding-x", String, { reflect: true, attribute: "padding-x" });
|
|
42
|
+
var containerPaddingYProps = enumCreator(Object.values(containerPaddingValues), "padding-y", String, { reflect: true, attribute: "padding-y" });
|
|
43
|
+
export {
|
|
44
|
+
containerPaddingValues,
|
|
45
|
+
containerPaddingXProps,
|
|
46
|
+
containerPaddingYProps,
|
|
47
|
+
containerSizeProps,
|
|
48
|
+
containerSizeValues
|
|
49
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import '../../../types/global.d.ts';
|
|
2
|
+
import { type CSSResultGroup } from 'lit';
|
|
3
|
+
import { Base } from '../../../common/Base/Base.js';
|
|
4
|
+
import { type SurfaceType } from '../../../common/props/surface/surface.props.js';
|
|
5
|
+
import { type DividerSpacingType } from './Divider.props.js';
|
|
6
|
+
export declare class Divider extends Base {
|
|
7
|
+
static styles: CSSResultGroup;
|
|
8
|
+
/**
|
|
9
|
+
* Surface theme variant (light or dark)
|
|
10
|
+
*/
|
|
11
|
+
surface: SurfaceType;
|
|
12
|
+
/**
|
|
13
|
+
* Vertical spacing above and below the divider
|
|
14
|
+
*/
|
|
15
|
+
spacing: DividerSpacingType;
|
|
16
|
+
updated(changedProperties: Map<string | number | symbol, unknown>): void;
|
|
17
|
+
render(): import("lit").TemplateResult<1>;
|
|
18
|
+
}
|
|
19
|
+
declare global {
|
|
20
|
+
interface HTMLElementTagNameMap {
|
|
21
|
+
'dsgn-divider': Divider;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,250 @@
|
|
|
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/Divider/src/Divider.ts
|
|
13
|
+
import { html as html2 } from "lit";
|
|
14
|
+
import { property } from "lit/decorators.js";
|
|
15
|
+
|
|
16
|
+
// common/Base/Base.ts
|
|
17
|
+
import { html, LitElement } from "lit";
|
|
18
|
+
|
|
19
|
+
// common/helpers/define-element.ts
|
|
20
|
+
var defineElement = (tag, ctor) => {
|
|
21
|
+
if (typeof customElements === "undefined")
|
|
22
|
+
return;
|
|
23
|
+
if (!customElements.get(tag))
|
|
24
|
+
customElements.define(tag, ctor);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
// common/Base/Base.css
|
|
28
|
+
import { css } from "lit";
|
|
29
|
+
var styles = css`/* Base reset in @layer base ensures it comes before utilities in Tailwind v4 cascade
|
|
30
|
+
This prevents the reset from overriding component utility classes */
|
|
31
|
+
@layer base {
|
|
32
|
+
:host {
|
|
33
|
+
display: block;
|
|
34
|
+
box-sizing: border-box;
|
|
35
|
+
line-height: 1.5;
|
|
36
|
+
-webkit-text-size-adjust: 100%;
|
|
37
|
+
tab-size: 4;
|
|
38
|
+
font-family: var(
|
|
39
|
+
--default-font-family,
|
|
40
|
+
var(--font-sans, ui-sans-serif, system-ui, sans-serif)
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
*,
|
|
45
|
+
*::before,
|
|
46
|
+
*::after {
|
|
47
|
+
box-sizing: inherit;
|
|
48
|
+
margin: 0;
|
|
49
|
+
padding: 0;
|
|
50
|
+
border: 0 solid;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
:host h1,
|
|
54
|
+
:host h2,
|
|
55
|
+
:host h3,
|
|
56
|
+
:host h4,
|
|
57
|
+
:host h5,
|
|
58
|
+
:host h6 {
|
|
59
|
+
font-size: inherit;
|
|
60
|
+
font-weight: inherit;
|
|
61
|
+
margin: 0;
|
|
62
|
+
padding: 0;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
`;
|
|
66
|
+
var Base_default = styles;
|
|
67
|
+
|
|
68
|
+
// common/Base/Base.ts
|
|
69
|
+
class Base extends LitElement {
|
|
70
|
+
static styles = Base_default;
|
|
71
|
+
updateTheme(changedProperties, surface) {
|
|
72
|
+
if (changedProperties.has("surface")) {
|
|
73
|
+
if (surface) {
|
|
74
|
+
this.setAttribute("data-theme", surface);
|
|
75
|
+
} else {
|
|
76
|
+
this.removeAttribute("data-theme");
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
emit(name, detail, options = {}) {
|
|
81
|
+
return this.dispatchEvent(new CustomEvent(name, {
|
|
82
|
+
detail,
|
|
83
|
+
bubbles: true,
|
|
84
|
+
composed: true,
|
|
85
|
+
cancelable: options.cancelable ?? false
|
|
86
|
+
}));
|
|
87
|
+
}
|
|
88
|
+
render() {
|
|
89
|
+
return html`<slot></slot>`;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
defineElement("dsgn-base", Base);
|
|
93
|
+
|
|
94
|
+
// common/helpers/enum-validator.ts
|
|
95
|
+
var enumValidator = (propName, enumSet, candidateValue) => {
|
|
96
|
+
if (!enumSet.has(candidateValue)) {
|
|
97
|
+
throw new Error(`Invalid prop ${propName} of value ${candidateValue}. Expected one of: ${Array.from(enumSet).join(", ")}`);
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
// common/helpers/enum-creator.ts
|
|
102
|
+
var enumCreator = (acceptableValues, propName, type, other = {}) => {
|
|
103
|
+
const acceptableValuesSet = new Set(acceptableValues);
|
|
104
|
+
return {
|
|
105
|
+
type,
|
|
106
|
+
hasChanged(newValue, oldValue) {
|
|
107
|
+
if (newValue !== oldValue) {
|
|
108
|
+
enumValidator(propName, acceptableValuesSet, newValue);
|
|
109
|
+
return true;
|
|
110
|
+
}
|
|
111
|
+
return false;
|
|
112
|
+
},
|
|
113
|
+
...other
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
// common/props/surface/surface.props.ts
|
|
118
|
+
var surfaceValues = {
|
|
119
|
+
LIGHT: "light",
|
|
120
|
+
DARK: "dark"
|
|
121
|
+
};
|
|
122
|
+
var surfaceProps = enumCreator(Object.values(surfaceValues), "surface", String, { reflect: true });
|
|
123
|
+
|
|
124
|
+
// components/Divider/src/Divider.css
|
|
125
|
+
import { css as css2 } from "lit";
|
|
126
|
+
var styles2 = css2`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
|
|
127
|
+
@layer properties;
|
|
128
|
+
@layer theme {
|
|
129
|
+
:root, :host {
|
|
130
|
+
--spacing: 0.25rem;
|
|
131
|
+
--color-outline: inherit;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
@layer utilities {
|
|
135
|
+
.static {
|
|
136
|
+
position: static;
|
|
137
|
+
}
|
|
138
|
+
.my-4 {
|
|
139
|
+
margin-block: calc(var(--spacing) * 4);
|
|
140
|
+
}
|
|
141
|
+
.my-8 {
|
|
142
|
+
margin-block: calc(var(--spacing) * 8);
|
|
143
|
+
}
|
|
144
|
+
.my-12 {
|
|
145
|
+
margin-block: calc(var(--spacing) * 12);
|
|
146
|
+
}
|
|
147
|
+
.h-0 {
|
|
148
|
+
height: calc(var(--spacing) * 0);
|
|
149
|
+
}
|
|
150
|
+
.w-full {
|
|
151
|
+
width: 100%;
|
|
152
|
+
}
|
|
153
|
+
.border-0 {
|
|
154
|
+
border-style: var(--tw-border-style);
|
|
155
|
+
border-width: 0px;
|
|
156
|
+
}
|
|
157
|
+
.border-t {
|
|
158
|
+
border-top-style: var(--tw-border-style);
|
|
159
|
+
border-top-width: 1px;
|
|
160
|
+
}
|
|
161
|
+
.border-outline {
|
|
162
|
+
border-color: var(--color-outline);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
@property --dsgn-border-sweep-angle {
|
|
166
|
+
syntax: '<angle>';
|
|
167
|
+
inherits: false;
|
|
168
|
+
initial-value: 0deg;
|
|
169
|
+
}
|
|
170
|
+
@property --tw-border-style {
|
|
171
|
+
syntax: "*";
|
|
172
|
+
inherits: false;
|
|
173
|
+
initial-value: solid;
|
|
174
|
+
}
|
|
175
|
+
@layer properties {
|
|
176
|
+
@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
|
|
177
|
+
*, ::before, ::after, ::backdrop {
|
|
178
|
+
--tw-border-style: solid;
|
|
179
|
+
--dsgn-border-sweep-angle: 0deg;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
`;
|
|
184
|
+
var Divider_default = styles2;
|
|
185
|
+
|
|
186
|
+
// components/Divider/src/Divider.props.ts
|
|
187
|
+
var dividerSpacingValues = {
|
|
188
|
+
SM: "sm",
|
|
189
|
+
MD: "md",
|
|
190
|
+
LG: "lg"
|
|
191
|
+
};
|
|
192
|
+
var dividerSpacingProps = enumCreator(Object.values(dividerSpacingValues), "spacing", String, { reflect: true });
|
|
193
|
+
|
|
194
|
+
// ../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
195
|
+
function r(e) {
|
|
196
|
+
var t, f, n = "";
|
|
197
|
+
if (typeof e == "string" || typeof e == "number")
|
|
198
|
+
n += e;
|
|
199
|
+
else if (typeof e == "object")
|
|
200
|
+
if (Array.isArray(e)) {
|
|
201
|
+
var o = e.length;
|
|
202
|
+
for (t = 0;t < o; t++)
|
|
203
|
+
e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
|
|
204
|
+
} else
|
|
205
|
+
for (f in e)
|
|
206
|
+
e[f] && (n && (n += " "), n += f);
|
|
207
|
+
return n;
|
|
208
|
+
}
|
|
209
|
+
function clsx() {
|
|
210
|
+
for (var e, t, f = 0, n = "", o = arguments.length;f < o; f++)
|
|
211
|
+
(e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
212
|
+
return n;
|
|
213
|
+
}
|
|
214
|
+
var clsx_default = clsx;
|
|
215
|
+
|
|
216
|
+
// components/Divider/src/Divider.styles.ts
|
|
217
|
+
var baseClasses = ["border-0", "border-t", "border-outline", "h-0", "w-full"];
|
|
218
|
+
var spacingClasses = {
|
|
219
|
+
[dividerSpacingValues.SM]: ["my-4"],
|
|
220
|
+
[dividerSpacingValues.MD]: ["my-8"],
|
|
221
|
+
[dividerSpacingValues.LG]: ["my-12"]
|
|
222
|
+
};
|
|
223
|
+
var classNames = (spacing) => clsx_default(baseClasses, spacingClasses[spacing]);
|
|
224
|
+
|
|
225
|
+
// components/Divider/src/Divider.ts
|
|
226
|
+
class Divider extends Base {
|
|
227
|
+
constructor() {
|
|
228
|
+
super(...arguments);
|
|
229
|
+
this.surface = surfaceValues.LIGHT;
|
|
230
|
+
this.spacing = dividerSpacingValues.MD;
|
|
231
|
+
}
|
|
232
|
+
static styles = [Base.styles, Divider_default];
|
|
233
|
+
updated(changedProperties) {
|
|
234
|
+
super.updated(changedProperties);
|
|
235
|
+
this.updateTheme(changedProperties, this.surface);
|
|
236
|
+
}
|
|
237
|
+
render() {
|
|
238
|
+
return html2`<hr class="${classNames(this.spacing)}" />`;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
__legacyDecorateClassTS([
|
|
242
|
+
property({ ...surfaceProps })
|
|
243
|
+
], Divider.prototype, "surface", undefined);
|
|
244
|
+
__legacyDecorateClassTS([
|
|
245
|
+
property({ ...dividerSpacingProps })
|
|
246
|
+
], Divider.prototype, "spacing", undefined);
|
|
247
|
+
defineElement("dsgn-divider", Divider);
|
|
248
|
+
export {
|
|
249
|
+
Divider
|
|
250
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const dividerSpacingValues: {
|
|
2
|
+
readonly SM: "sm";
|
|
3
|
+
readonly MD: "md";
|
|
4
|
+
readonly LG: "lg";
|
|
5
|
+
};
|
|
6
|
+
export type DividerSpacingType = (typeof dividerSpacingValues)[keyof typeof dividerSpacingValues];
|
|
7
|
+
export declare const dividerSpacingProps: import("lit").PropertyDeclaration<unknown, unknown>;
|