@kcascend/liquid-ui 0.0.7 → 0.0.9
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/dist/components/Icon/icons.d.ts +1 -0
- package/dist/components/Icon/icons.d.ts.map +1 -1
- package/dist/components/Icon/icons.js +1 -0
- package/dist/components/Link/Link.js +2 -2
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/Modal/Modal.js +2 -1
- package/dist/generated/tokens.d.ts +1772 -55
- package/dist/generated/tokens.d.ts.map +1 -1
- package/dist/generated/tokens.js +2836 -1119
- package/dist/governance/checkboxGovernance.js +2 -2
- package/dist/governance/linkGovernance.js +2 -2
- package/dist/governance/modalGovernance.js +2 -2
- package/dist/styles.css +29 -48
- package/dist/tokens/components.css +1 -1
- package/dist/tokens/primitives.css +4 -0
- package/dist/tokens/semantic.css +21 -13
- package/package.json +6 -2
|
@@ -7,6 +7,7 @@ export declare const icons: {
|
|
|
7
7
|
arrow_up: import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
arrow_down: import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
arrow_right: import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
arrow_forward: import("react/jsx-runtime").JSX.Element;
|
|
10
11
|
arrow_left: import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
chevron_down: import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
check: import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../src/components/Icon/icons.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,KAAK
|
|
1
|
+
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../src/components/Icon/icons.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;CA6PjB,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG,MAAM,OAAO,KAAK,CAAC"}
|
|
@@ -8,6 +8,7 @@ export const icons = {
|
|
|
8
8
|
arrow_up: (_jsxs("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { d: "M12 19V5", stroke: "currentColor", strokeWidth: "2" }), _jsx("path", { d: "M5 12l7-7 7 7", stroke: "currentColor", strokeWidth: "2", fill: "none" })] })),
|
|
9
9
|
arrow_down: (_jsxs("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { d: "M12 5v14", stroke: "currentColor", strokeWidth: "2" }), _jsx("path", { d: "M19 12l-7 7-7-7", stroke: "currentColor", strokeWidth: "2", fill: "none" })] })),
|
|
10
10
|
arrow_right: (_jsx("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M9.5 17V7L14.5 12L9.5 17Z", fill: "currentColor" }) })),
|
|
11
|
+
arrow_forward: (_jsx("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M4 12H20M14 6L20 12L14 18", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "square", strokeLinejoin: "miter" }) })),
|
|
11
12
|
arrow_left: (_jsx("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M14.5 17L9.5 12L14.5 7V17Z", fill: "currentColor" }) })),
|
|
12
13
|
chevron_down: (_jsx("svg", { viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M5 8L10 13L15 8", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })),
|
|
13
14
|
check: (_jsx("svg", { viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M2 8.5L6.5 13L14 3.5", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })),
|
|
@@ -16,8 +16,8 @@ export function Link(props) {
|
|
|
16
16
|
const iconSize = size === 'lg' ? 20 : 16;
|
|
17
17
|
if ('href' in props && props.href) {
|
|
18
18
|
const { appearance: _appearance, children: _children, className: _className, href, showTrailingIcon: _showTrailingIcon, size: _size, state: _state, style: _style, ...anchorProps } = props;
|
|
19
|
-
return (_jsxs("a", { ...anchorProps, className: getClassName(className), "data-appearance": appearance, "data-size": size, "data-state": state, href: href, style: style, children: [_jsx("span", { className: "liquid-link__label", children: children }), showIcon ? (_jsx("span", { "aria-hidden": "true", className: "liquid-link__icon", children: _jsx(Icon, { name: "
|
|
19
|
+
return (_jsxs("a", { ...anchorProps, className: getClassName(className), "data-appearance": appearance, "data-size": size, "data-state": state, href: href, style: style, children: [_jsx("span", { className: "liquid-link__label", children: children }), showIcon ? (_jsx("span", { "aria-hidden": "true", className: "liquid-link__icon", children: _jsx(Icon, { name: "arrow_forward", size: iconSize }) })) : null] }));
|
|
20
20
|
}
|
|
21
21
|
const { appearance: _appearance, children: _children, className: _className, showTrailingIcon: _showTrailingIcon, size: _size, state: _state, style: _style, ...buttonProps } = props;
|
|
22
|
-
return (_jsxs("button", { ...buttonProps, className: getClassName(className), "data-appearance": appearance, "data-size": size, "data-state": state, style: style, type: buttonProps.type ?? 'button', children: [_jsx("span", { className: "liquid-link__label", children: children }), showIcon ? (_jsx("span", { "aria-hidden": "true", className: "liquid-link__icon", children: _jsx(Icon, { name: "
|
|
22
|
+
return (_jsxs("button", { ...buttonProps, className: getClassName(className), "data-appearance": appearance, "data-size": size, "data-state": state, style: style, type: buttonProps.type ?? 'button', children: [_jsx("span", { className: "liquid-link__label", children: children }), showIcon ? (_jsx("span", { "aria-hidden": "true", className: "liquid-link__icon", children: _jsx(Icon, { name: "arrow_forward", size: iconSize }) })) : null] }));
|
|
23
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/Modal.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAoC,UAAU,EAAE,MAAM,aAAa,CAAC;AA6BhF,wBAAgB,KAAK,CAAC,EACpB,QAAQ,EACR,SAAS,EACT,gBAAiC,EACjC,WAAuN,EACvN,YAAY,EACZ,KAAwB,EACxB,OAAO,EACP,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,kBAA8B,EAC9B,oBAAoB,EACpB,oBAA+B,EAC/B,eAAsB,EACtB,UAAU,EACV,KAAK,EACL,mBAAqC,EACrC,KAAe,EACf,IAAgB,EAChB,GAAG,KAAK,EACT,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/Modal.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAoC,UAAU,EAAE,MAAM,aAAa,CAAC;AA6BhF,wBAAgB,KAAK,CAAC,EACpB,QAAQ,EACR,SAAS,EACT,gBAAiC,EACjC,WAAuN,EACvN,YAAY,EACZ,KAAwB,EACxB,OAAO,EACP,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,kBAA8B,EAC9B,oBAAoB,EACpB,oBAA+B,EAC/B,eAAsB,EACtB,UAAU,EACV,KAAK,EACL,mBAAqC,EACrC,KAAe,EACf,IAAgB,EAChB,GAAG,KAAK,EACT,EAAE,UAAU,2CA8GZ"}
|
|
@@ -23,5 +23,6 @@ export function Modal({ children, className, closeButtonLabel = 'Close dialog',
|
|
|
23
23
|
const resolvedFooterLayout = footerLayout ?? getDefaultFooterLayout(tone);
|
|
24
24
|
const resolvedShowFooter = showFooter ?? tone !== 'passive';
|
|
25
25
|
const resolvedPrimaryVariant = getPrimaryVariant(tone, primaryActionVariant);
|
|
26
|
-
|
|
26
|
+
const resolvedDescription = description ?? label;
|
|
27
|
+
return (_jsxs("section", { ...props, className: getClassName(className), "data-footer-layout": resolvedFooterLayout, "data-tone": tone, style: style, children: [_jsxs("header", { className: "liquid-modal__header", children: [_jsxs("div", { className: "liquid-modal__header-content", children: [resolvedDescription ? (_jsx("p", { className: "liquid-modal__description", children: resolvedDescription })) : null, _jsx("h2", { className: "liquid-modal__title", children: title })] }), showCloseButton ? (_jsx("button", { "aria-label": closeButtonLabel, className: "liquid-modal__close", onClick: onClose, type: "button", children: _jsx(Icon, { className: "liquid-modal__close-icon", name: "close", size: 24 }) })) : null] }), _jsx("div", { className: "liquid-modal__content", children: children ? _jsx("div", { className: "liquid-modal__body", children: children }) : null }), resolvedShowFooter ? (_jsx("footer", { className: "liquid-modal__footer", children: _jsxs("div", { className: "liquid-modal__actions", children: [resolvedFooterLayout === 'single' ? (_jsx("div", { className: "liquid-modal__actions-single", children: _jsx(Button, { className: "liquid-modal__action liquid-modal__action--single", onClick: onPrimaryAction, size: "lg", variant: resolvedPrimaryVariant, children: primaryActionLabel }) })) : null, resolvedFooterLayout === 'double' ? (_jsxs("div", { className: "liquid-modal__actions-double", children: [_jsx(Button, { className: "liquid-modal__action", onClick: onPrimaryAction, size: "lg", variant: resolvedPrimaryVariant, children: primaryActionLabel }), _jsx(Button, { className: "liquid-modal__action", onClick: onSecondaryAction, size: "lg", variant: "secondary", children: secondaryActionLabel })] })) : null, resolvedFooterLayout === 'split' ? (_jsxs("div", { className: "liquid-modal__actions-split", children: [_jsxs("div", { className: "liquid-modal__actions-left", children: [_jsx(Button, { className: "liquid-modal__action", onClick: onPrimaryAction, size: "lg", variant: resolvedPrimaryVariant, children: primaryActionLabel }), _jsx(Button, { className: "liquid-modal__action", onClick: onSecondaryAction, size: "lg", variant: "secondary", children: secondaryActionLabel })] }), _jsx(Button, { className: "liquid-modal__action liquid-modal__action--option", onClick: onTertiaryAction, size: "lg", variant: "tertiary", children: tertiaryActionLabel })] })) : null] }) })) : null] }));
|
|
27
28
|
}
|