@deftui/addons 0.1.2 → 0.1.4
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/form.d.mts +2 -13
- package/dist/form.mjs +2 -13
- package/dist/map.d.mts +30 -0
- package/dist/map.mjs +18 -0
- package/dist/maplibregl/map.d.mts +388 -0
- package/dist/maplibregl/map.mjs +1641 -0
- package/dist/node_modules/.bun/@types_geojson@7946.0.16/node_modules/@types/geojson/index.d.mts +174 -0
- package/dist/node_modules/.bun/lucide-react@1.66.0_c841d34b494ec30a/node_modules/lucide-react/dist/esm/Icon.mjs +37 -0
- package/dist/node_modules/.bun/lucide-react@1.66.0_c841d34b494ec30a/node_modules/lucide-react/dist/esm/context.mjs +12 -0
- package/dist/node_modules/.bun/lucide-react@1.66.0_c841d34b494ec30a/node_modules/lucide-react/dist/esm/createLucideIcon.mjs +23 -0
- package/dist/node_modules/.bun/lucide-react@1.66.0_c841d34b494ec30a/node_modules/lucide-react/dist/esm/icons/loader-circle.mjs +20 -0
- package/dist/node_modules/.bun/lucide-react@1.66.0_c841d34b494ec30a/node_modules/lucide-react/dist/esm/icons/locate.mjs +51 -0
- package/dist/node_modules/.bun/lucide-react@1.66.0_c841d34b494ec30a/node_modules/lucide-react/dist/esm/icons/maximize.mjs +33 -0
- package/dist/node_modules/.bun/lucide-react@1.66.0_c841d34b494ec30a/node_modules/lucide-react/dist/esm/icons/minus.mjs +19 -0
- package/dist/node_modules/.bun/lucide-react@1.66.0_c841d34b494ec30a/node_modules/lucide-react/dist/esm/icons/plus.mjs +22 -0
- package/dist/node_modules/.bun/lucide-react@1.66.0_c841d34b494ec30a/node_modules/lucide-react/dist/esm/icons/x.mjs +22 -0
- package/dist/node_modules/.bun/lucide-react@1.66.0_c841d34b494ec30a/node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconForReact.mjs +22 -0
- package/dist/node_modules/.bun/lucide-react@1.66.0_c841d34b494ec30a/node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconNode.mjs +57 -0
- package/dist/node_modules/.bun/lucide-react@1.66.0_c841d34b494ec30a/node_modules/lucide-react/dist/esm/shared/src/build/defaultAttributes.mjs +19 -0
- package/dist/node_modules/.bun/lucide-react@1.66.0_c841d34b494ec30a/node_modules/lucide-react/dist/esm/shared/src/utils/hasA11yProp.mjs +12 -0
- package/dist/node_modules/.bun/lucide-react@1.66.0_c841d34b494ec30a/node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.mjs +11 -0
- package/dist/node_modules/.bun/lucide-react@1.66.0_c841d34b494ec30a/node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.mjs +22 -0
- package/dist/node_modules/.bun/lucide-react@1.66.0_c841d34b494ec30a/node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.mjs +9 -0
- package/dist/node_modules/.bun/lucide-react@1.66.0_c841d34b494ec30a/node_modules/lucide-react/dist/esm/shared/src/utils/toLucideIconData.mjs +18 -0
- package/dist/node_modules/.bun/lucide-react@1.66.0_c841d34b494ec30a/node_modules/lucide-react/dist/esm/shared/src/utils/toPascalCase.mjs +13 -0
- package/dist/react-hook-form/field.d.mts +11 -6
- package/dist/react-hook-form/field.mjs +3 -4
- package/dist/react-hook-form/form.d.mts +1 -1
- package/dist/react-hook-form/form.mjs +1 -1
- package/dist/styles.css +21 -0
- package/package.json +18 -9
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { Field } from "@deftui/react";
|
|
1
2
|
import { Fragment, cloneElement, isValidElement, useId } from "react";
|
|
2
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { Field } from "@deftui/react";
|
|
4
4
|
import { useController } from "react-hook-form";
|
|
5
5
|
// src/react-hook-form/field.tsx
|
|
6
6
|
function RHFField(props) {
|
|
7
|
-
const { label, description,
|
|
7
|
+
const { label, description, injectControlProps = true, children, ...controllerProps } = props;
|
|
8
8
|
const id = useId();
|
|
9
9
|
const controller = useController(controllerProps);
|
|
10
10
|
const hasError = Boolean(controller.fieldState.error?.message);
|
|
@@ -14,12 +14,11 @@ function RHFField(props) {
|
|
|
14
14
|
"aria-describedby": [description != null && `${id}-description`, hasError && `${id}-error`].filter(Boolean).join(" ") || void 0
|
|
15
15
|
};
|
|
16
16
|
const child = children(controller, controlProps);
|
|
17
|
-
const control = isValidElement(child) && child.type !== Fragment ? child : null;
|
|
17
|
+
const control = injectControlProps && isValidElement(child) && child.type !== Fragment ? child : null;
|
|
18
18
|
const controlId = control?.props.id ?? id;
|
|
19
19
|
const descriptionIds = [control?.props["aria-describedby"], controlProps["aria-describedby"]].join(" ").split(/\s+/).filter(Boolean);
|
|
20
20
|
const describedBy = [...new Set(descriptionIds)].join(" ") || void 0;
|
|
21
21
|
return /* @__PURE__ */ jsxs(Field, {
|
|
22
|
-
...fieldProps,
|
|
23
22
|
"data-invalid": controller.fieldState.invalid,
|
|
24
23
|
"data-disabled": controller.field.disabled,
|
|
25
24
|
children: [
|
package/dist/styles.css
CHANGED
|
@@ -1 +1,22 @@
|
|
|
1
1
|
@source "./";
|
|
2
|
+
|
|
3
|
+
@layer base {
|
|
4
|
+
.maplibregl-popup-content {
|
|
5
|
+
@apply rounded-none! bg-transparent! p-0! shadow-none!;
|
|
6
|
+
}
|
|
7
|
+
.maplibregl-popup-tip {
|
|
8
|
+
@apply hidden!;
|
|
9
|
+
}
|
|
10
|
+
.maplibregl-ctrl-attrib {
|
|
11
|
+
@apply bg-background! text-muted-foreground! border-border! rounded-md! border! shadow-sm!;
|
|
12
|
+
}
|
|
13
|
+
.maplibregl-ctrl-attrib a {
|
|
14
|
+
@apply text-muted-foreground!;
|
|
15
|
+
}
|
|
16
|
+
.maplibregl-ctrl-attrib a:hover {
|
|
17
|
+
@apply text-foreground!;
|
|
18
|
+
}
|
|
19
|
+
.maplibregl-ctrl-attrib-button {
|
|
20
|
+
@apply bg-transparent! dark:invert;
|
|
21
|
+
}
|
|
22
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deftui/addons",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/KiriRainCat/deftui.git",
|
|
@@ -14,14 +14,18 @@
|
|
|
14
14
|
"**/*.css"
|
|
15
15
|
],
|
|
16
16
|
"exports": {
|
|
17
|
-
"./
|
|
18
|
-
"types": "./dist/
|
|
19
|
-
"import": "./dist/
|
|
17
|
+
"./map": {
|
|
18
|
+
"types": "./dist/map.d.mts",
|
|
19
|
+
"import": "./dist/map.mjs"
|
|
20
20
|
},
|
|
21
21
|
"./form": {
|
|
22
22
|
"types": "./dist/form.d.mts",
|
|
23
23
|
"import": "./dist/form.mjs"
|
|
24
24
|
},
|
|
25
|
+
"./modal": {
|
|
26
|
+
"types": "./dist/modal.d.mts",
|
|
27
|
+
"import": "./dist/modal.mjs"
|
|
28
|
+
},
|
|
25
29
|
"./router": {
|
|
26
30
|
"types": "./dist/router.d.mts",
|
|
27
31
|
"import": "./dist/router.mjs"
|
|
@@ -40,17 +44,22 @@
|
|
|
40
44
|
"fix": "vp check --fix"
|
|
41
45
|
},
|
|
42
46
|
"devDependencies": {
|
|
43
|
-
"@deftui/react": "^0.1.
|
|
47
|
+
"@deftui/react": "^0.1.4",
|
|
44
48
|
"@tanstack/react-router": "^1.170.46",
|
|
49
|
+
"@types/geojson": "^7946.0.16",
|
|
45
50
|
"@types/react": "^19.3.0",
|
|
51
|
+
"@types/react-dom": "^19.3.0",
|
|
52
|
+
"lucide-react": "^1.66.0",
|
|
46
53
|
"react-hook-form": "^7.91.0",
|
|
47
54
|
"vite-plus": "catalog:"
|
|
48
55
|
},
|
|
49
56
|
"peerDependencies": {
|
|
50
|
-
"@deftui/react": "^0.1.
|
|
51
|
-
"@tanstack/react-router": "^1",
|
|
52
|
-
"
|
|
53
|
-
"react
|
|
57
|
+
"@deftui/react": "^0.1.4",
|
|
58
|
+
"@tanstack/react-router": "^1.170.0",
|
|
59
|
+
"maplibre-gl": "^6.16.0",
|
|
60
|
+
"react": "^19.0.0",
|
|
61
|
+
"react-dom": "^19.0.0",
|
|
62
|
+
"react-hook-form": "^7.91.0"
|
|
54
63
|
},
|
|
55
64
|
"peerDependenciesMeta": {
|
|
56
65
|
"@tanstack/react-router": {
|