@octanejs/base-ui 0.1.59 → 0.1.61
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/package.json +7 -7
- package/src/alert-dialog/handle.ts +1 -1
- package/src/combobox/items/createItems.ts +0 -1
- package/src/combobox/label/ComboboxLabel.tsrx +0 -1
- package/src/combobox/utils/ComboboxInternalDismissButton.tsrx +1 -1
- package/src/drawer/handle.ts +1 -1
- package/src/drawer/popup/DrawerPopup.tsrx +0 -1
- package/src/field/label/FieldLabel.tsrx +0 -1
- package/src/internals/PrehydrationScript.tsrx +0 -1
- package/src/internals/labelable-provider/LabelableContext.ts +0 -1
- package/src/internals/labelable-provider/LabelableProvider.tsrx +0 -1
- package/src/internals/use-button/useButton.ts +0 -1
- package/src/menu/submenu-trigger/MenuSubmenuTrigger.tsrx +0 -1
- package/src/number-field/input/NumberFieldInput.tsrx +0 -1
- package/src/number-field/utils/parse.ts +1 -1
- package/src/otp-field/input/OTPFieldInput.tsrx +0 -1
- package/src/otp-field/root/OTPFieldRoot.tsrx +0 -1
- package/src/popover/root/PopoverRoot.tsrx +1 -1
- package/src/select/item/SelectItem.tsrx +1 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@octanejs/base-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.61",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -430,11 +430,11 @@
|
|
|
430
430
|
},
|
|
431
431
|
"dependencies": {
|
|
432
432
|
"@floating-ui/utils": "^0.2.12",
|
|
433
|
-
"@octanejs/base-ui-utils": "0.1.
|
|
434
|
-
"@octanejs/floating-ui": "0.1.
|
|
433
|
+
"@octanejs/base-ui-utils": "0.1.9",
|
|
434
|
+
"@octanejs/floating-ui": "0.1.61"
|
|
435
435
|
},
|
|
436
436
|
"peerDependencies": {
|
|
437
|
-
"octane": "^0.
|
|
437
|
+
"octane": "^0.9.0",
|
|
438
438
|
"date-fns": "^4.0.0",
|
|
439
439
|
"@date-fns/tz": "^1.2.0",
|
|
440
440
|
"luxon": "^3.7.2"
|
|
@@ -467,9 +467,9 @@
|
|
|
467
467
|
"typescript-pristine-native": "npm:typescript@7.0.2",
|
|
468
468
|
"jsdom": "27.4.0",
|
|
469
469
|
"semver": "7.8.5",
|
|
470
|
-
"octane": "0.
|
|
471
|
-
"@octanejs/testing-library": "0.1.
|
|
472
|
-
"@octanejs/remix-router": "0.1.
|
|
470
|
+
"octane": "0.9.1",
|
|
471
|
+
"@octanejs/testing-library": "0.1.58",
|
|
472
|
+
"@octanejs/remix-router": "0.1.56"
|
|
473
473
|
},
|
|
474
474
|
"imports": {
|
|
475
475
|
"#prehydration/tabs/indicator": {
|
|
@@ -11,7 +11,7 @@ import { DialogHandle } from '../dialog/store/DialogHandle';
|
|
|
11
11
|
export class AlertDialogHandle<Payload> extends DialogHandle<Payload> {
|
|
12
12
|
// Nominal brand: makes this handle type distinct from `DialogHandle` and sibling handles so they
|
|
13
13
|
// can't be passed interchangeably. Type-only; has no runtime presence.
|
|
14
|
-
|
|
14
|
+
protected readonly __alertDialogBrand!: never;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
/**
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/** @jsxImportSource octane */
|
|
2
|
-
import type * as React from 'octane';
|
|
3
2
|
import { EMPTY_ARRAY } from '@octanejs/base-ui-utils/empty';
|
|
4
3
|
import { error } from '@octanejs/base-ui-utils/error';
|
|
5
4
|
import { flattenLeafItems, stringifyAsLabel } from '../../internals/resolveValueLabel.tsrx';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import * as React from 'octane';
|
|
3
3
|
import { error } from '@octanejs/base-ui-utils/error';
|
|
4
|
-
import type { SafeReact } from '@octanejs/base-ui-utils/safeReact';
|
|
5
4
|
import type { BaseUIComponentProps } from '../../internals/types';
|
|
6
5
|
import { useRenderElement } from '../../internals/useRenderElement.tsrx';
|
|
7
6
|
import type { FieldRoot } from '../../field/root/FieldRoot.tsrx';
|
|
@@ -15,7 +15,7 @@ type DismissEvent = React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElem
|
|
|
15
15
|
export const ComboboxInternalDismissButton = function ComboboxInternalDismissButton(
|
|
16
16
|
_WithRef: React.PropsWithoutRef<{}> & { ref?: React.Ref<HTMLSpanElement> },
|
|
17
17
|
) {
|
|
18
|
-
const { ref: forwardedRef = null
|
|
18
|
+
const { ref: forwardedRef = null } = _WithRef;
|
|
19
19
|
const store = useComboboxRootContext();
|
|
20
20
|
|
|
21
21
|
const { buttonRef, getButtonProps } = useButton({
|
package/src/drawer/handle.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { DialogHandle } from '../dialog/store/DialogHandle';
|
|
|
11
11
|
export class DrawerHandle<Payload> extends DialogHandle<Payload> {
|
|
12
12
|
// Nominal brand: makes this handle type distinct from `DialogHandle` and sibling handles so they
|
|
13
13
|
// can't be passed interchangeably. Type-only; has no runtime presence.
|
|
14
|
-
|
|
14
|
+
protected readonly __drawerBrand!: never;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
/**
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import * as React from 'octane';
|
|
3
3
|
import { error } from '@octanejs/base-ui-utils/error';
|
|
4
|
-
import type { SafeReact } from '@octanejs/base-ui-utils/safeReact';
|
|
5
4
|
import type { InteractionType } from '@octanejs/base-ui-utils/useEnhancedClickHandler';
|
|
6
5
|
import { useIsoLayoutEffect } from '@octanejs/base-ui-utils/useIsoLayoutEffect';
|
|
7
6
|
import { useStableCallback } from '@octanejs/base-ui-utils/useStableCallback';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import * as React from 'octane';
|
|
3
3
|
import { error } from '@octanejs/base-ui-utils/error';
|
|
4
|
-
import type { SafeReact } from '@octanejs/base-ui-utils/safeReact';
|
|
5
4
|
import type { FieldRootState } from '../root/FieldRoot.tsrx';
|
|
6
5
|
import { useFieldRootContext } from '../../internals/field-root-context/FieldRootContext';
|
|
7
6
|
import { fieldValidityMapping } from '../../internals/field-constants/constants';
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import * as React from 'octane';
|
|
3
3
|
import { useStableCallback } from '@octanejs/base-ui-utils/useStableCallback';
|
|
4
4
|
import { useRefWithInit } from '@octanejs/base-ui-utils/useRefWithInit';
|
|
5
|
-
import type { HTMLProps } from '../types';
|
|
6
5
|
import { useBaseUiId } from '../useBaseUiId';
|
|
7
6
|
import { LabelableContext, useLabelableContext } from './LabelableContext';
|
|
8
7
|
|
|
@@ -4,7 +4,6 @@ import * as React from 'octane';
|
|
|
4
4
|
import { isHTMLElement } from '@floating-ui/utils/dom';
|
|
5
5
|
import { useStableCallback } from '@octanejs/base-ui-utils/useStableCallback';
|
|
6
6
|
import { error } from '@octanejs/base-ui-utils/error';
|
|
7
|
-
import type { SafeReact } from '@octanejs/base-ui-utils/safeReact';
|
|
8
7
|
import { useIsoLayoutEffect } from '@octanejs/base-ui-utils/useIsoLayoutEffect';
|
|
9
8
|
import { makeEventPreventable, mergeProps } from '../../merge-props';
|
|
10
9
|
import { useCompositeRootContext } from '../composite/root/CompositeRootContext';
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import * as React from 'octane';
|
|
3
3
|
import { isElementDisabled } from '@octanejs/base-ui-utils/isElementDisabled';
|
|
4
4
|
import { warn } from '@octanejs/base-ui-utils/warn';
|
|
5
|
-
import type { SafeReact } from '@octanejs/base-ui-utils/safeReact';
|
|
6
5
|
import { EMPTY_OBJECT } from '@octanejs/base-ui-utils/empty';
|
|
7
6
|
import { platform } from '@octanejs/base-ui-utils/platform';
|
|
8
7
|
import { useStableCallback } from '@octanejs/base-ui-utils/useStableCallback';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import * as React from 'octane';
|
|
3
|
-
import type { SafeReact } from '@octanejs/base-ui-utils/safeReact';
|
|
4
3
|
import { warn } from '@octanejs/base-ui-utils/warn';
|
|
5
4
|
import { useIsoLayoutEffect } from '@octanejs/base-ui-utils/useIsoLayoutEffect';
|
|
6
5
|
import { formatNumber } from '@octanejs/base-ui-utils/formatNumber';
|
|
@@ -118,7 +118,7 @@ export function parseNumber(
|
|
|
118
118
|
let isNegative = false;
|
|
119
119
|
|
|
120
120
|
// Strips a matched sign (leading "-12" / trailing "1234-") while recording negativity.
|
|
121
|
-
const takeSign = (
|
|
121
|
+
const takeSign = (_match: string, sign: string) => {
|
|
122
122
|
if (sign === '-') {
|
|
123
123
|
isNegative = true;
|
|
124
124
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import * as React from 'octane';
|
|
3
|
-
import type { SafeReact } from '@octanejs/base-ui-utils/safeReact';
|
|
4
3
|
import { warn } from '@octanejs/base-ui-utils/warn';
|
|
5
4
|
import { stopEvent } from '../../floating-ui-react/utils';
|
|
6
5
|
import { useCompositeListItem } from '../../internals/composite/list/useCompositeListItem';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import * as React from 'octane';
|
|
3
|
-
import type { SafeReact } from '@octanejs/base-ui-utils/safeReact';
|
|
4
3
|
import { useControlled } from '@octanejs/base-ui-utils/useControlled';
|
|
5
4
|
import { useIsoLayoutEffect } from '@octanejs/base-ui-utils/useIsoLayoutEffect';
|
|
6
5
|
import { useStableCallback } from '@octanejs/base-ui-utils/useStableCallback';
|
|
@@ -112,7 +112,7 @@ export function PopoverRoot<Payload = unknown>(props: PopoverRoot.Props<Payload>
|
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
function usePopoverRootStore<Payload>(
|
|
115
|
-
|
|
115
|
+
_handle: PopoverHandle<Payload> | undefined,
|
|
116
116
|
initialState: Partial<PopoverStoreState<Payload>>,
|
|
117
117
|
) {
|
|
118
118
|
// The store is owned by this Root instance and created exactly once. It is not tied to the handle:
|
|
@@ -3,12 +3,7 @@ import * as React from 'octane';
|
|
|
3
3
|
import { useIsoLayoutEffect } from '@octanejs/base-ui-utils/useIsoLayoutEffect';
|
|
4
4
|
import { useSelectRootContext, useSelectRootPropsContext } from '../root/SelectRootContext';
|
|
5
5
|
import { useCompositeListItem } from '../../internals/composite/list/useCompositeListItem';
|
|
6
|
-
import type {
|
|
7
|
-
BaseUIComponentProps,
|
|
8
|
-
BaseUIEvent,
|
|
9
|
-
HTMLProps,
|
|
10
|
-
NonNativeButtonProps,
|
|
11
|
-
} from '../../internals/types';
|
|
6
|
+
import type { BaseUIComponentProps, HTMLProps, NonNativeButtonProps } from '../../internals/types';
|
|
12
7
|
import { useRenderElement } from '../../internals/useRenderElement.tsrx';
|
|
13
8
|
import { SelectItemContext } from './SelectItemContext';
|
|
14
9
|
import { useButton } from '../../internals/use-button';
|