5htp-core 0.6.0-3 → 0.6.0-5
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/client/assets/css/components/card.less +0 -9
- package/client/assets/css/components/mantine.less +6 -5
- package/client/components/ConnectedInput.tsx +34 -0
- package/client/components/Table/index.tsx +2 -2
- package/client/components/containers/Popover/index.tsx +2 -0
- package/client/components/index.ts +3 -1
- package/package.json +1 -1
- package/types/icons.d.ts +1 -1
|
@@ -63,13 +63,14 @@
|
|
|
63
63
|
|
|
64
64
|
.mantine-TextInput-input,
|
|
65
65
|
.mantine-Input-input {
|
|
66
|
-
|
|
67
66
|
border: solid 1px var(--cLine) !important;
|
|
67
|
+
}
|
|
68
68
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
69
|
+
.card.active,
|
|
70
|
+
.mantine-TextInput-input:focus,
|
|
71
|
+
.mantine-Input-input:focus {
|
|
72
|
+
border: solid 1px @c1 !important;
|
|
73
|
+
box-shadow: 0 0 0 4px fade(@c1, 20%) !important;
|
|
73
74
|
}
|
|
74
75
|
|
|
75
76
|
.mantine-MultiSelect-pill {
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
import type { Choice } from '@client/components/Select';
|
|
4
|
+
|
|
5
|
+
const ConnectedInput = <TComponent extends React.ComponentType<any>>({
|
|
6
|
+
component: Component, data: dataInit, ...props
|
|
7
|
+
}: {
|
|
8
|
+
component: TComponent,
|
|
9
|
+
data?: Choice[] | ((search?: string) => Promise<Choice[]>),
|
|
10
|
+
} & Omit<React.ComponentProps<TComponent>, 'data' | 'onSearchChange'>) => {
|
|
11
|
+
|
|
12
|
+
const [data, setData] = React.useState<Choice[]>([]);
|
|
13
|
+
const [search, setSearch] = React.useState<string>('');
|
|
14
|
+
|
|
15
|
+
React.useEffect(() => {
|
|
16
|
+
|
|
17
|
+
if (!dataInit) return;
|
|
18
|
+
if (Array.isArray(dataInit))
|
|
19
|
+
setData(dataInit);
|
|
20
|
+
else
|
|
21
|
+
dataInit(search).then(setData);
|
|
22
|
+
|
|
23
|
+
}, [dataInit, search]);
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<Component
|
|
27
|
+
{...props}
|
|
28
|
+
data={data}
|
|
29
|
+
onSearchChange={setSearch}
|
|
30
|
+
/>
|
|
31
|
+
)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export default ConnectedInput;
|
|
@@ -99,7 +99,7 @@ export default function Liste<TRow extends TDonneeInconnue>({
|
|
|
99
99
|
<td>
|
|
100
100
|
<Checkbox
|
|
101
101
|
id={"selectionner" + iDonnee}
|
|
102
|
-
value={selection.current.some(s => s
|
|
102
|
+
value={selection.current.some(s => s?.id === row?.id)}
|
|
103
103
|
onChange={(isSelected: boolean) => {
|
|
104
104
|
selection.set(current => isSelected
|
|
105
105
|
// Ajoute
|
|
@@ -230,7 +230,7 @@ export default function Liste<TRow extends TDonneeInconnue>({
|
|
|
230
230
|
<Checkbox
|
|
231
231
|
value={selection.current.length >= rows.length}
|
|
232
232
|
onChange={(status: boolean) => {
|
|
233
|
-
selection.set(status ? rows : []);
|
|
233
|
+
selection.set(status ? rows.filter(r => r?.id) : []);
|
|
234
234
|
}}
|
|
235
235
|
/>
|
|
236
236
|
</th>
|
|
@@ -22,7 +22,9 @@ export { default as Date } from './Date';
|
|
|
22
22
|
export { default as Select } from './Select';
|
|
23
23
|
export { default as Checkbox } from './Checkbox';
|
|
24
24
|
export { InputWrapper } from './utils';
|
|
25
|
-
export { default as DropDown } from './DropDown';
|
|
25
|
+
export { default as DropDown } from './DropDown';
|
|
26
|
+
|
|
27
|
+
export { default as ConnectedInput } from './ConnectedInput';
|
|
26
28
|
|
|
27
29
|
// Mantine
|
|
28
30
|
export {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "5htp-core",
|
|
3
3
|
"description": "Convenient TypeScript framework designed for Performance and Productivity.",
|
|
4
|
-
"version": "0.6.0-
|
|
4
|
+
"version": "0.6.0-5",
|
|
5
5
|
"author": "Gaetan Le Gac (https://github.com/gaetanlegac)",
|
|
6
6
|
"repository": "git://github.com/gaetanlegac/5htp-core.git",
|
|
7
7
|
"license": "MIT",
|
package/types/icons.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export type TIcones = "solid/spinner-third"|"long-arrow-right"|"
|
|
1
|
+
export type TIcones = "times"|"solid/spinner-third"|"long-arrow-right"|"sack-dollar"|"bell"|"bullseye"|"project-diagram"|"user-friends"|"eye"|"lock"|"comments"|"phone"|"chalkboard-teacher"|"rocket"|"planet-ringed"|"brands/linkedin"|"user-circle"|"crosshairs"|"plus-circle"|"comments-alt"|"arrow-right"|"chart-bar"|"user-shield"|"shield-alt"|"chart-line"|"money-bill-wave"|"star"|"link"|"file-alt"|"long-arrow-left"|"calendar-alt"|"paper-plane"|"at"|"search"|"lightbulb"|"magnet"|"key"|"user"|"binoculars"|"times-circle"|"user-plus"|"mouse-pointer"|"thumbs-up"|"dollar-sign"|"angle-up"|"angle-down"|"solid/crown"|"brands/discord"|"pen"|"plus"|"file"|"envelope"|"info-circle"|"check-circle"|"exclamation-circle"|"check"|"arrow-left"|"meh-rolling-eyes"|"bars"|"trash"|"solid/star"|"solid/star-half-alt"|"regular/star"|"chevron-left"|"cog"|"power-off"|"question-circle"|"play"|"minus-circle"|"external-link"|"plane-departure"|"brands/whatsapp"|"wind"|"usd-circle"|"users"|"home"|"home-alt"|"trophy"|"map-marker-alt"|"clock"|"arrow-to-bottom"|"ellipsis-h"|"exclamation-triangle"|"industry"|"map-marker"|"calendar"|"briefcase"|"fire"|"globe"|"solid/magic"|"magic"|"building"|"graduation-cap"|"unlink"|"bold"|"italic"|"underline"|"strikethrough"|"subscript"|"superscript"|"code"|"font"|"empty-set"|"horizontal-rule"|"page-break"|"image"|"table"|"poll"|"columns"|"sticky-note"|"caret-right"|"align-left"|"align-center"|"align-right"|"align-justify"|"indent"|"outdent"|"list-ul"|"check-square"|"h1"|"h2"|"h3"|"h4"|"list-ol"|"paragraph"|"quote-left"
|