@pyck/react 0.0.3 → 0.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.
@@ -7,11 +7,11 @@ import { CheckCircleIcon, FilePenLineIcon, Trash2Icon } from "lucide-react";
7
7
  import { omit } from "@pyck/react/utils";
8
8
  import { useForm } from "react-hook-form";
9
9
  import { Show } from "@pyck/react/show";
10
- import { Dialog, DialogContext as Context, useDialogContext } from "@ark-ui/react/dialog";
11
10
  import { Portal } from "@ark-ui/react/portal";
12
11
  import { Button, CloseButton } from "@pyck/react/button";
13
12
  import { FeaturedIcon } from "@pyck/react/icon";
14
13
  import { shallow } from "zustand/shallow";
14
+ import { Dialog, DialogContext as Context, useDialogContext } from "@ark-ui/react/dialog";
15
15
  import { zodResolver } from "@hookform/resolvers/zod";
16
16
  import { Form } from "@pyck/react/form";
17
17
 
@@ -10,17 +10,17 @@ import { Portal } from "@ark-ui/react/portal";
10
10
  import { zodResolver } from "@hookform/resolvers/zod";
11
11
  import { Form } from "@pyck/react/form";
12
12
  import { Fieldset } from "@pyck/react/fieldset";
13
+ import { useListCollection } from "@ark-ui/react";
13
14
  import { InputField } from "@pyck/react/input";
14
15
  import { NumberInputField } from "@pyck/react/number-input";
15
- import { Combobox, useFilter, useListCollection } from "@pyck/react/combobox";
16
- import { useListCollection as useListCollection$1 } from "@ark-ui/react";
16
+ import { Combobox, useFilter, useListCollection as useListCollection$1 } from "@pyck/react/combobox";
17
17
  import { SelectField } from "@pyck/react/select";
18
18
  import { TagsInput } from "@pyck/react/tags-input";
19
19
 
20
20
  //#region src/components/json-form-builder/components/combobox-from-items.tsx
21
21
  const ComboboxFromItems = ({ name, label, helperText, items, required }) => {
22
22
  const { contains } = useFilter({ sensitivity: "base" });
23
- const { collection, filter } = useListCollection({
23
+ const { collection, filter } = useListCollection$1({
24
24
  initialItems: items,
25
25
  filter: contains
26
26
  });
@@ -54,7 +54,7 @@ const ComboboxFromItems = ({ name, label, helperText, items, required }) => {
54
54
  //#endregion
55
55
  //#region src/components/json-form-builder/components/select-field-from-items.tsx
56
56
  const SelectFieldFromItems = ({ name, label, helperText, placeholder, items, required }) => {
57
- const { collection } = useListCollection$1({ initialItems: items });
57
+ const { collection } = useListCollection({ initialItems: items });
58
58
  if (items.length === 0) return null;
59
59
  return <SelectField.Root name={name} label={label} helperText={helperText} placeholder={placeholder ?? `Select ${label}`} collection={collection} multiple={false} required={required}>
60
60
  {items.map((item) => <SelectField.Item key={item.value} item={item}>
@@ -53,7 +53,7 @@ const DateCell = (props) => {
53
53
  //#endregion
54
54
  //#region src/components/table/cells/number-cell.tsx
55
55
  const NumberCell = (props) => {
56
- const { value, minimumFractionDigits, maximumFractionDigits, locale: localeProp, useGrouping, copyable, tooltip, icon, ...rest } = props;
56
+ const { value, minimumFractionDigits, maximumFractionDigits, locale: localeProp, useGrouping, copyable, tooltip, justifyContent = "flex-end", icon, ...rest } = props;
57
57
  const locale = localeProp ?? "en";
58
58
  const formatValue = (n) => {
59
59
  if (!Number.isFinite(n)) return null;
@@ -63,7 +63,7 @@ const NumberCell = (props) => {
63
63
  maximumFractionDigits
64
64
  }).format(n);
65
65
  };
66
- return <TableCellContent icon={icon} tooltip={tooltip} justifyContent="flex-end" {...rest}>
66
+ return <TableCellContent icon={icon} tooltip={tooltip} justifyContent={justifyContent} {...rest}>
67
67
  <DisplayValue value={value} formatValue={formatValue} copyable={copyable} />
68
68
  </TableCellContent>;
69
69
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pyck/react",
3
3
  "type": "module",
4
- "version": "0.0.3",
4
+ "version": "0.0.5",
5
5
  "license": "MIT",
6
6
  "homepage": "https://pyck.ai",
7
7
  "repository": {
@@ -25,6 +25,14 @@
25
25
  "postpack": "bunx clean-package restore"
26
26
  },
27
27
  "exports": {
28
+ "./types": {
29
+ "types": "./dist/types/index.d.ts",
30
+ "default": "./dist/types/index.js"
31
+ },
32
+ "./utils": {
33
+ "types": "./dist/utils/index.d.ts",
34
+ "default": "./dist/utils/index.js"
35
+ },
28
36
  "./*": {
29
37
  "types": "./dist/components/*/index.d.ts",
30
38
  "default": "./dist/components/*/index.js"
@@ -45,7 +53,7 @@
45
53
  },
46
54
  "devDependencies": {
47
55
  "@hookform/resolvers": "5.2.2",
48
- "@pyck/styled-system": "0.0.3",
56
+ "@pyck/styled-system": "0.0.5",
49
57
  "@storybook/react": "10.2.10",
50
58
  "@testing-library/dom": "10.4.1",
51
59
  "@testing-library/jest-dom": "6.9.1",
@@ -67,7 +75,7 @@
67
75
  "zod": "4.3.6"
68
76
  },
69
77
  "peerDependencies": {
70
- "@pyck/styled-system": ">=0.0.3",
78
+ "@pyck/styled-system": ">=0.0.5",
71
79
  "react": ">=18.0.0",
72
80
  "react-dom": ">=18.0.0",
73
81
  "react-hook-form": ">=7.0.0",
@@ -77,6 +85,14 @@
77
85
  "clean-package": {
78
86
  "replace": {
79
87
  "exports": {
88
+ "./types": {
89
+ "types": "./dist/types/index.d.ts",
90
+ "default": "./dist/types/index.js"
91
+ },
92
+ "./utils": {
93
+ "types": "./dist/utils/index.d.ts",
94
+ "default": "./dist/utils/index.js"
95
+ },
80
96
  "./*": {
81
97
  "types": "./dist/components/*/index.d.ts",
82
98
  "default": "./dist/components/*/index.js"