@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,303 @@
|
|
|
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
|
+
// common/Base/Base.ts
|
|
13
|
+
import { html, LitElement } from "lit";
|
|
14
|
+
|
|
15
|
+
// common/helpers/define-element.ts
|
|
16
|
+
var defineElement = (tag, ctor) => {
|
|
17
|
+
if (typeof customElements === "undefined")
|
|
18
|
+
return;
|
|
19
|
+
if (!customElements.get(tag))
|
|
20
|
+
customElements.define(tag, ctor);
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
// common/Base/Base.css
|
|
24
|
+
import { css } from "lit";
|
|
25
|
+
var styles = css`/* Base reset in @layer base ensures it comes before utilities in Tailwind v4 cascade
|
|
26
|
+
This prevents the reset from overriding component utility classes */
|
|
27
|
+
@layer base {
|
|
28
|
+
:host {
|
|
29
|
+
display: block;
|
|
30
|
+
box-sizing: border-box;
|
|
31
|
+
line-height: 1.5;
|
|
32
|
+
-webkit-text-size-adjust: 100%;
|
|
33
|
+
tab-size: 4;
|
|
34
|
+
font-family: var(
|
|
35
|
+
--default-font-family,
|
|
36
|
+
var(--font-sans, ui-sans-serif, system-ui, sans-serif)
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
*,
|
|
41
|
+
*::before,
|
|
42
|
+
*::after {
|
|
43
|
+
box-sizing: inherit;
|
|
44
|
+
margin: 0;
|
|
45
|
+
padding: 0;
|
|
46
|
+
border: 0 solid;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
:host h1,
|
|
50
|
+
:host h2,
|
|
51
|
+
:host h3,
|
|
52
|
+
:host h4,
|
|
53
|
+
:host h5,
|
|
54
|
+
:host h6 {
|
|
55
|
+
font-size: inherit;
|
|
56
|
+
font-weight: inherit;
|
|
57
|
+
margin: 0;
|
|
58
|
+
padding: 0;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
`;
|
|
62
|
+
var Base_default = styles;
|
|
63
|
+
|
|
64
|
+
// common/Base/Base.ts
|
|
65
|
+
class Base extends LitElement {
|
|
66
|
+
static styles = Base_default;
|
|
67
|
+
updateTheme(changedProperties, surface) {
|
|
68
|
+
if (changedProperties.has("surface")) {
|
|
69
|
+
if (surface) {
|
|
70
|
+
this.setAttribute("data-theme", surface);
|
|
71
|
+
} else {
|
|
72
|
+
this.removeAttribute("data-theme");
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
emit(name, detail, options = {}) {
|
|
77
|
+
return this.dispatchEvent(new CustomEvent(name, {
|
|
78
|
+
detail,
|
|
79
|
+
bubbles: true,
|
|
80
|
+
composed: true,
|
|
81
|
+
cancelable: options.cancelable ?? false
|
|
82
|
+
}));
|
|
83
|
+
}
|
|
84
|
+
render() {
|
|
85
|
+
return html`<slot></slot>`;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
defineElement("dsgn-base", Base);
|
|
89
|
+
|
|
90
|
+
// common/helpers/enum-validator.ts
|
|
91
|
+
var enumValidator = (propName, enumSet, candidateValue) => {
|
|
92
|
+
if (!enumSet.has(candidateValue)) {
|
|
93
|
+
throw new Error(`Invalid prop ${propName} of value ${candidateValue}. Expected one of: ${Array.from(enumSet).join(", ")}`);
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
// common/helpers/enum-creator.ts
|
|
98
|
+
var enumCreator = (acceptableValues, propName, type, other = {}) => {
|
|
99
|
+
const acceptableValuesSet = new Set(acceptableValues);
|
|
100
|
+
return {
|
|
101
|
+
type,
|
|
102
|
+
hasChanged(newValue, oldValue) {
|
|
103
|
+
if (newValue !== oldValue) {
|
|
104
|
+
enumValidator(propName, acceptableValuesSet, newValue);
|
|
105
|
+
return true;
|
|
106
|
+
}
|
|
107
|
+
return false;
|
|
108
|
+
},
|
|
109
|
+
...other
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
// common/props/surface/surface.props.ts
|
|
114
|
+
var surfaceValues = {
|
|
115
|
+
LIGHT: "light",
|
|
116
|
+
DARK: "dark"
|
|
117
|
+
};
|
|
118
|
+
var surfaceProps = enumCreator(Object.values(surfaceValues), "surface", String, { reflect: true });
|
|
119
|
+
|
|
120
|
+
// components/Icon/src/Icon.ts
|
|
121
|
+
import { html as html2 } from "lit";
|
|
122
|
+
import { property } from "lit/decorators.js";
|
|
123
|
+
|
|
124
|
+
// components/Icon/src/Icon.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
|
+
}
|
|
132
|
+
}
|
|
133
|
+
@layer utilities {
|
|
134
|
+
.static {
|
|
135
|
+
position: static;
|
|
136
|
+
}
|
|
137
|
+
.inline-flex {
|
|
138
|
+
display: inline-flex;
|
|
139
|
+
}
|
|
140
|
+
.size-4 {
|
|
141
|
+
width: calc(var(--spacing) * 4);
|
|
142
|
+
height: calc(var(--spacing) * 4);
|
|
143
|
+
}
|
|
144
|
+
.size-5 {
|
|
145
|
+
width: calc(var(--spacing) * 5);
|
|
146
|
+
height: calc(var(--spacing) * 5);
|
|
147
|
+
}
|
|
148
|
+
.size-6 {
|
|
149
|
+
width: calc(var(--spacing) * 6);
|
|
150
|
+
height: calc(var(--spacing) * 6);
|
|
151
|
+
}
|
|
152
|
+
.size-8 {
|
|
153
|
+
width: calc(var(--spacing) * 8);
|
|
154
|
+
height: calc(var(--spacing) * 8);
|
|
155
|
+
}
|
|
156
|
+
.shrink-0 {
|
|
157
|
+
flex-shrink: 0;
|
|
158
|
+
}
|
|
159
|
+
.fill-none {
|
|
160
|
+
fill: none;
|
|
161
|
+
}
|
|
162
|
+
.stroke-current {
|
|
163
|
+
stroke: currentcolor;
|
|
164
|
+
}
|
|
165
|
+
.stroke-2 {
|
|
166
|
+
stroke-width: 2;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
@property --dsgn-border-sweep-angle {
|
|
170
|
+
syntax: '<angle>';
|
|
171
|
+
inherits: false;
|
|
172
|
+
initial-value: 0deg;
|
|
173
|
+
}
|
|
174
|
+
@layer properties {
|
|
175
|
+
@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
|
|
176
|
+
*, ::before, ::after, ::backdrop {
|
|
177
|
+
--dsgn-border-sweep-angle: 0deg;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
`;
|
|
182
|
+
var Icon_default = styles2;
|
|
183
|
+
|
|
184
|
+
// components/Icon/src/Icon.props.ts
|
|
185
|
+
var iconSizeValues = {
|
|
186
|
+
SM: "sm",
|
|
187
|
+
MD: "md",
|
|
188
|
+
LG: "lg",
|
|
189
|
+
XL: "xl"
|
|
190
|
+
};
|
|
191
|
+
var iconSizeProps = enumCreator(Object.values(iconSizeValues), "size", String, { reflect: true });
|
|
192
|
+
|
|
193
|
+
// ../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
194
|
+
function r(e) {
|
|
195
|
+
var t, f, n = "";
|
|
196
|
+
if (typeof e == "string" || typeof e == "number")
|
|
197
|
+
n += e;
|
|
198
|
+
else if (typeof e == "object")
|
|
199
|
+
if (Array.isArray(e)) {
|
|
200
|
+
var o = e.length;
|
|
201
|
+
for (t = 0;t < o; t++)
|
|
202
|
+
e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
|
|
203
|
+
} else
|
|
204
|
+
for (f in e)
|
|
205
|
+
e[f] && (n && (n += " "), n += f);
|
|
206
|
+
return n;
|
|
207
|
+
}
|
|
208
|
+
function clsx() {
|
|
209
|
+
for (var e, t, f = 0, n = "", o = arguments.length;f < o; f++)
|
|
210
|
+
(e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
211
|
+
return n;
|
|
212
|
+
}
|
|
213
|
+
var clsx_default = clsx;
|
|
214
|
+
|
|
215
|
+
// components/Icon/src/Icon.styles.ts
|
|
216
|
+
import { css as css3 } from "lit";
|
|
217
|
+
var hostStyles = css3`
|
|
218
|
+
:host {
|
|
219
|
+
display: inline-flex;
|
|
220
|
+
vertical-align: middle;
|
|
221
|
+
line-height: 0;
|
|
222
|
+
}
|
|
223
|
+
`;
|
|
224
|
+
var baseClasses = [
|
|
225
|
+
"inline-flex",
|
|
226
|
+
"shrink-0",
|
|
227
|
+
"fill-none",
|
|
228
|
+
"stroke-current",
|
|
229
|
+
"stroke-2"
|
|
230
|
+
];
|
|
231
|
+
var sizeClasses = {
|
|
232
|
+
sm: ["size-4"],
|
|
233
|
+
md: ["size-5"],
|
|
234
|
+
lg: ["size-6"],
|
|
235
|
+
xl: ["size-8"]
|
|
236
|
+
};
|
|
237
|
+
var classNames = (size) => clsx_default(baseClasses, sizeClasses[size]);
|
|
238
|
+
|
|
239
|
+
// components/Icon/src/Icon.ts
|
|
240
|
+
class Icon extends Base {
|
|
241
|
+
constructor() {
|
|
242
|
+
super(...arguments);
|
|
243
|
+
this.surface = surfaceValues.LIGHT;
|
|
244
|
+
this.size = iconSizeValues.LG;
|
|
245
|
+
this.iconName = "";
|
|
246
|
+
this.label = "";
|
|
247
|
+
}
|
|
248
|
+
static styles = [Base.styles, hostStyles, Icon_default];
|
|
249
|
+
static _registry = {};
|
|
250
|
+
static registerIcons(registry) {
|
|
251
|
+
Icon._registry = { ...Icon._registry, ...registry };
|
|
252
|
+
}
|
|
253
|
+
willUpdate(changedProperties) {
|
|
254
|
+
if (changedProperties.has("iconName") && !changedProperties.has("icon")) {
|
|
255
|
+
this.icon = this.iconName ? Icon._registry[this.iconName] : undefined;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
firstUpdated() {
|
|
259
|
+
if (this.iconName && !this.icon) {
|
|
260
|
+
this.icon = Icon._registry[this.iconName];
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
updated(changedProperties) {
|
|
264
|
+
super.updated(changedProperties);
|
|
265
|
+
this.updateTheme(changedProperties, this.surface);
|
|
266
|
+
}
|
|
267
|
+
render() {
|
|
268
|
+
const hasLabel = !!this.label;
|
|
269
|
+
return html2`
|
|
270
|
+
<svg
|
|
271
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
272
|
+
viewBox="0 0 24 24"
|
|
273
|
+
stroke-linecap="round"
|
|
274
|
+
stroke-linejoin="round"
|
|
275
|
+
class=${classNames(this.size)}
|
|
276
|
+
role=${hasLabel ? "img" : "presentation"}
|
|
277
|
+
aria-label=${hasLabel ? this.label : ""}
|
|
278
|
+
aria-hidden=${hasLabel ? "false" : "true"}
|
|
279
|
+
>
|
|
280
|
+
${this.icon}
|
|
281
|
+
</svg>
|
|
282
|
+
`;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
__legacyDecorateClassTS([
|
|
286
|
+
property({ ...surfaceProps })
|
|
287
|
+
], Icon.prototype, "surface", undefined);
|
|
288
|
+
__legacyDecorateClassTS([
|
|
289
|
+
property({ ...iconSizeProps })
|
|
290
|
+
], Icon.prototype, "size", undefined);
|
|
291
|
+
__legacyDecorateClassTS([
|
|
292
|
+
property({ attribute: false })
|
|
293
|
+
], Icon.prototype, "icon", undefined);
|
|
294
|
+
__legacyDecorateClassTS([
|
|
295
|
+
property({ type: String, attribute: "icon-name" })
|
|
296
|
+
], Icon.prototype, "iconName", undefined);
|
|
297
|
+
__legacyDecorateClassTS([
|
|
298
|
+
property({ type: String })
|
|
299
|
+
], Icon.prototype, "label", undefined);
|
|
300
|
+
defineElement("dsgn-icon", Icon);
|
|
301
|
+
export {
|
|
302
|
+
Icon
|
|
303
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const iconSizeValues: {
|
|
2
|
+
readonly SM: "sm";
|
|
3
|
+
readonly MD: "md";
|
|
4
|
+
readonly LG: "lg";
|
|
5
|
+
readonly XL: "xl";
|
|
6
|
+
};
|
|
7
|
+
export type IconSizeType = (typeof iconSizeValues)[keyof typeof iconSizeValues];
|
|
8
|
+
export declare const iconSizeProps: import("lit").PropertyDeclaration<unknown, unknown>;
|
|
@@ -0,0 +1,35 @@
|
|
|
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/Icon/src/Icon.props.ts
|
|
25
|
+
var iconSizeValues = {
|
|
26
|
+
SM: "sm",
|
|
27
|
+
MD: "md",
|
|
28
|
+
LG: "lg",
|
|
29
|
+
XL: "xl"
|
|
30
|
+
};
|
|
31
|
+
var iconSizeProps = enumCreator(Object.values(iconSizeValues), "size", String, { reflect: true });
|
|
32
|
+
export {
|
|
33
|
+
iconSizeProps,
|
|
34
|
+
iconSizeValues
|
|
35
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const arrowLeft: import("lit").TemplateResult<2>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const arrowRight: import("lit").TemplateResult<2>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const calendar: import("lit").TemplateResult<2>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const check: import("lit").TemplateResult<2>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const chevronDown: import("lit").TemplateResult<2>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const chevronLeft: import("lit").TemplateResult<2>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const chevronRight: import("lit").TemplateResult<2>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const chevronUp: import("lit").TemplateResult<2>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const circleAlert: import("lit").TemplateResult<2>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const circleCheck: import("lit").TemplateResult<2>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const circleX: import("lit").TemplateResult<2>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const copy: import("lit").TemplateResult<2>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const download: import("lit").TemplateResult<2>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ellipsisVertical: import("lit").TemplateResult<2>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ellipsis: import("lit").TemplateResult<2>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const externalLink: import("lit").TemplateResult<2>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const eyeOff: import("lit").TemplateResult<2>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// eye-off.ts
|
|
2
|
+
import { svg } from "lit";
|
|
3
|
+
var eyeOff = svg`<path d="M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49" /><path d="M14.084 14.158a3 3 0 0 1-4.242-4.242" /><path d="M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143" /><path d="m2 2 20 20" />`;
|
|
4
|
+
export {
|
|
5
|
+
eyeOff
|
|
6
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const eye: import("lit").TemplateResult<2>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export type IconName = 'arrowLeft' | 'arrowRight' | 'calendar' | 'check' | 'chevronDown' | 'chevronLeft' | 'chevronRight' | 'chevronUp' | 'circleAlert' | 'circleCheck' | 'circleX' | 'copy' | 'download' | 'ellipsis' | 'ellipsisVertical' | 'externalLink' | 'eye' | 'eyeOff' | 'info' | 'loader' | 'mail' | 'menu' | 'minus' | 'pencil' | 'plus' | 'search' | 'settings' | 'trash2' | 'triangleAlert' | 'upload' | 'user' | 'x';
|
|
2
|
+
export declare const iconNames: IconName[];
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// Auto-generated by build/generate-icons.ts — do not edit manually
|
|
2
|
+
|
|
3
|
+
export const iconNames = [
|
|
4
|
+
'arrowLeft',
|
|
5
|
+
'arrowRight',
|
|
6
|
+
'calendar',
|
|
7
|
+
'check',
|
|
8
|
+
'chevronDown',
|
|
9
|
+
'chevronLeft',
|
|
10
|
+
'chevronRight',
|
|
11
|
+
'chevronUp',
|
|
12
|
+
'circleAlert',
|
|
13
|
+
'circleCheck',
|
|
14
|
+
'circleX',
|
|
15
|
+
'copy',
|
|
16
|
+
'download',
|
|
17
|
+
'ellipsis',
|
|
18
|
+
'ellipsisVertical',
|
|
19
|
+
'externalLink',
|
|
20
|
+
'eye',
|
|
21
|
+
'eyeOff',
|
|
22
|
+
'info',
|
|
23
|
+
'loader',
|
|
24
|
+
'mail',
|
|
25
|
+
'menu',
|
|
26
|
+
'minus',
|
|
27
|
+
'pencil',
|
|
28
|
+
'plus',
|
|
29
|
+
'search',
|
|
30
|
+
'settings',
|
|
31
|
+
'trash2',
|
|
32
|
+
'triangleAlert',
|
|
33
|
+
'upload',
|
|
34
|
+
'user',
|
|
35
|
+
'x',
|
|
36
|
+
];
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export { arrowLeft } from './arrow-left';
|
|
2
|
+
export { arrowRight } from './arrow-right';
|
|
3
|
+
export { calendar } from './calendar';
|
|
4
|
+
export { check } from './check';
|
|
5
|
+
export { chevronDown } from './chevron-down';
|
|
6
|
+
export { chevronLeft } from './chevron-left';
|
|
7
|
+
export { chevronRight } from './chevron-right';
|
|
8
|
+
export { chevronUp } from './chevron-up';
|
|
9
|
+
export { circleAlert } from './circle-alert';
|
|
10
|
+
export { circleCheck } from './circle-check';
|
|
11
|
+
export { circleX } from './circle-x';
|
|
12
|
+
export { copy } from './copy';
|
|
13
|
+
export { download } from './download';
|
|
14
|
+
export { ellipsis } from './ellipsis';
|
|
15
|
+
export { ellipsisVertical } from './ellipsis-vertical';
|
|
16
|
+
export { externalLink } from './external-link';
|
|
17
|
+
export { eye } from './eye';
|
|
18
|
+
export { eyeOff } from './eye-off';
|
|
19
|
+
export type { IconName } from './icon-names';
|
|
20
|
+
export { iconNames } from './icon-names';
|
|
21
|
+
export { info } from './info';
|
|
22
|
+
export { loader } from './loader';
|
|
23
|
+
export { mail } from './mail';
|
|
24
|
+
export { menu } from './menu';
|
|
25
|
+
export { minus } from './minus';
|
|
26
|
+
export { pencil } from './pencil';
|
|
27
|
+
export { plus } from './plus';
|
|
28
|
+
export { search } from './search';
|
|
29
|
+
export { settings } from './settings';
|
|
30
|
+
export { trash2 } from './trash-2';
|
|
31
|
+
export { triangleAlert } from './triangle-alert';
|
|
32
|
+
export { upload } from './upload';
|
|
33
|
+
export { user } from './user';
|
|
34
|
+
export { x } from './x';
|