@fairmint/ui 0.2.7 → 0.2.9
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/LoadingSpinner/LoadingSpinner.d.ts.map +1 -1
- package/dist/components/form/USStateField/USStateField.d.ts +16 -0
- package/dist/components/form/USStateField/USStateField.d.ts.map +1 -0
- package/dist/components/generic/PhotoCropModal/PhotoCropModal.d.ts +52 -0
- package/dist/components/generic/PhotoCropModal/PhotoCropModal.d.ts.map +1 -0
- package/dist/components/generic/StatCard/StatCard.d.ts.map +1 -1
- package/dist/components/layout/SideNav/SideNav.d.ts.map +1 -1
- package/dist/components/primitives/Loader/Loader.d.ts +5 -0
- package/dist/components/primitives/Loader/Loader.d.ts.map +1 -0
- package/dist/components/primitives/index.d.ts +1 -0
- package/dist/components/primitives/index.d.ts.map +1 -1
- package/dist/components/specific/InvestorProfileCard/InvestorProfileCard.d.ts +17 -1
- package/dist/components/specific/InvestorProfileCard/InvestorProfileCard.d.ts.map +1 -1
- package/dist/fairmint-ui.cjs +1775 -322
- package/dist/fairmint-ui.cjs.map +1 -1
- package/dist/fairmint-ui.js +1775 -322
- package/dist/fairmint-ui.js.map +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/styles.css +83 -0
- package/dist/theme/index.d.ts +11 -0
- package/dist/theme/index.d.ts.map +1 -1
- package/package.json +6 -2
package/dist/fairmint-ui.js
CHANGED
|
@@ -3,7 +3,7 @@ import * as React from "react";
|
|
|
3
3
|
import React__default, { useRef, useEffect, useMemo, useState, useCallback, useLayoutEffect, useReducer, useSyncExternalStore, isValidElement, cloneElement, Children, Fragment, createContext, useContext, useId as useId$2, forwardRef, createElement, startTransition } from "react";
|
|
4
4
|
import * as ReactDOM from "react-dom";
|
|
5
5
|
import ReactDOM__default, { flushSync, createPortal } from "react-dom";
|
|
6
|
-
function clamp$
|
|
6
|
+
function clamp$4(value, min2, max2) {
|
|
7
7
|
if (min2 === void 0 && max2 === void 0) {
|
|
8
8
|
return value;
|
|
9
9
|
}
|
|
@@ -2733,6 +2733,23 @@ TransitionGroup.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
2733
2733
|
childFactory: PropTypes.func
|
|
2734
2734
|
} : {};
|
|
2735
2735
|
TransitionGroup.defaultProps = defaultProps$_;
|
|
2736
|
+
var extendStatics = function(d, b) {
|
|
2737
|
+
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
2738
|
+
d2.__proto__ = b2;
|
|
2739
|
+
} || function(d2, b2) {
|
|
2740
|
+
for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
|
|
2741
|
+
};
|
|
2742
|
+
return extendStatics(d, b);
|
|
2743
|
+
};
|
|
2744
|
+
function __extends(d, b) {
|
|
2745
|
+
if (typeof b !== "function" && b !== null)
|
|
2746
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
2747
|
+
extendStatics(d, b);
|
|
2748
|
+
function __() {
|
|
2749
|
+
this.constructor = d;
|
|
2750
|
+
}
|
|
2751
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
2752
|
+
}
|
|
2736
2753
|
var __assign = function() {
|
|
2737
2754
|
__assign = Object.assign || function __assign2(t) {
|
|
2738
2755
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -3839,8 +3856,8 @@ function mergeClassNames(objects) {
|
|
|
3839
3856
|
});
|
|
3840
3857
|
return merged;
|
|
3841
3858
|
}
|
|
3842
|
-
function resolveClassNames({ theme: theme2, classNames, props, stylesCtx }) {
|
|
3843
|
-
const arrayClassNames = Array.isArray(
|
|
3859
|
+
function resolveClassNames({ theme: theme2, classNames: classNames2, props, stylesCtx }) {
|
|
3860
|
+
const arrayClassNames = Array.isArray(classNames2) ? classNames2 : [classNames2];
|
|
3844
3861
|
const resolvedClassNames = arrayClassNames.map(
|
|
3845
3862
|
(item) => typeof item === "function" ? item(theme2, props, stylesCtx) : item || EMPTY_CLASS_NAMES
|
|
3846
3863
|
);
|
|
@@ -5150,7 +5167,7 @@ function MantineProvider({
|
|
|
5150
5167
|
}
|
|
5151
5168
|
MantineProvider.displayName = "@mantine/core/MantineProvider";
|
|
5152
5169
|
function useResolvedStylesApi({
|
|
5153
|
-
classNames,
|
|
5170
|
+
classNames: classNames2,
|
|
5154
5171
|
styles,
|
|
5155
5172
|
props,
|
|
5156
5173
|
stylesCtx
|
|
@@ -5159,7 +5176,7 @@ function useResolvedStylesApi({
|
|
|
5159
5176
|
return {
|
|
5160
5177
|
resolvedClassNames: resolveClassNames({
|
|
5161
5178
|
theme: theme2,
|
|
5162
|
-
classNames,
|
|
5179
|
+
classNames: classNames2,
|
|
5163
5180
|
props,
|
|
5164
5181
|
stylesCtx: stylesCtx || void 0
|
|
5165
5182
|
}),
|
|
@@ -5200,10 +5217,10 @@ function getResolvedClassNames({
|
|
|
5200
5217
|
selector,
|
|
5201
5218
|
stylesCtx,
|
|
5202
5219
|
theme: theme2,
|
|
5203
|
-
classNames,
|
|
5220
|
+
classNames: classNames2,
|
|
5204
5221
|
props
|
|
5205
5222
|
}) {
|
|
5206
|
-
return resolveClassNames({ theme: theme2, classNames, props, stylesCtx })[selector];
|
|
5223
|
+
return resolveClassNames({ theme: theme2, classNames: classNames2, props, stylesCtx })[selector];
|
|
5207
5224
|
}
|
|
5208
5225
|
function getRootClassName({ rootSelector, selector, className }) {
|
|
5209
5226
|
return rootSelector === selector ? className : void 0;
|
|
@@ -5252,7 +5269,7 @@ function getClassName({
|
|
|
5252
5269
|
themeName,
|
|
5253
5270
|
selector,
|
|
5254
5271
|
classNamesPrefix,
|
|
5255
|
-
classNames,
|
|
5272
|
+
classNames: classNames2,
|
|
5256
5273
|
classes: classes2,
|
|
5257
5274
|
unstyled,
|
|
5258
5275
|
className,
|
|
@@ -5267,7 +5284,7 @@ function getClassName({
|
|
|
5267
5284
|
getGlobalClassNames({ theme: theme2, options, unstyled: unstyled || headless }),
|
|
5268
5285
|
getThemeClassNames({ theme: theme2, themeName, selector, props, stylesCtx }),
|
|
5269
5286
|
getVariantClassName({ options, classes: classes2, selector, unstyled }),
|
|
5270
|
-
getResolvedClassNames({ selector, stylesCtx, theme: theme2, classNames, props }),
|
|
5287
|
+
getResolvedClassNames({ selector, stylesCtx, theme: theme2, classNames: classNames2, props }),
|
|
5271
5288
|
getResolvedClassNames({ selector, stylesCtx, theme: theme2, classNames: transformedStyles, props }),
|
|
5272
5289
|
getOptionsClassNames({ selector, stylesCtx, options, props, theme: theme2 }),
|
|
5273
5290
|
getRootClassName({ rootSelector, selector, className }),
|
|
@@ -5393,7 +5410,7 @@ function useStyles({
|
|
|
5393
5410
|
style,
|
|
5394
5411
|
rootSelector = "root",
|
|
5395
5412
|
unstyled,
|
|
5396
|
-
classNames,
|
|
5413
|
+
classNames: classNames2,
|
|
5397
5414
|
styles,
|
|
5398
5415
|
vars,
|
|
5399
5416
|
varsResolver: varsResolver2,
|
|
@@ -5416,7 +5433,7 @@ function useStyles({
|
|
|
5416
5433
|
themeName,
|
|
5417
5434
|
selector,
|
|
5418
5435
|
classNamesPrefix,
|
|
5419
|
-
classNames,
|
|
5436
|
+
classNames: classNames2,
|
|
5420
5437
|
classes: classes2,
|
|
5421
5438
|
unstyled,
|
|
5422
5439
|
className,
|
|
@@ -6354,7 +6371,7 @@ const oppositeSideMap = {
|
|
|
6354
6371
|
bottom: "top",
|
|
6355
6372
|
top: "bottom"
|
|
6356
6373
|
};
|
|
6357
|
-
function clamp$
|
|
6374
|
+
function clamp$3(start, value, end) {
|
|
6358
6375
|
return max(start, min(value, end));
|
|
6359
6376
|
}
|
|
6360
6377
|
function evaluate(value, param) {
|
|
@@ -6860,7 +6877,7 @@ const arrow$3 = (options) => ({
|
|
|
6860
6877
|
const min$1 = minPadding;
|
|
6861
6878
|
const max2 = clientSize - arrowDimensions[length] - maxPadding;
|
|
6862
6879
|
const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
|
|
6863
|
-
const offset2 = clamp$
|
|
6880
|
+
const offset2 = clamp$3(min$1, center, max2);
|
|
6864
6881
|
const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset2 && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
|
|
6865
6882
|
const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max2 : 0;
|
|
6866
6883
|
return {
|
|
@@ -7277,14 +7294,14 @@ const shift$2 = function(options) {
|
|
|
7277
7294
|
const maxSide = mainAxis === "y" ? "bottom" : "right";
|
|
7278
7295
|
const min2 = mainAxisCoord + overflow[minSide];
|
|
7279
7296
|
const max2 = mainAxisCoord - overflow[maxSide];
|
|
7280
|
-
mainAxisCoord = clamp$
|
|
7297
|
+
mainAxisCoord = clamp$3(min2, mainAxisCoord, max2);
|
|
7281
7298
|
}
|
|
7282
7299
|
if (checkCrossAxis) {
|
|
7283
7300
|
const minSide = crossAxis === "y" ? "top" : "left";
|
|
7284
7301
|
const maxSide = crossAxis === "y" ? "bottom" : "right";
|
|
7285
7302
|
const min2 = crossAxisCoord + overflow[minSide];
|
|
7286
7303
|
const max2 = crossAxisCoord - overflow[maxSide];
|
|
7287
|
-
crossAxisCoord = clamp$
|
|
7304
|
+
crossAxisCoord = clamp$3(min2, crossAxisCoord, max2);
|
|
7288
7305
|
}
|
|
7289
7306
|
const limitedCoords = limiter.fn({
|
|
7290
7307
|
...state,
|
|
@@ -9751,7 +9768,7 @@ function linearScale(input, output) {
|
|
|
9751
9768
|
return output[0] + ratio * (value - input[0]);
|
|
9752
9769
|
};
|
|
9753
9770
|
}
|
|
9754
|
-
function clamp$
|
|
9771
|
+
function clamp$2(value, [min2, max2]) {
|
|
9755
9772
|
return Math.min(max2, Math.max(min2, value));
|
|
9756
9773
|
}
|
|
9757
9774
|
function getThumbOffsetFromScroll(scrollPos, sizes2, dir = "ltr") {
|
|
@@ -9761,7 +9778,7 @@ function getThumbOffsetFromScroll(scrollPos, sizes2, dir = "ltr") {
|
|
|
9761
9778
|
const maxScrollPos = sizes2.content - sizes2.viewport;
|
|
9762
9779
|
const maxThumbPos = scrollbar - thumbSizePx;
|
|
9763
9780
|
const scrollClampRange = dir === "ltr" ? [0, maxScrollPos] : [maxScrollPos * -1, 0];
|
|
9764
|
-
const scrollWithoutMomentum = clamp$
|
|
9781
|
+
const scrollWithoutMomentum = clamp$2(scrollPos, scrollClampRange);
|
|
9765
9782
|
const interpolate = linearScale([0, maxScrollPos], [0, maxThumbPos]);
|
|
9766
9783
|
return interpolate(scrollWithoutMomentum);
|
|
9767
9784
|
}
|
|
@@ -10349,7 +10366,7 @@ const varsResolver$T = createVarsResolver(
|
|
|
10349
10366
|
const ScrollArea = factory((_props, ref) => {
|
|
10350
10367
|
const props = useProps("ScrollArea", defaultProps$X, _props);
|
|
10351
10368
|
const {
|
|
10352
|
-
classNames,
|
|
10369
|
+
classNames: classNames2,
|
|
10353
10370
|
className,
|
|
10354
10371
|
style,
|
|
10355
10372
|
styles,
|
|
@@ -10379,7 +10396,7 @@ const ScrollArea = factory((_props, ref) => {
|
|
|
10379
10396
|
classes: classes$Q,
|
|
10380
10397
|
className,
|
|
10381
10398
|
style,
|
|
10382
|
-
classNames,
|
|
10399
|
+
classNames: classNames2,
|
|
10383
10400
|
styles,
|
|
10384
10401
|
unstyled,
|
|
10385
10402
|
attributes,
|
|
@@ -10479,7 +10496,7 @@ ScrollArea.displayName = "@mantine/core/ScrollArea";
|
|
|
10479
10496
|
const ScrollAreaAutosize = factory((props, ref) => {
|
|
10480
10497
|
const {
|
|
10481
10498
|
children,
|
|
10482
|
-
classNames,
|
|
10499
|
+
classNames: classNames2,
|
|
10483
10500
|
styles,
|
|
10484
10501
|
scrollbarSize,
|
|
10485
10502
|
scrollHideDelay,
|
|
@@ -10547,7 +10564,7 @@ const ScrollAreaAutosize = factory((props, ref) => {
|
|
|
10547
10564
|
children: /* @__PURE__ */ jsx(
|
|
10548
10565
|
ScrollArea,
|
|
10549
10566
|
{
|
|
10550
|
-
classNames,
|
|
10567
|
+
classNames: classNames2,
|
|
10551
10568
|
styles,
|
|
10552
10569
|
scrollHideDelay,
|
|
10553
10570
|
scrollbarSize,
|
|
@@ -10587,7 +10604,7 @@ const UnstyledButton = polymorphicFactory(
|
|
|
10587
10604
|
component = "button",
|
|
10588
10605
|
__staticSelector,
|
|
10589
10606
|
unstyled,
|
|
10590
|
-
classNames,
|
|
10607
|
+
classNames: classNames2,
|
|
10591
10608
|
styles,
|
|
10592
10609
|
style,
|
|
10593
10610
|
attributes,
|
|
@@ -10599,7 +10616,7 @@ const UnstyledButton = polymorphicFactory(
|
|
|
10599
10616
|
classes: classes$P,
|
|
10600
10617
|
className,
|
|
10601
10618
|
style,
|
|
10602
|
-
classNames,
|
|
10619
|
+
classNames: classNames2,
|
|
10603
10620
|
styles,
|
|
10604
10621
|
unstyled,
|
|
10605
10622
|
attributes
|
|
@@ -10621,14 +10638,14 @@ UnstyledButton.displayName = "@mantine/core/UnstyledButton";
|
|
|
10621
10638
|
var classes$O = { "root": "m_515a97f8" };
|
|
10622
10639
|
const VisuallyHidden = factory((_props, ref) => {
|
|
10623
10640
|
const props = useProps("VisuallyHidden", null, _props);
|
|
10624
|
-
const { classNames, className, style, styles, unstyled, vars, attributes, ...others } = props;
|
|
10641
|
+
const { classNames: classNames2, className, style, styles, unstyled, vars, attributes, ...others } = props;
|
|
10625
10642
|
const getStyles2 = useStyles({
|
|
10626
10643
|
name: "VisuallyHidden",
|
|
10627
10644
|
classes: classes$O,
|
|
10628
10645
|
props,
|
|
10629
10646
|
className,
|
|
10630
10647
|
style,
|
|
10631
|
-
classNames,
|
|
10648
|
+
classNames: classNames2,
|
|
10632
10649
|
styles,
|
|
10633
10650
|
unstyled,
|
|
10634
10651
|
attributes
|
|
@@ -10647,7 +10664,7 @@ const varsResolver$S = createVarsResolver((_, { radius, shadow }) => ({
|
|
|
10647
10664
|
const Paper = polymorphicFactory((_props, ref) => {
|
|
10648
10665
|
const props = useProps("Paper", null, _props);
|
|
10649
10666
|
const {
|
|
10650
|
-
classNames,
|
|
10667
|
+
classNames: classNames2,
|
|
10651
10668
|
className,
|
|
10652
10669
|
style,
|
|
10653
10670
|
styles,
|
|
@@ -10667,7 +10684,7 @@ const Paper = polymorphicFactory((_props, ref) => {
|
|
|
10667
10684
|
classes: classes$N,
|
|
10668
10685
|
className,
|
|
10669
10686
|
style,
|
|
10670
|
-
classNames,
|
|
10687
|
+
classNames: classNames2,
|
|
10671
10688
|
styles,
|
|
10672
10689
|
unstyled,
|
|
10673
10690
|
attributes,
|
|
@@ -10843,7 +10860,7 @@ const varsResolver$R = createVarsResolver(
|
|
|
10843
10860
|
const Overlay = polymorphicFactory((_props, ref) => {
|
|
10844
10861
|
const props = useProps("Overlay", defaultProps$V, _props);
|
|
10845
10862
|
const {
|
|
10846
|
-
classNames,
|
|
10863
|
+
classNames: classNames2,
|
|
10847
10864
|
className,
|
|
10848
10865
|
style,
|
|
10849
10866
|
styles,
|
|
@@ -10868,7 +10885,7 @@ const Overlay = polymorphicFactory((_props, ref) => {
|
|
|
10868
10885
|
classes: classes$M,
|
|
10869
10886
|
className,
|
|
10870
10887
|
style,
|
|
10871
|
-
classNames,
|
|
10888
|
+
classNames: classNames2,
|
|
10872
10889
|
styles,
|
|
10873
10890
|
unstyled,
|
|
10874
10891
|
attributes,
|
|
@@ -11251,7 +11268,7 @@ const PopoverDropdown = factory((_props, ref) => {
|
|
|
11251
11268
|
children,
|
|
11252
11269
|
onKeyDownCapture,
|
|
11253
11270
|
variant,
|
|
11254
|
-
classNames,
|
|
11271
|
+
classNames: classNames2,
|
|
11255
11272
|
styles,
|
|
11256
11273
|
...others
|
|
11257
11274
|
} = props;
|
|
@@ -11301,7 +11318,7 @@ const PopoverDropdown = factory((_props, ref) => {
|
|
|
11301
11318
|
...ctx.getStyles("dropdown", {
|
|
11302
11319
|
className,
|
|
11303
11320
|
props,
|
|
11304
|
-
classNames,
|
|
11321
|
+
classNames: classNames2,
|
|
11305
11322
|
styles,
|
|
11306
11323
|
style: [
|
|
11307
11324
|
{
|
|
@@ -11333,7 +11350,7 @@ const PopoverDropdown = factory((_props, ref) => {
|
|
|
11333
11350
|
arrowPosition: ctx.arrowPosition,
|
|
11334
11351
|
...ctx.getStyles("arrow", {
|
|
11335
11352
|
props,
|
|
11336
|
-
classNames,
|
|
11353
|
+
classNames: classNames2,
|
|
11337
11354
|
styles
|
|
11338
11355
|
})
|
|
11339
11356
|
}
|
|
@@ -11571,7 +11588,7 @@ function Popover(_props) {
|
|
|
11571
11588
|
arrowRadius,
|
|
11572
11589
|
arrowPosition,
|
|
11573
11590
|
unstyled,
|
|
11574
|
-
classNames,
|
|
11591
|
+
classNames: classNames2,
|
|
11575
11592
|
styles,
|
|
11576
11593
|
closeOnClickOutside,
|
|
11577
11594
|
withinPortal,
|
|
@@ -11607,7 +11624,7 @@ function Popover(_props) {
|
|
|
11607
11624
|
name: __staticSelector,
|
|
11608
11625
|
props,
|
|
11609
11626
|
classes: classes$L,
|
|
11610
|
-
classNames,
|
|
11627
|
+
classNames: classNames2,
|
|
11611
11628
|
styles,
|
|
11612
11629
|
unstyled,
|
|
11613
11630
|
attributes,
|
|
@@ -11615,7 +11632,7 @@ function Popover(_props) {
|
|
|
11615
11632
|
vars,
|
|
11616
11633
|
varsResolver: varsResolver$Q
|
|
11617
11634
|
});
|
|
11618
|
-
const { resolvedStyles } = useResolvedStylesApi({ classNames, styles, props });
|
|
11635
|
+
const { resolvedStyles } = useResolvedStylesApi({ classNames: classNames2, styles, props });
|
|
11619
11636
|
const [dropdownVisible, setDropdownVisible] = useState(opened ?? defaultOpened ?? false);
|
|
11620
11637
|
const positionRef = useRef(position);
|
|
11621
11638
|
const arrowRef = useRef(null);
|
|
@@ -11721,7 +11738,7 @@ function Popover(_props) {
|
|
|
11721
11738
|
withRoles,
|
|
11722
11739
|
targetProps: others,
|
|
11723
11740
|
__staticSelector,
|
|
11724
|
-
classNames,
|
|
11741
|
+
classNames: classNames2,
|
|
11725
11742
|
styles,
|
|
11726
11743
|
unstyled,
|
|
11727
11744
|
variant,
|
|
@@ -11790,7 +11807,7 @@ const varsResolver$P = createVarsResolver((theme2, { size: size2, color }) => ({
|
|
|
11790
11807
|
"--loader-color": color ? getThemeColor(color, theme2) : void 0
|
|
11791
11808
|
}
|
|
11792
11809
|
}));
|
|
11793
|
-
const Loader = factory((_props, ref) => {
|
|
11810
|
+
const Loader$1 = factory((_props, ref) => {
|
|
11794
11811
|
const props = useProps("Loader", defaultProps$R, _props);
|
|
11795
11812
|
const {
|
|
11796
11813
|
size: size2,
|
|
@@ -11799,7 +11816,7 @@ const Loader = factory((_props, ref) => {
|
|
|
11799
11816
|
vars,
|
|
11800
11817
|
className,
|
|
11801
11818
|
style,
|
|
11802
|
-
classNames,
|
|
11819
|
+
classNames: classNames2,
|
|
11803
11820
|
styles,
|
|
11804
11821
|
unstyled,
|
|
11805
11822
|
loaders,
|
|
@@ -11814,7 +11831,7 @@ const Loader = factory((_props, ref) => {
|
|
|
11814
11831
|
classes: classes$K,
|
|
11815
11832
|
className,
|
|
11816
11833
|
style,
|
|
11817
|
-
classNames,
|
|
11834
|
+
classNames: classNames2,
|
|
11818
11835
|
styles,
|
|
11819
11836
|
unstyled,
|
|
11820
11837
|
attributes,
|
|
@@ -11836,9 +11853,9 @@ const Loader = factory((_props, ref) => {
|
|
|
11836
11853
|
}
|
|
11837
11854
|
);
|
|
11838
11855
|
});
|
|
11839
|
-
Loader.defaultLoaders = defaultLoaders;
|
|
11840
|
-
Loader.classes = classes$K;
|
|
11841
|
-
Loader.displayName = "@mantine/core/Loader";
|
|
11856
|
+
Loader$1.defaultLoaders = defaultLoaders;
|
|
11857
|
+
Loader$1.classes = classes$K;
|
|
11858
|
+
Loader$1.displayName = "@mantine/core/Loader";
|
|
11842
11859
|
var classes$J = { "root": "m_8d3f4000", "icon": "m_8d3afb97", "loader": "m_302b9fb1", "group": "m_1a0f1b21", "groupSection": "m_437b6484" };
|
|
11843
11860
|
const defaultProps$Q = {
|
|
11844
11861
|
orientation: "horizontal"
|
|
@@ -11851,7 +11868,7 @@ const ActionIconGroup = factory((_props, ref) => {
|
|
|
11851
11868
|
const {
|
|
11852
11869
|
className,
|
|
11853
11870
|
style,
|
|
11854
|
-
classNames,
|
|
11871
|
+
classNames: classNames2,
|
|
11855
11872
|
styles,
|
|
11856
11873
|
unstyled,
|
|
11857
11874
|
orientation,
|
|
@@ -11868,7 +11885,7 @@ const ActionIconGroup = factory((_props, ref) => {
|
|
|
11868
11885
|
classes: classes$J,
|
|
11869
11886
|
className,
|
|
11870
11887
|
style,
|
|
11871
|
-
classNames,
|
|
11888
|
+
classNames: classNames2,
|
|
11872
11889
|
styles,
|
|
11873
11890
|
unstyled,
|
|
11874
11891
|
attributes,
|
|
@@ -11917,7 +11934,7 @@ const ActionIconGroupSection = factory((_props, ref) => {
|
|
|
11917
11934
|
const {
|
|
11918
11935
|
className,
|
|
11919
11936
|
style,
|
|
11920
|
-
classNames,
|
|
11937
|
+
classNames: classNames2,
|
|
11921
11938
|
styles,
|
|
11922
11939
|
unstyled,
|
|
11923
11940
|
vars,
|
|
@@ -11934,7 +11951,7 @@ const ActionIconGroupSection = factory((_props, ref) => {
|
|
|
11934
11951
|
classes: classes$J,
|
|
11935
11952
|
className,
|
|
11936
11953
|
style,
|
|
11937
|
-
classNames,
|
|
11954
|
+
classNames: classNames2,
|
|
11938
11955
|
styles,
|
|
11939
11956
|
unstyled,
|
|
11940
11957
|
attributes,
|
|
@@ -11974,7 +11991,7 @@ const ActionIcon$1 = polymorphicFactory((_props, ref) => {
|
|
|
11974
11991
|
className,
|
|
11975
11992
|
unstyled,
|
|
11976
11993
|
variant,
|
|
11977
|
-
classNames,
|
|
11994
|
+
classNames: classNames2,
|
|
11978
11995
|
styles,
|
|
11979
11996
|
style,
|
|
11980
11997
|
loading,
|
|
@@ -11999,7 +12016,7 @@ const ActionIcon$1 = polymorphicFactory((_props, ref) => {
|
|
|
11999
12016
|
className,
|
|
12000
12017
|
style,
|
|
12001
12018
|
classes: classes$J,
|
|
12002
|
-
classNames,
|
|
12019
|
+
classNames: classNames2,
|
|
12003
12020
|
styles,
|
|
12004
12021
|
unstyled,
|
|
12005
12022
|
attributes,
|
|
@@ -12018,7 +12035,7 @@ const ActionIcon$1 = polymorphicFactory((_props, ref) => {
|
|
|
12018
12035
|
ref,
|
|
12019
12036
|
mod: [{ loading, disabled: disabled || dataDisabled }, mod],
|
|
12020
12037
|
children: [
|
|
12021
|
-
typeof loading === "boolean" && /* @__PURE__ */ jsx(Transition$1, { mounted: loading, transition: "slide-down", duration: 150, children: (transitionStyles) => /* @__PURE__ */ jsx(Box, { component: "span", ...getStyles2("loader", { style: transitionStyles }), "aria-hidden": true, children: /* @__PURE__ */ jsx(Loader, { color: "var(--ai-color)", size: "calc(var(--ai-size) * 0.55)", ...loaderProps }) }) }),
|
|
12038
|
+
typeof loading === "boolean" && /* @__PURE__ */ jsx(Transition$1, { mounted: loading, transition: "slide-down", duration: 150, children: (transitionStyles) => /* @__PURE__ */ jsx(Box, { component: "span", ...getStyles2("loader", { style: transitionStyles }), "aria-hidden": true, children: /* @__PURE__ */ jsx(Loader$1, { color: "var(--ai-color)", size: "calc(var(--ai-size) * 0.55)", ...loaderProps }) }) }),
|
|
12022
12039
|
/* @__PURE__ */ jsx(Box, { component: "span", mod: { loading }, ...getStyles2("icon"), children })
|
|
12023
12040
|
]
|
|
12024
12041
|
}
|
|
@@ -12070,7 +12087,7 @@ const CloseButton = polymorphicFactory((_props, ref) => {
|
|
|
12070
12087
|
vars,
|
|
12071
12088
|
radius,
|
|
12072
12089
|
className,
|
|
12073
|
-
classNames,
|
|
12090
|
+
classNames: classNames2,
|
|
12074
12091
|
style,
|
|
12075
12092
|
styles,
|
|
12076
12093
|
unstyled,
|
|
@@ -12089,7 +12106,7 @@ const CloseButton = polymorphicFactory((_props, ref) => {
|
|
|
12089
12106
|
className,
|
|
12090
12107
|
style,
|
|
12091
12108
|
classes: classes$I,
|
|
12092
|
-
classNames,
|
|
12109
|
+
classNames: classNames2,
|
|
12093
12110
|
styles,
|
|
12094
12111
|
unstyled,
|
|
12095
12112
|
attributes,
|
|
@@ -12140,7 +12157,7 @@ const varsResolver$K = createVarsResolver(
|
|
|
12140
12157
|
const Group = factory((_props, ref) => {
|
|
12141
12158
|
const props = useProps("Group", defaultProps$O, _props);
|
|
12142
12159
|
const {
|
|
12143
|
-
classNames,
|
|
12160
|
+
classNames: classNames2,
|
|
12144
12161
|
className,
|
|
12145
12162
|
style,
|
|
12146
12163
|
styles,
|
|
@@ -12171,7 +12188,7 @@ const Group = factory((_props, ref) => {
|
|
|
12171
12188
|
className,
|
|
12172
12189
|
style,
|
|
12173
12190
|
classes: classes$H,
|
|
12174
|
-
classNames,
|
|
12191
|
+
classNames: classNames2,
|
|
12175
12192
|
styles,
|
|
12176
12193
|
unstyled,
|
|
12177
12194
|
attributes,
|
|
@@ -12501,10 +12518,10 @@ const [InputContext, useInputContext] = createOptionalContext({
|
|
|
12501
12518
|
var classes$F = { "wrapper": "m_6c018570", "input": "m_8fb7ebe7", "section": "m_82577fc2", "placeholder": "m_88bacfd0", "root": "m_46b77525", "label": "m_8fdc1311", "required": "m_78a94662", "error": "m_8f816625", "description": "m_fe47ce59" };
|
|
12502
12519
|
const InputClearButton = factory((_props, ref) => {
|
|
12503
12520
|
const props = useProps("InputClearButton", null, _props);
|
|
12504
|
-
const { size: size2, variant, vars, classNames, styles, ...others } = props;
|
|
12521
|
+
const { size: size2, variant, vars, classNames: classNames2, styles, ...others } = props;
|
|
12505
12522
|
const ctx = useInputContext();
|
|
12506
12523
|
const { resolvedClassNames, resolvedStyles } = useResolvedStylesApi({
|
|
12507
|
-
classNames,
|
|
12524
|
+
classNames: classNames2,
|
|
12508
12525
|
styles,
|
|
12509
12526
|
props
|
|
12510
12527
|
});
|
|
@@ -12574,7 +12591,7 @@ const varsResolver$J = createVarsResolver((_, { size: size2 }) => ({
|
|
|
12574
12591
|
const InputDescription = factory((_props, ref) => {
|
|
12575
12592
|
const props = useProps("InputDescription", null, _props);
|
|
12576
12593
|
const {
|
|
12577
|
-
classNames,
|
|
12594
|
+
classNames: classNames2,
|
|
12578
12595
|
className,
|
|
12579
12596
|
style,
|
|
12580
12597
|
styles,
|
|
@@ -12594,7 +12611,7 @@ const InputDescription = factory((_props, ref) => {
|
|
|
12594
12611
|
classes: classes$F,
|
|
12595
12612
|
className,
|
|
12596
12613
|
style,
|
|
12597
|
-
classNames,
|
|
12614
|
+
classNames: classNames2,
|
|
12598
12615
|
styles,
|
|
12599
12616
|
unstyled,
|
|
12600
12617
|
attributes,
|
|
@@ -12625,7 +12642,7 @@ const varsResolver$I = createVarsResolver((_, { size: size2 }) => ({
|
|
|
12625
12642
|
const InputError = factory((_props, ref) => {
|
|
12626
12643
|
const props = useProps("InputError", null, _props);
|
|
12627
12644
|
const {
|
|
12628
|
-
classNames,
|
|
12645
|
+
classNames: classNames2,
|
|
12629
12646
|
className,
|
|
12630
12647
|
style,
|
|
12631
12648
|
styles,
|
|
@@ -12644,7 +12661,7 @@ const InputError = factory((_props, ref) => {
|
|
|
12644
12661
|
classes: classes$F,
|
|
12645
12662
|
className,
|
|
12646
12663
|
style,
|
|
12647
|
-
classNames,
|
|
12664
|
+
classNames: classNames2,
|
|
12648
12665
|
styles,
|
|
12649
12666
|
unstyled,
|
|
12650
12667
|
attributes,
|
|
@@ -12680,7 +12697,7 @@ const varsResolver$H = createVarsResolver((_, { size: size2 }) => ({
|
|
|
12680
12697
|
const InputLabel = factory((_props, ref) => {
|
|
12681
12698
|
const props = useProps("InputLabel", defaultProps$N, _props);
|
|
12682
12699
|
const {
|
|
12683
|
-
classNames,
|
|
12700
|
+
classNames: classNames2,
|
|
12684
12701
|
className,
|
|
12685
12702
|
style,
|
|
12686
12703
|
styles,
|
|
@@ -12704,7 +12721,7 @@ const InputLabel = factory((_props, ref) => {
|
|
|
12704
12721
|
classes: classes$F,
|
|
12705
12722
|
className,
|
|
12706
12723
|
style,
|
|
12707
|
-
classNames,
|
|
12724
|
+
classNames: classNames2,
|
|
12708
12725
|
styles,
|
|
12709
12726
|
unstyled,
|
|
12710
12727
|
attributes,
|
|
@@ -12743,7 +12760,7 @@ InputLabel.displayName = "@mantine/core/InputLabel";
|
|
|
12743
12760
|
const InputPlaceholder = factory((_props, ref) => {
|
|
12744
12761
|
const props = useProps("InputPlaceholder", null, _props);
|
|
12745
12762
|
const {
|
|
12746
|
-
classNames,
|
|
12763
|
+
classNames: classNames2,
|
|
12747
12764
|
className,
|
|
12748
12765
|
style,
|
|
12749
12766
|
styles,
|
|
@@ -12762,7 +12779,7 @@ const InputPlaceholder = factory((_props, ref) => {
|
|
|
12762
12779
|
classes: classes$F,
|
|
12763
12780
|
className,
|
|
12764
12781
|
style,
|
|
12765
|
-
classNames,
|
|
12782
|
+
classNames: classNames2,
|
|
12766
12783
|
styles,
|
|
12767
12784
|
unstyled,
|
|
12768
12785
|
attributes,
|
|
@@ -12810,7 +12827,7 @@ const varsResolver$G = createVarsResolver((_, { size: size2 }) => ({
|
|
|
12810
12827
|
const InputWrapper = factory((_props, ref) => {
|
|
12811
12828
|
const props = useProps("InputWrapper", defaultProps$M, _props);
|
|
12812
12829
|
const {
|
|
12813
|
-
classNames,
|
|
12830
|
+
classNames: classNames2,
|
|
12814
12831
|
className,
|
|
12815
12832
|
style,
|
|
12816
12833
|
styles,
|
|
@@ -12843,7 +12860,7 @@ const InputWrapper = factory((_props, ref) => {
|
|
|
12843
12860
|
classes: classes$F,
|
|
12844
12861
|
className,
|
|
12845
12862
|
style,
|
|
12846
|
-
classNames,
|
|
12863
|
+
classNames: classNames2,
|
|
12847
12864
|
styles,
|
|
12848
12865
|
unstyled,
|
|
12849
12866
|
attributes,
|
|
@@ -12967,7 +12984,7 @@ const varsResolver$F = createVarsResolver((_, props, ctx) => ({
|
|
|
12967
12984
|
const Input = polymorphicFactory((_props, ref) => {
|
|
12968
12985
|
const props = useProps("Input", defaultProps$L, _props);
|
|
12969
12986
|
const {
|
|
12970
|
-
classNames,
|
|
12987
|
+
classNames: classNames2,
|
|
12971
12988
|
className,
|
|
12972
12989
|
style,
|
|
12973
12990
|
styles,
|
|
@@ -13012,7 +13029,7 @@ const Input = polymorphicFactory((_props, ref) => {
|
|
|
13012
13029
|
classes: classes$F,
|
|
13013
13030
|
className,
|
|
13014
13031
|
style,
|
|
13015
|
-
classNames,
|
|
13032
|
+
classNames: classNames2,
|
|
13016
13033
|
styles,
|
|
13017
13034
|
unstyled,
|
|
13018
13035
|
attributes,
|
|
@@ -13112,7 +13129,7 @@ function useInputProps(component, defaultProps2, _props) {
|
|
|
13112
13129
|
description,
|
|
13113
13130
|
error: error2,
|
|
13114
13131
|
required,
|
|
13115
|
-
classNames,
|
|
13132
|
+
classNames: classNames2,
|
|
13116
13133
|
styles,
|
|
13117
13134
|
className,
|
|
13118
13135
|
unstyled,
|
|
@@ -13140,7 +13157,7 @@ function useInputProps(component, defaultProps2, _props) {
|
|
|
13140
13157
|
description,
|
|
13141
13158
|
error: error2,
|
|
13142
13159
|
required,
|
|
13143
|
-
classNames,
|
|
13160
|
+
classNames: classNames2,
|
|
13144
13161
|
className,
|
|
13145
13162
|
__staticSelector,
|
|
13146
13163
|
__stylesApiProps: __stylesApiProps || props,
|
|
@@ -13162,13 +13179,13 @@ function useInputProps(component, defaultProps2, _props) {
|
|
|
13162
13179
|
};
|
|
13163
13180
|
return {
|
|
13164
13181
|
...rest,
|
|
13165
|
-
classNames,
|
|
13182
|
+
classNames: classNames2,
|
|
13166
13183
|
styles,
|
|
13167
13184
|
unstyled,
|
|
13168
13185
|
wrapperProps: { ...wrapperProps, ...styleProps },
|
|
13169
13186
|
inputProps: {
|
|
13170
13187
|
required,
|
|
13171
|
-
classNames,
|
|
13188
|
+
classNames: classNames2,
|
|
13172
13189
|
styles,
|
|
13173
13190
|
unstyled,
|
|
13174
13191
|
size: size2,
|
|
@@ -13205,7 +13222,7 @@ var classes$E = { "root": "m_8bffd616" };
|
|
|
13205
13222
|
const Flex = polymorphicFactory((_props, ref) => {
|
|
13206
13223
|
const props = useProps("Flex", null, _props);
|
|
13207
13224
|
const {
|
|
13208
|
-
classNames,
|
|
13225
|
+
classNames: classNames2,
|
|
13209
13226
|
className,
|
|
13210
13227
|
style,
|
|
13211
13228
|
styles,
|
|
@@ -13227,7 +13244,7 @@ const Flex = polymorphicFactory((_props, ref) => {
|
|
|
13227
13244
|
props,
|
|
13228
13245
|
className,
|
|
13229
13246
|
style,
|
|
13230
|
-
classNames,
|
|
13247
|
+
classNames: classNames2,
|
|
13231
13248
|
styles,
|
|
13232
13249
|
unstyled,
|
|
13233
13250
|
attributes,
|
|
@@ -13386,7 +13403,7 @@ const varsResolver$E = createVarsResolver(
|
|
|
13386
13403
|
const FloatingIndicator = factory((_props, ref) => {
|
|
13387
13404
|
const props = useProps("FloatingIndicator", null, _props);
|
|
13388
13405
|
const {
|
|
13389
|
-
classNames,
|
|
13406
|
+
classNames: classNames2,
|
|
13390
13407
|
className,
|
|
13391
13408
|
style,
|
|
13392
13409
|
styles,
|
|
@@ -13406,7 +13423,7 @@ const FloatingIndicator = factory((_props, ref) => {
|
|
|
13406
13423
|
props,
|
|
13407
13424
|
className,
|
|
13408
13425
|
style,
|
|
13409
|
-
classNames,
|
|
13426
|
+
classNames: classNames2,
|
|
13410
13427
|
styles,
|
|
13411
13428
|
unstyled,
|
|
13412
13429
|
attributes,
|
|
@@ -13498,7 +13515,7 @@ const varsResolver$D = createVarsResolver(
|
|
|
13498
13515
|
const Alert$1 = factory((_props, ref) => {
|
|
13499
13516
|
const props = useProps("Alert", null, _props);
|
|
13500
13517
|
const {
|
|
13501
|
-
classNames,
|
|
13518
|
+
classNames: classNames2,
|
|
13502
13519
|
className,
|
|
13503
13520
|
style,
|
|
13504
13521
|
styles,
|
|
@@ -13525,7 +13542,7 @@ const Alert$1 = factory((_props, ref) => {
|
|
|
13525
13542
|
props,
|
|
13526
13543
|
className,
|
|
13527
13544
|
style,
|
|
13528
|
-
classNames,
|
|
13545
|
+
classNames: classNames2,
|
|
13529
13546
|
styles,
|
|
13530
13547
|
unstyled,
|
|
13531
13548
|
attributes,
|
|
@@ -13609,7 +13626,7 @@ const Text = polymorphicFactory((_props, ref) => {
|
|
|
13609
13626
|
vars,
|
|
13610
13627
|
className,
|
|
13611
13628
|
style,
|
|
13612
|
-
classNames,
|
|
13629
|
+
classNames: classNames2,
|
|
13613
13630
|
styles,
|
|
13614
13631
|
unstyled,
|
|
13615
13632
|
variant,
|
|
@@ -13624,7 +13641,7 @@ const Text = polymorphicFactory((_props, ref) => {
|
|
|
13624
13641
|
classes: classes$B,
|
|
13625
13642
|
className,
|
|
13626
13643
|
style,
|
|
13627
|
-
classNames,
|
|
13644
|
+
classNames: classNames2,
|
|
13628
13645
|
styles,
|
|
13629
13646
|
unstyled,
|
|
13630
13647
|
attributes,
|
|
@@ -13685,7 +13702,7 @@ const [AppShellProvider, useAppShellContext] = createSafeContext(
|
|
|
13685
13702
|
var classes$z = { "root": "m_89ab340", "navbar": "m_45252eee", "aside": "m_9cdde9a", "header": "m_3b16f56b", "main": "m_8983817", "footer": "m_3840c879", "section": "m_6dcfc7c7" };
|
|
13686
13703
|
const AppShellAside = factory((_props, ref) => {
|
|
13687
13704
|
const {
|
|
13688
|
-
classNames,
|
|
13705
|
+
classNames: classNames2,
|
|
13689
13706
|
className,
|
|
13690
13707
|
style,
|
|
13691
13708
|
styles,
|
|
@@ -13708,7 +13725,7 @@ const AppShellAside = factory((_props, ref) => {
|
|
|
13708
13725
|
mod: [{ "with-border": withBorder ?? ctx.withBorder }, mod],
|
|
13709
13726
|
...ctx.getStyles("aside", {
|
|
13710
13727
|
className: clsx({ [ReactRemoveScroll.classNames.zeroRight]: ctx.offsetScrollbars }, className),
|
|
13711
|
-
classNames,
|
|
13728
|
+
classNames: classNames2,
|
|
13712
13729
|
styles,
|
|
13713
13730
|
style
|
|
13714
13731
|
}),
|
|
@@ -13721,7 +13738,7 @@ AppShellAside.classes = classes$z;
|
|
|
13721
13738
|
AppShellAside.displayName = "@mantine/core/AppShellAside";
|
|
13722
13739
|
const AppShellFooter = factory((_props, ref) => {
|
|
13723
13740
|
const {
|
|
13724
|
-
classNames,
|
|
13741
|
+
classNames: classNames2,
|
|
13725
13742
|
className,
|
|
13726
13743
|
style,
|
|
13727
13744
|
styles,
|
|
@@ -13744,7 +13761,7 @@ const AppShellFooter = factory((_props, ref) => {
|
|
|
13744
13761
|
mod: [{ "with-border": withBorder ?? ctx.withBorder }, mod],
|
|
13745
13762
|
...ctx.getStyles("footer", {
|
|
13746
13763
|
className: clsx({ [ReactRemoveScroll.classNames.zeroRight]: ctx.offsetScrollbars }, className),
|
|
13747
|
-
classNames,
|
|
13764
|
+
classNames: classNames2,
|
|
13748
13765
|
styles,
|
|
13749
13766
|
style
|
|
13750
13767
|
}),
|
|
@@ -13757,7 +13774,7 @@ AppShellFooter.classes = classes$z;
|
|
|
13757
13774
|
AppShellFooter.displayName = "@mantine/core/AppShellFooter";
|
|
13758
13775
|
const AppShellHeader = factory((_props, ref) => {
|
|
13759
13776
|
const {
|
|
13760
|
-
classNames,
|
|
13777
|
+
classNames: classNames2,
|
|
13761
13778
|
className,
|
|
13762
13779
|
style,
|
|
13763
13780
|
styles,
|
|
@@ -13780,7 +13797,7 @@ const AppShellHeader = factory((_props, ref) => {
|
|
|
13780
13797
|
mod: [{ "with-border": withBorder ?? ctx.withBorder }, mod],
|
|
13781
13798
|
...ctx.getStyles("header", {
|
|
13782
13799
|
className: clsx({ [ReactRemoveScroll.classNames.zeroRight]: ctx.offsetScrollbars }, className),
|
|
13783
|
-
classNames,
|
|
13800
|
+
classNames: classNames2,
|
|
13784
13801
|
styles,
|
|
13785
13802
|
style
|
|
13786
13803
|
}),
|
|
@@ -13792,7 +13809,7 @@ const AppShellHeader = factory((_props, ref) => {
|
|
|
13792
13809
|
AppShellHeader.classes = classes$z;
|
|
13793
13810
|
AppShellHeader.displayName = "@mantine/core/AppShellHeader";
|
|
13794
13811
|
const AppShellMain = factory((_props, ref) => {
|
|
13795
|
-
const { classNames, className, style, styles, vars, ...others } = useProps(
|
|
13812
|
+
const { classNames: classNames2, className, style, styles, vars, ...others } = useProps(
|
|
13796
13813
|
"AppShellMain",
|
|
13797
13814
|
null,
|
|
13798
13815
|
_props
|
|
@@ -13803,7 +13820,7 @@ const AppShellMain = factory((_props, ref) => {
|
|
|
13803
13820
|
{
|
|
13804
13821
|
component: "main",
|
|
13805
13822
|
ref,
|
|
13806
|
-
...ctx.getStyles("main", { className, style, classNames, styles }),
|
|
13823
|
+
...ctx.getStyles("main", { className, style, classNames: classNames2, styles }),
|
|
13807
13824
|
...others
|
|
13808
13825
|
}
|
|
13809
13826
|
);
|
|
@@ -14175,7 +14192,7 @@ function AppShellMediaStyles({
|
|
|
14175
14192
|
}
|
|
14176
14193
|
const AppShellNavbar = factory((_props, ref) => {
|
|
14177
14194
|
const {
|
|
14178
|
-
classNames,
|
|
14195
|
+
classNames: classNames2,
|
|
14179
14196
|
className,
|
|
14180
14197
|
style,
|
|
14181
14198
|
styles,
|
|
@@ -14196,7 +14213,7 @@ const AppShellNavbar = factory((_props, ref) => {
|
|
|
14196
14213
|
component: "nav",
|
|
14197
14214
|
ref,
|
|
14198
14215
|
mod: [{ "with-border": withBorder ?? ctx.withBorder }, mod],
|
|
14199
|
-
...ctx.getStyles("navbar", { className, classNames, styles, style }),
|
|
14216
|
+
...ctx.getStyles("navbar", { className, classNames: classNames2, styles, style }),
|
|
14200
14217
|
...others,
|
|
14201
14218
|
__vars: { "--app-shell-navbar-z-index": `calc(${zIndex ?? ctx.zIndex} + 1)` }
|
|
14202
14219
|
}
|
|
@@ -14205,7 +14222,7 @@ const AppShellNavbar = factory((_props, ref) => {
|
|
|
14205
14222
|
AppShellNavbar.classes = classes$z;
|
|
14206
14223
|
AppShellNavbar.displayName = "@mantine/core/AppShellNavbar";
|
|
14207
14224
|
const AppShellSection = polymorphicFactory((_props, ref) => {
|
|
14208
|
-
const { classNames, className, style, styles, vars, grow, mod, ...others } = useProps(
|
|
14225
|
+
const { classNames: classNames2, className, style, styles, vars, grow, mod, ...others } = useProps(
|
|
14209
14226
|
"AppShellSection",
|
|
14210
14227
|
null,
|
|
14211
14228
|
_props
|
|
@@ -14216,7 +14233,7 @@ const AppShellSection = polymorphicFactory((_props, ref) => {
|
|
|
14216
14233
|
{
|
|
14217
14234
|
ref,
|
|
14218
14235
|
mod: [{ grow }, mod],
|
|
14219
|
-
...ctx.getStyles("section", { className, style, classNames, styles }),
|
|
14236
|
+
...ctx.getStyles("section", { className, style, classNames: classNames2, styles }),
|
|
14220
14237
|
...others
|
|
14221
14238
|
}
|
|
14222
14239
|
);
|
|
@@ -14268,7 +14285,7 @@ const varsResolver$B = createVarsResolver(
|
|
|
14268
14285
|
const AppShell = factory((_props, ref) => {
|
|
14269
14286
|
const props = useProps("AppShell", defaultProps$H, _props);
|
|
14270
14287
|
const {
|
|
14271
|
-
classNames,
|
|
14288
|
+
classNames: classNames2,
|
|
14272
14289
|
className,
|
|
14273
14290
|
style,
|
|
14274
14291
|
styles,
|
|
@@ -14298,7 +14315,7 @@ const AppShell = factory((_props, ref) => {
|
|
|
14298
14315
|
props,
|
|
14299
14316
|
className,
|
|
14300
14317
|
style,
|
|
14301
|
-
classNames,
|
|
14318
|
+
classNames: classNames2,
|
|
14302
14319
|
styles,
|
|
14303
14320
|
unstyled,
|
|
14304
14321
|
attributes,
|
|
@@ -14385,14 +14402,14 @@ const varsResolver$A = createVarsResolver((theme2, { size: size2, color }) => ({
|
|
|
14385
14402
|
}));
|
|
14386
14403
|
const ComboboxChevron = factory((_props, ref) => {
|
|
14387
14404
|
const props = useProps("ComboboxChevron", defaultProps$G, _props);
|
|
14388
|
-
const { size: size2, error: error2, style, className, classNames, styles, unstyled, vars, mod, ...others } = props;
|
|
14405
|
+
const { size: size2, error: error2, style, className, classNames: classNames2, styles, unstyled, vars, mod, ...others } = props;
|
|
14389
14406
|
const getStyles2 = useStyles({
|
|
14390
14407
|
name: "ComboboxChevron",
|
|
14391
14408
|
classes: classes$y,
|
|
14392
14409
|
props,
|
|
14393
14410
|
style,
|
|
14394
14411
|
className,
|
|
14395
|
-
classNames,
|
|
14412
|
+
classNames: classNames2,
|
|
14396
14413
|
styles,
|
|
14397
14414
|
unstyled,
|
|
14398
14415
|
vars,
|
|
@@ -14449,7 +14466,7 @@ const ComboboxClearButton = forwardRef(
|
|
|
14449
14466
|
);
|
|
14450
14467
|
ComboboxClearButton.displayName = "@mantine/core/ComboboxClearButton";
|
|
14451
14468
|
const ComboboxDropdown = factory((props, ref) => {
|
|
14452
|
-
const { classNames, styles, className, style, hidden: hidden2, ...others } = useProps(
|
|
14469
|
+
const { classNames: classNames2, styles, className, style, hidden: hidden2, ...others } = useProps(
|
|
14453
14470
|
"ComboboxDropdown",
|
|
14454
14471
|
null,
|
|
14455
14472
|
props
|
|
@@ -14462,7 +14479,7 @@ const ComboboxDropdown = factory((props, ref) => {
|
|
|
14462
14479
|
ref,
|
|
14463
14480
|
role: "presentation",
|
|
14464
14481
|
"data-hidden": hidden2 || void 0,
|
|
14465
|
-
...ctx.getStyles("dropdown", { className, style, classNames, styles })
|
|
14482
|
+
...ctx.getStyles("dropdown", { className, style, classNames: classNames2, styles })
|
|
14466
14483
|
}
|
|
14467
14484
|
);
|
|
14468
14485
|
});
|
|
@@ -14483,7 +14500,7 @@ const ComboboxDropdownTarget = factory((props, ref) => {
|
|
|
14483
14500
|
});
|
|
14484
14501
|
ComboboxDropdownTarget.displayName = "@mantine/core/ComboboxDropdownTarget";
|
|
14485
14502
|
const ComboboxEmpty = factory((props, ref) => {
|
|
14486
|
-
const { classNames, className, style, styles, vars, ...others } = useProps(
|
|
14503
|
+
const { classNames: classNames2, className, style, styles, vars, ...others } = useProps(
|
|
14487
14504
|
"ComboboxEmpty",
|
|
14488
14505
|
null,
|
|
14489
14506
|
props
|
|
@@ -14493,7 +14510,7 @@ const ComboboxEmpty = factory((props, ref) => {
|
|
|
14493
14510
|
Box,
|
|
14494
14511
|
{
|
|
14495
14512
|
ref,
|
|
14496
|
-
...ctx.getStyles("empty", { className, classNames, styles, style }),
|
|
14513
|
+
...ctx.getStyles("empty", { className, classNames: classNames2, styles, style }),
|
|
14497
14514
|
...others
|
|
14498
14515
|
}
|
|
14499
14516
|
);
|
|
@@ -14619,7 +14636,7 @@ const ComboboxEventsTarget = factory((props, ref) => {
|
|
|
14619
14636
|
});
|
|
14620
14637
|
ComboboxEventsTarget.displayName = "@mantine/core/ComboboxEventsTarget";
|
|
14621
14638
|
const ComboboxFooter = factory((props, ref) => {
|
|
14622
|
-
const { classNames, className, style, styles, vars, ...others } = useProps(
|
|
14639
|
+
const { classNames: classNames2, className, style, styles, vars, ...others } = useProps(
|
|
14623
14640
|
"ComboboxFooter",
|
|
14624
14641
|
null,
|
|
14625
14642
|
props
|
|
@@ -14629,7 +14646,7 @@ const ComboboxFooter = factory((props, ref) => {
|
|
|
14629
14646
|
Box,
|
|
14630
14647
|
{
|
|
14631
14648
|
ref,
|
|
14632
|
-
...ctx.getStyles("footer", { className, classNames, style, styles }),
|
|
14649
|
+
...ctx.getStyles("footer", { className, classNames: classNames2, style, styles }),
|
|
14633
14650
|
...others,
|
|
14634
14651
|
onMouseDown: (event) => {
|
|
14635
14652
|
event.preventDefault();
|
|
@@ -14640,7 +14657,7 @@ const ComboboxFooter = factory((props, ref) => {
|
|
|
14640
14657
|
ComboboxFooter.classes = classes$y;
|
|
14641
14658
|
ComboboxFooter.displayName = "@mantine/core/ComboboxFooter";
|
|
14642
14659
|
const ComboboxGroup = factory((props, ref) => {
|
|
14643
|
-
const { classNames, className, style, styles, vars, children, label, id, ...others } = useProps(
|
|
14660
|
+
const { classNames: classNames2, className, style, styles, vars, children, label, id, ...others } = useProps(
|
|
14644
14661
|
"ComboboxGroup",
|
|
14645
14662
|
null,
|
|
14646
14663
|
props
|
|
@@ -14653,10 +14670,10 @@ const ComboboxGroup = factory((props, ref) => {
|
|
|
14653
14670
|
ref,
|
|
14654
14671
|
role: "group",
|
|
14655
14672
|
"aria-labelledby": label ? _id : void 0,
|
|
14656
|
-
...ctx.getStyles("group", { className, classNames, style, styles }),
|
|
14673
|
+
...ctx.getStyles("group", { className, classNames: classNames2, style, styles }),
|
|
14657
14674
|
...others,
|
|
14658
14675
|
children: [
|
|
14659
|
-
label && /* @__PURE__ */ jsx("div", { id: _id, ...ctx.getStyles("groupLabel", { classNames, styles }), children: label }),
|
|
14676
|
+
label && /* @__PURE__ */ jsx("div", { id: _id, ...ctx.getStyles("groupLabel", { classNames: classNames2, styles }), children: label }),
|
|
14660
14677
|
children
|
|
14661
14678
|
]
|
|
14662
14679
|
}
|
|
@@ -14665,7 +14682,7 @@ const ComboboxGroup = factory((props, ref) => {
|
|
|
14665
14682
|
ComboboxGroup.classes = classes$y;
|
|
14666
14683
|
ComboboxGroup.displayName = "@mantine/core/ComboboxGroup";
|
|
14667
14684
|
const ComboboxHeader = factory((props, ref) => {
|
|
14668
|
-
const { classNames, className, style, styles, vars, ...others } = useProps(
|
|
14685
|
+
const { classNames: classNames2, className, style, styles, vars, ...others } = useProps(
|
|
14669
14686
|
"ComboboxHeader",
|
|
14670
14687
|
null,
|
|
14671
14688
|
props
|
|
@@ -14675,7 +14692,7 @@ const ComboboxHeader = factory((props, ref) => {
|
|
|
14675
14692
|
Box,
|
|
14676
14693
|
{
|
|
14677
14694
|
ref,
|
|
14678
|
-
...ctx.getStyles("header", { className, classNames, style, styles }),
|
|
14695
|
+
...ctx.getStyles("header", { className, classNames: classNames2, style, styles }),
|
|
14679
14696
|
...others,
|
|
14680
14697
|
onMouseDown: (event) => {
|
|
14681
14698
|
event.preventDefault();
|
|
@@ -14703,7 +14720,7 @@ ComboboxHiddenInput.displayName = "@mantine/core/ComboboxHiddenInput";
|
|
|
14703
14720
|
const ComboboxOption = factory((_props, ref) => {
|
|
14704
14721
|
const props = useProps("ComboboxOption", null, _props);
|
|
14705
14722
|
const {
|
|
14706
|
-
classNames,
|
|
14723
|
+
classNames: classNames2,
|
|
14707
14724
|
className,
|
|
14708
14725
|
style,
|
|
14709
14726
|
styles,
|
|
@@ -14724,7 +14741,7 @@ const ComboboxOption = factory((_props, ref) => {
|
|
|
14724
14741
|
return /* @__PURE__ */ jsx(
|
|
14725
14742
|
Box,
|
|
14726
14743
|
{
|
|
14727
|
-
...ctx.getStyles("option", { className, classNames, styles, style }),
|
|
14744
|
+
...ctx.getStyles("option", { className, classNames: classNames2, styles, style }),
|
|
14728
14745
|
...others,
|
|
14729
14746
|
ref,
|
|
14730
14747
|
id: _id,
|
|
@@ -14759,7 +14776,7 @@ ComboboxOption.classes = classes$y;
|
|
|
14759
14776
|
ComboboxOption.displayName = "@mantine/core/ComboboxOption";
|
|
14760
14777
|
const ComboboxOptions = factory((_props, ref) => {
|
|
14761
14778
|
const props = useProps("ComboboxOptions", null, _props);
|
|
14762
|
-
const { classNames, className, style, styles, id, onMouseDown, labelledBy, ...others } = props;
|
|
14779
|
+
const { classNames: classNames2, className, style, styles, id, onMouseDown, labelledBy, ...others } = props;
|
|
14763
14780
|
const ctx = useComboboxContext();
|
|
14764
14781
|
const _id = useId$1(id);
|
|
14765
14782
|
useEffect(() => {
|
|
@@ -14769,7 +14786,7 @@ const ComboboxOptions = factory((_props, ref) => {
|
|
|
14769
14786
|
Box,
|
|
14770
14787
|
{
|
|
14771
14788
|
ref,
|
|
14772
|
-
...ctx.getStyles("options", { className, style, classNames, styles }),
|
|
14789
|
+
...ctx.getStyles("options", { className, style, classNames: classNames2, styles }),
|
|
14773
14790
|
...others,
|
|
14774
14791
|
id: _id,
|
|
14775
14792
|
role: "listbox",
|
|
@@ -14790,7 +14807,7 @@ const defaultProps$D = {
|
|
|
14790
14807
|
const ComboboxSearch = factory((_props, ref) => {
|
|
14791
14808
|
const props = useProps("ComboboxSearch", defaultProps$D, _props);
|
|
14792
14809
|
const {
|
|
14793
|
-
classNames,
|
|
14810
|
+
classNames: classNames2,
|
|
14794
14811
|
styles,
|
|
14795
14812
|
unstyled,
|
|
14796
14813
|
vars,
|
|
@@ -14814,7 +14831,7 @@ const ComboboxSearch = factory((_props, ref) => {
|
|
|
14814
14831
|
Input,
|
|
14815
14832
|
{
|
|
14816
14833
|
ref: useMergedRef(ref, ctx.store.searchRef),
|
|
14817
|
-
classNames: [{ input: _styles.className },
|
|
14834
|
+
classNames: [{ input: _styles.className }, classNames2],
|
|
14818
14835
|
styles: [{ input: _styles.style }, styles],
|
|
14819
14836
|
size: size2 || ctx.size,
|
|
14820
14837
|
...targetProps,
|
|
@@ -15114,7 +15131,7 @@ const varsResolver$z = createVarsResolver((_, { size: size2, dropdownPadding })
|
|
|
15114
15131
|
function Combobox(_props) {
|
|
15115
15132
|
const props = useProps("Combobox", defaultProps$B, _props);
|
|
15116
15133
|
const {
|
|
15117
|
-
classNames,
|
|
15134
|
+
classNames: classNames2,
|
|
15118
15135
|
styles,
|
|
15119
15136
|
unstyled,
|
|
15120
15137
|
children,
|
|
@@ -15136,7 +15153,7 @@ function Combobox(_props) {
|
|
|
15136
15153
|
name: __staticSelector || "Combobox",
|
|
15137
15154
|
classes: classes$y,
|
|
15138
15155
|
props,
|
|
15139
|
-
classNames,
|
|
15156
|
+
classNames: classNames2,
|
|
15140
15157
|
styles,
|
|
15141
15158
|
unstyled,
|
|
15142
15159
|
attributes,
|
|
@@ -15198,7 +15215,7 @@ const InlineInput = forwardRef(
|
|
|
15198
15215
|
__staticSelector,
|
|
15199
15216
|
__stylesApiProps,
|
|
15200
15217
|
className,
|
|
15201
|
-
classNames,
|
|
15218
|
+
classNames: classNames2,
|
|
15202
15219
|
styles,
|
|
15203
15220
|
unstyled,
|
|
15204
15221
|
children,
|
|
@@ -15224,7 +15241,7 @@ const InlineInput = forwardRef(
|
|
|
15224
15241
|
className,
|
|
15225
15242
|
style,
|
|
15226
15243
|
classes: classes$x,
|
|
15227
|
-
classNames,
|
|
15244
|
+
classNames: classNames2,
|
|
15228
15245
|
styles,
|
|
15229
15246
|
unstyled,
|
|
15230
15247
|
attributes
|
|
@@ -15289,7 +15306,7 @@ const varsResolver$y = createVarsResolver((_, { radius }) => ({
|
|
|
15289
15306
|
const CheckboxCard = factory((_props, ref) => {
|
|
15290
15307
|
const props = useProps("CheckboxCard", defaultProps$A, _props);
|
|
15291
15308
|
const {
|
|
15292
|
-
classNames,
|
|
15309
|
+
classNames: classNames2,
|
|
15293
15310
|
className,
|
|
15294
15311
|
style,
|
|
15295
15312
|
styles,
|
|
@@ -15311,7 +15328,7 @@ const CheckboxCard = factory((_props, ref) => {
|
|
|
15311
15328
|
props,
|
|
15312
15329
|
className,
|
|
15313
15330
|
style,
|
|
15314
|
-
classNames,
|
|
15331
|
+
classNames: classNames2,
|
|
15315
15332
|
styles,
|
|
15316
15333
|
unstyled,
|
|
15317
15334
|
attributes,
|
|
@@ -15453,7 +15470,7 @@ const varsResolver$x = createVarsResolver(
|
|
|
15453
15470
|
const CheckboxIndicator = factory((_props, ref) => {
|
|
15454
15471
|
const props = useProps("CheckboxIndicator", defaultProps$z, _props);
|
|
15455
15472
|
const {
|
|
15456
|
-
classNames,
|
|
15473
|
+
classNames: classNames2,
|
|
15457
15474
|
className,
|
|
15458
15475
|
style,
|
|
15459
15476
|
styles,
|
|
@@ -15478,7 +15495,7 @@ const CheckboxIndicator = factory((_props, ref) => {
|
|
|
15478
15495
|
props,
|
|
15479
15496
|
className,
|
|
15480
15497
|
style,
|
|
15481
|
-
classNames,
|
|
15498
|
+
classNames: classNames2,
|
|
15482
15499
|
styles,
|
|
15483
15500
|
unstyled,
|
|
15484
15501
|
attributes,
|
|
@@ -15524,7 +15541,7 @@ const varsResolver$w = createVarsResolver(
|
|
|
15524
15541
|
const Checkbox$1 = factory((_props, forwardedRef) => {
|
|
15525
15542
|
const props = useProps("Checkbox", defaultProps$y, _props);
|
|
15526
15543
|
const {
|
|
15527
|
-
classNames,
|
|
15544
|
+
classNames: classNames2,
|
|
15528
15545
|
className,
|
|
15529
15546
|
style,
|
|
15530
15547
|
styles,
|
|
@@ -15560,7 +15577,7 @@ const Checkbox$1 = factory((_props, forwardedRef) => {
|
|
|
15560
15577
|
classes: classes$w,
|
|
15561
15578
|
className,
|
|
15562
15579
|
style,
|
|
15563
|
-
classNames,
|
|
15580
|
+
classNames: classNames2,
|
|
15564
15581
|
styles,
|
|
15565
15582
|
unstyled,
|
|
15566
15583
|
attributes,
|
|
@@ -15602,7 +15619,7 @@ const Checkbox$1 = factory((_props, forwardedRef) => {
|
|
|
15602
15619
|
description,
|
|
15603
15620
|
error: error2,
|
|
15604
15621
|
disabled: withContextProps.disabled,
|
|
15605
|
-
classNames,
|
|
15622
|
+
classNames: classNames2,
|
|
15606
15623
|
styles,
|
|
15607
15624
|
unstyled,
|
|
15608
15625
|
"data-checked": withContextProps.checked || checked || void 0,
|
|
@@ -15829,14 +15846,14 @@ const varsResolver$v = createVarsResolver((_, { spacing }) => ({
|
|
|
15829
15846
|
}));
|
|
15830
15847
|
const AvatarGroup = factory((_props, ref) => {
|
|
15831
15848
|
const props = useProps("AvatarGroup", null, _props);
|
|
15832
|
-
const { classNames, className, style, styles, unstyled, vars, spacing, attributes, ...others } = props;
|
|
15849
|
+
const { classNames: classNames2, className, style, styles, unstyled, vars, spacing, attributes, ...others } = props;
|
|
15833
15850
|
const getStyles2 = useStyles({
|
|
15834
15851
|
name: "AvatarGroup",
|
|
15835
15852
|
classes: classes$t,
|
|
15836
15853
|
props,
|
|
15837
15854
|
className,
|
|
15838
15855
|
style,
|
|
15839
|
-
classNames,
|
|
15856
|
+
classNames: classNames2,
|
|
15840
15857
|
styles,
|
|
15841
15858
|
unstyled,
|
|
15842
15859
|
attributes,
|
|
@@ -15927,7 +15944,7 @@ const varsResolver$u = createVarsResolver(
|
|
|
15927
15944
|
const Avatar$1 = polymorphicFactory((_props, ref) => {
|
|
15928
15945
|
const props = useProps("Avatar", null, _props);
|
|
15929
15946
|
const {
|
|
15930
|
-
classNames,
|
|
15947
|
+
classNames: classNames2,
|
|
15931
15948
|
className,
|
|
15932
15949
|
style,
|
|
15933
15950
|
styles,
|
|
@@ -15955,7 +15972,7 @@ const Avatar$1 = polymorphicFactory((_props, ref) => {
|
|
|
15955
15972
|
classes: classes$t,
|
|
15956
15973
|
className,
|
|
15957
15974
|
style,
|
|
15958
|
-
classNames,
|
|
15975
|
+
classNames: classNames2,
|
|
15959
15976
|
styles,
|
|
15960
15977
|
unstyled,
|
|
15961
15978
|
attributes,
|
|
@@ -16016,7 +16033,7 @@ const varsResolver$t = createVarsResolver(
|
|
|
16016
16033
|
const Badge$1 = polymorphicFactory((_props, ref) => {
|
|
16017
16034
|
const props = useProps("Badge", null, _props);
|
|
16018
16035
|
const {
|
|
16019
|
-
classNames,
|
|
16036
|
+
classNames: classNames2,
|
|
16020
16037
|
className,
|
|
16021
16038
|
style,
|
|
16022
16039
|
styles,
|
|
@@ -16042,7 +16059,7 @@ const Badge$1 = polymorphicFactory((_props, ref) => {
|
|
|
16042
16059
|
classes: classes$s,
|
|
16043
16060
|
className,
|
|
16044
16061
|
style,
|
|
16045
|
-
classNames,
|
|
16062
|
+
classNames: classNames2,
|
|
16046
16063
|
styles,
|
|
16047
16064
|
unstyled,
|
|
16048
16065
|
attributes,
|
|
@@ -16090,7 +16107,7 @@ const varsResolver$s = createVarsResolver(
|
|
|
16090
16107
|
const Burger = factory((_props, ref) => {
|
|
16091
16108
|
const props = useProps("Burger", null, _props);
|
|
16092
16109
|
const {
|
|
16093
|
-
classNames,
|
|
16110
|
+
classNames: classNames2,
|
|
16094
16111
|
className,
|
|
16095
16112
|
style,
|
|
16096
16113
|
styles,
|
|
@@ -16110,7 +16127,7 @@ const Burger = factory((_props, ref) => {
|
|
|
16110
16127
|
props,
|
|
16111
16128
|
className,
|
|
16112
16129
|
style,
|
|
16113
|
-
classNames,
|
|
16130
|
+
classNames: classNames2,
|
|
16114
16131
|
styles,
|
|
16115
16132
|
unstyled,
|
|
16116
16133
|
attributes,
|
|
@@ -16136,7 +16153,7 @@ const ButtonGroup = factory((_props, ref) => {
|
|
|
16136
16153
|
const {
|
|
16137
16154
|
className,
|
|
16138
16155
|
style,
|
|
16139
|
-
classNames,
|
|
16156
|
+
classNames: classNames2,
|
|
16140
16157
|
styles,
|
|
16141
16158
|
unstyled,
|
|
16142
16159
|
orientation,
|
|
@@ -16153,7 +16170,7 @@ const ButtonGroup = factory((_props, ref) => {
|
|
|
16153
16170
|
classes: classes$q,
|
|
16154
16171
|
className,
|
|
16155
16172
|
style,
|
|
16156
|
-
classNames,
|
|
16173
|
+
classNames: classNames2,
|
|
16157
16174
|
styles,
|
|
16158
16175
|
unstyled,
|
|
16159
16176
|
attributes,
|
|
@@ -16202,7 +16219,7 @@ const ButtonGroupSection = factory((_props, ref) => {
|
|
|
16202
16219
|
const {
|
|
16203
16220
|
className,
|
|
16204
16221
|
style,
|
|
16205
|
-
classNames,
|
|
16222
|
+
classNames: classNames2,
|
|
16206
16223
|
styles,
|
|
16207
16224
|
unstyled,
|
|
16208
16225
|
vars,
|
|
@@ -16219,7 +16236,7 @@ const ButtonGroupSection = factory((_props, ref) => {
|
|
|
16219
16236
|
classes: classes$q,
|
|
16220
16237
|
className,
|
|
16221
16238
|
style,
|
|
16222
|
-
classNames,
|
|
16239
|
+
classNames: classNames2,
|
|
16223
16240
|
styles,
|
|
16224
16241
|
unstyled,
|
|
16225
16242
|
attributes,
|
|
@@ -16279,7 +16296,7 @@ const Button$1 = polymorphicFactory((_props, ref) => {
|
|
|
16279
16296
|
loading,
|
|
16280
16297
|
loaderProps,
|
|
16281
16298
|
gradient,
|
|
16282
|
-
classNames,
|
|
16299
|
+
classNames: classNames2,
|
|
16283
16300
|
styles,
|
|
16284
16301
|
unstyled,
|
|
16285
16302
|
"data-disabled": dataDisabled,
|
|
@@ -16294,7 +16311,7 @@ const Button$1 = polymorphicFactory((_props, ref) => {
|
|
|
16294
16311
|
classes: classes$q,
|
|
16295
16312
|
className,
|
|
16296
16313
|
style,
|
|
16297
|
-
classNames,
|
|
16314
|
+
classNames: classNames2,
|
|
16298
16315
|
styles,
|
|
16299
16316
|
unstyled,
|
|
16300
16317
|
attributes,
|
|
@@ -16324,7 +16341,7 @@ const Button$1 = polymorphicFactory((_props, ref) => {
|
|
|
16324
16341
|
...others,
|
|
16325
16342
|
children: [
|
|
16326
16343
|
typeof loading === "boolean" && /* @__PURE__ */ jsx(Transition$1, { mounted: loading, transition: loaderTransition, duration: 150, children: (transitionStyles) => /* @__PURE__ */ jsx(Box, { component: "span", ...getStyles2("loader", { style: transitionStyles }), "aria-hidden": true, children: /* @__PURE__ */ jsx(
|
|
16327
|
-
Loader,
|
|
16344
|
+
Loader$1,
|
|
16328
16345
|
{
|
|
16329
16346
|
color: "var(--button-color)",
|
|
16330
16347
|
size: "calc(var(--button-height) / 1.8)",
|
|
@@ -16350,14 +16367,14 @@ const [CardProvider, useCardContext] = createSafeContext(
|
|
|
16350
16367
|
var classes$p = { "root": "m_e615b15f", "section": "m_599a2148" };
|
|
16351
16368
|
const CardSection = polymorphicFactory((_props, ref) => {
|
|
16352
16369
|
const props = useProps("CardSection", null, _props);
|
|
16353
|
-
const { classNames, className, style, styles, vars, withBorder, inheritPadding, mod, ...others } = props;
|
|
16370
|
+
const { classNames: classNames2, className, style, styles, vars, withBorder, inheritPadding, mod, ...others } = props;
|
|
16354
16371
|
const ctx = useCardContext();
|
|
16355
16372
|
return /* @__PURE__ */ jsx(
|
|
16356
16373
|
Box,
|
|
16357
16374
|
{
|
|
16358
16375
|
ref,
|
|
16359
16376
|
mod: [{ "with-border": withBorder, "inherit-padding": inheritPadding }, mod],
|
|
16360
|
-
...ctx.getStyles("section", { className, style, styles, classNames }),
|
|
16377
|
+
...ctx.getStyles("section", { className, style, styles, classNames: classNames2 }),
|
|
16361
16378
|
...others
|
|
16362
16379
|
}
|
|
16363
16380
|
);
|
|
@@ -16372,7 +16389,7 @@ const varsResolver$o = createVarsResolver((_, { padding }) => ({
|
|
|
16372
16389
|
const Card$1 = polymorphicFactory((_props, ref) => {
|
|
16373
16390
|
const props = useProps("Card", null, _props);
|
|
16374
16391
|
const {
|
|
16375
|
-
classNames,
|
|
16392
|
+
classNames: classNames2,
|
|
16376
16393
|
className,
|
|
16377
16394
|
style,
|
|
16378
16395
|
styles,
|
|
@@ -16389,7 +16406,7 @@ const Card$1 = polymorphicFactory((_props, ref) => {
|
|
|
16389
16406
|
classes: classes$p,
|
|
16390
16407
|
className,
|
|
16391
16408
|
style,
|
|
16392
|
-
classNames,
|
|
16409
|
+
classNames: classNames2,
|
|
16393
16410
|
styles,
|
|
16394
16411
|
unstyled,
|
|
16395
16412
|
attributes,
|
|
@@ -16415,7 +16432,7 @@ var classes$o = { "root": "m_4451eb3a" };
|
|
|
16415
16432
|
const Center = polymorphicFactory((_props, ref) => {
|
|
16416
16433
|
const props = useProps("Center", null, _props);
|
|
16417
16434
|
const {
|
|
16418
|
-
classNames,
|
|
16435
|
+
classNames: classNames2,
|
|
16419
16436
|
className,
|
|
16420
16437
|
style,
|
|
16421
16438
|
styles,
|
|
@@ -16432,7 +16449,7 @@ const Center = polymorphicFactory((_props, ref) => {
|
|
|
16432
16449
|
classes: classes$o,
|
|
16433
16450
|
className,
|
|
16434
16451
|
style,
|
|
16435
|
-
classNames,
|
|
16452
|
+
classNames: classNames2,
|
|
16436
16453
|
styles,
|
|
16437
16454
|
unstyled,
|
|
16438
16455
|
attributes,
|
|
@@ -16451,7 +16468,7 @@ const varsResolver$n = createVarsResolver((_, { size: size2, fluid }) => ({
|
|
|
16451
16468
|
const Container = factory((_props, ref) => {
|
|
16452
16469
|
const props = useProps("Container", null, _props);
|
|
16453
16470
|
const {
|
|
16454
|
-
classNames,
|
|
16471
|
+
classNames: classNames2,
|
|
16455
16472
|
className,
|
|
16456
16473
|
style,
|
|
16457
16474
|
styles,
|
|
@@ -16469,7 +16486,7 @@ const Container = factory((_props, ref) => {
|
|
|
16469
16486
|
props,
|
|
16470
16487
|
className,
|
|
16471
16488
|
style,
|
|
16472
|
-
classNames,
|
|
16489
|
+
classNames: classNames2,
|
|
16473
16490
|
styles,
|
|
16474
16491
|
unstyled,
|
|
16475
16492
|
attributes,
|
|
@@ -16502,7 +16519,7 @@ const varsResolver$m = createVarsResolver((theme2, { color, variant, size: size2
|
|
|
16502
16519
|
const Divider = factory((_props, ref) => {
|
|
16503
16520
|
const props = useProps("Divider", defaultProps$w, _props);
|
|
16504
16521
|
const {
|
|
16505
|
-
classNames,
|
|
16522
|
+
classNames: classNames2,
|
|
16506
16523
|
className,
|
|
16507
16524
|
style,
|
|
16508
16525
|
styles,
|
|
@@ -16522,7 +16539,7 @@ const Divider = factory((_props, ref) => {
|
|
|
16522
16539
|
props,
|
|
16523
16540
|
className,
|
|
16524
16541
|
style,
|
|
16525
|
-
classNames,
|
|
16542
|
+
classNames: classNames2,
|
|
16526
16543
|
styles,
|
|
16527
16544
|
unstyled,
|
|
16528
16545
|
attributes,
|
|
@@ -16549,13 +16566,13 @@ const [DrawerProvider, useDrawerContext] = createSafeContext(
|
|
|
16549
16566
|
);
|
|
16550
16567
|
const DrawerBody = factory((_props, ref) => {
|
|
16551
16568
|
const props = useProps("DrawerBody", null, _props);
|
|
16552
|
-
const { classNames, className, style, styles, vars, ...others } = props;
|
|
16569
|
+
const { classNames: classNames2, className, style, styles, vars, ...others } = props;
|
|
16553
16570
|
const ctx = useDrawerContext();
|
|
16554
16571
|
return /* @__PURE__ */ jsx(
|
|
16555
16572
|
ModalBaseBody,
|
|
16556
16573
|
{
|
|
16557
16574
|
ref,
|
|
16558
|
-
...ctx.getStyles("body", { classNames, style, styles, className }),
|
|
16575
|
+
...ctx.getStyles("body", { classNames: classNames2, style, styles, className }),
|
|
16559
16576
|
...others
|
|
16560
16577
|
}
|
|
16561
16578
|
);
|
|
@@ -16564,13 +16581,13 @@ DrawerBody.classes = classes$l;
|
|
|
16564
16581
|
DrawerBody.displayName = "@mantine/core/DrawerBody";
|
|
16565
16582
|
const DrawerCloseButton = factory((_props, ref) => {
|
|
16566
16583
|
const props = useProps("DrawerCloseButton", null, _props);
|
|
16567
|
-
const { classNames, className, style, styles, vars, ...others } = props;
|
|
16584
|
+
const { classNames: classNames2, className, style, styles, vars, ...others } = props;
|
|
16568
16585
|
const ctx = useDrawerContext();
|
|
16569
16586
|
return /* @__PURE__ */ jsx(
|
|
16570
16587
|
ModalBaseCloseButton,
|
|
16571
16588
|
{
|
|
16572
16589
|
ref,
|
|
16573
|
-
...ctx.getStyles("close", { classNames, style, styles, className }),
|
|
16590
|
+
...ctx.getStyles("close", { classNames: classNames2, style, styles, className }),
|
|
16574
16591
|
...others
|
|
16575
16592
|
}
|
|
16576
16593
|
);
|
|
@@ -16579,14 +16596,14 @@ DrawerCloseButton.classes = classes$l;
|
|
|
16579
16596
|
DrawerCloseButton.displayName = "@mantine/core/DrawerCloseButton";
|
|
16580
16597
|
const DrawerContent = factory((_props, ref) => {
|
|
16581
16598
|
const props = useProps("DrawerContent", null, _props);
|
|
16582
|
-
const { classNames, className, style, styles, vars, children, radius, __hidden, ...others } = props;
|
|
16599
|
+
const { classNames: classNames2, className, style, styles, vars, children, radius, __hidden, ...others } = props;
|
|
16583
16600
|
const ctx = useDrawerContext();
|
|
16584
16601
|
const Scroll = ctx.scrollAreaComponent || NativeScrollArea;
|
|
16585
16602
|
return /* @__PURE__ */ jsx(
|
|
16586
16603
|
ModalBaseContent,
|
|
16587
16604
|
{
|
|
16588
|
-
...ctx.getStyles("content", { className, style, styles, classNames }),
|
|
16589
|
-
innerProps: ctx.getStyles("inner", { className, style, styles, classNames }),
|
|
16605
|
+
...ctx.getStyles("content", { className, style, styles, classNames: classNames2 }),
|
|
16606
|
+
innerProps: ctx.getStyles("inner", { className, style, styles, classNames: classNames2 }),
|
|
16590
16607
|
ref,
|
|
16591
16608
|
...others,
|
|
16592
16609
|
radius: radius || ctx.radius || 0,
|
|
@@ -16599,13 +16616,13 @@ DrawerContent.classes = classes$l;
|
|
|
16599
16616
|
DrawerContent.displayName = "@mantine/core/DrawerContent";
|
|
16600
16617
|
const DrawerHeader = factory((_props, ref) => {
|
|
16601
16618
|
const props = useProps("DrawerHeader", null, _props);
|
|
16602
|
-
const { classNames, className, style, styles, vars, ...others } = props;
|
|
16619
|
+
const { classNames: classNames2, className, style, styles, vars, ...others } = props;
|
|
16603
16620
|
const ctx = useDrawerContext();
|
|
16604
16621
|
return /* @__PURE__ */ jsx(
|
|
16605
16622
|
ModalBaseHeader,
|
|
16606
16623
|
{
|
|
16607
16624
|
ref,
|
|
16608
|
-
...ctx.getStyles("header", { classNames, style, styles, className }),
|
|
16625
|
+
...ctx.getStyles("header", { classNames: classNames2, style, styles, className }),
|
|
16609
16626
|
...others
|
|
16610
16627
|
}
|
|
16611
16628
|
);
|
|
@@ -16614,13 +16631,13 @@ DrawerHeader.classes = classes$l;
|
|
|
16614
16631
|
DrawerHeader.displayName = "@mantine/core/DrawerHeader";
|
|
16615
16632
|
const DrawerOverlay = factory((_props, ref) => {
|
|
16616
16633
|
const props = useProps("DrawerOverlay", null, _props);
|
|
16617
|
-
const { classNames, className, style, styles, vars, ...others } = props;
|
|
16634
|
+
const { classNames: classNames2, className, style, styles, vars, ...others } = props;
|
|
16618
16635
|
const ctx = useDrawerContext();
|
|
16619
16636
|
return /* @__PURE__ */ jsx(
|
|
16620
16637
|
ModalBaseOverlay,
|
|
16621
16638
|
{
|
|
16622
16639
|
ref,
|
|
16623
|
-
...ctx.getStyles("overlay", { classNames, style, styles, className }),
|
|
16640
|
+
...ctx.getStyles("overlay", { classNames: classNames2, style, styles, className }),
|
|
16624
16641
|
...others
|
|
16625
16642
|
}
|
|
16626
16643
|
);
|
|
@@ -16679,7 +16696,7 @@ const varsResolver$l = createVarsResolver((_, { position, size: size2, offset: o
|
|
|
16679
16696
|
const DrawerRoot = factory((_props, ref) => {
|
|
16680
16697
|
const props = useProps("DrawerRoot", defaultProps$v, _props);
|
|
16681
16698
|
const {
|
|
16682
|
-
classNames,
|
|
16699
|
+
classNames: classNames2,
|
|
16683
16700
|
className,
|
|
16684
16701
|
style,
|
|
16685
16702
|
styles,
|
|
@@ -16699,7 +16716,7 @@ const DrawerRoot = factory((_props, ref) => {
|
|
|
16699
16716
|
props,
|
|
16700
16717
|
className,
|
|
16701
16718
|
style,
|
|
16702
|
-
classNames,
|
|
16719
|
+
classNames: classNames2,
|
|
16703
16720
|
styles,
|
|
16704
16721
|
unstyled,
|
|
16705
16722
|
attributes,
|
|
@@ -16748,13 +16765,13 @@ function DrawerStack({ children }) {
|
|
|
16748
16765
|
DrawerStack.displayName = "@mantine/core/DrawerStack";
|
|
16749
16766
|
const DrawerTitle = factory((_props, ref) => {
|
|
16750
16767
|
const props = useProps("DrawerTitle", null, _props);
|
|
16751
|
-
const { classNames, className, style, styles, vars, ...others } = props;
|
|
16768
|
+
const { classNames: classNames2, className, style, styles, vars, ...others } = props;
|
|
16752
16769
|
const ctx = useDrawerContext();
|
|
16753
16770
|
return /* @__PURE__ */ jsx(
|
|
16754
16771
|
ModalBaseTitle,
|
|
16755
16772
|
{
|
|
16756
16773
|
ref,
|
|
16757
|
-
...ctx.getStyles("title", { classNames, style, styles, className }),
|
|
16774
|
+
...ctx.getStyles("title", { classNames: classNames2, style, styles, className }),
|
|
16758
16775
|
...others
|
|
16759
16776
|
}
|
|
16760
16777
|
);
|
|
@@ -16927,7 +16944,7 @@ const defaultProps$t = {
|
|
|
16927
16944
|
};
|
|
16928
16945
|
const GridCol = factory((_props, ref) => {
|
|
16929
16946
|
const props = useProps("GridCol", defaultProps$t, _props);
|
|
16930
|
-
const { classNames, className, style, styles, vars, span, order, offset: offset2, ...others } = props;
|
|
16947
|
+
const { classNames: classNames2, className, style, styles, vars, span, order, offset: offset2, ...others } = props;
|
|
16931
16948
|
const ctx = useGridContext();
|
|
16932
16949
|
const responsiveClassName = useRandomClassName();
|
|
16933
16950
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
@@ -16947,7 +16964,7 @@ const GridCol = factory((_props, ref) => {
|
|
|
16947
16964
|
...ctx.getStyles("col", {
|
|
16948
16965
|
className: clsx(className, responsiveClassName),
|
|
16949
16966
|
style,
|
|
16950
|
-
classNames,
|
|
16967
|
+
classNames: classNames2,
|
|
16951
16968
|
styles
|
|
16952
16969
|
}),
|
|
16953
16970
|
...others
|
|
@@ -17007,7 +17024,7 @@ const varsResolver$k = createVarsResolver((_, { justify, align, overflow }) => (
|
|
|
17007
17024
|
const Grid = factory((_props, ref) => {
|
|
17008
17025
|
const props = useProps("Grid", defaultProps$s, _props);
|
|
17009
17026
|
const {
|
|
17010
|
-
classNames,
|
|
17027
|
+
classNames: classNames2,
|
|
17011
17028
|
className,
|
|
17012
17029
|
style,
|
|
17013
17030
|
styles,
|
|
@@ -17030,7 +17047,7 @@ const Grid = factory((_props, ref) => {
|
|
|
17030
17047
|
props,
|
|
17031
17048
|
className,
|
|
17032
17049
|
style,
|
|
17033
|
-
classNames,
|
|
17050
|
+
classNames: classNames2,
|
|
17034
17051
|
styles,
|
|
17035
17052
|
unstyled,
|
|
17036
17053
|
attributes,
|
|
@@ -17057,7 +17074,7 @@ const [MenuContextProvider, useMenuContext] = createSafeContext(
|
|
|
17057
17074
|
);
|
|
17058
17075
|
var classes$j = { "dropdown": "m_dc9b7c9f", "label": "m_9bfac126", "divider": "m_efdf90cb", "item": "m_99ac2aa1", "itemLabel": "m_5476e0d3", "itemSection": "m_8b75e504", "chevron": "m_b85b0bed" };
|
|
17059
17076
|
const MenuDivider = factory((props, ref) => {
|
|
17060
|
-
const { classNames, className, style, styles, vars, ...others } = useProps(
|
|
17077
|
+
const { classNames: classNames2, className, style, styles, vars, ...others } = useProps(
|
|
17061
17078
|
"MenuDivider",
|
|
17062
17079
|
null,
|
|
17063
17080
|
props
|
|
@@ -17067,7 +17084,7 @@ const MenuDivider = factory((props, ref) => {
|
|
|
17067
17084
|
Box,
|
|
17068
17085
|
{
|
|
17069
17086
|
ref,
|
|
17070
|
-
...ctx.getStyles("divider", { className, style, styles, classNames }),
|
|
17087
|
+
...ctx.getStyles("divider", { className, style, styles, classNames: classNames2 }),
|
|
17071
17088
|
...others
|
|
17072
17089
|
}
|
|
17073
17090
|
);
|
|
@@ -17076,7 +17093,7 @@ MenuDivider.classes = classes$j;
|
|
|
17076
17093
|
MenuDivider.displayName = "@mantine/core/MenuDivider";
|
|
17077
17094
|
const MenuDropdown = factory((props, ref) => {
|
|
17078
17095
|
const {
|
|
17079
|
-
classNames,
|
|
17096
|
+
classNames: classNames2,
|
|
17080
17097
|
className,
|
|
17081
17098
|
style,
|
|
17082
17099
|
styles,
|
|
@@ -17116,7 +17133,7 @@ const MenuDropdown = factory((props, ref) => {
|
|
|
17116
17133
|
className,
|
|
17117
17134
|
style,
|
|
17118
17135
|
styles,
|
|
17119
|
-
classNames,
|
|
17136
|
+
classNames: classNames2,
|
|
17120
17137
|
withStaticClass: false
|
|
17121
17138
|
}),
|
|
17122
17139
|
tabIndex: -1,
|
|
@@ -17134,7 +17151,7 @@ MenuDropdown.displayName = "@mantine/core/MenuDropdown";
|
|
|
17134
17151
|
const [SubMenuProvider, useSubMenuContext] = createOptionalContext();
|
|
17135
17152
|
const MenuItem = polymorphicFactory((props, ref) => {
|
|
17136
17153
|
const {
|
|
17137
|
-
classNames,
|
|
17154
|
+
classNames: classNames2,
|
|
17138
17155
|
className,
|
|
17139
17156
|
style,
|
|
17140
17157
|
styles,
|
|
@@ -17179,7 +17196,7 @@ const MenuItem = polymorphicFactory((props, ref) => {
|
|
|
17179
17196
|
...others,
|
|
17180
17197
|
unstyled: ctx.unstyled,
|
|
17181
17198
|
tabIndex: ctx.menuItemTabIndex,
|
|
17182
|
-
...ctx.getStyles("item", { className, style, styles, classNames }),
|
|
17199
|
+
...ctx.getStyles("item", { className, style, styles, classNames: classNames2 }),
|
|
17183
17200
|
ref: useMergedRef(itemRef, ref),
|
|
17184
17201
|
role: "menuitem",
|
|
17185
17202
|
disabled,
|
|
@@ -17201,9 +17218,9 @@ const MenuItem = polymorphicFactory((props, ref) => {
|
|
|
17201
17218
|
"--menu-item-hover": colors2?.hover
|
|
17202
17219
|
},
|
|
17203
17220
|
children: [
|
|
17204
|
-
leftSection && /* @__PURE__ */ jsx("div", { ...ctx.getStyles("itemSection", { styles, classNames }), "data-position": "left", children: leftSection }),
|
|
17205
|
-
children && /* @__PURE__ */ jsx("div", { ...ctx.getStyles("itemLabel", { styles, classNames }), children }),
|
|
17206
|
-
rightSection && /* @__PURE__ */ jsx("div", { ...ctx.getStyles("itemSection", { styles, classNames }), "data-position": "right", children: rightSection })
|
|
17221
|
+
leftSection && /* @__PURE__ */ jsx("div", { ...ctx.getStyles("itemSection", { styles, classNames: classNames2 }), "data-position": "left", children: leftSection }),
|
|
17222
|
+
children && /* @__PURE__ */ jsx("div", { ...ctx.getStyles("itemLabel", { styles, classNames: classNames2 }), children }),
|
|
17223
|
+
rightSection && /* @__PURE__ */ jsx("div", { ...ctx.getStyles("itemSection", { styles, classNames: classNames2 }), "data-position": "right", children: rightSection })
|
|
17207
17224
|
]
|
|
17208
17225
|
}
|
|
17209
17226
|
);
|
|
@@ -17211,7 +17228,7 @@ const MenuItem = polymorphicFactory((props, ref) => {
|
|
|
17211
17228
|
MenuItem.classes = classes$j;
|
|
17212
17229
|
MenuItem.displayName = "@mantine/core/MenuItem";
|
|
17213
17230
|
const MenuLabel = factory((props, ref) => {
|
|
17214
|
-
const { classNames, className, style, styles, vars, ...others } = useProps(
|
|
17231
|
+
const { classNames: classNames2, className, style, styles, vars, ...others } = useProps(
|
|
17215
17232
|
"MenuLabel",
|
|
17216
17233
|
null,
|
|
17217
17234
|
props
|
|
@@ -17221,7 +17238,7 @@ const MenuLabel = factory((props, ref) => {
|
|
|
17221
17238
|
Box,
|
|
17222
17239
|
{
|
|
17223
17240
|
ref,
|
|
17224
|
-
...ctx.getStyles("label", { className, style, styles, classNames }),
|
|
17241
|
+
...ctx.getStyles("label", { className, style, styles, classNames: classNames2 }),
|
|
17225
17242
|
...others
|
|
17226
17243
|
}
|
|
17227
17244
|
);
|
|
@@ -17230,7 +17247,7 @@ MenuLabel.classes = classes$j;
|
|
|
17230
17247
|
MenuLabel.displayName = "@mantine/core/MenuLabel";
|
|
17231
17248
|
const MenuSubDropdown = factory((props, ref) => {
|
|
17232
17249
|
const {
|
|
17233
|
-
classNames,
|
|
17250
|
+
classNames: classNames2,
|
|
17234
17251
|
className,
|
|
17235
17252
|
style,
|
|
17236
17253
|
styles,
|
|
@@ -17259,7 +17276,7 @@ const MenuSubDropdown = factory((props, ref) => {
|
|
|
17259
17276
|
className,
|
|
17260
17277
|
style,
|
|
17261
17278
|
styles,
|
|
17262
|
-
classNames,
|
|
17279
|
+
classNames: classNames2,
|
|
17263
17280
|
withStaticClass: false
|
|
17264
17281
|
}),
|
|
17265
17282
|
tabIndex: -1,
|
|
@@ -17272,7 +17289,7 @@ MenuSubDropdown.classes = classes$j;
|
|
|
17272
17289
|
MenuSubDropdown.displayName = "@mantine/core/MenuSubDropdown";
|
|
17273
17290
|
const MenuSubItem = polymorphicFactory((props, ref) => {
|
|
17274
17291
|
const {
|
|
17275
|
-
classNames,
|
|
17292
|
+
classNames: classNames2,
|
|
17276
17293
|
className,
|
|
17277
17294
|
style,
|
|
17278
17295
|
styles,
|
|
@@ -17318,7 +17335,7 @@ const MenuSubItem = polymorphicFactory((props, ref) => {
|
|
|
17318
17335
|
...others,
|
|
17319
17336
|
unstyled: ctx.unstyled,
|
|
17320
17337
|
tabIndex: ctx.menuItemTabIndex,
|
|
17321
|
-
...ctx.getStyles("item", { className, style, styles, classNames }),
|
|
17338
|
+
...ctx.getStyles("item", { className, style, styles, classNames: classNames2 }),
|
|
17322
17339
|
ref: useMergedRef(itemRef, ref),
|
|
17323
17340
|
role: "menuitem",
|
|
17324
17341
|
disabled,
|
|
@@ -17343,9 +17360,9 @@ const MenuSubItem = polymorphicFactory((props, ref) => {
|
|
|
17343
17360
|
"--menu-item-hover": colors2?.hover
|
|
17344
17361
|
},
|
|
17345
17362
|
children: [
|
|
17346
|
-
leftSection && /* @__PURE__ */ jsx("div", { ...ctx.getStyles("itemSection", { styles, classNames }), "data-position": "left", children: leftSection }),
|
|
17347
|
-
children && /* @__PURE__ */ jsx("div", { ...ctx.getStyles("itemLabel", { styles, classNames }), children }),
|
|
17348
|
-
/* @__PURE__ */ jsx("div", { ...ctx.getStyles("itemSection", { styles, classNames }), "data-position": "right", children: rightSection || /* @__PURE__ */ jsx(AccordionChevron, { ...ctx.getStyles("chevron"), size: 14 }) })
|
|
17363
|
+
leftSection && /* @__PURE__ */ jsx("div", { ...ctx.getStyles("itemSection", { styles, classNames: classNames2 }), "data-position": "left", children: leftSection }),
|
|
17364
|
+
children && /* @__PURE__ */ jsx("div", { ...ctx.getStyles("itemLabel", { styles, classNames: classNames2 }), children }),
|
|
17365
|
+
/* @__PURE__ */ jsx("div", { ...ctx.getStyles("itemSection", { styles, classNames: classNames2 }), "data-position": "right", children: rightSection || /* @__PURE__ */ jsx(AccordionChevron, { ...ctx.getStyles("chevron"), size: 14 }) })
|
|
17349
17366
|
]
|
|
17350
17367
|
}
|
|
17351
17368
|
);
|
|
@@ -17480,7 +17497,7 @@ function Menu$1(_props) {
|
|
|
17480
17497
|
trigger,
|
|
17481
17498
|
openDelay,
|
|
17482
17499
|
closeDelay,
|
|
17483
|
-
classNames,
|
|
17500
|
+
classNames: classNames2,
|
|
17484
17501
|
styles,
|
|
17485
17502
|
unstyled,
|
|
17486
17503
|
variant,
|
|
@@ -17495,7 +17512,7 @@ function Menu$1(_props) {
|
|
|
17495
17512
|
name: "Menu",
|
|
17496
17513
|
classes: classes$j,
|
|
17497
17514
|
props,
|
|
17498
|
-
classNames,
|
|
17515
|
+
classNames: classNames2,
|
|
17499
17516
|
styles,
|
|
17500
17517
|
unstyled,
|
|
17501
17518
|
attributes
|
|
@@ -17522,7 +17539,7 @@ function Menu$1(_props) {
|
|
|
17522
17539
|
const { openDropdown, closeDropdown } = useDelayedHover({ open, close, closeDelay, openDelay });
|
|
17523
17540
|
const getItemIndex = (node) => getContextItemIndex("[data-menu-item]", "[data-menu-dropdown]", node);
|
|
17524
17541
|
const { resolvedClassNames, resolvedStyles } = useResolvedStylesApi({
|
|
17525
|
-
classNames,
|
|
17542
|
+
classNames: classNames2,
|
|
17526
17543
|
styles,
|
|
17527
17544
|
props
|
|
17528
17545
|
});
|
|
@@ -17584,13 +17601,13 @@ const [ModalProvider, useModalContext] = createSafeContext(
|
|
|
17584
17601
|
);
|
|
17585
17602
|
const ModalBody = factory((_props, ref) => {
|
|
17586
17603
|
const props = useProps("ModalBody", null, _props);
|
|
17587
|
-
const { classNames, className, style, styles, vars, ...others } = props;
|
|
17604
|
+
const { classNames: classNames2, className, style, styles, vars, ...others } = props;
|
|
17588
17605
|
const ctx = useModalContext();
|
|
17589
17606
|
return /* @__PURE__ */ jsx(
|
|
17590
17607
|
ModalBaseBody,
|
|
17591
17608
|
{
|
|
17592
17609
|
ref,
|
|
17593
|
-
...ctx.getStyles("body", { classNames, style, styles, className }),
|
|
17610
|
+
...ctx.getStyles("body", { classNames: classNames2, style, styles, className }),
|
|
17594
17611
|
...others
|
|
17595
17612
|
}
|
|
17596
17613
|
);
|
|
@@ -17599,13 +17616,13 @@ ModalBody.classes = classes$i;
|
|
|
17599
17616
|
ModalBody.displayName = "@mantine/core/ModalBody";
|
|
17600
17617
|
const ModalCloseButton = factory((_props, ref) => {
|
|
17601
17618
|
const props = useProps("ModalCloseButton", null, _props);
|
|
17602
|
-
const { classNames, className, style, styles, vars, ...others } = props;
|
|
17619
|
+
const { classNames: classNames2, className, style, styles, vars, ...others } = props;
|
|
17603
17620
|
const ctx = useModalContext();
|
|
17604
17621
|
return /* @__PURE__ */ jsx(
|
|
17605
17622
|
ModalBaseCloseButton,
|
|
17606
17623
|
{
|
|
17607
17624
|
ref,
|
|
17608
|
-
...ctx.getStyles("close", { classNames, style, styles, className }),
|
|
17625
|
+
...ctx.getStyles("close", { classNames: classNames2, style, styles, className }),
|
|
17609
17626
|
...others
|
|
17610
17627
|
}
|
|
17611
17628
|
);
|
|
@@ -17614,14 +17631,14 @@ ModalCloseButton.classes = classes$i;
|
|
|
17614
17631
|
ModalCloseButton.displayName = "@mantine/core/ModalCloseButton";
|
|
17615
17632
|
const ModalContent = factory((_props, ref) => {
|
|
17616
17633
|
const props = useProps("ModalContent", null, _props);
|
|
17617
|
-
const { classNames, className, style, styles, vars, children, __hidden, ...others } = props;
|
|
17634
|
+
const { classNames: classNames2, className, style, styles, vars, children, __hidden, ...others } = props;
|
|
17618
17635
|
const ctx = useModalContext();
|
|
17619
17636
|
const Scroll = ctx.scrollAreaComponent || NativeScrollArea;
|
|
17620
17637
|
return /* @__PURE__ */ jsx(
|
|
17621
17638
|
ModalBaseContent,
|
|
17622
17639
|
{
|
|
17623
|
-
...ctx.getStyles("content", { className, style, styles, classNames }),
|
|
17624
|
-
innerProps: ctx.getStyles("inner", { className, style, styles, classNames }),
|
|
17640
|
+
...ctx.getStyles("content", { className, style, styles, classNames: classNames2 }),
|
|
17641
|
+
innerProps: ctx.getStyles("inner", { className, style, styles, classNames: classNames2 }),
|
|
17625
17642
|
"data-full-screen": ctx.fullScreen || void 0,
|
|
17626
17643
|
"data-modal-content": true,
|
|
17627
17644
|
"data-hidden": __hidden || void 0,
|
|
@@ -17643,13 +17660,13 @@ ModalContent.classes = classes$i;
|
|
|
17643
17660
|
ModalContent.displayName = "@mantine/core/ModalContent";
|
|
17644
17661
|
const ModalHeader = factory((_props, ref) => {
|
|
17645
17662
|
const props = useProps("ModalHeader", null, _props);
|
|
17646
|
-
const { classNames, className, style, styles, vars, ...others } = props;
|
|
17663
|
+
const { classNames: classNames2, className, style, styles, vars, ...others } = props;
|
|
17647
17664
|
const ctx = useModalContext();
|
|
17648
17665
|
return /* @__PURE__ */ jsx(
|
|
17649
17666
|
ModalBaseHeader,
|
|
17650
17667
|
{
|
|
17651
17668
|
ref,
|
|
17652
|
-
...ctx.getStyles("header", { classNames, style, styles, className }),
|
|
17669
|
+
...ctx.getStyles("header", { classNames: classNames2, style, styles, className }),
|
|
17653
17670
|
...others
|
|
17654
17671
|
}
|
|
17655
17672
|
);
|
|
@@ -17658,13 +17675,13 @@ ModalHeader.classes = classes$i;
|
|
|
17658
17675
|
ModalHeader.displayName = "@mantine/core/ModalHeader";
|
|
17659
17676
|
const ModalOverlay = factory((_props, ref) => {
|
|
17660
17677
|
const props = useProps("ModalOverlay", null, _props);
|
|
17661
|
-
const { classNames, className, style, styles, vars, ...others } = props;
|
|
17678
|
+
const { classNames: classNames2, className, style, styles, vars, ...others } = props;
|
|
17662
17679
|
const ctx = useModalContext();
|
|
17663
17680
|
return /* @__PURE__ */ jsx(
|
|
17664
17681
|
ModalBaseOverlay,
|
|
17665
17682
|
{
|
|
17666
17683
|
ref,
|
|
17667
|
-
...ctx.getStyles("overlay", { classNames, style, styles, className }),
|
|
17684
|
+
...ctx.getStyles("overlay", { classNames: classNames2, style, styles, className }),
|
|
17668
17685
|
...others
|
|
17669
17686
|
}
|
|
17670
17687
|
);
|
|
@@ -17697,7 +17714,7 @@ const varsResolver$j = createVarsResolver(
|
|
|
17697
17714
|
const ModalRoot = factory((_props, ref) => {
|
|
17698
17715
|
const props = useProps("ModalRoot", defaultProps$o, _props);
|
|
17699
17716
|
const {
|
|
17700
|
-
classNames,
|
|
17717
|
+
classNames: classNames2,
|
|
17701
17718
|
className,
|
|
17702
17719
|
style,
|
|
17703
17720
|
styles,
|
|
@@ -17719,7 +17736,7 @@ const ModalRoot = factory((_props, ref) => {
|
|
|
17719
17736
|
props,
|
|
17720
17737
|
className,
|
|
17721
17738
|
style,
|
|
17722
|
-
classNames,
|
|
17739
|
+
classNames: classNames2,
|
|
17723
17740
|
styles,
|
|
17724
17741
|
unstyled,
|
|
17725
17742
|
attributes,
|
|
@@ -17768,13 +17785,13 @@ function ModalStack({ children }) {
|
|
|
17768
17785
|
ModalStack.displayName = "@mantine/core/ModalStack";
|
|
17769
17786
|
const ModalTitle = factory((_props, ref) => {
|
|
17770
17787
|
const props = useProps("ModalTitle", null, _props);
|
|
17771
|
-
const { classNames, className, style, styles, vars, ...others } = props;
|
|
17788
|
+
const { classNames: classNames2, className, style, styles, vars, ...others } = props;
|
|
17772
17789
|
const ctx = useModalContext();
|
|
17773
17790
|
return /* @__PURE__ */ jsx(
|
|
17774
17791
|
ModalBaseTitle,
|
|
17775
17792
|
{
|
|
17776
17793
|
ref,
|
|
17777
|
-
...ctx.getStyles("title", { classNames, style, styles, className }),
|
|
17794
|
+
...ctx.getStyles("title", { classNames: classNames2, style, styles, className }),
|
|
17778
17795
|
...others
|
|
17779
17796
|
}
|
|
17780
17797
|
);
|
|
@@ -17891,7 +17908,7 @@ const varsResolver$i = createVarsResolver(
|
|
|
17891
17908
|
const NavLink = polymorphicFactory((_props, ref) => {
|
|
17892
17909
|
const props = useProps("NavLink", null, _props);
|
|
17893
17910
|
const {
|
|
17894
|
-
classNames,
|
|
17911
|
+
classNames: classNames2,
|
|
17895
17912
|
className,
|
|
17896
17913
|
style,
|
|
17897
17914
|
styles,
|
|
@@ -17923,7 +17940,7 @@ const NavLink = polymorphicFactory((_props, ref) => {
|
|
|
17923
17940
|
classes: classes$h,
|
|
17924
17941
|
className,
|
|
17925
17942
|
style,
|
|
17926
|
-
classNames,
|
|
17943
|
+
classNames: classNames2,
|
|
17927
17944
|
styles,
|
|
17928
17945
|
unstyled,
|
|
17929
17946
|
attributes,
|
|
@@ -18009,7 +18026,7 @@ const Notification = factory((_props, ref) => {
|
|
|
18009
18026
|
children,
|
|
18010
18027
|
onClose,
|
|
18011
18028
|
closeButtonProps,
|
|
18012
|
-
classNames,
|
|
18029
|
+
classNames: classNames2,
|
|
18013
18030
|
style,
|
|
18014
18031
|
styles,
|
|
18015
18032
|
unstyled,
|
|
@@ -18026,7 +18043,7 @@ const Notification = factory((_props, ref) => {
|
|
|
18026
18043
|
props,
|
|
18027
18044
|
className,
|
|
18028
18045
|
style,
|
|
18029
|
-
classNames,
|
|
18046
|
+
classNames: classNames2,
|
|
18030
18047
|
styles,
|
|
18031
18048
|
unstyled,
|
|
18032
18049
|
attributes,
|
|
@@ -18043,7 +18060,7 @@ const Notification = factory((_props, ref) => {
|
|
|
18043
18060
|
...others,
|
|
18044
18061
|
children: [
|
|
18045
18062
|
icon && !loading && /* @__PURE__ */ jsx("div", { ...getStyles2("icon"), children: icon }),
|
|
18046
|
-
loading && /* @__PURE__ */ jsx(Loader, { size: 28, color, ...loaderProps, ...getStyles2("loader") }),
|
|
18063
|
+
loading && /* @__PURE__ */ jsx(Loader$1, { size: 28, color, ...loaderProps, ...getStyles2("loader") }),
|
|
18047
18064
|
/* @__PURE__ */ jsxs("div", { ...getStyles2("body"), children: [
|
|
18048
18065
|
title && /* @__PURE__ */ jsx("div", { ...getStyles2("title"), children: title }),
|
|
18049
18066
|
/* @__PURE__ */ jsx(Box, { ...getStyles2("description"), mod: { "data-with-title": !!title }, children })
|
|
@@ -18276,7 +18293,7 @@ var findChangedRangeFromCaretPositions = function(lastCaretPositions, currentCar
|
|
|
18276
18293
|
to: { start: startPosition, end: currentCaretPosition }
|
|
18277
18294
|
};
|
|
18278
18295
|
};
|
|
18279
|
-
function clamp(num, min2, max2) {
|
|
18296
|
+
function clamp$1(num, min2, max2) {
|
|
18280
18297
|
return Math.min(Math.max(num, min2), max2);
|
|
18281
18298
|
}
|
|
18282
18299
|
function geInputCaretPosition(el) {
|
|
@@ -18354,7 +18371,7 @@ function getCaretPosition(newFormattedValue, lastFormattedValue, curValue, curCa
|
|
|
18354
18371
|
}
|
|
18355
18372
|
function getCaretPosInBoundary(value, caretPos, boundary, direction) {
|
|
18356
18373
|
var valLn = value.length;
|
|
18357
|
-
caretPos = clamp(caretPos, 0, valLn);
|
|
18374
|
+
caretPos = clamp$1(caretPos, 0, valLn);
|
|
18358
18375
|
if (direction === "left") {
|
|
18359
18376
|
while (caretPos >= 0 && !boundary[caretPos]) {
|
|
18360
18377
|
caretPos--;
|
|
@@ -19153,7 +19170,7 @@ function clampAndSanitizeInput(sanitizedValue, max2, min2) {
|
|
|
19153
19170
|
if (parsedValue > Number.MAX_SAFE_INTEGER) {
|
|
19154
19171
|
return max2 !== void 0 ? max2 : replaced;
|
|
19155
19172
|
}
|
|
19156
|
-
const clamped = clamp$
|
|
19173
|
+
const clamped = clamp$4(parsedValue, min2, max2);
|
|
19157
19174
|
if (hasTrailingDecimalSeparator) {
|
|
19158
19175
|
const clampedString = clamped.toString().replace(/^0+(?=\d)/, "");
|
|
19159
19176
|
return `${clampedString}.`;
|
|
@@ -19164,7 +19181,7 @@ const NumberInput = factory((_props, ref) => {
|
|
|
19164
19181
|
const props = useProps("NumberInput", defaultProps$l, _props);
|
|
19165
19182
|
const {
|
|
19166
19183
|
className,
|
|
19167
|
-
classNames,
|
|
19184
|
+
classNames: classNames2,
|
|
19168
19185
|
styles,
|
|
19169
19186
|
unstyled,
|
|
19170
19187
|
vars,
|
|
@@ -19205,7 +19222,7 @@ const NumberInput = factory((_props, ref) => {
|
|
|
19205
19222
|
name: "NumberInput",
|
|
19206
19223
|
classes: classes$f,
|
|
19207
19224
|
props,
|
|
19208
|
-
classNames,
|
|
19225
|
+
classNames: classNames2,
|
|
19209
19226
|
styles,
|
|
19210
19227
|
unstyled,
|
|
19211
19228
|
attributes,
|
|
@@ -19213,7 +19230,7 @@ const NumberInput = factory((_props, ref) => {
|
|
|
19213
19230
|
varsResolver: varsResolver$g
|
|
19214
19231
|
});
|
|
19215
19232
|
const { resolvedClassNames, resolvedStyles } = useResolvedStylesApi({
|
|
19216
|
-
classNames,
|
|
19233
|
+
classNames: classNames2,
|
|
19217
19234
|
styles,
|
|
19218
19235
|
props
|
|
19219
19236
|
});
|
|
@@ -19258,7 +19275,7 @@ const NumberInput = factory((_props, ref) => {
|
|
|
19258
19275
|
const maxPrecision = Math.max(currentValuePrecision, stepPrecision);
|
|
19259
19276
|
const factor = 10 ** maxPrecision;
|
|
19260
19277
|
if (!isNumberString(_value) && (typeof _value !== "number" || Number.isNaN(_value))) {
|
|
19261
|
-
val = clamp$
|
|
19278
|
+
val = clamp$4(startValue, min2, max2);
|
|
19262
19279
|
} else if (max2 !== void 0) {
|
|
19263
19280
|
const incrementedValue = (Math.round(Number(_value) * factor) + Math.round(step * factor)) / factor;
|
|
19264
19281
|
val = incrementedValue <= max2 ? incrementedValue : max2;
|
|
@@ -19285,7 +19302,7 @@ const NumberInput = factory((_props, ref) => {
|
|
|
19285
19302
|
const maxPrecision = Math.max(currentValuePrecision, stepPrecision);
|
|
19286
19303
|
const factor = 10 ** maxPrecision;
|
|
19287
19304
|
if (!isNumberString(_value) && typeof _value !== "number" || Number.isNaN(_value)) {
|
|
19288
|
-
val = clamp$
|
|
19305
|
+
val = clamp$4(startValue, minValue, max2);
|
|
19289
19306
|
} else {
|
|
19290
19307
|
const decrementedValue = (Math.round(Number(_value) * factor) - Math.round(step * factor)) / factor;
|
|
19291
19308
|
val = minValue !== void 0 && decrementedValue < minValue ? minValue : decrementedValue;
|
|
@@ -19325,7 +19342,7 @@ const NumberInput = factory((_props, ref) => {
|
|
|
19325
19342
|
const handleBlur = (event) => {
|
|
19326
19343
|
let sanitizedValue = _value;
|
|
19327
19344
|
if (clampBehavior === "blur" && typeof sanitizedValue === "number") {
|
|
19328
|
-
sanitizedValue = clamp$
|
|
19345
|
+
sanitizedValue = clamp$4(sanitizedValue, min2, max2);
|
|
19329
19346
|
}
|
|
19330
19347
|
if (trimLeadingZeroesOnBlur && typeof sanitizedValue === "string" && getDecimalPlaces2(sanitizedValue) < 15) {
|
|
19331
19348
|
sanitizedValue = clampAndSanitizeInput(sanitizedValue, max2, min2);
|
|
@@ -19454,7 +19471,7 @@ const defaultProps$k = {
|
|
|
19454
19471
|
const PaginationControl = factory((_props, ref) => {
|
|
19455
19472
|
const props = useProps("PaginationControl", defaultProps$k, _props);
|
|
19456
19473
|
const {
|
|
19457
|
-
classNames,
|
|
19474
|
+
classNames: classNames2,
|
|
19458
19475
|
className,
|
|
19459
19476
|
style,
|
|
19460
19477
|
styles,
|
|
@@ -19473,7 +19490,7 @@ const PaginationControl = factory((_props, ref) => {
|
|
|
19473
19490
|
ref,
|
|
19474
19491
|
disabled: _disabled,
|
|
19475
19492
|
mod: [{ active, disabled: _disabled, "with-padding": withPadding }, mod],
|
|
19476
|
-
...ctx.getStyles("control", { className, style, classNames, styles, active: !_disabled }),
|
|
19493
|
+
...ctx.getStyles("control", { className, style, classNames: classNames2, styles, active: !_disabled }),
|
|
19477
19494
|
...others
|
|
19478
19495
|
}
|
|
19479
19496
|
);
|
|
@@ -19536,9 +19553,9 @@ const defaultProps$j = {
|
|
|
19536
19553
|
};
|
|
19537
19554
|
const PaginationDots = factory((_props, ref) => {
|
|
19538
19555
|
const props = useProps("PaginationDots", defaultProps$j, _props);
|
|
19539
|
-
const { classNames, className, style, styles, vars, icon: Icon, ...others } = props;
|
|
19556
|
+
const { classNames: classNames2, className, style, styles, vars, icon: Icon, ...others } = props;
|
|
19540
19557
|
const ctx = usePaginationContext();
|
|
19541
|
-
return /* @__PURE__ */ jsx(Box, { ref, ...ctx.getStyles("dots", { className, style, styles, classNames }), ...others, children: /* @__PURE__ */ jsx(
|
|
19558
|
+
return /* @__PURE__ */ jsx(Box, { ref, ...ctx.getStyles("dots", { className, style, styles, classNames: classNames2 }), ...others, children: /* @__PURE__ */ jsx(
|
|
19542
19559
|
Icon,
|
|
19543
19560
|
{
|
|
19544
19561
|
style: {
|
|
@@ -19644,7 +19661,7 @@ const varsResolver$f = createVarsResolver(
|
|
|
19644
19661
|
const PaginationRoot = factory((_props, ref) => {
|
|
19645
19662
|
const props = useProps("PaginationRoot", defaultProps$i, _props);
|
|
19646
19663
|
const {
|
|
19647
|
-
classNames,
|
|
19664
|
+
classNames: classNames2,
|
|
19648
19665
|
className,
|
|
19649
19666
|
style,
|
|
19650
19667
|
styles,
|
|
@@ -19674,7 +19691,7 @@ const PaginationRoot = factory((_props, ref) => {
|
|
|
19674
19691
|
props,
|
|
19675
19692
|
className,
|
|
19676
19693
|
style,
|
|
19677
|
-
classNames,
|
|
19694
|
+
classNames: classNames2,
|
|
19678
19695
|
styles,
|
|
19679
19696
|
unstyled,
|
|
19680
19697
|
attributes,
|
|
@@ -19793,7 +19810,7 @@ const varsResolver$e = createVarsResolver((_, { size: size2 }) => ({
|
|
|
19793
19810
|
const PasswordInput$1 = factory((_props, ref) => {
|
|
19794
19811
|
const props = useProps("PasswordInput", defaultProps$g, _props);
|
|
19795
19812
|
const {
|
|
19796
|
-
classNames,
|
|
19813
|
+
classNames: classNames2,
|
|
19797
19814
|
className,
|
|
19798
19815
|
style,
|
|
19799
19816
|
styles,
|
|
@@ -19847,7 +19864,7 @@ const PasswordInput$1 = factory((_props, ref) => {
|
|
|
19847
19864
|
props,
|
|
19848
19865
|
className,
|
|
19849
19866
|
style,
|
|
19850
|
-
classNames,
|
|
19867
|
+
classNames: classNames2,
|
|
19851
19868
|
styles,
|
|
19852
19869
|
unstyled,
|
|
19853
19870
|
attributes,
|
|
@@ -19855,7 +19872,7 @@ const PasswordInput$1 = factory((_props, ref) => {
|
|
|
19855
19872
|
varsResolver: varsResolver$e
|
|
19856
19873
|
});
|
|
19857
19874
|
const { resolvedClassNames, resolvedStyles } = useResolvedStylesApi({
|
|
19858
|
-
classNames,
|
|
19875
|
+
classNames: classNames2,
|
|
19859
19876
|
styles,
|
|
19860
19877
|
props
|
|
19861
19878
|
});
|
|
@@ -20015,7 +20032,7 @@ const PinInput = factory((props, ref) => {
|
|
|
20015
20032
|
gap,
|
|
20016
20033
|
style,
|
|
20017
20034
|
size: size2,
|
|
20018
|
-
classNames,
|
|
20035
|
+
classNames: classNames2,
|
|
20019
20036
|
styles,
|
|
20020
20037
|
unstyled,
|
|
20021
20038
|
length,
|
|
@@ -20049,7 +20066,7 @@ const PinInput = factory((props, ref) => {
|
|
|
20049
20066
|
props,
|
|
20050
20067
|
className,
|
|
20051
20068
|
style,
|
|
20052
|
-
classNames,
|
|
20069
|
+
classNames: classNames2,
|
|
20053
20070
|
styles,
|
|
20054
20071
|
unstyled,
|
|
20055
20072
|
attributes,
|
|
@@ -20057,7 +20074,7 @@ const PinInput = factory((props, ref) => {
|
|
|
20057
20074
|
varsResolver: varsResolver$d
|
|
20058
20075
|
});
|
|
20059
20076
|
const { resolvedClassNames, resolvedStyles } = useResolvedStylesApi({
|
|
20060
|
-
classNames,
|
|
20077
|
+
classNames: classNames2,
|
|
20061
20078
|
styles,
|
|
20062
20079
|
props
|
|
20063
20080
|
});
|
|
@@ -20256,7 +20273,7 @@ const [ProgressProvider, useProgressContext] = createSafeContext(
|
|
|
20256
20273
|
"Progress.Root component was not found in tree"
|
|
20257
20274
|
);
|
|
20258
20275
|
const ProgressLabel = factory((props, ref) => {
|
|
20259
|
-
const { classNames, className, style, styles, vars, ...others } = useProps(
|
|
20276
|
+
const { classNames: classNames2, className, style, styles, vars, ...others } = useProps(
|
|
20260
20277
|
"ProgressLabel",
|
|
20261
20278
|
null,
|
|
20262
20279
|
props
|
|
@@ -20266,7 +20283,7 @@ const ProgressLabel = factory((props, ref) => {
|
|
|
20266
20283
|
Box,
|
|
20267
20284
|
{
|
|
20268
20285
|
ref,
|
|
20269
|
-
...ctx.getStyles("label", { className, style, classNames, styles }),
|
|
20286
|
+
...ctx.getStyles("label", { className, style, classNames: classNames2, styles }),
|
|
20270
20287
|
...others
|
|
20271
20288
|
}
|
|
20272
20289
|
);
|
|
@@ -20285,7 +20302,7 @@ const varsResolver$c = createVarsResolver(
|
|
|
20285
20302
|
const ProgressRoot = factory((_props, ref) => {
|
|
20286
20303
|
const props = useProps("ProgressRoot", null, _props);
|
|
20287
20304
|
const {
|
|
20288
|
-
classNames,
|
|
20305
|
+
classNames: classNames2,
|
|
20289
20306
|
className,
|
|
20290
20307
|
style,
|
|
20291
20308
|
styles,
|
|
@@ -20304,7 +20321,7 @@ const ProgressRoot = factory((_props, ref) => {
|
|
|
20304
20321
|
props,
|
|
20305
20322
|
className,
|
|
20306
20323
|
style,
|
|
20307
|
-
classNames,
|
|
20324
|
+
classNames: classNames2,
|
|
20308
20325
|
styles,
|
|
20309
20326
|
unstyled,
|
|
20310
20327
|
attributes,
|
|
@@ -20320,7 +20337,7 @@ const defaultProps$e = {
|
|
|
20320
20337
|
};
|
|
20321
20338
|
const ProgressSection = factory((props, ref) => {
|
|
20322
20339
|
const {
|
|
20323
|
-
classNames,
|
|
20340
|
+
classNames: classNames2,
|
|
20324
20341
|
className,
|
|
20325
20342
|
style,
|
|
20326
20343
|
styles,
|
|
@@ -20346,7 +20363,7 @@ const ProgressSection = factory((props, ref) => {
|
|
|
20346
20363
|
Box,
|
|
20347
20364
|
{
|
|
20348
20365
|
ref,
|
|
20349
|
-
...ctx.getStyles("section", { className, classNames, styles, style }),
|
|
20366
|
+
...ctx.getStyles("section", { className, classNames: classNames2, styles, style }),
|
|
20350
20367
|
...others,
|
|
20351
20368
|
...ariaAttributes,
|
|
20352
20369
|
mod: [{ striped: striped || animated, animated }, mod],
|
|
@@ -20364,7 +20381,7 @@ const Progress = factory((_props, ref) => {
|
|
|
20364
20381
|
const props = useProps("Progress", null, _props);
|
|
20365
20382
|
const {
|
|
20366
20383
|
value,
|
|
20367
|
-
classNames,
|
|
20384
|
+
classNames: classNames2,
|
|
20368
20385
|
styles,
|
|
20369
20386
|
vars,
|
|
20370
20387
|
color,
|
|
@@ -20374,7 +20391,7 @@ const Progress = factory((_props, ref) => {
|
|
|
20374
20391
|
...others
|
|
20375
20392
|
} = props;
|
|
20376
20393
|
const { resolvedClassNames, resolvedStyles } = useResolvedStylesApi({
|
|
20377
|
-
classNames,
|
|
20394
|
+
classNames: classNames2,
|
|
20378
20395
|
styles,
|
|
20379
20396
|
props
|
|
20380
20397
|
});
|
|
@@ -20491,7 +20508,7 @@ const TooltipFloating = factory((_props, ref) => {
|
|
|
20491
20508
|
withinPortal,
|
|
20492
20509
|
style,
|
|
20493
20510
|
className,
|
|
20494
|
-
classNames,
|
|
20511
|
+
classNames: classNames2,
|
|
20495
20512
|
styles,
|
|
20496
20513
|
unstyled,
|
|
20497
20514
|
radius,
|
|
@@ -20516,7 +20533,7 @@ const TooltipFloating = factory((_props, ref) => {
|
|
|
20516
20533
|
classes: classes$a,
|
|
20517
20534
|
className,
|
|
20518
20535
|
style,
|
|
20519
|
-
classNames,
|
|
20536
|
+
classNames: classNames2,
|
|
20520
20537
|
styles,
|
|
20521
20538
|
unstyled,
|
|
20522
20539
|
attributes,
|
|
@@ -20734,7 +20751,7 @@ const Tooltip$1 = factory((_props, ref) => {
|
|
|
20734
20751
|
withinPortal,
|
|
20735
20752
|
radius,
|
|
20736
20753
|
color,
|
|
20737
|
-
classNames,
|
|
20754
|
+
classNames: classNames2,
|
|
20738
20755
|
styles,
|
|
20739
20756
|
unstyled,
|
|
20740
20757
|
style,
|
|
@@ -20799,7 +20816,7 @@ const Tooltip$1 = factory((_props, ref) => {
|
|
|
20799
20816
|
classes: classes$a,
|
|
20800
20817
|
className,
|
|
20801
20818
|
style,
|
|
20802
|
-
classNames,
|
|
20819
|
+
classNames: classNames2,
|
|
20803
20820
|
styles,
|
|
20804
20821
|
unstyled,
|
|
20805
20822
|
attributes,
|
|
@@ -20952,7 +20969,7 @@ const varsResolver$9 = createVarsResolver(
|
|
|
20952
20969
|
const SegmentedControl = factory((_props, ref) => {
|
|
20953
20970
|
const props = useProps("SegmentedControl", defaultProps$a, _props);
|
|
20954
20971
|
const {
|
|
20955
|
-
classNames,
|
|
20972
|
+
classNames: classNames2,
|
|
20956
20973
|
className,
|
|
20957
20974
|
style,
|
|
20958
20975
|
styles,
|
|
@@ -20985,7 +21002,7 @@ const SegmentedControl = factory((_props, ref) => {
|
|
|
20985
21002
|
classes: classes$9,
|
|
20986
21003
|
className,
|
|
20987
21004
|
style,
|
|
20988
|
-
classNames,
|
|
21005
|
+
classNames: classNames2,
|
|
20989
21006
|
styles,
|
|
20990
21007
|
unstyled,
|
|
20991
21008
|
attributes,
|
|
@@ -21107,7 +21124,7 @@ const defaultProps$9 = {
|
|
|
21107
21124
|
const Select$1 = factory((_props, ref) => {
|
|
21108
21125
|
const props = useProps("Select", defaultProps$9, _props);
|
|
21109
21126
|
const {
|
|
21110
|
-
classNames,
|
|
21127
|
+
classNames: classNames2,
|
|
21111
21128
|
styles,
|
|
21112
21129
|
unstyled,
|
|
21113
21130
|
vars,
|
|
@@ -21205,7 +21222,7 @@ const Select$1 = factory((_props, ref) => {
|
|
|
21205
21222
|
const { resolvedClassNames, resolvedStyles } = useResolvedStylesApi({
|
|
21206
21223
|
props,
|
|
21207
21224
|
styles,
|
|
21208
|
-
classNames
|
|
21225
|
+
classNames: classNames2
|
|
21209
21226
|
});
|
|
21210
21227
|
useEffect(() => {
|
|
21211
21228
|
if (selectFirstOptionOnChange) {
|
|
@@ -21473,7 +21490,7 @@ const defaultProps$8 = {
|
|
|
21473
21490
|
const SimpleGrid = factory((_props, ref) => {
|
|
21474
21491
|
const props = useProps("SimpleGrid", defaultProps$8, _props);
|
|
21475
21492
|
const {
|
|
21476
|
-
classNames,
|
|
21493
|
+
classNames: classNames2,
|
|
21477
21494
|
className,
|
|
21478
21495
|
style,
|
|
21479
21496
|
styles,
|
|
@@ -21492,7 +21509,7 @@ const SimpleGrid = factory((_props, ref) => {
|
|
|
21492
21509
|
props,
|
|
21493
21510
|
className,
|
|
21494
21511
|
style,
|
|
21495
|
-
classNames,
|
|
21512
|
+
classNames: classNames2,
|
|
21496
21513
|
styles,
|
|
21497
21514
|
unstyled,
|
|
21498
21515
|
attributes,
|
|
@@ -21529,7 +21546,7 @@ const varsResolver$8 = createVarsResolver(
|
|
|
21529
21546
|
const Skeleton$1 = factory((_props, ref) => {
|
|
21530
21547
|
const props = useProps("Skeleton", defaultProps$7, _props);
|
|
21531
21548
|
const {
|
|
21532
|
-
classNames,
|
|
21549
|
+
classNames: classNames2,
|
|
21533
21550
|
className,
|
|
21534
21551
|
style,
|
|
21535
21552
|
styles,
|
|
@@ -21551,7 +21568,7 @@ const Skeleton$1 = factory((_props, ref) => {
|
|
|
21551
21568
|
props,
|
|
21552
21569
|
className,
|
|
21553
21570
|
style,
|
|
21554
|
-
classNames,
|
|
21571
|
+
classNames: classNames2,
|
|
21555
21572
|
styles,
|
|
21556
21573
|
unstyled,
|
|
21557
21574
|
attributes,
|
|
@@ -21583,7 +21600,7 @@ const varsResolver$7 = createVarsResolver((_, { gap, align, justify }) => ({
|
|
|
21583
21600
|
const Stack = factory((_props, ref) => {
|
|
21584
21601
|
const props = useProps("Stack", defaultProps$6, _props);
|
|
21585
21602
|
const {
|
|
21586
|
-
classNames,
|
|
21603
|
+
classNames: classNames2,
|
|
21587
21604
|
className,
|
|
21588
21605
|
style,
|
|
21589
21606
|
styles,
|
|
@@ -21602,7 +21619,7 @@ const Stack = factory((_props, ref) => {
|
|
|
21602
21619
|
classes: classes$6,
|
|
21603
21620
|
className,
|
|
21604
21621
|
style,
|
|
21605
|
-
classNames,
|
|
21622
|
+
classNames: classNames2,
|
|
21606
21623
|
styles,
|
|
21607
21624
|
unstyled,
|
|
21608
21625
|
attributes,
|
|
@@ -21674,7 +21691,7 @@ const varsResolver$6 = createVarsResolver((theme2, { radius, color, size: size2
|
|
|
21674
21691
|
const Switch$1 = factory((_props, ref) => {
|
|
21675
21692
|
const props = useProps("Switch", defaultProps$5, _props);
|
|
21676
21693
|
const {
|
|
21677
|
-
classNames,
|
|
21694
|
+
classNames: classNames2,
|
|
21678
21695
|
className,
|
|
21679
21696
|
style,
|
|
21680
21697
|
styles,
|
|
@@ -21711,7 +21728,7 @@ const Switch$1 = factory((_props, ref) => {
|
|
|
21711
21728
|
classes: classes$5,
|
|
21712
21729
|
className,
|
|
21713
21730
|
style,
|
|
21714
|
-
classNames,
|
|
21731
|
+
classNames: classNames2,
|
|
21715
21732
|
styles,
|
|
21716
21733
|
unstyled,
|
|
21717
21734
|
attributes,
|
|
@@ -21748,7 +21765,7 @@ const Switch$1 = factory((_props, ref) => {
|
|
|
21748
21765
|
disabled: withContextProps.disabled,
|
|
21749
21766
|
bodyElement: "label",
|
|
21750
21767
|
labelElement: "span",
|
|
21751
|
-
classNames,
|
|
21768
|
+
classNames: classNames2,
|
|
21752
21769
|
styles,
|
|
21753
21770
|
unstyled,
|
|
21754
21771
|
"data-checked": withContextProps.checked,
|
|
@@ -21839,7 +21856,7 @@ function tableElement(element, options) {
|
|
|
21839
21856
|
const name = `Table${element.charAt(0).toUpperCase()}${element.slice(1)}`;
|
|
21840
21857
|
const Component = factory((_props, ref) => {
|
|
21841
21858
|
const props = useProps(name, {}, _props);
|
|
21842
|
-
const { classNames, className, style, styles, ...others } = props;
|
|
21859
|
+
const { classNames: classNames2, className, style, styles, ...others } = props;
|
|
21843
21860
|
const ctx = useTableContext();
|
|
21844
21861
|
return /* @__PURE__ */ jsx(
|
|
21845
21862
|
Box,
|
|
@@ -21847,7 +21864,7 @@ function tableElement(element, options) {
|
|
|
21847
21864
|
component: element,
|
|
21848
21865
|
ref,
|
|
21849
21866
|
...getDataAttributes(ctx, options),
|
|
21850
|
-
...ctx.getStyles(element, { className, classNames, style, styles, props }),
|
|
21867
|
+
...ctx.getStyles(element, { className, classNames: classNames2, style, styles, props }),
|
|
21851
21868
|
...others
|
|
21852
21869
|
}
|
|
21853
21870
|
);
|
|
@@ -21891,7 +21908,7 @@ const varsResolver$5 = createVarsResolver(
|
|
|
21891
21908
|
const TableScrollContainer = factory((_props, ref) => {
|
|
21892
21909
|
const props = useProps("TableScrollContainer", defaultProps$4, _props);
|
|
21893
21910
|
const {
|
|
21894
|
-
classNames,
|
|
21911
|
+
classNames: classNames2,
|
|
21895
21912
|
className,
|
|
21896
21913
|
style,
|
|
21897
21914
|
styles,
|
|
@@ -21911,7 +21928,7 @@ const TableScrollContainer = factory((_props, ref) => {
|
|
|
21911
21928
|
props,
|
|
21912
21929
|
className,
|
|
21913
21930
|
style,
|
|
21914
|
-
classNames,
|
|
21931
|
+
classNames: classNames2,
|
|
21915
21932
|
styles,
|
|
21916
21933
|
unstyled,
|
|
21917
21934
|
attributes,
|
|
@@ -21966,7 +21983,7 @@ const varsResolver$4 = createVarsResolver(
|
|
|
21966
21983
|
const Table$1 = factory((_props, ref) => {
|
|
21967
21984
|
const props = useProps("Table", defaultProps$3, _props);
|
|
21968
21985
|
const {
|
|
21969
|
-
classNames,
|
|
21986
|
+
classNames: classNames2,
|
|
21970
21987
|
className,
|
|
21971
21988
|
style,
|
|
21972
21989
|
styles,
|
|
@@ -22000,7 +22017,7 @@ const Table$1 = factory((_props, ref) => {
|
|
|
22000
22017
|
className,
|
|
22001
22018
|
style,
|
|
22002
22019
|
classes: classes$4,
|
|
22003
|
-
classNames,
|
|
22020
|
+
classNames: classNames2,
|
|
22004
22021
|
styles,
|
|
22005
22022
|
unstyled,
|
|
22006
22023
|
attributes,
|
|
@@ -22052,7 +22069,7 @@ const [TabsProvider, useTabsContext] = createSafeContext(
|
|
|
22052
22069
|
var classes$3 = { "root": "m_89d60db1", "list--default": "m_576c9d4", "list": "m_89d33d6d", "tab": "m_4ec4dce6", "panel": "m_b0c91715", "tabSection": "m_fc420b1f", "tabLabel": "m_42bbd1ae", "tab--default": "m_539e827b", "list--outline": "m_6772fbd5", "tab--outline": "m_b59ab47c", "tab--pills": "m_c3381914" };
|
|
22053
22070
|
const TabsList = factory((_props, ref) => {
|
|
22054
22071
|
const props = useProps("TabsList", null, _props);
|
|
22055
|
-
const { children, className, grow, justify, classNames, styles, style, mod, ...others } = props;
|
|
22072
|
+
const { children, className, grow, justify, classNames: classNames2, styles, style, mod, ...others } = props;
|
|
22056
22073
|
const ctx = useTabsContext();
|
|
22057
22074
|
return /* @__PURE__ */ jsx(
|
|
22058
22075
|
Box,
|
|
@@ -22061,7 +22078,7 @@ const TabsList = factory((_props, ref) => {
|
|
|
22061
22078
|
...ctx.getStyles("list", {
|
|
22062
22079
|
className,
|
|
22063
22080
|
style,
|
|
22064
|
-
classNames,
|
|
22081
|
+
classNames: classNames2,
|
|
22065
22082
|
styles,
|
|
22066
22083
|
props,
|
|
22067
22084
|
variant: ctx.variant
|
|
@@ -22088,7 +22105,7 @@ TabsList.classes = classes$3;
|
|
|
22088
22105
|
TabsList.displayName = "@mantine/core/TabsList";
|
|
22089
22106
|
const TabsPanel = factory((_props, ref) => {
|
|
22090
22107
|
const props = useProps("TabsPanel", null, _props);
|
|
22091
|
-
const { children, className, value, classNames, styles, style, mod, keepMounted, ...others } = props;
|
|
22108
|
+
const { children, className, value, classNames: classNames2, styles, style, mod, keepMounted, ...others } = props;
|
|
22092
22109
|
const ctx = useTabsContext();
|
|
22093
22110
|
const active = ctx.value === value;
|
|
22094
22111
|
const content = ctx.keepMounted || keepMounted ? children : active ? children : null;
|
|
@@ -22097,7 +22114,7 @@ const TabsPanel = factory((_props, ref) => {
|
|
|
22097
22114
|
{
|
|
22098
22115
|
...ctx.getStyles("panel", {
|
|
22099
22116
|
className,
|
|
22100
|
-
classNames,
|
|
22117
|
+
classNames: classNames2,
|
|
22101
22118
|
styles,
|
|
22102
22119
|
style: [style, !active ? { display: "none" } : void 0],
|
|
22103
22120
|
props
|
|
@@ -22127,7 +22144,7 @@ const TabsTab = factory((_props, ref) => {
|
|
|
22127
22144
|
disabled,
|
|
22128
22145
|
color,
|
|
22129
22146
|
style,
|
|
22130
|
-
classNames,
|
|
22147
|
+
classNames: classNames2,
|
|
22131
22148
|
styles,
|
|
22132
22149
|
vars,
|
|
22133
22150
|
mod,
|
|
@@ -22142,7 +22159,7 @@ const TabsTab = factory((_props, ref) => {
|
|
|
22142
22159
|
ctx.onChange(ctx.allowTabDeactivation ? value === ctx.value ? null : value : value);
|
|
22143
22160
|
onClick?.(event);
|
|
22144
22161
|
};
|
|
22145
|
-
const stylesApiProps = { classNames, styles, props };
|
|
22162
|
+
const stylesApiProps = { classNames: classNames2, styles, props };
|
|
22146
22163
|
return /* @__PURE__ */ jsxs(
|
|
22147
22164
|
UnstyledButton,
|
|
22148
22165
|
{
|
|
@@ -22222,7 +22239,7 @@ const Tabs$1 = factory((_props, ref) => {
|
|
|
22222
22239
|
inverted,
|
|
22223
22240
|
placement,
|
|
22224
22241
|
keepMounted,
|
|
22225
|
-
classNames,
|
|
22242
|
+
classNames: classNames2,
|
|
22226
22243
|
styles,
|
|
22227
22244
|
unstyled,
|
|
22228
22245
|
className,
|
|
@@ -22246,7 +22263,7 @@ const Tabs$1 = factory((_props, ref) => {
|
|
|
22246
22263
|
classes: classes$3,
|
|
22247
22264
|
className,
|
|
22248
22265
|
style,
|
|
22249
|
-
classNames,
|
|
22266
|
+
classNames: classNames2,
|
|
22250
22267
|
styles,
|
|
22251
22268
|
unstyled,
|
|
22252
22269
|
attributes,
|
|
@@ -22332,7 +22349,7 @@ const varsResolver$2 = createVarsResolver(
|
|
|
22332
22349
|
const ThemeIcon = factory((_props, ref) => {
|
|
22333
22350
|
const props = useProps("ThemeIcon", null, _props);
|
|
22334
22351
|
const {
|
|
22335
|
-
classNames,
|
|
22352
|
+
classNames: classNames2,
|
|
22336
22353
|
className,
|
|
22337
22354
|
style,
|
|
22338
22355
|
styles,
|
|
@@ -22348,7 +22365,7 @@ const ThemeIcon = factory((_props, ref) => {
|
|
|
22348
22365
|
props,
|
|
22349
22366
|
className,
|
|
22350
22367
|
style,
|
|
22351
|
-
classNames,
|
|
22368
|
+
classNames: classNames2,
|
|
22352
22369
|
styles,
|
|
22353
22370
|
unstyled,
|
|
22354
22371
|
attributes,
|
|
@@ -22401,7 +22418,7 @@ const varsResolver$1 = createVarsResolver((_, { order, size: size2, lineClamp, t
|
|
|
22401
22418
|
const Title = factory((_props, ref) => {
|
|
22402
22419
|
const props = useProps("Title", defaultProps$1, _props);
|
|
22403
22420
|
const {
|
|
22404
|
-
classNames,
|
|
22421
|
+
classNames: classNames2,
|
|
22405
22422
|
className,
|
|
22406
22423
|
style,
|
|
22407
22424
|
styles,
|
|
@@ -22422,7 +22439,7 @@ const Title = factory((_props, ref) => {
|
|
|
22422
22439
|
classes: classes$1,
|
|
22423
22440
|
className,
|
|
22424
22441
|
style,
|
|
22425
|
-
classNames,
|
|
22442
|
+
classNames: classNames2,
|
|
22426
22443
|
styles,
|
|
22427
22444
|
unstyled,
|
|
22428
22445
|
attributes,
|
|
@@ -22580,7 +22597,7 @@ const varsResolver = createVarsResolver((_, { zIndex, containerWidth }) => ({
|
|
|
22580
22597
|
const Notifications = factory((_props, ref) => {
|
|
22581
22598
|
const props = useProps("Notifications", defaultProps, _props);
|
|
22582
22599
|
const {
|
|
22583
|
-
classNames,
|
|
22600
|
+
classNames: classNames2,
|
|
22584
22601
|
className,
|
|
22585
22602
|
style,
|
|
22586
22603
|
styles,
|
|
@@ -22612,7 +22629,7 @@ const Notifications = factory((_props, ref) => {
|
|
|
22612
22629
|
props,
|
|
22613
22630
|
className,
|
|
22614
22631
|
style,
|
|
22615
|
-
classNames,
|
|
22632
|
+
classNames: classNames2,
|
|
22616
22633
|
styles,
|
|
22617
22634
|
unstyled,
|
|
22618
22635
|
vars,
|
|
@@ -26803,6 +26820,9 @@ Checkbox.displayName = "Checkbox";
|
|
|
26803
26820
|
function Drawer(props) {
|
|
26804
26821
|
return /* @__PURE__ */ jsx(Drawer$1, { position: "right", size: "lg", p: "lg", ...props });
|
|
26805
26822
|
}
|
|
26823
|
+
function Loader(props) {
|
|
26824
|
+
return /* @__PURE__ */ jsx(Loader$1, { ...props });
|
|
26825
|
+
}
|
|
26806
26826
|
function MenuBase(props) {
|
|
26807
26827
|
return /* @__PURE__ */ jsx(Menu$1, { shadow: "md", ...props });
|
|
26808
26828
|
}
|
|
@@ -26886,6 +26906,13 @@ function FairmintLogo({
|
|
|
26886
26906
|
}
|
|
26887
26907
|
);
|
|
26888
26908
|
}
|
|
26909
|
+
const radii = {
|
|
26910
|
+
xs: "0.25rem",
|
|
26911
|
+
sm: "0.375rem",
|
|
26912
|
+
md: "0.5rem",
|
|
26913
|
+
lg: "0.75rem",
|
|
26914
|
+
xl: "1rem"
|
|
26915
|
+
};
|
|
26889
26916
|
const indigo = [
|
|
26890
26917
|
"#EEF2FF",
|
|
26891
26918
|
"#E0E7FF",
|
|
@@ -26990,13 +27017,7 @@ const theme = createTheme({
|
|
|
26990
27017
|
fontFamily: '"Plus Jakarta Sans", sans-serif',
|
|
26991
27018
|
fontWeight: "700"
|
|
26992
27019
|
},
|
|
26993
|
-
radius:
|
|
26994
|
-
xs: "0.25rem",
|
|
26995
|
-
sm: "0.375rem",
|
|
26996
|
-
md: "0.5rem",
|
|
26997
|
-
lg: "0.75rem",
|
|
26998
|
-
xl: "1rem"
|
|
26999
|
-
},
|
|
27020
|
+
radius: radii,
|
|
27000
27021
|
defaultRadius: "md",
|
|
27001
27022
|
breakpoints: {
|
|
27002
27023
|
xs: "30em",
|
|
@@ -28220,6 +28241,72 @@ function PhoneField({ error: error2, ...rest }) {
|
|
|
28220
28241
|
}
|
|
28221
28242
|
);
|
|
28222
28243
|
}
|
|
28244
|
+
const US_STATES = [
|
|
28245
|
+
{ value: "AL", label: "Alabama" },
|
|
28246
|
+
{ value: "AK", label: "Alaska" },
|
|
28247
|
+
{ value: "AZ", label: "Arizona" },
|
|
28248
|
+
{ value: "AR", label: "Arkansas" },
|
|
28249
|
+
{ value: "CA", label: "California" },
|
|
28250
|
+
{ value: "CO", label: "Colorado" },
|
|
28251
|
+
{ value: "CT", label: "Connecticut" },
|
|
28252
|
+
{ value: "DE", label: "Delaware" },
|
|
28253
|
+
{ value: "FL", label: "Florida" },
|
|
28254
|
+
{ value: "GA", label: "Georgia" },
|
|
28255
|
+
{ value: "HI", label: "Hawaii" },
|
|
28256
|
+
{ value: "ID", label: "Idaho" },
|
|
28257
|
+
{ value: "IL", label: "Illinois" },
|
|
28258
|
+
{ value: "IN", label: "Indiana" },
|
|
28259
|
+
{ value: "IA", label: "Iowa" },
|
|
28260
|
+
{ value: "KS", label: "Kansas" },
|
|
28261
|
+
{ value: "KY", label: "Kentucky" },
|
|
28262
|
+
{ value: "LA", label: "Louisiana" },
|
|
28263
|
+
{ value: "ME", label: "Maine" },
|
|
28264
|
+
{ value: "MD", label: "Maryland" },
|
|
28265
|
+
{ value: "MA", label: "Massachusetts" },
|
|
28266
|
+
{ value: "MI", label: "Michigan" },
|
|
28267
|
+
{ value: "MN", label: "Minnesota" },
|
|
28268
|
+
{ value: "MS", label: "Mississippi" },
|
|
28269
|
+
{ value: "MO", label: "Missouri" },
|
|
28270
|
+
{ value: "MT", label: "Montana" },
|
|
28271
|
+
{ value: "NE", label: "Nebraska" },
|
|
28272
|
+
{ value: "NV", label: "Nevada" },
|
|
28273
|
+
{ value: "NH", label: "New Hampshire" },
|
|
28274
|
+
{ value: "NJ", label: "New Jersey" },
|
|
28275
|
+
{ value: "NM", label: "New Mexico" },
|
|
28276
|
+
{ value: "NY", label: "New York" },
|
|
28277
|
+
{ value: "NC", label: "North Carolina" },
|
|
28278
|
+
{ value: "ND", label: "North Dakota" },
|
|
28279
|
+
{ value: "OH", label: "Ohio" },
|
|
28280
|
+
{ value: "OK", label: "Oklahoma" },
|
|
28281
|
+
{ value: "OR", label: "Oregon" },
|
|
28282
|
+
{ value: "PA", label: "Pennsylvania" },
|
|
28283
|
+
{ value: "RI", label: "Rhode Island" },
|
|
28284
|
+
{ value: "SC", label: "South Carolina" },
|
|
28285
|
+
{ value: "SD", label: "South Dakota" },
|
|
28286
|
+
{ value: "TN", label: "Tennessee" },
|
|
28287
|
+
{ value: "TX", label: "Texas" },
|
|
28288
|
+
{ value: "UT", label: "Utah" },
|
|
28289
|
+
{ value: "VT", label: "Vermont" },
|
|
28290
|
+
{ value: "VA", label: "Virginia" },
|
|
28291
|
+
{ value: "WA", label: "Washington" },
|
|
28292
|
+
{ value: "WV", label: "West Virginia" },
|
|
28293
|
+
{ value: "WI", label: "Wisconsin" },
|
|
28294
|
+
{ value: "WY", label: "Wyoming" },
|
|
28295
|
+
{ value: "DC", label: "District of Columbia" }
|
|
28296
|
+
];
|
|
28297
|
+
function USStateField({ label, placeholder, ...rest }) {
|
|
28298
|
+
return /* @__PURE__ */ jsx(
|
|
28299
|
+
Select,
|
|
28300
|
+
{
|
|
28301
|
+
label: label ?? "State",
|
|
28302
|
+
placeholder: placeholder ?? "Select state",
|
|
28303
|
+
data: [...US_STATES],
|
|
28304
|
+
searchable: true,
|
|
28305
|
+
clearable: true,
|
|
28306
|
+
...rest
|
|
28307
|
+
}
|
|
28308
|
+
);
|
|
28309
|
+
}
|
|
28223
28310
|
const US_ZIP_REGEX = /^\d{5}(-\d{4})?$/;
|
|
28224
28311
|
const INTL_POSTAL_REGEX = /^[A-Z0-9]+(?:[ -][A-Z0-9]+)*$/i;
|
|
28225
28312
|
function createZipSchema(options) {
|
|
@@ -28439,7 +28526,7 @@ function DataTable({
|
|
|
28439
28526
|
styles: onRowClick ? {
|
|
28440
28527
|
tr: {
|
|
28441
28528
|
"&:hover": {
|
|
28442
|
-
backgroundColor:
|
|
28529
|
+
backgroundColor: neutralColors[50]
|
|
28443
28530
|
}
|
|
28444
28531
|
}
|
|
28445
28532
|
} : void 0,
|
|
@@ -28621,10 +28708,10 @@ function ListRow({
|
|
|
28621
28708
|
root: {
|
|
28622
28709
|
transition: "background-color 0.15s ease",
|
|
28623
28710
|
"&:hover": {
|
|
28624
|
-
backgroundColor:
|
|
28711
|
+
backgroundColor: neutralColors[50]
|
|
28625
28712
|
},
|
|
28626
28713
|
"&:focus-visible": {
|
|
28627
|
-
outline: `2px solid
|
|
28714
|
+
outline: `2px solid ${brandColors.indigo}`,
|
|
28628
28715
|
outlineOffset: "-2px"
|
|
28629
28716
|
}
|
|
28630
28717
|
}
|
|
@@ -28638,6 +28725,1257 @@ function ListRow({
|
|
|
28638
28725
|
function Percent({ value, decimals = 2, ...rest }) {
|
|
28639
28726
|
return /* @__PURE__ */ jsx(Text, { component: "span", ...rest, children: formatPercent(value, decimals) });
|
|
28640
28727
|
}
|
|
28728
|
+
var UserAgent_DEPRECATED_1;
|
|
28729
|
+
var hasRequiredUserAgent_DEPRECATED;
|
|
28730
|
+
function requireUserAgent_DEPRECATED() {
|
|
28731
|
+
if (hasRequiredUserAgent_DEPRECATED) return UserAgent_DEPRECATED_1;
|
|
28732
|
+
hasRequiredUserAgent_DEPRECATED = 1;
|
|
28733
|
+
var _populated = false;
|
|
28734
|
+
var _ie, _firefox, _opera, _webkit, _chrome;
|
|
28735
|
+
var _ie_real_version;
|
|
28736
|
+
var _osx, _windows, _linux, _android;
|
|
28737
|
+
var _win64;
|
|
28738
|
+
var _iphone, _ipad, _native;
|
|
28739
|
+
var _mobile;
|
|
28740
|
+
function _populate() {
|
|
28741
|
+
if (_populated) {
|
|
28742
|
+
return;
|
|
28743
|
+
}
|
|
28744
|
+
_populated = true;
|
|
28745
|
+
var uas = navigator.userAgent;
|
|
28746
|
+
var agent = /(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(uas);
|
|
28747
|
+
var os = /(Mac OS X)|(Windows)|(Linux)/.exec(uas);
|
|
28748
|
+
_iphone = /\b(iPhone|iP[ao]d)/.exec(uas);
|
|
28749
|
+
_ipad = /\b(iP[ao]d)/.exec(uas);
|
|
28750
|
+
_android = /Android/i.exec(uas);
|
|
28751
|
+
_native = /FBAN\/\w+;/i.exec(uas);
|
|
28752
|
+
_mobile = /Mobile/i.exec(uas);
|
|
28753
|
+
_win64 = !!/Win64/.exec(uas);
|
|
28754
|
+
if (agent) {
|
|
28755
|
+
_ie = agent[1] ? parseFloat(agent[1]) : agent[5] ? parseFloat(agent[5]) : NaN;
|
|
28756
|
+
if (_ie && document && document.documentMode) {
|
|
28757
|
+
_ie = document.documentMode;
|
|
28758
|
+
}
|
|
28759
|
+
var trident = /(?:Trident\/(\d+.\d+))/.exec(uas);
|
|
28760
|
+
_ie_real_version = trident ? parseFloat(trident[1]) + 4 : _ie;
|
|
28761
|
+
_firefox = agent[2] ? parseFloat(agent[2]) : NaN;
|
|
28762
|
+
_opera = agent[3] ? parseFloat(agent[3]) : NaN;
|
|
28763
|
+
_webkit = agent[4] ? parseFloat(agent[4]) : NaN;
|
|
28764
|
+
if (_webkit) {
|
|
28765
|
+
agent = /(?:Chrome\/(\d+\.\d+))/.exec(uas);
|
|
28766
|
+
_chrome = agent && agent[1] ? parseFloat(agent[1]) : NaN;
|
|
28767
|
+
} else {
|
|
28768
|
+
_chrome = NaN;
|
|
28769
|
+
}
|
|
28770
|
+
} else {
|
|
28771
|
+
_ie = _firefox = _opera = _chrome = _webkit = NaN;
|
|
28772
|
+
}
|
|
28773
|
+
if (os) {
|
|
28774
|
+
if (os[1]) {
|
|
28775
|
+
var ver = /(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(uas);
|
|
28776
|
+
_osx = ver ? parseFloat(ver[1].replace("_", ".")) : true;
|
|
28777
|
+
} else {
|
|
28778
|
+
_osx = false;
|
|
28779
|
+
}
|
|
28780
|
+
_windows = !!os[2];
|
|
28781
|
+
_linux = !!os[3];
|
|
28782
|
+
} else {
|
|
28783
|
+
_osx = _windows = _linux = false;
|
|
28784
|
+
}
|
|
28785
|
+
}
|
|
28786
|
+
var UserAgent_DEPRECATED = {
|
|
28787
|
+
/**
|
|
28788
|
+
* Check if the UA is Internet Explorer.
|
|
28789
|
+
*
|
|
28790
|
+
*
|
|
28791
|
+
* @return float|NaN Version number (if match) or NaN.
|
|
28792
|
+
*/
|
|
28793
|
+
ie: function() {
|
|
28794
|
+
return _populate() || _ie;
|
|
28795
|
+
},
|
|
28796
|
+
/**
|
|
28797
|
+
* Check if we're in Internet Explorer compatibility mode.
|
|
28798
|
+
*
|
|
28799
|
+
* @return bool true if in compatibility mode, false if
|
|
28800
|
+
* not compatibility mode or not ie
|
|
28801
|
+
*/
|
|
28802
|
+
ieCompatibilityMode: function() {
|
|
28803
|
+
return _populate() || _ie_real_version > _ie;
|
|
28804
|
+
},
|
|
28805
|
+
/**
|
|
28806
|
+
* Whether the browser is 64-bit IE. Really, this is kind of weak sauce; we
|
|
28807
|
+
* only need this because Skype can't handle 64-bit IE yet. We need to remove
|
|
28808
|
+
* this when we don't need it -- tracked by #601957.
|
|
28809
|
+
*/
|
|
28810
|
+
ie64: function() {
|
|
28811
|
+
return UserAgent_DEPRECATED.ie() && _win64;
|
|
28812
|
+
},
|
|
28813
|
+
/**
|
|
28814
|
+
* Check if the UA is Firefox.
|
|
28815
|
+
*
|
|
28816
|
+
*
|
|
28817
|
+
* @return float|NaN Version number (if match) or NaN.
|
|
28818
|
+
*/
|
|
28819
|
+
firefox: function() {
|
|
28820
|
+
return _populate() || _firefox;
|
|
28821
|
+
},
|
|
28822
|
+
/**
|
|
28823
|
+
* Check if the UA is Opera.
|
|
28824
|
+
*
|
|
28825
|
+
*
|
|
28826
|
+
* @return float|NaN Version number (if match) or NaN.
|
|
28827
|
+
*/
|
|
28828
|
+
opera: function() {
|
|
28829
|
+
return _populate() || _opera;
|
|
28830
|
+
},
|
|
28831
|
+
/**
|
|
28832
|
+
* Check if the UA is WebKit.
|
|
28833
|
+
*
|
|
28834
|
+
*
|
|
28835
|
+
* @return float|NaN Version number (if match) or NaN.
|
|
28836
|
+
*/
|
|
28837
|
+
webkit: function() {
|
|
28838
|
+
return _populate() || _webkit;
|
|
28839
|
+
},
|
|
28840
|
+
/**
|
|
28841
|
+
* For Push
|
|
28842
|
+
* WILL BE REMOVED VERY SOON. Use UserAgent_DEPRECATED.webkit
|
|
28843
|
+
*/
|
|
28844
|
+
safari: function() {
|
|
28845
|
+
return UserAgent_DEPRECATED.webkit();
|
|
28846
|
+
},
|
|
28847
|
+
/**
|
|
28848
|
+
* Check if the UA is a Chrome browser.
|
|
28849
|
+
*
|
|
28850
|
+
*
|
|
28851
|
+
* @return float|NaN Version number (if match) or NaN.
|
|
28852
|
+
*/
|
|
28853
|
+
chrome: function() {
|
|
28854
|
+
return _populate() || _chrome;
|
|
28855
|
+
},
|
|
28856
|
+
/**
|
|
28857
|
+
* Check if the user is running Windows.
|
|
28858
|
+
*
|
|
28859
|
+
* @return bool `true' if the user's OS is Windows.
|
|
28860
|
+
*/
|
|
28861
|
+
windows: function() {
|
|
28862
|
+
return _populate() || _windows;
|
|
28863
|
+
},
|
|
28864
|
+
/**
|
|
28865
|
+
* Check if the user is running Mac OS X.
|
|
28866
|
+
*
|
|
28867
|
+
* @return float|bool Returns a float if a version number is detected,
|
|
28868
|
+
* otherwise true/false.
|
|
28869
|
+
*/
|
|
28870
|
+
osx: function() {
|
|
28871
|
+
return _populate() || _osx;
|
|
28872
|
+
},
|
|
28873
|
+
/**
|
|
28874
|
+
* Check if the user is running Linux.
|
|
28875
|
+
*
|
|
28876
|
+
* @return bool `true' if the user's OS is some flavor of Linux.
|
|
28877
|
+
*/
|
|
28878
|
+
linux: function() {
|
|
28879
|
+
return _populate() || _linux;
|
|
28880
|
+
},
|
|
28881
|
+
/**
|
|
28882
|
+
* Check if the user is running on an iPhone or iPod platform.
|
|
28883
|
+
*
|
|
28884
|
+
* @return bool `true' if the user is running some flavor of the
|
|
28885
|
+
* iPhone OS.
|
|
28886
|
+
*/
|
|
28887
|
+
iphone: function() {
|
|
28888
|
+
return _populate() || _iphone;
|
|
28889
|
+
},
|
|
28890
|
+
mobile: function() {
|
|
28891
|
+
return _populate() || (_iphone || _ipad || _android || _mobile);
|
|
28892
|
+
},
|
|
28893
|
+
nativeApp: function() {
|
|
28894
|
+
return _populate() || _native;
|
|
28895
|
+
},
|
|
28896
|
+
android: function() {
|
|
28897
|
+
return _populate() || _android;
|
|
28898
|
+
},
|
|
28899
|
+
ipad: function() {
|
|
28900
|
+
return _populate() || _ipad;
|
|
28901
|
+
}
|
|
28902
|
+
};
|
|
28903
|
+
UserAgent_DEPRECATED_1 = UserAgent_DEPRECATED;
|
|
28904
|
+
return UserAgent_DEPRECATED_1;
|
|
28905
|
+
}
|
|
28906
|
+
var ExecutionEnvironment_1;
|
|
28907
|
+
var hasRequiredExecutionEnvironment;
|
|
28908
|
+
function requireExecutionEnvironment() {
|
|
28909
|
+
if (hasRequiredExecutionEnvironment) return ExecutionEnvironment_1;
|
|
28910
|
+
hasRequiredExecutionEnvironment = 1;
|
|
28911
|
+
var canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
28912
|
+
var ExecutionEnvironment = {
|
|
28913
|
+
canUseDOM,
|
|
28914
|
+
canUseWorkers: typeof Worker !== "undefined",
|
|
28915
|
+
canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent),
|
|
28916
|
+
canUseViewport: canUseDOM && !!window.screen,
|
|
28917
|
+
isInWorker: !canUseDOM
|
|
28918
|
+
// For now, this is true - might change in the future.
|
|
28919
|
+
};
|
|
28920
|
+
ExecutionEnvironment_1 = ExecutionEnvironment;
|
|
28921
|
+
return ExecutionEnvironment_1;
|
|
28922
|
+
}
|
|
28923
|
+
var isEventSupported_1;
|
|
28924
|
+
var hasRequiredIsEventSupported;
|
|
28925
|
+
function requireIsEventSupported() {
|
|
28926
|
+
if (hasRequiredIsEventSupported) return isEventSupported_1;
|
|
28927
|
+
hasRequiredIsEventSupported = 1;
|
|
28928
|
+
var ExecutionEnvironment = requireExecutionEnvironment();
|
|
28929
|
+
var useHasFeature;
|
|
28930
|
+
if (ExecutionEnvironment.canUseDOM) {
|
|
28931
|
+
useHasFeature = document.implementation && document.implementation.hasFeature && // always returns true in newer browsers as per the standard.
|
|
28932
|
+
// @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
|
|
28933
|
+
document.implementation.hasFeature("", "") !== true;
|
|
28934
|
+
}
|
|
28935
|
+
function isEventSupported(eventNameSuffix, capture) {
|
|
28936
|
+
if (!ExecutionEnvironment.canUseDOM || capture && !("addEventListener" in document)) {
|
|
28937
|
+
return false;
|
|
28938
|
+
}
|
|
28939
|
+
var eventName = "on" + eventNameSuffix;
|
|
28940
|
+
var isSupported = eventName in document;
|
|
28941
|
+
if (!isSupported) {
|
|
28942
|
+
var element = document.createElement("div");
|
|
28943
|
+
element.setAttribute(eventName, "return;");
|
|
28944
|
+
isSupported = typeof element[eventName] === "function";
|
|
28945
|
+
}
|
|
28946
|
+
if (!isSupported && useHasFeature && eventNameSuffix === "wheel") {
|
|
28947
|
+
isSupported = document.implementation.hasFeature("Events.wheel", "3.0");
|
|
28948
|
+
}
|
|
28949
|
+
return isSupported;
|
|
28950
|
+
}
|
|
28951
|
+
isEventSupported_1 = isEventSupported;
|
|
28952
|
+
return isEventSupported_1;
|
|
28953
|
+
}
|
|
28954
|
+
var normalizeWheel_1;
|
|
28955
|
+
var hasRequiredNormalizeWheel$1;
|
|
28956
|
+
function requireNormalizeWheel$1() {
|
|
28957
|
+
if (hasRequiredNormalizeWheel$1) return normalizeWheel_1;
|
|
28958
|
+
hasRequiredNormalizeWheel$1 = 1;
|
|
28959
|
+
var UserAgent_DEPRECATED = requireUserAgent_DEPRECATED();
|
|
28960
|
+
var isEventSupported = requireIsEventSupported();
|
|
28961
|
+
var PIXEL_STEP = 10;
|
|
28962
|
+
var LINE_HEIGHT = 40;
|
|
28963
|
+
var PAGE_HEIGHT = 800;
|
|
28964
|
+
function normalizeWheel2(event) {
|
|
28965
|
+
var sX = 0, sY = 0, pX = 0, pY = 0;
|
|
28966
|
+
if ("detail" in event) {
|
|
28967
|
+
sY = event.detail;
|
|
28968
|
+
}
|
|
28969
|
+
if ("wheelDelta" in event) {
|
|
28970
|
+
sY = -event.wheelDelta / 120;
|
|
28971
|
+
}
|
|
28972
|
+
if ("wheelDeltaY" in event) {
|
|
28973
|
+
sY = -event.wheelDeltaY / 120;
|
|
28974
|
+
}
|
|
28975
|
+
if ("wheelDeltaX" in event) {
|
|
28976
|
+
sX = -event.wheelDeltaX / 120;
|
|
28977
|
+
}
|
|
28978
|
+
if ("axis" in event && event.axis === event.HORIZONTAL_AXIS) {
|
|
28979
|
+
sX = sY;
|
|
28980
|
+
sY = 0;
|
|
28981
|
+
}
|
|
28982
|
+
pX = sX * PIXEL_STEP;
|
|
28983
|
+
pY = sY * PIXEL_STEP;
|
|
28984
|
+
if ("deltaY" in event) {
|
|
28985
|
+
pY = event.deltaY;
|
|
28986
|
+
}
|
|
28987
|
+
if ("deltaX" in event) {
|
|
28988
|
+
pX = event.deltaX;
|
|
28989
|
+
}
|
|
28990
|
+
if ((pX || pY) && event.deltaMode) {
|
|
28991
|
+
if (event.deltaMode == 1) {
|
|
28992
|
+
pX *= LINE_HEIGHT;
|
|
28993
|
+
pY *= LINE_HEIGHT;
|
|
28994
|
+
} else {
|
|
28995
|
+
pX *= PAGE_HEIGHT;
|
|
28996
|
+
pY *= PAGE_HEIGHT;
|
|
28997
|
+
}
|
|
28998
|
+
}
|
|
28999
|
+
if (pX && !sX) {
|
|
29000
|
+
sX = pX < 1 ? -1 : 1;
|
|
29001
|
+
}
|
|
29002
|
+
if (pY && !sY) {
|
|
29003
|
+
sY = pY < 1 ? -1 : 1;
|
|
29004
|
+
}
|
|
29005
|
+
return {
|
|
29006
|
+
spinX: sX,
|
|
29007
|
+
spinY: sY,
|
|
29008
|
+
pixelX: pX,
|
|
29009
|
+
pixelY: pY
|
|
29010
|
+
};
|
|
29011
|
+
}
|
|
29012
|
+
normalizeWheel2.getEventType = function() {
|
|
29013
|
+
return UserAgent_DEPRECATED.firefox() ? "DOMMouseScroll" : isEventSupported("wheel") ? "wheel" : "mousewheel";
|
|
29014
|
+
};
|
|
29015
|
+
normalizeWheel_1 = normalizeWheel2;
|
|
29016
|
+
return normalizeWheel_1;
|
|
29017
|
+
}
|
|
29018
|
+
var normalizeWheel$1;
|
|
29019
|
+
var hasRequiredNormalizeWheel;
|
|
29020
|
+
function requireNormalizeWheel() {
|
|
29021
|
+
if (hasRequiredNormalizeWheel) return normalizeWheel$1;
|
|
29022
|
+
hasRequiredNormalizeWheel = 1;
|
|
29023
|
+
normalizeWheel$1 = requireNormalizeWheel$1();
|
|
29024
|
+
return normalizeWheel$1;
|
|
29025
|
+
}
|
|
29026
|
+
var normalizeWheelExports = requireNormalizeWheel();
|
|
29027
|
+
const normalizeWheel = /* @__PURE__ */ getDefaultExportFromCjs(normalizeWheelExports);
|
|
29028
|
+
function getCropSize(mediaWidth, mediaHeight, containerWidth, containerHeight, aspect, rotation) {
|
|
29029
|
+
if (rotation === void 0) {
|
|
29030
|
+
rotation = 0;
|
|
29031
|
+
}
|
|
29032
|
+
var _a = rotateSize(mediaWidth, mediaHeight, rotation), width = _a.width, height = _a.height;
|
|
29033
|
+
var fittingWidth = Math.min(width, containerWidth);
|
|
29034
|
+
var fittingHeight = Math.min(height, containerHeight);
|
|
29035
|
+
if (fittingWidth > fittingHeight * aspect) {
|
|
29036
|
+
return {
|
|
29037
|
+
width: fittingHeight * aspect,
|
|
29038
|
+
height: fittingHeight
|
|
29039
|
+
};
|
|
29040
|
+
}
|
|
29041
|
+
return {
|
|
29042
|
+
width: fittingWidth,
|
|
29043
|
+
height: fittingWidth / aspect
|
|
29044
|
+
};
|
|
29045
|
+
}
|
|
29046
|
+
function getMediaZoom(mediaSize) {
|
|
29047
|
+
return mediaSize.width > mediaSize.height ? mediaSize.width / mediaSize.naturalWidth : mediaSize.height / mediaSize.naturalHeight;
|
|
29048
|
+
}
|
|
29049
|
+
function restrictPosition(position, mediaSize, cropSize, zoom, rotation) {
|
|
29050
|
+
if (rotation === void 0) {
|
|
29051
|
+
rotation = 0;
|
|
29052
|
+
}
|
|
29053
|
+
var _a = rotateSize(mediaSize.width, mediaSize.height, rotation), width = _a.width, height = _a.height;
|
|
29054
|
+
return {
|
|
29055
|
+
x: restrictPositionCoord(position.x, width, cropSize.width, zoom),
|
|
29056
|
+
y: restrictPositionCoord(position.y, height, cropSize.height, zoom)
|
|
29057
|
+
};
|
|
29058
|
+
}
|
|
29059
|
+
function restrictPositionCoord(position, mediaSize, cropSize, zoom) {
|
|
29060
|
+
var maxPosition = mediaSize * zoom / 2 - cropSize / 2;
|
|
29061
|
+
return clamp(position, -maxPosition, maxPosition);
|
|
29062
|
+
}
|
|
29063
|
+
function getDistanceBetweenPoints(pointA, pointB) {
|
|
29064
|
+
return Math.sqrt(Math.pow(pointA.y - pointB.y, 2) + Math.pow(pointA.x - pointB.x, 2));
|
|
29065
|
+
}
|
|
29066
|
+
function getRotationBetweenPoints(pointA, pointB) {
|
|
29067
|
+
return Math.atan2(pointB.y - pointA.y, pointB.x - pointA.x) * 180 / Math.PI;
|
|
29068
|
+
}
|
|
29069
|
+
function computeCroppedArea(crop, mediaSize, cropSize, aspect, zoom, rotation, restrictPosition2) {
|
|
29070
|
+
if (rotation === void 0) {
|
|
29071
|
+
rotation = 0;
|
|
29072
|
+
}
|
|
29073
|
+
if (restrictPosition2 === void 0) {
|
|
29074
|
+
restrictPosition2 = true;
|
|
29075
|
+
}
|
|
29076
|
+
var limitAreaFn = restrictPosition2 ? limitArea : noOp;
|
|
29077
|
+
var mediaBBoxSize = rotateSize(mediaSize.width, mediaSize.height, rotation);
|
|
29078
|
+
var mediaNaturalBBoxSize = rotateSize(mediaSize.naturalWidth, mediaSize.naturalHeight, rotation);
|
|
29079
|
+
var croppedAreaPercentages = {
|
|
29080
|
+
x: limitAreaFn(100, ((mediaBBoxSize.width - cropSize.width / zoom) / 2 - crop.x / zoom) / mediaBBoxSize.width * 100),
|
|
29081
|
+
y: limitAreaFn(100, ((mediaBBoxSize.height - cropSize.height / zoom) / 2 - crop.y / zoom) / mediaBBoxSize.height * 100),
|
|
29082
|
+
width: limitAreaFn(100, cropSize.width / mediaBBoxSize.width * 100 / zoom),
|
|
29083
|
+
height: limitAreaFn(100, cropSize.height / mediaBBoxSize.height * 100 / zoom)
|
|
29084
|
+
};
|
|
29085
|
+
var widthInPixels = Math.round(limitAreaFn(mediaNaturalBBoxSize.width, croppedAreaPercentages.width * mediaNaturalBBoxSize.width / 100));
|
|
29086
|
+
var heightInPixels = Math.round(limitAreaFn(mediaNaturalBBoxSize.height, croppedAreaPercentages.height * mediaNaturalBBoxSize.height / 100));
|
|
29087
|
+
var isImgWiderThanHigh = mediaNaturalBBoxSize.width >= mediaNaturalBBoxSize.height * aspect;
|
|
29088
|
+
var sizePixels = isImgWiderThanHigh ? {
|
|
29089
|
+
width: Math.round(heightInPixels * aspect),
|
|
29090
|
+
height: heightInPixels
|
|
29091
|
+
} : {
|
|
29092
|
+
width: widthInPixels,
|
|
29093
|
+
height: Math.round(widthInPixels / aspect)
|
|
29094
|
+
};
|
|
29095
|
+
var croppedAreaPixels = __assign(__assign({}, sizePixels), {
|
|
29096
|
+
x: Math.round(limitAreaFn(mediaNaturalBBoxSize.width - sizePixels.width, croppedAreaPercentages.x * mediaNaturalBBoxSize.width / 100)),
|
|
29097
|
+
y: Math.round(limitAreaFn(mediaNaturalBBoxSize.height - sizePixels.height, croppedAreaPercentages.y * mediaNaturalBBoxSize.height / 100))
|
|
29098
|
+
});
|
|
29099
|
+
return {
|
|
29100
|
+
croppedAreaPercentages,
|
|
29101
|
+
croppedAreaPixels
|
|
29102
|
+
};
|
|
29103
|
+
}
|
|
29104
|
+
function limitArea(max2, value) {
|
|
29105
|
+
return Math.min(max2, Math.max(0, value));
|
|
29106
|
+
}
|
|
29107
|
+
function noOp(_max, value) {
|
|
29108
|
+
return value;
|
|
29109
|
+
}
|
|
29110
|
+
function getInitialCropFromCroppedAreaPercentages(croppedAreaPercentages, mediaSize, rotation, cropSize, minZoom, maxZoom) {
|
|
29111
|
+
var mediaBBoxSize = rotateSize(mediaSize.width, mediaSize.height, rotation);
|
|
29112
|
+
var zoom = clamp(cropSize.width / mediaBBoxSize.width * (100 / croppedAreaPercentages.width), minZoom, maxZoom);
|
|
29113
|
+
var crop = {
|
|
29114
|
+
x: zoom * mediaBBoxSize.width / 2 - cropSize.width / 2 - mediaBBoxSize.width * zoom * (croppedAreaPercentages.x / 100),
|
|
29115
|
+
y: zoom * mediaBBoxSize.height / 2 - cropSize.height / 2 - mediaBBoxSize.height * zoom * (croppedAreaPercentages.y / 100)
|
|
29116
|
+
};
|
|
29117
|
+
return {
|
|
29118
|
+
crop,
|
|
29119
|
+
zoom
|
|
29120
|
+
};
|
|
29121
|
+
}
|
|
29122
|
+
function getZoomFromCroppedAreaPixels(croppedAreaPixels, mediaSize, cropSize) {
|
|
29123
|
+
var mediaZoom = getMediaZoom(mediaSize);
|
|
29124
|
+
return cropSize.height > cropSize.width ? cropSize.height / (croppedAreaPixels.height * mediaZoom) : cropSize.width / (croppedAreaPixels.width * mediaZoom);
|
|
29125
|
+
}
|
|
29126
|
+
function getInitialCropFromCroppedAreaPixels(croppedAreaPixels, mediaSize, rotation, cropSize, minZoom, maxZoom) {
|
|
29127
|
+
if (rotation === void 0) {
|
|
29128
|
+
rotation = 0;
|
|
29129
|
+
}
|
|
29130
|
+
var mediaNaturalBBoxSize = rotateSize(mediaSize.naturalWidth, mediaSize.naturalHeight, rotation);
|
|
29131
|
+
var zoom = clamp(getZoomFromCroppedAreaPixels(croppedAreaPixels, mediaSize, cropSize), minZoom, maxZoom);
|
|
29132
|
+
var cropZoom = cropSize.height > cropSize.width ? cropSize.height / croppedAreaPixels.height : cropSize.width / croppedAreaPixels.width;
|
|
29133
|
+
var crop = {
|
|
29134
|
+
x: ((mediaNaturalBBoxSize.width - croppedAreaPixels.width) / 2 - croppedAreaPixels.x) * cropZoom,
|
|
29135
|
+
y: ((mediaNaturalBBoxSize.height - croppedAreaPixels.height) / 2 - croppedAreaPixels.y) * cropZoom
|
|
29136
|
+
};
|
|
29137
|
+
return {
|
|
29138
|
+
crop,
|
|
29139
|
+
zoom
|
|
29140
|
+
};
|
|
29141
|
+
}
|
|
29142
|
+
function getCenter(a, b) {
|
|
29143
|
+
return {
|
|
29144
|
+
x: (b.x + a.x) / 2,
|
|
29145
|
+
y: (b.y + a.y) / 2
|
|
29146
|
+
};
|
|
29147
|
+
}
|
|
29148
|
+
function getRadianAngle(degreeValue) {
|
|
29149
|
+
return degreeValue * Math.PI / 180;
|
|
29150
|
+
}
|
|
29151
|
+
function rotateSize(width, height, rotation) {
|
|
29152
|
+
var rotRad = getRadianAngle(rotation);
|
|
29153
|
+
return {
|
|
29154
|
+
width: Math.abs(Math.cos(rotRad) * width) + Math.abs(Math.sin(rotRad) * height),
|
|
29155
|
+
height: Math.abs(Math.sin(rotRad) * width) + Math.abs(Math.cos(rotRad) * height)
|
|
29156
|
+
};
|
|
29157
|
+
}
|
|
29158
|
+
function clamp(value, min2, max2) {
|
|
29159
|
+
return Math.min(Math.max(value, min2), max2);
|
|
29160
|
+
}
|
|
29161
|
+
function classNames() {
|
|
29162
|
+
var args = [];
|
|
29163
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
29164
|
+
args[_i] = arguments[_i];
|
|
29165
|
+
}
|
|
29166
|
+
return args.filter(function(value) {
|
|
29167
|
+
if (typeof value === "string" && value.length > 0) {
|
|
29168
|
+
return true;
|
|
29169
|
+
}
|
|
29170
|
+
return false;
|
|
29171
|
+
}).join(" ").trim();
|
|
29172
|
+
}
|
|
29173
|
+
var css_248z = ".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n user-select: none;\n touch-action: none;\n cursor: move;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_Contain {\n max-width: 100%;\n max-height: 100%;\n margin: auto;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n.reactEasyCrop_Cover_Horizontal {\n width: 100%;\n height: auto;\n}\n.reactEasyCrop_Cover_Vertical {\n width: auto;\n height: 100%;\n}\n\n.reactEasyCrop_CropArea {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n border: 1px solid rgba(255, 255, 255, 0.5);\n box-sizing: border-box;\n box-shadow: 0 0 0 9999em;\n color: rgba(0, 0, 0, 0.5);\n overflow: hidden;\n}\n\n.reactEasyCrop_CropAreaRound {\n border-radius: 50%;\n}\n\n.reactEasyCrop_CropAreaGrid::before {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 0;\n bottom: 0;\n left: 33.33%;\n right: 33.33%;\n border-top: 0;\n border-bottom: 0;\n}\n\n.reactEasyCrop_CropAreaGrid::after {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 33.33%;\n bottom: 33.33%;\n left: 0;\n right: 0;\n border-left: 0;\n border-right: 0;\n}\n";
|
|
29174
|
+
var MIN_ZOOM = 1;
|
|
29175
|
+
var MAX_ZOOM = 3;
|
|
29176
|
+
var KEYBOARD_STEP = 1;
|
|
29177
|
+
var Cropper = (
|
|
29178
|
+
/** @class */
|
|
29179
|
+
(function(_super) {
|
|
29180
|
+
__extends(Cropper2, _super);
|
|
29181
|
+
function Cropper2() {
|
|
29182
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
29183
|
+
_this.cropperRef = React.createRef();
|
|
29184
|
+
_this.imageRef = React.createRef();
|
|
29185
|
+
_this.videoRef = React.createRef();
|
|
29186
|
+
_this.containerPosition = {
|
|
29187
|
+
x: 0,
|
|
29188
|
+
y: 0
|
|
29189
|
+
};
|
|
29190
|
+
_this.containerRef = null;
|
|
29191
|
+
_this.styleRef = null;
|
|
29192
|
+
_this.containerRect = null;
|
|
29193
|
+
_this.mediaSize = {
|
|
29194
|
+
width: 0,
|
|
29195
|
+
height: 0,
|
|
29196
|
+
naturalWidth: 0,
|
|
29197
|
+
naturalHeight: 0
|
|
29198
|
+
};
|
|
29199
|
+
_this.dragStartPosition = {
|
|
29200
|
+
x: 0,
|
|
29201
|
+
y: 0
|
|
29202
|
+
};
|
|
29203
|
+
_this.dragStartCrop = {
|
|
29204
|
+
x: 0,
|
|
29205
|
+
y: 0
|
|
29206
|
+
};
|
|
29207
|
+
_this.gestureZoomStart = 0;
|
|
29208
|
+
_this.gestureRotationStart = 0;
|
|
29209
|
+
_this.isTouching = false;
|
|
29210
|
+
_this.lastPinchDistance = 0;
|
|
29211
|
+
_this.lastPinchRotation = 0;
|
|
29212
|
+
_this.rafDragTimeout = null;
|
|
29213
|
+
_this.rafPinchTimeout = null;
|
|
29214
|
+
_this.wheelTimer = null;
|
|
29215
|
+
_this.currentDoc = typeof document !== "undefined" ? document : null;
|
|
29216
|
+
_this.currentWindow = typeof window !== "undefined" ? window : null;
|
|
29217
|
+
_this.resizeObserver = null;
|
|
29218
|
+
_this.previousCropSize = null;
|
|
29219
|
+
_this.isInitialized = false;
|
|
29220
|
+
_this.state = {
|
|
29221
|
+
cropSize: null,
|
|
29222
|
+
hasWheelJustStarted: false,
|
|
29223
|
+
mediaObjectFit: void 0
|
|
29224
|
+
};
|
|
29225
|
+
_this.initResizeObserver = function() {
|
|
29226
|
+
if (typeof window.ResizeObserver === "undefined" || !_this.containerRef) {
|
|
29227
|
+
return;
|
|
29228
|
+
}
|
|
29229
|
+
var isFirstResize = true;
|
|
29230
|
+
_this.resizeObserver = new window.ResizeObserver(function(entries) {
|
|
29231
|
+
if (isFirstResize) {
|
|
29232
|
+
isFirstResize = false;
|
|
29233
|
+
return;
|
|
29234
|
+
}
|
|
29235
|
+
_this.computeSizes();
|
|
29236
|
+
});
|
|
29237
|
+
_this.resizeObserver.observe(_this.containerRef);
|
|
29238
|
+
};
|
|
29239
|
+
_this.preventZoomSafari = function(e) {
|
|
29240
|
+
return e.preventDefault();
|
|
29241
|
+
};
|
|
29242
|
+
_this.cleanEvents = function() {
|
|
29243
|
+
if (!_this.currentDoc) return;
|
|
29244
|
+
_this.currentDoc.removeEventListener("mousemove", _this.onMouseMove);
|
|
29245
|
+
_this.currentDoc.removeEventListener("mouseup", _this.onDragStopped);
|
|
29246
|
+
_this.currentDoc.removeEventListener("touchmove", _this.onTouchMove);
|
|
29247
|
+
_this.currentDoc.removeEventListener("touchend", _this.onDragStopped);
|
|
29248
|
+
_this.currentDoc.removeEventListener("gesturechange", _this.onGestureChange);
|
|
29249
|
+
_this.currentDoc.removeEventListener("gestureend", _this.onGestureEnd);
|
|
29250
|
+
_this.currentDoc.removeEventListener("scroll", _this.onScroll);
|
|
29251
|
+
};
|
|
29252
|
+
_this.clearScrollEvent = function() {
|
|
29253
|
+
if (_this.containerRef) _this.containerRef.removeEventListener("wheel", _this.onWheel);
|
|
29254
|
+
if (_this.wheelTimer) {
|
|
29255
|
+
clearTimeout(_this.wheelTimer);
|
|
29256
|
+
}
|
|
29257
|
+
};
|
|
29258
|
+
_this.onMediaLoad = function() {
|
|
29259
|
+
var cropSize = _this.computeSizes();
|
|
29260
|
+
if (cropSize) {
|
|
29261
|
+
_this.previousCropSize = cropSize;
|
|
29262
|
+
_this.emitCropData();
|
|
29263
|
+
_this.setInitialCrop(cropSize);
|
|
29264
|
+
_this.isInitialized = true;
|
|
29265
|
+
}
|
|
29266
|
+
if (_this.props.onMediaLoaded) {
|
|
29267
|
+
_this.props.onMediaLoaded(_this.mediaSize);
|
|
29268
|
+
}
|
|
29269
|
+
};
|
|
29270
|
+
_this.setInitialCrop = function(cropSize) {
|
|
29271
|
+
if (_this.props.initialCroppedAreaPercentages) {
|
|
29272
|
+
var _a = getInitialCropFromCroppedAreaPercentages(_this.props.initialCroppedAreaPercentages, _this.mediaSize, _this.props.rotation, cropSize, _this.props.minZoom, _this.props.maxZoom), crop = _a.crop, zoom = _a.zoom;
|
|
29273
|
+
_this.props.onCropChange(crop);
|
|
29274
|
+
_this.props.onZoomChange && _this.props.onZoomChange(zoom);
|
|
29275
|
+
} else if (_this.props.initialCroppedAreaPixels) {
|
|
29276
|
+
var _b = getInitialCropFromCroppedAreaPixels(_this.props.initialCroppedAreaPixels, _this.mediaSize, _this.props.rotation, cropSize, _this.props.minZoom, _this.props.maxZoom), crop = _b.crop, zoom = _b.zoom;
|
|
29277
|
+
_this.props.onCropChange(crop);
|
|
29278
|
+
_this.props.onZoomChange && _this.props.onZoomChange(zoom);
|
|
29279
|
+
}
|
|
29280
|
+
};
|
|
29281
|
+
_this.computeSizes = function() {
|
|
29282
|
+
var _a, _b, _c, _d, _e, _f;
|
|
29283
|
+
var mediaRef = _this.imageRef.current || _this.videoRef.current;
|
|
29284
|
+
if (mediaRef && _this.containerRef) {
|
|
29285
|
+
_this.containerRect = _this.containerRef.getBoundingClientRect();
|
|
29286
|
+
_this.saveContainerPosition();
|
|
29287
|
+
var containerAspect = _this.containerRect.width / _this.containerRect.height;
|
|
29288
|
+
var naturalWidth = ((_a = _this.imageRef.current) === null || _a === void 0 ? void 0 : _a.naturalWidth) || ((_b = _this.videoRef.current) === null || _b === void 0 ? void 0 : _b.videoWidth) || 0;
|
|
29289
|
+
var naturalHeight = ((_c = _this.imageRef.current) === null || _c === void 0 ? void 0 : _c.naturalHeight) || ((_d = _this.videoRef.current) === null || _d === void 0 ? void 0 : _d.videoHeight) || 0;
|
|
29290
|
+
var isMediaScaledDown = mediaRef.offsetWidth < naturalWidth || mediaRef.offsetHeight < naturalHeight;
|
|
29291
|
+
var mediaAspect = naturalWidth / naturalHeight;
|
|
29292
|
+
var renderedMediaSize = void 0;
|
|
29293
|
+
if (isMediaScaledDown) {
|
|
29294
|
+
switch (_this.state.mediaObjectFit) {
|
|
29295
|
+
default:
|
|
29296
|
+
case "contain":
|
|
29297
|
+
renderedMediaSize = containerAspect > mediaAspect ? {
|
|
29298
|
+
width: _this.containerRect.height * mediaAspect,
|
|
29299
|
+
height: _this.containerRect.height
|
|
29300
|
+
} : {
|
|
29301
|
+
width: _this.containerRect.width,
|
|
29302
|
+
height: _this.containerRect.width / mediaAspect
|
|
29303
|
+
};
|
|
29304
|
+
break;
|
|
29305
|
+
case "horizontal-cover":
|
|
29306
|
+
renderedMediaSize = {
|
|
29307
|
+
width: _this.containerRect.width,
|
|
29308
|
+
height: _this.containerRect.width / mediaAspect
|
|
29309
|
+
};
|
|
29310
|
+
break;
|
|
29311
|
+
case "vertical-cover":
|
|
29312
|
+
renderedMediaSize = {
|
|
29313
|
+
width: _this.containerRect.height * mediaAspect,
|
|
29314
|
+
height: _this.containerRect.height
|
|
29315
|
+
};
|
|
29316
|
+
break;
|
|
29317
|
+
}
|
|
29318
|
+
} else {
|
|
29319
|
+
renderedMediaSize = {
|
|
29320
|
+
width: mediaRef.offsetWidth,
|
|
29321
|
+
height: mediaRef.offsetHeight
|
|
29322
|
+
};
|
|
29323
|
+
}
|
|
29324
|
+
_this.mediaSize = __assign(__assign({}, renderedMediaSize), {
|
|
29325
|
+
naturalWidth,
|
|
29326
|
+
naturalHeight
|
|
29327
|
+
});
|
|
29328
|
+
if (_this.props.setMediaSize) {
|
|
29329
|
+
_this.props.setMediaSize(_this.mediaSize);
|
|
29330
|
+
}
|
|
29331
|
+
var cropSize = _this.props.cropSize ? _this.props.cropSize : getCropSize(_this.mediaSize.width, _this.mediaSize.height, _this.containerRect.width, _this.containerRect.height, _this.props.aspect, _this.props.rotation);
|
|
29332
|
+
if (((_e = _this.state.cropSize) === null || _e === void 0 ? void 0 : _e.height) !== cropSize.height || ((_f = _this.state.cropSize) === null || _f === void 0 ? void 0 : _f.width) !== cropSize.width) {
|
|
29333
|
+
_this.props.onCropSizeChange && _this.props.onCropSizeChange(cropSize);
|
|
29334
|
+
}
|
|
29335
|
+
_this.setState({
|
|
29336
|
+
cropSize
|
|
29337
|
+
}, _this.recomputeCropPosition);
|
|
29338
|
+
if (_this.props.setCropSize) {
|
|
29339
|
+
_this.props.setCropSize(cropSize);
|
|
29340
|
+
}
|
|
29341
|
+
return cropSize;
|
|
29342
|
+
}
|
|
29343
|
+
};
|
|
29344
|
+
_this.saveContainerPosition = function() {
|
|
29345
|
+
if (_this.containerRef) {
|
|
29346
|
+
var bounds = _this.containerRef.getBoundingClientRect();
|
|
29347
|
+
_this.containerPosition = {
|
|
29348
|
+
x: bounds.left,
|
|
29349
|
+
y: bounds.top
|
|
29350
|
+
};
|
|
29351
|
+
}
|
|
29352
|
+
};
|
|
29353
|
+
_this.onMouseDown = function(e) {
|
|
29354
|
+
if (!_this.currentDoc) return;
|
|
29355
|
+
e.preventDefault();
|
|
29356
|
+
_this.currentDoc.addEventListener("mousemove", _this.onMouseMove);
|
|
29357
|
+
_this.currentDoc.addEventListener("mouseup", _this.onDragStopped);
|
|
29358
|
+
_this.saveContainerPosition();
|
|
29359
|
+
_this.onDragStart(Cropper2.getMousePoint(e));
|
|
29360
|
+
};
|
|
29361
|
+
_this.onMouseMove = function(e) {
|
|
29362
|
+
return _this.onDrag(Cropper2.getMousePoint(e));
|
|
29363
|
+
};
|
|
29364
|
+
_this.onScroll = function(e) {
|
|
29365
|
+
if (!_this.currentDoc) return;
|
|
29366
|
+
e.preventDefault();
|
|
29367
|
+
_this.saveContainerPosition();
|
|
29368
|
+
};
|
|
29369
|
+
_this.onTouchStart = function(e) {
|
|
29370
|
+
if (!_this.currentDoc) return;
|
|
29371
|
+
_this.isTouching = true;
|
|
29372
|
+
if (_this.props.onTouchRequest && !_this.props.onTouchRequest(e)) {
|
|
29373
|
+
return;
|
|
29374
|
+
}
|
|
29375
|
+
_this.currentDoc.addEventListener("touchmove", _this.onTouchMove, {
|
|
29376
|
+
passive: false
|
|
29377
|
+
});
|
|
29378
|
+
_this.currentDoc.addEventListener("touchend", _this.onDragStopped);
|
|
29379
|
+
_this.saveContainerPosition();
|
|
29380
|
+
if (e.touches.length === 2) {
|
|
29381
|
+
_this.onPinchStart(e);
|
|
29382
|
+
} else if (e.touches.length === 1) {
|
|
29383
|
+
_this.onDragStart(Cropper2.getTouchPoint(e.touches[0]));
|
|
29384
|
+
}
|
|
29385
|
+
};
|
|
29386
|
+
_this.onTouchMove = function(e) {
|
|
29387
|
+
e.preventDefault();
|
|
29388
|
+
if (e.touches.length === 2) {
|
|
29389
|
+
_this.onPinchMove(e);
|
|
29390
|
+
} else if (e.touches.length === 1) {
|
|
29391
|
+
_this.onDrag(Cropper2.getTouchPoint(e.touches[0]));
|
|
29392
|
+
}
|
|
29393
|
+
};
|
|
29394
|
+
_this.onGestureStart = function(e) {
|
|
29395
|
+
if (!_this.currentDoc) return;
|
|
29396
|
+
e.preventDefault();
|
|
29397
|
+
_this.currentDoc.addEventListener("gesturechange", _this.onGestureChange);
|
|
29398
|
+
_this.currentDoc.addEventListener("gestureend", _this.onGestureEnd);
|
|
29399
|
+
_this.gestureZoomStart = _this.props.zoom;
|
|
29400
|
+
_this.gestureRotationStart = _this.props.rotation;
|
|
29401
|
+
};
|
|
29402
|
+
_this.onGestureChange = function(e) {
|
|
29403
|
+
e.preventDefault();
|
|
29404
|
+
if (_this.isTouching) {
|
|
29405
|
+
return;
|
|
29406
|
+
}
|
|
29407
|
+
var point = Cropper2.getMousePoint(e);
|
|
29408
|
+
var newZoom = _this.gestureZoomStart - 1 + e.scale;
|
|
29409
|
+
_this.setNewZoom(newZoom, point, {
|
|
29410
|
+
shouldUpdatePosition: true
|
|
29411
|
+
});
|
|
29412
|
+
if (_this.props.onRotationChange) {
|
|
29413
|
+
var newRotation = _this.gestureRotationStart + e.rotation;
|
|
29414
|
+
_this.props.onRotationChange(newRotation);
|
|
29415
|
+
}
|
|
29416
|
+
};
|
|
29417
|
+
_this.onGestureEnd = function(e) {
|
|
29418
|
+
_this.cleanEvents();
|
|
29419
|
+
};
|
|
29420
|
+
_this.onDragStart = function(_a) {
|
|
29421
|
+
var _b, _c;
|
|
29422
|
+
var x = _a.x, y = _a.y;
|
|
29423
|
+
_this.dragStartPosition = {
|
|
29424
|
+
x,
|
|
29425
|
+
y
|
|
29426
|
+
};
|
|
29427
|
+
_this.dragStartCrop = __assign({}, _this.props.crop);
|
|
29428
|
+
(_c = (_b = _this.props).onInteractionStart) === null || _c === void 0 ? void 0 : _c.call(_b);
|
|
29429
|
+
};
|
|
29430
|
+
_this.onDrag = function(_a) {
|
|
29431
|
+
var x = _a.x, y = _a.y;
|
|
29432
|
+
if (!_this.currentWindow) return;
|
|
29433
|
+
if (_this.rafDragTimeout) _this.currentWindow.cancelAnimationFrame(_this.rafDragTimeout);
|
|
29434
|
+
_this.rafDragTimeout = _this.currentWindow.requestAnimationFrame(function() {
|
|
29435
|
+
if (!_this.state.cropSize) return;
|
|
29436
|
+
if (x === void 0 || y === void 0) return;
|
|
29437
|
+
var offsetX = x - _this.dragStartPosition.x;
|
|
29438
|
+
var offsetY = y - _this.dragStartPosition.y;
|
|
29439
|
+
var requestedPosition = {
|
|
29440
|
+
x: _this.dragStartCrop.x + offsetX,
|
|
29441
|
+
y: _this.dragStartCrop.y + offsetY
|
|
29442
|
+
};
|
|
29443
|
+
var newPosition = _this.props.restrictPosition ? restrictPosition(requestedPosition, _this.mediaSize, _this.state.cropSize, _this.props.zoom, _this.props.rotation) : requestedPosition;
|
|
29444
|
+
_this.props.onCropChange(newPosition);
|
|
29445
|
+
});
|
|
29446
|
+
};
|
|
29447
|
+
_this.onDragStopped = function() {
|
|
29448
|
+
var _a, _b;
|
|
29449
|
+
_this.isTouching = false;
|
|
29450
|
+
_this.cleanEvents();
|
|
29451
|
+
_this.emitCropData();
|
|
29452
|
+
(_b = (_a = _this.props).onInteractionEnd) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
29453
|
+
};
|
|
29454
|
+
_this.onWheel = function(e) {
|
|
29455
|
+
if (!_this.currentWindow) return;
|
|
29456
|
+
if (_this.props.onWheelRequest && !_this.props.onWheelRequest(e)) {
|
|
29457
|
+
return;
|
|
29458
|
+
}
|
|
29459
|
+
e.preventDefault();
|
|
29460
|
+
var point = Cropper2.getMousePoint(e);
|
|
29461
|
+
var pixelY = normalizeWheel(e).pixelY;
|
|
29462
|
+
var newZoom = _this.props.zoom - pixelY * _this.props.zoomSpeed / 200;
|
|
29463
|
+
_this.setNewZoom(newZoom, point, {
|
|
29464
|
+
shouldUpdatePosition: true
|
|
29465
|
+
});
|
|
29466
|
+
if (!_this.state.hasWheelJustStarted) {
|
|
29467
|
+
_this.setState({
|
|
29468
|
+
hasWheelJustStarted: true
|
|
29469
|
+
}, function() {
|
|
29470
|
+
var _a, _b;
|
|
29471
|
+
return (_b = (_a = _this.props).onInteractionStart) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
29472
|
+
});
|
|
29473
|
+
}
|
|
29474
|
+
if (_this.wheelTimer) {
|
|
29475
|
+
clearTimeout(_this.wheelTimer);
|
|
29476
|
+
}
|
|
29477
|
+
_this.wheelTimer = _this.currentWindow.setTimeout(function() {
|
|
29478
|
+
return _this.setState({
|
|
29479
|
+
hasWheelJustStarted: false
|
|
29480
|
+
}, function() {
|
|
29481
|
+
var _a, _b;
|
|
29482
|
+
return (_b = (_a = _this.props).onInteractionEnd) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
29483
|
+
});
|
|
29484
|
+
}, 250);
|
|
29485
|
+
};
|
|
29486
|
+
_this.getPointOnContainer = function(_a, containerTopLeft) {
|
|
29487
|
+
var x = _a.x, y = _a.y;
|
|
29488
|
+
if (!_this.containerRect) {
|
|
29489
|
+
throw new Error("The Cropper is not mounted");
|
|
29490
|
+
}
|
|
29491
|
+
return {
|
|
29492
|
+
x: _this.containerRect.width / 2 - (x - containerTopLeft.x),
|
|
29493
|
+
y: _this.containerRect.height / 2 - (y - containerTopLeft.y)
|
|
29494
|
+
};
|
|
29495
|
+
};
|
|
29496
|
+
_this.getPointOnMedia = function(_a) {
|
|
29497
|
+
var x = _a.x, y = _a.y;
|
|
29498
|
+
var _b = _this.props, crop = _b.crop, zoom = _b.zoom;
|
|
29499
|
+
return {
|
|
29500
|
+
x: (x + crop.x) / zoom,
|
|
29501
|
+
y: (y + crop.y) / zoom
|
|
29502
|
+
};
|
|
29503
|
+
};
|
|
29504
|
+
_this.setNewZoom = function(zoom, point, _a) {
|
|
29505
|
+
var _b = _a === void 0 ? {} : _a, _c = _b.shouldUpdatePosition, shouldUpdatePosition = _c === void 0 ? true : _c;
|
|
29506
|
+
if (!_this.state.cropSize || !_this.props.onZoomChange) return;
|
|
29507
|
+
var newZoom = clamp(zoom, _this.props.minZoom, _this.props.maxZoom);
|
|
29508
|
+
if (shouldUpdatePosition) {
|
|
29509
|
+
var zoomPoint = _this.getPointOnContainer(point, _this.containerPosition);
|
|
29510
|
+
var zoomTarget = _this.getPointOnMedia(zoomPoint);
|
|
29511
|
+
var requestedPosition = {
|
|
29512
|
+
x: zoomTarget.x * newZoom - zoomPoint.x,
|
|
29513
|
+
y: zoomTarget.y * newZoom - zoomPoint.y
|
|
29514
|
+
};
|
|
29515
|
+
var newPosition = _this.props.restrictPosition ? restrictPosition(requestedPosition, _this.mediaSize, _this.state.cropSize, newZoom, _this.props.rotation) : requestedPosition;
|
|
29516
|
+
_this.props.onCropChange(newPosition);
|
|
29517
|
+
}
|
|
29518
|
+
_this.props.onZoomChange(newZoom);
|
|
29519
|
+
};
|
|
29520
|
+
_this.getCropData = function() {
|
|
29521
|
+
if (!_this.state.cropSize) {
|
|
29522
|
+
return null;
|
|
29523
|
+
}
|
|
29524
|
+
var restrictedPosition = _this.props.restrictPosition ? restrictPosition(_this.props.crop, _this.mediaSize, _this.state.cropSize, _this.props.zoom, _this.props.rotation) : _this.props.crop;
|
|
29525
|
+
return computeCroppedArea(restrictedPosition, _this.mediaSize, _this.state.cropSize, _this.getAspect(), _this.props.zoom, _this.props.rotation, _this.props.restrictPosition);
|
|
29526
|
+
};
|
|
29527
|
+
_this.emitCropData = function() {
|
|
29528
|
+
var cropData = _this.getCropData();
|
|
29529
|
+
if (!cropData) return;
|
|
29530
|
+
var croppedAreaPercentages = cropData.croppedAreaPercentages, croppedAreaPixels = cropData.croppedAreaPixels;
|
|
29531
|
+
if (_this.props.onCropComplete) {
|
|
29532
|
+
_this.props.onCropComplete(croppedAreaPercentages, croppedAreaPixels);
|
|
29533
|
+
}
|
|
29534
|
+
if (_this.props.onCropAreaChange) {
|
|
29535
|
+
_this.props.onCropAreaChange(croppedAreaPercentages, croppedAreaPixels);
|
|
29536
|
+
}
|
|
29537
|
+
};
|
|
29538
|
+
_this.emitCropAreaChange = function() {
|
|
29539
|
+
var cropData = _this.getCropData();
|
|
29540
|
+
if (!cropData) return;
|
|
29541
|
+
var croppedAreaPercentages = cropData.croppedAreaPercentages, croppedAreaPixels = cropData.croppedAreaPixels;
|
|
29542
|
+
if (_this.props.onCropAreaChange) {
|
|
29543
|
+
_this.props.onCropAreaChange(croppedAreaPercentages, croppedAreaPixels);
|
|
29544
|
+
}
|
|
29545
|
+
};
|
|
29546
|
+
_this.recomputeCropPosition = function() {
|
|
29547
|
+
var _a, _b;
|
|
29548
|
+
if (!_this.state.cropSize) return;
|
|
29549
|
+
var adjustedCrop = _this.props.crop;
|
|
29550
|
+
if (_this.isInitialized && ((_a = _this.previousCropSize) === null || _a === void 0 ? void 0 : _a.width) && ((_b = _this.previousCropSize) === null || _b === void 0 ? void 0 : _b.height)) {
|
|
29551
|
+
var sizeChanged = Math.abs(_this.previousCropSize.width - _this.state.cropSize.width) > 1e-6 || Math.abs(_this.previousCropSize.height - _this.state.cropSize.height) > 1e-6;
|
|
29552
|
+
if (sizeChanged) {
|
|
29553
|
+
var scaleX = _this.state.cropSize.width / _this.previousCropSize.width;
|
|
29554
|
+
var scaleY = _this.state.cropSize.height / _this.previousCropSize.height;
|
|
29555
|
+
adjustedCrop = {
|
|
29556
|
+
x: _this.props.crop.x * scaleX,
|
|
29557
|
+
y: _this.props.crop.y * scaleY
|
|
29558
|
+
};
|
|
29559
|
+
}
|
|
29560
|
+
}
|
|
29561
|
+
var newPosition = _this.props.restrictPosition ? restrictPosition(adjustedCrop, _this.mediaSize, _this.state.cropSize, _this.props.zoom, _this.props.rotation) : adjustedCrop;
|
|
29562
|
+
_this.previousCropSize = _this.state.cropSize;
|
|
29563
|
+
_this.props.onCropChange(newPosition);
|
|
29564
|
+
_this.emitCropData();
|
|
29565
|
+
};
|
|
29566
|
+
_this.onKeyDown = function(event) {
|
|
29567
|
+
var _a, _b;
|
|
29568
|
+
var _c = _this.props, crop = _c.crop, onCropChange = _c.onCropChange, keyboardStep = _c.keyboardStep, zoom = _c.zoom, rotation = _c.rotation;
|
|
29569
|
+
var step = keyboardStep;
|
|
29570
|
+
if (!_this.state.cropSize) return;
|
|
29571
|
+
if (event.shiftKey) {
|
|
29572
|
+
step *= 0.2;
|
|
29573
|
+
}
|
|
29574
|
+
var newCrop = __assign({}, crop);
|
|
29575
|
+
switch (event.key) {
|
|
29576
|
+
case "ArrowUp":
|
|
29577
|
+
newCrop.y -= step;
|
|
29578
|
+
event.preventDefault();
|
|
29579
|
+
break;
|
|
29580
|
+
case "ArrowDown":
|
|
29581
|
+
newCrop.y += step;
|
|
29582
|
+
event.preventDefault();
|
|
29583
|
+
break;
|
|
29584
|
+
case "ArrowLeft":
|
|
29585
|
+
newCrop.x -= step;
|
|
29586
|
+
event.preventDefault();
|
|
29587
|
+
break;
|
|
29588
|
+
case "ArrowRight":
|
|
29589
|
+
newCrop.x += step;
|
|
29590
|
+
event.preventDefault();
|
|
29591
|
+
break;
|
|
29592
|
+
default:
|
|
29593
|
+
return;
|
|
29594
|
+
}
|
|
29595
|
+
if (_this.props.restrictPosition) {
|
|
29596
|
+
newCrop = restrictPosition(newCrop, _this.mediaSize, _this.state.cropSize, zoom, rotation);
|
|
29597
|
+
}
|
|
29598
|
+
if (!event.repeat) {
|
|
29599
|
+
(_b = (_a = _this.props).onInteractionStart) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
29600
|
+
}
|
|
29601
|
+
onCropChange(newCrop);
|
|
29602
|
+
};
|
|
29603
|
+
_this.onKeyUp = function(event) {
|
|
29604
|
+
var _a, _b;
|
|
29605
|
+
switch (event.key) {
|
|
29606
|
+
case "ArrowUp":
|
|
29607
|
+
case "ArrowDown":
|
|
29608
|
+
case "ArrowLeft":
|
|
29609
|
+
case "ArrowRight":
|
|
29610
|
+
event.preventDefault();
|
|
29611
|
+
break;
|
|
29612
|
+
default:
|
|
29613
|
+
return;
|
|
29614
|
+
}
|
|
29615
|
+
_this.emitCropData();
|
|
29616
|
+
(_b = (_a = _this.props).onInteractionEnd) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
29617
|
+
};
|
|
29618
|
+
return _this;
|
|
29619
|
+
}
|
|
29620
|
+
Cropper2.prototype.componentDidMount = function() {
|
|
29621
|
+
if (!this.currentDoc || !this.currentWindow) return;
|
|
29622
|
+
if (this.containerRef) {
|
|
29623
|
+
if (this.containerRef.ownerDocument) {
|
|
29624
|
+
this.currentDoc = this.containerRef.ownerDocument;
|
|
29625
|
+
}
|
|
29626
|
+
if (this.currentDoc.defaultView) {
|
|
29627
|
+
this.currentWindow = this.currentDoc.defaultView;
|
|
29628
|
+
}
|
|
29629
|
+
this.initResizeObserver();
|
|
29630
|
+
if (typeof window.ResizeObserver === "undefined") {
|
|
29631
|
+
this.currentWindow.addEventListener("resize", this.computeSizes);
|
|
29632
|
+
}
|
|
29633
|
+
this.props.zoomWithScroll && this.containerRef.addEventListener("wheel", this.onWheel, {
|
|
29634
|
+
passive: false
|
|
29635
|
+
});
|
|
29636
|
+
this.containerRef.addEventListener("gesturestart", this.onGestureStart);
|
|
29637
|
+
}
|
|
29638
|
+
this.currentDoc.addEventListener("scroll", this.onScroll);
|
|
29639
|
+
if (!this.props.disableAutomaticStylesInjection) {
|
|
29640
|
+
this.styleRef = this.currentDoc.createElement("style");
|
|
29641
|
+
this.styleRef.setAttribute("type", "text/css");
|
|
29642
|
+
if (this.props.nonce) {
|
|
29643
|
+
this.styleRef.setAttribute("nonce", this.props.nonce);
|
|
29644
|
+
}
|
|
29645
|
+
this.styleRef.innerHTML = css_248z;
|
|
29646
|
+
this.currentDoc.head.appendChild(this.styleRef);
|
|
29647
|
+
}
|
|
29648
|
+
if (this.imageRef.current && this.imageRef.current.complete) {
|
|
29649
|
+
this.onMediaLoad();
|
|
29650
|
+
}
|
|
29651
|
+
if (this.props.setImageRef) {
|
|
29652
|
+
this.props.setImageRef(this.imageRef);
|
|
29653
|
+
}
|
|
29654
|
+
if (this.props.setVideoRef) {
|
|
29655
|
+
this.props.setVideoRef(this.videoRef);
|
|
29656
|
+
}
|
|
29657
|
+
if (this.props.setCropperRef) {
|
|
29658
|
+
this.props.setCropperRef(this.cropperRef);
|
|
29659
|
+
}
|
|
29660
|
+
};
|
|
29661
|
+
Cropper2.prototype.componentWillUnmount = function() {
|
|
29662
|
+
var _a, _b;
|
|
29663
|
+
if (!this.currentDoc || !this.currentWindow) return;
|
|
29664
|
+
if (typeof window.ResizeObserver === "undefined") {
|
|
29665
|
+
this.currentWindow.removeEventListener("resize", this.computeSizes);
|
|
29666
|
+
}
|
|
29667
|
+
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
29668
|
+
if (this.containerRef) {
|
|
29669
|
+
this.containerRef.removeEventListener("gesturestart", this.preventZoomSafari);
|
|
29670
|
+
}
|
|
29671
|
+
if (this.styleRef) {
|
|
29672
|
+
(_b = this.styleRef.parentNode) === null || _b === void 0 ? void 0 : _b.removeChild(this.styleRef);
|
|
29673
|
+
}
|
|
29674
|
+
this.cleanEvents();
|
|
29675
|
+
this.props.zoomWithScroll && this.clearScrollEvent();
|
|
29676
|
+
};
|
|
29677
|
+
Cropper2.prototype.componentDidUpdate = function(prevProps) {
|
|
29678
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
29679
|
+
if (prevProps.rotation !== this.props.rotation) {
|
|
29680
|
+
this.computeSizes();
|
|
29681
|
+
this.recomputeCropPosition();
|
|
29682
|
+
} else if (prevProps.aspect !== this.props.aspect) {
|
|
29683
|
+
this.computeSizes();
|
|
29684
|
+
} else if (prevProps.objectFit !== this.props.objectFit) {
|
|
29685
|
+
this.computeSizes();
|
|
29686
|
+
} else if (prevProps.zoom !== this.props.zoom) {
|
|
29687
|
+
this.recomputeCropPosition();
|
|
29688
|
+
} else if (((_a = prevProps.cropSize) === null || _a === void 0 ? void 0 : _a.height) !== ((_b = this.props.cropSize) === null || _b === void 0 ? void 0 : _b.height) || ((_c = prevProps.cropSize) === null || _c === void 0 ? void 0 : _c.width) !== ((_d = this.props.cropSize) === null || _d === void 0 ? void 0 : _d.width)) {
|
|
29689
|
+
this.computeSizes();
|
|
29690
|
+
} else if (((_e = prevProps.crop) === null || _e === void 0 ? void 0 : _e.x) !== ((_f = this.props.crop) === null || _f === void 0 ? void 0 : _f.x) || ((_g = prevProps.crop) === null || _g === void 0 ? void 0 : _g.y) !== ((_h = this.props.crop) === null || _h === void 0 ? void 0 : _h.y)) {
|
|
29691
|
+
this.emitCropAreaChange();
|
|
29692
|
+
}
|
|
29693
|
+
if (prevProps.zoomWithScroll !== this.props.zoomWithScroll && this.containerRef) {
|
|
29694
|
+
this.props.zoomWithScroll ? this.containerRef.addEventListener("wheel", this.onWheel, {
|
|
29695
|
+
passive: false
|
|
29696
|
+
}) : this.clearScrollEvent();
|
|
29697
|
+
}
|
|
29698
|
+
if (prevProps.video !== this.props.video) {
|
|
29699
|
+
(_j = this.videoRef.current) === null || _j === void 0 ? void 0 : _j.load();
|
|
29700
|
+
}
|
|
29701
|
+
var objectFit = this.getObjectFit();
|
|
29702
|
+
if (objectFit !== this.state.mediaObjectFit) {
|
|
29703
|
+
this.setState({
|
|
29704
|
+
mediaObjectFit: objectFit
|
|
29705
|
+
}, this.computeSizes);
|
|
29706
|
+
}
|
|
29707
|
+
};
|
|
29708
|
+
Cropper2.prototype.getAspect = function() {
|
|
29709
|
+
var _a = this.props, cropSize = _a.cropSize, aspect = _a.aspect;
|
|
29710
|
+
if (cropSize) {
|
|
29711
|
+
return cropSize.width / cropSize.height;
|
|
29712
|
+
}
|
|
29713
|
+
return aspect;
|
|
29714
|
+
};
|
|
29715
|
+
Cropper2.prototype.getObjectFit = function() {
|
|
29716
|
+
var _a, _b, _c, _d;
|
|
29717
|
+
if (this.props.objectFit === "cover") {
|
|
29718
|
+
var mediaRef = this.imageRef.current || this.videoRef.current;
|
|
29719
|
+
if (mediaRef && this.containerRef) {
|
|
29720
|
+
this.containerRect = this.containerRef.getBoundingClientRect();
|
|
29721
|
+
var containerAspect = this.containerRect.width / this.containerRect.height;
|
|
29722
|
+
var naturalWidth = ((_a = this.imageRef.current) === null || _a === void 0 ? void 0 : _a.naturalWidth) || ((_b = this.videoRef.current) === null || _b === void 0 ? void 0 : _b.videoWidth) || 0;
|
|
29723
|
+
var naturalHeight = ((_c = this.imageRef.current) === null || _c === void 0 ? void 0 : _c.naturalHeight) || ((_d = this.videoRef.current) === null || _d === void 0 ? void 0 : _d.videoHeight) || 0;
|
|
29724
|
+
var mediaAspect = naturalWidth / naturalHeight;
|
|
29725
|
+
return mediaAspect < containerAspect ? "horizontal-cover" : "vertical-cover";
|
|
29726
|
+
}
|
|
29727
|
+
return "horizontal-cover";
|
|
29728
|
+
}
|
|
29729
|
+
return this.props.objectFit;
|
|
29730
|
+
};
|
|
29731
|
+
Cropper2.prototype.onPinchStart = function(e) {
|
|
29732
|
+
var pointA = Cropper2.getTouchPoint(e.touches[0]);
|
|
29733
|
+
var pointB = Cropper2.getTouchPoint(e.touches[1]);
|
|
29734
|
+
this.lastPinchDistance = getDistanceBetweenPoints(pointA, pointB);
|
|
29735
|
+
this.lastPinchRotation = getRotationBetweenPoints(pointA, pointB);
|
|
29736
|
+
this.onDragStart(getCenter(pointA, pointB));
|
|
29737
|
+
};
|
|
29738
|
+
Cropper2.prototype.onPinchMove = function(e) {
|
|
29739
|
+
var _this = this;
|
|
29740
|
+
if (!this.currentDoc || !this.currentWindow) return;
|
|
29741
|
+
var pointA = Cropper2.getTouchPoint(e.touches[0]);
|
|
29742
|
+
var pointB = Cropper2.getTouchPoint(e.touches[1]);
|
|
29743
|
+
var center = getCenter(pointA, pointB);
|
|
29744
|
+
this.onDrag(center);
|
|
29745
|
+
if (this.rafPinchTimeout) this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout);
|
|
29746
|
+
this.rafPinchTimeout = this.currentWindow.requestAnimationFrame(function() {
|
|
29747
|
+
var distance = getDistanceBetweenPoints(pointA, pointB);
|
|
29748
|
+
var newZoom = _this.props.zoom * (distance / _this.lastPinchDistance);
|
|
29749
|
+
_this.setNewZoom(newZoom, center, {
|
|
29750
|
+
shouldUpdatePosition: false
|
|
29751
|
+
});
|
|
29752
|
+
_this.lastPinchDistance = distance;
|
|
29753
|
+
var rotation = getRotationBetweenPoints(pointA, pointB);
|
|
29754
|
+
var newRotation = _this.props.rotation + (rotation - _this.lastPinchRotation);
|
|
29755
|
+
_this.props.onRotationChange && _this.props.onRotationChange(newRotation);
|
|
29756
|
+
_this.lastPinchRotation = rotation;
|
|
29757
|
+
});
|
|
29758
|
+
};
|
|
29759
|
+
Cropper2.prototype.render = function() {
|
|
29760
|
+
var _this = this;
|
|
29761
|
+
var _a;
|
|
29762
|
+
var _b = this.props, image = _b.image, video = _b.video, mediaProps = _b.mediaProps, cropperProps = _b.cropperProps, transform = _b.transform, _c = _b.crop, x = _c.x, y = _c.y, rotation = _b.rotation, zoom = _b.zoom, cropShape = _b.cropShape, showGrid = _b.showGrid, roundCropAreaPixels = _b.roundCropAreaPixels, _d = _b.style, containerStyle = _d.containerStyle, cropAreaStyle = _d.cropAreaStyle, mediaStyle = _d.mediaStyle, _e = _b.classes, containerClassName = _e.containerClassName, cropAreaClassName = _e.cropAreaClassName, mediaClassName = _e.mediaClassName;
|
|
29763
|
+
var objectFit = (_a = this.state.mediaObjectFit) !== null && _a !== void 0 ? _a : this.getObjectFit();
|
|
29764
|
+
return React.createElement("div", {
|
|
29765
|
+
onMouseDown: this.onMouseDown,
|
|
29766
|
+
onTouchStart: this.onTouchStart,
|
|
29767
|
+
ref: function ref(el) {
|
|
29768
|
+
return _this.containerRef = el;
|
|
29769
|
+
},
|
|
29770
|
+
"data-testid": "container",
|
|
29771
|
+
style: containerStyle,
|
|
29772
|
+
className: classNames("reactEasyCrop_Container", containerClassName)
|
|
29773
|
+
}, image ? React.createElement("img", __assign({
|
|
29774
|
+
alt: "",
|
|
29775
|
+
className: classNames("reactEasyCrop_Image", objectFit === "contain" && "reactEasyCrop_Contain", objectFit === "horizontal-cover" && "reactEasyCrop_Cover_Horizontal", objectFit === "vertical-cover" && "reactEasyCrop_Cover_Vertical", mediaClassName)
|
|
29776
|
+
}, mediaProps, {
|
|
29777
|
+
src: image,
|
|
29778
|
+
ref: this.imageRef,
|
|
29779
|
+
style: __assign(__assign({}, mediaStyle), {
|
|
29780
|
+
transform: transform || "translate(".concat(x, "px, ").concat(y, "px) rotate(").concat(rotation, "deg) scale(").concat(zoom, ")")
|
|
29781
|
+
}),
|
|
29782
|
+
onLoad: this.onMediaLoad
|
|
29783
|
+
})) : video && React.createElement("video", __assign({
|
|
29784
|
+
autoPlay: true,
|
|
29785
|
+
playsInline: true,
|
|
29786
|
+
loop: true,
|
|
29787
|
+
muted: true,
|
|
29788
|
+
className: classNames("reactEasyCrop_Video", objectFit === "contain" && "reactEasyCrop_Contain", objectFit === "horizontal-cover" && "reactEasyCrop_Cover_Horizontal", objectFit === "vertical-cover" && "reactEasyCrop_Cover_Vertical", mediaClassName)
|
|
29789
|
+
}, mediaProps, {
|
|
29790
|
+
ref: this.videoRef,
|
|
29791
|
+
onLoadedMetadata: this.onMediaLoad,
|
|
29792
|
+
style: __assign(__assign({}, mediaStyle), {
|
|
29793
|
+
transform: transform || "translate(".concat(x, "px, ").concat(y, "px) rotate(").concat(rotation, "deg) scale(").concat(zoom, ")")
|
|
29794
|
+
}),
|
|
29795
|
+
controls: false
|
|
29796
|
+
}), (Array.isArray(video) ? video : [{
|
|
29797
|
+
src: video
|
|
29798
|
+
}]).map(function(item) {
|
|
29799
|
+
return React.createElement("source", __assign({
|
|
29800
|
+
key: item.src
|
|
29801
|
+
}, item));
|
|
29802
|
+
})), this.state.cropSize && React.createElement("div", __assign({
|
|
29803
|
+
ref: this.cropperRef,
|
|
29804
|
+
style: __assign(__assign({}, cropAreaStyle), {
|
|
29805
|
+
width: roundCropAreaPixels ? Math.round(this.state.cropSize.width) : this.state.cropSize.width,
|
|
29806
|
+
height: roundCropAreaPixels ? Math.round(this.state.cropSize.height) : this.state.cropSize.height
|
|
29807
|
+
}),
|
|
29808
|
+
tabIndex: 0,
|
|
29809
|
+
onKeyDown: this.onKeyDown,
|
|
29810
|
+
onKeyUp: this.onKeyUp,
|
|
29811
|
+
"data-testid": "cropper",
|
|
29812
|
+
className: classNames("reactEasyCrop_CropArea", cropShape === "round" && "reactEasyCrop_CropAreaRound", showGrid && "reactEasyCrop_CropAreaGrid", cropAreaClassName)
|
|
29813
|
+
}, cropperProps)));
|
|
29814
|
+
};
|
|
29815
|
+
Cropper2.defaultProps = {
|
|
29816
|
+
zoom: 1,
|
|
29817
|
+
rotation: 0,
|
|
29818
|
+
aspect: 4 / 3,
|
|
29819
|
+
maxZoom: MAX_ZOOM,
|
|
29820
|
+
minZoom: MIN_ZOOM,
|
|
29821
|
+
cropShape: "rect",
|
|
29822
|
+
objectFit: "contain",
|
|
29823
|
+
showGrid: true,
|
|
29824
|
+
style: {},
|
|
29825
|
+
classes: {},
|
|
29826
|
+
mediaProps: {},
|
|
29827
|
+
cropperProps: {},
|
|
29828
|
+
zoomSpeed: 1,
|
|
29829
|
+
restrictPosition: true,
|
|
29830
|
+
zoomWithScroll: true,
|
|
29831
|
+
keyboardStep: KEYBOARD_STEP
|
|
29832
|
+
};
|
|
29833
|
+
Cropper2.getMousePoint = function(e) {
|
|
29834
|
+
return {
|
|
29835
|
+
x: Number(e.clientX),
|
|
29836
|
+
y: Number(e.clientY)
|
|
29837
|
+
};
|
|
29838
|
+
};
|
|
29839
|
+
Cropper2.getTouchPoint = function(touch) {
|
|
29840
|
+
return {
|
|
29841
|
+
x: Number(touch.clientX),
|
|
29842
|
+
y: Number(touch.clientY)
|
|
29843
|
+
};
|
|
29844
|
+
};
|
|
29845
|
+
return Cropper2;
|
|
29846
|
+
})(React.Component)
|
|
29847
|
+
);
|
|
29848
|
+
async function getCroppedBlob(imageSrc, croppedAreaPixels) {
|
|
29849
|
+
return new Promise((resolve, reject) => {
|
|
29850
|
+
const image = new Image();
|
|
29851
|
+
image.addEventListener("load", () => {
|
|
29852
|
+
const canvas = document.createElement("canvas");
|
|
29853
|
+
canvas.width = croppedAreaPixels.width;
|
|
29854
|
+
canvas.height = croppedAreaPixels.height;
|
|
29855
|
+
const ctx = canvas.getContext("2d");
|
|
29856
|
+
if (!ctx) {
|
|
29857
|
+
reject(new Error("Canvas 2D context unavailable"));
|
|
29858
|
+
return;
|
|
29859
|
+
}
|
|
29860
|
+
ctx.drawImage(
|
|
29861
|
+
image,
|
|
29862
|
+
croppedAreaPixels.x,
|
|
29863
|
+
croppedAreaPixels.y,
|
|
29864
|
+
croppedAreaPixels.width,
|
|
29865
|
+
croppedAreaPixels.height,
|
|
29866
|
+
0,
|
|
29867
|
+
0,
|
|
29868
|
+
croppedAreaPixels.width,
|
|
29869
|
+
croppedAreaPixels.height
|
|
29870
|
+
);
|
|
29871
|
+
canvas.toBlob(
|
|
29872
|
+
(blob) => {
|
|
29873
|
+
if (blob) resolve(blob);
|
|
29874
|
+
else reject(new Error("canvas.toBlob returned null"));
|
|
29875
|
+
},
|
|
29876
|
+
"image/jpeg",
|
|
29877
|
+
0.92
|
|
29878
|
+
);
|
|
29879
|
+
});
|
|
29880
|
+
image.addEventListener("error", () => reject(new Error("Failed to load image for crop")));
|
|
29881
|
+
image.src = imageSrc;
|
|
29882
|
+
});
|
|
29883
|
+
}
|
|
29884
|
+
function PhotoCropModal({
|
|
29885
|
+
opened,
|
|
29886
|
+
file,
|
|
29887
|
+
onConfirm,
|
|
29888
|
+
onClose,
|
|
29889
|
+
onError,
|
|
29890
|
+
aspect = 1,
|
|
29891
|
+
cropShape = "round"
|
|
29892
|
+
}) {
|
|
29893
|
+
const [imageUrl, setImageUrl] = useState(null);
|
|
29894
|
+
const [crop, setCrop] = useState({ x: 0, y: 0 });
|
|
29895
|
+
const [zoom, setZoom] = useState(1);
|
|
29896
|
+
const [croppedAreaPixels, setCroppedAreaPixels] = useState(null);
|
|
29897
|
+
const [isConfirming, setIsConfirming] = useState(false);
|
|
29898
|
+
useEffect(() => {
|
|
29899
|
+
if (!file) {
|
|
29900
|
+
setImageUrl(null);
|
|
29901
|
+
setCrop({ x: 0, y: 0 });
|
|
29902
|
+
setZoom(1);
|
|
29903
|
+
setCroppedAreaPixels(null);
|
|
29904
|
+
return;
|
|
29905
|
+
}
|
|
29906
|
+
const url = URL.createObjectURL(file);
|
|
29907
|
+
setImageUrl(url);
|
|
29908
|
+
setCrop({ x: 0, y: 0 });
|
|
29909
|
+
setZoom(1);
|
|
29910
|
+
setCroppedAreaPixels(null);
|
|
29911
|
+
return () => URL.revokeObjectURL(url);
|
|
29912
|
+
}, [file]);
|
|
29913
|
+
const onCropComplete = useCallback((_croppedArea, pixels) => {
|
|
29914
|
+
setCroppedAreaPixels(pixels);
|
|
29915
|
+
}, []);
|
|
29916
|
+
const handleConfirm = async () => {
|
|
29917
|
+
if (!imageUrl || !croppedAreaPixels || isConfirming) return;
|
|
29918
|
+
setIsConfirming(true);
|
|
29919
|
+
try {
|
|
29920
|
+
let blob;
|
|
29921
|
+
try {
|
|
29922
|
+
blob = await getCroppedBlob(imageUrl, croppedAreaPixels);
|
|
29923
|
+
} catch (err) {
|
|
29924
|
+
onError?.(err instanceof Error ? err : new Error("Crop failed"));
|
|
29925
|
+
return;
|
|
29926
|
+
}
|
|
29927
|
+
try {
|
|
29928
|
+
await onConfirm(blob);
|
|
29929
|
+
} catch (err) {
|
|
29930
|
+
onError?.(err instanceof Error ? err : new Error("Upload failed"));
|
|
29931
|
+
}
|
|
29932
|
+
} finally {
|
|
29933
|
+
setIsConfirming(false);
|
|
29934
|
+
}
|
|
29935
|
+
};
|
|
29936
|
+
return /* @__PURE__ */ jsx(Modal, { opened, onClose, title: "Adjust photo", size: "md", children: /* @__PURE__ */ jsxs(Stack, { gap: "md", children: [
|
|
29937
|
+
/* @__PURE__ */ jsx(
|
|
29938
|
+
Box,
|
|
29939
|
+
{
|
|
29940
|
+
style: {
|
|
29941
|
+
position: "relative",
|
|
29942
|
+
height: 320,
|
|
29943
|
+
borderRadius: radii.md,
|
|
29944
|
+
overflow: "hidden",
|
|
29945
|
+
background: neutralColors[900]
|
|
29946
|
+
},
|
|
29947
|
+
children: imageUrl && /* @__PURE__ */ jsx(
|
|
29948
|
+
Cropper,
|
|
29949
|
+
{
|
|
29950
|
+
image: imageUrl,
|
|
29951
|
+
crop,
|
|
29952
|
+
zoom,
|
|
29953
|
+
aspect,
|
|
29954
|
+
cropShape,
|
|
29955
|
+
showGrid: false,
|
|
29956
|
+
onCropChange: setCrop,
|
|
29957
|
+
onCropComplete,
|
|
29958
|
+
onZoomChange: setZoom,
|
|
29959
|
+
mediaProps: {
|
|
29960
|
+
onError: () => {
|
|
29961
|
+
onError?.(new Error("Failed to load image preview"));
|
|
29962
|
+
setImageUrl(null);
|
|
29963
|
+
setCrop({ x: 0, y: 0 });
|
|
29964
|
+
setZoom(1);
|
|
29965
|
+
setCroppedAreaPixels(null);
|
|
29966
|
+
}
|
|
29967
|
+
}
|
|
29968
|
+
}
|
|
29969
|
+
)
|
|
29970
|
+
}
|
|
29971
|
+
),
|
|
29972
|
+
/* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", ta: "center", children: "Drag to reposition · Scroll or pinch to zoom" }),
|
|
29973
|
+
/* @__PURE__ */ jsxs(Group, { justify: "flex-end", gap: "xs", children: [
|
|
29974
|
+
/* @__PURE__ */ jsx(Button, { variant: "subtle", color: "gray", onClick: onClose, disabled: isConfirming, children: "Cancel" }),
|
|
29975
|
+
/* @__PURE__ */ jsx(Button, { onClick: handleConfirm, loading: isConfirming, disabled: !croppedAreaPixels, children: "Apply" })
|
|
29976
|
+
] })
|
|
29977
|
+
] }) });
|
|
29978
|
+
}
|
|
28641
29979
|
function SearchInput({
|
|
28642
29980
|
value,
|
|
28643
29981
|
onChange,
|
|
@@ -28718,32 +30056,24 @@ function StatCard({
|
|
|
28718
30056
|
trend,
|
|
28719
30057
|
...rest
|
|
28720
30058
|
}) {
|
|
28721
|
-
return /* @__PURE__ */ jsx(
|
|
28722
|
-
|
|
28723
|
-
|
|
28724
|
-
|
|
28725
|
-
|
|
28726
|
-
|
|
28727
|
-
|
|
28728
|
-
|
|
28729
|
-
|
|
28730
|
-
|
|
28731
|
-
|
|
28732
|
-
|
|
28733
|
-
|
|
28734
|
-
|
|
28735
|
-
|
|
28736
|
-
|
|
28737
|
-
|
|
28738
|
-
|
|
28739
|
-
),
|
|
28740
|
-
/* @__PURE__ */ jsx(Text, { fw: 700, size: "xl", lh: 1, children: value }),
|
|
28741
|
-
trend && /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: trend })
|
|
28742
|
-
] }),
|
|
28743
|
-
icon && /* @__PURE__ */ jsx(Box, { c: `${color}.5`, fz: "1.5rem", children: icon })
|
|
28744
|
-
] })
|
|
28745
|
-
}
|
|
28746
|
-
);
|
|
30059
|
+
return /* @__PURE__ */ jsx(Card, { bg: `${color}.0`, bd: `1px solid ${color}.2`, ...rest, children: /* @__PURE__ */ jsxs(Group, { justify: "space-between", align: "flex-start", children: [
|
|
30060
|
+
/* @__PURE__ */ jsxs(Stack, { gap: 4, children: [
|
|
30061
|
+
/* @__PURE__ */ jsx(
|
|
30062
|
+
Text,
|
|
30063
|
+
{
|
|
30064
|
+
size: "xs",
|
|
30065
|
+
fw: 600,
|
|
30066
|
+
tt: "uppercase",
|
|
30067
|
+
c: `${color}.6`,
|
|
30068
|
+
style: { letterSpacing: "0.05em" },
|
|
30069
|
+
children: label
|
|
30070
|
+
}
|
|
30071
|
+
),
|
|
30072
|
+
/* @__PURE__ */ jsx(Text, { fw: 700, size: "xl", lh: 1, children: value }),
|
|
30073
|
+
trend && /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: trend })
|
|
30074
|
+
] }),
|
|
30075
|
+
icon && /* @__PURE__ */ jsx(Box, { c: `${color}.5`, fz: "1.5rem", children: icon })
|
|
30076
|
+
] }) });
|
|
28747
30077
|
}
|
|
28748
30078
|
const DEFAULT_COLOR_MAP = {
|
|
28749
30079
|
active: colors.success,
|
|
@@ -28789,7 +30119,7 @@ function LoadingSpinner({ size: size2 = 32 }) {
|
|
|
28789
30119
|
"svg",
|
|
28790
30120
|
{
|
|
28791
30121
|
...iconProps,
|
|
28792
|
-
stroke:
|
|
30122
|
+
stroke: neutralColors[300],
|
|
28793
30123
|
style: { position: "absolute", inset: 0 },
|
|
28794
30124
|
"aria-hidden": "true",
|
|
28795
30125
|
children: paths
|
|
@@ -28799,7 +30129,7 @@ function LoadingSpinner({ size: size2 = 32 }) {
|
|
|
28799
30129
|
"svg",
|
|
28800
30130
|
{
|
|
28801
30131
|
...iconProps,
|
|
28802
|
-
stroke:
|
|
30132
|
+
stroke: brandColors.indigo,
|
|
28803
30133
|
style: { position: "absolute", inset: 0, animation: "fillUp 1.4s ease-in-out infinite" },
|
|
28804
30134
|
"aria-hidden": "true",
|
|
28805
30135
|
children: paths
|
|
@@ -28850,14 +30180,14 @@ function SideNav({ items, onItemClick, color = "indigo" }) {
|
|
|
28850
30180
|
onClick: () => onItemClick(item.id),
|
|
28851
30181
|
color,
|
|
28852
30182
|
variant: "light",
|
|
28853
|
-
style: { borderRadius:
|
|
30183
|
+
style: { borderRadius: radii.md },
|
|
28854
30184
|
styles: {
|
|
28855
30185
|
root: {
|
|
28856
|
-
color: item.active ? void 0 :
|
|
30186
|
+
color: item.active ? void 0 : neutralColors[500],
|
|
28857
30187
|
fontWeight: item.active ? 500 : 400
|
|
28858
30188
|
},
|
|
28859
30189
|
section: {
|
|
28860
|
-
color: item.active ? void 0 :
|
|
30190
|
+
color: item.active ? void 0 : neutralColors[400]
|
|
28861
30191
|
}
|
|
28862
30192
|
}
|
|
28863
30193
|
},
|
|
@@ -28974,6 +30304,43 @@ function InvestmentCard({
|
|
|
28974
30304
|
}
|
|
28975
30305
|
);
|
|
28976
30306
|
}
|
|
30307
|
+
function DefaultPencilIcon() {
|
|
30308
|
+
return /* @__PURE__ */ jsx(
|
|
30309
|
+
"svg",
|
|
30310
|
+
{
|
|
30311
|
+
width: "12",
|
|
30312
|
+
height: "12",
|
|
30313
|
+
viewBox: "0 0 24 24",
|
|
30314
|
+
fill: "none",
|
|
30315
|
+
stroke: "currentColor",
|
|
30316
|
+
strokeWidth: "2",
|
|
30317
|
+
strokeLinecap: "round",
|
|
30318
|
+
strokeLinejoin: "round",
|
|
30319
|
+
"aria-hidden": "true",
|
|
30320
|
+
children: /* @__PURE__ */ jsx("path", { d: "M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z" })
|
|
30321
|
+
}
|
|
30322
|
+
);
|
|
30323
|
+
}
|
|
30324
|
+
function DefaultCameraIcon() {
|
|
30325
|
+
return /* @__PURE__ */ jsxs(
|
|
30326
|
+
"svg",
|
|
30327
|
+
{
|
|
30328
|
+
width: "18",
|
|
30329
|
+
height: "18",
|
|
30330
|
+
viewBox: "0 0 24 24",
|
|
30331
|
+
fill: "none",
|
|
30332
|
+
stroke: "white",
|
|
30333
|
+
strokeWidth: "2",
|
|
30334
|
+
strokeLinecap: "round",
|
|
30335
|
+
strokeLinejoin: "round",
|
|
30336
|
+
"aria-hidden": "true",
|
|
30337
|
+
children: [
|
|
30338
|
+
/* @__PURE__ */ jsx("path", { d: "M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z" }),
|
|
30339
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "13", r: "4" })
|
|
30340
|
+
]
|
|
30341
|
+
}
|
|
30342
|
+
);
|
|
30343
|
+
}
|
|
28977
30344
|
function formatMemberSince(iso) {
|
|
28978
30345
|
const date = new Date(iso);
|
|
28979
30346
|
if (Number.isNaN(date.getTime())) return null;
|
|
@@ -28986,16 +30353,97 @@ function InvestorProfileCard({
|
|
|
28986
30353
|
verificationStatus,
|
|
28987
30354
|
memberSince,
|
|
28988
30355
|
subtitle,
|
|
28989
|
-
children
|
|
30356
|
+
children,
|
|
30357
|
+
onEditName,
|
|
30358
|
+
onUploadPhoto,
|
|
30359
|
+
photoUploading,
|
|
30360
|
+
editNameIcon,
|
|
30361
|
+
uploadPhotoIcon
|
|
28990
30362
|
}) {
|
|
28991
30363
|
const memberSinceText = memberSince ? formatMemberSince(memberSince) : null;
|
|
30364
|
+
const [isAvatarHovered, setIsAvatarHovered] = useState(false);
|
|
30365
|
+
const [isAvatarFocused, setIsAvatarFocused] = useState(false);
|
|
30366
|
+
const displayName = name?.trim() || "Add your name";
|
|
30367
|
+
const avatarEl = /* @__PURE__ */ jsx(
|
|
30368
|
+
Avatar,
|
|
30369
|
+
{
|
|
30370
|
+
src: avatarUrl,
|
|
30371
|
+
alt: displayName,
|
|
30372
|
+
radius: "md",
|
|
30373
|
+
size: 56,
|
|
30374
|
+
color: getAvatarColor(displayName),
|
|
30375
|
+
children: displayName.charAt(0).toUpperCase()
|
|
30376
|
+
}
|
|
30377
|
+
);
|
|
28992
30378
|
return /* @__PURE__ */ jsxs(Stack, { gap: "md", children: [
|
|
28993
30379
|
/* @__PURE__ */ jsxs(Group, { gap: "md", wrap: "nowrap", children: [
|
|
28994
|
-
/* @__PURE__ */
|
|
30380
|
+
onUploadPhoto ? /* @__PURE__ */ jsxs(
|
|
30381
|
+
Box,
|
|
30382
|
+
{
|
|
30383
|
+
component: "button",
|
|
30384
|
+
type: "button",
|
|
30385
|
+
onClick: onUploadPhoto,
|
|
30386
|
+
onMouseEnter: () => setIsAvatarHovered(true),
|
|
30387
|
+
onMouseLeave: () => setIsAvatarHovered(false),
|
|
30388
|
+
onFocus: () => setIsAvatarFocused(true),
|
|
30389
|
+
onBlur: () => setIsAvatarFocused(false),
|
|
30390
|
+
"aria-label": "Upload profile photo",
|
|
30391
|
+
disabled: !!photoUploading,
|
|
30392
|
+
style: {
|
|
30393
|
+
position: "relative",
|
|
30394
|
+
display: "inline-block",
|
|
30395
|
+
cursor: photoUploading ? "not-allowed" : "pointer",
|
|
30396
|
+
background: "none",
|
|
30397
|
+
border: "none",
|
|
30398
|
+
padding: 0,
|
|
30399
|
+
borderRadius: radii.md,
|
|
30400
|
+
flexShrink: 0
|
|
30401
|
+
},
|
|
30402
|
+
children: [
|
|
30403
|
+
avatarEl,
|
|
30404
|
+
photoUploading ? /* @__PURE__ */ jsx(
|
|
30405
|
+
Box,
|
|
30406
|
+
{
|
|
30407
|
+
"data-testid": "photo-uploading-overlay",
|
|
30408
|
+
"aria-label": "Uploading photo",
|
|
30409
|
+
role: "status",
|
|
30410
|
+
style: {
|
|
30411
|
+
position: "absolute",
|
|
30412
|
+
inset: 0,
|
|
30413
|
+
borderRadius: radii.md,
|
|
30414
|
+
backgroundColor: `${neutralColors[900]}80`,
|
|
30415
|
+
display: "flex",
|
|
30416
|
+
alignItems: "center",
|
|
30417
|
+
justifyContent: "center"
|
|
30418
|
+
},
|
|
30419
|
+
children: /* @__PURE__ */ jsx(Loader, { size: "xs", color: "white" })
|
|
30420
|
+
}
|
|
30421
|
+
) : /* @__PURE__ */ jsx(
|
|
30422
|
+
Box,
|
|
30423
|
+
{
|
|
30424
|
+
style: {
|
|
30425
|
+
position: "absolute",
|
|
30426
|
+
inset: 0,
|
|
30427
|
+
borderRadius: radii.md,
|
|
30428
|
+
backgroundColor: `${neutralColors[900]}73`,
|
|
30429
|
+
display: "flex",
|
|
30430
|
+
alignItems: "center",
|
|
30431
|
+
justifyContent: "center",
|
|
30432
|
+
opacity: isAvatarHovered || isAvatarFocused ? 1 : 0,
|
|
30433
|
+
transition: "opacity 150ms ease",
|
|
30434
|
+
pointerEvents: "none"
|
|
30435
|
+
},
|
|
30436
|
+
children: uploadPhotoIcon ?? /* @__PURE__ */ jsx(DefaultCameraIcon, {})
|
|
30437
|
+
}
|
|
30438
|
+
)
|
|
30439
|
+
]
|
|
30440
|
+
}
|
|
30441
|
+
) : avatarEl,
|
|
28995
30442
|
/* @__PURE__ */ jsxs(Stack, { gap: 2, children: [
|
|
28996
|
-
/* @__PURE__ */ jsxs(Group, { gap: "xs", wrap: "nowrap", children: [
|
|
28997
|
-
/* @__PURE__ */ jsx(Text, { fw: 600, size: "md", children:
|
|
28998
|
-
verificationStatus && /* @__PURE__ */ jsx(StatusBadge, { status: verificationStatus, size: "xs" })
|
|
30443
|
+
/* @__PURE__ */ jsxs(Group, { gap: "xs", wrap: "nowrap", align: "center", children: [
|
|
30444
|
+
/* @__PURE__ */ jsx(Text, { fw: 600, size: "md", children: displayName }),
|
|
30445
|
+
verificationStatus && /* @__PURE__ */ jsx(StatusBadge, { status: verificationStatus, size: "xs" }),
|
|
30446
|
+
onEditName && /* @__PURE__ */ jsx(ActionIcon, { variant: "subtle", size: "sm", onClick: onEditName, "aria-label": "Edit name", children: editNameIcon ?? /* @__PURE__ */ jsx(DefaultPencilIcon, {}) })
|
|
28999
30447
|
] }),
|
|
29000
30448
|
email && /* @__PURE__ */ jsx(Text, { size: "sm", c: `${colors.neutral}.5`, children: email }),
|
|
29001
30449
|
memberSinceText && /* @__PURE__ */ jsx(Text, { size: "xs", c: `${colors.neutral}.4`, children: memberSinceText }),
|
|
@@ -29093,8 +30541,8 @@ function WalletList({
|
|
|
29093
30541
|
justify: "space-between",
|
|
29094
30542
|
p: "xs",
|
|
29095
30543
|
style: {
|
|
29096
|
-
borderRadius:
|
|
29097
|
-
border:
|
|
30544
|
+
borderRadius: radii.sm,
|
|
30545
|
+
border: `1px solid ${neutralColors[200]}`
|
|
29098
30546
|
},
|
|
29099
30547
|
children: [
|
|
29100
30548
|
/* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
|
|
@@ -29267,6 +30715,7 @@ export {
|
|
|
29267
30715
|
InvestmentCard,
|
|
29268
30716
|
InvestorProfileCard,
|
|
29269
30717
|
ListRow,
|
|
30718
|
+
Loader,
|
|
29270
30719
|
LoadingSpinner,
|
|
29271
30720
|
MOBILE_BREAKPOINT,
|
|
29272
30721
|
Menu,
|
|
@@ -29282,6 +30731,7 @@ export {
|
|
|
29282
30731
|
PasswordInput,
|
|
29283
30732
|
Percent,
|
|
29284
30733
|
PhoneField,
|
|
30734
|
+
PhotoCropModal,
|
|
29285
30735
|
PinInput,
|
|
29286
30736
|
Progress,
|
|
29287
30737
|
ScrollArea,
|
|
@@ -29303,6 +30753,8 @@ export {
|
|
|
29303
30753
|
ThemeIcon,
|
|
29304
30754
|
Title,
|
|
29305
30755
|
Tooltip,
|
|
30756
|
+
USStateField,
|
|
30757
|
+
US_STATES,
|
|
29306
30758
|
UnstyledButton,
|
|
29307
30759
|
UserMenu,
|
|
29308
30760
|
WalletList,
|
|
@@ -29325,6 +30777,7 @@ export {
|
|
|
29325
30777
|
notify,
|
|
29326
30778
|
passwordSchema,
|
|
29327
30779
|
phoneSchema,
|
|
30780
|
+
radii,
|
|
29328
30781
|
semanticColors,
|
|
29329
30782
|
theme,
|
|
29330
30783
|
truncateAddress,
|