@douglasneuroinformatics/libui 1.0.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/package.json ADDED
@@ -0,0 +1,111 @@
1
+ {
2
+ "name": "@douglasneuroinformatics/libui",
3
+ "type": "module",
4
+ "version": "1.0.0",
5
+ "packageManager": "pnpm@8.15.3",
6
+ "description": "Generic UI components for DNP projects, built using React and TailwindCSS",
7
+ "author": {
8
+ "name": "Douglas Neuroinformatics",
9
+ "email": "support@douglasneuroinformatics.ca"
10
+ },
11
+ "license": "LGPL-3.0",
12
+ "keywords": [
13
+ "React",
14
+ "TailwindCSS"
15
+ ],
16
+ "exports": {
17
+ "./components": {
18
+ "types": "./dist/components/index.d.ts",
19
+ "import": "./dist/components/index.js"
20
+ },
21
+ "./hooks": {
22
+ "types": "./dist/hooks/index.d.ts",
23
+ "import": "./dist/hooks/index.js"
24
+ },
25
+ "./i18n": {
26
+ "types": "./dist/i18n.d.ts",
27
+ "import": "./dist/i18n.js"
28
+ },
29
+ "./styles/*": "./dist/styles/*",
30
+ "./tailwind.config.cjs": "./tailwind.config.cjs",
31
+ "./utils": {
32
+ "types": "./dist/utils.d.ts",
33
+ "import": "./dist/utils.js"
34
+ }
35
+ },
36
+ "main": "index.js",
37
+ "files": [
38
+ "dist",
39
+ "tailwind.config.cjs",
40
+ "tailwind.config.d.cts"
41
+ ],
42
+ "peerDependencies": {
43
+ "react": "^18.2.0",
44
+ "react-dom": "^18.2.0",
45
+ "tailwindcss": "^3.3.5"
46
+ },
47
+ "dependencies": {
48
+ "@radix-ui/react-icons": "^1.3.0",
49
+ "@radix-ui/react-label": "^2.0.2",
50
+ "@radix-ui/react-slot": "^1.0.2",
51
+ "class-variance-authority": "^0.7.0",
52
+ "clsx": "^2.1.0",
53
+ "i18next": "23.x",
54
+ "i18next-browser-languagedetector": "^7.2.0",
55
+ "lodash-es": "^4.17.21",
56
+ "react-i18next": "^14.1.0",
57
+ "tailwind-merge": "^1.14.0",
58
+ "tailwindcss-animate": "^1.0.7",
59
+ "type-fest": "^4.11.1",
60
+ "zustand": "^4.5.2"
61
+ },
62
+ "devDependencies": {
63
+ "@commitlint/cli": "^19.1.0",
64
+ "@commitlint/config-conventional": "^19.1.0",
65
+ "@commitlint/types": "^19.0.3",
66
+ "@douglasneuroinformatics/eslint-config": "^4.0.1",
67
+ "@semantic-release/changelog": "^6.0.3",
68
+ "@semantic-release/git": "^10.0.1",
69
+ "@semantic-release/npm": "^11.0.3",
70
+ "@storybook/addon-essentials": "^7.6.17",
71
+ "@storybook/addon-interactions": "^7.6.17",
72
+ "@storybook/addon-links": "^7.6.17",
73
+ "@storybook/addon-themes": "^7.6.17",
74
+ "@storybook/blocks": "^7.6.17",
75
+ "@storybook/icons": "^1.2.8",
76
+ "@storybook/manager-api": "^7.6.17",
77
+ "@storybook/react": "^7.6.17",
78
+ "@storybook/react-vite": "^7.6.17",
79
+ "@storybook/theming": "^7.6.17",
80
+ "@testing-library/jest-dom": "^6.4.2",
81
+ "@testing-library/react": "14.2.1",
82
+ "@testing-library/user-event": "^14.5.2",
83
+ "@types/lodash-es": "^4.17.12",
84
+ "@types/node": "^20.11.25",
85
+ "@types/react": "^18.2.64",
86
+ "@types/react-dom": "^18.2.21",
87
+ "@vitejs/plugin-react-swc": "^3.6.0",
88
+ "@vitest/coverage-v8": "^1.3.1",
89
+ "autoprefixer": "^10.4.18",
90
+ "eslint": "^8.57.0",
91
+ "husky": "^9.0.11",
92
+ "jsdom": "24.0.0",
93
+ "postcss": "^8.4.35",
94
+ "prettier": "^3.2.5",
95
+ "prettier-plugin-tailwindcss": "^0.5.12",
96
+ "semantic-release": "^23.0.2",
97
+ "storybook": "^7.6.17",
98
+ "storybook-react-i18next": "^2.1.1",
99
+ "tsup": "^8.0.2",
100
+ "typescript": "~5.3.3",
101
+ "vite": "4.4.9",
102
+ "vitest": "^1.3.1"
103
+ },
104
+ "scripts": {
105
+ "build": "tsup && cp -r src/styles dist",
106
+ "format": "prettier --write src",
107
+ "lint": "tsc && eslint --fix src",
108
+ "storybook": "storybook dev -p 6006",
109
+ "storybook:build": "storybook build"
110
+ }
111
+ }
@@ -0,0 +1,117 @@
1
+ // @ts-check
2
+
3
+ const fs = require('fs');
4
+ const path = require('path');
5
+
6
+ const animate = require('tailwindcss-animate');
7
+ const plugin = require('tailwindcss/plugin');
8
+
9
+ const isDev = fs.existsSync(path.resolve(__dirname, 'src'));
10
+
11
+ /** @type {import('tailwindcss').Config} */
12
+ module.exports = {
13
+ content: [isDev ? path.resolve(__dirname, 'src/**/*.{js,jsx,ts,tsx}') : path.resolve(__dirname, 'dist/**/*.js')],
14
+ darkMode: ['class', '[data-mode="dark"]'],
15
+ plugins: [
16
+ animate,
17
+ plugin(({ addUtilities }) => {
18
+ addUtilities({
19
+ '.scrollbar-none': {
20
+ '&::-webkit-scrollbar': {
21
+ display: 'none'
22
+ },
23
+ '-ms-overflow-style': 'none',
24
+ 'scrollbar-width': 'none'
25
+ }
26
+ });
27
+ })
28
+ ],
29
+ theme: {
30
+ container: {
31
+ center: true,
32
+ padding: '2rem',
33
+ screens: {
34
+ '2xl': '1400px'
35
+ }
36
+ },
37
+ extend: {
38
+ animation: {
39
+ 'accordion-down': 'accordion-down 0.2s ease-out',
40
+ 'accordion-up': 'accordion-up 0.2s ease-out',
41
+ spinner: 'spinner-spin 1.7s infinite ease, round 1.7s infinite ease'
42
+ },
43
+ borderRadius: {
44
+ lg: `var(--radius)`,
45
+ md: `calc(var(--radius) - 2px)`,
46
+ sm: 'calc(var(--radius) - 4px)'
47
+ },
48
+ colors: {
49
+ accent: {
50
+ DEFAULT: 'var(--accent)',
51
+ foreground: 'var(--accent-foreground)'
52
+ },
53
+ background: 'var(--background)',
54
+ border: 'var(--border)',
55
+ card: {
56
+ DEFAULT: 'var(--card)',
57
+ foreground: 'var(--card-foreground)'
58
+ },
59
+ destructive: {
60
+ DEFAULT: 'var(--destructive)',
61
+ foreground: 'var(--destructive-foreground)'
62
+ },
63
+ foreground: 'var(--foreground)',
64
+ input: 'var(--input)',
65
+ muted: {
66
+ DEFAULT: 'var(--muted)',
67
+ foreground: 'var(--muted-foreground)'
68
+ },
69
+ popover: {
70
+ DEFAULT: 'var(--popover)',
71
+ foreground: 'var(--popover-foreground)'
72
+ },
73
+ primary: {
74
+ DEFAULT: 'var(--primary)',
75
+ foreground: 'var(--primary-foreground)'
76
+ },
77
+ ring: 'var(--ring)',
78
+ secondary: {
79
+ DEFAULT: 'var(--secondary)',
80
+ foreground: 'var(--secondary-foreground)'
81
+ }
82
+ },
83
+ keyframes: {
84
+ 'accordion-down': {
85
+ from: { height: '0' },
86
+ to: { height: 'var(--radix-accordion-content-height)' }
87
+ },
88
+ 'accordion-up': {
89
+ from: { height: 'var(--radix-accordion-content-height)' },
90
+ to: { height: '0' }
91
+ },
92
+ round: {
93
+ '0%': {
94
+ transform: 'rotate(0deg)'
95
+ },
96
+ '100%': {
97
+ transform: 'rotate(360deg)'
98
+ }
99
+ },
100
+ 'spinner-spin': {
101
+ '0%, 5%, 95%, 100%': {
102
+ boxShadow: `0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em, 0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em`
103
+ },
104
+ '10%, 59%': {
105
+ boxShadow: `0 -0.83em 0 -0.4em, -0.087em -0.825em 0 -0.42em, -0.173em -0.812em 0 -0.44em, -0.256em -0.789em 0 -0.46em, -0.297em -0.775em 0 -0.477em`
106
+ },
107
+ '20%': {
108
+ boxShadow: `0 -0.83em 0 -0.4em, -0.338em -0.758em 0 -0.42em, -0.555em -0.617em 0 -0.44em, -0.671em -0.488em 0 -0.46em, -0.749em -0.34em 0 -0.477em`
109
+ },
110
+ '38%': {
111
+ boxShadow: `0 -0.83em 0 -0.4em, -0.377em -0.74em 0 -0.42em, -0.645em -0.522em 0 -0.44em, -0.775em -0.297em 0 -0.46em, -0.82em -0.09em 0 -0.477em`
112
+ }
113
+ }
114
+ }
115
+ }
116
+ }
117
+ };
@@ -0,0 +1,7 @@
1
+ declare type TailwindConfig = import('tailwindcss').Config & {
2
+ content: string[];
3
+ };
4
+
5
+ declare const config: TailwindConfig;
6
+
7
+ export = config;