@local-logic/design-system 0.7.6

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/README.md ADDED
@@ -0,0 +1,7 @@
1
+ # @local-logic/design-system
2
+
3
+ This UI library is a package used by the @local-logic team for the use in local logic projects
4
+
5
+ ## Icons
6
+
7
+ Icons for the design system can be found [here](https://drive.google.com/drive/folders/1mEPGKQA4Mlf-Xlzv7QzV2JXmjGr4IDE1?usp=sharing)
@@ -0,0 +1,5 @@
1
+ import * as e from "react";
2
+ const l = (t) => /* @__PURE__ */ e.createElement("svg", { width: 32, height: 32, viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M5.29289 11.2929C5.68342 10.9024 6.31658 10.9024 6.70711 11.2929L16 20.5858L25.2929 11.2929C25.6834 10.9024 26.3166 10.9024 26.7071 11.2929C27.0976 11.6834 27.0976 12.3166 26.7071 12.7071L16.7071 22.7071C16.3166 23.0976 15.6834 23.0976 15.2929 22.7071L5.29289 12.7071C4.90237 12.3166 4.90237 11.6834 5.29289 11.2929Z", fill: "currentColor" }));
3
+ export {
4
+ l as default
5
+ };
@@ -0,0 +1,5 @@
1
+ import * as e from "react";
2
+ const l = (t) => /* @__PURE__ */ e.createElement("svg", { width: 32, height: 32, viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M15.2929 9.29289C15.6834 8.90237 16.3166 8.90237 16.7071 9.29289L26.7071 19.2929C27.0976 19.6834 27.0976 20.3166 26.7071 20.7071C26.3166 21.0976 25.6834 21.0976 25.2929 20.7071L16 11.4142L6.70711 20.7071C6.31658 21.0976 5.68342 21.0976 5.29289 20.7071C4.90237 20.3166 4.90237 19.6834 5.29289 19.2929L15.2929 9.29289Z", fill: "currentColor" }));
3
+ export {
4
+ l as default
5
+ };
@@ -0,0 +1,3 @@
1
+ export declare const CaretUp: import('react').LazyExoticComponent<import('react').ComponentType<any>>;
2
+ export declare const CaretDown: import('react').LazyExoticComponent<import('react').ComponentType<any>>;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/icons/assets/arrows/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,yEAA4C,CAAC;AACjE,eAAO,MAAM,SAAS,yEAA8C,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './arrows';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/icons/assets/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { default as React, HTMLAttributes } from 'react';
2
+
3
+ import * as icons from "../../assets";
4
+ export type IconName = keyof typeof icons;
5
+ export interface Props extends HTMLAttributes<HTMLDivElement> {
6
+ icon: IconName;
7
+ className?: string;
8
+ rotate?: number;
9
+ }
10
+ /**
11
+ *
12
+ * @param icon string key icon name
13
+ * @param className string classes for styling
14
+ * @param rotate optional number rotation of the icon
15
+ * @returns Icon react component
16
+ */
17
+ export declare const Icon: ({ icon, className, rotate, ...rest }: Props) => React.JSX.Element | null;
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/icons/components/Icon/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAqB,MAAM,OAAO,CAAC;AAEjE,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,KAAK,CAAC;AAE1C,MAAM,WAAW,KAAM,SAAQ,cAAc,CAAC,cAAc,CAAC;IAC3D,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,IAAI,yCAA0C,KAAK,6BAuB/D,CAAC"}
@@ -0,0 +1,35 @@
1
+ import { default as React } from 'react';
2
+ import { IconName } from '../../index';
3
+ import { Props as IconProps } from '../Icon';
4
+
5
+ export declare const argTypes: {
6
+ icons: {
7
+ control: boolean;
8
+ disable: boolean;
9
+ };
10
+ title: {
11
+ control: boolean;
12
+ disable: boolean;
13
+ };
14
+ size: {
15
+ options: string[];
16
+ control: {
17
+ type: string;
18
+ };
19
+ };
20
+ background: {
21
+ options: string[];
22
+ control: {
23
+ type: string;
24
+ };
25
+ };
26
+ };
27
+ export declare const defaultArgs: {
28
+ size: string;
29
+ background: string;
30
+ };
31
+ export declare const StorybookIconList: ({ icons, args }: {
32
+ icons: IconName[];
33
+ args: IconProps;
34
+ }) => React.JSX.Element;
35
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/icons/components/StorybookIconList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAAQ,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,SAAS,CAAC;AAG7C,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;CAiBpB,CAAC;AAEF,eAAO,MAAM,WAAW;;;CAGvB,CAAA;AAED,eAAO,MAAM,iBAAiB,oBAAqB;IACjD,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,IAAI,EAAE,SAAS,CAAC;CACjB,sBAuCA,CAAA"}
@@ -0,0 +1,12 @@
1
+ import { Meta } from '@storybook/react';
2
+ import { Icon, IconName } from '../../index';
3
+
4
+ declare const _default: Meta<typeof Icon>;
5
+ export default _default;
6
+ export declare const Arrows: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, {
7
+ title: string;
8
+ icons: IconName[];
9
+ size: string;
10
+ background: string;
11
+ }>;
12
+ //# sourceMappingURL=index.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.stories.d.ts","sourceRoot":"","sources":["../../../../src/icons/components/StorybookIconList/index.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAW,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;wBAQ/C,IAAI,CAAC,OAAO,IAAI,CAAC;AAJtB,wBAIuB;AAcvB,eAAO,MAAM,MAAM;WAXV,MAAM;WACN,QAAQ,EAAE;UACX,MAAM;gBACA,MAAM;EAQmB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { IconName } from '../../../index';
2
+
3
+ export declare const icons: IconName[];
4
+ //# sourceMappingURL=arrows.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arrows.d.ts","sourceRoot":"","sources":["../../../../../src/icons/components/StorybookIconList/lists/arrows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C,eAAO,MAAM,KAAK,EAAE,QAAQ,EAA6B,CAAC"}
@@ -0,0 +1,8 @@
1
+ export declare const header = "mb-5 py-3 border-b border-gray-100";
2
+ export declare const title = "text-lg font-semibold";
3
+ export declare const link = "text-blue-600 hover:text-blue-900 transition-colors";
4
+ export declare const container = "grid grid-cols-4 sm:grid-cols-6 md:grid-cols-8 lg:grid-cols-10 xl:grid-cols-12 gap-4";
5
+ export declare const listItem = "\n p-4 bg-white rounded-lg flex flex-col items-center justify-between shadow-md cursor-pointer group hover:bg-gray-100 transition-colors border border-gray-100\n data-[copied=true]:bg-green-100 data-[copied=true]:hover:bg-green-200 data-[copied=true]:border-green-100 data-[copied=true]:hover:border-green-200\n";
6
+ export declare const icon = "mb-2";
7
+ export declare const name = "text-[12px] w-full truncate text-ellipsis overflow-hidden text-center";
8
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/icons/components/StorybookIconList/styles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM,uCAAuC,CAAC;AAC3D,eAAO,MAAM,KAAK,0BAA0B,CAAC;AAC7C,eAAO,MAAM,IAAI,wDAAwD,CAAC;AAC1E,eAAO,MAAM,SAAS,yFAAyF,CAAC;AAChH,eAAO,MAAM,QAAQ,8TAGpB,CAAC;AACF,eAAO,MAAM,IAAI,SAAS,CAAC;AAC3B,eAAO,MAAM,IAAI,0EAA0E,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { Icon } from './components/Icon';
2
+ export type { IconName } from './components/Icon';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/icons/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,YAAY,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { lazy as s, useMemo as i, Suspense as c } from "react";
3
+ function l(e) {
4
+ return s(async () => await e());
5
+ }
6
+ const m = l(async () => import("../CaretUp-BwXusn0Y.js")), u = l(async () => import("../CaretDown-qK3_eXZo.js")), y = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7
+ __proto__: null,
8
+ CaretDown: u,
9
+ CaretUp: m
10
+ }, Symbol.toStringTag, { value: "Module" })), d = ({ icon: e, className: n, rotate: r, ...a }) => {
11
+ const o = i(() => y[e], [e]);
12
+ return o ? /* @__PURE__ */ t(
13
+ "div",
14
+ {
15
+ className: n,
16
+ "aria-label": e,
17
+ role: "img",
18
+ style: {
19
+ display: "flex",
20
+ justifyContent: "center",
21
+ alignItems: "center",
22
+ transform: r ? `rotate(${r}deg)` : void 0
23
+ },
24
+ ...a,
25
+ children: /* @__PURE__ */ t(c, { fallback: null, children: /* @__PURE__ */ t(o, { style: { width: "100%", height: "100%" } }) })
26
+ }
27
+ ) : null;
28
+ };
29
+ export {
30
+ d as Icon
31
+ };
@@ -0,0 +1,2 @@
1
+ export declare function lazy(importFn: Function): import('react').LazyExoticComponent<import('react').ComponentType<any>>;
2
+ //# sourceMappingURL=lazy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lazy.d.ts","sourceRoot":"","sources":["../../../src/icons/utils/lazy.ts"],"names":[],"mappings":"AAGA,wBAAgB,IAAI,CAAC,QAAQ,EAAE,QAAQ,2EAMtC"}
@@ -0,0 +1,2 @@
1
+ export * from './icons';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
package/package.json ADDED
@@ -0,0 +1,97 @@
1
+ {
2
+ "name": "@local-logic/design-system",
3
+ "version": "0.7.6",
4
+ "author": "Local Logic",
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
8
+ "license": "ISC",
9
+ "type": "module",
10
+ "main": "./dist/index.js",
11
+ "exports": {
12
+ ".": {
13
+ "import": "./dist/index.js"
14
+ },
15
+ "./icons": {
16
+ "import": "./dist/icons/index.js"
17
+ },
18
+ "./tailwind.config.cjs": "./tailwind.config.cjs",
19
+ "./postcss.config.cjs": "./postcss.config.cjs",
20
+ "./style.css": "./dist/style.css"
21
+ },
22
+ "typesVersions": {
23
+ "*": {
24
+ "types": [
25
+ "./dist/index.d.ts"
26
+ ],
27
+ "icons": [
28
+ "./dist/icons/index.d.ts"
29
+ ]
30
+ }
31
+ },
32
+ "sideEffects": false,
33
+ "files": [
34
+ "./dist/**/*",
35
+ "tailwind.config.js",
36
+ "postcss.config.js"
37
+ ],
38
+ "scripts": {
39
+ "dev": "vite",
40
+ "build": "vite build",
41
+ "build:staging": "vite build --mode=staging",
42
+ "stats": "STATS=1 vite build",
43
+ "size": "yarn run build && size-limit",
44
+ "lint": "TIMING=1 eslint --ext .js,.jsx,.ts,.tsx .",
45
+ "check-types": "tsc --project ./tsconfig.json --noEmit",
46
+ "prepublishOnly": "yarn run build",
47
+ "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
48
+ "storybook": "storybook dev -p 6007",
49
+ "build-storybook": "storybook build",
50
+ "locale-invalidate": "txjs-cli invalidate"
51
+ },
52
+ "peerDependencies": {
53
+ "react": ">=18",
54
+ "react-dom": ">=18"
55
+ },
56
+ "devDependencies": {
57
+ "@local-logic/eslint-config": "*",
58
+ "@storybook/addon-actions": "^8.1.5",
59
+ "@storybook/addon-essentials": "^8.1.5",
60
+ "@storybook/addon-interactions": "^8.1.5",
61
+ "@storybook/addon-links": "^8.1.5",
62
+ "@storybook/addon-themes": "^8.1.5",
63
+ "@storybook/blocks": "^8.1.5",
64
+ "@storybook/builder-vite": "^8.1.5",
65
+ "@storybook/react": "^8.1.5",
66
+ "@storybook/react-vite": "^8.1.5",
67
+ "@storybook/testing-library": "^0.2.2",
68
+ "@types/react": "^18.3.3",
69
+ "@types/react-dom": "^18.3.0",
70
+ "@typescript-eslint/eslint-plugin": "^7.7.1",
71
+ "@typescript-eslint/parser": "^7.7.1",
72
+ "@vitejs/plugin-react": "^4.2.1",
73
+ "autoprefixer": "^10.4.19",
74
+ "eslint": "^8.57.0",
75
+ "eslint-plugin-html": "^8.1.1",
76
+ "eslint-plugin-import": "^2.29.1",
77
+ "eslint-plugin-storybook": "^0.8.0",
78
+ "jestconfig": "*",
79
+ "postcss": "^8.4.38",
80
+ "prettier": "^3.3.0",
81
+ "react": "^18.3.1",
82
+ "react-dom": "^18.3.1",
83
+ "rollup-plugin-visualizer": "^5.12.0",
84
+ "storybook": "^8.0.9",
85
+ "tailwindcss": "^3.4.3",
86
+ "tsconfig": "*",
87
+ "tsconfig-paths-webpack-plugin": "^4.1.0",
88
+ "typescript": "^5.4.5",
89
+ "vite": "^5.2.12",
90
+ "vite-plugin-dts": "^3.9.1",
91
+ "vite-plugin-svgr": "^4.2.0",
92
+ "vitest": "^1.6.0"
93
+ },
94
+ "dependencies": {
95
+ "glob": "^10.4.1"
96
+ }
97
+ }