@caratlogic/design-system 0.1.43 → 0.1.44
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/components/organisms/Filters/FilterSurface/FilterSurface.accessibility.d.ts +3 -0
- package/dist/components/organisms/Filters/FilterSurface/FilterSurface.accessibility.d.ts.map +1 -1
- package/dist/components/organisms/Filters/FilterSurface/FilterSurface.d.ts +8 -3
- package/dist/components/organisms/Filters/FilterSurface/FilterSurface.d.ts.map +1 -1
- package/dist/components/organisms/Filters/FilterSurface/FilterSurface.hooks.d.ts +33 -2
- package/dist/components/organisms/Filters/FilterSurface/FilterSurface.hooks.d.ts.map +1 -1
- package/dist/components/organisms/Filters/FilterSurface/FilterSurface.parts.d.ts +12 -1
- package/dist/components/organisms/Filters/FilterSurface/FilterSurface.parts.d.ts.map +1 -1
- package/dist/components/organisms/Filters/FilterSurface/FilterSurface.types.d.ts +89 -1
- package/dist/components/organisms/Filters/FilterSurface/FilterSurface.types.d.ts.map +1 -1
- package/dist/components/organisms/Filters/FilterSurface/FilterSurface.utils.d.ts +32 -0
- package/dist/components/organisms/Filters/FilterSurface/FilterSurface.utils.d.ts.map +1 -1
- package/dist/components/organisms/Filters/FilterSurface/index.d.ts +2 -2
- package/dist/components/organisms/Filters/FilterSurface/index.d.ts.map +1 -1
- package/dist/index.cjs.js +873 -10
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +873 -11
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -22650,6 +22650,20 @@ function distanceBetween(p1, p2) {
|
|
|
22650
22650
|
return Math.sqrt(Math.pow(p1.x - p2.x, 2) + Math.pow(p1.y - p2.y, 2));
|
|
22651
22651
|
}
|
|
22652
22652
|
|
|
22653
|
+
function getRelativeTransformOrigin(event, rect) {
|
|
22654
|
+
const eventCoordinates = getEventCoordinates(event);
|
|
22655
|
+
|
|
22656
|
+
if (!eventCoordinates) {
|
|
22657
|
+
return '0 0';
|
|
22658
|
+
}
|
|
22659
|
+
|
|
22660
|
+
const transformOrigin = {
|
|
22661
|
+
x: (eventCoordinates.x - rect.left) / rect.width * 100,
|
|
22662
|
+
y: (eventCoordinates.y - rect.top) / rect.height * 100
|
|
22663
|
+
};
|
|
22664
|
+
return transformOrigin.x + "% " + transformOrigin.y + "%";
|
|
22665
|
+
}
|
|
22666
|
+
|
|
22653
22667
|
/**
|
|
22654
22668
|
* Sort collisions from smallest to greatest value
|
|
22655
22669
|
*/
|
|
@@ -25934,6 +25948,396 @@ function useDroppable(_ref) {
|
|
|
25934
25948
|
};
|
|
25935
25949
|
}
|
|
25936
25950
|
|
|
25951
|
+
function AnimationManager(_ref) {
|
|
25952
|
+
let {
|
|
25953
|
+
animation,
|
|
25954
|
+
children
|
|
25955
|
+
} = _ref;
|
|
25956
|
+
const [clonedChildren, setClonedChildren] = useState(null);
|
|
25957
|
+
const [element, setElement] = useState(null);
|
|
25958
|
+
const previousChildren = usePrevious(children);
|
|
25959
|
+
|
|
25960
|
+
if (!children && !clonedChildren && previousChildren) {
|
|
25961
|
+
setClonedChildren(previousChildren);
|
|
25962
|
+
}
|
|
25963
|
+
|
|
25964
|
+
useIsomorphicLayoutEffect$1(() => {
|
|
25965
|
+
if (!element) {
|
|
25966
|
+
return;
|
|
25967
|
+
}
|
|
25968
|
+
|
|
25969
|
+
const key = clonedChildren == null ? void 0 : clonedChildren.key;
|
|
25970
|
+
const id = clonedChildren == null ? void 0 : clonedChildren.props.id;
|
|
25971
|
+
|
|
25972
|
+
if (key == null || id == null) {
|
|
25973
|
+
setClonedChildren(null);
|
|
25974
|
+
return;
|
|
25975
|
+
}
|
|
25976
|
+
|
|
25977
|
+
Promise.resolve(animation(id, element)).then(() => {
|
|
25978
|
+
setClonedChildren(null);
|
|
25979
|
+
});
|
|
25980
|
+
}, [animation, clonedChildren, element]);
|
|
25981
|
+
return React__default.createElement(React__default.Fragment, null, children, clonedChildren ? cloneElement(clonedChildren, {
|
|
25982
|
+
ref: setElement
|
|
25983
|
+
}) : null);
|
|
25984
|
+
}
|
|
25985
|
+
|
|
25986
|
+
const defaultTransform = {
|
|
25987
|
+
x: 0,
|
|
25988
|
+
y: 0,
|
|
25989
|
+
scaleX: 1,
|
|
25990
|
+
scaleY: 1
|
|
25991
|
+
};
|
|
25992
|
+
function NullifiedContextProvider(_ref) {
|
|
25993
|
+
let {
|
|
25994
|
+
children
|
|
25995
|
+
} = _ref;
|
|
25996
|
+
return React__default.createElement(InternalContext.Provider, {
|
|
25997
|
+
value: defaultInternalContext
|
|
25998
|
+
}, React__default.createElement(ActiveDraggableContext.Provider, {
|
|
25999
|
+
value: defaultTransform
|
|
26000
|
+
}, children));
|
|
26001
|
+
}
|
|
26002
|
+
|
|
26003
|
+
const baseStyles = {
|
|
26004
|
+
position: 'fixed',
|
|
26005
|
+
touchAction: 'none'
|
|
26006
|
+
};
|
|
26007
|
+
|
|
26008
|
+
const defaultTransition$1 = activatorEvent => {
|
|
26009
|
+
const isKeyboardActivator = isKeyboardEvent(activatorEvent);
|
|
26010
|
+
return isKeyboardActivator ? 'transform 250ms ease' : undefined;
|
|
26011
|
+
};
|
|
26012
|
+
|
|
26013
|
+
const PositionedOverlay = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
26014
|
+
let {
|
|
26015
|
+
as,
|
|
26016
|
+
activatorEvent,
|
|
26017
|
+
adjustScale,
|
|
26018
|
+
children,
|
|
26019
|
+
className,
|
|
26020
|
+
rect,
|
|
26021
|
+
style,
|
|
26022
|
+
transform,
|
|
26023
|
+
transition = defaultTransition$1
|
|
26024
|
+
} = _ref;
|
|
26025
|
+
|
|
26026
|
+
if (!rect) {
|
|
26027
|
+
return null;
|
|
26028
|
+
}
|
|
26029
|
+
|
|
26030
|
+
const scaleAdjustedTransform = adjustScale ? transform : { ...transform,
|
|
26031
|
+
scaleX: 1,
|
|
26032
|
+
scaleY: 1
|
|
26033
|
+
};
|
|
26034
|
+
const styles = { ...baseStyles,
|
|
26035
|
+
width: rect.width,
|
|
26036
|
+
height: rect.height,
|
|
26037
|
+
top: rect.top,
|
|
26038
|
+
left: rect.left,
|
|
26039
|
+
transform: CSS$1.Transform.toString(scaleAdjustedTransform),
|
|
26040
|
+
transformOrigin: adjustScale && activatorEvent ? getRelativeTransformOrigin(activatorEvent, rect) : undefined,
|
|
26041
|
+
transition: typeof transition === 'function' ? transition(activatorEvent) : transition,
|
|
26042
|
+
...style
|
|
26043
|
+
};
|
|
26044
|
+
return React__default.createElement(as, {
|
|
26045
|
+
className,
|
|
26046
|
+
style: styles,
|
|
26047
|
+
ref
|
|
26048
|
+
}, children);
|
|
26049
|
+
});
|
|
26050
|
+
|
|
26051
|
+
const defaultDropAnimationSideEffects = options => _ref => {
|
|
26052
|
+
let {
|
|
26053
|
+
active,
|
|
26054
|
+
dragOverlay
|
|
26055
|
+
} = _ref;
|
|
26056
|
+
const originalStyles = {};
|
|
26057
|
+
const {
|
|
26058
|
+
styles,
|
|
26059
|
+
className
|
|
26060
|
+
} = options;
|
|
26061
|
+
|
|
26062
|
+
if (styles != null && styles.active) {
|
|
26063
|
+
for (const [key, value] of Object.entries(styles.active)) {
|
|
26064
|
+
if (value === undefined) {
|
|
26065
|
+
continue;
|
|
26066
|
+
}
|
|
26067
|
+
|
|
26068
|
+
originalStyles[key] = active.node.style.getPropertyValue(key);
|
|
26069
|
+
active.node.style.setProperty(key, value);
|
|
26070
|
+
}
|
|
26071
|
+
}
|
|
26072
|
+
|
|
26073
|
+
if (styles != null && styles.dragOverlay) {
|
|
26074
|
+
for (const [key, value] of Object.entries(styles.dragOverlay)) {
|
|
26075
|
+
if (value === undefined) {
|
|
26076
|
+
continue;
|
|
26077
|
+
}
|
|
26078
|
+
|
|
26079
|
+
dragOverlay.node.style.setProperty(key, value);
|
|
26080
|
+
}
|
|
26081
|
+
}
|
|
26082
|
+
|
|
26083
|
+
if (className != null && className.active) {
|
|
26084
|
+
active.node.classList.add(className.active);
|
|
26085
|
+
}
|
|
26086
|
+
|
|
26087
|
+
if (className != null && className.dragOverlay) {
|
|
26088
|
+
dragOverlay.node.classList.add(className.dragOverlay);
|
|
26089
|
+
}
|
|
26090
|
+
|
|
26091
|
+
return function cleanup() {
|
|
26092
|
+
for (const [key, value] of Object.entries(originalStyles)) {
|
|
26093
|
+
active.node.style.setProperty(key, value);
|
|
26094
|
+
}
|
|
26095
|
+
|
|
26096
|
+
if (className != null && className.active) {
|
|
26097
|
+
active.node.classList.remove(className.active);
|
|
26098
|
+
}
|
|
26099
|
+
};
|
|
26100
|
+
};
|
|
26101
|
+
|
|
26102
|
+
const defaultKeyframeResolver = _ref2 => {
|
|
26103
|
+
let {
|
|
26104
|
+
transform: {
|
|
26105
|
+
initial,
|
|
26106
|
+
final
|
|
26107
|
+
}
|
|
26108
|
+
} = _ref2;
|
|
26109
|
+
return [{
|
|
26110
|
+
transform: CSS$1.Transform.toString(initial)
|
|
26111
|
+
}, {
|
|
26112
|
+
transform: CSS$1.Transform.toString(final)
|
|
26113
|
+
}];
|
|
26114
|
+
};
|
|
26115
|
+
|
|
26116
|
+
const defaultDropAnimationConfiguration = {
|
|
26117
|
+
duration: 250,
|
|
26118
|
+
easing: 'ease',
|
|
26119
|
+
keyframes: defaultKeyframeResolver,
|
|
26120
|
+
sideEffects: /*#__PURE__*/defaultDropAnimationSideEffects({
|
|
26121
|
+
styles: {
|
|
26122
|
+
active: {
|
|
26123
|
+
opacity: '0'
|
|
26124
|
+
}
|
|
26125
|
+
}
|
|
26126
|
+
})
|
|
26127
|
+
};
|
|
26128
|
+
function useDropAnimation(_ref3) {
|
|
26129
|
+
let {
|
|
26130
|
+
config,
|
|
26131
|
+
draggableNodes,
|
|
26132
|
+
droppableContainers,
|
|
26133
|
+
measuringConfiguration
|
|
26134
|
+
} = _ref3;
|
|
26135
|
+
return useEvent((id, node) => {
|
|
26136
|
+
if (config === null) {
|
|
26137
|
+
return;
|
|
26138
|
+
}
|
|
26139
|
+
|
|
26140
|
+
const activeDraggable = draggableNodes.get(id);
|
|
26141
|
+
|
|
26142
|
+
if (!activeDraggable) {
|
|
26143
|
+
return;
|
|
26144
|
+
}
|
|
26145
|
+
|
|
26146
|
+
const activeNode = activeDraggable.node.current;
|
|
26147
|
+
|
|
26148
|
+
if (!activeNode) {
|
|
26149
|
+
return;
|
|
26150
|
+
}
|
|
26151
|
+
|
|
26152
|
+
const measurableNode = getMeasurableNode(node);
|
|
26153
|
+
|
|
26154
|
+
if (!measurableNode) {
|
|
26155
|
+
return;
|
|
26156
|
+
}
|
|
26157
|
+
|
|
26158
|
+
const {
|
|
26159
|
+
transform
|
|
26160
|
+
} = getWindow$1(node).getComputedStyle(node);
|
|
26161
|
+
const parsedTransform = parseTransform(transform);
|
|
26162
|
+
|
|
26163
|
+
if (!parsedTransform) {
|
|
26164
|
+
return;
|
|
26165
|
+
}
|
|
26166
|
+
|
|
26167
|
+
const animation = typeof config === 'function' ? config : createDefaultDropAnimation(config);
|
|
26168
|
+
scrollIntoViewIfNeeded(activeNode, measuringConfiguration.draggable.measure);
|
|
26169
|
+
return animation({
|
|
26170
|
+
active: {
|
|
26171
|
+
id,
|
|
26172
|
+
data: activeDraggable.data,
|
|
26173
|
+
node: activeNode,
|
|
26174
|
+
rect: measuringConfiguration.draggable.measure(activeNode)
|
|
26175
|
+
},
|
|
26176
|
+
draggableNodes,
|
|
26177
|
+
dragOverlay: {
|
|
26178
|
+
node,
|
|
26179
|
+
rect: measuringConfiguration.dragOverlay.measure(measurableNode)
|
|
26180
|
+
},
|
|
26181
|
+
droppableContainers,
|
|
26182
|
+
measuringConfiguration,
|
|
26183
|
+
transform: parsedTransform
|
|
26184
|
+
});
|
|
26185
|
+
});
|
|
26186
|
+
}
|
|
26187
|
+
|
|
26188
|
+
function createDefaultDropAnimation(options) {
|
|
26189
|
+
const {
|
|
26190
|
+
duration,
|
|
26191
|
+
easing,
|
|
26192
|
+
sideEffects,
|
|
26193
|
+
keyframes
|
|
26194
|
+
} = { ...defaultDropAnimationConfiguration,
|
|
26195
|
+
...options
|
|
26196
|
+
};
|
|
26197
|
+
return _ref4 => {
|
|
26198
|
+
let {
|
|
26199
|
+
active,
|
|
26200
|
+
dragOverlay,
|
|
26201
|
+
transform,
|
|
26202
|
+
...rest
|
|
26203
|
+
} = _ref4;
|
|
26204
|
+
|
|
26205
|
+
if (!duration) {
|
|
26206
|
+
// Do not animate if animation duration is zero.
|
|
26207
|
+
return;
|
|
26208
|
+
}
|
|
26209
|
+
|
|
26210
|
+
const delta = {
|
|
26211
|
+
x: dragOverlay.rect.left - active.rect.left,
|
|
26212
|
+
y: dragOverlay.rect.top - active.rect.top
|
|
26213
|
+
};
|
|
26214
|
+
const scale = {
|
|
26215
|
+
scaleX: transform.scaleX !== 1 ? active.rect.width * transform.scaleX / dragOverlay.rect.width : 1,
|
|
26216
|
+
scaleY: transform.scaleY !== 1 ? active.rect.height * transform.scaleY / dragOverlay.rect.height : 1
|
|
26217
|
+
};
|
|
26218
|
+
const finalTransform = {
|
|
26219
|
+
x: transform.x - delta.x,
|
|
26220
|
+
y: transform.y - delta.y,
|
|
26221
|
+
...scale
|
|
26222
|
+
};
|
|
26223
|
+
const animationKeyframes = keyframes({ ...rest,
|
|
26224
|
+
active,
|
|
26225
|
+
dragOverlay,
|
|
26226
|
+
transform: {
|
|
26227
|
+
initial: transform,
|
|
26228
|
+
final: finalTransform
|
|
26229
|
+
}
|
|
26230
|
+
});
|
|
26231
|
+
const [firstKeyframe] = animationKeyframes;
|
|
26232
|
+
const lastKeyframe = animationKeyframes[animationKeyframes.length - 1];
|
|
26233
|
+
|
|
26234
|
+
if (JSON.stringify(firstKeyframe) === JSON.stringify(lastKeyframe)) {
|
|
26235
|
+
// The start and end keyframes are the same, infer that there is no animation needed.
|
|
26236
|
+
return;
|
|
26237
|
+
}
|
|
26238
|
+
|
|
26239
|
+
const cleanup = sideEffects == null ? void 0 : sideEffects({
|
|
26240
|
+
active,
|
|
26241
|
+
dragOverlay,
|
|
26242
|
+
...rest
|
|
26243
|
+
});
|
|
26244
|
+
const animation = dragOverlay.node.animate(animationKeyframes, {
|
|
26245
|
+
duration,
|
|
26246
|
+
easing,
|
|
26247
|
+
fill: 'forwards'
|
|
26248
|
+
});
|
|
26249
|
+
return new Promise(resolve => {
|
|
26250
|
+
animation.onfinish = () => {
|
|
26251
|
+
cleanup == null ? void 0 : cleanup();
|
|
26252
|
+
resolve();
|
|
26253
|
+
};
|
|
26254
|
+
});
|
|
26255
|
+
};
|
|
26256
|
+
}
|
|
26257
|
+
|
|
26258
|
+
let key = 0;
|
|
26259
|
+
function useKey(id) {
|
|
26260
|
+
return useMemo(() => {
|
|
26261
|
+
if (id == null) {
|
|
26262
|
+
return;
|
|
26263
|
+
}
|
|
26264
|
+
|
|
26265
|
+
key++;
|
|
26266
|
+
return key;
|
|
26267
|
+
}, [id]);
|
|
26268
|
+
}
|
|
26269
|
+
|
|
26270
|
+
const DragOverlay = /*#__PURE__*/React__default.memo(_ref => {
|
|
26271
|
+
let {
|
|
26272
|
+
adjustScale = false,
|
|
26273
|
+
children,
|
|
26274
|
+
dropAnimation: dropAnimationConfig,
|
|
26275
|
+
style,
|
|
26276
|
+
transition,
|
|
26277
|
+
modifiers,
|
|
26278
|
+
wrapperElement = 'div',
|
|
26279
|
+
className,
|
|
26280
|
+
zIndex = 999
|
|
26281
|
+
} = _ref;
|
|
26282
|
+
const {
|
|
26283
|
+
activatorEvent,
|
|
26284
|
+
active,
|
|
26285
|
+
activeNodeRect,
|
|
26286
|
+
containerNodeRect,
|
|
26287
|
+
draggableNodes,
|
|
26288
|
+
droppableContainers,
|
|
26289
|
+
dragOverlay,
|
|
26290
|
+
over,
|
|
26291
|
+
measuringConfiguration,
|
|
26292
|
+
scrollableAncestors,
|
|
26293
|
+
scrollableAncestorRects,
|
|
26294
|
+
windowRect
|
|
26295
|
+
} = useDndContext();
|
|
26296
|
+
const transform = useContext(ActiveDraggableContext);
|
|
26297
|
+
const key = useKey(active == null ? void 0 : active.id);
|
|
26298
|
+
const modifiedTransform = applyModifiers(modifiers, {
|
|
26299
|
+
activatorEvent,
|
|
26300
|
+
active,
|
|
26301
|
+
activeNodeRect,
|
|
26302
|
+
containerNodeRect,
|
|
26303
|
+
draggingNodeRect: dragOverlay.rect,
|
|
26304
|
+
over,
|
|
26305
|
+
overlayNodeRect: dragOverlay.rect,
|
|
26306
|
+
scrollableAncestors,
|
|
26307
|
+
scrollableAncestorRects,
|
|
26308
|
+
transform,
|
|
26309
|
+
windowRect
|
|
26310
|
+
});
|
|
26311
|
+
const initialRect = useInitialValue(activeNodeRect);
|
|
26312
|
+
const dropAnimation = useDropAnimation({
|
|
26313
|
+
config: dropAnimationConfig,
|
|
26314
|
+
draggableNodes,
|
|
26315
|
+
droppableContainers,
|
|
26316
|
+
measuringConfiguration
|
|
26317
|
+
}); // We need to wait for the active node to be measured before connecting the drag overlay ref
|
|
26318
|
+
// otherwise collisions can be computed against a mispositioned drag overlay
|
|
26319
|
+
|
|
26320
|
+
const ref = initialRect ? dragOverlay.setRef : undefined;
|
|
26321
|
+
return React__default.createElement(NullifiedContextProvider, null, React__default.createElement(AnimationManager, {
|
|
26322
|
+
animation: dropAnimation
|
|
26323
|
+
}, active && key ? React__default.createElement(PositionedOverlay, {
|
|
26324
|
+
key: key,
|
|
26325
|
+
id: active.id,
|
|
26326
|
+
ref: ref,
|
|
26327
|
+
as: wrapperElement,
|
|
26328
|
+
activatorEvent: activatorEvent,
|
|
26329
|
+
adjustScale: adjustScale,
|
|
26330
|
+
className: className,
|
|
26331
|
+
transition: transition,
|
|
26332
|
+
rect: initialRect,
|
|
26333
|
+
style: {
|
|
26334
|
+
zIndex,
|
|
26335
|
+
...style
|
|
26336
|
+
},
|
|
26337
|
+
transform: modifiedTransform
|
|
26338
|
+
}, children) : null));
|
|
26339
|
+
});
|
|
26340
|
+
|
|
25937
26341
|
const PERMISSIONS = {
|
|
25938
26342
|
NONE: 0, // no access
|
|
25939
26343
|
READ: 2, // can only read
|
|
@@ -77456,7 +77860,25 @@ const LOADING_LABEL = 'Loading filters';
|
|
|
77456
77860
|
const ERROR_TITLE = "Couldn't load filters";
|
|
77457
77861
|
const DEFAULT_ERROR_MESSAGE = 'Something went wrong while loading the filters. Check your connection and try again.';
|
|
77458
77862
|
const RETRY_LABEL = 'Try again';
|
|
77863
|
+
const CARD_REORDER_HINT = 'Drag to rearrange';
|
|
77864
|
+
const getCardGripLabel = (card) => `Move ${card}`;
|
|
77865
|
+
const EMPTY_GROUP_LABEL = 'Drag filter cards here';
|
|
77459
77866
|
|
|
77867
|
+
/** Popovers, dialogs, menus and listboxes opened on top of the surface. */
|
|
77868
|
+
const NESTED_LAYER_SELECTOR = '[data-slot="popover-content"], [role="dialog"], [role="menu"], [role="listbox"]';
|
|
77869
|
+
/**
|
|
77870
|
+
* Closes the open popover or menu (not one that holds `from`) as Escape would. Radix closes a popover on
|
|
77871
|
+
* the click after an outside press, which a card drag never makes, so a grab would leave it open.
|
|
77872
|
+
*/
|
|
77873
|
+
function dismissOpenLayer(from) {
|
|
77874
|
+
const layer = Array.from(from.ownerDocument.querySelectorAll(NESTED_LAYER_SELECTOR)).find((node) => !node.contains(from));
|
|
77875
|
+
// Sent from inside the layer, so the surface's own Escape handler leaves it alone.
|
|
77876
|
+
layer?.dispatchEvent(new KeyboardEvent('keydown', {
|
|
77877
|
+
key: 'Escape',
|
|
77878
|
+
bubbles: true,
|
|
77879
|
+
cancelable: true,
|
|
77880
|
+
}));
|
|
77881
|
+
}
|
|
77460
77882
|
/** Placeholder cards while the filters load; roughly the first rows of a card grid. */
|
|
77461
77883
|
const SKELETON_CARD_COUNT = 8;
|
|
77462
77884
|
const SKELETON_GRID_CLASS_NAME = 'grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4';
|
|
@@ -77466,8 +77888,82 @@ const MASONRY_ROW_PX = 4;
|
|
|
77466
77888
|
const getMasonrySpan = (height) => height > 0 ? Math.ceil(height / MASONRY_ROW_PX) : 0;
|
|
77467
77889
|
/** Dense 4px rows; the vertical gap comes from each item's bottom padding. */
|
|
77468
77890
|
const MASONRY_GRID_CLASS_NAME = 'grid-flow-row-dense auto-rows-[4px] gap-x-3';
|
|
77891
|
+
// Card drag: the DOM marks each card, group grid and "More filters" toggle, so a pointer hit is found by attribute.
|
|
77892
|
+
const CARD_ID_ATTR = 'data-filter-card-id';
|
|
77893
|
+
const GROUP_ID_ATTR = 'data-filter-group-id';
|
|
77894
|
+
const MORE_TOGGLE_ATTR = 'data-filter-more-toggle';
|
|
77895
|
+
const CARD_BODY_ATTR = 'data-filter-card-body';
|
|
77896
|
+
/** The group holding `id`, if any. */
|
|
77897
|
+
function findCardGroup(layout, id) {
|
|
77898
|
+
return Object.keys(layout).find((group) => layout[group].includes(id));
|
|
77899
|
+
}
|
|
77900
|
+
/** `layout` with `id` taken out of its group and put into `target.group`, beside `target.key` or at the end. */
|
|
77901
|
+
function moveCard(layout, id, target) {
|
|
77902
|
+
const rest = (layout[target.group] ?? []).filter((key) => key !== id);
|
|
77903
|
+
let at = rest.length;
|
|
77904
|
+
if (target.key !== undefined) {
|
|
77905
|
+
const index = rest.indexOf(target.key);
|
|
77906
|
+
if (index === -1)
|
|
77907
|
+
return layout;
|
|
77908
|
+
at = index + (target.side === 'after' ? 1 : 0);
|
|
77909
|
+
}
|
|
77910
|
+
const next = Object.fromEntries(Object.entries(layout).map(([group, ids]) => [
|
|
77911
|
+
group,
|
|
77912
|
+
ids.filter((key) => key !== id),
|
|
77913
|
+
]));
|
|
77914
|
+
next[target.group] = [...rest.slice(0, at), id, ...rest.slice(at)];
|
|
77915
|
+
return next;
|
|
77916
|
+
}
|
|
77917
|
+
function isSameLayout(a, b) {
|
|
77918
|
+
const groups = Object.keys(a);
|
|
77919
|
+
return (groups.length === Object.keys(b).length &&
|
|
77920
|
+
groups.every((group) => b[group]?.length === a[group].length &&
|
|
77921
|
+
a[group].every((id, index) => b[group][index] === id)));
|
|
77922
|
+
}
|
|
77923
|
+
/**
|
|
77924
|
+
* Where a card lands when dropped on `hit` at height `y`. In its own group it takes the hit card's place
|
|
77925
|
+
* (after it when moving forward), the way a sortable list swaps; from another group the pointer's half
|
|
77926
|
+
* of the hit card decides.
|
|
77927
|
+
*/
|
|
77928
|
+
function getCardDropTarget(layout, activeId, hit, y) {
|
|
77929
|
+
const ids = layout[hit.group] ?? [];
|
|
77930
|
+
const from = ids.indexOf(activeId);
|
|
77931
|
+
const side = from === -1
|
|
77932
|
+
? y > hit.rect.top + hit.rect.height / 2
|
|
77933
|
+
? 'after'
|
|
77934
|
+
: 'before'
|
|
77935
|
+
: from < ids.indexOf(hit.id)
|
|
77936
|
+
? 'after'
|
|
77937
|
+
: 'before';
|
|
77938
|
+
return { group: hit.group, key: hit.id, side };
|
|
77939
|
+
}
|
|
77940
|
+
/** The card, group or "More filters" toggle at a viewport point. */
|
|
77941
|
+
function getDropHit(x, y) {
|
|
77942
|
+
const element = document.elementFromPoint(x, y);
|
|
77943
|
+
if (!element)
|
|
77944
|
+
return null;
|
|
77945
|
+
const group = element.closest(`[${GROUP_ID_ATTR}]`);
|
|
77946
|
+
const groupId = group?.getAttribute(GROUP_ID_ATTR);
|
|
77947
|
+
const card = element.closest(`[${CARD_ID_ATTR}]`);
|
|
77948
|
+
const cardId = card?.getAttribute(CARD_ID_ATTR);
|
|
77949
|
+
if (card && cardId && groupId)
|
|
77950
|
+
return {
|
|
77951
|
+
kind: 'card',
|
|
77952
|
+
id: cardId,
|
|
77953
|
+
group: groupId,
|
|
77954
|
+
rect: card.getBoundingClientRect(),
|
|
77955
|
+
};
|
|
77956
|
+
if (groupId)
|
|
77957
|
+
return { kind: 'group', group: groupId };
|
|
77958
|
+
const toggle = element.closest(`[${MORE_TOGGLE_ATTR}]`);
|
|
77959
|
+
return toggle ? { kind: 'more', toggle } : null;
|
|
77960
|
+
}
|
|
77961
|
+
/** The dropped card's copy settles into its slot at the speed the other cards slide. */
|
|
77962
|
+
const CARD_DROP_ANIMATION = {
|
|
77963
|
+
duration: 200,
|
|
77964
|
+
easing: 'ease',
|
|
77965
|
+
};
|
|
77469
77966
|
|
|
77470
|
-
const NESTED_LAYER_SELECTOR = '[data-slot="popover-content"], [role="dialog"], [role="menu"], [role="listbox"]';
|
|
77471
77967
|
function useCloseOnEscape(onClose) {
|
|
77472
77968
|
useEffect(() => {
|
|
77473
77969
|
const handleKeyDown = (event) => {
|
|
@@ -77485,12 +77981,27 @@ function useCloseOnEscape(onClose) {
|
|
|
77485
77981
|
}
|
|
77486
77982
|
function useFilterSurfaceMore(defaultExpanded = false) {
|
|
77487
77983
|
const [expanded, setExpanded] = useState(defaultExpanded);
|
|
77488
|
-
|
|
77984
|
+
const [toggleNode, setToggleNode] = useState(null);
|
|
77985
|
+
const registerExpander = useContext(FilterSurfaceSortableContext)?.registerExpander;
|
|
77986
|
+
// Inside a sortable surface, a dragged card resting on the toggle opens the section.
|
|
77987
|
+
useEffect(() => {
|
|
77988
|
+
if (!toggleNode || !registerExpander)
|
|
77989
|
+
return;
|
|
77990
|
+
return registerExpander(toggleNode, () => setExpanded(true));
|
|
77991
|
+
}, [toggleNode, registerExpander]);
|
|
77992
|
+
return {
|
|
77993
|
+
expanded,
|
|
77994
|
+
toggle: () => setExpanded((current) => !current),
|
|
77995
|
+
toggleRef: setToggleNode,
|
|
77996
|
+
};
|
|
77489
77997
|
}
|
|
77490
|
-
/**
|
|
77491
|
-
|
|
77998
|
+
/**
|
|
77999
|
+
* Measures a masonry card and keeps its row span in step with its height (content opening, wrapping…).
|
|
78000
|
+
* `initialSpan` lets a remounted card take its known height on the first render.
|
|
78001
|
+
*/
|
|
78002
|
+
function useMasonrySpan(initialSpan = 0) {
|
|
77492
78003
|
const [node, setNode] = useState(null);
|
|
77493
|
-
const [span, setSpan] = useState(
|
|
78004
|
+
const [span, setSpan] = useState(initialSpan);
|
|
77494
78005
|
useEffect(() => {
|
|
77495
78006
|
if (!node)
|
|
77496
78007
|
return;
|
|
@@ -77505,6 +78016,308 @@ function useMasonrySpan() {
|
|
|
77505
78016
|
}, [node]);
|
|
77506
78017
|
return { ref: useCallback((next) => setNode(next), []), span };
|
|
77507
78018
|
}
|
|
78019
|
+
const FilterSurfaceSortableContext = createContext(null);
|
|
78020
|
+
/** The surrounding `FilterSurfaceSortable`, or null outside one. */
|
|
78021
|
+
function useFilterSurfaceSortable() {
|
|
78022
|
+
return useContext(FilterSurfaceSortableContext);
|
|
78023
|
+
}
|
|
78024
|
+
/** A sortable card's drag wiring, masonry span and registration for the slide animation. */
|
|
78025
|
+
function useSortableFilterCard(id) {
|
|
78026
|
+
const sortable = useContext(FilterSurfaceSortableContext);
|
|
78027
|
+
if (!sortable)
|
|
78028
|
+
throw new Error('SortableFilterCard must be inside FilterSurfaceSortable');
|
|
78029
|
+
const { spans, registerCard, unregisterCard } = sortable;
|
|
78030
|
+
const { setNodeRef, setActivatorNodeRef, listeners } = useDraggable({ id });
|
|
78031
|
+
const { ref: spanRef, span } = useMasonrySpan(spans.get(id));
|
|
78032
|
+
const nodeRef = useRef(null);
|
|
78033
|
+
useEffect(() => {
|
|
78034
|
+
if (span > 0)
|
|
78035
|
+
spans.set(id, span);
|
|
78036
|
+
}, [spans, id, span]);
|
|
78037
|
+
const cardRef = useCallback((node) => {
|
|
78038
|
+
setNodeRef(node);
|
|
78039
|
+
if (node)
|
|
78040
|
+
registerCard(id, node);
|
|
78041
|
+
else
|
|
78042
|
+
unregisterCard(id, nodeRef.current);
|
|
78043
|
+
nodeRef.current = node;
|
|
78044
|
+
}, [id, setNodeRef, registerCard, unregisterCard]);
|
|
78045
|
+
return {
|
|
78046
|
+
ref: { card: cardRef, span: spanRef },
|
|
78047
|
+
span,
|
|
78048
|
+
isActive: sortable.activeId === id,
|
|
78049
|
+
dragging: sortable.activeId !== null,
|
|
78050
|
+
label: sortable.cardLabel(id),
|
|
78051
|
+
setActivatorNodeRef,
|
|
78052
|
+
listeners,
|
|
78053
|
+
};
|
|
78054
|
+
}
|
|
78055
|
+
const FLIP_MS = 200;
|
|
78056
|
+
const FLIP_TRANSITION = `transform ${FLIP_MS}ms ease`;
|
|
78057
|
+
// After a move the cards repack and a different card can end up under a still pointer; the pointer must
|
|
78058
|
+
// travel this far before the next move, so cards never rock back and forth on their own.
|
|
78059
|
+
const MOVE_TRAVEL_PX = 32;
|
|
78060
|
+
// Long enough that sweeping past "More filters" doesn't open it.
|
|
78061
|
+
const EXPAND_DELAY_MS = 400;
|
|
78062
|
+
function prefersReducedMotion() {
|
|
78063
|
+
return window.matchMedia?.('(prefers-reduced-motion: reduce)').matches;
|
|
78064
|
+
}
|
|
78065
|
+
/** Slides each card from where it was (`from`) to where the new layout put it. */
|
|
78066
|
+
function playFlip(nodes, from) {
|
|
78067
|
+
nodes.forEach((node, id) => {
|
|
78068
|
+
const before = from.get(id);
|
|
78069
|
+
if (!before)
|
|
78070
|
+
return;
|
|
78071
|
+
const after = node.getBoundingClientRect();
|
|
78072
|
+
const dx = before.left - after.left;
|
|
78073
|
+
const dy = before.top - after.top;
|
|
78074
|
+
if (!dx && !dy)
|
|
78075
|
+
return;
|
|
78076
|
+
node.style.transition = 'none';
|
|
78077
|
+
node.style.transform = `translate(${dx}px, ${dy}px)`;
|
|
78078
|
+
// Commit the offset before transitioning it away.
|
|
78079
|
+
void node.offsetWidth;
|
|
78080
|
+
node.style.transition = FLIP_TRANSITION;
|
|
78081
|
+
node.style.transform = '';
|
|
78082
|
+
node.addEventListener('transitionend', () => {
|
|
78083
|
+
node.style.transition = '';
|
|
78084
|
+
}, { once: true });
|
|
78085
|
+
});
|
|
78086
|
+
}
|
|
78087
|
+
/** A copy of the card for the drag overlay, without ids that would clash with the original. */
|
|
78088
|
+
function cloneCardBody(card) {
|
|
78089
|
+
const body = card?.querySelector(`[${CARD_BODY_ATTR}]`);
|
|
78090
|
+
if (!body)
|
|
78091
|
+
return null;
|
|
78092
|
+
const clone = body.cloneNode(true);
|
|
78093
|
+
if (!(clone instanceof HTMLElement))
|
|
78094
|
+
return null;
|
|
78095
|
+
clone.removeAttribute(CARD_BODY_ATTR);
|
|
78096
|
+
clone.querySelectorAll('[id]').forEach((el) => el.removeAttribute('id'));
|
|
78097
|
+
return clone;
|
|
78098
|
+
}
|
|
78099
|
+
/**
|
|
78100
|
+
* Card drag-to-reorder across a surface's groups. The live order is a draft: cards reflow as the pointer
|
|
78101
|
+
* crosses them and slide (FLIP) from their old spots, and the draft is handed over on drop. The pointer is
|
|
78102
|
+
* hit-tested against what is on screen, so masonry cards of any height land where they look.
|
|
78103
|
+
*/
|
|
78104
|
+
function useFilterCardReorder({ layout, onLayoutChange, }) {
|
|
78105
|
+
const [draft, setDraft] = useState(null);
|
|
78106
|
+
const [activeId, setActiveId] = useState(null);
|
|
78107
|
+
const [overlay, setOverlay] = useState(null);
|
|
78108
|
+
const shown = draft ?? layout;
|
|
78109
|
+
const shownRef = useRef(shown);
|
|
78110
|
+
const activeRef = useRef(null);
|
|
78111
|
+
const nodesRef = useRef(new Map());
|
|
78112
|
+
const spansRef = useRef(new Map());
|
|
78113
|
+
const flipFromRef = useRef(null);
|
|
78114
|
+
const expandersRef = useRef(new Map());
|
|
78115
|
+
useLayoutEffect(() => {
|
|
78116
|
+
shownRef.current = shown;
|
|
78117
|
+
}, [shown]);
|
|
78118
|
+
// A new layout from the consumer (usually the one just dropped) replaces the draft.
|
|
78119
|
+
useEffect(() => {
|
|
78120
|
+
if (activeRef.current === null)
|
|
78121
|
+
setDraft(null);
|
|
78122
|
+
}, [layout]);
|
|
78123
|
+
const applyDraft = useCallback((next) => {
|
|
78124
|
+
if (!prefersReducedMotion()) {
|
|
78125
|
+
const rects = new Map();
|
|
78126
|
+
nodesRef.current.forEach((node, id) => rects.set(id, node.getBoundingClientRect()));
|
|
78127
|
+
flipFromRef.current = rects;
|
|
78128
|
+
}
|
|
78129
|
+
setDraft(next);
|
|
78130
|
+
}, []);
|
|
78131
|
+
useLayoutEffect(() => {
|
|
78132
|
+
const from = flipFromRef.current;
|
|
78133
|
+
if (!from)
|
|
78134
|
+
return;
|
|
78135
|
+
flipFromRef.current = null;
|
|
78136
|
+
playFlip(nodesRef.current, from);
|
|
78137
|
+
}, [draft]);
|
|
78138
|
+
useCardDragTracking(activeId, shownRef, applyDraft, expandersRef.current);
|
|
78139
|
+
const sensors = useSensors(useSensor(PointerSensor, { activationConstraint: { distance: 4 } }));
|
|
78140
|
+
const registerCard = useCallback((id, node) => {
|
|
78141
|
+
nodesRef.current.set(id, node);
|
|
78142
|
+
}, []);
|
|
78143
|
+
// A card moving between groups remounts; only forget it if the new node hasn't registered already.
|
|
78144
|
+
const unregisterCard = useCallback((id, node) => {
|
|
78145
|
+
if (nodesRef.current.get(id) === node)
|
|
78146
|
+
nodesRef.current.delete(id);
|
|
78147
|
+
}, []);
|
|
78148
|
+
const registerExpander = useCallback((toggle, expand) => {
|
|
78149
|
+
const expanders = expandersRef.current;
|
|
78150
|
+
expanders.set(toggle, expand);
|
|
78151
|
+
return () => {
|
|
78152
|
+
expanders.delete(toggle);
|
|
78153
|
+
};
|
|
78154
|
+
}, []);
|
|
78155
|
+
const onDragStart = useCallback((event) => {
|
|
78156
|
+
const id = String(event.active.id);
|
|
78157
|
+
activeRef.current = id;
|
|
78158
|
+
setOverlay(cloneCardBody(nodesRef.current.get(id)));
|
|
78159
|
+
setActiveId(id);
|
|
78160
|
+
}, []);
|
|
78161
|
+
const finish = useCallback((commit) => {
|
|
78162
|
+
activeRef.current = null;
|
|
78163
|
+
setActiveId(null);
|
|
78164
|
+
setOverlay(null);
|
|
78165
|
+
const next = shownRef.current;
|
|
78166
|
+
if (commit && !isSameLayout(next, layout)) {
|
|
78167
|
+
// The draft stays on screen until the consumer passes the saved layout back.
|
|
78168
|
+
onLayoutChange(next);
|
|
78169
|
+
return;
|
|
78170
|
+
}
|
|
78171
|
+
applyDraft(null);
|
|
78172
|
+
}, [layout, onLayoutChange, applyDraft]);
|
|
78173
|
+
const onDragEnd = useCallback(() => finish(true), [finish]);
|
|
78174
|
+
const onDragCancel = useCallback(() => finish(false), [finish]);
|
|
78175
|
+
return {
|
|
78176
|
+
layout: shown,
|
|
78177
|
+
activeId,
|
|
78178
|
+
overlay,
|
|
78179
|
+
sensors,
|
|
78180
|
+
spans: spansRef.current,
|
|
78181
|
+
registerCard,
|
|
78182
|
+
unregisterCard,
|
|
78183
|
+
registerExpander,
|
|
78184
|
+
onDragStart,
|
|
78185
|
+
onDragEnd,
|
|
78186
|
+
onDragCancel,
|
|
78187
|
+
};
|
|
78188
|
+
}
|
|
78189
|
+
/**
|
|
78190
|
+
* While a card drags: follows the pointer, moves the card in the draft as it crosses other cards or an
|
|
78191
|
+
* empty group, and opens a collapsed "More filters" the pointer rests on.
|
|
78192
|
+
*/
|
|
78193
|
+
function useCardDragTracking(activeId, shownRef, applyDraft, expanders) {
|
|
78194
|
+
useEffect(() => {
|
|
78195
|
+
if (activeId === null)
|
|
78196
|
+
return;
|
|
78197
|
+
let point = null;
|
|
78198
|
+
let frame = null;
|
|
78199
|
+
// Cards are mid-slide until then; hit-testing them would chase a moving target.
|
|
78200
|
+
let settledAt = 0;
|
|
78201
|
+
let settleTimer;
|
|
78202
|
+
// The card last moved beside: staying over it does nothing, or two cards of different heights would swap forever.
|
|
78203
|
+
let lastOver = null;
|
|
78204
|
+
// Where the pointer was at the last move.
|
|
78205
|
+
let movedAt = null;
|
|
78206
|
+
const hasTravelled = (x, y) => !movedAt || Math.hypot(x - movedAt.x, y - movedAt.y) >= MOVE_TRAVEL_PX;
|
|
78207
|
+
let expandTimer;
|
|
78208
|
+
let expandToggle = null;
|
|
78209
|
+
const stopExpand = () => {
|
|
78210
|
+
window.clearTimeout(expandTimer);
|
|
78211
|
+
expandToggle = null;
|
|
78212
|
+
};
|
|
78213
|
+
const handleHit = (hit, x, y) => {
|
|
78214
|
+
if (hit?.kind !== 'more')
|
|
78215
|
+
stopExpand();
|
|
78216
|
+
if (!hit)
|
|
78217
|
+
return;
|
|
78218
|
+
const layout = shownRef.current;
|
|
78219
|
+
if (hit.kind === 'more') {
|
|
78220
|
+
if (hit.toggle === expandToggle)
|
|
78221
|
+
return;
|
|
78222
|
+
stopExpand();
|
|
78223
|
+
const expand = expanders.get(hit.toggle);
|
|
78224
|
+
if (!expand || hit.toggle.getAttribute('aria-expanded') !== 'false')
|
|
78225
|
+
return;
|
|
78226
|
+
expandToggle = hit.toggle;
|
|
78227
|
+
// Not a click: the drag swallows clicks until the drop.
|
|
78228
|
+
expandTimer = window.setTimeout(expand, EXPAND_DELAY_MS);
|
|
78229
|
+
return;
|
|
78230
|
+
}
|
|
78231
|
+
if (!hasTravelled(x, y))
|
|
78232
|
+
return;
|
|
78233
|
+
let next;
|
|
78234
|
+
if (hit.kind === 'group') {
|
|
78235
|
+
// Only an empty group takes a drop here; between cards of a full one the pointer is in a gap.
|
|
78236
|
+
if ((layout[hit.group] ?? []).some((id) => id !== activeId))
|
|
78237
|
+
return;
|
|
78238
|
+
if (findCardGroup(layout, activeId) === hit.group)
|
|
78239
|
+
return;
|
|
78240
|
+
next = moveCard(layout, activeId, { group: hit.group });
|
|
78241
|
+
}
|
|
78242
|
+
else {
|
|
78243
|
+
if (hit.id === activeId) {
|
|
78244
|
+
lastOver = null;
|
|
78245
|
+
return;
|
|
78246
|
+
}
|
|
78247
|
+
if (hit.id === lastOver)
|
|
78248
|
+
return;
|
|
78249
|
+
lastOver = hit.id;
|
|
78250
|
+
next = moveCard(layout, activeId, getCardDropTarget(layout, activeId, hit, y));
|
|
78251
|
+
}
|
|
78252
|
+
if (isSameLayout(next, layout))
|
|
78253
|
+
return;
|
|
78254
|
+
settledAt = performance.now() + FLIP_MS;
|
|
78255
|
+
movedAt = { x, y };
|
|
78256
|
+
applyDraft(next);
|
|
78257
|
+
};
|
|
78258
|
+
const check = () => {
|
|
78259
|
+
frame = null;
|
|
78260
|
+
if (!point)
|
|
78261
|
+
return;
|
|
78262
|
+
const wait = settledAt - performance.now();
|
|
78263
|
+
if (wait > 0) {
|
|
78264
|
+
window.clearTimeout(settleTimer);
|
|
78265
|
+
settleTimer = window.setTimeout(schedule, wait);
|
|
78266
|
+
return;
|
|
78267
|
+
}
|
|
78268
|
+
handleHit(getDropHit(point.x, point.y), point.x, point.y);
|
|
78269
|
+
};
|
|
78270
|
+
const schedule = () => {
|
|
78271
|
+
if (frame === null)
|
|
78272
|
+
frame = requestAnimationFrame(check);
|
|
78273
|
+
};
|
|
78274
|
+
const onPointerMove = (event) => {
|
|
78275
|
+
point = { x: event.clientX, y: event.clientY };
|
|
78276
|
+
schedule();
|
|
78277
|
+
};
|
|
78278
|
+
// Escape cancels the drag; marked handled so the surface doesn't also close.
|
|
78279
|
+
const onKeyDown = (event) => {
|
|
78280
|
+
if (event.key === 'Escape')
|
|
78281
|
+
event.preventDefault();
|
|
78282
|
+
};
|
|
78283
|
+
window.addEventListener('pointermove', onPointerMove);
|
|
78284
|
+
// Auto-scroll moves the cards under a still pointer.
|
|
78285
|
+
window.addEventListener('scroll', schedule, true);
|
|
78286
|
+
window.addEventListener('keydown', onKeyDown, true);
|
|
78287
|
+
return () => {
|
|
78288
|
+
window.removeEventListener('pointermove', onPointerMove);
|
|
78289
|
+
window.removeEventListener('scroll', schedule, true);
|
|
78290
|
+
window.removeEventListener('keydown', onKeyDown, true);
|
|
78291
|
+
if (frame !== null)
|
|
78292
|
+
cancelAnimationFrame(frame);
|
|
78293
|
+
window.clearTimeout(settleTimer);
|
|
78294
|
+
stopExpand();
|
|
78295
|
+
};
|
|
78296
|
+
}, [activeId, shownRef, applyDraft, expanders]);
|
|
78297
|
+
}
|
|
78298
|
+
/** The context the sortable groups and cards read. */
|
|
78299
|
+
function useSortableContextValue(reorder, renderCard, cardLabel) {
|
|
78300
|
+
const { layout, activeId, spans, registerCard, unregisterCard, registerExpander, } = reorder;
|
|
78301
|
+
return useMemo(() => ({
|
|
78302
|
+
layout,
|
|
78303
|
+
activeId,
|
|
78304
|
+
spans,
|
|
78305
|
+
renderCard,
|
|
78306
|
+
cardLabel: cardLabel ?? ((id) => id),
|
|
78307
|
+
registerCard,
|
|
78308
|
+
unregisterCard,
|
|
78309
|
+
registerExpander,
|
|
78310
|
+
}), [
|
|
78311
|
+
layout,
|
|
78312
|
+
activeId,
|
|
78313
|
+
spans,
|
|
78314
|
+
renderCard,
|
|
78315
|
+
cardLabel,
|
|
78316
|
+
registerCard,
|
|
78317
|
+
unregisterCard,
|
|
78318
|
+
registerExpander,
|
|
78319
|
+
]);
|
|
78320
|
+
}
|
|
77508
78321
|
|
|
77509
78322
|
const DEFAULT_SKELETON_CARDS = Array.from({ length: SKELETON_CARD_COUNT }, (_, index) => `card-${index}`);
|
|
77510
78323
|
/** Loading placeholder: the page's own skeleton, or generic list cards. */
|
|
@@ -77520,6 +78333,40 @@ function MasonryItem({ children }) {
|
|
|
77520
78333
|
const { ref, span } = useMasonrySpan();
|
|
77521
78334
|
return (jsx("div", { style: span > 0 ? { gridRowEnd: `span ${span}` } : undefined, children: jsx("div", { ref: ref, className: "pb-3", children: children }) }));
|
|
77522
78335
|
}
|
|
78336
|
+
/**
|
|
78337
|
+
* A grab tab on the middle of the card's top edge, always visible so the cards read as movable, and clear
|
|
78338
|
+
* of the header's title and actions. It lights up with its card on hover. The only place a card drag starts.
|
|
78339
|
+
*/
|
|
78340
|
+
function CardReorderGrip({ label, dragging, setActivatorNodeRef, listeners, }) {
|
|
78341
|
+
return (jsx(TooltipProvider, { delayDuration: 500, children: jsxs(Tooltip, { open: dragging ? false : undefined, children: [jsx(TooltipTrigger, { asChild: true, children: jsx("button", { ref: setActivatorNodeRef, type: "button",
|
|
78342
|
+
// Mouse and touch only, like column reorder.
|
|
78343
|
+
tabIndex: -1, "aria-label": getCardGripLabel(label), className: cn(
|
|
78344
|
+
// The ::before pads the tab's hit area beyond what it shows.
|
|
78345
|
+
'absolute left-1/2 top-0 z-10 flex h-4 w-10 -translate-x-1/2 -translate-y-1/2 cursor-grab touch-none select-none items-center justify-center rounded-full border border-border bg-card text-foreground/50 shadow-sm transition-colors before:absolute before:-inset-2 before:content-[""] active:cursor-grabbing', dragging
|
|
78346
|
+
? 'pointer-events-none'
|
|
78347
|
+
: 'group-hover/card:border-primary/50 group-hover/card:text-primary group-hover/card:hover:border-primary group-hover/card:hover:bg-primary group-hover/card:hover:text-primary-foreground'), onClick: (event) => event.stopPropagation(), ...listeners,
|
|
78348
|
+
// A grab closes any open dropdown first, so it doesn't stay open over the drag.
|
|
78349
|
+
onPointerDown: (event) => {
|
|
78350
|
+
dismissOpenLayer(event.currentTarget);
|
|
78351
|
+
listeners?.onPointerDown?.(event);
|
|
78352
|
+
}, children: jsx(GripHorizontal, { "aria-hidden": "true", className: "size-3.5", strokeWidth: 2.5 }) }) }), jsx(TooltipContent, { side: "top", children: CARD_REORDER_HINT })] }) }));
|
|
78353
|
+
}
|
|
78354
|
+
/** A card in a sortable group: draggable from its grip, and a dashed slot where it will land while it drags. */
|
|
78355
|
+
function SortableFilterCard({ id, masonry, children, }) {
|
|
78356
|
+
const { ref, span, isActive, dragging, label, setActivatorNodeRef, listeners, } = useSortableFilterCard(id);
|
|
78357
|
+
return (jsx("div", { ref: ref.card, "data-filter-card-id": id, className: "group/card", style: masonry && span > 0 ? { gridRowEnd: `span ${span}` } : undefined, children: jsx("div", { ref: masonry ? ref.span : undefined, className: cn(masonry && 'pb-3'), children: jsxs("div", { className: cn('relative rounded-xl transition-shadow', !dragging &&
|
|
78358
|
+
'group-hover/card:ring-2 group-hover/card:ring-primary/20'), children: [jsx("div", { "data-filter-card-body": "", className: cn(isActive && 'invisible'), children: children }), isActive ? (jsx("div", { className: "absolute inset-0 rounded-xl border-2 border-dashed border-primary/40 bg-primary/5" })) : (jsx(CardReorderGrip, { label: label, dragging: dragging, setActivatorNodeRef: setActivatorNodeRef, listeners: listeners }))] }) }) }));
|
|
78359
|
+
}
|
|
78360
|
+
/** Where a group with no cards takes a drop. */
|
|
78361
|
+
function EmptyGroupDropZone({ groupId, }) {
|
|
78362
|
+
return (jsx("div", { "data-filter-group-id": groupId, className: "flex min-h-24 items-center justify-center rounded-xl border-2 border-dashed border-border text-sm text-muted-foreground", children: EMPTY_GROUP_LABEL }));
|
|
78363
|
+
}
|
|
78364
|
+
/** The copy of the dragged card under the pointer. */
|
|
78365
|
+
function FilterCardOverlay({ node, }) {
|
|
78366
|
+
return (jsxs("div", { "aria-hidden": "true", className: "relative cursor-grabbing rounded-xl shadow-lg ring-2 ring-primary/20", children: [jsx("div", { ref: (element) => {
|
|
78367
|
+
element?.replaceChildren(node);
|
|
78368
|
+
} }), jsx("span", { className: "absolute left-1/2 top-0 flex h-4 w-10 -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-full border border-primary bg-primary text-primary-foreground shadow-sm", children: jsx(GripHorizontal, { "aria-hidden": "true", className: "size-3.5", strokeWidth: 2.5 }) })] }));
|
|
78369
|
+
}
|
|
77523
78370
|
|
|
77524
78371
|
/** Full-page filter screen (e.g. an advanced search): one sticky header with every action, then the scrolling card grid. */
|
|
77525
78372
|
function FilterSurface({ title, headerActions, primaryActions, chips, onClose, status = 'ready', errorMessage, onRetry, skeleton, children, }) {
|
|
@@ -77528,15 +78375,30 @@ function FilterSurface({ title, headerActions, primaryActions, chips, onClose, s
|
|
|
77528
78375
|
const actions = ready ? primaryActions : undefined;
|
|
77529
78376
|
return (jsxs("div", { role: "region", "aria-label": title, className: "flex h-full min-h-0 flex-col bg-background", children: [jsxs("header", { className: "sticky top-0 z-20 flex shrink-0 flex-wrap items-center gap-x-3 gap-y-2 bg-background px-3 py-2.5", children: [jsx(IconButton, { appearance: "ghost", size: "sm", "aria-label": BACK_LABEL, title: BACK_LABEL, onClick: onClose, children: jsx(ArrowLeft, {}) }), jsx("h1", { className: "sr-only", children: title }), jsx("div", { className: "min-w-0 flex-1", children: ready && chips }), jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [headerActions, actions] })] }), jsx("div", { className: "min-h-0 flex-1 overflow-y-auto px-3 pb-3", children: status === 'loading' ? (jsx(FilterSurfaceSkeleton, { children: skeleton })) : status === 'error' ? (jsx(FilterSurfaceError, { message: errorMessage ?? DEFAULT_ERROR_MESSAGE, onRetry: onRetry })) : (jsx("div", { className: "flex flex-col gap-3", children: children })) })] }));
|
|
77530
78377
|
}
|
|
77531
|
-
|
|
77532
|
-
|
|
78378
|
+
/**
|
|
78379
|
+
* Lets the user drag the cards of its `FilterSurfaceGroup`s (those with a `sortableId`) into any order and
|
|
78380
|
+
* between groups, from a grip on each card. A collapsed `FilterSurfaceMore` opens when a card rests on it.
|
|
78381
|
+
*/
|
|
78382
|
+
function FilterSurfaceSortable({ layout, onLayoutChange, renderCard, cardLabel, children, }) {
|
|
78383
|
+
const reorder = useFilterCardReorder({ layout, onLayoutChange });
|
|
78384
|
+
const context = useSortableContextValue(reorder, renderCard, cardLabel);
|
|
78385
|
+
return (jsxs(DndContext, { sensors: reorder.sensors, onDragStart: reorder.onDragStart, onDragEnd: reorder.onDragEnd, onDragCancel: reorder.onDragCancel, children: [jsx(FilterSurfaceSortableContext.Provider, { value: context, children: children }), jsx(DragOverlay, { className: "pointer-events-none", dropAnimation: CARD_DROP_ANIMATION, children: reorder.overlay && jsx(FilterCardOverlay, { node: reorder.overlay }) })] }));
|
|
78386
|
+
}
|
|
78387
|
+
function FilterSurfaceGroup({ title, masonry = false, sortableId, className, children, }) {
|
|
78388
|
+
const sortable = useFilterSurfaceSortable();
|
|
78389
|
+
const ids = sortable && sortableId ? (sortable.layout[sortableId] ?? []) : null;
|
|
78390
|
+
// Cards keep their own height (no stretching to the row's tallest), so short cards carry no empty space.
|
|
78391
|
+
const gridClassName = cn('grid grid-cols-1 items-start lg:grid-cols-6', masonry ? MASONRY_GRID_CLASS_NAME : 'gap-3', className);
|
|
78392
|
+
return (jsxs("section", { className: "flex flex-col gap-3", children: [title && (jsx("h2", { className: "text-xs font-semibold uppercase tracking-wide text-label", children: title })), sortable && sortableId && ids ? (ids.length === 0 ? (jsx(EmptyGroupDropZone, { groupId: sortableId })) : (
|
|
78393
|
+
// Top room for the first row's grab tabs, which sit on the cards' top edge.
|
|
78394
|
+
jsx("div", { className: cn(gridClassName, 'pt-2'), "data-filter-group-id": sortableId, children: ids.map((id) => (jsx(SortableFilterCard, { id: id, masonry: masonry, children: sortable.renderCard(id) }, id))) }))) : (jsx("div", { className: gridClassName, children: masonry
|
|
77533
78395
|
? Children.map(children, (child) => child ? jsx(MasonryItem, { children: child }) : null)
|
|
77534
|
-
: children })] }));
|
|
78396
|
+
: children }))] }));
|
|
77535
78397
|
}
|
|
77536
78398
|
/** Collapsed "More filters" divider that reveals extra cards. */
|
|
77537
78399
|
function FilterSurfaceMore({ label, defaultExpanded, children, }) {
|
|
77538
|
-
const { expanded, toggle } = useFilterSurfaceMore(defaultExpanded);
|
|
77539
|
-
return (jsxs("section", { className: "flex flex-col gap-3", children: [jsxs("div", { className: "flex items-center gap-3", children: [jsx("span", { className: "h-px flex-1 bg-border" }), jsxs("button", { type: "button", "aria-expanded": expanded, onClick: toggle, className: "inline-flex cursor-pointer items-center gap-1.5 rounded-full border border-border bg-card px-3.5 py-1.5 text-xs font-medium text-primary outline-none hover:bg-muted/50 focus-visible:ring-2 focus-visible:ring-primary/30", children: [label, jsx(ChevronDown, { "aria-hidden": "true", className: cn('size-3.5 transition-transform', expanded && 'rotate-180') })] }), jsx("span", { className: "h-px flex-1 bg-border" })] }), expanded && children] }));
|
|
78400
|
+
const { expanded, toggle, toggleRef } = useFilterSurfaceMore(defaultExpanded);
|
|
78401
|
+
return (jsxs("section", { className: "flex flex-col gap-3", children: [jsxs("div", { className: "flex items-center gap-3", children: [jsx("span", { className: "h-px flex-1 bg-border" }), jsxs("button", { ref: toggleRef, type: "button", "aria-expanded": expanded, onClick: toggle, "data-filter-more-toggle": "", className: "inline-flex cursor-pointer items-center gap-1.5 rounded-full border border-border bg-card px-3.5 py-1.5 text-xs font-medium text-primary outline-none hover:bg-muted/50 focus-visible:ring-2 focus-visible:ring-primary/30", children: [label, jsx(ChevronDown, { "aria-hidden": "true", className: cn('size-3.5 transition-transform', expanded && 'rotate-180') })] }), jsx("span", { className: "h-px flex-1 bg-border" })] }), expanded && children] }));
|
|
77540
78402
|
}
|
|
77541
78403
|
|
|
77542
78404
|
/** Falls back to counting the current page when the caller has no total. */
|
|
@@ -80112,5 +80974,5 @@ var RichTextAreaImpl = /*#__PURE__*/Object.freeze({
|
|
|
80112
80974
|
RichTextarea: RichTextarea
|
|
80113
80975
|
});
|
|
80114
80976
|
|
|
80115
|
-
export { ACTIVITY_CATEGORIES, ACTIVITY_CATEGORY_META, ActionBadge, ActionButtonWithTooltip, ActiveFilterChips, ActivityFeed, AdvancedSearchDrawer, Alert, ApiComboBox, AppSidebar, AuditEntryCard, AuditHistoryPanel, AuditTimeline, AuditTimelineShimmer, Badge, BadgeType, BusinessContactStatusFilter, Button, CUSTOMER_AUDIT_CONFIG, CertificateRowList, ChangePill, Collapsible, CollapsibleCard, CollapsibleContent, CollapsibleTrigger, CompanyCard, ConfirmDialog, ContactTypeFilter, ContainsFilter, CopyButton, CountrySelect, CreateFormPageHeader, CreateFormPageShell, CurrencyDisplayTabs, CurrencyInput, CurrencyToggle, CustomCombobox, CustomFieldInput, CustomFieldValue, CustomTable, CustomizeColumnsDrawer, DATE_PRESET_OPTIONS, DIAMOND_AUDIT_CONFIG, DashboardShell, DataEditableTable, DataTable, DateInput, DateRangeFilter, DetailChip, DetailPageLayout, DetailPageSkeleton, DetailSection, DocumentDeleteDialog, DocumentDetailSkeleton, DocumentHero, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyValue, EntityHeader, FILTER_COUNT_BADGE_CLASS_NAME, Field, FieldSkeleton, FileUploader, FilterCardSkeleton, FilterCellPopover, FilterEmptyState, FilterField, FilterFieldCard, FilterFieldCell, FilterFieldControl, FilterMultiSelect, FilterPanel, FilterSelect, FilterSurface, FilterSurfaceGroup, FilterSurfaceMore, FormSectionCard, FormSectionCardSkeleton, GEM_AUDIT_CONFIG, HistoryEntryCard, HistoryTimeline, HistoryTimelineShimmer, INVOICE_AUDIT_CONFIG, IconButton, IdHyperlinkText, IdListInput, InAppNotificationCard, InAppNotificationsPanel, InfoBanner, InventoryComboBox, InventoryItemCard, InventoryItemRow, InvoiceComboBox, KYCStatusFilter, KeyValueGrid, LAYOUT_AUDIT_CONFIG, LabeledToggle, LineItemsCard, LineProductCell, LineProductThumb, LineProductTypeChip, LineRowActionsMenu, LineTable, LineTableEmpty, MEMO_IN_AUDIT_CONFIG, MEMO_OUT_AUDIT_CONFIG, MediaGallery, MemoInComboBox, MetricCard, MetricRow, MetricTile, Modal, MoreInfoPanel, MoreInfoTrigger, NOT_CAPTURED, Navbar, NavbarActions, NavbarAvatar, NavbarIconButton, NavbarSearch, NavbarTitle, NumberExpressionFilter, NumberInput, NumberRangeInputs, NumberedStepCard, OtpInput, OwnershipFilter, OwnershipSplitCard, PROFORMA_AUDIT_CONFIG, PageHeader, PageTabs, Pagination, PaginationSelect, PartnerShareCard, PickListDropdown, PickListFilter, PriceInput, Protected, PurchaseOrderComboBox, QUOTATION_AUDIT_CONFIG, RadioCardGroup, ReadMoreText, RefreshButton, RichTextarea$1 as RichTextarea, SAVED_SEARCH_NAME_MAX_LENGTH, SEARCHABLE_SELECT_PAGE_SIZE, SafeImage, SaveSearchDialog, SavedSearchChipList, SavedSearchDetail, SavedSearchesMenu, ScaleRangeFilter, ScrollFade, SearchBox, SearchInput, SearchableSelect, SectionCard, SectionIcon, SegmentedControl, ShareDialog, ShareMenu, ShimmerTable, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarHeader, SidebarInset, SidebarMenu, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, SlideOut, SlideOutClose, SlideOutContent, SlideOutDescription, SlideOutHeader, SlideOutOverlay, SlideOutPortal, SlideOutTitle, SlideOutTrigger, Slider, SpecList, Spinner, SquareSkeleton, StateSelect, StatusBadge$1 as StatusBadge, StatusFilter, Stepper, StockTypeFilter, TablePagination, TableRowsSkeleton, TableSkeleton, Tabs, TabsContent, TabsList, TabsTrigger, TagsInput, TextHyperlink, TimePicker, ToggleSwitch, TriStateFilter, TruncateTooltip, TruncatedLabel, WarehouseComboBox, WarehouseFilter, ZoomSplitViewer, asList, asText, badgeVariants, buildBulkShareMessage, buildBulkShareTitle, buildInventoryPublicUrl, buildInventoryRowProps, buildInventoryShareTitle, buildNumberRuleHelp, buildWhatsappUrl, buttonVariants, cn, countries, countryByCode, createVideoMediaItem, describeFilterValue, dropdownMenuItemDestructiveClass, expandScaleRange, fieldTypeIcon, filterSavedSearches, findRegion, flagEmoji, formatAddressLocation, formatDateRange, formatFileSize, formatNumberRange, formatScaleRange, formatSelectedCount, generateActionDescription, generateTitle, getBadgeTypeForStatus, getChangePills, getCountryName, getInitials, getStatesOfCountry, iconButtonVariants, inAppNotificationCardA11y, inAppNotificationsPanelA11y, isBlank, isDuplicateSearchName, isFilterValueActive, isIndiaCountry, isKnownRegion, isPathActive, isValidAlpha2CountryCode, isValidSearchName, isValueEmpty, notify, parseNumberExpression, releaseStaleOverlayBodyLock, renderBadge, resolveCountryCode, resolveDatePreset, resolveDateRange, richTextChangeText, splitIdList, toAddressFormValues, toBoolValue, toContainsValue, toDateValue, toIdsValue, toListValue, toNumberValue, toScaleValue, useAuditShowMore, useBadge, useButton, useDropdownMenu, useInAppNotificationsPanel, useNavbar, useSidebar, valueOfType, videoThumbnailSrc, watchOverlayBodyLock };
|
|
80977
|
+
export { ACTIVITY_CATEGORIES, ACTIVITY_CATEGORY_META, ActionBadge, ActionButtonWithTooltip, ActiveFilterChips, ActivityFeed, AdvancedSearchDrawer, Alert, ApiComboBox, AppSidebar, AuditEntryCard, AuditHistoryPanel, AuditTimeline, AuditTimelineShimmer, Badge, BadgeType, BusinessContactStatusFilter, Button, CUSTOMER_AUDIT_CONFIG, CertificateRowList, ChangePill, Collapsible, CollapsibleCard, CollapsibleContent, CollapsibleTrigger, CompanyCard, ConfirmDialog, ContactTypeFilter, ContainsFilter, CopyButton, CountrySelect, CreateFormPageHeader, CreateFormPageShell, CurrencyDisplayTabs, CurrencyInput, CurrencyToggle, CustomCombobox, CustomFieldInput, CustomFieldValue, CustomTable, CustomizeColumnsDrawer, DATE_PRESET_OPTIONS, DIAMOND_AUDIT_CONFIG, DashboardShell, DataEditableTable, DataTable, DateInput, DateRangeFilter, DetailChip, DetailPageLayout, DetailPageSkeleton, DetailSection, DocumentDeleteDialog, DocumentDetailSkeleton, DocumentHero, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyValue, EntityHeader, FILTER_COUNT_BADGE_CLASS_NAME, Field, FieldSkeleton, FileUploader, FilterCardSkeleton, FilterCellPopover, FilterEmptyState, FilterField, FilterFieldCard, FilterFieldCell, FilterFieldControl, FilterMultiSelect, FilterPanel, FilterSelect, FilterSurface, FilterSurfaceGroup, FilterSurfaceMore, FilterSurfaceSortable, FormSectionCard, FormSectionCardSkeleton, GEM_AUDIT_CONFIG, HistoryEntryCard, HistoryTimeline, HistoryTimelineShimmer, INVOICE_AUDIT_CONFIG, IconButton, IdHyperlinkText, IdListInput, InAppNotificationCard, InAppNotificationsPanel, InfoBanner, InventoryComboBox, InventoryItemCard, InventoryItemRow, InvoiceComboBox, KYCStatusFilter, KeyValueGrid, LAYOUT_AUDIT_CONFIG, LabeledToggle, LineItemsCard, LineProductCell, LineProductThumb, LineProductTypeChip, LineRowActionsMenu, LineTable, LineTableEmpty, MEMO_IN_AUDIT_CONFIG, MEMO_OUT_AUDIT_CONFIG, MediaGallery, MemoInComboBox, MetricCard, MetricRow, MetricTile, Modal, MoreInfoPanel, MoreInfoTrigger, NOT_CAPTURED, Navbar, NavbarActions, NavbarAvatar, NavbarIconButton, NavbarSearch, NavbarTitle, NumberExpressionFilter, NumberInput, NumberRangeInputs, NumberedStepCard, OtpInput, OwnershipFilter, OwnershipSplitCard, PROFORMA_AUDIT_CONFIG, PageHeader, PageTabs, Pagination, PaginationSelect, PartnerShareCard, PickListDropdown, PickListFilter, PriceInput, Protected, PurchaseOrderComboBox, QUOTATION_AUDIT_CONFIG, RadioCardGroup, ReadMoreText, RefreshButton, RichTextarea$1 as RichTextarea, SAVED_SEARCH_NAME_MAX_LENGTH, SEARCHABLE_SELECT_PAGE_SIZE, SafeImage, SaveSearchDialog, SavedSearchChipList, SavedSearchDetail, SavedSearchesMenu, ScaleRangeFilter, ScrollFade, SearchBox, SearchInput, SearchableSelect, SectionCard, SectionIcon, SegmentedControl, ShareDialog, ShareMenu, ShimmerTable, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarHeader, SidebarInset, SidebarMenu, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, SlideOut, SlideOutClose, SlideOutContent, SlideOutDescription, SlideOutHeader, SlideOutOverlay, SlideOutPortal, SlideOutTitle, SlideOutTrigger, Slider, SpecList, Spinner, SquareSkeleton, StateSelect, StatusBadge$1 as StatusBadge, StatusFilter, Stepper, StockTypeFilter, TablePagination, TableRowsSkeleton, TableSkeleton, Tabs, TabsContent, TabsList, TabsTrigger, TagsInput, TextHyperlink, TimePicker, ToggleSwitch, TriStateFilter, TruncateTooltip, TruncatedLabel, WarehouseComboBox, WarehouseFilter, ZoomSplitViewer, asList, asText, badgeVariants, buildBulkShareMessage, buildBulkShareTitle, buildInventoryPublicUrl, buildInventoryRowProps, buildInventoryShareTitle, buildNumberRuleHelp, buildWhatsappUrl, buttonVariants, cn, countries, countryByCode, createVideoMediaItem, describeFilterValue, dropdownMenuItemDestructiveClass, expandScaleRange, fieldTypeIcon, filterSavedSearches, findRegion, flagEmoji, formatAddressLocation, formatDateRange, formatFileSize, formatNumberRange, formatScaleRange, formatSelectedCount, generateActionDescription, generateTitle, getBadgeTypeForStatus, getChangePills, getCountryName, getInitials, getStatesOfCountry, iconButtonVariants, inAppNotificationCardA11y, inAppNotificationsPanelA11y, isBlank, isDuplicateSearchName, isFilterValueActive, isIndiaCountry, isKnownRegion, isPathActive, isValidAlpha2CountryCode, isValidSearchName, isValueEmpty, notify, parseNumberExpression, releaseStaleOverlayBodyLock, renderBadge, resolveCountryCode, resolveDatePreset, resolveDateRange, richTextChangeText, splitIdList, toAddressFormValues, toBoolValue, toContainsValue, toDateValue, toIdsValue, toListValue, toNumberValue, toScaleValue, useAuditShowMore, useBadge, useButton, useDropdownMenu, useInAppNotificationsPanel, useNavbar, useSidebar, valueOfType, videoThumbnailSrc, watchOverlayBodyLock };
|
|
80116
80978
|
//# sourceMappingURL=index.esm.js.map
|