@addsign/moje-agenda-shared-lib 2.0.4 → 2.0.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/dist/Dialog-BtXGfOmv.js +423 -0
- package/dist/Dialog-BtXGfOmv.js.map +1 -0
- package/dist/assets/style.css +15 -0
- package/dist/components/datatable/DataTable.js +2 -1
- package/dist/components/datatable/DataTable.js.map +1 -1
- package/dist/components/datatable/DataTableServer.js +7 -4
- package/dist/components/datatable/DataTableServer.js.map +1 -1
- package/dist/components/datatable/types.d.ts +1 -0
- package/dist/components/form/AutocompleteSearchBar.js +2 -1
- package/dist/components/form/AutocompleteSearchBar.js.map +1 -1
- package/dist/components/form/AutocompleteSearchBarServer.js +2 -1
- package/dist/components/form/AutocompleteSearchBarServer.js.map +1 -1
- package/dist/components/form/FileInput.js +3 -2
- package/dist/components/form/FileInput.js.map +1 -1
- package/dist/components/form/FileInputMultiple.js +3 -2
- package/dist/components/form/FileInputMultiple.js.map +1 -1
- package/dist/components/form/FormField.js +2 -1
- package/dist/components/form/FormField.js.map +1 -1
- package/dist/components/form/PositionsSelectorSingle.js +2 -1
- package/dist/components/form/PositionsSelectorSingle.js.map +1 -1
- package/dist/components/form/SelectField.js +2 -1
- package/dist/components/form/SelectField.js.map +1 -1
- package/dist/components/profiles/ProfileOverview.js +2 -1
- package/dist/components/profiles/ProfileOverview.js.map +1 -1
- package/dist/components/ui/Combobox.js +17 -7
- package/dist/components/ui/Combobox.js.map +1 -1
- package/dist/components/ui/Dialog.js +1 -1
- package/dist/components/ui/ScrollArea.js +2 -2
- package/dist/components/ui/checkbox.d.ts +4 -0
- package/dist/components/ui/checkbox.js +180 -0
- package/dist/components/ui/checkbox.js.map +1 -0
- package/dist/components/ui/command.js +2 -2
- package/dist/components/ui/popover.js +7 -6
- package/dist/components/ui/popover.js.map +1 -1
- package/dist/components/ui/radioGroup.js +7 -5
- package/dist/components/ui/radioGroup.js.map +1 -1
- package/dist/components/ui/select.js +8 -6
- package/dist/components/ui/select.js.map +1 -1
- package/dist/components/ui/tooltip.js +6 -5
- package/dist/components/ui/tooltip.js.map +1 -1
- package/dist/index-BLOUFOiQ.js +2266 -0
- package/dist/index-BLOUFOiQ.js.map +1 -0
- package/dist/index-CA2QNu6z.js +131 -0
- package/dist/index-CA2QNu6z.js.map +1 -0
- package/dist/index-CAxGI0Uw.js +230 -0
- package/dist/index-CAxGI0Uw.js.map +1 -0
- package/dist/index-CDCkSjVs.js +110 -0
- package/dist/index-CDCkSjVs.js.map +1 -0
- package/dist/index-CDlDRp01.js +1173 -0
- package/dist/index-CDlDRp01.js.map +1 -0
- package/dist/index-CshadhlS.js +15 -0
- package/dist/index-CshadhlS.js.map +1 -0
- package/dist/index-DFSwSCB0.js +47 -0
- package/dist/index-DFSwSCB0.js.map +1 -0
- package/dist/index-Deoi9R3y.js +15 -0
- package/dist/index-Deoi9R3y.js.map +1 -0
- package/dist/index-DjvLSytK.js +2203 -0
- package/dist/index-DjvLSytK.js.map +1 -0
- package/dist/index-E5yk6fTE.js +129 -0
- package/dist/index-E5yk6fTE.js.map +1 -0
- package/dist/index-pLFWXSOv.js +40 -0
- package/dist/index-pLFWXSOv.js.map +1 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.js +3 -1
- package/dist/main.js.map +1 -1
- package/lib/components/datatable/DataTableServer.tsx +5 -1
- package/lib/components/datatable/types.ts +1 -0
- package/lib/components/ui/Combobox.tsx +18 -7
- package/lib/components/ui/checkbox.tsx +30 -0
- package/lib/main.ts +1 -0
- package/package.json +4 -2
- package/tailwind.config.js +97 -0
|
@@ -36,7 +36,7 @@ const Combobox = React.forwardRef<HTMLButtonElement, ComboboxProps>(
|
|
|
36
36
|
placeholder,
|
|
37
37
|
placeholderSearch = "Vyhledejte položku",
|
|
38
38
|
clearable = false,
|
|
39
|
-
options = [],
|
|
39
|
+
options: propOptions = [],
|
|
40
40
|
allowAddNew = false,
|
|
41
41
|
},
|
|
42
42
|
ref
|
|
@@ -44,17 +44,28 @@ const Combobox = React.forwardRef<HTMLButtonElement, ComboboxProps>(
|
|
|
44
44
|
const [open, setOpen] = React.useState(false);
|
|
45
45
|
const [value, setValue] = React.useState(propValue || "");
|
|
46
46
|
const [inputValue, setInputValue] = React.useState("");
|
|
47
|
-
const [frameworks, setFrameworks] =
|
|
47
|
+
const [frameworks, setFrameworks] =
|
|
48
|
+
React.useState<IOptionItem[]>(propOptions);
|
|
48
49
|
|
|
49
50
|
React.useEffect(() => {
|
|
51
|
+
console.log(
|
|
52
|
+
"%clibcomponentsCombobox.tsx:51 propValue",
|
|
53
|
+
"color: #007acc;",
|
|
54
|
+
propValue
|
|
55
|
+
);
|
|
50
56
|
if (propValue !== undefined) {
|
|
51
57
|
setValue(propValue);
|
|
52
58
|
}
|
|
53
59
|
}, [propValue]);
|
|
54
60
|
|
|
55
61
|
React.useEffect(() => {
|
|
56
|
-
|
|
57
|
-
|
|
62
|
+
console.log(
|
|
63
|
+
"%clibcomponentsCombobox.tsx:60 setFrameworks",
|
|
64
|
+
"color: #007acc;",
|
|
65
|
+
setFrameworks
|
|
66
|
+
);
|
|
67
|
+
setFrameworks(propOptions);
|
|
68
|
+
}, [propOptions]);
|
|
58
69
|
|
|
59
70
|
const handleSelect = (currentValue: string) => {
|
|
60
71
|
if (currentValue === "add-custom") {
|
|
@@ -127,7 +138,7 @@ const Combobox = React.forwardRef<HTMLButtonElement, ComboboxProps>(
|
|
|
127
138
|
</Button>
|
|
128
139
|
)}
|
|
129
140
|
</div>
|
|
130
|
-
<PopoverContent className="min-w-[200px] w-
|
|
141
|
+
<PopoverContent className="min-w-[200px] w-[var(--radix-popover-trigger-width)] p-0">
|
|
131
142
|
<Command>
|
|
132
143
|
<CommandInput
|
|
133
144
|
placeholder={placeholderSearch}
|
|
@@ -154,8 +165,8 @@ const Combobox = React.forwardRef<HTMLButtonElement, ComboboxProps>(
|
|
|
154
165
|
{frameworks.map((framework) => (
|
|
155
166
|
<CommandItem
|
|
156
167
|
key={framework.value}
|
|
157
|
-
value={framework.
|
|
158
|
-
onSelect={handleSelect}
|
|
168
|
+
value={framework.label as string}
|
|
169
|
+
onSelect={() => handleSelect(framework.value as string)}
|
|
159
170
|
>
|
|
160
171
|
{framework.label}
|
|
161
172
|
<Check
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
5
|
+
import { Check } from "lucide-react";
|
|
6
|
+
|
|
7
|
+
import { cn } from "../../utils/utils";
|
|
8
|
+
|
|
9
|
+
const Checkbox = React.forwardRef<
|
|
10
|
+
React.ElementRef<typeof CheckboxPrimitive.Root>,
|
|
11
|
+
React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>
|
|
12
|
+
>(({ className, ...props }, ref) => (
|
|
13
|
+
<CheckboxPrimitive.Root
|
|
14
|
+
ref={ref}
|
|
15
|
+
className={cn(
|
|
16
|
+
"peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
|
|
17
|
+
className
|
|
18
|
+
)}
|
|
19
|
+
{...props}
|
|
20
|
+
>
|
|
21
|
+
<CheckboxPrimitive.Indicator
|
|
22
|
+
className={cn("flex items-center justify-center text-current")}
|
|
23
|
+
>
|
|
24
|
+
<Check className="h-4 w-4" />
|
|
25
|
+
</CheckboxPrimitive.Indicator>
|
|
26
|
+
</CheckboxPrimitive.Root>
|
|
27
|
+
));
|
|
28
|
+
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
29
|
+
|
|
30
|
+
export { Checkbox };
|
package/lib/main.ts
CHANGED
|
@@ -60,6 +60,7 @@ export * from "./components/ui/select.tsx";
|
|
|
60
60
|
export * from "./components/ui/tooltip.tsx";
|
|
61
61
|
export * from "./components/ui/separator.tsx";
|
|
62
62
|
export * from "./components/ui/textarea.tsx";
|
|
63
|
+
export * from "./components/ui/checkbox.tsx";
|
|
63
64
|
export { Button as ButtonCN, buttonVariants } from "./components/ui/button.tsx";
|
|
64
65
|
|
|
65
66
|
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@addsign/moje-agenda-shared-lib",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.6",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/main.js",
|
|
7
7
|
"types": "dist/main.d.ts",
|
|
8
8
|
"files": [
|
|
9
9
|
"dist",
|
|
10
|
-
"lib"
|
|
10
|
+
"lib",
|
|
11
|
+
"tailwind.config.js"
|
|
11
12
|
],
|
|
12
13
|
"sideEffects": [
|
|
13
14
|
"**/*.css"
|
|
@@ -63,6 +64,7 @@
|
|
|
63
64
|
"dependencies": {
|
|
64
65
|
"@addsign/moje-agenda-shared-lib": "file:",
|
|
65
66
|
"@hookform/resolvers": "^3.9.1",
|
|
67
|
+
"@radix-ui/react-checkbox": "^1.1.2",
|
|
66
68
|
"@radix-ui/react-dialog": "^1.1.2",
|
|
67
69
|
"@radix-ui/react-label": "^2.1.0",
|
|
68
70
|
"@radix-ui/react-popover": "^1.1.2",
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
|
|
2
|
+
/** @type {import('tailwindcss').Config.theme.extend} */
|
|
3
|
+
export const TAILWIND_THEME_EXTEND = {
|
|
4
|
+
colors: {
|
|
5
|
+
border: "var(--border)",
|
|
6
|
+
input: "var(--input)",
|
|
7
|
+
ring: "var(--ring)",
|
|
8
|
+
background: "var(--background)",
|
|
9
|
+
foreground: "var(--foreground)",
|
|
10
|
+
|
|
11
|
+
// Using modern `rgb`
|
|
12
|
+
primary: {
|
|
13
|
+
DEFAULT: "var(--color-primary)",
|
|
14
|
+
hover: "var(--color-primary-hover)",
|
|
15
|
+
text: "var(--color-primary-text)",
|
|
16
|
+
foreground: "var(--color-primary-text)",
|
|
17
|
+
border: "var(--color-primary-border)",
|
|
18
|
+
},
|
|
19
|
+
secondary: {
|
|
20
|
+
DEFAULT: "var(--color-secondary)",
|
|
21
|
+
hover: "var(--color-secondary-hover)",
|
|
22
|
+
text: "var(--color-secondary-text)",
|
|
23
|
+
foreground: "var(--secondary-foreground)",
|
|
24
|
+
border: "var(--color-secondary-border)",
|
|
25
|
+
},
|
|
26
|
+
danger: {
|
|
27
|
+
DEFAULT: "var(--color-danger)",
|
|
28
|
+
hover: "var(--color-danger-hover)",
|
|
29
|
+
text: "var(--color-danger-text)",
|
|
30
|
+
border: "var(--color-danger-border)",
|
|
31
|
+
},
|
|
32
|
+
destructive: {
|
|
33
|
+
DEFAULT: "var(--destructive)",
|
|
34
|
+
foreground: "var(--destructive-foreground)",
|
|
35
|
+
},
|
|
36
|
+
warning: {
|
|
37
|
+
DEFAULT: "var(--color-warning)",
|
|
38
|
+
hover: "var(--color-warning-hover)",
|
|
39
|
+
text: "var(--color-warning-text)",
|
|
40
|
+
border: "var(--color-warning-border)",
|
|
41
|
+
},
|
|
42
|
+
success: {
|
|
43
|
+
DEFAULT: "var(--color-success)",
|
|
44
|
+
hover: "var(--color-success-hover)",
|
|
45
|
+
text: "var(--color-success-text)",
|
|
46
|
+
border: "var(--color-success-border)",
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
gray: {
|
|
50
|
+
150: "rgb(238, 240, 243)",
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
muted: {
|
|
54
|
+
DEFAULT: "var(--muted)",
|
|
55
|
+
foreground: "var(--muted-foreground)",
|
|
56
|
+
},
|
|
57
|
+
accent: {
|
|
58
|
+
DEFAULT: "var(--accent)",
|
|
59
|
+
foreground: "var(--accent-foreground)",
|
|
60
|
+
},
|
|
61
|
+
popover: {
|
|
62
|
+
DEFAULT: "var(--popover)",
|
|
63
|
+
foreground: "var(--popover-foreground)",
|
|
64
|
+
},
|
|
65
|
+
card: {
|
|
66
|
+
DEFAULT: "var(--card)",
|
|
67
|
+
foreground: "var(--card-foreground)",
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
animation: {
|
|
72
|
+
spin: 'spin 2s linear infinite',
|
|
73
|
+
},
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/** @type {import('tailwindcss').Config} */
|
|
77
|
+
export default {
|
|
78
|
+
darkMode: "class",
|
|
79
|
+
important: false, // Ensures all classes use !important
|
|
80
|
+
|
|
81
|
+
content: [
|
|
82
|
+
"./lib/**/*.{js,ts,jsx,tsx}",
|
|
83
|
+
"./lib/**/*.{ts,tsx}",
|
|
84
|
+
"./lib/components/**/*.{ts,tsx}",
|
|
85
|
+
"./node_modules/react-tailwindcss-datepicker/dist/index.esm.js",
|
|
86
|
+
],
|
|
87
|
+
theme: {
|
|
88
|
+
extend: TAILWIND_THEME_EXTEND,
|
|
89
|
+
},
|
|
90
|
+
plugins: [],
|
|
91
|
+
safelist: [
|
|
92
|
+
"bg-danger", // Add any other dynamic classes here
|
|
93
|
+
"lg:grid-cols-3",
|
|
94
|
+
"lg:grid-cols-2",
|
|
95
|
+
"lg:grid-cols-4",
|
|
96
|
+
],
|
|
97
|
+
};
|