dash-ui-kit 1.0.8 → 1.0.92
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/react/components/bigNumber/index.d.ts +2 -0
- package/dist/react/components/dialog/index.d.ts +8 -0
- package/dist/react/components/icons/index.d.ts +3 -0
- package/dist/react/components/index.d.ts +1 -1
- package/dist/react/components/overlayMenu/index.d.ts +19 -0
- package/dist/react/components/text/index.d.ts +1 -1
- package/dist/react/index.cjs.js +327 -51
- package/dist/react/index.cjs.js.map +1 -1
- package/dist/react/index.d.ts +1 -1
- package/dist/react/index.esm.js +325 -52
- package/dist/react/index.esm.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/react/index.cjs.js
CHANGED
|
@@ -2011,6 +2011,83 @@ const SearchIcon = ({
|
|
|
2011
2011
|
fill: 'currentColor'
|
|
2012
2012
|
})
|
|
2013
2013
|
});
|
|
2014
|
+
const AirplaneIcon = ({
|
|
2015
|
+
color = '#0C1C33',
|
|
2016
|
+
size = 16,
|
|
2017
|
+
className = '',
|
|
2018
|
+
onClick
|
|
2019
|
+
}) => jsxRuntime.jsx("svg", {
|
|
2020
|
+
width: size,
|
|
2021
|
+
height: size,
|
|
2022
|
+
viewBox: '0 0 16 16',
|
|
2023
|
+
fill: 'none',
|
|
2024
|
+
xmlns: 'http://www.w3.org/2000/svg',
|
|
2025
|
+
className: className,
|
|
2026
|
+
onClick: onClick,
|
|
2027
|
+
color: color,
|
|
2028
|
+
children: jsxRuntime.jsx("path", {
|
|
2029
|
+
d: 'M7.68459 8.00182H3.34214M3.21905 8.57088L2.50162 10.7134C2.10869 11.8867 1.91222 12.4734 2.05322 12.8347C2.17565 13.1485 2.43862 13.3863 2.76311 13.4769C3.13678 13.5811 3.70115 13.3272 4.82989 12.8195L12.0662 9.56409C13.1679 9.06841 13.7188 8.82064 13.889 8.47637C14.037 8.17727 14.037 7.82629 13.889 7.5272C13.7188 7.18299 13.1679 6.93515 12.0662 6.4395L4.81741 3.17853C3.69206 2.67227 3.1294 2.41914 2.75611 2.52298C2.43192 2.61316 2.16898 2.8504 2.04612 3.16358C1.90464 3.5242 2.09901 4.10962 2.48775 5.28048L3.22045 7.48736C3.28721 7.68845 3.3206 7.78903 3.33377 7.89182C3.34547 7.98311 3.34534 8.07548 3.33342 8.16671C3.31997 8.2695 3.28634 8.36994 3.21905 8.57088Z',
|
|
2030
|
+
stroke: 'currentColor',
|
|
2031
|
+
strokeLinecap: 'round',
|
|
2032
|
+
strokeLinejoin: 'round'
|
|
2033
|
+
})
|
|
2034
|
+
});
|
|
2035
|
+
const ExternalLinkIcon = ({
|
|
2036
|
+
color = '#0C1C33',
|
|
2037
|
+
size = 16,
|
|
2038
|
+
className = '',
|
|
2039
|
+
onClick
|
|
2040
|
+
}) => jsxRuntime.jsx("svg", {
|
|
2041
|
+
width: size,
|
|
2042
|
+
height: size,
|
|
2043
|
+
viewBox: '0 0 16 16',
|
|
2044
|
+
fill: 'none',
|
|
2045
|
+
xmlns: 'http://www.w3.org/2000/svg',
|
|
2046
|
+
className: className,
|
|
2047
|
+
onClick: onClick,
|
|
2048
|
+
color: color,
|
|
2049
|
+
children: jsxRuntime.jsx("path", {
|
|
2050
|
+
d: 'M10.2499 9.125V5.75M10.2499 5.75H6.87491M10.2499 5.75L5.75001 10.2499M4.40001 14H11.6C12.4401 14 12.8601 14 13.181 13.8365C13.4632 13.6927 13.6927 13.4632 13.8366 13.181C14 12.8602 14 12.4401 14 11.6V4.4C14 3.55992 14 3.13988 13.8366 2.81902C13.6927 2.53677 13.4632 2.3073 13.181 2.16349C12.8601 2 12.4401 2 11.6 2H4.40001C3.55993 2 3.13989 2 2.81902 2.16349C2.53678 2.3073 2.30731 2.53677 2.16349 2.81902C2 3.13988 2 3.55992 2 4.4V11.6C2 12.4401 2 12.8602 2.16349 13.181C2.30731 13.4632 2.53678 13.6927 2.81902 13.8365C3.13989 14 3.55993 14 4.40001 14Z',
|
|
2051
|
+
stroke: 'currentColor',
|
|
2052
|
+
strokeLinecap: 'round',
|
|
2053
|
+
strokeLinejoin: 'round'
|
|
2054
|
+
})
|
|
2055
|
+
});
|
|
2056
|
+
const InfoCircleIcon = ({
|
|
2057
|
+
color = '#4C7EFF',
|
|
2058
|
+
size = 19,
|
|
2059
|
+
className = '',
|
|
2060
|
+
onClick
|
|
2061
|
+
}) => jsxRuntime.jsxs("svg", {
|
|
2062
|
+
width: size,
|
|
2063
|
+
height: size,
|
|
2064
|
+
viewBox: '0 0 19 19',
|
|
2065
|
+
fill: 'none',
|
|
2066
|
+
xmlns: 'http://www.w3.org/2000/svg',
|
|
2067
|
+
className: className,
|
|
2068
|
+
onClick: onClick,
|
|
2069
|
+
color: color,
|
|
2070
|
+
children: [jsxRuntime.jsxs("g", {
|
|
2071
|
+
clipPath: 'url(#clip0_1166_258)',
|
|
2072
|
+
children: [jsxRuntime.jsx("path", {
|
|
2073
|
+
d: 'M9.5 5.5H9.51ZM9.5 8.5V13.5ZM18.5 9.5C18.5 14.4706 14.4706 18.5 9.5 18.5C4.52944 18.5 0.5 14.4706 0.5 9.5C0.5 4.52944 4.52944 0.5 9.5 0.5C14.4706 0.5 18.5 4.52944 18.5 9.5Z',
|
|
2074
|
+
fill: 'currentColor',
|
|
2075
|
+
fillOpacity: '0.05'
|
|
2076
|
+
}), jsxRuntime.jsx("path", {
|
|
2077
|
+
d: 'M18 9.5C18 4.80558 14.1945 1 9.5 1C4.80558 1 1 4.80558 1 9.5C1 14.1945 4.80558 18 9.5 18C14.1945 18 18 14.1945 18 9.5ZM9 13.5V8.5C9 8.22386 9.22386 8 9.5 8C9.77614 8 10 8.22386 10 8.5V13.5C10 13.7761 9.77614 14 9.5 14C9.22386 14 9 13.7761 9 13.5ZM9.50977 5C9.78591 5 10.0098 5.22386 10.0098 5.5C10.0098 5.77614 9.78591 6 9.50977 6H9.5C9.22386 6 9 5.77614 9 5.5C9 5.22386 9.22386 5 9.5 5H9.50977ZM19 9.5C19 14.7467 14.7467 19 9.5 19C4.2533 19 0 14.7467 0 9.5C0 4.2533 4.2533 0 9.5 0C14.7467 0 19 4.2533 19 9.5Z',
|
|
2078
|
+
fill: 'currentColor'
|
|
2079
|
+
})]
|
|
2080
|
+
}), jsxRuntime.jsx("defs", {
|
|
2081
|
+
children: jsxRuntime.jsx("clipPath", {
|
|
2082
|
+
id: 'clip0_1166_258',
|
|
2083
|
+
children: jsxRuntime.jsx("rect", {
|
|
2084
|
+
width: '19',
|
|
2085
|
+
height: '19',
|
|
2086
|
+
fill: 'white'
|
|
2087
|
+
})
|
|
2088
|
+
})
|
|
2089
|
+
})]
|
|
2090
|
+
});
|
|
2014
2091
|
|
|
2015
2092
|
const accordionRootStyles = classVarianceAuthority.cva(`
|
|
2016
2093
|
w-full
|
|
@@ -3016,7 +3093,7 @@ const textStyles = classVarianceAuthority.cva('', {
|
|
|
3016
3093
|
},
|
|
3017
3094
|
weight: {
|
|
3018
3095
|
normal: 'font-normal',
|
|
3019
|
-
|
|
3096
|
+
medium: 'font-medium',
|
|
3020
3097
|
bold: 'font-bold'
|
|
3021
3098
|
},
|
|
3022
3099
|
italic: {
|
|
@@ -6262,7 +6339,7 @@ var VISUALLY_HIDDEN_STYLES = Object.freeze({
|
|
|
6262
6339
|
wordWrap: "normal"
|
|
6263
6340
|
});
|
|
6264
6341
|
var NAME = "VisuallyHidden";
|
|
6265
|
-
var VisuallyHidden = React__namespace.forwardRef(
|
|
6342
|
+
var VisuallyHidden$1 = React__namespace.forwardRef(
|
|
6266
6343
|
(props, forwardedRef) => {
|
|
6267
6344
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6268
6345
|
Primitive.span,
|
|
@@ -6274,7 +6351,7 @@ var VisuallyHidden = React__namespace.forwardRef(
|
|
|
6274
6351
|
);
|
|
6275
6352
|
}
|
|
6276
6353
|
);
|
|
6277
|
-
VisuallyHidden.displayName = NAME;
|
|
6354
|
+
VisuallyHidden$1.displayName = NAME;
|
|
6278
6355
|
|
|
6279
6356
|
var getDefaultParent = function (originalTarget) {
|
|
6280
6357
|
if (typeof document === 'undefined') {
|
|
@@ -8285,7 +8362,7 @@ const selectTrigger = classVarianceAuthority.cva('w-full transition-all font-int
|
|
|
8285
8362
|
disabled: false
|
|
8286
8363
|
}
|
|
8287
8364
|
});
|
|
8288
|
-
const selectContent = classVarianceAuthority.cva('overflow-hidden z-50 rounded-md shadow-lg min-w-[var(--radix-select-trigger-width)] w-full', {
|
|
8365
|
+
const selectContent = classVarianceAuthority.cva('overflow-hidden z-50 rounded-md shadow-lg min-w-[var(--radix-select-trigger-width)] w-full max-h-[var(--radix-select-content-available-height)]', {
|
|
8289
8366
|
variants: {
|
|
8290
8367
|
theme: {
|
|
8291
8368
|
light: 'bg-white border border-gray-200',
|
|
@@ -8293,6 +8370,7 @@ const selectContent = classVarianceAuthority.cva('overflow-hidden z-50 rounded-m
|
|
|
8293
8370
|
}
|
|
8294
8371
|
}
|
|
8295
8372
|
});
|
|
8373
|
+
const selectViewport = classVarianceAuthority.cva('overflow-y-auto max-h-[inherit]');
|
|
8296
8374
|
const selectItem = classVarianceAuthority.cva('relative flex cursor-pointer select-none items-center outline-none focus:bg-gray-100 data-[disabled]:pointer-events-none data-[disabled]:opacity-50', {
|
|
8297
8375
|
variants: {
|
|
8298
8376
|
theme: {
|
|
@@ -8381,6 +8459,7 @@ const Select = _a => {
|
|
|
8381
8459
|
const contentClasses = selectContent({
|
|
8382
8460
|
theme
|
|
8383
8461
|
});
|
|
8462
|
+
const viewportClasses = selectViewport({});
|
|
8384
8463
|
const itemClasses = selectItem({
|
|
8385
8464
|
theme,
|
|
8386
8465
|
size
|
|
@@ -8413,6 +8492,7 @@ const Select = _a => {
|
|
|
8413
8492
|
position: 'popper',
|
|
8414
8493
|
sideOffset: 5,
|
|
8415
8494
|
children: jsxRuntime.jsx(Viewport, {
|
|
8495
|
+
className: viewportClasses,
|
|
8416
8496
|
children: options.map(option => jsxRuntime.jsx(Item$1, {
|
|
8417
8497
|
value: option.value,
|
|
8418
8498
|
className: itemClasses,
|
|
@@ -8932,7 +9012,7 @@ const overlayMenuTrigger = classVarianceAuthority.cva('w-full transition-all fon
|
|
|
8932
9012
|
filled: false
|
|
8933
9013
|
}
|
|
8934
9014
|
});
|
|
8935
|
-
const overlayContent = classVarianceAuthority.cva('absolute z-50
|
|
9015
|
+
const overlayContent = classVarianceAuthority.cva('absolute z-50 overflow-hidden', {
|
|
8936
9016
|
variants: {
|
|
8937
9017
|
theme: {
|
|
8938
9018
|
light: 'bg-white border border-[rgba(12,28,51,0.05)]',
|
|
@@ -8940,22 +9020,55 @@ const overlayContent = classVarianceAuthority.cva('absolute z-50 min-w-full over
|
|
|
8940
9020
|
},
|
|
8941
9021
|
size: {
|
|
8942
9022
|
sm: 'rounded-[0.625rem]',
|
|
8943
|
-
md: 'rounded-[0.
|
|
8944
|
-
xl: 'rounded-[
|
|
9023
|
+
md: 'rounded-[0.75rem]',
|
|
9024
|
+
xl: 'rounded-[0.9375rem]'
|
|
9025
|
+
},
|
|
9026
|
+
variant: {
|
|
9027
|
+
dropdown: 'min-w-full',
|
|
9028
|
+
'context-menu': 'w-[200px]'
|
|
9029
|
+
},
|
|
9030
|
+
hasShadow: {
|
|
9031
|
+
true: 'shadow-[0px_0px_75px_0px_rgba(0,0,0,0.15)]',
|
|
9032
|
+
false: 'shadow-lg'
|
|
9033
|
+
}
|
|
9034
|
+
},
|
|
9035
|
+
defaultVariants: {
|
|
9036
|
+
variant: 'dropdown',
|
|
9037
|
+
hasShadow: false
|
|
9038
|
+
}
|
|
9039
|
+
});
|
|
9040
|
+
const overlayHeader = classVarianceAuthority.cva('flex items-center justify-between border-b gap-2', {
|
|
9041
|
+
variants: {
|
|
9042
|
+
theme: {
|
|
9043
|
+
light: 'border-[rgba(12,28,51,0.05)]',
|
|
9044
|
+
dark: 'border-[rgba(255,255,255,0.15)]'
|
|
9045
|
+
},
|
|
9046
|
+
size: {
|
|
9047
|
+
sm: 'px-[0.875rem] py-[0.375rem]',
|
|
9048
|
+
md: 'px-[1rem] py-[0.5rem]',
|
|
9049
|
+
xl: 'px-[1.125rem] py-[0.5rem]'
|
|
8945
9050
|
}
|
|
9051
|
+
},
|
|
9052
|
+
defaultVariants: {
|
|
9053
|
+
theme: 'light',
|
|
9054
|
+
size: 'xl'
|
|
8946
9055
|
}
|
|
8947
9056
|
});
|
|
8948
|
-
const overlayItem = classVarianceAuthority.cva('relative flex cursor-pointer select-none items-center outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 rounded-none', {
|
|
9057
|
+
const overlayItem = classVarianceAuthority.cva('relative flex cursor-pointer select-none items-center outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 rounded-none font-medium text-[0.75rem] leading-[1.416em]', {
|
|
8949
9058
|
variants: {
|
|
8950
9059
|
theme: {
|
|
8951
9060
|
light: 'text-[#0C1C33] hover:bg-gray-50',
|
|
8952
9061
|
dark: 'text-white hover:bg-[rgba(255,255,255,0.1)]'
|
|
8953
9062
|
},
|
|
8954
9063
|
size: {
|
|
8955
|
-
sm: '
|
|
8956
|
-
md: '
|
|
8957
|
-
xl: '
|
|
9064
|
+
sm: 'px-[0.875rem] py-[0.625rem]',
|
|
9065
|
+
md: 'px-[1rem] py-[0.6875rem]',
|
|
9066
|
+
xl: 'px-[1.125rem] py-[0.75rem]'
|
|
8958
9067
|
}
|
|
9068
|
+
},
|
|
9069
|
+
defaultVariants: {
|
|
9070
|
+
theme: 'light',
|
|
9071
|
+
size: 'xl'
|
|
8959
9072
|
}
|
|
8960
9073
|
});
|
|
8961
9074
|
// Arrow icon
|
|
@@ -8978,10 +9091,17 @@ const ChevronDownIcon = ({
|
|
|
8978
9091
|
/**
|
|
8979
9092
|
* Overlay menu component that opens above the trigger with overlay positioning.
|
|
8980
9093
|
* Supports custom content items with onClick handlers.
|
|
9094
|
+
*
|
|
9095
|
+
* @param variant - 'dropdown' (default) or 'context-menu'
|
|
9096
|
+
* @param headerContent - Custom header content (for context-menu variant)
|
|
9097
|
+
* @param showCloseButton - Show close button in header
|
|
9098
|
+
* @param position - Position object for context-menu variant
|
|
9099
|
+
* @param width - Custom width (default: 200px for context-menu)
|
|
8981
9100
|
*/
|
|
8982
9101
|
const OverlayMenu = _a => {
|
|
8983
9102
|
var {
|
|
8984
9103
|
className = '',
|
|
9104
|
+
contentClassName = '',
|
|
8985
9105
|
colorScheme,
|
|
8986
9106
|
size,
|
|
8987
9107
|
error = false,
|
|
@@ -8996,9 +9116,15 @@ const OverlayMenu = _a => {
|
|
|
8996
9116
|
maxHeight = '200px',
|
|
8997
9117
|
triggerContent,
|
|
8998
9118
|
placeholder = 'Menu',
|
|
8999
|
-
showItemBorders = true
|
|
9119
|
+
showItemBorders = true,
|
|
9120
|
+
variant = 'dropdown',
|
|
9121
|
+
headerContent,
|
|
9122
|
+
showCloseButton = false,
|
|
9123
|
+
position,
|
|
9124
|
+
width,
|
|
9125
|
+
onClose
|
|
9000
9126
|
} = _a,
|
|
9001
|
-
props = tslib.__rest(_a, ["className", "colorScheme", "size", "error", "success", "border", "filled", "disabled", "items", "showArrow", "name", "overlayLabel", "maxHeight", "triggerContent", "placeholder", "showItemBorders"]);
|
|
9127
|
+
props = tslib.__rest(_a, ["className", "contentClassName", "colorScheme", "size", "error", "success", "border", "filled", "disabled", "items", "showArrow", "name", "overlayLabel", "maxHeight", "triggerContent", "placeholder", "showItemBorders", "variant", "headerContent", "showCloseButton", "position", "width", "onClose"]);
|
|
9002
9128
|
const {
|
|
9003
9129
|
theme
|
|
9004
9130
|
} = useTheme();
|
|
@@ -9007,6 +9133,22 @@ const OverlayMenu = _a => {
|
|
|
9007
9133
|
// Determine color scheme based on state
|
|
9008
9134
|
let finalColorScheme = colorScheme;
|
|
9009
9135
|
if (error) finalColorScheme = 'error';else if (success) finalColorScheme = 'success';
|
|
9136
|
+
const isContextMenu = variant === 'context-menu';
|
|
9137
|
+
// Handle Escape key
|
|
9138
|
+
React.useEffect(() => {
|
|
9139
|
+
if (!isOpen) return;
|
|
9140
|
+
const handleEscape = e => {
|
|
9141
|
+
if (e.key === 'Escape') {
|
|
9142
|
+
handleClose();
|
|
9143
|
+
}
|
|
9144
|
+
};
|
|
9145
|
+
document.addEventListener('keydown', handleEscape);
|
|
9146
|
+
return () => document.removeEventListener('keydown', handleEscape);
|
|
9147
|
+
}, [isOpen]);
|
|
9148
|
+
const handleClose = () => {
|
|
9149
|
+
setIsOpen(false);
|
|
9150
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
9151
|
+
};
|
|
9010
9152
|
const triggerClasses = overlayMenuTrigger({
|
|
9011
9153
|
theme,
|
|
9012
9154
|
colorScheme: finalColorScheme,
|
|
@@ -9016,6 +9158,12 @@ const OverlayMenu = _a => {
|
|
|
9016
9158
|
disabled
|
|
9017
9159
|
}) + ' ' + className;
|
|
9018
9160
|
const contentClasses = overlayContent({
|
|
9161
|
+
theme,
|
|
9162
|
+
size,
|
|
9163
|
+
variant,
|
|
9164
|
+
hasShadow: isContextMenu
|
|
9165
|
+
});
|
|
9166
|
+
const headerClasses = overlayHeader({
|
|
9019
9167
|
theme,
|
|
9020
9168
|
size
|
|
9021
9169
|
});
|
|
@@ -9027,11 +9175,28 @@ const OverlayMenu = _a => {
|
|
|
9027
9175
|
if (!item.disabled && item.onClick) {
|
|
9028
9176
|
item.onClick();
|
|
9029
9177
|
}
|
|
9030
|
-
|
|
9178
|
+
handleClose();
|
|
9179
|
+
};
|
|
9180
|
+
// For context-menu variant, show menu immediately if position is provided
|
|
9181
|
+
React.useEffect(() => {
|
|
9182
|
+
if (isContextMenu && position) {
|
|
9183
|
+
setIsOpen(true);
|
|
9184
|
+
}
|
|
9185
|
+
}, [isContextMenu, position]);
|
|
9186
|
+
// Calculate position styles for context-menu
|
|
9187
|
+
const getPositionStyles = () => {
|
|
9188
|
+
if (!isContextMenu || !position) return {};
|
|
9189
|
+
const styles = {};
|
|
9190
|
+
if (position.top !== undefined) styles.top = position.top;
|
|
9191
|
+
if (position.left !== undefined) styles.left = position.left;
|
|
9192
|
+
if (position.right !== undefined) styles.right = position.right;
|
|
9193
|
+
if (position.bottom !== undefined) styles.bottom = position.bottom;
|
|
9194
|
+
if (width) styles.width = typeof width === 'number' ? `${width}px` : width;
|
|
9195
|
+
return styles;
|
|
9031
9196
|
};
|
|
9032
9197
|
return jsxRuntime.jsxs("div", {
|
|
9033
|
-
className: 'relative',
|
|
9034
|
-
children: [jsxRuntime.jsxs("button", Object.assign({
|
|
9198
|
+
className: isContextMenu ? '' : 'relative',
|
|
9199
|
+
children: [!isContextMenu && jsxRuntime.jsxs("button", Object.assign({
|
|
9035
9200
|
ref: triggerRef,
|
|
9036
9201
|
type: 'button',
|
|
9037
9202
|
className: triggerClasses,
|
|
@@ -9050,35 +9215,33 @@ const OverlayMenu = _a => {
|
|
|
9050
9215
|
})]
|
|
9051
9216
|
})), isOpen && jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
9052
9217
|
children: [jsxRuntime.jsx("div", {
|
|
9053
|
-
className: 'fixed inset-0 z-40
|
|
9054
|
-
onClick:
|
|
9218
|
+
className: `${isContextMenu ? 'fixed' : 'fixed'} inset-0 z-40`,
|
|
9219
|
+
onClick: handleClose
|
|
9055
9220
|
}), jsxRuntime.jsxs("div", {
|
|
9056
|
-
className: `${contentClasses} top-0 left-0 right-0 overflow-y-auto`,
|
|
9057
|
-
style: {
|
|
9221
|
+
className: `${contentClasses} ${isContextMenu ? 'fixed' : ''} ${!isContextMenu ? 'top-0 left-0 right-0' : ''} overflow-y-auto ${contentClassName}`,
|
|
9222
|
+
style: Object.assign({
|
|
9058
9223
|
maxHeight
|
|
9059
|
-
},
|
|
9060
|
-
children: [overlayLabel && jsxRuntime.jsxs("div", {
|
|
9061
|
-
className: `${
|
|
9062
|
-
onClick:
|
|
9224
|
+
}, getPositionStyles()),
|
|
9225
|
+
children: [(headerContent || overlayLabel) && jsxRuntime.jsxs("div", {
|
|
9226
|
+
className: `${headerClasses} ${!showCloseButton && !isContextMenu ? 'cursor-pointer' : ''}`,
|
|
9227
|
+
onClick: !showCloseButton && !isContextMenu ? handleClose : undefined,
|
|
9063
9228
|
children: [jsxRuntime.jsx("div", {
|
|
9064
9229
|
className: 'w-full flex-1',
|
|
9065
|
-
children: overlayLabel
|
|
9066
|
-
}), jsxRuntime.jsx("
|
|
9067
|
-
className: 'flex items-center
|
|
9230
|
+
children: headerContent || overlayLabel
|
|
9231
|
+
}), (showCloseButton || isContextMenu && headerContent) && jsxRuntime.jsx("button", {
|
|
9232
|
+
className: 'flex items-center cursor-pointer hover:opacity-70 transition-opacity',
|
|
9233
|
+
onClick: handleClose,
|
|
9234
|
+
"aria-label": 'Close menu',
|
|
9068
9235
|
children: jsxRuntime.jsx(CrossIcon, {
|
|
9069
9236
|
size: 16,
|
|
9070
|
-
color: theme === 'dark' ? '#FFFFFF' : '#0C1C33'
|
|
9071
|
-
className: 'cursor-pointer'
|
|
9237
|
+
color: theme === 'dark' ? '#FFFFFF' : '#0C1C33'
|
|
9072
9238
|
})
|
|
9073
9239
|
})]
|
|
9074
9240
|
}), jsxRuntime.jsx("div", {
|
|
9075
9241
|
children: items.map((item, index) => jsxRuntime.jsx("div", {
|
|
9076
|
-
className: `${itemClasses} ${item.disabled ? 'opacity-50 cursor-not-allowed' : ''} ${index < items.length - 1 ? `border-b ${theme === 'dark' ? 'border-[rgba(255,255,255,0.15)]' : 'border-[rgba(12,28,51,0.05)]'}` : ''}`,
|
|
9242
|
+
className: `${itemClasses} ${item.disabled ? 'opacity-50 cursor-not-allowed' : ''} ${showItemBorders && index < items.length - 1 ? `border-b ${theme === 'dark' ? 'border-[rgba(255,255,255,0.15)]' : 'border-[rgba(12,28,51,0.05)]'}` : ''}`,
|
|
9077
9243
|
onClick: () => handleItemClick(item),
|
|
9078
|
-
children:
|
|
9079
|
-
className: 'w-full flex-1',
|
|
9080
|
-
children: item.content
|
|
9081
|
-
})
|
|
9244
|
+
children: item.content
|
|
9082
9245
|
}, item.id))
|
|
9083
9246
|
})]
|
|
9084
9247
|
})]
|
|
@@ -9370,7 +9533,7 @@ const List$1 = ({
|
|
|
9370
9533
|
className: 'flex flex-col gap-1',
|
|
9371
9534
|
children: [jsxRuntime.jsx(Text, {
|
|
9372
9535
|
size: size,
|
|
9373
|
-
weight:
|
|
9536
|
+
weight: "medium",
|
|
9374
9537
|
children: item.text
|
|
9375
9538
|
}), item.description && jsxRuntime.jsx(Text, {
|
|
9376
9539
|
size: 'xs',
|
|
@@ -9404,27 +9567,41 @@ const bigNumberStyles = classVarianceAuthority.cva('inline-flex whitespace-nowra
|
|
|
9404
9567
|
const BigNumber = ({
|
|
9405
9568
|
children,
|
|
9406
9569
|
variant = 'space',
|
|
9407
|
-
className = ''
|
|
9570
|
+
className = '',
|
|
9571
|
+
decimalPointSpacing = -2
|
|
9408
9572
|
}) => {
|
|
9409
9573
|
const {
|
|
9410
9574
|
theme
|
|
9411
9575
|
} = useTheme();
|
|
9576
|
+
const decimalPointStyle = {
|
|
9577
|
+
marginLeft: `${decimalPointSpacing}px`,
|
|
9578
|
+
marginRight: `${decimalPointSpacing}px`
|
|
9579
|
+
};
|
|
9412
9580
|
if (children === undefined || children === null) return null;
|
|
9413
9581
|
const str = children.toString();
|
|
9414
9582
|
if (variant === 'space') {
|
|
9415
|
-
//
|
|
9416
|
-
const
|
|
9583
|
+
// Split into integer and decimal parts
|
|
9584
|
+
const [intPart, fracPart] = str.split('.');
|
|
9585
|
+
// group digits every 3, right to left (only for integer part)
|
|
9586
|
+
const groups = intPart.split('').reverse().reduce((acc, char, idx) => {
|
|
9417
9587
|
if (idx % 3 === 0) acc.unshift('');
|
|
9418
9588
|
acc[0] = char + acc[0];
|
|
9419
9589
|
return acc;
|
|
9420
9590
|
}, []);
|
|
9421
|
-
return jsxRuntime.
|
|
9591
|
+
return jsxRuntime.jsxs("span", {
|
|
9422
9592
|
className: `${bigNumberStyles({
|
|
9423
9593
|
theme
|
|
9424
9594
|
})} ${className}`,
|
|
9425
|
-
children: groups.map((grp, i) => jsxRuntime.jsx("span", {
|
|
9595
|
+
children: [groups.map((grp, i) => jsxRuntime.jsx("span", {
|
|
9426
9596
|
children: grp
|
|
9427
|
-
}, i))
|
|
9597
|
+
}, i)), fracPart != null && jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
9598
|
+
children: [jsxRuntime.jsx("span", {
|
|
9599
|
+
style: decimalPointStyle,
|
|
9600
|
+
children: "."
|
|
9601
|
+
}), jsxRuntime.jsx("span", {
|
|
9602
|
+
children: fracPart
|
|
9603
|
+
})]
|
|
9604
|
+
})]
|
|
9428
9605
|
});
|
|
9429
9606
|
} else {
|
|
9430
9607
|
// comma variant
|
|
@@ -9446,6 +9623,7 @@ const BigNumber = ({
|
|
|
9446
9623
|
})]
|
|
9447
9624
|
}, i)), fracPart != null && jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
9448
9625
|
children: [jsxRuntime.jsx("span", {
|
|
9626
|
+
style: decimalPointStyle,
|
|
9449
9627
|
children: "."
|
|
9450
9628
|
}), jsxRuntime.jsx("span", {
|
|
9451
9629
|
children: fracPart
|
|
@@ -11746,6 +11924,24 @@ var Content$1 = DialogContent;
|
|
|
11746
11924
|
var Title = DialogTitle;
|
|
11747
11925
|
var Close = DialogClose;
|
|
11748
11926
|
|
|
11927
|
+
// Visually hidden component for accessibility
|
|
11928
|
+
const VisuallyHidden = ({
|
|
11929
|
+
children
|
|
11930
|
+
}) => jsxRuntime.jsx("span", {
|
|
11931
|
+
style: {
|
|
11932
|
+
position: 'absolute',
|
|
11933
|
+
border: 0,
|
|
11934
|
+
width: 1,
|
|
11935
|
+
height: 1,
|
|
11936
|
+
padding: 0,
|
|
11937
|
+
margin: -1,
|
|
11938
|
+
overflow: 'hidden',
|
|
11939
|
+
clip: 'rect(0, 0, 0, 0)',
|
|
11940
|
+
whiteSpace: 'nowrap',
|
|
11941
|
+
wordWrap: 'normal'
|
|
11942
|
+
},
|
|
11943
|
+
children: children
|
|
11944
|
+
});
|
|
11749
11945
|
const overlayStyles = classVarianceAuthority.cva(`
|
|
11750
11946
|
fixed
|
|
11751
11947
|
inset-0
|
|
@@ -11766,11 +11962,9 @@ const overlayStyles = classVarianceAuthority.cva(`
|
|
|
11766
11962
|
const contentStyles = classVarianceAuthority.cva(`
|
|
11767
11963
|
fixed
|
|
11768
11964
|
left-[50%]
|
|
11769
|
-
top-[50%]
|
|
11770
11965
|
z-50
|
|
11771
11966
|
w-full
|
|
11772
11967
|
translate-x-[-50%]
|
|
11773
|
-
translate-y-[-50%]
|
|
11774
11968
|
flex
|
|
11775
11969
|
flex-col
|
|
11776
11970
|
gap-4
|
|
@@ -11783,10 +11977,6 @@ const contentStyles = classVarianceAuthority.cva(`
|
|
|
11783
11977
|
data-[state=open]:fade-in-0
|
|
11784
11978
|
data-[state=closed]:zoom-out-95
|
|
11785
11979
|
data-[state=open]:zoom-in-95
|
|
11786
|
-
data-[state=closed]:slide-out-to-left-1/2
|
|
11787
|
-
data-[state=closed]:slide-out-to-top-[48%]
|
|
11788
|
-
data-[state=open]:slide-in-from-left-1/2
|
|
11789
|
-
data-[state=open]:slide-in-from-top-[48%]
|
|
11790
11980
|
sm:rounded-lg
|
|
11791
11981
|
font-dash-main
|
|
11792
11982
|
`, {
|
|
@@ -11799,10 +11989,27 @@ const contentStyles = classVarianceAuthority.cva(`
|
|
|
11799
11989
|
sm: 'dash-block-sm',
|
|
11800
11990
|
md: 'dash-block-md',
|
|
11801
11991
|
xl: 'dash-block-xl'
|
|
11992
|
+
},
|
|
11993
|
+
position: {
|
|
11994
|
+
center: `
|
|
11995
|
+
top-[50%]
|
|
11996
|
+
translate-y-[-50%]
|
|
11997
|
+
data-[state=closed]:slide-out-to-left-1/2
|
|
11998
|
+
data-[state=closed]:slide-out-to-top-[48%]
|
|
11999
|
+
data-[state=open]:slide-in-from-left-1/2
|
|
12000
|
+
data-[state=open]:slide-in-from-top-[48%]
|
|
12001
|
+
`,
|
|
12002
|
+
bottom: `
|
|
12003
|
+
data-[state=closed]:slide-out-to-left-1/2
|
|
12004
|
+
data-[state=closed]:slide-out-to-bottom-full
|
|
12005
|
+
data-[state=open]:slide-in-from-left-1/2
|
|
12006
|
+
data-[state=open]:slide-in-from-bottom-full
|
|
12007
|
+
`
|
|
11802
12008
|
}
|
|
11803
12009
|
},
|
|
11804
12010
|
defaultVariants: {
|
|
11805
|
-
size: 'md'
|
|
12011
|
+
size: 'md',
|
|
12012
|
+
position: 'center'
|
|
11806
12013
|
}
|
|
11807
12014
|
});
|
|
11808
12015
|
const headerStyles = classVarianceAuthority.cva(`
|
|
@@ -11851,6 +12058,10 @@ const DashDialog = ({
|
|
|
11851
12058
|
title,
|
|
11852
12059
|
showCloseButton = true,
|
|
11853
12060
|
size = 'md',
|
|
12061
|
+
position = 'center',
|
|
12062
|
+
bottomOffset = 24,
|
|
12063
|
+
maxWidth,
|
|
12064
|
+
horizontalMargin,
|
|
11854
12065
|
children,
|
|
11855
12066
|
className = '',
|
|
11856
12067
|
trigger
|
|
@@ -11858,6 +12069,40 @@ const DashDialog = ({
|
|
|
11858
12069
|
const {
|
|
11859
12070
|
theme
|
|
11860
12071
|
} = useTheme();
|
|
12072
|
+
// Calculate position and sizing styles
|
|
12073
|
+
const customStyles = {};
|
|
12074
|
+
if (position === 'bottom') {
|
|
12075
|
+
customStyles.bottom = `${bottomOffset}px`;
|
|
12076
|
+
}
|
|
12077
|
+
if (maxWidth) {
|
|
12078
|
+
// Check if it's a Tailwind size (sm, md, lg, xl, 2xl, etc.) or a CSS value
|
|
12079
|
+
const tailwindSizes = {
|
|
12080
|
+
'xs': '320px',
|
|
12081
|
+
'sm': '384px',
|
|
12082
|
+
'md': '448px',
|
|
12083
|
+
'lg': '512px',
|
|
12084
|
+
'xl': '576px',
|
|
12085
|
+
'2xl': '672px',
|
|
12086
|
+
'3xl': '768px',
|
|
12087
|
+
'4xl': '896px',
|
|
12088
|
+
'5xl': '1024px',
|
|
12089
|
+
'6xl': '1152px',
|
|
12090
|
+
'7xl': '1280px'
|
|
12091
|
+
};
|
|
12092
|
+
customStyles.maxWidth = tailwindSizes[maxWidth] || maxWidth;
|
|
12093
|
+
}
|
|
12094
|
+
if (horizontalMargin !== undefined) {
|
|
12095
|
+
// Set max width to viewport width minus margins on both sides
|
|
12096
|
+
const marginConstraint = `calc(100vw - ${horizontalMargin * 2}px)`;
|
|
12097
|
+
if (customStyles.maxWidth) {
|
|
12098
|
+
// If maxWidth is already set, use the smaller of the two
|
|
12099
|
+
customStyles.maxWidth = `min(${customStyles.maxWidth}, ${marginConstraint})`;
|
|
12100
|
+
} else {
|
|
12101
|
+
customStyles.maxWidth = marginConstraint;
|
|
12102
|
+
}
|
|
12103
|
+
// Keep the dialog centered but constrained by the calculated maxWidth
|
|
12104
|
+
// The existing left-[50%] translate-x-[-50%] will handle centering
|
|
12105
|
+
}
|
|
11861
12106
|
const DialogContent = jsxRuntime.jsxs(Portal, {
|
|
11862
12107
|
children: [jsxRuntime.jsx(Overlay, {
|
|
11863
12108
|
className: overlayStyles({
|
|
@@ -11867,11 +12112,15 @@ const DashDialog = ({
|
|
|
11867
12112
|
"aria-describedby": undefined,
|
|
11868
12113
|
className: `${contentStyles({
|
|
11869
12114
|
theme,
|
|
11870
|
-
size
|
|
12115
|
+
size,
|
|
12116
|
+
position
|
|
11871
12117
|
})} ${className}`,
|
|
11872
|
-
|
|
12118
|
+
style: customStyles,
|
|
12119
|
+
children: [title ?
|
|
12120
|
+
// Render visible title in header if provided
|
|
12121
|
+
jsxRuntime.jsxs("div", {
|
|
11873
12122
|
className: headerStyles(),
|
|
11874
|
-
children: [
|
|
12123
|
+
children: [jsxRuntime.jsx(Title, {
|
|
11875
12124
|
className: titleStyles({
|
|
11876
12125
|
theme
|
|
11877
12126
|
}),
|
|
@@ -11890,6 +12139,30 @@ const DashDialog = ({
|
|
|
11890
12139
|
children: "Close"
|
|
11891
12140
|
})]
|
|
11892
12141
|
})]
|
|
12142
|
+
}) :
|
|
12143
|
+
// No title provided - render visually hidden title for accessibility
|
|
12144
|
+
jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
12145
|
+
children: [jsxRuntime.jsx(Title, {
|
|
12146
|
+
children: jsxRuntime.jsx(VisuallyHidden, {
|
|
12147
|
+
children: "Dialog"
|
|
12148
|
+
})
|
|
12149
|
+
}), showCloseButton && jsxRuntime.jsx("div", {
|
|
12150
|
+
className: headerStyles(),
|
|
12151
|
+
children: jsxRuntime.jsxs(Close, {
|
|
12152
|
+
className: closeButtonStyles({
|
|
12153
|
+
theme
|
|
12154
|
+
}),
|
|
12155
|
+
children: [jsxRuntime.jsx("div", {
|
|
12156
|
+
className: 'w-8 h-8 flex items-center justify-center',
|
|
12157
|
+
children: jsxRuntime.jsx(CrossIcon, {
|
|
12158
|
+
size: 16
|
|
12159
|
+
})
|
|
12160
|
+
}), jsxRuntime.jsx("span", {
|
|
12161
|
+
className: 'sr-only',
|
|
12162
|
+
children: "Close"
|
|
12163
|
+
})]
|
|
12164
|
+
})
|
|
12165
|
+
})]
|
|
11893
12166
|
}), children]
|
|
11894
12167
|
})]
|
|
11895
12168
|
});
|
|
@@ -12441,6 +12714,7 @@ const Tabs = ({
|
|
|
12441
12714
|
};
|
|
12442
12715
|
|
|
12443
12716
|
exports.Accordion = Accordion;
|
|
12717
|
+
exports.AirplaneIcon = AirplaneIcon;
|
|
12444
12718
|
exports.ArrowIcon = ArrowIcon;
|
|
12445
12719
|
exports.Avatar = Avatar;
|
|
12446
12720
|
exports.Badge = Badge;
|
|
@@ -12464,6 +12738,7 @@ exports.DeleteIcon = DeleteIcon;
|
|
|
12464
12738
|
exports.Dialog = DashDialog;
|
|
12465
12739
|
exports.EditIcon = EditIcon;
|
|
12466
12740
|
exports.ErrorIcon = ErrorIcon;
|
|
12741
|
+
exports.ExternalLinkIcon = ExternalLinkIcon;
|
|
12467
12742
|
exports.EyeClosedIcon = EyeClosedIcon;
|
|
12468
12743
|
exports.EyeOpenIcon = EyeOpenIcon;
|
|
12469
12744
|
exports.FaceIcon = FaceIcon;
|
|
@@ -12471,6 +12746,7 @@ exports.FilterIcon = FilterIcon;
|
|
|
12471
12746
|
exports.FingerprintIcon = FingerprintIcon;
|
|
12472
12747
|
exports.Heading = Heading;
|
|
12473
12748
|
exports.Identifier = Identifier;
|
|
12749
|
+
exports.InfoCircleIcon = InfoCircleIcon;
|
|
12474
12750
|
exports.Input = Input;
|
|
12475
12751
|
exports.KebabMenuIcon = KebabMenuIcon;
|
|
12476
12752
|
exports.KeyIcon = KeyIcon;
|