@konstructio/ui 0.0.12-alpha.11 → 0.0.12-alpha.12

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.
@@ -1,22 +1,22 @@
1
1
  import { jsx as m } from "react/jsx-runtime";
2
2
  import { useCallback as i } from "react";
3
- import { DropdownContext as d } from "./dropdown.context.js";
4
- import { useToggle as f } from "../../../hooks/useToggle.js";
5
- const a = ({ children: o, onChange: r, value: t }) => {
6
- const [e, p] = f(!1), s = i(
7
- (l) => {
8
- r == null || r(l);
3
+ import { DropdownContext as u } from "./dropdown.context.js";
4
+ import { useToggle as d } from "../../../hooks/useToggle.js";
5
+ const x = ({ children: o, onChange: r, value: t }) => {
6
+ const [e, l] = d(!1), p = i(
7
+ (s) => {
8
+ r == null || r({ target: { value: s } });
9
9
  },
10
10
  [r]
11
11
  );
12
12
  return /* @__PURE__ */ m(
13
- d.Provider,
13
+ u.Provider,
14
14
  {
15
- value: { value: t, isOpen: e, setValue: s, toggleOpen: p },
15
+ value: { value: t, isOpen: e, setValue: p, toggleOpen: l },
16
16
  children: o
17
17
  }
18
18
  );
19
19
  };
20
20
  export {
21
- a as DropdownProvider
21
+ x as DropdownProvider
22
22
  };
package/dist/index.d.ts CHANGED
@@ -135,7 +135,11 @@ export declare const Divider: FunctionComponent<HTMLAttributes<HTMLDivElement>>;
135
135
  export declare const Dropdown: FC<DropdownProps>;
136
136
 
137
137
  declare interface DropdownProps extends VariantProps<typeof dropdownVariants>, Omit<React.InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange'> {
138
- onChange?: (value: Option_3) => void;
138
+ onChange?: ({ target: { value } }: {
139
+ target: {
140
+ value: Option_3;
141
+ };
142
+ }) => void;
139
143
  label?: string;
140
144
  options: Option_3[];
141
145
  labelClassName?: string;
package/dist/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@konstructio/ui",
3
3
  "description": "A set of reusable and customizable React components built for konstruct.io",
4
4
  "private": false,
5
- "version": "0.0.12-alpha.10",
5
+ "version": "0.0.12-alpha.11",
6
6
  "type": "module",
7
7
  "license": "MIT",
8
8
  "main": "dist/index.js",
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@konstructio/ui",
3
3
  "description": "A set of reusable and customizable React components built for konstruct.io",
4
4
  "private": false,
5
- "version": "0.0.12-alpha.11",
5
+ "version": "0.0.12-alpha.12",
6
6
  "type": "module",
7
7
  "license": "MIT",
8
8
  "main": "dist/index.js",