@knapsack/sandbox-components 4.53.1--canary.3986.c6043f8.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/.eslintignore +1 -0
- package/.eslintrc.cjs +10 -0
- package/.lintstagedrc.mjs +11 -0
- package/dist/css/ks-sandbox-styles.css +1229 -0
- package/dist/react/accordion.d.ts +15 -0
- package/dist/react/accordion.d.ts.map +1 -0
- package/dist/react/accordion.js +28 -0
- package/dist/react/accordion.js.map +1 -0
- package/dist/react/badge.d.ts +7 -0
- package/dist/react/badge.d.ts.map +1 -0
- package/dist/react/badge.js +9 -0
- package/dist/react/badge.js.map +1 -0
- package/dist/react/button.d.ts +16 -0
- package/dist/react/button.d.ts.map +1 -0
- package/dist/react/button.js +11 -0
- package/dist/react/button.js.map +1 -0
- package/dist/react/card-base.d.ts +7 -0
- package/dist/react/card-base.d.ts.map +1 -0
- package/dist/react/card-base.js +8 -0
- package/dist/react/card-base.js.map +1 -0
- package/dist/react/card-template-demo.d.ts +3 -0
- package/dist/react/card-template-demo.d.ts.map +1 -0
- package/dist/react/card-template-demo.js +5 -0
- package/dist/react/card-template-demo.js.map +1 -0
- package/dist/react/card.d.ts +7 -0
- package/dist/react/card.d.ts.map +1 -0
- package/dist/react/card.js +16 -0
- package/dist/react/card.js.map +1 -0
- package/dist/react/grid.d.ts +8 -0
- package/dist/react/grid.d.ts.map +1 -0
- package/dist/react/grid.js +9 -0
- package/dist/react/grid.js.map +1 -0
- package/dist/react/hero.d.ts +12 -0
- package/dist/react/hero.d.ts.map +1 -0
- package/dist/react/hero.js +23 -0
- package/dist/react/hero.js.map +1 -0
- package/dist/react/index.d.ts +12 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +12 -0
- package/dist/react/index.js.map +1 -0
- package/dist/react/json-schema-playground.d.ts +3 -0
- package/dist/react/json-schema-playground.d.ts.map +1 -0
- package/dist/react/json-schema-playground.js +3 -0
- package/dist/react/json-schema-playground.js.map +1 -0
- package/dist/react/slot-references.d.ts +8 -0
- package/dist/react/slot-references.d.ts.map +1 -0
- package/dist/react/slot-references.js +9 -0
- package/dist/react/slot-references.js.map +1 -0
- package/dist/react/starter-template.d.ts +5 -0
- package/dist/react/starter-template.d.ts.map +1 -0
- package/dist/react/starter-template.js +8 -0
- package/dist/react/starter-template.js.map +1 -0
- package/dist/web-components/button.d.ts +2 -0
- package/dist/web-components/button.d.ts.map +1 -0
- package/dist/web-components/button.js +41 -0
- package/dist/web-components/button.js.map +1 -0
- package/dist/web-components/index.d.ts +2 -0
- package/dist/web-components/index.d.ts.map +1 -0
- package/dist/web-components/index.js +2 -0
- package/dist/web-components/index.js.map +1 -0
- package/package.json +63 -0
- package/postcss.config.cjs +10 -0
- package/readme.md +1 -0
- package/tailwind.config.cjs +52 -0
- package/tsconfig.json +9 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type Panel = {
|
|
3
|
+
title: string;
|
|
4
|
+
content: React.ReactNode;
|
|
5
|
+
id: string;
|
|
6
|
+
};
|
|
7
|
+
type AccordionProps = {
|
|
8
|
+
panels?: Panel[];
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* @todo extract tailwind classes out to a css file
|
|
12
|
+
*/
|
|
13
|
+
export declare const Accordion: React.FC<AccordionProps>;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=accordion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../../src/react/accordion.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,KAAK,cAAc,GAAG;IACpB,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;CAClB,CAAC;AAsFF;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAgC9C,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
const defaultPanels = [
|
|
4
|
+
{
|
|
5
|
+
title: 'Panel 1',
|
|
6
|
+
content: (_jsxs("div", { children: [_jsx("h3", { className: "font-bold", children: "I am a panel" }), _jsx("p", { children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, nunc at pellentesque elementum, risus nisl cursus lacus, nec sagittis sem nunc a nunc. Sed id semper nunc. Sed auctor, nunc in cursus tincidunt, sem urna porttitor magna, ac faucibus est orci et nisl. Donec in nunc in turpis consectetur convallis at a nisl. Nullam non neque orci. Donec luctus, nunc at varius pharetra, risus mi aliquet ante, non venenatis mi est id enim." }), _jsx("p", { children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, nunc at pellentesque elementum, risus nisl cursus lacus, nec sagittis sem nunc a nunc. Sed id semper nunc. Sed auctor, nunc in cursus tincidunt, sem urna porttitor magna, ac faucibus est orci et nisl. Donec in nunc in turpis consectetur convallis at a nisl. Nullam non neque orci. Donec luctus, nunc at varius pharetra, risus mi aliquet ante, non venenatis mi est id enim." })] })),
|
|
7
|
+
id: 'panel-1',
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
title: 'Panel 2',
|
|
11
|
+
content: (_jsxs("div", { children: [_jsx("h3", { className: "font-bold", children: "I am a another panel" }), _jsx("p", { children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, nunc at pellentesque elementum, risus nisl cursus lacus, nec sagittis sem nunc a nunc. Sed id semper nunc. Sed auctor, nunc in cursus tincidunt, sem urna porttitor magna, ac faucibus est orci et nisl. Donec in nunc in turpis consectetur convallis at a nisl. Nullam non neque orci. Donec luctus, nunc at varius pharetra, risus mi aliquet ante, non venenatis mi est id enim." })] })),
|
|
12
|
+
id: 'panel-2',
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
title: 'Panel 3',
|
|
16
|
+
content: (_jsxs("div", { children: [_jsx("h3", { className: "font-bold", children: "Yup, you guessed it, another panel" }), _jsx("p", { children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, nunc at pellentesque elementum, risus nisl cursus lacus, nec sagittis sem nunc a nunc. Sed id semper nunc. Sed auctor, nunc in cursus tincidunt, sem urna porttitor magna, ac faucibus est orci et nisl. Donec in nunc in turpis consectetur convallis at a nisl. Nullam non neque orci. Donec luctus, nunc at varius pharetra, risus mi aliquet ante, non venenatis mi est id enim." }), _jsx("p", { children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, nunc at pellentesque elementum, risus nisl cursus lacus, nec sagittis sem nunc a nunc. Sed id semper nunc. Sed auctor, nunc in cursus tincidunt, sem urna porttitor magna, ac faucibus est orci et nisl. Donec in nunc in turpis consectetur convallis at a nisl. Nullam non neque orci. Donec luctus, nunc at varius pharetra, risus mi aliquet ante, non venenatis mi est id enim." }), _jsx("p", { children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, nunc at pellentesque elementum, risus nisl cursus lacus, nec sagittis sem nunc a nunc. Sed id semper nunc. Sed auctor, nunc in cursus tincidunt, sem urna porttitor magna, ac faucibus est orci et nisl. Donec in nunc in turpis consectetur convallis at a nisl. Nullam non neque orci. Donec luctus, nunc at varius pharetra, risus mi aliquet ante, non venenatis mi est id enim." })] })),
|
|
17
|
+
id: 'panel-3',
|
|
18
|
+
},
|
|
19
|
+
];
|
|
20
|
+
/**
|
|
21
|
+
* @todo extract tailwind classes out to a css file
|
|
22
|
+
*/
|
|
23
|
+
export const Accordion = ({ panels }) => {
|
|
24
|
+
const [openPanel, setOpenPanel] = useState(null);
|
|
25
|
+
const renderedPanels = panels || defaultPanels;
|
|
26
|
+
return (_jsx("div", { className: "w-screen p-2 bg-white rounded border border-slate-900 border-solid", children: renderedPanels.map((panel, index) => (_jsxs("div", { children: [_jsxs("div", { className: "flex justify-between items-center", children: [_jsx("h2", { className: "text-lg font-bold", children: panel.title }), _jsx("button", { type: "button", onClick: () => setOpenPanel(index === openPanel ? null : index), className: "p-1 rounded hover:bg-gray-200 focus:outline-none focus:ring", "aria-expanded": openPanel === index, children: openPanel === index ? 'Collapse' : 'Expand' })] }), openPanel === index && (_jsx("div", { className: `overflow-hidden transition-all ease-in-out duration-300 mt-2 bg-slate-100 ${openPanel === index ? 'h-auto' : 'h-0'}`, children: panel.content }))] }, panel.id))) }));
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=accordion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion.js","sourceRoot":"","sources":["../../src/react/accordion.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAYxC,MAAM,aAAa,GAAY;IAC7B;QACE,KAAK,EAAE,SAAS;QAChB,OAAO,EAAE,CACP,0BACE,aAAI,SAAS,EAAC,WAAW,6BAAkB,EAC3C,qdAQI,EACJ,qdAQI,IACA,CACP;QACD,EAAE,EAAE,SAAS;KACd;IACD;QACE,KAAK,EAAE,SAAS;QAChB,OAAO,EAAE,CACP,0BACE,aAAI,SAAS,EAAC,WAAW,qCAA0B,EACnD,qdAQI,IACA,CACP;QACD,EAAE,EAAE,SAAS;KACd;IACD;QACE,KAAK,EAAE,SAAS;QAChB,OAAO,EAAE,CACP,0BACE,aAAI,SAAS,EAAC,WAAW,mDAAwC,EACjE,qdAQI,EACJ,qdAQI,EACJ,qdAQI,IACA,CACP;QACD,EAAE,EAAE,SAAS;KACd;CACF,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAA6B,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE;IAChE,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC,CAAC;IAEhE,MAAM,cAAc,GAAG,MAAM,IAAI,aAAa,CAAC;IAC/C,OAAO,CACL,cAAK,SAAS,EAAC,oEAAoE,YAChF,cAAc,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CACpC,0BACE,eAAK,SAAS,EAAC,mCAAmC,aAChD,aAAI,SAAS,EAAC,mBAAmB,YAAE,KAAK,CAAC,KAAK,GAAM,EACpD,iBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,EAC/D,SAAS,EAAC,6DAA6D,mBACxD,SAAS,KAAK,KAAK,YAEjC,SAAS,KAAK,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,GACrC,IACL,EACL,SAAS,KAAK,KAAK,IAAI,CACtB,cACE,SAAS,EAAE,6EACT,SAAS,KAAK,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KACnC,EAAE,YAED,KAAK,CAAC,OAAO,GACV,CACP,KApBO,KAAK,CAAC,EAAE,CAqBZ,CACP,CAAC,GACE,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../src/react/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,CAAC;IAC5C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,QAAQ,CAAC;CACvC,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CActC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
export const Badge = ({ children = 'ima badge', type = 'primary', }) => {
|
|
4
|
+
return (_jsx("span", { className: clsx({
|
|
5
|
+
badge: true,
|
|
6
|
+
[`badge--type-${type}`]: true,
|
|
7
|
+
}), children: children }));
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=badge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge.js","sourceRoot":"","sources":["../../src/react/badge.tsx"],"names":[],"mappings":";AACA,OAAO,IAAI,MAAM,MAAM,CAAC;AAOxB,MAAM,CAAC,MAAM,KAAK,GAAyB,CAAC,EAC1C,QAAQ,GAAG,WAAW,EACtB,IAAI,GAAG,SAAS,GACjB,EAAE,EAAE;IACH,OAAO,CACL,eACE,SAAS,EAAE,IAAI,CAAC;YACd,KAAK,EAAE,IAAI;YACX,CAAC,eAAe,IAAI,EAAE,CAAC,EAAE,IAAI;SAC9B,CAAC,YAED,QAAQ,GACJ,CACR,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ButtonProps {
|
|
3
|
+
/**
|
|
4
|
+
* The button label
|
|
5
|
+
*/
|
|
6
|
+
label?: string;
|
|
7
|
+
rounded?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* What color do you want it to be?
|
|
10
|
+
*/
|
|
11
|
+
type?: 'primary' | 'secondary' | 'tertiary';
|
|
12
|
+
size?: 'small' | 'medium' | 'large';
|
|
13
|
+
}
|
|
14
|
+
export declare const Button: React.FC<ButtonProps>;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/react/button.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,UAAU,WAAW;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,CAAC;IAC5C,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;CACrC;AAED,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAmBxC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
|
+
export const Button = ({ label = 'Button', rounded = false, type = 'primary', size = 'medium', }) => {
|
|
4
|
+
return (_jsx("button", { type: "button", className: clsx({
|
|
5
|
+
button: true,
|
|
6
|
+
'button--rounded': rounded,
|
|
7
|
+
[`button--size-${size}`]: true,
|
|
8
|
+
[`button--type-${type}`]: true,
|
|
9
|
+
}), children: label }));
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../src/react/button.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAgB5B,MAAM,CAAC,MAAM,MAAM,GAA0B,CAAC,EAC5C,KAAK,GAAG,QAAQ,EAChB,OAAO,GAAG,KAAK,EACf,IAAI,GAAG,SAAS,EAChB,IAAI,GAAG,QAAQ,GAChB,EAAE,EAAE;IACH,OAAO,CACL,iBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,IAAI,CAAC;YACd,MAAM,EAAE,IAAI;YACZ,iBAAiB,EAAE,OAAO;YAC1B,CAAC,gBAAgB,IAAI,EAAE,CAAC,EAAE,IAAI;YAC9B,CAAC,gBAAgB,IAAI,EAAE,CAAC,EAAE,IAAI;SAC/B,CAAC,YAED,KAAK,GACC,CACV,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card-base.d.ts","sourceRoot":"","sources":["../../src/react/card-base.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,GAAG,CAAC;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B,CAiBA,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
export const CardBase = ({ footer, imageSrc, title }) => {
|
|
4
|
+
return (_jsxs("aside", { className: clsx({
|
|
5
|
+
card: true,
|
|
6
|
+
}), children: [title && _jsx("header", { children: title }), imageSrc && _jsx("img", { src: imageSrc, alt: "Placeholder" }), footer && (_jsxs("details", { children: [_jsx("summary", { children: "Footer" }), footer] }))] }));
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=card-base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card-base.js","sourceRoot":"","sources":["../../src/react/card-base.tsx"],"names":[],"mappings":";AACA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,MAAM,CAAC,MAAM,QAAQ,GAIhB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,EAAE;IACnC,OAAO,CACL,iBACE,SAAS,EAAE,IAAI,CAAC;YACd,IAAI,EAAE,IAAI;SACX,CAAC,aAED,KAAK,IAAI,2BAAS,KAAK,GAAU,EACjC,QAAQ,IAAI,cAAK,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAC,aAAa,GAAG,EACpD,MAAM,IAAI,CACT,8BACE,uCAAyB,EACxB,MAAM,IACC,CACX,IACK,CACT,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card-template-demo.d.ts","sourceRoot":"","sources":["../../src/react/card-template-demo.tsx"],"names":[],"mappings":";AAGA,eAAO,MAAM,SAAS,mBAUrB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Card } from './card.js';
|
|
3
|
+
import { Badge } from './badge.js';
|
|
4
|
+
export const CardDemo1 = () => (_jsx(Card, { image: "wide", title: "Hello Card World!", footer: _jsxs("div", { children: [_jsx(Badge, { type: "primary", children: "4" }), " new messages"] }) }));
|
|
5
|
+
//# sourceMappingURL=card-template-demo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card-template-demo.js","sourceRoot":"","sources":["../../src/react/card-template-demo.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,EAAE,CAAC,CAC7B,KAAC,IAAI,IACH,KAAK,EAAC,MAAM,EACZ,KAAK,EAAC,mBAAmB,EACzB,MAAM,EACJ,0BACE,KAAC,KAAK,IAAC,IAAI,EAAC,SAAS,kBAAU,qBAC3B,GAER,CACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../src/react/card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IACjC,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B,CAYA,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { CardBase } from './card-base.js';
|
|
3
|
+
export const Card = ({ footer, image = 'none', title }) => {
|
|
4
|
+
const imgUrl = (() => {
|
|
5
|
+
switch (image) {
|
|
6
|
+
case 'wide':
|
|
7
|
+
return 'https://knapsack.imgix.net/site/ks-sandbox/wide-rb9p92zdz3.png';
|
|
8
|
+
case 'tall':
|
|
9
|
+
return 'https://knapsack.imgix.net/site/ks-sandbox/tall-lllfl2y1nz.png';
|
|
10
|
+
case 'none':
|
|
11
|
+
return '';
|
|
12
|
+
}
|
|
13
|
+
})();
|
|
14
|
+
return _jsx(CardBase, { title: title, footer: footer, imageSrc: imgUrl });
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.js","sourceRoot":"","sources":["../../src/react/card.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,MAAM,CAAC,MAAM,IAAI,GAIZ,CAAC,EAAE,MAAM,EAAE,KAAK,GAAG,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE;IACzC,MAAM,MAAM,GAAW,CAAC,GAAG,EAAE;QAC3B,QAAQ,KAAK,EAAE,CAAC;YACd,KAAK,MAAM;gBACT,OAAO,gEAAgE,CAAC;YAC1E,KAAK,MAAM;gBACT,OAAO,gEAAgE,CAAC;YAC1E,KAAK,MAAM;gBACT,OAAO,EAAE,CAAC;QACd,CAAC;IACH,CAAC,CAAC,EAAE,CAAC;IACL,OAAO,KAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAI,CAAC;AACtE,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grid.d.ts","sourceRoot":"","sources":["../../src/react/grid.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,UAAU,aAAa;IACrB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,GAAG,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;CACpC;AAED,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAWxC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
export const Grid = ({ children, gap = 'medium' }) => {
|
|
4
|
+
return (_jsx("div", { className: clsx({
|
|
5
|
+
grid: true,
|
|
6
|
+
[`grid--gap-${gap}`]: gap,
|
|
7
|
+
}), children: children }));
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=grid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grid.js","sourceRoot":"","sources":["../../src/react/grid.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAQxB,MAAM,CAAC,MAAM,IAAI,GAA4B,CAAC,EAAE,QAAQ,EAAE,GAAG,GAAG,QAAQ,EAAE,EAAE,EAAE;IAC5E,OAAO,CACL,cACE,SAAS,EAAE,IAAI,CAAC;YACd,IAAI,EAAE,IAAI;YACV,CAAC,aAAa,GAAG,EAAE,CAAC,EAAE,GAAG;SAC1B,CAAC,YAED,QAAQ,GACL,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface HeroProps {
|
|
3
|
+
title?: string;
|
|
4
|
+
ctaLabel?: string;
|
|
5
|
+
imageUrl?: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* @todo finish extracting tailwind classes out to a css file
|
|
9
|
+
*/
|
|
10
|
+
export declare const Hero: React.FC<HeroProps>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=hero.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hero.d.ts","sourceRoot":"","sources":["../../src/react/hero.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,SAAS;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAoDpC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
/**
|
|
4
|
+
* @todo finish extracting tailwind classes out to a css file
|
|
5
|
+
*/
|
|
6
|
+
export const Hero = ({ title = 'The most comprehensive & feature-rich Doodad UI Kit ever created', ctaLabel = 'See More', imageUrl = 'https://mdbcdn.b-cdn.net/img/new/slides/146.webp', }) => {
|
|
7
|
+
return (_jsx("div", { className: clsx({
|
|
8
|
+
hero: true,
|
|
9
|
+
}), style: {
|
|
10
|
+
backgroundImage: `url(${imageUrl})`,
|
|
11
|
+
}, children: _jsx("div", { className: clsx({
|
|
12
|
+
'top-0 right-0 bottom-0 left-0 h-full w-full overflow-hidden bg-[hsla(0,0%,0%,0.75)] bg-fixed': true, // purgecss: absolute top-0 right-0 bottom-0 left-0 h-full w-full overflow-hidden bg-[hsla(0,0%,0%,0.75)] bg-fixed
|
|
13
|
+
}), children: _jsx("div", { className: clsx({
|
|
14
|
+
'flex h-full items-center justify-center': true, // purgecss: flex h-full items-center justify-center
|
|
15
|
+
}), children: _jsxs("div", { className: clsx({
|
|
16
|
+
'px-6 text-center text-white md:px-12': true, // purgecss: px-6 text-center text-white md:px-12
|
|
17
|
+
}), children: [_jsx("h1", { className: clsx({
|
|
18
|
+
'mt-2 mb-16 text-5xl font-bold tracking-tight md:text-6xl xl:text-7xl': true, // purgecss: mt-2 mb-16 text-5xl font-bold tracking-tight md:text-6xl xl:text-7xl
|
|
19
|
+
}), children: title }), _jsx("button", { type: "button", className: clsx({
|
|
20
|
+
'rounded border-2 border-neutral-50 px-[46px] pt-[14px] pb-[12px] text-sm font-medium uppercase leading-normal text-neutral-50 transition duration-150 ease-in-out hover:border-neutral-100 hover:bg-neutral-100 hover:bg-opacity-10 hover:text-neutral-100 focus:border-neutral-100 focus:text-neutral-100 focus:outline-none focus:ring-0 active:border-neutral-200 active:text-neutral-200': true, // purgecss: rounded border-2 border-neutral-50 px-[46px] pt-[14px] pb-[12px] text-sm font-medium uppercase leading-normal text-neutral-50 transition duration-150 ease-in-out hover:border-neutral-100 hover:bg-neutral-100 hover:bg-opacity-10 hover:text-neutral-100 focus:border-neutral-100 focus:text-neutral-100 focus:outline-none focus:ring-0 active:border-neutral-200 active:text-neutral-200
|
|
21
|
+
}), children: ctaLabel })] }) }) }) }));
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=hero.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hero.js","sourceRoot":"","sources":["../../src/react/hero.tsx"],"names":[],"mappings":";AACA,OAAO,IAAI,MAAM,MAAM,CAAC;AAQxB;;GAEG;AACH,MAAM,CAAC,MAAM,IAAI,GAAwB,CAAC,EACxC,KAAK,GAAG,kEAAkE,EAC1E,QAAQ,GAAG,UAAU,EACrB,QAAQ,GAAG,kDAAkD,GAC9D,EAAE,EAAE;IACH,OAAO,CACL,cACE,SAAS,EAAE,IAAI,CAAC;YACd,IAAI,EAAE,IAAI;SACX,CAAC,EACF,KAAK,EAAE;YACL,eAAe,EAAE,OAAO,QAAQ,GAAG;SACpC,YAED,cACE,SAAS,EAAE,IAAI,CAAC;gBACd,8FAA8F,EAC5F,IAAI,EAAE,kHAAkH;aAC3H,CAAC,YAEF,cACE,SAAS,EAAE,IAAI,CAAC;oBACd,yCAAyC,EAAE,IAAI,EAAE,oDAAoD;iBACtG,CAAC,YAEF,eACE,SAAS,EAAE,IAAI,CAAC;wBACd,sCAAsC,EAAE,IAAI,EAAE,iDAAiD;qBAChG,CAAC,aAEF,aACE,SAAS,EAAE,IAAI,CAAC;gCACd,sEAAsE,EACpE,IAAI,EAAE,iFAAiF;6BAC1F,CAAC,YAED,KAAK,GACH,EACL,iBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,IAAI,CAAC;gCACd,8XAA8X,EAC5X,IAAI,EAAE,yYAAyY;6BAClZ,CAAC,YAED,QAAQ,GACF,IACL,GACF,GACF,GACF,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from './accordion.js';
|
|
2
|
+
export * from './badge.js';
|
|
3
|
+
export * from './button.js';
|
|
4
|
+
export * from './card-base.js';
|
|
5
|
+
export * from './card-template-demo.js';
|
|
6
|
+
export * from './card.js';
|
|
7
|
+
export * from './grid.js';
|
|
8
|
+
export * from './hero.js';
|
|
9
|
+
export * from './json-schema-playground.js';
|
|
10
|
+
export * from './slot-references.js';
|
|
11
|
+
export * from './starter-template.js';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react/index.tsx"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from './accordion.js';
|
|
2
|
+
export * from './badge.js';
|
|
3
|
+
export * from './button.js';
|
|
4
|
+
export * from './card-base.js';
|
|
5
|
+
export * from './card-template-demo.js';
|
|
6
|
+
export * from './card.js';
|
|
7
|
+
export * from './grid.js';
|
|
8
|
+
export * from './hero.js';
|
|
9
|
+
export * from './json-schema-playground.js';
|
|
10
|
+
export * from './slot-references.js';
|
|
11
|
+
export * from './starter-template.js';
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/react/index.tsx"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-schema-playground.d.ts","sourceRoot":"","sources":["../../src/react/json-schema-playground.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAQnE,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
export const JsonSchemaPlayground = (props) => (_jsxs("div", { children: [_jsx("h1", { children: "JsonSchemaPlayground" }), _jsx("p", { children: "Props Data:" }), _jsx("pre", { children: JSON.stringify(props, null, 2) })] }));
|
|
3
|
+
//# sourceMappingURL=json-schema-playground.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-schema-playground.js","sourceRoot":"","sources":["../../src/react/json-schema-playground.tsx"],"names":[],"mappings":";AAEA,MAAM,CAAC,MAAM,oBAAoB,GAAuC,CACtE,KAAK,EACL,EAAE,CAAC,CACH,0BACE,gDAA6B,EAC7B,sCAAkB,EAClB,wBAAM,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,GAAO,IACvC,CACP,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slot-references.d.ts","sourceRoot":"","sources":["../../src/react/slot-references.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,GAAG,CAAC;IAEpC,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;IACrB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;CACd,CAsBA,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
export const SlotReference = ({ badge: TheBadge, text = 'Some Text', footer }) => {
|
|
4
|
+
return (_jsxs("div", { className: clsx({
|
|
5
|
+
'p-2': true, // purgecss: p-2
|
|
6
|
+
'bg-slate-400': true, // purgecss: bg-slate-400
|
|
7
|
+
}), children: [_jsxs("h3", { children: ["The ", _jsx("code", { children: "badge" }), " prop (Slot as a template Reference) used 3 times with different props:"] }), TheBadge && _jsx(TheBadge, { type: "primary", children: text }), TheBadge && _jsx(TheBadge, { type: "secondary", children: text }), TheBadge && _jsx(TheBadge, { type: "tertiary", children: text }), _jsx("hr", {}), _jsxs("h3", { children: ["The ", _jsx("code", { children: "footer" }), " prop (Slot as a traditional Demo):"] }), footer] }));
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=slot-references.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slot-references.js","sourceRoot":"","sources":["../../src/react/slot-references.tsx"],"names":[],"mappings":";AACA,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,MAAM,CAAC,MAAM,aAAa,GAKrB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,GAAG,WAAW,EAAE,MAAM,EAAE,EAAE,EAAE;IACvD,OAAO,CACL,eACE,SAAS,EAAE,IAAI,CAAC;YACd,KAAK,EAAE,IAAI,EAAE,gBAAgB;YAC7B,cAAc,EAAE,IAAI,EAAE,yBAAyB;SAChD,CAAC,aAEF,iCACM,mCAAkB,+EAEnB,EACJ,QAAQ,IAAI,KAAC,QAAQ,IAAC,IAAI,EAAC,SAAS,YAAE,IAAI,GAAY,EACtD,QAAQ,IAAI,KAAC,QAAQ,IAAC,IAAI,EAAC,WAAW,YAAE,IAAI,GAAY,EACxD,QAAQ,IAAI,KAAC,QAAQ,IAAC,IAAI,EAAC,UAAU,YAAE,IAAI,GAAY,EACxD,cAAM,EACN,iCACM,oCAAmB,2CACpB,EACJ,MAAM,IACH,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"starter-template.d.ts","sourceRoot":"","sources":["../../src/react/starter-template.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,GAAG,CAAC;IACtC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAWA,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
export const StarterTemplate = ({ subTitle }) => {
|
|
4
|
+
return (_jsxs("aside", { className: clsx({
|
|
5
|
+
border: true, // purgecss: border
|
|
6
|
+
}), children: [_jsx("h2", { children: "I am the Starter Template" }), subTitle && _jsx("h3", { children: subTitle })] }));
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=starter-template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"starter-template.js","sourceRoot":"","sources":["../../src/react/starter-template.tsx"],"names":[],"mappings":";AACA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,MAAM,CAAC,MAAM,eAAe,GAEvB,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACpB,OAAO,CACL,iBACE,SAAS,EAAE,IAAI,CAAC;YACd,MAAM,EAAE,IAAI,EAAE,mBAAmB;SAClC,CAAC,aAEF,qDAAkC,EACjC,QAAQ,IAAI,uBAAK,QAAQ,GAAM,IAC1B,CACT,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/web-components/button.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
class MyButton extends HTMLElement {
|
|
2
|
+
constructor() {
|
|
3
|
+
super();
|
|
4
|
+
this.buttonText = this.querySelector('slot')
|
|
5
|
+
.assignedNodes()[0]
|
|
6
|
+
.textContent.trim();
|
|
7
|
+
this.button = document.createElement('button');
|
|
8
|
+
this.button.id = 'my-button';
|
|
9
|
+
this.button.setAttribute('part', 'my-button');
|
|
10
|
+
this.button.textContent = this.buttonText;
|
|
11
|
+
this.button.addEventListener('click', this.handleClick.bind(this));
|
|
12
|
+
// Apply the styles to the button
|
|
13
|
+
this.applyStyles(this.button);
|
|
14
|
+
// Append the button to the shadow DOM
|
|
15
|
+
this.attachShadow({ mode: 'open' }).appendChild(this.button);
|
|
16
|
+
}
|
|
17
|
+
handleClick() {
|
|
18
|
+
console.log('Button clicked!');
|
|
19
|
+
}
|
|
20
|
+
applyStyles(element) {
|
|
21
|
+
const style = document.createElement('style');
|
|
22
|
+
style.textContent = `
|
|
23
|
+
#my-button {
|
|
24
|
+
background-color: #4CAF50;
|
|
25
|
+
border: none;
|
|
26
|
+
color: white;
|
|
27
|
+
padding: 15px 32px;
|
|
28
|
+
text-align: center;
|
|
29
|
+
text-decoration: none;
|
|
30
|
+
display: inline-block;
|
|
31
|
+
font-size: 16px;
|
|
32
|
+
margin: 4px 2px;
|
|
33
|
+
cursor: pointer;
|
|
34
|
+
}
|
|
35
|
+
`;
|
|
36
|
+
element.shadowRoot.appendChild(style);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
customElements.define('my-button', MyButton);
|
|
40
|
+
export {};
|
|
41
|
+
//# sourceMappingURL=button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../src/web-components/button.ts"],"names":[],"mappings":"AAAA,MAAM,QAAS,SAAQ,WAAW;IAGhC;QACE,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC;aACzC,aAAa,EAAE,CAAC,CAAC,CAAC;aAClB,WAAW,CAAC,IAAI,EAAE,CAAC;QAEtB,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QAC/C,IAAI,CAAC,MAAM,CAAC,EAAE,GAAG,WAAW,CAAC;QAC7B,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;QAC9C,IAAI,CAAC,MAAM,CAAC,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC;QAC1C,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAEnE,iCAAiC;QACjC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAE9B,sCAAsC;QACtC,IAAI,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC/D,CAAC;IAED,WAAW;QACT,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACjC,CAAC;IAED,WAAW,CAAC,OAAoB;QAC9B,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAC9C,KAAK,CAAC,WAAW,GAAG;;;;;;;;;;;;;KAanB,CAAC;QACF,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IACxC,CAAC;CACF;AAED,cAAc,CAAC,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/web-components/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/web-components/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@knapsack/sandbox-components",
|
|
3
|
+
"description": "",
|
|
4
|
+
"version": "4.53.1--canary.3986.c6043f8.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
"./css": "./dist/css/ks-sandbox-styles.css",
|
|
8
|
+
"./hbs/*": "./src/hbs/*",
|
|
9
|
+
"./html/*": "./src/html/*",
|
|
10
|
+
"./package": "./package.json",
|
|
11
|
+
"./package.json": "./package.json",
|
|
12
|
+
"./react": {
|
|
13
|
+
"types": "./dist/react/index.d.ts",
|
|
14
|
+
"default": "./dist/react/index.js"
|
|
15
|
+
},
|
|
16
|
+
"./twig/*": "./src/twig/*",
|
|
17
|
+
"./vue/*": "./src/vue/*",
|
|
18
|
+
"./web-components": {
|
|
19
|
+
"types": "./dist/web-components/index.d.ts",
|
|
20
|
+
"default": "./dist/web-components/index.js"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"sideEffects": false,
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "run-p build:*",
|
|
26
|
+
"build:css": "postcss ./src/css/index.css --output ./dist/css/ks-sandbox-styles.css",
|
|
27
|
+
"build:ts": "tsc",
|
|
28
|
+
"clean": "rm -rf ./dist",
|
|
29
|
+
"lint": "eslint ./",
|
|
30
|
+
"start": "run-p watch:*",
|
|
31
|
+
"watch:css": "npm run build:css -- --watch",
|
|
32
|
+
"watch:ts": "npm run build:ts -- --watch --preserveWatchOutput"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"clsx": "^2.1.0",
|
|
36
|
+
"react": "^18.2.0",
|
|
37
|
+
"vue": "^3.2.47"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@knapsack/eslint-config-starter": "4.53.1--canary.3986.c6043f8.0",
|
|
41
|
+
"@knapsack/postcss-config-starter": "4.53.1--canary.3986.c6043f8.0",
|
|
42
|
+
"@knapsack/prettier-config": "4.53.1--canary.3986.c6043f8.0",
|
|
43
|
+
"@knapsack/sandbox-tokens": "4.53.1--canary.3986.c6043f8.0",
|
|
44
|
+
"@knapsack/typescript-config-starter": "4.53.1--canary.3986.c6043f8.0",
|
|
45
|
+
"@types/node": "^20.11.30",
|
|
46
|
+
"@types/react": "^18.0.27",
|
|
47
|
+
"eslint": "^8.57.0",
|
|
48
|
+
"npm-run-all2": "^5.0.2",
|
|
49
|
+
"postcss-cli": "^9.1.0",
|
|
50
|
+
"tailwindcss": "^3.1.7",
|
|
51
|
+
"typescript": "^5.4.3"
|
|
52
|
+
},
|
|
53
|
+
"license": "GPL-2.0-or-later",
|
|
54
|
+
"publishConfig": {
|
|
55
|
+
"access": "public"
|
|
56
|
+
},
|
|
57
|
+
"repository": {
|
|
58
|
+
"url": "https://github.com/knapsack-labs/app-monorepo",
|
|
59
|
+
"directory": "apps/ui/libs/sandbox-components",
|
|
60
|
+
"type": "git"
|
|
61
|
+
},
|
|
62
|
+
"gitHead": "c6043f82376003371b42ab2c1a35095facb998d9"
|
|
63
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const { createPostCssConfig } = require('@knapsack/postcss-config-starter');
|
|
2
|
+
const tailwind = require('tailwindcss');
|
|
3
|
+
const twNesting = require('tailwindcss/nesting');
|
|
4
|
+
const tailwindConfig = require('./tailwind.config.cjs');
|
|
5
|
+
|
|
6
|
+
const config = createPostCssConfig({
|
|
7
|
+
plugins: [twNesting, tailwind(tailwindConfig)],
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
module.exports = config;
|
package/readme.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// https://tailwindcss.com/docs/configuration
|
|
2
|
+
module.exports = {
|
|
3
|
+
content: ['./src/**/*.{html,tsx,vue,twig}'],
|
|
4
|
+
// corePlugins: ['backgroundColor', 'text-color'],
|
|
5
|
+
// safelist: [
|
|
6
|
+
// {
|
|
7
|
+
// pattern: /bg-/,
|
|
8
|
+
// },
|
|
9
|
+
// ],
|
|
10
|
+
theme: {
|
|
11
|
+
extend: {
|
|
12
|
+
colors: {
|
|
13
|
+
primary: {
|
|
14
|
+
100: '#bee3f8',
|
|
15
|
+
200: '#90cdf4',
|
|
16
|
+
300: '#63b3ed',
|
|
17
|
+
400: '#4299e1',
|
|
18
|
+
500: '#3182ce',
|
|
19
|
+
600: '#2b6cb0',
|
|
20
|
+
700: '#2c5282',
|
|
21
|
+
800: '#2a4365',
|
|
22
|
+
900: '#1A365D',
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
secondary: {
|
|
26
|
+
100: '#ccfbf1',
|
|
27
|
+
200: '#99f6e4',
|
|
28
|
+
300: '#5eead4',
|
|
29
|
+
400: '#2dd4bf',
|
|
30
|
+
500: '#14b8a6',
|
|
31
|
+
600: '#0d9488',
|
|
32
|
+
700: '#0f766e',
|
|
33
|
+
800: '#115e59',
|
|
34
|
+
900: '#134e4a',
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
tertiary: {
|
|
38
|
+
100: '#faf089',
|
|
39
|
+
200: '#f6e05e',
|
|
40
|
+
300: '#ecc94b',
|
|
41
|
+
400: '#d69e2e',
|
|
42
|
+
500: '#b7791f',
|
|
43
|
+
600: '#975a16',
|
|
44
|
+
700: '#744210',
|
|
45
|
+
800: '#5F370E',
|
|
46
|
+
900: '#4D2700',
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
plugins: [],
|
|
52
|
+
};
|