@preply/ds-web-lib 10.0.0 → 11.0.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.
- package/dist/{DropdownMenu.primitives-CqJE9k4D.js → DropdownMenu.primitives-B3WK71bR.js} +4 -4
- package/dist/assets/Accordion.css +2 -2
- package/dist/assets/AlertBannerProvider.css +2 -2
- package/dist/assets/AlertDialog.css +2 -2
- package/dist/assets/Avatar.css +3 -3
- package/dist/assets/AvatarWithStatus.css +2 -2
- package/dist/assets/Badge.css +1 -1
- package/dist/assets/Box.css +3 -3
- package/dist/assets/BubbleCounter.css +1 -1
- package/dist/assets/Button.css +4 -4
- package/dist/assets/ButtonBase.css +4 -4
- package/dist/assets/Checkbox.css +1 -1
- package/dist/assets/Chips.css +2 -2
- package/dist/assets/ChipsPrimitive.css +2 -2
- package/dist/assets/CountryFlag.css +1 -1
- package/dist/assets/Dialog.css +3 -3
- package/dist/assets/Divider.css +1 -1
- package/dist/assets/DropdownMenu.css +2 -2
- package/dist/assets/FieldButton.css +3 -3
- package/dist/assets/FormControl.css +1 -1
- package/dist/assets/Heading.css +3 -3
- package/dist/assets/Icon.css +3 -3
- package/dist/assets/IconTile.css +9 -1
- package/dist/assets/InputContainer.css +2 -2
- package/dist/assets/LayoutFlex.css +1 -1
- package/dist/assets/LayoutFlexItem.css +1 -1
- package/dist/assets/Link.css +3 -3
- package/dist/assets/Loader.css +1 -1
- package/dist/assets/OnboardingTooltip.css +6 -4
- package/dist/assets/OnboardingTour.css +3 -2
- package/dist/assets/PreplyLogo.css +1 -1
- package/dist/assets/ProgressBar.css +1 -1
- package/dist/assets/ProgressSteps.css +1 -1
- package/dist/assets/Select.css +2 -2
- package/dist/assets/Slider.css +1 -1
- package/dist/assets/Spinner.css +3 -3
- package/dist/assets/Stars.css +3 -3
- package/dist/assets/Steps.css +2 -2
- package/dist/assets/Switch.css +1 -1
- package/dist/assets/Text.css +3 -3
- package/dist/assets/TextHighlighted.css +3 -3
- package/dist/assets/TextInline.css +3 -3
- package/dist/assets/Toast.css +2 -2
- package/dist/assets/Tooltip.css +1 -1
- package/dist/assets/align-self.css +1 -1
- package/dist/assets/exp-color.css +2 -2
- package/dist/assets/index.css +1 -1
- package/dist/assets/layout-gap.css +3 -3
- package/dist/assets/layout-grid.css +3 -3
- package/dist/assets/layout-hide.css +1 -1
- package/dist/assets/layout-padding.css +3 -3
- package/dist/assets/layout-relative.css +1 -1
- package/dist/assets/text-accent.css +2 -2
- package/dist/assets/text-centered.css +1 -1
- package/dist/assets/text-weight.css +2 -2
- package/dist/components/AlertDialog/AlertDialog.d.ts +3 -3
- package/dist/components/AlertDialog/AlertDialog.d.ts.map +1 -1
- package/dist/components/AlertDialog/AlertDialog.js +354 -18
- package/dist/components/Dialog/primitives/DialogCloseButton.d.ts.map +1 -1
- package/dist/components/Dialog/primitives/DialogCloseButton.js +5 -31
- package/dist/components/Dialog/primitives/DialogDescription.js +1 -1
- package/dist/components/Dialog/primitives/DialogRoot.js +5 -1149
- package/dist/components/Dialog/primitives/DialogTitle.js +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.js +1 -1
- package/dist/components/DropdownMenu/primitives/DropdownMenu.primitives.js +1 -1
- package/dist/components/DropdownMenu/primitives/DropdownMenuSelectItem.primitives.js +1 -1
- package/dist/components/OnboardingTooltip/OnboardingTooltip.js +1 -1
- package/dist/{floating-ui.utils.dom-BvMNldxo.js → floating-ui.utils.dom-3OgjGonN.js} +1 -1
- package/dist/store-BUKWfVf3.js +1155 -0
- package/dist/{useButton-fjQ0ak8m.js → useButton-CFPpP0o5.js} +2 -2
- package/dist/useDialogClose-C9x1leGd.js +34 -0
- package/dist/{useOpenInteractionType-DNYFqf-a.js → useOpenInteractionType-Cj41-8Yk.js} +48 -48
- package/dist/{useRenderElement-BSthtPOr.js → useRenderElement-DtYPTE_y.js} +2 -2
- package/package.json +12 -12
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import { u as useEventCallback, a as useIsoLayoutEffect, i as isHTMLElement } from "./floating-ui.utils.dom-
|
|
4
|
-
import { m as mergeProps,
|
|
3
|
+
import { u as useEventCallback, a as useIsoLayoutEffect, i as isHTMLElement } from "./floating-ui.utils.dom-3OgjGonN.js";
|
|
4
|
+
import { m as mergeProps, a as makeEventPreventable } from "./useRenderElement-DtYPTE_y.js";
|
|
5
5
|
let set;
|
|
6
6
|
if (process.env.NODE_ENV !== "production") {
|
|
7
7
|
set = /* @__PURE__ */ new Set();
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { u as useEventCallback, c as createChangeEventDetails } from "./floating-ui.utils.dom-3OgjGonN.js";
|
|
3
|
+
import { u as useButton } from "./useButton-CFPpP0o5.js";
|
|
4
|
+
import { m as mergeProps } from "./useRenderElement-DtYPTE_y.js";
|
|
5
|
+
function useDialogClose(params) {
|
|
6
|
+
const {
|
|
7
|
+
open,
|
|
8
|
+
setOpen,
|
|
9
|
+
disabled,
|
|
10
|
+
nativeButton
|
|
11
|
+
} = params;
|
|
12
|
+
const handleClick = useEventCallback((event) => {
|
|
13
|
+
if (open) {
|
|
14
|
+
setOpen(false, createChangeEventDetails("close-press", event.nativeEvent));
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
const {
|
|
18
|
+
getButtonProps,
|
|
19
|
+
buttonRef
|
|
20
|
+
} = useButton({
|
|
21
|
+
disabled,
|
|
22
|
+
native: nativeButton
|
|
23
|
+
});
|
|
24
|
+
const getRootProps = (externalProps) => mergeProps({
|
|
25
|
+
onClick: handleClick
|
|
26
|
+
}, externalProps, getButtonProps);
|
|
27
|
+
return {
|
|
28
|
+
getRootProps,
|
|
29
|
+
ref: buttonRef
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
useDialogClose as u
|
|
34
|
+
};
|
|
@@ -4,8 +4,8 @@ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { en
|
|
|
4
4
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
import * as ReactDOM from "react-dom";
|
|
7
|
-
import { u as useEventCallback, a as useIsoLayoutEffect, b as isShadowRoot, i as isHTMLElement, g as getNodeName, c as createChangeEventDetails, d as isNode, e as getWindow, f as isElement, h as isLastTraversableNode, j as getParentNode, k as getComputedStyle$1, l as getOverflowAncestors, m as isWebKit$1 } from "./floating-ui.utils.dom-
|
|
8
|
-
import {
|
|
7
|
+
import { u as useEventCallback, a as useIsoLayoutEffect, b as isShadowRoot, i as isHTMLElement, g as getNodeName, c as createChangeEventDetails, d as isNode, e as getWindow, f as isElement, h as isLastTraversableNode, j as getParentNode, k as getComputedStyle$1, l as getOverflowAncestors, m as isWebKit$1 } from "./floating-ui.utils.dom-3OgjGonN.js";
|
|
8
|
+
import { b as useRefWithInit, i as isReactVersionAtLeast, c as useMergedRefs, E as EMPTY_OBJECT, N as NOOP } from "./useRenderElement-DtYPTE_y.js";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import { u as useId } from "./useId-BhIOp2JG.js";
|
|
11
11
|
const TYPEAHEAD_RESET_MS = 500;
|
|
@@ -2823,58 +2823,58 @@ function useOpenInteractionType(open) {
|
|
|
2823
2823
|
}), [openMethod, reset, onClick, onPointerDown]);
|
|
2824
2824
|
}
|
|
2825
2825
|
export {
|
|
2826
|
-
|
|
2826
|
+
pressableTriggerOpenStateMapping as $,
|
|
2827
2827
|
ARROW_UP$1 as A,
|
|
2828
|
-
|
|
2828
|
+
createAttribute as B,
|
|
2829
2829
|
CommonPopupDataAttributes as C,
|
|
2830
|
-
|
|
2831
|
-
|
|
2830
|
+
isMouseLikePointerType as D,
|
|
2831
|
+
contains as E,
|
|
2832
2832
|
FloatingFocusManager as F,
|
|
2833
|
-
|
|
2834
|
-
|
|
2833
|
+
activeElement as G,
|
|
2834
|
+
isTypeableElement as H,
|
|
2835
2835
|
InternalBackdrop as I,
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2836
|
+
matchesFocusVisible as J,
|
|
2837
|
+
isMac as K,
|
|
2838
|
+
isSafari as L,
|
|
2839
|
+
getFloatingFocusElement as M,
|
|
2840
|
+
isTypeableCombobox as N,
|
|
2841
|
+
enqueueFocus as O,
|
|
2842
|
+
isVirtualClick as P,
|
|
2843
|
+
isVirtualPointerEvent as Q,
|
|
2844
|
+
getNodeChildren as R,
|
|
2845
|
+
ownerDocument as S,
|
|
2846
2846
|
Timeout as T,
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2847
|
+
DISABLED_TRANSITIONS_STYLE as U,
|
|
2848
|
+
DROPDOWN_COLLISION_AVOIDANCE as V,
|
|
2849
|
+
useFloatingNodeId as W,
|
|
2850
|
+
FloatingNode as X,
|
|
2851
|
+
PATIENT_CLICK_THRESHOLD as Y,
|
|
2852
|
+
FloatingTree as Z,
|
|
2853
|
+
TYPEAHEAD_RESET_MS as _,
|
|
2854
|
+
COMPOSITE_KEYS as a,
|
|
2855
|
+
FloatingPortal as b,
|
|
2856
|
+
triggerOpenStateMapping as c,
|
|
2857
|
+
useTransitionStatus as d,
|
|
2858
|
+
useOpenInteractionType as e,
|
|
2859
|
+
useFloatingRootContext as f,
|
|
2860
|
+
getEmptyContext as g,
|
|
2861
|
+
useRole as h,
|
|
2862
|
+
inertValue as i,
|
|
2863
|
+
useClick as j,
|
|
2864
|
+
useDismiss as k,
|
|
2865
|
+
useScrollLock as l,
|
|
2866
|
+
useInteractions as m,
|
|
2867
|
+
getTarget as n,
|
|
2868
|
+
ARROW_DOWN$1 as o,
|
|
2869
2869
|
popupStateMapping as p,
|
|
2870
|
-
|
|
2871
|
-
|
|
2870
|
+
ARROW_LEFT$1 as q,
|
|
2871
|
+
ARROW_RIGHT$1 as r,
|
|
2872
2872
|
stopEvent as s,
|
|
2873
2873
|
transitionStatusMapping as t,
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2874
|
+
useOpenChangeComplete as u,
|
|
2875
|
+
useFloatingTree as v,
|
|
2876
|
+
useFloatingParentNodeId as w,
|
|
2877
|
+
useLatestRef as x,
|
|
2878
|
+
useTimeout as y,
|
|
2879
|
+
getDocument as z
|
|
2880
2880
|
};
|
|
@@ -340,8 +340,8 @@ function getChildRef(render) {
|
|
|
340
340
|
export {
|
|
341
341
|
EMPTY_OBJECT as E,
|
|
342
342
|
NOOP as N,
|
|
343
|
-
|
|
344
|
-
|
|
343
|
+
makeEventPreventable as a,
|
|
344
|
+
useRefWithInit as b,
|
|
345
345
|
useMergedRefs as c,
|
|
346
346
|
EMPTY_ARRAY as d,
|
|
347
347
|
isReactVersionAtLeast as i,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@preply/ds-web-lib",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -34,21 +34,21 @@
|
|
|
34
34
|
"usehooks-ts": "^3.1.1"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
|
-
"@preply/ds-core": "
|
|
38
|
-
"@preply/ds-media-icons": "
|
|
39
|
-
"@preply/ds-visual-coverage-preply-component-names": "
|
|
40
|
-
"@preply/ds-web-core": "
|
|
41
|
-
"@preply/ds-web-root": "
|
|
37
|
+
"@preply/ds-core": "11.0.0",
|
|
38
|
+
"@preply/ds-media-icons": "11.0.0",
|
|
39
|
+
"@preply/ds-visual-coverage-preply-component-names": "11.0.0",
|
|
40
|
+
"@preply/ds-web-core": "11.0.0",
|
|
41
|
+
"@preply/ds-web-root": "11.0.0",
|
|
42
42
|
"react": "^16 || ^18",
|
|
43
43
|
"react-dom": "^16 || ^18",
|
|
44
44
|
"react-intl": "^6.5.5"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@preply/ds-core": "
|
|
48
|
-
"@preply/ds-media-icons": "
|
|
49
|
-
"@preply/ds-visual-coverage-preply-component-names": "
|
|
50
|
-
"@preply/ds-web-core": "
|
|
51
|
-
"@preply/ds-web-root": "
|
|
47
|
+
"@preply/ds-core": "11.0.0",
|
|
48
|
+
"@preply/ds-media-icons": "11.0.0",
|
|
49
|
+
"@preply/ds-visual-coverage-preply-component-names": "11.0.0",
|
|
50
|
+
"@preply/ds-web-core": "11.0.0",
|
|
51
|
+
"@preply/ds-web-root": "11.0.0",
|
|
52
52
|
"@storybook/react-vite": "10.1.4",
|
|
53
53
|
"@testing-library/react": "16.3.0",
|
|
54
54
|
"@types/react-is": "^18.2.0",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"vite-plugin-svgr": "4.5.0",
|
|
65
65
|
"vitest-browser-react": "^0.1.1"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "da9b3a2d347e7925a14341797a074d832986ce43"
|
|
68
68
|
}
|