@koobiq/react-primitives 0.21.0 → 0.22.0
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.
|
@@ -5,7 +5,7 @@ import { filterDOMProps } from "@koobiq/react-core";
|
|
|
5
5
|
import { useLocale } from "@react-aria/i18n";
|
|
6
6
|
import { useNumberField } from "@react-aria/numberfield";
|
|
7
7
|
import { useNumberFieldState } from "@react-stately/numberfield";
|
|
8
|
-
import { useSlottedContext, removeDataAttributes, useRenderProps, Provider } from "../../utils/index.js";
|
|
8
|
+
import { useSlottedContext, removeDataAttributes, useRenderProps, Provider, DEFAULT_SLOT } from "../../utils/index.js";
|
|
9
9
|
import { GroupContext } from "../Group/GroupContext.js";
|
|
10
10
|
import { LabelContext } from "../Label/LabelContext.js";
|
|
11
11
|
import { InputContext } from "../Input/InputContext.js";
|
|
@@ -57,6 +57,7 @@ const NumberField = forwardRef(
|
|
|
57
57
|
ButtonContext,
|
|
58
58
|
{
|
|
59
59
|
slots: {
|
|
60
|
+
[DEFAULT_SLOT]: {},
|
|
60
61
|
increment: incrementButtonProps,
|
|
61
62
|
decrement: decrementButtonProps
|
|
62
63
|
}
|
|
@@ -66,6 +67,7 @@ const NumberField = forwardRef(
|
|
|
66
67
|
TextContext,
|
|
67
68
|
{
|
|
68
69
|
slots: {
|
|
70
|
+
[DEFAULT_SLOT]: {},
|
|
69
71
|
description: descriptionProps,
|
|
70
72
|
errorMessage: errorMessageProps
|
|
71
73
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef } from "react";
|
|
4
4
|
import { filterDOMProps } from "@koobiq/react-core";
|
|
5
|
-
import { useSlottedContext, removeDataAttributes, useRenderProps, Provider } from "../../utils/index.js";
|
|
5
|
+
import { useSlottedContext, removeDataAttributes, useRenderProps, Provider, DEFAULT_SLOT } from "../../utils/index.js";
|
|
6
6
|
import { useRadioGroupState } from "../../behaviors/useRadioGroupState.js";
|
|
7
7
|
import { useRadioGroup } from "../../behaviors/useRadioGroup.js";
|
|
8
8
|
import { FieldErrorContext } from "../FieldError/FieldError.js";
|
|
@@ -59,6 +59,7 @@ const RadioGroup = forwardRef(
|
|
|
59
59
|
TextContext,
|
|
60
60
|
{
|
|
61
61
|
slots: {
|
|
62
|
+
[DEFAULT_SLOT]: {},
|
|
62
63
|
description: descriptionProps,
|
|
63
64
|
errorMessage: errorMessageProps
|
|
64
65
|
}
|
|
@@ -3,7 +3,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { forwardRef, useRef, useCallback } from "react";
|
|
4
4
|
import { useLocalizedStringFormatter, useControlledState, useIsomorphicEffect, filterDOMProps } from "@koobiq/react-core";
|
|
5
5
|
import { useTextField } from "@react-aria/textfield";
|
|
6
|
-
import { useSlottedContext, removeDataAttributes, useRenderProps, Provider } from "../../utils/index.js";
|
|
6
|
+
import { useSlottedContext, removeDataAttributes, useRenderProps, Provider, DEFAULT_SLOT } from "../../utils/index.js";
|
|
7
7
|
import intlMessages from "./intl.json.js";
|
|
8
8
|
import { InputContext } from "../Input/InputContext.js";
|
|
9
9
|
import { TextareaContext } from "../Textarea/TextareaContext.js";
|
|
@@ -99,6 +99,7 @@ function TextFieldRender(props, ref) {
|
|
|
99
99
|
TextContext,
|
|
100
100
|
{
|
|
101
101
|
slots: {
|
|
102
|
+
[DEFAULT_SLOT]: {},
|
|
102
103
|
description: descriptionProps,
|
|
103
104
|
errorMessage: errorMessageProps
|
|
104
105
|
}
|
|
@@ -108,6 +109,7 @@ function TextFieldRender(props, ref) {
|
|
|
108
109
|
ButtonContext,
|
|
109
110
|
{
|
|
110
111
|
slots: {
|
|
112
|
+
[DEFAULT_SLOT]: {},
|
|
111
113
|
"clear-button": {
|
|
112
114
|
"aria-label": stringFormatter.format("clear"),
|
|
113
115
|
preventFocusOnPress: true,
|
package/dist/index.d.ts
CHANGED
|
@@ -36,6 +36,8 @@ export * from '@react-stately/combobox';
|
|
|
36
36
|
export * from '@react-aria/toast';
|
|
37
37
|
export * from '@react-stately/toast';
|
|
38
38
|
export * from '@react-aria/breadcrumbs';
|
|
39
|
+
export * from '@react-aria/disclosure';
|
|
40
|
+
export * from '@react-stately/disclosure';
|
|
39
41
|
export type { CalendarProps, CalendarAria, CalendarGridAria, CalendarCellAria, AriaCalendarProps, AriaCalendarCellProps, AriaCalendarGridProps, } from '@react-aria/calendar';
|
|
40
42
|
export { useCalendar, useCalendarCell, useCalendarGrid, } from '@react-aria/calendar';
|
|
41
43
|
export * from '@react-stately/calendar';
|
package/dist/index.js
CHANGED
|
@@ -35,6 +35,8 @@ export * from "@react-stately/combobox";
|
|
|
35
35
|
export * from "@react-aria/toast";
|
|
36
36
|
export * from "@react-stately/toast";
|
|
37
37
|
export * from "@react-aria/breadcrumbs";
|
|
38
|
+
export * from "@react-aria/disclosure";
|
|
39
|
+
export * from "@react-stately/disclosure";
|
|
38
40
|
import { useCalendar, useCalendarCell, useCalendarGrid } from "@react-aria/calendar";
|
|
39
41
|
export * from "@react-stately/calendar";
|
|
40
42
|
export * from "@react-stately/form";
|
package/dist/utils/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo, useContext } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { useObjectRef, mergeRefs, mergeProps } from "@koobiq/react-core";
|
|
4
4
|
const DEFAULT_SLOT = Symbol("default");
|
|
5
5
|
function useRenderProps(props) {
|
|
6
6
|
const {
|
|
@@ -69,7 +69,7 @@ function removeDataAttributes(props) {
|
|
|
69
69
|
}
|
|
70
70
|
function useSlottedContext(context, slot) {
|
|
71
71
|
const ctx = useContext(context);
|
|
72
|
-
if (
|
|
72
|
+
if (slot === null) {
|
|
73
73
|
return null;
|
|
74
74
|
}
|
|
75
75
|
if (ctx && typeof ctx === "object" && "slots" in ctx && ctx.slots) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koobiq/react-primitives",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
"@react-aria/combobox": "^3.14.0",
|
|
32
32
|
"@react-aria/datepicker": "^3.15.2",
|
|
33
33
|
"@react-aria/dialog": "^3.5.19",
|
|
34
|
+
"@react-aria/disclosure": "^3.1.1",
|
|
34
35
|
"@react-aria/label": "^3.7.20",
|
|
35
36
|
"@react-aria/link": "^3.8.3",
|
|
36
37
|
"@react-aria/listbox": "^3.14.2",
|
|
@@ -57,6 +58,7 @@
|
|
|
57
58
|
"@react-stately/combobox": "^3.12.0",
|
|
58
59
|
"@react-stately/data": "^3.13.0",
|
|
59
60
|
"@react-stately/datepicker": "^3.15.2",
|
|
61
|
+
"@react-stately/disclosure": "^3.0.9",
|
|
60
62
|
"@react-stately/form": "^3.2.0",
|
|
61
63
|
"@react-stately/list": "^3.12.0",
|
|
62
64
|
"@react-stately/menu": "^3.9.3",
|
|
@@ -71,8 +73,8 @@
|
|
|
71
73
|
"@react-stately/toggle": "^3.9.2",
|
|
72
74
|
"@react-stately/tooltip": "^3.5.5",
|
|
73
75
|
"@react-stately/tree": "^3.8.9",
|
|
74
|
-
"@koobiq/
|
|
75
|
-
"@koobiq/
|
|
76
|
+
"@koobiq/logger": "0.22.0",
|
|
77
|
+
"@koobiq/react-core": "0.22.0"
|
|
76
78
|
},
|
|
77
79
|
"peerDependencies": {
|
|
78
80
|
"react": "18.x || 19.x",
|