@douglasneuroinformatics/libui 3.2.0 → 3.4.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/dist/components.d.ts +8 -3
- package/dist/components.js +30 -19
- package/dist/components.js.map +1 -1
- package/dist/douglasneuroinformatics-libui-3.4.0.tgz +0 -0
- package/dist/tailwind/config.cjs +82 -72
- package/dist/tailwind/config.cjs.map +1 -1
- package/dist/tailwind/config.d.cts +5 -2
- package/package.json +2 -2
- package/src/components/Form/BaseRadioField.tsx +1 -1
- package/src/components/Form/BooleanField/BooleanFieldCheckbox.tsx +1 -1
- package/src/components/Form/BooleanField/BooleanFieldRadio.tsx +1 -1
- package/src/components/Form/DateField/DateField.tsx +1 -1
- package/src/components/Form/FieldGroup/FieldGroupRoot.tsx +4 -2
- package/src/components/Form/Form.tsx +3 -0
- package/src/components/Form/NumberField/NumberFieldInput.tsx +1 -1
- package/src/components/Form/NumberField/NumberFieldRadio.tsx +1 -1
- package/src/components/Form/NumberField/NumberFieldSelect.tsx +1 -1
- package/src/components/Form/NumberField/NumberFieldSlider.tsx +1 -1
- package/src/components/Form/SetField/SetFieldListbox.tsx +1 -1
- package/src/components/Form/SetField/SetFieldSelect.tsx +2 -1
- package/src/components/Form/StringField/StringFieldInput.tsx +1 -1
- package/src/components/Form/StringField/StringFieldPassword.tsx +1 -1
- package/src/components/Form/StringField/StringFieldSelect.tsx +1 -1
- package/src/components/Form/StringField/StringFieldTextArea.tsx +1 -1
- package/src/components/SearchBar/SearchBar.tsx +13 -2
- package/src/components/StatisticCard/StatisticCard.tsx +3 -2
- package/src/tailwind/config.cts +86 -73
- package/dist/douglasneuroinformatics-libui-3.2.0.tgz +0 -0
package/src/tailwind/config.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Config } from 'tailwindcss';
|
|
2
|
-
import type { PluginsConfig } from 'tailwindcss/types/config';
|
|
2
|
+
import type { CustomThemeConfig, PluginsConfig } from 'tailwindcss/types/config';
|
|
3
3
|
|
|
4
4
|
import fs = require('node:fs');
|
|
5
5
|
import path = require('node:path');
|
|
@@ -8,6 +8,7 @@ import animate = require('tailwindcss-animate');
|
|
|
8
8
|
import containerQueries = require('@tailwindcss/container-queries');
|
|
9
9
|
import headlessui = require('@headlessui/tailwindcss');
|
|
10
10
|
import plugin = require('tailwindcss/plugin');
|
|
11
|
+
import { merge } from 'lodash-es';
|
|
11
12
|
|
|
12
13
|
const packageRoot = path.dirname(require.resolve('@douglasneuroinformatics/libui/package.json'));
|
|
13
14
|
|
|
@@ -18,9 +19,18 @@ type ConfigOptions = {
|
|
|
18
19
|
include?: string[];
|
|
19
20
|
plugins?: PluginsConfig;
|
|
20
21
|
root?: string;
|
|
22
|
+
extend?: {
|
|
23
|
+
theme?: Partial<CustomThemeConfig>;
|
|
24
|
+
};
|
|
21
25
|
};
|
|
22
26
|
|
|
23
|
-
const config = ({
|
|
27
|
+
const config = ({
|
|
28
|
+
content = [],
|
|
29
|
+
include = [],
|
|
30
|
+
root = undefined,
|
|
31
|
+
plugins = [],
|
|
32
|
+
extend = {}
|
|
33
|
+
}: ConfigOptions = {}): Config => {
|
|
24
34
|
if (isDev) {
|
|
25
35
|
content.push(path.resolve(packageRoot, 'src/**/*.{js,jsx,ts,tsx}'));
|
|
26
36
|
} else {
|
|
@@ -61,88 +71,91 @@ const config = ({ content = [], include = [], root = undefined, plugins = [] }:
|
|
|
61
71
|
xl: '3rem'
|
|
62
72
|
}
|
|
63
73
|
},
|
|
64
|
-
extend:
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
borderRadius: {
|
|
71
|
-
lg: `var(--radius)`,
|
|
72
|
-
md: `calc(var(--radius) - 2px)`,
|
|
73
|
-
sm: 'calc(var(--radius) - 4px)'
|
|
74
|
-
},
|
|
75
|
-
colors: {
|
|
76
|
-
accent: {
|
|
77
|
-
DEFAULT: 'var(--accent)',
|
|
78
|
-
foreground: 'var(--accent-foreground)'
|
|
79
|
-
},
|
|
80
|
-
background: 'var(--background)',
|
|
81
|
-
border: 'var(--border)',
|
|
82
|
-
card: {
|
|
83
|
-
DEFAULT: 'var(--card)',
|
|
84
|
-
foreground: 'var(--card-foreground)'
|
|
85
|
-
},
|
|
86
|
-
destructive: {
|
|
87
|
-
DEFAULT: 'var(--destructive)',
|
|
88
|
-
foreground: 'var(--destructive-foreground)'
|
|
89
|
-
},
|
|
90
|
-
foreground: 'var(--foreground)',
|
|
91
|
-
input: 'var(--input)',
|
|
92
|
-
muted: {
|
|
93
|
-
DEFAULT: 'var(--muted)',
|
|
94
|
-
foreground: 'var(--muted-foreground)'
|
|
95
|
-
},
|
|
96
|
-
popover: {
|
|
97
|
-
DEFAULT: 'var(--popover)',
|
|
98
|
-
foreground: 'var(--popover-foreground)'
|
|
99
|
-
},
|
|
100
|
-
primary: {
|
|
101
|
-
DEFAULT: 'var(--primary)',
|
|
102
|
-
foreground: 'var(--primary-foreground)'
|
|
103
|
-
},
|
|
104
|
-
ring: 'var(--ring)',
|
|
105
|
-
secondary: {
|
|
106
|
-
DEFAULT: 'var(--secondary)',
|
|
107
|
-
foreground: 'var(--secondary-foreground)'
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
keyframes: {
|
|
111
|
-
'accordion-down': {
|
|
112
|
-
from: { height: '0' },
|
|
113
|
-
to: { height: 'var(--radix-accordion-content-height)' }
|
|
74
|
+
extend: merge(
|
|
75
|
+
{
|
|
76
|
+
animation: {
|
|
77
|
+
'accordion-down': 'accordion-down 0.2s ease-out',
|
|
78
|
+
'accordion-up': 'accordion-up 0.2s ease-out',
|
|
79
|
+
spinner: 'spinner-spin 1.7s infinite ease, round 1.7s infinite ease'
|
|
114
80
|
},
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
81
|
+
borderRadius: {
|
|
82
|
+
lg: `var(--radius)`,
|
|
83
|
+
md: `calc(var(--radius) - 2px)`,
|
|
84
|
+
sm: 'calc(var(--radius) - 4px)'
|
|
118
85
|
},
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
86
|
+
colors: {
|
|
87
|
+
accent: {
|
|
88
|
+
DEFAULT: 'var(--accent)',
|
|
89
|
+
foreground: 'var(--accent-foreground)'
|
|
90
|
+
},
|
|
91
|
+
background: 'var(--background)',
|
|
92
|
+
border: 'var(--border)',
|
|
93
|
+
card: {
|
|
94
|
+
DEFAULT: 'var(--card)',
|
|
95
|
+
foreground: 'var(--card-foreground)'
|
|
96
|
+
},
|
|
97
|
+
destructive: {
|
|
98
|
+
DEFAULT: 'var(--destructive)',
|
|
99
|
+
foreground: 'var(--destructive-foreground)'
|
|
100
|
+
},
|
|
101
|
+
foreground: 'var(--foreground)',
|
|
102
|
+
input: 'var(--input)',
|
|
103
|
+
muted: {
|
|
104
|
+
DEFAULT: 'var(--muted)',
|
|
105
|
+
foreground: 'var(--muted-foreground)'
|
|
122
106
|
},
|
|
123
|
-
|
|
124
|
-
|
|
107
|
+
popover: {
|
|
108
|
+
DEFAULT: 'var(--popover)',
|
|
109
|
+
foreground: 'var(--popover-foreground)'
|
|
110
|
+
},
|
|
111
|
+
primary: {
|
|
112
|
+
DEFAULT: 'var(--primary)',
|
|
113
|
+
foreground: 'var(--primary-foreground)'
|
|
114
|
+
},
|
|
115
|
+
ring: 'var(--ring)',
|
|
116
|
+
secondary: {
|
|
117
|
+
DEFAULT: 'var(--secondary)',
|
|
118
|
+
foreground: 'var(--secondary-foreground)'
|
|
125
119
|
}
|
|
126
120
|
},
|
|
127
|
-
|
|
128
|
-
'
|
|
129
|
-
|
|
121
|
+
keyframes: {
|
|
122
|
+
'accordion-down': {
|
|
123
|
+
from: { height: '0' },
|
|
124
|
+
to: { height: 'var(--radix-accordion-content-height)' }
|
|
130
125
|
},
|
|
131
|
-
'
|
|
132
|
-
|
|
126
|
+
'accordion-up': {
|
|
127
|
+
from: { height: 'var(--radix-accordion-content-height)' },
|
|
128
|
+
to: { height: '0' }
|
|
133
129
|
},
|
|
134
|
-
|
|
135
|
-
|
|
130
|
+
round: {
|
|
131
|
+
'0%': {
|
|
132
|
+
transform: 'rotate(0deg)'
|
|
133
|
+
},
|
|
134
|
+
'100%': {
|
|
135
|
+
transform: 'rotate(360deg)'
|
|
136
|
+
}
|
|
136
137
|
},
|
|
137
|
-
'
|
|
138
|
-
|
|
138
|
+
'spinner-spin': {
|
|
139
|
+
'0%, 5%, 95%, 100%': {
|
|
140
|
+
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`
|
|
141
|
+
},
|
|
142
|
+
'10%, 59%': {
|
|
143
|
+
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`
|
|
144
|
+
},
|
|
145
|
+
'20%': {
|
|
146
|
+
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`
|
|
147
|
+
},
|
|
148
|
+
'38%': {
|
|
149
|
+
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`
|
|
150
|
+
}
|
|
139
151
|
}
|
|
152
|
+
},
|
|
153
|
+
screens: {
|
|
154
|
+
'2xl': '1400px'
|
|
140
155
|
}
|
|
141
156
|
},
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}
|
|
145
|
-
}
|
|
157
|
+
extend.theme
|
|
158
|
+
)
|
|
146
159
|
}
|
|
147
160
|
};
|
|
148
161
|
};
|
|
Binary file
|