@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,38 @@
|
|
|
1
|
+
export declare const navLinkDropdownColumnValues: {
|
|
2
|
+
readonly ONE: "1";
|
|
3
|
+
readonly TWO: "2";
|
|
4
|
+
readonly THREE: "3";
|
|
5
|
+
};
|
|
6
|
+
export type NavLinkDropdownColumnsType = (typeof navLinkDropdownColumnValues)[keyof typeof navLinkDropdownColumnValues];
|
|
7
|
+
export declare const navLinkDropdownColumnsProps: import("lit").PropertyDeclaration<unknown, unknown>;
|
|
8
|
+
export declare const navLinkVariantValues: {
|
|
9
|
+
/** Quiet wayfinding link — tertiary text, brightens to orange on hover. */
|
|
10
|
+
readonly LINK: "link";
|
|
11
|
+
/** Primary CTA — outlined pill on a transparent fill, accent glow on hover. */
|
|
12
|
+
readonly ACTION: "action";
|
|
13
|
+
/**
|
|
14
|
+
* Secondary CTA — the same pill on a filled surface. Pairs with `action` when
|
|
15
|
+
* the nav carries two calls to action.
|
|
16
|
+
*/
|
|
17
|
+
readonly ACTION_SECONDARY: "action-secondary";
|
|
18
|
+
};
|
|
19
|
+
export type NavLinkVariantType = (typeof navLinkVariantValues)[keyof typeof navLinkVariantValues];
|
|
20
|
+
export declare const navLinkVariantProps: import("lit").PropertyDeclaration<unknown, unknown>;
|
|
21
|
+
export declare const navLinkSecondaryHoverValues: {
|
|
22
|
+
/** A 3px accent halo plus a 1px top inner highlight — lit from above. */
|
|
23
|
+
readonly RING: "ring";
|
|
24
|
+
/** A single bright pass sweeping around the border. */
|
|
25
|
+
readonly SHIMMER: "shimmer";
|
|
26
|
+
/** Label shifts left as a trailing arrow slides right and brightens. */
|
|
27
|
+
readonly NUDGE: "nudge";
|
|
28
|
+
/** Fill darkens behind an inset shadow — pressed in rather than lit. */
|
|
29
|
+
readonly DEEPEN: "deepen";
|
|
30
|
+
};
|
|
31
|
+
export type NavLinkSecondaryHoverType = (typeof navLinkSecondaryHoverValues)[keyof typeof navLinkSecondaryHoverValues];
|
|
32
|
+
export declare const navLinkSecondaryHoverProps: import("lit").PropertyDeclaration<unknown, unknown>;
|
|
33
|
+
export declare const navLinkTargetValues: {
|
|
34
|
+
readonly SELF: "_self";
|
|
35
|
+
readonly BLANK: "_blank";
|
|
36
|
+
};
|
|
37
|
+
export type NavLinkTargetType = (typeof navLinkTargetValues)[keyof typeof navLinkTargetValues];
|
|
38
|
+
export declare const navLinkTargetProps: import("lit").PropertyDeclaration<unknown, unknown>;
|
|
@@ -0,0 +1,58 @@
|
|
|
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/NavLink/src/NavLink.props.ts
|
|
25
|
+
var navLinkDropdownColumnValues = {
|
|
26
|
+
ONE: "1",
|
|
27
|
+
TWO: "2",
|
|
28
|
+
THREE: "3"
|
|
29
|
+
};
|
|
30
|
+
var navLinkDropdownColumnsProps = enumCreator(Object.values(navLinkDropdownColumnValues), "dropdown-columns", String, { attribute: "dropdown-columns", reflect: true });
|
|
31
|
+
var navLinkVariantValues = {
|
|
32
|
+
LINK: "link",
|
|
33
|
+
ACTION: "action",
|
|
34
|
+
ACTION_SECONDARY: "action-secondary"
|
|
35
|
+
};
|
|
36
|
+
var navLinkVariantProps = enumCreator(Object.values(navLinkVariantValues), "variant", String, { reflect: true });
|
|
37
|
+
var navLinkSecondaryHoverValues = {
|
|
38
|
+
RING: "ring",
|
|
39
|
+
SHIMMER: "shimmer",
|
|
40
|
+
NUDGE: "nudge",
|
|
41
|
+
DEEPEN: "deepen"
|
|
42
|
+
};
|
|
43
|
+
var navLinkSecondaryHoverProps = enumCreator(Object.values(navLinkSecondaryHoverValues), "secondary-hover", String, { attribute: "secondary-hover", reflect: true });
|
|
44
|
+
var navLinkTargetValues = {
|
|
45
|
+
SELF: "_self",
|
|
46
|
+
BLANK: "_blank"
|
|
47
|
+
};
|
|
48
|
+
var navLinkTargetProps = enumCreator(Object.values(navLinkTargetValues), "target", String, { reflect: true });
|
|
49
|
+
export {
|
|
50
|
+
navLinkDropdownColumnValues,
|
|
51
|
+
navLinkDropdownColumnsProps,
|
|
52
|
+
navLinkSecondaryHoverProps,
|
|
53
|
+
navLinkSecondaryHoverValues,
|
|
54
|
+
navLinkTargetProps,
|
|
55
|
+
navLinkTargetValues,
|
|
56
|
+
navLinkVariantProps,
|
|
57
|
+
navLinkVariantValues
|
|
58
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type SurfaceType } from '../../../common/props/surface/surface.props.js';
|
|
2
|
+
import { type NavLinkDropdownColumnsType, type NavLinkSecondaryHoverType, type NavLinkVariantType } from './NavLink.props.js';
|
|
3
|
+
export declare const nudgeLabelClasses: () => string;
|
|
4
|
+
export declare const nudgeArrowClasses: () => string;
|
|
5
|
+
export declare const classNames: (variant: NavLinkVariantType, surface: SurfaceType, isDropdownItem?: boolean, secondaryHover?: NavLinkSecondaryHoverType) => string;
|
|
6
|
+
export declare const wrapperClasses: () => string;
|
|
7
|
+
/**
|
|
8
|
+
* The trigger for a link that owns a dropdown. It is one control at every
|
|
9
|
+
* breakpoint — an inline pill on desktop, a full-width disclosure row in the
|
|
10
|
+
* mobile drawer — so the label and its caret are a single target, a single tab
|
|
11
|
+
* stop, and share one hover glow. The caret inside it is decorative; this
|
|
12
|
+
* button is what carries the expanded state.
|
|
13
|
+
*/
|
|
14
|
+
export declare const disclosureTriggerClasses: (surface: SurfaceType, open: boolean) => string;
|
|
15
|
+
export declare const disclosureIconClasses: (open: boolean) => string;
|
|
16
|
+
export declare const linkContentClasses: (hasSubheading: boolean, surface: SurfaceType, isDropdownItem?: boolean) => string;
|
|
17
|
+
export declare const linkSubheadingClasses: () => string;
|
|
18
|
+
export declare const dropdownClasses: (open: boolean, columns: NavLinkDropdownColumnsType) => string;
|
|
19
|
+
export declare const dropdownClipClasses: () => string;
|
|
20
|
+
export declare const dropdownPanelClasses: () => string;
|
|
21
|
+
export declare const dropdownSlotClasses: (columns: NavLinkDropdownColumnsType) => string;
|
|
22
|
+
export declare const overviewClasses: () => string;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import '../../../types/global.d.ts';
|
|
2
|
+
import { type CSSResultGroup } from 'lit';
|
|
3
|
+
import { Base } from '../../../common/Base/Base.js';
|
|
4
|
+
import { type StackAlignType, type StackDirectionType, type StackGapType } from './Stack.props.js';
|
|
5
|
+
/** @slot - Stack content. */
|
|
6
|
+
export declare class Stack extends Base {
|
|
7
|
+
static styles: CSSResultGroup;
|
|
8
|
+
/**
|
|
9
|
+
* Stack direction — vertical (column) or horizontal (row)
|
|
10
|
+
*/
|
|
11
|
+
direction: StackDirectionType;
|
|
12
|
+
/**
|
|
13
|
+
* Gap between items
|
|
14
|
+
*/
|
|
15
|
+
gap: StackGapType;
|
|
16
|
+
/**
|
|
17
|
+
* Cross-axis alignment of items
|
|
18
|
+
*/
|
|
19
|
+
align: StackAlignType;
|
|
20
|
+
/**
|
|
21
|
+
* Whether items should wrap when horizontal
|
|
22
|
+
*/
|
|
23
|
+
wrap: boolean;
|
|
24
|
+
render(): import("lit").TemplateResult<1>;
|
|
25
|
+
}
|
|
26
|
+
declare global {
|
|
27
|
+
interface HTMLElementTagNameMap {
|
|
28
|
+
'dsgn-stack': Stack;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,300 @@
|
|
|
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/Stack/src/Stack.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/Stack/src/Stack.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
|
+
}
|
|
102
|
+
}
|
|
103
|
+
@layer utilities {
|
|
104
|
+
.static {
|
|
105
|
+
position: static;
|
|
106
|
+
}
|
|
107
|
+
.flex {
|
|
108
|
+
display: flex;
|
|
109
|
+
}
|
|
110
|
+
.flex-col {
|
|
111
|
+
flex-direction: column;
|
|
112
|
+
}
|
|
113
|
+
.flex-row {
|
|
114
|
+
flex-direction: row;
|
|
115
|
+
}
|
|
116
|
+
.flex-wrap {
|
|
117
|
+
flex-wrap: wrap;
|
|
118
|
+
}
|
|
119
|
+
.items-center {
|
|
120
|
+
align-items: center;
|
|
121
|
+
}
|
|
122
|
+
.items-end {
|
|
123
|
+
align-items: flex-end;
|
|
124
|
+
}
|
|
125
|
+
.items-start {
|
|
126
|
+
align-items: flex-start;
|
|
127
|
+
}
|
|
128
|
+
.items-stretch {
|
|
129
|
+
align-items: stretch;
|
|
130
|
+
}
|
|
131
|
+
.gap-0 {
|
|
132
|
+
gap: calc(var(--spacing) * 0);
|
|
133
|
+
}
|
|
134
|
+
.gap-2 {
|
|
135
|
+
gap: calc(var(--spacing) * 2);
|
|
136
|
+
}
|
|
137
|
+
.gap-3 {
|
|
138
|
+
gap: calc(var(--spacing) * 3);
|
|
139
|
+
}
|
|
140
|
+
.gap-4 {
|
|
141
|
+
gap: calc(var(--spacing) * 4);
|
|
142
|
+
}
|
|
143
|
+
.gap-6 {
|
|
144
|
+
gap: calc(var(--spacing) * 6);
|
|
145
|
+
}
|
|
146
|
+
.gap-8 {
|
|
147
|
+
gap: calc(var(--spacing) * 8);
|
|
148
|
+
}
|
|
149
|
+
.md\\:gap-6 {
|
|
150
|
+
@media (width >= 48rem) {
|
|
151
|
+
gap: calc(var(--spacing) * 6);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
.md\\:gap-8 {
|
|
155
|
+
@media (width >= 48rem) {
|
|
156
|
+
gap: calc(var(--spacing) * 8);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
.md\\:gap-12 {
|
|
160
|
+
@media (width >= 48rem) {
|
|
161
|
+
gap: calc(var(--spacing) * 12);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
@property --dsgn-border-sweep-angle {
|
|
166
|
+
syntax: '<angle>';
|
|
167
|
+
inherits: false;
|
|
168
|
+
initial-value: 0deg;
|
|
169
|
+
}
|
|
170
|
+
@layer properties {
|
|
171
|
+
@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
|
|
172
|
+
*, ::before, ::after, ::backdrop {
|
|
173
|
+
--dsgn-border-sweep-angle: 0deg;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
`;
|
|
178
|
+
var Stack_default = styles2;
|
|
179
|
+
|
|
180
|
+
// common/helpers/enum-validator.ts
|
|
181
|
+
var enumValidator = (propName, enumSet, candidateValue) => {
|
|
182
|
+
if (!enumSet.has(candidateValue)) {
|
|
183
|
+
throw new Error(`Invalid prop ${propName} of value ${candidateValue}. Expected one of: ${Array.from(enumSet).join(", ")}`);
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
// common/helpers/enum-creator.ts
|
|
188
|
+
var enumCreator = (acceptableValues, propName, type, other = {}) => {
|
|
189
|
+
const acceptableValuesSet = new Set(acceptableValues);
|
|
190
|
+
return {
|
|
191
|
+
type,
|
|
192
|
+
hasChanged(newValue, oldValue) {
|
|
193
|
+
if (newValue !== oldValue) {
|
|
194
|
+
enumValidator(propName, acceptableValuesSet, newValue);
|
|
195
|
+
return true;
|
|
196
|
+
}
|
|
197
|
+
return false;
|
|
198
|
+
},
|
|
199
|
+
...other
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
// components/Stack/src/Stack.props.ts
|
|
204
|
+
var stackDirectionValues = {
|
|
205
|
+
VERTICAL: "vertical",
|
|
206
|
+
HORIZONTAL: "horizontal"
|
|
207
|
+
};
|
|
208
|
+
var stackDirectionProps = enumCreator(Object.values(stackDirectionValues), "direction", String, { reflect: true });
|
|
209
|
+
var stackGapValues = {
|
|
210
|
+
NONE: "none",
|
|
211
|
+
XS: "xs",
|
|
212
|
+
SM: "sm",
|
|
213
|
+
MD: "md",
|
|
214
|
+
LG: "lg",
|
|
215
|
+
XL: "xl"
|
|
216
|
+
};
|
|
217
|
+
var stackGapProps = enumCreator(Object.values(stackGapValues), "gap", String, { reflect: true });
|
|
218
|
+
var stackAlignValues = {
|
|
219
|
+
START: "start",
|
|
220
|
+
CENTER: "center",
|
|
221
|
+
END: "end",
|
|
222
|
+
STRETCH: "stretch"
|
|
223
|
+
};
|
|
224
|
+
var stackAlignProps = enumCreator(Object.values(stackAlignValues), "align", String, { reflect: true });
|
|
225
|
+
|
|
226
|
+
// ../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
227
|
+
function r(e) {
|
|
228
|
+
var t, f, n = "";
|
|
229
|
+
if (typeof e == "string" || typeof e == "number")
|
|
230
|
+
n += e;
|
|
231
|
+
else if (typeof e == "object")
|
|
232
|
+
if (Array.isArray(e)) {
|
|
233
|
+
var o = e.length;
|
|
234
|
+
for (t = 0;t < o; t++)
|
|
235
|
+
e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
|
|
236
|
+
} else
|
|
237
|
+
for (f in e)
|
|
238
|
+
e[f] && (n && (n += " "), n += f);
|
|
239
|
+
return n;
|
|
240
|
+
}
|
|
241
|
+
function clsx() {
|
|
242
|
+
for (var e, t, f = 0, n = "", o = arguments.length;f < o; f++)
|
|
243
|
+
(e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
244
|
+
return n;
|
|
245
|
+
}
|
|
246
|
+
var clsx_default = clsx;
|
|
247
|
+
|
|
248
|
+
// components/Stack/src/Stack.styles.ts
|
|
249
|
+
var gapClasses = {
|
|
250
|
+
none: ["gap-0"],
|
|
251
|
+
xs: ["gap-2"],
|
|
252
|
+
sm: ["gap-3"],
|
|
253
|
+
md: ["gap-4", "md:gap-6"],
|
|
254
|
+
lg: ["gap-6", "md:gap-8"],
|
|
255
|
+
xl: ["gap-8", "md:gap-12"]
|
|
256
|
+
};
|
|
257
|
+
var alignClasses = {
|
|
258
|
+
start: "items-start",
|
|
259
|
+
center: "items-center",
|
|
260
|
+
end: "items-end",
|
|
261
|
+
stretch: "items-stretch"
|
|
262
|
+
};
|
|
263
|
+
var classNames = (direction, gap, align, wrap) => {
|
|
264
|
+
return clsx_default("flex", direction === "vertical" ? "flex-col" : "flex-row", gapClasses[gap], alignClasses[align], wrap && "flex-wrap");
|
|
265
|
+
};
|
|
266
|
+
|
|
267
|
+
// components/Stack/src/Stack.ts
|
|
268
|
+
class Stack extends Base {
|
|
269
|
+
constructor() {
|
|
270
|
+
super(...arguments);
|
|
271
|
+
this.direction = stackDirectionValues.VERTICAL;
|
|
272
|
+
this.gap = stackGapValues.MD;
|
|
273
|
+
this.align = stackAlignValues.STRETCH;
|
|
274
|
+
this.wrap = false;
|
|
275
|
+
}
|
|
276
|
+
static styles = [Base.styles, Stack_default];
|
|
277
|
+
render() {
|
|
278
|
+
return html2`<div
|
|
279
|
+
class="${classNames(this.direction, this.gap, this.align, this.wrap)}"
|
|
280
|
+
>
|
|
281
|
+
<slot></slot>
|
|
282
|
+
</div>`;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
__legacyDecorateClassTS([
|
|
286
|
+
property({ ...stackDirectionProps })
|
|
287
|
+
], Stack.prototype, "direction", undefined);
|
|
288
|
+
__legacyDecorateClassTS([
|
|
289
|
+
property({ ...stackGapProps })
|
|
290
|
+
], Stack.prototype, "gap", undefined);
|
|
291
|
+
__legacyDecorateClassTS([
|
|
292
|
+
property({ ...stackAlignProps })
|
|
293
|
+
], Stack.prototype, "align", undefined);
|
|
294
|
+
__legacyDecorateClassTS([
|
|
295
|
+
property({ type: Boolean, reflect: true })
|
|
296
|
+
], Stack.prototype, "wrap", undefined);
|
|
297
|
+
defineElement("dsgn-stack", Stack);
|
|
298
|
+
export {
|
|
299
|
+
Stack
|
|
300
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const stackDirectionValues: {
|
|
2
|
+
readonly VERTICAL: "vertical";
|
|
3
|
+
readonly HORIZONTAL: "horizontal";
|
|
4
|
+
};
|
|
5
|
+
export type StackDirectionType = (typeof stackDirectionValues)[keyof typeof stackDirectionValues];
|
|
6
|
+
export declare const stackDirectionProps: import("lit").PropertyDeclaration<unknown, unknown>;
|
|
7
|
+
export declare const stackGapValues: {
|
|
8
|
+
readonly NONE: "none";
|
|
9
|
+
readonly XS: "xs";
|
|
10
|
+
readonly SM: "sm";
|
|
11
|
+
readonly MD: "md";
|
|
12
|
+
readonly LG: "lg";
|
|
13
|
+
readonly XL: "xl";
|
|
14
|
+
};
|
|
15
|
+
export type StackGapType = (typeof stackGapValues)[keyof typeof stackGapValues];
|
|
16
|
+
export declare const stackGapProps: import("lit").PropertyDeclaration<unknown, unknown>;
|
|
17
|
+
export declare const stackAlignValues: {
|
|
18
|
+
readonly START: "start";
|
|
19
|
+
readonly CENTER: "center";
|
|
20
|
+
readonly END: "end";
|
|
21
|
+
readonly STRETCH: "stretch";
|
|
22
|
+
};
|
|
23
|
+
export type StackAlignType = (typeof stackAlignValues)[keyof typeof stackAlignValues];
|
|
24
|
+
export declare const stackAlignProps: import("lit").PropertyDeclaration<unknown, unknown>;
|
|
@@ -0,0 +1,53 @@
|
|
|
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/Stack/src/Stack.props.ts
|
|
25
|
+
var stackDirectionValues = {
|
|
26
|
+
VERTICAL: "vertical",
|
|
27
|
+
HORIZONTAL: "horizontal"
|
|
28
|
+
};
|
|
29
|
+
var stackDirectionProps = enumCreator(Object.values(stackDirectionValues), "direction", String, { reflect: true });
|
|
30
|
+
var stackGapValues = {
|
|
31
|
+
NONE: "none",
|
|
32
|
+
XS: "xs",
|
|
33
|
+
SM: "sm",
|
|
34
|
+
MD: "md",
|
|
35
|
+
LG: "lg",
|
|
36
|
+
XL: "xl"
|
|
37
|
+
};
|
|
38
|
+
var stackGapProps = enumCreator(Object.values(stackGapValues), "gap", String, { reflect: true });
|
|
39
|
+
var stackAlignValues = {
|
|
40
|
+
START: "start",
|
|
41
|
+
CENTER: "center",
|
|
42
|
+
END: "end",
|
|
43
|
+
STRETCH: "stretch"
|
|
44
|
+
};
|
|
45
|
+
var stackAlignProps = enumCreator(Object.values(stackAlignValues), "align", String, { reflect: true });
|
|
46
|
+
export {
|
|
47
|
+
stackAlignProps,
|
|
48
|
+
stackAlignValues,
|
|
49
|
+
stackDirectionProps,
|
|
50
|
+
stackDirectionValues,
|
|
51
|
+
stackGapProps,
|
|
52
|
+
stackGapValues
|
|
53
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
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 TextColorType, type TextSizeType, type TextWeightType } from './Text.props.js';
|
|
6
|
+
/** @slot - Text content. */
|
|
7
|
+
export declare class Text extends Base {
|
|
8
|
+
static styles: CSSResultGroup;
|
|
9
|
+
/**
|
|
10
|
+
* Surface theme variant (light or dark)
|
|
11
|
+
*/
|
|
12
|
+
surface: SurfaceType;
|
|
13
|
+
/**
|
|
14
|
+
* Text size scale
|
|
15
|
+
*/
|
|
16
|
+
size: TextSizeType;
|
|
17
|
+
/**
|
|
18
|
+
* Font weight
|
|
19
|
+
*/
|
|
20
|
+
weight: TextWeightType;
|
|
21
|
+
/**
|
|
22
|
+
* Semantic text color
|
|
23
|
+
*/
|
|
24
|
+
color: TextColorType;
|
|
25
|
+
updated(changedProperties: Map<string | number | symbol, unknown>): void;
|
|
26
|
+
render(): import("lit").TemplateResult<1>;
|
|
27
|
+
}
|
|
28
|
+
declare global {
|
|
29
|
+
interface HTMLElementTagNameMap {
|
|
30
|
+
'dsgn-text': Text;
|
|
31
|
+
}
|
|
32
|
+
}
|