@wix/site-ui 1.30.0 → 1.31.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/1268.js +99 -0
- package/dist/1279.js +7 -0
- package/dist/1457.js +10 -0
- package/dist/1477.js +106 -0
- package/dist/1500.js +111 -0
- package/dist/167.js +6 -0
- package/dist/2274.js +34 -0
- package/dist/2287.js +17 -0
- package/dist/2418.js +31 -0
- package/dist/2801.js +20 -0
- package/dist/285.js +86 -0
- package/dist/2861.js +6 -0
- package/dist/3020.js +7 -0
- package/dist/3021.js +72 -0
- package/dist/3056.js +229 -0
- package/dist/3140.js +4 -0
- package/dist/3248.js +307 -0
- package/dist/3296.js +4 -0
- package/dist/3319.js +400 -0
- package/dist/3395.js +4 -0
- package/dist/3485.js +854 -0
- package/dist/353.js +14 -0
- package/dist/3670.js +418 -0
- package/dist/3829.js +113 -0
- package/dist/4026.js +12 -0
- package/dist/4143.js +46 -0
- package/dist/42.js +32 -0
- package/dist/4281.js +30 -0
- package/dist/4346.js +2 -0
- package/dist/4388.js +418 -0
- package/dist/4490.js +32 -0
- package/dist/4495.js +9 -0
- package/dist/4549.js +24 -0
- package/dist/4586.js +41 -0
- package/dist/4586.js.LICENSE.txt +19 -0
- package/dist/4707.js +19 -0
- package/dist/4723.js +7 -0
- package/dist/4745.js +7 -0
- package/dist/4768.js +35 -0
- package/dist/4922.js +15 -0
- package/dist/5036.js +17 -0
- package/dist/5085.js +20 -0
- package/dist/5299.js +597 -0
- package/dist/5659.js +4 -0
- package/dist/5778.js +10 -0
- package/dist/5864.js +86 -0
- package/dist/5992.js +913 -0
- package/dist/5992.js.LICENSE.txt +19 -0
- package/dist/6003.js +10 -0
- package/dist/6046.js +29 -0
- package/dist/6089.js +2355 -0
- package/dist/6107.js +10 -0
- package/dist/6247.js +20 -0
- package/dist/6270.js +487 -0
- package/dist/6329.js +32 -0
- package/dist/6330.js +30 -0
- package/dist/6499.js +7 -0
- package/dist/6535.js +71 -0
- package/dist/6588.js +382 -0
- package/dist/6706.js +16 -0
- package/dist/6825.js +7 -0
- package/dist/6882.js +1562 -0
- package/dist/6914.js +30 -0
- package/dist/7021.js +13 -0
- package/dist/7366.js +83 -0
- package/dist/7373.js +25 -0
- package/dist/7541.js +25 -0
- package/dist/7564.js +10 -0
- package/dist/7642.js +20 -0
- package/dist/7725.js +10 -0
- package/dist/7871.js +38 -0
- package/dist/8052.js +352 -0
- package/dist/8106.js +238 -0
- package/dist/8171.js +346 -0
- package/dist/8225.js +21 -0
- package/dist/8272.js +333 -0
- package/dist/8527.js +58 -0
- package/dist/8724.js +10 -0
- package/dist/8750.js +1920 -0
- package/dist/8758.js +43 -0
- package/dist/880.js +149 -0
- package/dist/8935.js +8 -0
- package/dist/8960.js +22 -0
- package/dist/8971.js +40 -0
- package/dist/8979.js +10 -0
- package/dist/8996.js +71 -0
- package/dist/904.js +121 -0
- package/dist/9048.js +52 -0
- package/dist/9087.js +256 -0
- package/dist/9189.js +158 -0
- package/dist/9255.js +136 -0
- package/dist/9352.js +148 -0
- package/dist/951.js +22 -0
- package/dist/9635.js +22 -0
- package/dist/9829.js +4 -0
- package/dist/9863.js +8 -0
- package/dist/Accordion/index.d.ts +569 -12
- package/dist/Accordion/index.js +423 -8
- package/dist/AlertDialog/index.d.ts +1417 -18
- package/dist/AlertDialog/index.js +34 -14
- package/dist/Autocomplete/index.d.ts +1861 -38
- package/dist/Autocomplete/index.js +98 -24
- package/dist/Avatar/index.d.ts +129 -7
- package/dist/Avatar/index.js +149 -6
- package/dist/Breadcrumbs/index.d.ts +960 -7
- package/dist/Breadcrumbs/index.js +5 -5
- package/dist/Button/index.d.ts +88 -6
- package/dist/Button/index.js +27 -3
- package/dist/Checkbox/index.d.ts +425 -5
- package/dist/Checkbox/index.js +45 -5
- package/dist/CheckboxGroup/index.d.ts +318 -3
- package/dist/CheckboxGroup/index.js +166 -3
- package/dist/Collapsible/index.d.ts +377 -7
- package/dist/Collapsible/index.js +160 -6
- package/dist/Combobox/index.d.ts +1984 -48
- package/dist/Combobox/index.js +352 -29
- package/dist/ContextMenu/index.d.ts +2340 -36
- package/dist/ContextMenu/index.js +197 -22
- package/dist/Dialog/index.d.ts +1355 -18
- package/dist/Dialog/index.js +16 -14
- package/dist/Drawer/index.d.ts +1653 -18
- package/dist/Drawer/index.js +2797 -20
- package/dist/Field/index.d.ts +655 -15
- package/dist/Field/index.js +677 -10
- package/dist/Fieldset/index.d.ts +94 -5
- package/dist/Fieldset/index.js +68 -5
- package/dist/Form/index.d.ts +331 -2
- package/dist/Form/index.js +106 -3
- package/dist/Input/index.d.ts +692 -3
- package/dist/Input/index.js +10 -3
- package/dist/Menu/index.d.ts +2301 -36
- package/dist/Menu/index.js +365 -26
- package/dist/Menubar/index.d.ts +2301 -3
- package/dist/Menubar/index.js +105 -3
- package/dist/Meter/index.d.ts +175 -11
- package/dist/Meter/index.js +129 -9
- package/dist/NavigationMenu/index.d.ts +978 -28
- package/dist/NavigationMenu/index.js +1034 -17
- package/dist/NumberField/index.d.ts +612 -15
- package/dist/NumberField/index.js +1409 -11
- package/dist/Popover/index.d.ts +1655 -20
- package/dist/Popover/index.js +792 -17
- package/dist/PreviewCard/index.d.ts +1523 -14
- package/dist/PreviewCard/index.js +679 -14
- package/dist/Progress/index.d.ts +183 -11
- package/dist/Progress/index.js +181 -9
- package/dist/Radio/index.d.ts +185 -6
- package/dist/Radio/index.js +253 -6
- package/dist/RadioGroup/index.d.ts +341 -2
- package/dist/RadioGroup/index.js +154 -3
- package/dist/ScrollArea/index.d.ts +265 -13
- package/dist/ScrollArea/index.js +892 -10
- package/dist/Select/index.d.ts +1493 -38
- package/dist/Select/index.js +1824 -23
- package/dist/Separator/index.d.ts +80 -6
- package/dist/Separator/index.js +3 -3
- package/dist/Slider/index.d.ts +678 -16
- package/dist/Slider/index.js +1199 -11
- package/dist/Switch/index.d.ts +393 -5
- package/dist/Switch/index.js +208 -6
- package/dist/Tabs/index.d.ts +523 -12
- package/dist/Tabs/index.js +685 -9
- package/dist/Toggle/index.d.ts +305 -2
- package/dist/Toggle/index.js +76 -3
- package/dist/ToggleGroup/index.d.ts +316 -2
- package/dist/ToggleGroup/index.js +102 -3
- package/dist/Toolbar/index.d.ts +282 -13
- package/dist/Toolbar/index.js +230 -9
- package/dist/Tooltip/index.d.ts +1572 -14
- package/dist/Tooltip/index.js +965 -14
- package/dist/index.d.ts +12749 -652
- package/dist/rslib-runtime.js +18 -0
- package/package.json +3 -3
package/dist/9352.js
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { popupStateMapping, popupStateMapping_CommonPopupDataAttributes } from "./4388.js";
|
|
3
|
+
import { transitionStatusMapping, useOpenChangeComplete } from "./880.js";
|
|
4
|
+
import { useDialogPortalContext, useDialogRootContext } from "./6270.js";
|
|
5
|
+
import { useRenderElement } from "./8272.js";
|
|
6
|
+
import { FOCUSABLE_POPUP_PROPS } from "./8106.js";
|
|
7
|
+
import { COMPOSITE_KEYS } from "./1500.js";
|
|
8
|
+
import { FloatingFocusManager } from "./3485.js";
|
|
9
|
+
import * as __rspack_external_react from "react";
|
|
10
|
+
const stateAttributesMapping = {
|
|
11
|
+
...popupStateMapping,
|
|
12
|
+
...transitionStatusMapping
|
|
13
|
+
};
|
|
14
|
+
const DialogBackdrop_DialogBackdrop = /*#__PURE__*/ __rspack_external_react.forwardRef(function(componentProps, forwardedRef) {
|
|
15
|
+
const { render, className, style, forceRender = false, ...elementProps } = componentProps;
|
|
16
|
+
const { store } = useDialogRootContext();
|
|
17
|
+
const open = store.useState('open');
|
|
18
|
+
const nested = store.useState('nested');
|
|
19
|
+
const mounted = store.useState('mounted');
|
|
20
|
+
const transitionStatus = store.useState('transitionStatus');
|
|
21
|
+
const state = {
|
|
22
|
+
open,
|
|
23
|
+
transitionStatus
|
|
24
|
+
};
|
|
25
|
+
return useRenderElement('div', componentProps, {
|
|
26
|
+
state,
|
|
27
|
+
ref: [
|
|
28
|
+
store.context.backdropRef,
|
|
29
|
+
forwardedRef
|
|
30
|
+
],
|
|
31
|
+
stateAttributesMapping: stateAttributesMapping,
|
|
32
|
+
props: [
|
|
33
|
+
{
|
|
34
|
+
role: 'presentation',
|
|
35
|
+
hidden: !mounted,
|
|
36
|
+
style: {
|
|
37
|
+
userSelect: 'none',
|
|
38
|
+
WebkitUserSelect: 'none'
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
elementProps
|
|
42
|
+
],
|
|
43
|
+
enabled: forceRender || !nested
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
if ("production" !== process.env.NODE_ENV) DialogBackdrop_DialogBackdrop.displayName = "DialogBackdrop";
|
|
47
|
+
let DialogPopupCssVars_DialogPopupCssVars = /*#__PURE__*/ function(DialogPopupCssVars) {
|
|
48
|
+
DialogPopupCssVars["nestedDialogs"] = "--nested-dialogs";
|
|
49
|
+
return DialogPopupCssVars;
|
|
50
|
+
}({});
|
|
51
|
+
let DialogPopupDataAttributes_DialogPopupDataAttributes = function(DialogPopupDataAttributes) {
|
|
52
|
+
DialogPopupDataAttributes[DialogPopupDataAttributes["open"] = popupStateMapping_CommonPopupDataAttributes.open] = "open";
|
|
53
|
+
DialogPopupDataAttributes[DialogPopupDataAttributes["closed"] = popupStateMapping_CommonPopupDataAttributes.closed] = "closed";
|
|
54
|
+
DialogPopupDataAttributes[DialogPopupDataAttributes["startingStyle"] = popupStateMapping_CommonPopupDataAttributes.startingStyle] = "startingStyle";
|
|
55
|
+
DialogPopupDataAttributes[DialogPopupDataAttributes["endingStyle"] = popupStateMapping_CommonPopupDataAttributes.endingStyle] = "endingStyle";
|
|
56
|
+
DialogPopupDataAttributes["nested"] = "data-nested";
|
|
57
|
+
DialogPopupDataAttributes["nestedDialogOpen"] = "data-nested-dialog-open";
|
|
58
|
+
return DialogPopupDataAttributes;
|
|
59
|
+
}({});
|
|
60
|
+
const DialogPopup_stateAttributesMapping = {
|
|
61
|
+
...popupStateMapping,
|
|
62
|
+
...transitionStatusMapping,
|
|
63
|
+
nestedDialogOpen (value) {
|
|
64
|
+
return value ? {
|
|
65
|
+
[DialogPopupDataAttributes_DialogPopupDataAttributes.nestedDialogOpen]: ''
|
|
66
|
+
} : null;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
const DialogPopup_DialogPopup = /*#__PURE__*/ __rspack_external_react.forwardRef(function(componentProps, forwardedRef) {
|
|
70
|
+
const { render, className, style, finalFocus, initialFocus, ...elementProps } = componentProps;
|
|
71
|
+
const { store } = useDialogRootContext();
|
|
72
|
+
const descriptionElementId = store.useState("descriptionElementId");
|
|
73
|
+
const disablePointerDismissal = store.useState('disablePointerDismissal');
|
|
74
|
+
const floatingRootContext = store.useState('floatingRootContext');
|
|
75
|
+
const rootPopupProps = store.useState('popupProps');
|
|
76
|
+
const modal = store.useState('modal');
|
|
77
|
+
const mounted = store.useState('mounted');
|
|
78
|
+
const nested = store.useState('nested');
|
|
79
|
+
const nestedOpenDialogCount = store.useState('nestedOpenDialogCount');
|
|
80
|
+
const open = store.useState('open');
|
|
81
|
+
const openMethod = store.useState('openMethod');
|
|
82
|
+
const titleElementId = store.useState('titleElementId');
|
|
83
|
+
const transitionStatus = store.useState('transitionStatus');
|
|
84
|
+
const role = store.useState('role');
|
|
85
|
+
const floatingId = floatingRootContext.useState('floatingId');
|
|
86
|
+
const popupId = elementProps.id ?? floatingId;
|
|
87
|
+
useDialogPortalContext();
|
|
88
|
+
useOpenChangeComplete({
|
|
89
|
+
open,
|
|
90
|
+
ref: store.context.popupRef,
|
|
91
|
+
onComplete () {
|
|
92
|
+
if (open) store.context.onOpenChangeComplete?.(true);
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
function defaultInitialFocus(interactionType) {
|
|
96
|
+
if ('touch' === interactionType) return store.context.popupRef.current;
|
|
97
|
+
return true;
|
|
98
|
+
}
|
|
99
|
+
const resolvedInitialFocus = void 0 === initialFocus ? defaultInitialFocus : initialFocus;
|
|
100
|
+
const nestedDialogOpen = nestedOpenDialogCount > 0;
|
|
101
|
+
const setPopupElement = store.useStateSetter('popupElement');
|
|
102
|
+
const state = {
|
|
103
|
+
open,
|
|
104
|
+
nested,
|
|
105
|
+
transitionStatus,
|
|
106
|
+
nestedDialogOpen
|
|
107
|
+
};
|
|
108
|
+
const element = useRenderElement('div', componentProps, {
|
|
109
|
+
state,
|
|
110
|
+
props: [
|
|
111
|
+
rootPopupProps,
|
|
112
|
+
{
|
|
113
|
+
id: popupId,
|
|
114
|
+
'aria-labelledby': titleElementId ?? void 0,
|
|
115
|
+
'aria-describedby': descriptionElementId ?? void 0,
|
|
116
|
+
role,
|
|
117
|
+
...FOCUSABLE_POPUP_PROPS,
|
|
118
|
+
hidden: !mounted,
|
|
119
|
+
onKeyDown (event) {
|
|
120
|
+
if (COMPOSITE_KEYS.has(event.key)) event.stopPropagation();
|
|
121
|
+
},
|
|
122
|
+
style: {
|
|
123
|
+
[DialogPopupCssVars_DialogPopupCssVars.nestedDialogs]: nestedOpenDialogCount
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
elementProps
|
|
127
|
+
],
|
|
128
|
+
ref: [
|
|
129
|
+
forwardedRef,
|
|
130
|
+
store.context.popupRef,
|
|
131
|
+
setPopupElement
|
|
132
|
+
],
|
|
133
|
+
stateAttributesMapping: DialogPopup_stateAttributesMapping
|
|
134
|
+
});
|
|
135
|
+
return /*#__PURE__*/ jsx(FloatingFocusManager, {
|
|
136
|
+
context: floatingRootContext,
|
|
137
|
+
openInteractionType: openMethod,
|
|
138
|
+
disabled: !mounted,
|
|
139
|
+
closeOnFocusOut: !disablePointerDismissal,
|
|
140
|
+
initialFocus: resolvedInitialFocus,
|
|
141
|
+
returnFocus: finalFocus,
|
|
142
|
+
modal: false !== modal,
|
|
143
|
+
restoreFocus: "popup",
|
|
144
|
+
children: element
|
|
145
|
+
});
|
|
146
|
+
});
|
|
147
|
+
if ("production" !== process.env.NODE_ENV) DialogPopup_DialogPopup.displayName = "DialogPopup";
|
|
148
|
+
export { DialogBackdrop_DialogBackdrop, DialogPopup_DialogPopup };
|
package/dist/951.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { EMPTY_ARRAY, useRenderElement, EMPTY_OBJECT } from "./8272.js";
|
|
2
|
+
import { useCompositeItem } from "./2274.js";
|
|
3
|
+
function CompositeItem(componentProps) {
|
|
4
|
+
const { render, className, style, state = EMPTY_OBJECT, props = EMPTY_ARRAY, refs = EMPTY_ARRAY, metadata, stateAttributesMapping, tag = 'div', ...elementProps } = componentProps;
|
|
5
|
+
const { compositeProps, compositeRef } = useCompositeItem({
|
|
6
|
+
metadata
|
|
7
|
+
});
|
|
8
|
+
return useRenderElement(tag, componentProps, {
|
|
9
|
+
state,
|
|
10
|
+
ref: [
|
|
11
|
+
...refs,
|
|
12
|
+
compositeRef
|
|
13
|
+
],
|
|
14
|
+
props: [
|
|
15
|
+
compositeProps,
|
|
16
|
+
...props,
|
|
17
|
+
elementProps
|
|
18
|
+
],
|
|
19
|
+
stateAttributesMapping
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
export { CompositeItem };
|
package/dist/9635.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { useRenderElement } from "./8272.js";
|
|
2
|
+
import * as __rspack_external_react from "react";
|
|
3
|
+
const Separator = /*#__PURE__*/ __rspack_external_react.forwardRef(function(componentProps, forwardedRef) {
|
|
4
|
+
const { className, render, orientation = 'horizontal', style, ...elementProps } = componentProps;
|
|
5
|
+
const state = {
|
|
6
|
+
orientation
|
|
7
|
+
};
|
|
8
|
+
const element = useRenderElement('div', componentProps, {
|
|
9
|
+
state,
|
|
10
|
+
ref: forwardedRef,
|
|
11
|
+
props: [
|
|
12
|
+
{
|
|
13
|
+
role: 'separator',
|
|
14
|
+
'aria-orientation': orientation
|
|
15
|
+
},
|
|
16
|
+
elementProps
|
|
17
|
+
]
|
|
18
|
+
});
|
|
19
|
+
return element;
|
|
20
|
+
});
|
|
21
|
+
if ("production" !== process.env.NODE_ENV) Separator.displayName = "Separator";
|
|
22
|
+
export { Separator };
|
package/dist/9829.js
ADDED
package/dist/9863.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as __rspack_external_react from "react";
|
|
2
|
+
const DirectionContext = /*#__PURE__*/ __rspack_external_react.createContext(void 0);
|
|
3
|
+
if ("production" !== process.env.NODE_ENV) DirectionContext.displayName = "DirectionContext";
|
|
4
|
+
function useDirection() {
|
|
5
|
+
const context = __rspack_external_react.useContext(DirectionContext);
|
|
6
|
+
return context?.direction ?? 'ltr';
|
|
7
|
+
}
|
|
8
|
+
export { useDirection };
|