@wistia/ui 0.22.7 → 0.22.9-beta.014159f2.bdc0210
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/index.d.ts +281 -51
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +585 -354
- package/dist/index.js.map +1 -1
- package/package.json +25 -24
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.22.
|
|
3
|
+
* @license @wistia/ui v0.22.9-beta.014159f2.bdc0210
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2026, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
7
7
|
* This source code is unlicensed, all rights reserved.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import {
|
|
10
|
+
import { Tooltip as Tooltip$1 } from "@base-ui/react/tooltip";
|
|
11
11
|
import { Children, cloneElement, createContext, forwardRef, isValidElement, useCallback, useContext, useEffect, useId, useLayoutEffect, useMemo, useRef, useState, useTransition } from "react";
|
|
12
12
|
import { createGlobalStyle, css, keyframes, styled } from "styled-components";
|
|
13
13
|
import { isArray, isBoolean, isEmptyString, isFunction, isNil, isNonEmptyArray, isNonEmptyString, isNotNil, isNotUndefined, isNumber, isRecord, isString, isUndefined } from "@wistia/type-guards";
|
|
@@ -18,23 +18,25 @@ import { useFilePicker as useFilePicker$1, useImperativeFilePicker as useImperat
|
|
|
18
18
|
import { FileAmountLimitValidator, FileSizeValidator, FileTypeValidator, ImageDimensionsValidator, PersistentFileAmountLimitValidator } from "use-file-picker/validators";
|
|
19
19
|
import { debounce, throttle } from "throttle-debounce";
|
|
20
20
|
import { Link as Link$1, useInRouterContext } from "react-router";
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
21
|
+
import { Collapsible as Collapsible$1 } from "@base-ui/react/collapsible";
|
|
22
|
+
import { RadioGroup as RadioGroup$1 } from "@base-ui/react/radio-group";
|
|
23
23
|
import { differenceEuclidean, easingSmootherstep, formatHex, interpolate, modeHsv, modeLrgb, modeRgb, parseHex, useMode, wcagContrast } from "culori/fn";
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
24
|
+
import { Radio as Radio$1 } from "@base-ui/react/radio";
|
|
25
|
+
import { ToggleGroup } from "@base-ui/react/toggle-group";
|
|
26
|
+
import { Toggle } from "@base-ui/react/toggle";
|
|
27
|
+
import { Popover as Popover$1 } from "@base-ui/react/popover";
|
|
28
|
+
import { Slider as Slider$1 } from "@base-ui/react/slider";
|
|
27
29
|
import * as Ariakit from "@ariakit/react";
|
|
28
30
|
import { matchSorter } from "match-sorter";
|
|
29
31
|
import { createPortal } from "react-dom";
|
|
30
|
-
import {
|
|
32
|
+
import { Menu as Menu$1 } from "@base-ui/react/menu";
|
|
31
33
|
import { ValidationError } from "yup";
|
|
32
|
-
import {
|
|
34
|
+
import { PreviewCard as PreviewCard$1 } from "@base-ui/react/preview-card";
|
|
33
35
|
import ReactMarkdown from "react-markdown";
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
36
|
+
import { Dialog } from "@base-ui/react/dialog";
|
|
37
|
+
import { Progress } from "@base-ui/react/progress";
|
|
38
|
+
import { Select as Select$1 } from "@base-ui/react/select";
|
|
39
|
+
import { Tabs as Tabs$1 } from "@base-ui/react/tabs";
|
|
38
40
|
//#region src/css/globalStyleAdjustmentsCss.tsx
|
|
39
41
|
const globalStyleAdjustmentsCss = css`
|
|
40
42
|
/**
|
|
@@ -444,7 +446,7 @@ const UIProvider = ({ children }) => {
|
|
|
444
446
|
if (useContext(UIProviderNestingContext)) return /* @__PURE__ */ jsx(Fragment, { children });
|
|
445
447
|
return /* @__PURE__ */ jsx(UIProviderNestingContext.Provider, {
|
|
446
448
|
value: true,
|
|
447
|
-
children: /* @__PURE__ */ jsx(AriaLiveProvider, { children: /* @__PURE__ */ jsxs(Provider, { children: [
|
|
449
|
+
children: /* @__PURE__ */ jsx(AriaLiveProvider, { children: /* @__PURE__ */ jsxs(Tooltip$1.Provider, { children: [
|
|
448
450
|
/* @__PURE__ */ jsx(GlobalStyle, {}),
|
|
449
451
|
children,
|
|
450
452
|
/* @__PURE__ */ jsx(ToastProvider, {})
|
|
@@ -1410,7 +1412,7 @@ const noOpFn = () => {};
|
|
|
1410
1412
|
//#endregion
|
|
1411
1413
|
//#region src/private/hooks/useEvent/useEvent.ts
|
|
1412
1414
|
const isEventTargetSupported = (eventTarget) => Boolean(typeof eventTarget === "object" && eventTarget?.addEventListener);
|
|
1413
|
-
const useEvent = (eventName, eventHandler, eventTarget = window, eventOptions = {}) => {
|
|
1415
|
+
const useEvent = (eventName, eventHandler, eventTarget = typeof document !== "undefined" ? window : void 0, eventOptions = {}) => {
|
|
1414
1416
|
const savedEventHandler = useRef(void 0);
|
|
1415
1417
|
const savedEventOptions = useRef(void 0);
|
|
1416
1418
|
useEffect(() => {
|
|
@@ -6900,30 +6902,39 @@ const ClickRegion = ({ children, targetRef }) => {
|
|
|
6900
6902
|
ClickRegion.displayName = "ClickRegion_UI";
|
|
6901
6903
|
//#endregion
|
|
6902
6904
|
//#region src/components/Collapsible/Collapsible.tsx
|
|
6903
|
-
const StyledRoot = styled(
|
|
6904
|
-
|
|
6905
|
-
|
|
6906
|
-
|
|
6907
|
-
|
|
6908
|
-
|
|
6909
|
-
|
|
6905
|
+
const StyledRoot = styled(Collapsible$1.Root)`
|
|
6906
|
+
${({ $isOpen }) => !$isOpen && css`
|
|
6907
|
+
[data-wui-collapsible-content] {
|
|
6908
|
+
display: -webkit-box;
|
|
6909
|
+
-webkit-box-orient: vertical;
|
|
6910
|
+
-webkit-line-clamp: var(--wui-collapsible-content-clamp-lines);
|
|
6911
|
+
overflow: hidden;
|
|
6912
|
+
}
|
|
6913
|
+
`}
|
|
6910
6914
|
`;
|
|
6911
6915
|
/**
|
|
6912
6916
|
* Toggle the visibility of content with a trigger.
|
|
6913
6917
|
*/
|
|
6914
|
-
const Collapsible = ({ children, isOpen
|
|
6918
|
+
const Collapsible = ({ children, isOpen, onOpenChange }) => {
|
|
6919
|
+
const isControlled = isNotNil(isOpen);
|
|
6920
|
+
const [internalOpen, setInternalOpen] = useState(false);
|
|
6921
|
+
const handleOpenChange = (open) => {
|
|
6922
|
+
if (!isControlled) setInternalOpen(open);
|
|
6923
|
+
onOpenChange?.(open);
|
|
6924
|
+
};
|
|
6915
6925
|
return /* @__PURE__ */ jsx(StyledRoot, {
|
|
6916
|
-
|
|
6926
|
+
$isOpen: isControlled ? isOpen : internalOpen,
|
|
6927
|
+
...isControlled ? {
|
|
6917
6928
|
open: isOpen,
|
|
6918
|
-
onOpenChange
|
|
6919
|
-
} : {},
|
|
6929
|
+
onOpenChange: handleOpenChange
|
|
6930
|
+
} : { onOpenChange: handleOpenChange },
|
|
6920
6931
|
children
|
|
6921
6932
|
});
|
|
6922
6933
|
};
|
|
6923
6934
|
Collapsible.displayName = "Collapsible_UI";
|
|
6924
6935
|
//#endregion
|
|
6925
6936
|
//#region src/components/Collapsible/CollapsibleTrigger.tsx
|
|
6926
|
-
const StyledTrigger$1 = styled(
|
|
6937
|
+
const StyledTrigger$1 = styled(Collapsible$1.Trigger)`
|
|
6927
6938
|
[data-wui-collapsible-icon] {
|
|
6928
6939
|
transition: transform var(--wui-motion-duration-03) ease-in-out;
|
|
6929
6940
|
}
|
|
@@ -6946,10 +6957,7 @@ const StyledTrigger$1 = styled(Trigger$1)`
|
|
|
6946
6957
|
`;
|
|
6947
6958
|
const CollapsibleTrigger = ({ children }) => {
|
|
6948
6959
|
Children.only(children);
|
|
6949
|
-
return /* @__PURE__ */ jsx(StyledTrigger$1, {
|
|
6950
|
-
asChild: true,
|
|
6951
|
-
children
|
|
6952
|
-
});
|
|
6960
|
+
return /* @__PURE__ */ jsx(StyledTrigger$1, { render: children });
|
|
6953
6961
|
};
|
|
6954
6962
|
//#endregion
|
|
6955
6963
|
//#region src/components/Collapsible/CollapsibleTriggerIcon.tsx
|
|
@@ -6980,7 +6988,7 @@ const CollapsibleContent = ({ clamp, children }) => {
|
|
|
6980
6988
|
"data-wui-collapsible-content": "true",
|
|
6981
6989
|
children
|
|
6982
6990
|
});
|
|
6983
|
-
return /* @__PURE__ */ jsx(
|
|
6991
|
+
return /* @__PURE__ */ jsx(Collapsible$1.Panel, { children: /* @__PURE__ */ jsxs(Fragment, { children: [children, " "] }) });
|
|
6984
6992
|
};
|
|
6985
6993
|
//#endregion
|
|
6986
6994
|
//#region src/components/ColorPicker/color-conversion-utils.ts
|
|
@@ -7455,7 +7463,7 @@ const Container$9 = styled.div`
|
|
|
7455
7463
|
const LabelContainer$1 = styled.div`
|
|
7456
7464
|
padding-top: var(--wui-space-01);
|
|
7457
7465
|
`;
|
|
7458
|
-
const ItemsContainer$1 = styled(
|
|
7466
|
+
const ItemsContainer$1 = styled(RadioGroup$1)`
|
|
7459
7467
|
display: flex;
|
|
7460
7468
|
flex-wrap: wrap;
|
|
7461
7469
|
align-items: center;
|
|
@@ -7470,7 +7478,7 @@ const ItemsContainer$1 = styled(Root$2)`
|
|
|
7470
7478
|
const ColorGrid = ({ children, label }) => {
|
|
7471
7479
|
const { valueAsHex, onChangeNonDerivedValueAsHsv } = useColorPickerState();
|
|
7472
7480
|
const onValueChange = useCallback((value) => {
|
|
7473
|
-
onChangeNonDerivedValueAsHsv(convertToHsv(value));
|
|
7481
|
+
if (typeof value === "string") onChangeNonDerivedValueAsHsv(convertToHsv(value));
|
|
7474
7482
|
}, [onChangeNonDerivedValueAsHsv]);
|
|
7475
7483
|
return /* @__PURE__ */ jsxs(Container$9, { children: [label != null && /* @__PURE__ */ jsx(LabelContainer$1, { children: /* @__PURE__ */ jsx(Label, { children: label }) }), /* @__PURE__ */ jsx(ItemsContainer$1, {
|
|
7476
7484
|
onValueChange,
|
|
@@ -7568,7 +7576,7 @@ const slideRightAndFade = keyframes`
|
|
|
7568
7576
|
transform: translateX(0);
|
|
7569
7577
|
}
|
|
7570
7578
|
`;
|
|
7571
|
-
const
|
|
7579
|
+
const StyledPopup$5 = styled(Tooltip$1.Popup)`
|
|
7572
7580
|
--tooltip-font-family: var(--wui-typography-family-default);
|
|
7573
7581
|
--tooltip-border-radius: var(--wui-border-radius-05);
|
|
7574
7582
|
--tooltip-bg: var(--wui-color-bg-tooltip);
|
|
@@ -7594,27 +7602,54 @@ const StyledContent$3 = styled(Content)`
|
|
|
7594
7602
|
max-width: 30em;
|
|
7595
7603
|
z-index: var(--wui-zindex-tooltip);
|
|
7596
7604
|
|
|
7597
|
-
&[data-
|
|
7605
|
+
&[data-closed] {
|
|
7598
7606
|
animation-name: ${hide};
|
|
7599
7607
|
}
|
|
7600
7608
|
|
|
7601
|
-
&[data-
|
|
7609
|
+
&[data-open][data-side='top'] {
|
|
7602
7610
|
animation-name: ${slideUpAndFade};
|
|
7603
7611
|
}
|
|
7604
7612
|
|
|
7605
|
-
&[data-
|
|
7613
|
+
&[data-open][data-side='right'] {
|
|
7606
7614
|
animation-name: ${slideRightAndFade};
|
|
7607
7615
|
}
|
|
7608
7616
|
|
|
7609
|
-
&[data-
|
|
7617
|
+
&[data-open][data-side='bottom'] {
|
|
7610
7618
|
animation-name: ${slideDownAndFade};
|
|
7611
7619
|
}
|
|
7612
7620
|
|
|
7613
|
-
&[data-
|
|
7621
|
+
&[data-open][data-side='left'] {
|
|
7614
7622
|
animation-name: ${slideLeftAndFade};
|
|
7615
7623
|
}
|
|
7624
|
+
|
|
7625
|
+
overflow: visible;
|
|
7626
|
+
`;
|
|
7627
|
+
const arrowEdgeCss = css`
|
|
7628
|
+
&[data-side='top'] {
|
|
7629
|
+
bottom: 0;
|
|
7630
|
+
transform: translateY(calc(100% - 2px));
|
|
7631
|
+
}
|
|
7632
|
+
|
|
7633
|
+
&[data-side='bottom'] {
|
|
7634
|
+
top: 0;
|
|
7635
|
+
transform: translateY(calc(-100% + 2px)) rotate(180deg);
|
|
7636
|
+
}
|
|
7637
|
+
|
|
7638
|
+
&[data-side='left'] {
|
|
7639
|
+
right: 0;
|
|
7640
|
+
transform: translateX(calc(100% - 4px)) rotate(-90deg);
|
|
7641
|
+
}
|
|
7642
|
+
|
|
7643
|
+
&[data-side='right'] {
|
|
7644
|
+
left: 0;
|
|
7645
|
+
transform: translateX(calc(-100% + 4px)) rotate(90deg);
|
|
7646
|
+
}
|
|
7647
|
+
`;
|
|
7648
|
+
const StyledTooltipArrow = styled.svg`
|
|
7649
|
+
${arrowEdgeCss}
|
|
7616
7650
|
`;
|
|
7617
7651
|
const VISUAL_OFFSET = 6;
|
|
7652
|
+
const ARROW_EXTENSION = 6;
|
|
7618
7653
|
/**
|
|
7619
7654
|
* Tooltips are a way to provide additional information or context to a user when they hover or focus an element.
|
|
7620
7655
|
* For elements that are not interactive, consider using a [Popover]() instead.
|
|
@@ -7624,29 +7659,27 @@ const Tooltip = ({ delay = 500, direction = "top", content, children, forceOpen,
|
|
|
7624
7659
|
const rootProps = {};
|
|
7625
7660
|
if (content === "" || content === null) rootProps.open = false;
|
|
7626
7661
|
if (forceOpen === true) rootProps.open = true;
|
|
7627
|
-
return /* @__PURE__ */ jsxs(Root, {
|
|
7628
|
-
delayDuration: delay,
|
|
7662
|
+
return /* @__PURE__ */ jsxs(Tooltip$1.Root, {
|
|
7629
7663
|
...rootProps,
|
|
7630
|
-
children: [/* @__PURE__ */ jsx(Trigger, {
|
|
7631
|
-
|
|
7632
|
-
children
|
|
7633
|
-
}), /* @__PURE__ */ jsx(Portal, {
|
|
7634
|
-
container,
|
|
7635
|
-
children: /* @__PURE__ */
|
|
7664
|
+
children: [/* @__PURE__ */ jsx(Tooltip$1.Trigger, {
|
|
7665
|
+
delay,
|
|
7666
|
+
render: isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children })
|
|
7667
|
+
}), /* @__PURE__ */ jsx(Tooltip$1.Portal, {
|
|
7668
|
+
...container != null ? { container } : {},
|
|
7669
|
+
children: /* @__PURE__ */ jsx(Tooltip$1.Positioner, {
|
|
7636
7670
|
side: direction,
|
|
7637
|
-
sideOffset: hideArrow ? VISUAL_OFFSET : VISUAL_OFFSET
|
|
7638
|
-
children:
|
|
7639
|
-
|
|
7640
|
-
children: /* @__PURE__ */ jsx(
|
|
7671
|
+
sideOffset: hideArrow ? VISUAL_OFFSET : VISUAL_OFFSET + ARROW_EXTENSION,
|
|
7672
|
+
children: /* @__PURE__ */ jsxs(StyledPopup$5, {
|
|
7673
|
+
role: "tooltip",
|
|
7674
|
+
children: [content, !hideArrow ? /* @__PURE__ */ jsx(Tooltip$1.Arrow, { render: /* @__PURE__ */ jsx(StyledTooltipArrow, {
|
|
7641
7675
|
fill: "var(--tooltip-bg)",
|
|
7642
7676
|
height: "8",
|
|
7643
|
-
style: { transform: "translateY(-2px)" },
|
|
7644
7677
|
viewBox: "0 0 12 8",
|
|
7645
7678
|
width: "12",
|
|
7646
7679
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7647
7680
|
children: /* @__PURE__ */ jsx("path", { d: "M6.8 6.93333C6.4 7.46667 5.6 7.46667 5.2 6.93333L-2.54292e-07 -1.04907e-06L12 0L6.8 6.93333Z" })
|
|
7648
|
-
})
|
|
7649
|
-
})
|
|
7681
|
+
}) }) : null]
|
|
7682
|
+
})
|
|
7650
7683
|
})
|
|
7651
7684
|
})]
|
|
7652
7685
|
});
|
|
@@ -7654,7 +7687,7 @@ const Tooltip = ({ delay = 500, direction = "top", content, children, forceOpen,
|
|
|
7654
7687
|
Tooltip.displayName = "Tooltip_UI";
|
|
7655
7688
|
//#endregion
|
|
7656
7689
|
//#region src/components/ColorPicker/ColorGridOption.tsx
|
|
7657
|
-
const Container$8 = styled(
|
|
7690
|
+
const Container$8 = styled(Radio$1.Root)`
|
|
7658
7691
|
border: none;
|
|
7659
7692
|
appearance: none;
|
|
7660
7693
|
outline: none;
|
|
@@ -7673,7 +7706,6 @@ const ColorGridOption = ({ value: rawValue, name }) => {
|
|
|
7673
7706
|
const { valueAsHsv, nonDerivedValueAsHex } = useColorPickerState();
|
|
7674
7707
|
const valueAsHex = formatHex(valueAsHsv);
|
|
7675
7708
|
const isSelected = valueAsHex === value;
|
|
7676
|
-
const derivativeIsSelected = !isSelected && nonDerivedValueAsHex === value;
|
|
7677
7709
|
return /* @__PURE__ */ jsx(Tooltip, {
|
|
7678
7710
|
content: name ?? /* @__PURE__ */ jsx("span", {
|
|
7679
7711
|
style: { fontFamily: "var(--wui-typography-family-mono)" },
|
|
@@ -7686,7 +7718,7 @@ const ColorGridOption = ({ value: rawValue, name }) => {
|
|
|
7686
7718
|
tabIndex: -1,
|
|
7687
7719
|
value,
|
|
7688
7720
|
children: /* @__PURE__ */ jsx(ColorSwatch, {
|
|
7689
|
-
derivativeIsSelected,
|
|
7721
|
+
derivativeIsSelected: !isSelected && nonDerivedValueAsHex === value,
|
|
7690
7722
|
isSelected,
|
|
7691
7723
|
value
|
|
7692
7724
|
})
|
|
@@ -7696,7 +7728,7 @@ const ColorGridOption = ({ value: rawValue, name }) => {
|
|
|
7696
7728
|
ColorGridOption.displayName = "ColorGridOption_UI";
|
|
7697
7729
|
//#endregion
|
|
7698
7730
|
//#region src/components/ColorPicker/ColorList.tsx
|
|
7699
|
-
const Container$7 = styled(
|
|
7731
|
+
const Container$7 = styled(ToggleGroup)`
|
|
7700
7732
|
display: grid;
|
|
7701
7733
|
grid-template-columns: minmax(0, 1fr);
|
|
7702
7734
|
`;
|
|
@@ -7708,12 +7740,12 @@ const Container$7 = styled(Root$3)`
|
|
|
7708
7740
|
const ColorList = ({ children }) => {
|
|
7709
7741
|
const { valueAsHex, onChangeNonDerivedValueAsHsv } = useColorPickerState();
|
|
7710
7742
|
return /* @__PURE__ */ jsx(Container$7, {
|
|
7711
|
-
onValueChange: useCallback((
|
|
7712
|
-
|
|
7743
|
+
onValueChange: useCallback((newValue) => {
|
|
7744
|
+
const value = newValue[0];
|
|
7745
|
+
if (value === void 0 || value === "") return;
|
|
7713
7746
|
onChangeNonDerivedValueAsHsv(convertToHsv(value));
|
|
7714
7747
|
}, [onChangeNonDerivedValueAsHsv]),
|
|
7715
|
-
|
|
7716
|
-
value: valueAsHex,
|
|
7748
|
+
value: [valueAsHex],
|
|
7717
7749
|
children
|
|
7718
7750
|
});
|
|
7719
7751
|
};
|
|
@@ -7765,7 +7797,7 @@ const ColorNameOrHexCode = ({ name, hexCode }) => {
|
|
|
7765
7797
|
};
|
|
7766
7798
|
//#endregion
|
|
7767
7799
|
//#region src/components/ColorPicker/ColorListOption.tsx
|
|
7768
|
-
const Container$5 = styled(
|
|
7800
|
+
const Container$5 = styled(Toggle)`
|
|
7769
7801
|
border: none;
|
|
7770
7802
|
appearance: none;
|
|
7771
7803
|
outline: none;
|
|
@@ -7796,7 +7828,6 @@ const ColorListOption = ({ value: rawValue, name }) => {
|
|
|
7796
7828
|
const { valueAsHsv, nonDerivedValueAsHex } = useColorPickerState();
|
|
7797
7829
|
const valueAsHex = formatHex(valueAsHsv);
|
|
7798
7830
|
const isSelected = valueAsHex === value;
|
|
7799
|
-
const derivativeIsSelected = !isSelected && nonDerivedValueAsHex === value;
|
|
7800
7831
|
return /* @__PURE__ */ jsxs(Container$5, {
|
|
7801
7832
|
"aria-label": value,
|
|
7802
7833
|
"aria-selected": valueAsHex === value,
|
|
@@ -7804,7 +7835,7 @@ const ColorListOption = ({ value: rawValue, name }) => {
|
|
|
7804
7835
|
tabIndex: -1,
|
|
7805
7836
|
value,
|
|
7806
7837
|
children: [/* @__PURE__ */ jsx(ColorSwatch, {
|
|
7807
|
-
derivativeIsSelected,
|
|
7838
|
+
derivativeIsSelected: !isSelected && nonDerivedValueAsHex === value,
|
|
7808
7839
|
isSelected,
|
|
7809
7840
|
value
|
|
7810
7841
|
}), /* @__PURE__ */ jsx(ColorNameOrHexCode, {
|
|
@@ -7815,6 +7846,19 @@ const ColorListOption = ({ value: rawValue, name }) => {
|
|
|
7815
7846
|
};
|
|
7816
7847
|
ColorListOption.displayName = "ColorListOption_UI";
|
|
7817
7848
|
//#endregion
|
|
7849
|
+
//#region src/components/ColorPicker/normalizeHexColor.ts
|
|
7850
|
+
/**
|
|
7851
|
+
* A helper to ensure that a given hex code is normalized for all variants (short-hand, missing hex prefix, uppercase)
|
|
7852
|
+
*
|
|
7853
|
+
* @param hexValue
|
|
7854
|
+
* @returns string, a hex code value with a hash prefix followed by 6 hex characters
|
|
7855
|
+
*/
|
|
7856
|
+
const normalizeHexColor = (hexValue) => {
|
|
7857
|
+
const hexValueWithHash = hexValue.startsWith("#") ? hexValue.toLowerCase() : `#${hexValue.toLowerCase()}`;
|
|
7858
|
+
if (hexValueWithHash.length === 4) return `#${hexValueWithHash[1]}${hexValueWithHash[1]}${hexValueWithHash[2]}${hexValueWithHash[2]}${hexValueWithHash[3]}${hexValueWithHash[3]}`;
|
|
7859
|
+
return hexValueWithHash;
|
|
7860
|
+
};
|
|
7861
|
+
//#endregion
|
|
7818
7862
|
//#region src/components/ColorPicker/ColorPicker.tsx
|
|
7819
7863
|
/**
|
|
7820
7864
|
* A composable color picker built from low-level building blocks. Choose the
|
|
@@ -7826,11 +7870,11 @@ ColorListOption.displayName = "ColorListOption_UI";
|
|
|
7826
7870
|
* sensible defaults (brand colors, contrast controls, popover/inline modes).
|
|
7827
7871
|
*/
|
|
7828
7872
|
const ColorPicker = ({ children, colorForComparison = DEFAULT_COLOR_FOR_COMPARISON, minimumContrastRatio = DEFAULT_MIN_CONTRAST, onOpenChange, opacityForContrastCalculation = 1, onValueChange, value }) => {
|
|
7829
|
-
const normalizedValue =
|
|
7873
|
+
const normalizedValue = normalizeHexColor(value);
|
|
7830
7874
|
const handleOpenChange = (isOpen) => {
|
|
7831
7875
|
if (isFunction(onOpenChange)) onOpenChange(isOpen);
|
|
7832
7876
|
};
|
|
7833
|
-
return /* @__PURE__ */ jsx(Root
|
|
7877
|
+
return /* @__PURE__ */ jsx(Popover$1.Root, {
|
|
7834
7878
|
modal: false,
|
|
7835
7879
|
onOpenChange: handleOpenChange,
|
|
7836
7880
|
children: /* @__PURE__ */ jsx(ColorPickerProvider, {
|
|
@@ -7846,7 +7890,7 @@ const ColorPicker = ({ children, colorForComparison = DEFAULT_COLOR_FOR_COMPARIS
|
|
|
7846
7890
|
ColorPicker.displayName = "ColorPicker_UI";
|
|
7847
7891
|
//#endregion
|
|
7848
7892
|
//#region src/components/ColorPicker/ColorPickerPopoverContent.tsx
|
|
7849
|
-
const
|
|
7893
|
+
const StyledPopup$4 = styled(Popover$1.Popup)`
|
|
7850
7894
|
background-color: var(--wui-color-bg-surface);
|
|
7851
7895
|
border-radius: var(--wui-border-radius-02);
|
|
7852
7896
|
border: 1px solid var(--wui-color-border);
|
|
@@ -7863,10 +7907,10 @@ const StyledPopoverContent = styled(Content$2)`
|
|
|
7863
7907
|
* Use `ColorPickerSection` to organize content within it.
|
|
7864
7908
|
*/
|
|
7865
7909
|
const ColorPickerPopoverContent = ({ children }) => {
|
|
7866
|
-
return /* @__PURE__ */ jsx(
|
|
7910
|
+
return /* @__PURE__ */ jsx(Popover$1.Portal, { children: /* @__PURE__ */ jsx(Popover$1.Positioner, {
|
|
7867
7911
|
align: "start",
|
|
7868
7912
|
sideOffset: 4,
|
|
7869
|
-
children
|
|
7913
|
+
children: /* @__PURE__ */ jsx(StyledPopup$4, { children })
|
|
7870
7914
|
}) });
|
|
7871
7915
|
};
|
|
7872
7916
|
ColorPickerPopoverContent.displayName = "ColorPickerPopoverContent_UI";
|
|
@@ -7913,7 +7957,7 @@ const ValueNameOrHexCode = (props) => {
|
|
|
7913
7957
|
ValueNameOrHexCode.displayName = "ValueNameOrHexCode_UI";
|
|
7914
7958
|
//#endregion
|
|
7915
7959
|
//#region src/components/ColorPicker/ColorPickerTrigger.tsx
|
|
7916
|
-
const StyledPopoverTrigger = styled(Trigger
|
|
7960
|
+
const StyledPopoverTrigger = styled(Popover$1.Trigger)`
|
|
7917
7961
|
background-color: var(--wui-color-bg-surface);
|
|
7918
7962
|
border-radius: var(--wui-border-radius-rounded);
|
|
7919
7963
|
border: none;
|
|
@@ -8329,6 +8373,13 @@ const StyledInputContainer = styled.div`
|
|
|
8329
8373
|
transform: translateY(-50%);
|
|
8330
8374
|
}
|
|
8331
8375
|
|
|
8376
|
+
/* Presentational icons shouldn't swallow clicks meant for the input.
|
|
8377
|
+
Scoped to svg so interactive decorations (e.g. IconButton) still work. */
|
|
8378
|
+
svg.wui-input-left-icon,
|
|
8379
|
+
svg.wui-input-right-icon {
|
|
8380
|
+
pointer-events: none;
|
|
8381
|
+
}
|
|
8382
|
+
|
|
8332
8383
|
&:has(.wui-input-left-icon) input,
|
|
8333
8384
|
&:has(.wui-input-left-icon) textarea {
|
|
8334
8385
|
padding-left: 32px;
|
|
@@ -8559,7 +8610,7 @@ const Container$2 = styled.div`
|
|
|
8559
8610
|
padding: 0 var(--wui-space-03);
|
|
8560
8611
|
position: relative;
|
|
8561
8612
|
`;
|
|
8562
|
-
const Root
|
|
8613
|
+
const Root = styled(Slider$1.Root)`
|
|
8563
8614
|
align-items: center;
|
|
8564
8615
|
display: flex;
|
|
8565
8616
|
position: absolute;
|
|
@@ -8568,10 +8619,10 @@ const Root$11 = styled(Root$5)`
|
|
|
8568
8619
|
width: calc(100% - var(--wui-space-05));
|
|
8569
8620
|
height: 16px;
|
|
8570
8621
|
`;
|
|
8571
|
-
const Track
|
|
8622
|
+
const Track = styled(Slider$1.Track)`
|
|
8572
8623
|
width: 100%;
|
|
8573
8624
|
`;
|
|
8574
|
-
const Thumb$
|
|
8625
|
+
const Thumb$1 = styled(Slider$1.Thumb)`
|
|
8575
8626
|
position: relative;
|
|
8576
8627
|
`;
|
|
8577
8628
|
const ThumbInner = styled.div`
|
|
@@ -8586,7 +8637,7 @@ const ThumbInner = styled.div`
|
|
|
8586
8637
|
transform: translate(-50%, -50%);
|
|
8587
8638
|
width: 16px;
|
|
8588
8639
|
|
|
8589
|
-
${Thumb$
|
|
8640
|
+
${Thumb$1}:focus-visible > & {
|
|
8590
8641
|
box-shadow:
|
|
8591
8642
|
inset 0 0 0 2px var(--wui-color-border),
|
|
8592
8643
|
inset 0 0 0 3px black;
|
|
@@ -8611,7 +8662,7 @@ const HueSlider = (props) => {
|
|
|
8611
8662
|
return { backgroundColor: formatHex(valueAsHsv) };
|
|
8612
8663
|
}, [valueAsHsv]);
|
|
8613
8664
|
const onHueChange = useCallback((values) => {
|
|
8614
|
-
const newHue = values[0] ?? 0;
|
|
8665
|
+
const newHue = typeof values === "number" ? values : values[0] ?? 0;
|
|
8615
8666
|
onChangeNonDerivedValueAsHsv({
|
|
8616
8667
|
...nonDerivedValueAsHsv,
|
|
8617
8668
|
h: newHue
|
|
@@ -8620,17 +8671,17 @@ const HueSlider = (props) => {
|
|
|
8620
8671
|
return /* @__PURE__ */ jsxs(Container$2, {
|
|
8621
8672
|
...props,
|
|
8622
8673
|
style: containerStyle,
|
|
8623
|
-
children: [/* @__PURE__ */
|
|
8674
|
+
children: [/* @__PURE__ */ jsx(Root, {
|
|
8624
8675
|
max: 360,
|
|
8625
8676
|
min: 0,
|
|
8626
8677
|
onValueChange: onHueChange,
|
|
8627
8678
|
orientation: "horizontal",
|
|
8628
8679
|
step: 1,
|
|
8629
8680
|
value: [nonDerivedValueAsHsv.h ?? 0],
|
|
8630
|
-
children: [/* @__PURE__ */ jsx(Track
|
|
8681
|
+
children: /* @__PURE__ */ jsxs(Slider$1.Control, { children: [/* @__PURE__ */ jsx(Track, {}), /* @__PURE__ */ jsx(Thumb$1, {
|
|
8631
8682
|
"aria-label": "Hue slider",
|
|
8632
8683
|
children: /* @__PURE__ */ jsx(ThumbInner, { style: thumbInnerStyle })
|
|
8633
|
-
})]
|
|
8684
|
+
})] })
|
|
8634
8685
|
}), /* @__PURE__ */ jsx(HSVHueCanvas, { hsv: valueAsHsv })]
|
|
8635
8686
|
});
|
|
8636
8687
|
};
|
|
@@ -8760,7 +8811,7 @@ const Container$1 = styled.div`
|
|
|
8760
8811
|
overflow: hidden;
|
|
8761
8812
|
position: relative;
|
|
8762
8813
|
`;
|
|
8763
|
-
const Thumb
|
|
8814
|
+
const Thumb = styled.button.attrs({ type: "button" })`
|
|
8764
8815
|
appearance: none;
|
|
8765
8816
|
border-radius: var(--wui-border-radius-rounded);
|
|
8766
8817
|
border: none;
|
|
@@ -8895,7 +8946,7 @@ const SaturationAndValuePicker = ({ dataTestId }) => {
|
|
|
8895
8946
|
"data-testid": dataTestId,
|
|
8896
8947
|
onMouseDown: onContainerMouseDown,
|
|
8897
8948
|
children: [
|
|
8898
|
-
/* @__PURE__ */ jsx(Thumb
|
|
8949
|
+
/* @__PURE__ */ jsx(Thumb, {
|
|
8899
8950
|
ref: thumbRef,
|
|
8900
8951
|
"aria-describedby": instructionsId,
|
|
8901
8952
|
"aria-label": "Saturation and value thumb",
|
|
@@ -9360,18 +9411,18 @@ const menuContentCss = css`
|
|
|
9360
9411
|
font-family: var(--menu-font-family);
|
|
9361
9412
|
background: var(--menu-bg);
|
|
9362
9413
|
border-radius: var(--menu-border-radius);
|
|
9363
|
-
box-shadow: var(--menu-shadow);
|
|
9364
|
-
max-height: var(--
|
|
9414
|
+
box-shadow: var(--menu-shadow);
|
|
9415
|
+
max-height: var(--available-height);
|
|
9365
9416
|
min-width: var(--menu-min-width);
|
|
9366
9417
|
max-width: var(--menu-max-width);
|
|
9367
9418
|
overflow: auto;
|
|
9368
9419
|
padding: var(--menu-padding);
|
|
9369
|
-
transform-origin: var(--
|
|
9420
|
+
transform-origin: var(--transform-origin);
|
|
9370
9421
|
z-index: var(--wui-zindex-menu);
|
|
9371
9422
|
border: 1px solid var(--wui-color-border);
|
|
9372
9423
|
|
|
9373
|
-
&[data-
|
|
9374
|
-
animation: var(--menu-animation-duration) var(--wui-motion-ease-in) ${close};
|
|
9424
|
+
&[data-closed] {
|
|
9425
|
+
animation: var(--menu-animation-duration) var(--wui-motion-ease-in) ${close};
|
|
9375
9426
|
}
|
|
9376
9427
|
|
|
9377
9428
|
${mq.smAndUp} {
|
|
@@ -9386,18 +9437,21 @@ const menuContentCss = css`
|
|
|
9386
9437
|
margin: var(--menu-divider-margin) 0;
|
|
9387
9438
|
}
|
|
9388
9439
|
`;
|
|
9389
|
-
const
|
|
9440
|
+
const MenuPopup = styled(Menu$1.Popup)`
|
|
9390
9441
|
${menuContentCss}
|
|
9391
|
-
min-width: var(--
|
|
9442
|
+
min-width: var(--anchor-width);
|
|
9392
9443
|
`;
|
|
9393
9444
|
/**
|
|
9394
9445
|
* Displays a menu to the users with a set of actions.
|
|
9395
9446
|
*/
|
|
9396
9447
|
const Menu = forwardRef(({ align = "start", children, disabled = false, compact = false, trigger, label, isOpen, side = "bottom", triggerProps = {}, onOpenChange, ...props }, ref) => {
|
|
9397
9448
|
const contextValue = useMemo(() => ({ compact }), [compact]);
|
|
9449
|
+
const handleOpenChange = useCallback((nextOpen) => {
|
|
9450
|
+
if (nextOpen !== isOpen) onOpenChange?.(nextOpen);
|
|
9451
|
+
}, [isOpen, onOpenChange]);
|
|
9398
9452
|
let controlProps = { ...isNotNil(onOpenChange) && isNotNil(isOpen) ? {
|
|
9399
9453
|
open: isOpen,
|
|
9400
|
-
onOpenChange
|
|
9454
|
+
onOpenChange: handleOpenChange
|
|
9401
9455
|
} : {} };
|
|
9402
9456
|
if (disabled) controlProps = {
|
|
9403
9457
|
open: false,
|
|
@@ -9405,50 +9459,43 @@ const Menu = forwardRef(({ align = "start", children, disabled = false, compact
|
|
|
9405
9459
|
};
|
|
9406
9460
|
return /* @__PURE__ */ jsx(MenuContext.Provider, {
|
|
9407
9461
|
value: contextValue,
|
|
9408
|
-
children: /* @__PURE__ */ jsxs(
|
|
9462
|
+
children: /* @__PURE__ */ jsxs(Menu$1.Root, {
|
|
9409
9463
|
modal: false,
|
|
9410
9464
|
...controlProps,
|
|
9411
|
-
children: [/* @__PURE__ */ jsx(
|
|
9412
|
-
|
|
9413
|
-
|
|
9414
|
-
|
|
9415
|
-
|
|
9416
|
-
|
|
9417
|
-
|
|
9418
|
-
|
|
9419
|
-
...triggerProps,
|
|
9420
|
-
children: label
|
|
9421
|
-
})
|
|
9422
|
-
}), /* @__PURE__ */ jsx(DropdownMenuPortal, { children: /* @__PURE__ */ jsx(MenuContent, {
|
|
9423
|
-
...props,
|
|
9424
|
-
$compact: compact,
|
|
9465
|
+
children: [/* @__PURE__ */ jsx(Menu$1.Trigger, { render: isNotUndefined(trigger) ? trigger : /* @__PURE__ */ jsx(Button, {
|
|
9466
|
+
ref,
|
|
9467
|
+
disabled,
|
|
9468
|
+
forceState: isOpen ? "active" : void 0,
|
|
9469
|
+
rightIcon: /* @__PURE__ */ jsx(Icon, { type: "caret-down" }),
|
|
9470
|
+
...triggerProps,
|
|
9471
|
+
children: label
|
|
9472
|
+
}) }), /* @__PURE__ */ jsx(Menu$1.Portal, { children: /* @__PURE__ */ jsx(Menu$1.Positioner, {
|
|
9425
9473
|
align,
|
|
9426
9474
|
collisionPadding: 8,
|
|
9427
|
-
onFocusOutside: (event) => {
|
|
9428
|
-
event.preventDefault();
|
|
9429
|
-
},
|
|
9430
9475
|
side,
|
|
9431
9476
|
sideOffset: 6,
|
|
9432
|
-
children
|
|
9477
|
+
children: /* @__PURE__ */ jsx(MenuPopup, {
|
|
9478
|
+
...props,
|
|
9479
|
+
$compact: compact,
|
|
9480
|
+
children
|
|
9481
|
+
})
|
|
9433
9482
|
}) })]
|
|
9434
9483
|
})
|
|
9435
9484
|
});
|
|
9436
9485
|
});
|
|
9437
9486
|
Menu.displayName = "Menu_UI";
|
|
9438
|
-
Menu.displayName = "Menu_UI";
|
|
9439
9487
|
//#endregion
|
|
9440
9488
|
//#region src/components/Menu/MenuLabel.tsx
|
|
9441
|
-
const StyledMenuLabel = styled
|
|
9489
|
+
const StyledMenuLabel = styled.div`
|
|
9442
9490
|
padding: var(--wui-space-02);
|
|
9443
9491
|
`;
|
|
9444
9492
|
const MenuLabel = ({ children, ...props }) => {
|
|
9445
9493
|
return /* @__PURE__ */ jsx(StyledMenuLabel, {
|
|
9446
|
-
|
|
9494
|
+
role: "group",
|
|
9447
9495
|
...props,
|
|
9448
9496
|
children: /* @__PURE__ */ jsx(Heading, {
|
|
9449
9497
|
renderAs: "span",
|
|
9450
9498
|
variant: "heading6",
|
|
9451
|
-
...props,
|
|
9452
9499
|
children
|
|
9453
9500
|
})
|
|
9454
9501
|
});
|
|
@@ -9579,7 +9626,7 @@ const MenuItemDescription = ({ children }) => {
|
|
|
9579
9626
|
};
|
|
9580
9627
|
//#endregion
|
|
9581
9628
|
//#region src/components/Menu/SubMenu.tsx
|
|
9582
|
-
const
|
|
9629
|
+
const SubMenuPopup = styled(Menu$1.Popup)`
|
|
9583
9630
|
${menuContentCss}
|
|
9584
9631
|
|
|
9585
9632
|
${mq.smAndDown} {
|
|
@@ -9589,19 +9636,19 @@ const SubMenuContent = styled(DropdownMenuSubContent)`
|
|
|
9589
9636
|
const StyledMobileSubMenuItems = styled.div`
|
|
9590
9637
|
margin-left: var(--wui-space-04);
|
|
9591
9638
|
`;
|
|
9592
|
-
const StyledSubTrigger = styled(
|
|
9639
|
+
const StyledSubTrigger = styled(Menu$1.SubmenuTrigger)`
|
|
9593
9640
|
outline: none;
|
|
9594
9641
|
|
|
9595
|
-
&[data-
|
|
9642
|
+
&[data-popup-open],
|
|
9596
9643
|
&[data-highlighted] {
|
|
9597
9644
|
background-color: var(--wui-color-bg-surface-hover);
|
|
9598
9645
|
}
|
|
9599
9646
|
`;
|
|
9600
9647
|
const SubMenuTrigger = ({ icon, ...props }) => {
|
|
9601
9648
|
const { isSmAndUp } = useMq();
|
|
9602
|
-
return /* @__PURE__ */ jsx(isSmAndUp ? StyledSubTrigger :
|
|
9603
|
-
|
|
9604
|
-
|
|
9649
|
+
return /* @__PURE__ */ jsx(isSmAndUp ? StyledSubTrigger : Menu$1.Item, {
|
|
9650
|
+
nativeButton: true,
|
|
9651
|
+
render: /* @__PURE__ */ jsx(MenuItemButton, {
|
|
9605
9652
|
...props,
|
|
9606
9653
|
leftIcon: icon,
|
|
9607
9654
|
rightIcon: /* @__PURE__ */ jsx(Icon, { type: "caret-right" })
|
|
@@ -9612,32 +9659,33 @@ const SubMenu = ({ label, description, children, onOpenChange = () => null, ...p
|
|
|
9612
9659
|
const { isSmAndUp } = useMq();
|
|
9613
9660
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
9614
9661
|
const { compact } = useMenuContext();
|
|
9615
|
-
return isSmAndUp ? /* @__PURE__ */ jsxs(
|
|
9662
|
+
return isSmAndUp ? /* @__PURE__ */ jsxs(Menu$1.SubmenuRoot, {
|
|
9616
9663
|
onOpenChange,
|
|
9617
9664
|
children: [/* @__PURE__ */ jsxs(SubMenuTrigger, {
|
|
9618
9665
|
...props,
|
|
9619
9666
|
children: [/* @__PURE__ */ jsx(MenuItemLabel, { children: label }), isNotNil(description) ? /* @__PURE__ */ jsx(MenuItemDescription, { children: description }) : null]
|
|
9620
|
-
}), /* @__PURE__ */ jsx(
|
|
9667
|
+
}), /* @__PURE__ */ jsx(Menu$1.Portal, { children: /* @__PURE__ */ jsx(Menu$1.Positioner, { children: /* @__PURE__ */ jsx(SubMenuPopup, {
|
|
9621
9668
|
$compact: compact,
|
|
9622
9669
|
children
|
|
9623
|
-
}) })]
|
|
9624
|
-
}) : /* @__PURE__ */ jsxs(
|
|
9670
|
+
}) }) })]
|
|
9671
|
+
}) : /* @__PURE__ */ jsxs(Menu$1.Group, { children: [/* @__PURE__ */ jsxs(SubMenuTrigger, {
|
|
9625
9672
|
...props,
|
|
9626
9673
|
onClick: (event) => {
|
|
9627
9674
|
event.preventDefault();
|
|
9628
9675
|
setIsExpanded((prev) => !prev);
|
|
9629
9676
|
},
|
|
9630
|
-
children: [/* @__PURE__ */ jsx(MenuItemLabel, { children: label }), /* @__PURE__ */ jsx(MenuItemDescription, { children: description })]
|
|
9677
|
+
children: [/* @__PURE__ */ jsx(MenuItemLabel, { children: label }), isNotNil(description) ? /* @__PURE__ */ jsx(MenuItemDescription, { children: description }) : null]
|
|
9631
9678
|
}), /* @__PURE__ */ jsx(StyledMobileSubMenuItems, { children: isExpanded ? children : null })] });
|
|
9632
9679
|
};
|
|
9633
9680
|
SubMenu.displayName = "SubMenu_UI";
|
|
9634
9681
|
//#endregion
|
|
9635
9682
|
//#region src/components/Menu/MenuItem.tsx
|
|
9636
|
-
const MenuItem = forwardRef(({ onSelect = () => null, ...props }, ref) => {
|
|
9637
|
-
return /* @__PURE__ */ jsx(
|
|
9638
|
-
|
|
9639
|
-
|
|
9640
|
-
|
|
9683
|
+
const MenuItem = forwardRef(({ onSelect = () => null, closeOnClick = true, ...props }, ref) => {
|
|
9684
|
+
return /* @__PURE__ */ jsx(Menu$1.Item, {
|
|
9685
|
+
closeOnClick,
|
|
9686
|
+
nativeButton: isNil(props.href),
|
|
9687
|
+
onClick: onSelect,
|
|
9688
|
+
render: /* @__PURE__ */ jsx(MenuItemButton, {
|
|
9641
9689
|
...props,
|
|
9642
9690
|
ref,
|
|
9643
9691
|
leftIcon: props.icon
|
|
@@ -9648,7 +9696,7 @@ MenuItem.displayName = "MenuItem_UI";
|
|
|
9648
9696
|
//#endregion
|
|
9649
9697
|
//#region src/components/Menu/MenuRadioGroup.tsx
|
|
9650
9698
|
const MenuRadioGroup = ({ children, ...props }) => {
|
|
9651
|
-
return /* @__PURE__ */ jsx(
|
|
9699
|
+
return /* @__PURE__ */ jsx(Menu$1.RadioGroup, {
|
|
9652
9700
|
...props,
|
|
9653
9701
|
children
|
|
9654
9702
|
});
|
|
@@ -9660,14 +9708,16 @@ const RadioMenuItem = ({ onSelect, value, indicator = /* @__PURE__ */ jsx(Icon,
|
|
|
9660
9708
|
size: "sm",
|
|
9661
9709
|
type: "checkmark"
|
|
9662
9710
|
}), ...props }) => {
|
|
9663
|
-
|
|
9664
|
-
|
|
9665
|
-
|
|
9666
|
-
|
|
9667
|
-
|
|
9711
|
+
const extraProps = onSelect ? { onClick: onSelect } : {};
|
|
9712
|
+
return /* @__PURE__ */ jsx(Menu$1.RadioItem, {
|
|
9713
|
+
closeOnClick: false,
|
|
9714
|
+
nativeButton: true,
|
|
9715
|
+
...extraProps,
|
|
9716
|
+
render: /* @__PURE__ */ jsx(MenuItemButton, {
|
|
9668
9717
|
...props,
|
|
9669
|
-
rightIcon: /* @__PURE__ */ jsx(
|
|
9670
|
-
})
|
|
9718
|
+
rightIcon: /* @__PURE__ */ jsx(Menu$1.RadioItemIndicator, { children: indicator })
|
|
9719
|
+
}),
|
|
9720
|
+
value
|
|
9671
9721
|
});
|
|
9672
9722
|
};
|
|
9673
9723
|
RadioMenuItem.displayName = "RadioMenuItem_UI";
|
|
@@ -9705,15 +9755,16 @@ const CheckboxIndicator = ({ checked, ...props }) => {
|
|
|
9705
9755
|
});
|
|
9706
9756
|
};
|
|
9707
9757
|
const CheckboxMenuItem = ({ onSelect = () => null, checked, onCheckedChange, ...props }) => {
|
|
9708
|
-
return /* @__PURE__ */ jsx(
|
|
9709
|
-
asChild: true,
|
|
9758
|
+
return /* @__PURE__ */ jsx(Menu$1.CheckboxItem, {
|
|
9710
9759
|
checked,
|
|
9760
|
+
closeOnClick: false,
|
|
9761
|
+
nativeButton: true,
|
|
9711
9762
|
onCheckedChange,
|
|
9712
|
-
onSelect,
|
|
9713
|
-
|
|
9763
|
+
onClick: onSelect,
|
|
9764
|
+
render: /* @__PURE__ */ jsx(MenuItemButton, {
|
|
9714
9765
|
...props,
|
|
9715
9766
|
leftIcon: isNotNil(props.icon) ? props.icon : /* @__PURE__ */ jsx(CheckboxIndicator, { checked }),
|
|
9716
|
-
rightIcon: isNotNil(props.icon) ? /* @__PURE__ */ jsx(
|
|
9767
|
+
rightIcon: isNotNil(props.icon) ? /* @__PURE__ */ jsx(Menu$1.CheckboxItemIndicator, { children: /* @__PURE__ */ jsx(Icon, { type: "checkmark" }) }) : void 0
|
|
9717
9768
|
})
|
|
9718
9769
|
});
|
|
9719
9770
|
};
|
|
@@ -9767,7 +9818,7 @@ const FilterMenu = forwardRef(({ value, onChange, searchValue, onSearchValueChan
|
|
|
9767
9818
|
disabled: true,
|
|
9768
9819
|
children: "No results found"
|
|
9769
9820
|
}),
|
|
9770
|
-
value.length > 0 && /* @__PURE__ */ jsx(
|
|
9821
|
+
value.length > 0 && /* @__PURE__ */ jsx(Menu$1.Item, {
|
|
9771
9822
|
disabled: true,
|
|
9772
9823
|
style: { marginTop: "24px" },
|
|
9773
9824
|
children: /* @__PURE__ */ jsx(Card, {
|
|
@@ -11288,21 +11339,21 @@ const previewCardClose = keyframes`
|
|
|
11288
11339
|
transform: scale(0.96);
|
|
11289
11340
|
}
|
|
11290
11341
|
`;
|
|
11291
|
-
const
|
|
11342
|
+
const StyledPopup$3 = styled(PreviewCard$1.Popup)`
|
|
11292
11343
|
--preview-card-animation-duration: var(--wui-motion-duration-03);
|
|
11293
11344
|
--preview-card-animation-ease: var(--wui-motion-ease-out);
|
|
11294
11345
|
|
|
11295
11346
|
z-index: var(--wui-zindex-popover);
|
|
11296
|
-
transform-origin: var(--
|
|
11347
|
+
transform-origin: var(--transform-origin);
|
|
11297
11348
|
animation-duration: var(--preview-card-animation-duration);
|
|
11298
11349
|
animation-timing-function: var(--preview-card-animation-ease);
|
|
11299
11350
|
will-change: transform, opacity;
|
|
11300
11351
|
|
|
11301
|
-
&[data-
|
|
11352
|
+
&[data-open] {
|
|
11302
11353
|
animation-name: ${previewCardOpen};
|
|
11303
11354
|
}
|
|
11304
11355
|
|
|
11305
|
-
&[data-
|
|
11356
|
+
&[data-closed] {
|
|
11306
11357
|
animation-name: ${previewCardClose};
|
|
11307
11358
|
}
|
|
11308
11359
|
|
|
@@ -11321,28 +11372,31 @@ const StyledContent$2 = styled(Content$3)`
|
|
|
11321
11372
|
/**
|
|
11322
11373
|
* Preview cards reveal content on hover. **Everything in the card must also exist at the destination**—never put information only in the preview. This pattern is for sighted-only, so treat the card as a preview, not a source of truth.
|
|
11323
11374
|
*/
|
|
11324
|
-
const PreviewCard = ({ children, trigger, maxWidth = "320px", maxHeight = "auto", unstyled = false, paddingSize = "space-04", openDelay = 700, closeDelay = 300, colorScheme = "inherit", forceOpen, ...props }) => {
|
|
11375
|
+
const PreviewCard = ({ children, trigger, maxWidth = "320px", maxHeight = "auto", unstyled = false, paddingSize = "space-04", openDelay = 700, closeDelay = 300, colorScheme = "inherit", forceOpen, side, align, ...props }) => {
|
|
11325
11376
|
const style = {
|
|
11326
11377
|
"--wui-preview-card-max-width": maxWidth,
|
|
11327
11378
|
"--wui-preview-card-max-height": maxHeight
|
|
11328
11379
|
};
|
|
11329
11380
|
const rootProps = {};
|
|
11330
11381
|
if (forceOpen === true) rootProps.open = true;
|
|
11331
|
-
return /* @__PURE__ */ jsxs(Root
|
|
11332
|
-
closeDelay,
|
|
11333
|
-
openDelay,
|
|
11382
|
+
return /* @__PURE__ */ jsxs(PreviewCard$1.Root, {
|
|
11334
11383
|
...rootProps,
|
|
11335
|
-
children: [/* @__PURE__ */ jsx(Trigger
|
|
11336
|
-
|
|
11337
|
-
|
|
11338
|
-
|
|
11339
|
-
|
|
11340
|
-
|
|
11384
|
+
children: [/* @__PURE__ */ jsx(PreviewCard$1.Trigger, {
|
|
11385
|
+
closeDelay,
|
|
11386
|
+
delay: openDelay,
|
|
11387
|
+
render: trigger
|
|
11388
|
+
}), /* @__PURE__ */ jsx(PreviewCard$1.Portal, { children: /* @__PURE__ */ jsx(PreviewCard$1.Positioner, {
|
|
11389
|
+
align,
|
|
11390
|
+
side,
|
|
11341
11391
|
sideOffset: 8,
|
|
11342
|
-
|
|
11343
|
-
|
|
11344
|
-
|
|
11345
|
-
|
|
11392
|
+
children: /* @__PURE__ */ jsx(StyledPopup$3, {
|
|
11393
|
+
$colorScheme: colorScheme,
|
|
11394
|
+
$paddingSize: paddingSize,
|
|
11395
|
+
...props,
|
|
11396
|
+
$unstyled: unstyled,
|
|
11397
|
+
style,
|
|
11398
|
+
children: /* @__PURE__ */ jsx("div", { children })
|
|
11399
|
+
})
|
|
11346
11400
|
}) })]
|
|
11347
11401
|
});
|
|
11348
11402
|
};
|
|
@@ -11535,7 +11589,7 @@ const StyledKey = styled.kbd`
|
|
|
11535
11589
|
min-width: 20px;
|
|
11536
11590
|
padding: 0 var(--wui-space-01);
|
|
11537
11591
|
`;
|
|
11538
|
-
const Label$
|
|
11592
|
+
const Label$1 = styled.span`
|
|
11539
11593
|
color: var(--wui-color-text);
|
|
11540
11594
|
font-size: 12px;
|
|
11541
11595
|
`;
|
|
@@ -11551,10 +11605,12 @@ const keyToString = (key) => {
|
|
|
11551
11605
|
case "ArrowUp": return "↑";
|
|
11552
11606
|
case "Alt": return "Alt";
|
|
11553
11607
|
case "Cmd":
|
|
11554
|
-
case "Meta":
|
|
11555
|
-
|
|
11556
|
-
if (
|
|
11608
|
+
case "Meta": {
|
|
11609
|
+
const userAgent = typeof document !== "undefined" ? window.navigator.userAgent : "";
|
|
11610
|
+
if (/Mac|iPhone|iPad/.test(userAgent)) return "⌘";
|
|
11611
|
+
if (userAgent.includes("Win")) return "⊞";
|
|
11557
11612
|
return "^";
|
|
11613
|
+
}
|
|
11558
11614
|
case "Ctrl": return "Ctrl";
|
|
11559
11615
|
case "Option": return "⌥";
|
|
11560
11616
|
case "Shift": return "⇧";
|
|
@@ -11569,7 +11625,7 @@ const keyToString = (key) => {
|
|
|
11569
11625
|
const KeyboardShortcut = ({ label, keyboardKeys, fullWidth = false, ...otherProps }) => /* @__PURE__ */ jsxs(StyledKeyboardShortcut, {
|
|
11570
11626
|
$fullWidth: fullWidth,
|
|
11571
11627
|
...otherProps,
|
|
11572
|
-
children: [isNotNil(label) && /* @__PURE__ */ jsx(Label$
|
|
11628
|
+
children: [isNotNil(label) && /* @__PURE__ */ jsx(Label$1, { children: label }), /* @__PURE__ */ jsx(KeysContainer, { children: (Array.isArray(keyboardKeys) ? keyboardKeys : [keyboardKeys]).map((keyboardKey, index) => /* @__PURE__ */ jsx(StyledKey, { children: keyToString(keyboardKey) }, index)) })]
|
|
11573
11629
|
});
|
|
11574
11630
|
KeyboardShortcut.displayName = "KeyboardShortcut_UI";
|
|
11575
11631
|
//#endregion
|
|
@@ -12017,19 +12073,14 @@ const Meter = ({ segments, label, labelMeta, description, hideKey = false, max =
|
|
|
12017
12073
|
Meter.displayName = "Meter_UI";
|
|
12018
12074
|
//#endregion
|
|
12019
12075
|
//#region src/components/Modal/ModalCloseButton.tsx
|
|
12020
|
-
const CloseButton = styled(Close$1)`
|
|
12021
|
-
align-self: start;
|
|
12022
|
-
`;
|
|
12023
12076
|
const ModalCloseButton = () => {
|
|
12024
|
-
return /* @__PURE__ */ jsx(
|
|
12025
|
-
|
|
12026
|
-
|
|
12027
|
-
|
|
12028
|
-
|
|
12029
|
-
|
|
12030
|
-
|
|
12031
|
-
})
|
|
12032
|
-
});
|
|
12077
|
+
return /* @__PURE__ */ jsx(Dialog.Close, { render: /* @__PURE__ */ jsx(IconButton, {
|
|
12078
|
+
label: "Dismiss modal",
|
|
12079
|
+
size: "sm",
|
|
12080
|
+
style: { alignSelf: "start" },
|
|
12081
|
+
variant: "ghost",
|
|
12082
|
+
children: /* @__PURE__ */ jsx(Icon, { type: "close" })
|
|
12083
|
+
}) });
|
|
12033
12084
|
};
|
|
12034
12085
|
//#endregion
|
|
12035
12086
|
//#region src/components/Modal/ModalHeader.tsx
|
|
@@ -12041,7 +12092,7 @@ const Header = styled.header`
|
|
|
12041
12092
|
gap: var(--wui-space-01);
|
|
12042
12093
|
justify-content: ${({ $hideTitle }) => $hideTitle ? "flex-end" : "space-between"}; /* ensure ModalCloseButton is right-aligned */
|
|
12043
12094
|
|
|
12044
|
-
/*
|
|
12095
|
+
/* Dialog.Title creates an h2 element which inherits some margin */
|
|
12045
12096
|
h2 {
|
|
12046
12097
|
margin: 0;
|
|
12047
12098
|
padding-right: ${({ $hideCloseButon }) => $hideCloseButon ? "0" : "var(--wui-space-03)"};
|
|
@@ -12053,7 +12104,7 @@ const Header = styled.header`
|
|
|
12053
12104
|
top: var(--wui-space-03);
|
|
12054
12105
|
}
|
|
12055
12106
|
`;
|
|
12056
|
-
const Title
|
|
12107
|
+
const Title = styled(Dialog.Title)`
|
|
12057
12108
|
font-family: var(--wui-typography-heading-2-family);
|
|
12058
12109
|
line-height: var(--wui-typography-heading-2-line-height);
|
|
12059
12110
|
font-size: var(--wui-typography-heading-2-size);
|
|
@@ -12064,30 +12115,13 @@ const ModalHeader = ({ title, hideTitle, hideCloseButton }) => {
|
|
|
12064
12115
|
return /* @__PURE__ */ jsxs(Header, {
|
|
12065
12116
|
$hideCloseButon: hideCloseButton,
|
|
12066
12117
|
$hideTitle: hideTitle,
|
|
12067
|
-
children: [hideTitle ? /* @__PURE__ */ jsx(ScreenReaderOnly, { children: /* @__PURE__ */ jsx(Title
|
|
12118
|
+
children: [hideTitle ? /* @__PURE__ */ jsx(ScreenReaderOnly, { children: /* @__PURE__ */ jsx(Title, { children: title }) }) : /* @__PURE__ */ jsx(Title, { children: title }), hideCloseButton ? null : /* @__PURE__ */ jsx(ModalCloseButton, {})]
|
|
12068
12119
|
});
|
|
12069
12120
|
};
|
|
12070
12121
|
//#endregion
|
|
12071
12122
|
//#region src/components/Modal/constants.ts
|
|
12072
12123
|
const DEFAULT_MODAL_WIDTH = "532px";
|
|
12073
12124
|
//#endregion
|
|
12074
|
-
//#region src/private/hooks/useFocusRestore/useFocusRestore.ts
|
|
12075
|
-
const useFocusRestore = () => {
|
|
12076
|
-
const previouslyFocusedRef = useRef(null);
|
|
12077
|
-
const timeoutRef = useRef(null);
|
|
12078
|
-
useEffect(() => {
|
|
12079
|
-
previouslyFocusedRef.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
12080
|
-
}, []);
|
|
12081
|
-
useEffect(() => {
|
|
12082
|
-
return () => {
|
|
12083
|
-
if (isNotNil(timeoutRef.current)) clearTimeout(timeoutRef.current);
|
|
12084
|
-
if (isNotNil(previouslyFocusedRef.current)) timeoutRef.current = setTimeout(() => {
|
|
12085
|
-
previouslyFocusedRef.current?.focus();
|
|
12086
|
-
}, 0);
|
|
12087
|
-
};
|
|
12088
|
-
}, []);
|
|
12089
|
-
};
|
|
12090
|
-
//#endregion
|
|
12091
12125
|
//#region src/components/Modal/ModalContent.tsx
|
|
12092
12126
|
const modalEnter = keyframes`
|
|
12093
12127
|
from {
|
|
@@ -12111,7 +12145,8 @@ const modalExit = keyframes`
|
|
|
12111
12145
|
transform: translateX(-50%) translateY(calc(var(--wui-modal-translate-y) + 24px));
|
|
12112
12146
|
}
|
|
12113
12147
|
`;
|
|
12114
|
-
const
|
|
12148
|
+
const positionStyleMap = {
|
|
12149
|
+
centered: css`
|
|
12115
12150
|
--wui-modal-screen-offset: var(--wui-space-05);
|
|
12116
12151
|
--wui-modal-translate-y: -50%;
|
|
12117
12152
|
|
|
@@ -12123,11 +12158,11 @@ const centeredModalStyles = css`
|
|
|
12123
12158
|
transform-origin: left center;
|
|
12124
12159
|
animation: ${modalEnter} var(--wui-motion-duration-04) var(--wui-motion-ease-out);
|
|
12125
12160
|
|
|
12126
|
-
&[data-
|
|
12161
|
+
&[data-closed] {
|
|
12127
12162
|
animation: ${modalExit} var(--wui-motion-duration-03) var(--wui-motion-ease-out);
|
|
12128
12163
|
}
|
|
12129
|
-
|
|
12130
|
-
|
|
12164
|
+
`,
|
|
12165
|
+
"fixed-top": css`
|
|
12131
12166
|
--wui-modal-screen-offset-top: 15vh;
|
|
12132
12167
|
--wui-modal-screen-offset-bottom: 5vh;
|
|
12133
12168
|
--wui-modal-translate-y: 0%;
|
|
@@ -12142,11 +12177,11 @@ const fixedTopModalStyles = css`
|
|
|
12142
12177
|
transform-origin: left center;
|
|
12143
12178
|
animation: ${modalEnter} var(--wui-motion-duration-04) var(--wui-motion-ease-out);
|
|
12144
12179
|
|
|
12145
|
-
&[data-
|
|
12180
|
+
&[data-closed] {
|
|
12146
12181
|
animation: ${modalExit} var(--wui-motion-duration-03) var(--wui-motion-ease-out);
|
|
12147
12182
|
}
|
|
12148
|
-
|
|
12149
|
-
|
|
12183
|
+
`,
|
|
12184
|
+
"right-side-panel": css`
|
|
12150
12185
|
--wui-modal-screen-offset: var(--wui-space-05);
|
|
12151
12186
|
|
|
12152
12187
|
height: calc(100vh - var(--wui-modal-screen-offset) * 2);
|
|
@@ -12165,7 +12200,7 @@ const rightSidePanelModalStyles = css`
|
|
|
12165
12200
|
`} var(--wui-motion-duration-05) var(--wui-motion-ease-out);
|
|
12166
12201
|
transform-origin: right center;
|
|
12167
12202
|
|
|
12168
|
-
&[data-
|
|
12203
|
+
&[data-closed] {
|
|
12169
12204
|
animation: ${keyframes`
|
|
12170
12205
|
from {
|
|
12171
12206
|
opacity: 1;
|
|
@@ -12178,13 +12213,9 @@ const rightSidePanelModalStyles = css`
|
|
|
12178
12213
|
}
|
|
12179
12214
|
`} var(--wui-motion-duration-03) var(--wui-motion-ease-in);
|
|
12180
12215
|
}
|
|
12181
|
-
|
|
12182
|
-
const positionStyleMap = {
|
|
12183
|
-
centered: centeredModalStyles,
|
|
12184
|
-
"fixed-top": fixedTopModalStyles,
|
|
12185
|
-
"right-side-panel": rightSidePanelModalStyles
|
|
12216
|
+
`
|
|
12186
12217
|
};
|
|
12187
|
-
const StyledModalContent = styled(
|
|
12218
|
+
const StyledModalContent = styled(Dialog.Popup)`
|
|
12188
12219
|
position: fixed;
|
|
12189
12220
|
display: flex;
|
|
12190
12221
|
flex-direction: column;
|
|
@@ -12211,12 +12242,12 @@ const StyledModalContent = styled(Content$4)`
|
|
|
12211
12242
|
${({ $positionVariant }) => positionStyleMap[$positionVariant]}
|
|
12212
12243
|
}
|
|
12213
12244
|
`;
|
|
12214
|
-
const ModalContent = forwardRef(({ width, positionVariant = "fixed-top", children, ...props }, ref) => {
|
|
12215
|
-
useFocusRestore();
|
|
12245
|
+
const ModalContent = forwardRef(({ width, positionVariant = "fixed-top", initialFocusRef, children, ...props }, ref) => {
|
|
12216
12246
|
return /* @__PURE__ */ jsx(StyledModalContent, {
|
|
12217
12247
|
ref,
|
|
12218
12248
|
$positionVariant: positionVariant,
|
|
12219
12249
|
$width: width,
|
|
12250
|
+
...isNotNil(initialFocusRef) ? { initialFocus: initialFocusRef } : {},
|
|
12220
12251
|
...props,
|
|
12221
12252
|
children
|
|
12222
12253
|
});
|
|
@@ -12242,20 +12273,20 @@ const backdropHide = keyframes`
|
|
|
12242
12273
|
opacity: 0;
|
|
12243
12274
|
}
|
|
12244
12275
|
`;
|
|
12245
|
-
const ModalOverlay = styled(
|
|
12276
|
+
const ModalOverlay = styled(Dialog.Backdrop)`
|
|
12246
12277
|
animation: ${backdropShow} var(--wui-motion-duration-02);
|
|
12247
12278
|
background: var(--wui-color-backdrop);
|
|
12248
12279
|
inset: 0;
|
|
12249
12280
|
position: fixed;
|
|
12250
12281
|
z-index: var(--wui-zindex-backdrop);
|
|
12251
12282
|
|
|
12252
|
-
&[data-
|
|
12283
|
+
&[data-closed] {
|
|
12253
12284
|
animation: ${backdropHide} var(--wui-motion-duration-02);
|
|
12254
12285
|
}
|
|
12255
12286
|
`;
|
|
12256
12287
|
//#endregion
|
|
12257
12288
|
//#region src/components/Modal/Modal.tsx
|
|
12258
|
-
const ModalHiddenDescription = styled(Description)({ ...visuallyHiddenStyle });
|
|
12289
|
+
const ModalHiddenDescription = styled(Dialog.Description)({ ...visuallyHiddenStyle });
|
|
12259
12290
|
const ModalBody = styled.div`
|
|
12260
12291
|
flex-direction: column;
|
|
12261
12292
|
display: flex;
|
|
@@ -12277,21 +12308,14 @@ const ModalFooter = styled.footer`
|
|
|
12277
12308
|
* user interaction or dismissal before returning to the underlying content.
|
|
12278
12309
|
*/
|
|
12279
12310
|
const Modal = forwardRef(({ children, footer, hideCloseButton = false, hideTitle = false, initialFocusRef, isOpen, onRequestClose, positionVariant = "centered", title, width = DEFAULT_MODAL_WIDTH, ...props }, ref) => {
|
|
12280
|
-
return /* @__PURE__ */ jsx(Root
|
|
12311
|
+
return /* @__PURE__ */ jsx(Dialog.Root, {
|
|
12281
12312
|
onOpenChange: (open) => {
|
|
12282
12313
|
if (!open && isNotNil(onRequestClose)) onRequestClose();
|
|
12283
12314
|
},
|
|
12284
12315
|
open: isOpen,
|
|
12285
|
-
children: /* @__PURE__ */ jsxs(Portal
|
|
12316
|
+
children: /* @__PURE__ */ jsxs(Dialog.Portal, { children: [/* @__PURE__ */ jsx(ModalOverlay, {}), /* @__PURE__ */ jsxs(ModalContent, {
|
|
12286
12317
|
ref,
|
|
12287
|
-
|
|
12288
|
-
if (isNotNil(initialFocusRef) && initialFocusRef.current) {
|
|
12289
|
-
event.preventDefault();
|
|
12290
|
-
requestAnimationFrame(() => {
|
|
12291
|
-
initialFocusRef.current?.focus();
|
|
12292
|
-
});
|
|
12293
|
-
}
|
|
12294
|
-
},
|
|
12318
|
+
initialFocusRef,
|
|
12295
12319
|
positionVariant,
|
|
12296
12320
|
width,
|
|
12297
12321
|
...props,
|
|
@@ -12343,6 +12367,14 @@ const getControlProps = (isOpen, onOpenChange) => {
|
|
|
12343
12367
|
};
|
|
12344
12368
|
//#endregion
|
|
12345
12369
|
//#region src/components/Popover/PopoverArrow.tsx
|
|
12370
|
+
const StyledArrowSvg = styled.svg`
|
|
12371
|
+
/* Override Base UI's inline top positioning and rotate the arrow to match Radix behavior.
|
|
12372
|
+
Radix applied rotate(180deg) so the circle sits near the trigger and the stalk extends
|
|
12373
|
+
down toward the popup. Base UI does not rotate the arrow automatically. */
|
|
12374
|
+
top: 0 !important;
|
|
12375
|
+
transform: rotate(180deg);
|
|
12376
|
+
transform-origin: center 0;
|
|
12377
|
+
`;
|
|
12346
12378
|
const StyledPath = styled.path`
|
|
12347
12379
|
fill: var(--wui-color-border-secondary);
|
|
12348
12380
|
`;
|
|
@@ -12380,41 +12412,38 @@ const StyledCircle = styled.circle`
|
|
|
12380
12412
|
`}
|
|
12381
12413
|
}
|
|
12382
12414
|
`;
|
|
12383
|
-
const PopoverArrow
|
|
12384
|
-
return /* @__PURE__ */ jsx(
|
|
12385
|
-
|
|
12386
|
-
|
|
12387
|
-
|
|
12388
|
-
|
|
12389
|
-
|
|
12390
|
-
|
|
12391
|
-
|
|
12392
|
-
|
|
12393
|
-
|
|
12394
|
-
|
|
12395
|
-
|
|
12396
|
-
|
|
12397
|
-
|
|
12398
|
-
|
|
12399
|
-
|
|
12400
|
-
|
|
12401
|
-
|
|
12402
|
-
|
|
12403
|
-
|
|
12404
|
-
|
|
12405
|
-
|
|
12406
|
-
|
|
12407
|
-
|
|
12408
|
-
|
|
12409
|
-
|
|
12410
|
-
]
|
|
12411
|
-
})
|
|
12412
|
-
});
|
|
12415
|
+
const PopoverArrow = ({ isAnimated }) => {
|
|
12416
|
+
return /* @__PURE__ */ jsx(Popover$1.Arrow, { render: /* @__PURE__ */ jsxs(StyledArrowSvg, {
|
|
12417
|
+
fill: "none",
|
|
12418
|
+
height: "56",
|
|
12419
|
+
viewBox: "0 0 48 56",
|
|
12420
|
+
width: "48",
|
|
12421
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
12422
|
+
children: [
|
|
12423
|
+
/* @__PURE__ */ jsx(StyledPath, { d: "M24 26.6667C21.0545 26.6667 18.6667 29.0545 18.6667 32C18.6667 34.9455 21.0545 37.3333 24 37.3333C26.9455 37.3333 29.3333 34.9455 29.3333 32C29.3333 29.0545 26.9455 26.6667 24 26.6667ZM23 0V32H25V0H23Z" }),
|
|
12424
|
+
/* @__PURE__ */ jsx(StyledCircle, {
|
|
12425
|
+
$isAnimated: isAnimated,
|
|
12426
|
+
cx: "24",
|
|
12427
|
+
cy: "32",
|
|
12428
|
+
"data-wui-popover-arrow-inner-circle": true,
|
|
12429
|
+
r: "10",
|
|
12430
|
+
strokeWidth: "4"
|
|
12431
|
+
}),
|
|
12432
|
+
/* @__PURE__ */ jsx(StyledCircle, {
|
|
12433
|
+
$isAnimated: isAnimated,
|
|
12434
|
+
cx: "24",
|
|
12435
|
+
cy: "32",
|
|
12436
|
+
"data-wui-popover-arrow-outer-circle": true,
|
|
12437
|
+
r: "20",
|
|
12438
|
+
strokeWidth: "8"
|
|
12439
|
+
})
|
|
12440
|
+
]
|
|
12441
|
+
}) });
|
|
12413
12442
|
};
|
|
12414
|
-
PopoverArrow
|
|
12443
|
+
PopoverArrow.displayName = "PopoverArrow_UI";
|
|
12415
12444
|
//#endregion
|
|
12416
12445
|
//#region src/components/Popover/Popover.tsx
|
|
12417
|
-
const
|
|
12446
|
+
const StyledPopup$2 = styled(Popover$1.Popup)`
|
|
12418
12447
|
z-index: var(--wui-zindex-popover);
|
|
12419
12448
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
12420
12449
|
${({ $unstyled }) => !$unstyled && css`
|
|
@@ -12428,6 +12457,10 @@ const StyledContent$1 = styled(Content$2)`
|
|
|
12428
12457
|
overflow: auto;
|
|
12429
12458
|
`}
|
|
12430
12459
|
|
|
12460
|
+
${({ $withArrow }) => $withArrow && css`
|
|
12461
|
+
overflow: visible;
|
|
12462
|
+
`}
|
|
12463
|
+
|
|
12431
12464
|
[data-wui-popover-close] {
|
|
12432
12465
|
position: absolute;
|
|
12433
12466
|
top: var(--wui-space-02);
|
|
@@ -12436,43 +12469,205 @@ const StyledContent$1 = styled(Content$2)`
|
|
|
12436
12469
|
`;
|
|
12437
12470
|
/**
|
|
12438
12471
|
* Displays rich content in a portal, triggered by a button.
|
|
12472
|
+
*
|
|
12473
|
+
* For more control — custom anchor, access to event handlers like
|
|
12474
|
+
* `onPointerDownOutside`, no injected close button, etc. — compose the
|
|
12475
|
+
* primitives directly: `PopoverRoot`, `PopoverTrigger`, `PopoverAnchor`,
|
|
12476
|
+
* `PopoverPortal`, `PopoverContent`, `PopoverClose`.
|
|
12439
12477
|
*/
|
|
12440
|
-
const Popover = ({ children, trigger, isOpen
|
|
12441
|
-
const sideOffset = withArrow ?
|
|
12478
|
+
const Popover = ({ children, trigger, isOpen, hideCloseButton = false, maxWidth, maxHeight, onOpenChange, unstyled = false, withArrow = false, isAnimated = false, colorScheme = "inherit", style, side, align, nativeButton = true, ...props }) => {
|
|
12479
|
+
const sideOffset = withArrow ? 32 : 8;
|
|
12442
12480
|
const mergedStyle = {
|
|
12443
12481
|
"--wui-popover-max-width": maxWidth,
|
|
12444
12482
|
"--wui-popover-max-height": maxHeight,
|
|
12445
12483
|
...style
|
|
12446
12484
|
};
|
|
12447
|
-
return /* @__PURE__ */ jsxs(Root
|
|
12485
|
+
return /* @__PURE__ */ jsxs(Popover$1.Root, {
|
|
12448
12486
|
...getControlProps(isOpen, onOpenChange),
|
|
12449
|
-
children: [/* @__PURE__ */ jsx(Trigger
|
|
12450
|
-
|
|
12451
|
-
|
|
12452
|
-
}), /* @__PURE__ */ jsx(
|
|
12453
|
-
|
|
12487
|
+
children: [/* @__PURE__ */ jsx(Popover$1.Trigger, {
|
|
12488
|
+
nativeButton,
|
|
12489
|
+
render: trigger
|
|
12490
|
+
}), /* @__PURE__ */ jsx(Popover$1.Portal, { children: /* @__PURE__ */ jsx(Popover$1.Positioner, {
|
|
12491
|
+
align,
|
|
12492
|
+
collisionAvoidance: {
|
|
12493
|
+
side: "flip",
|
|
12494
|
+
align: "shift",
|
|
12495
|
+
fallbackAxisSide: "none"
|
|
12496
|
+
},
|
|
12497
|
+
side,
|
|
12454
12498
|
sideOffset,
|
|
12455
|
-
|
|
12456
|
-
|
|
12457
|
-
|
|
12458
|
-
|
|
12459
|
-
|
|
12460
|
-
|
|
12461
|
-
|
|
12499
|
+
children: /* @__PURE__ */ jsxs(StyledPopup$2, {
|
|
12500
|
+
$colorScheme: colorScheme,
|
|
12501
|
+
...props,
|
|
12502
|
+
$unstyled: unstyled,
|
|
12503
|
+
$withArrow: withArrow,
|
|
12504
|
+
role: "dialog",
|
|
12505
|
+
style: mergedStyle,
|
|
12506
|
+
children: [
|
|
12507
|
+
!hideCloseButton && /* @__PURE__ */ jsx(Popover$1.Close, { render: /* @__PURE__ */ jsx(IconButton, {
|
|
12462
12508
|
"data-wui-popover-close": true,
|
|
12463
12509
|
label: "Close",
|
|
12464
12510
|
variant: "ghost",
|
|
12465
12511
|
children: /* @__PURE__ */ jsx(Icon, { type: "close" })
|
|
12466
|
-
})
|
|
12467
|
-
|
|
12468
|
-
|
|
12469
|
-
|
|
12470
|
-
|
|
12512
|
+
}) }),
|
|
12513
|
+
withArrow ? /* @__PURE__ */ jsx(PopoverArrow, { isAnimated }) : null,
|
|
12514
|
+
/* @__PURE__ */ jsx("div", { children })
|
|
12515
|
+
]
|
|
12516
|
+
})
|
|
12471
12517
|
}) })]
|
|
12472
12518
|
});
|
|
12473
12519
|
};
|
|
12474
12520
|
Popover.displayName = "Popover_UI";
|
|
12475
12521
|
//#endregion
|
|
12522
|
+
//#region src/components/Popover/PopoverAnchorContext.tsx
|
|
12523
|
+
const PopoverAnchorContext = createContext(null);
|
|
12524
|
+
const PopoverAnchorProvider = PopoverAnchorContext.Provider;
|
|
12525
|
+
const usePopoverAnchor = () => useContext(PopoverAnchorContext);
|
|
12526
|
+
const useCreatePopoverAnchorRef = () => useRef(null);
|
|
12527
|
+
//#endregion
|
|
12528
|
+
//#region src/components/Popover/PopoverAnchor.tsx
|
|
12529
|
+
/**
|
|
12530
|
+
* Positions the popover relative to an element other than the trigger. Useful
|
|
12531
|
+
* when the element the user interacts with (e.g. a text input) is separate
|
|
12532
|
+
* from what the popover attaches to.
|
|
12533
|
+
*
|
|
12534
|
+
* Wrap the anchor element and nest `PopoverTrigger` inside it.
|
|
12535
|
+
*/
|
|
12536
|
+
const PopoverAnchor = ({ children }) => {
|
|
12537
|
+
const sharedRef = usePopoverAnchor();
|
|
12538
|
+
return /* @__PURE__ */ jsx("div", {
|
|
12539
|
+
ref: useCallback((node) => {
|
|
12540
|
+
if (sharedRef) sharedRef.current = node;
|
|
12541
|
+
}, [sharedRef]),
|
|
12542
|
+
children
|
|
12543
|
+
});
|
|
12544
|
+
};
|
|
12545
|
+
PopoverAnchor.displayName = "PopoverAnchor_UI";
|
|
12546
|
+
//#endregion
|
|
12547
|
+
//#region src/components/Popover/PopoverClose.tsx
|
|
12548
|
+
/**
|
|
12549
|
+
* An element that closes the popover when activated. Defaults to a `<button>`;
|
|
12550
|
+
* pass `render` to merge the close behavior onto a single child element. For
|
|
12551
|
+
* a pre-styled icon close button, use `PopoverCloseButton`.
|
|
12552
|
+
*/
|
|
12553
|
+
const PopoverClose = forwardRef((props, forwardedRef) => /* @__PURE__ */ jsx(Popover$1.Close, {
|
|
12554
|
+
ref: forwardedRef,
|
|
12555
|
+
...props
|
|
12556
|
+
}));
|
|
12557
|
+
PopoverClose.displayName = "PopoverClose_UI";
|
|
12558
|
+
//#endregion
|
|
12559
|
+
//#region src/components/Popover/PopoverCloseButton.tsx
|
|
12560
|
+
/**
|
|
12561
|
+
* A pre-styled close button intended to be placed inside a `PopoverContent`.
|
|
12562
|
+
* For a custom close control, use `PopoverClose` directly.
|
|
12563
|
+
*/
|
|
12564
|
+
const PopoverCloseButton = ({ label = "Close" } = {}) => /* @__PURE__ */ jsx(PopoverClose, { render: /* @__PURE__ */ jsx(IconButton, {
|
|
12565
|
+
"data-wui-popover-close": true,
|
|
12566
|
+
label,
|
|
12567
|
+
variant: "ghost",
|
|
12568
|
+
children: /* @__PURE__ */ jsx(Icon, { type: "close" })
|
|
12569
|
+
}) });
|
|
12570
|
+
PopoverCloseButton.displayName = "PopoverCloseButton_UI";
|
|
12571
|
+
//#endregion
|
|
12572
|
+
//#region src/components/Popover/PopoverContent.tsx
|
|
12573
|
+
const StyledPopup$1 = styled(Popover$1.Popup)`
|
|
12574
|
+
z-index: var(--wui-zindex-popover);
|
|
12575
|
+
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
12576
|
+
${({ $unstyled }) => !$unstyled && css`
|
|
12577
|
+
border-radius: var(--wui-border-radius-02);
|
|
12578
|
+
padding: var(--wui-space-04);
|
|
12579
|
+
max-width: var(--wui-popover-max-width);
|
|
12580
|
+
max-height: var(--wui-popover-max-height);
|
|
12581
|
+
background-color: var(--wui-color-bg-surface);
|
|
12582
|
+
box-shadow: var(--wui-elevation-01);
|
|
12583
|
+
border: 1px solid var(--wui-color-border);
|
|
12584
|
+
overflow: auto;
|
|
12585
|
+
`}
|
|
12586
|
+
|
|
12587
|
+
[data-wui-popover-close] {
|
|
12588
|
+
position: absolute;
|
|
12589
|
+
top: var(--wui-space-02);
|
|
12590
|
+
right: var(--wui-space-02);
|
|
12591
|
+
}
|
|
12592
|
+
`;
|
|
12593
|
+
const DEFAULT_SIDE_OFFSET = 8;
|
|
12594
|
+
const DEFAULT_MAX_WIDTH = "320px";
|
|
12595
|
+
const DEFAULT_MAX_HEIGHT = "auto";
|
|
12596
|
+
/**
|
|
12597
|
+
* The styled popover surface. Place inside a `PopoverRoot` (typically wrapped
|
|
12598
|
+
* in a `PopoverPortal`). Wraps a `Positioner` and `Popup` internally.
|
|
12599
|
+
*/
|
|
12600
|
+
const PopoverContent = forwardRef(({ colorScheme = "inherit", unstyled = false, maxWidth = DEFAULT_MAX_WIDTH, maxHeight = DEFAULT_MAX_HEIGHT, sideOffset = DEFAULT_SIDE_OFFSET, side, align, style, role = "dialog", children, ...props }, forwardedRef) => {
|
|
12601
|
+
const sharedAnchorRef = usePopoverAnchor();
|
|
12602
|
+
const hasAnchor = sharedAnchorRef?.current != null;
|
|
12603
|
+
const mergedStyle = {
|
|
12604
|
+
"--wui-popover-max-width": maxWidth,
|
|
12605
|
+
"--wui-popover-max-height": maxHeight,
|
|
12606
|
+
...style
|
|
12607
|
+
};
|
|
12608
|
+
return /* @__PURE__ */ jsx(Popover$1.Positioner, {
|
|
12609
|
+
align,
|
|
12610
|
+
collisionAvoidance: {
|
|
12611
|
+
side: "flip",
|
|
12612
|
+
align: "shift",
|
|
12613
|
+
fallbackAxisSide: "none"
|
|
12614
|
+
},
|
|
12615
|
+
side,
|
|
12616
|
+
sideOffset,
|
|
12617
|
+
...hasAnchor ? { anchor: sharedAnchorRef } : {},
|
|
12618
|
+
children: /* @__PURE__ */ jsx(StyledPopup$1, {
|
|
12619
|
+
ref: forwardedRef,
|
|
12620
|
+
$colorScheme: colorScheme,
|
|
12621
|
+
$unstyled: unstyled,
|
|
12622
|
+
role,
|
|
12623
|
+
style: mergedStyle,
|
|
12624
|
+
...props,
|
|
12625
|
+
children
|
|
12626
|
+
})
|
|
12627
|
+
});
|
|
12628
|
+
});
|
|
12629
|
+
PopoverContent.displayName = "PopoverContent_UI";
|
|
12630
|
+
//#endregion
|
|
12631
|
+
//#region src/components/Popover/PopoverPortal.tsx
|
|
12632
|
+
/**
|
|
12633
|
+
* Portals the popover content out of the DOM hierarchy of its trigger so it can
|
|
12634
|
+
* escape clipping ancestors (`overflow: hidden`, transformed containers, etc.).
|
|
12635
|
+
*/
|
|
12636
|
+
const PopoverPortal = ({ children }) => /* @__PURE__ */ jsx(Popover$1.Portal, { children });
|
|
12637
|
+
PopoverPortal.displayName = "PopoverPortal_UI";
|
|
12638
|
+
//#endregion
|
|
12639
|
+
//#region src/components/Popover/PopoverRoot.tsx
|
|
12640
|
+
/**
|
|
12641
|
+
* The root of a composable popover. Wrap `PopoverTrigger` (or `PopoverAnchor`)
|
|
12642
|
+
* and `PopoverContent` inside it.
|
|
12643
|
+
*
|
|
12644
|
+
* For the common "button opens a panel" case, prefer the bundled `Popover`.
|
|
12645
|
+
*/
|
|
12646
|
+
const PopoverRoot = ({ isOpen, onOpenChange, children }) => {
|
|
12647
|
+
const anchorRef = useCreatePopoverAnchorRef();
|
|
12648
|
+
return /* @__PURE__ */ jsx(Popover$1.Root, {
|
|
12649
|
+
...getControlProps(isOpen, onOpenChange),
|
|
12650
|
+
children: /* @__PURE__ */ jsx(PopoverAnchorProvider, {
|
|
12651
|
+
value: anchorRef,
|
|
12652
|
+
children
|
|
12653
|
+
})
|
|
12654
|
+
});
|
|
12655
|
+
};
|
|
12656
|
+
PopoverRoot.displayName = "PopoverRoot_UI";
|
|
12657
|
+
//#endregion
|
|
12658
|
+
//#region src/components/Popover/PopoverTrigger.tsx
|
|
12659
|
+
/**
|
|
12660
|
+
* The button that toggles the popover open and closed. By default it renders a
|
|
12661
|
+
* `<button>` wrapping its children; pass `render` to merge the trigger
|
|
12662
|
+
* behavior onto a single child element (e.g. a `Button` or `IconButton`).
|
|
12663
|
+
*/
|
|
12664
|
+
const PopoverTrigger = forwardRef(({ nativeButton = true, ...props }, forwardedRef) => /* @__PURE__ */ jsx(Popover$1.Trigger, {
|
|
12665
|
+
ref: forwardedRef,
|
|
12666
|
+
nativeButton,
|
|
12667
|
+
...props
|
|
12668
|
+
}));
|
|
12669
|
+
PopoverTrigger.displayName = "PopoverTrigger_UI";
|
|
12670
|
+
//#endregion
|
|
12476
12671
|
//#region src/components/ProgressBar/ProgressBar.tsx
|
|
12477
12672
|
const ProgressBarWrapper = styled.div`
|
|
12478
12673
|
--progress-bar-height: 8px;
|
|
@@ -12481,10 +12676,10 @@ const ProgressBarWrapper = styled.div`
|
|
|
12481
12676
|
align-items: center;
|
|
12482
12677
|
gap: var(--wui-space-02);
|
|
12483
12678
|
`;
|
|
12484
|
-
const
|
|
12485
|
-
|
|
12486
|
-
|
|
12487
|
-
|
|
12679
|
+
const StyledTrack = styled(Progress.Track)`
|
|
12680
|
+
height: 100%;
|
|
12681
|
+
overflow: hidden;
|
|
12682
|
+
`;
|
|
12488
12683
|
const ProgressBarLabel = styled.div`
|
|
12489
12684
|
display: flex;
|
|
12490
12685
|
line-height: var(--wui-typography-label-3-line-height);
|
|
@@ -12493,17 +12688,15 @@ const ProgressBarLabel = styled.div`
|
|
|
12493
12688
|
color: var(--wui-color-text-secondary);
|
|
12494
12689
|
flex-shrink: 0;
|
|
12495
12690
|
`;
|
|
12496
|
-
const StyledProgressIndicator = styled(Indicator)`
|
|
12691
|
+
const StyledProgressIndicator = styled(Progress.Indicator)`
|
|
12497
12692
|
${({ $colorScheme }) => getColorScheme($colorScheme)}
|
|
12498
12693
|
background-color: var(--wui-color-bg-fill);
|
|
12499
|
-
|
|
12500
|
-
height: 100%;
|
|
12694
|
+
display: block;
|
|
12501
12695
|
border-top-right-radius: var(--wui-border-radius-rounded);
|
|
12502
12696
|
border-bottom-right-radius: var(--wui-border-radius-rounded);
|
|
12503
|
-
transition:
|
|
12504
|
-
transform: ${({ $progress, $max }) => getTranslateValue($progress, $max)};
|
|
12697
|
+
transition: width 660ms cubic-bezier(0.65, 0, 0.35, 1);
|
|
12505
12698
|
`;
|
|
12506
|
-
const StyledProgressBar = styled(Root
|
|
12699
|
+
const StyledProgressBar = styled(Progress.Root)`
|
|
12507
12700
|
${({ $colorScheme }) => getColorScheme($colorScheme)}
|
|
12508
12701
|
position: relative;
|
|
12509
12702
|
overflow: hidden;
|
|
@@ -12523,14 +12716,11 @@ const ProgressBar = ({ progress, max = 100, children, labelLeft, labelRight, col
|
|
|
12523
12716
|
isNotNil(labelLeft) ? /* @__PURE__ */ jsx(ProgressBarLabel, { children: labelLeft }) : null,
|
|
12524
12717
|
/* @__PURE__ */ jsx(StyledProgressBar, {
|
|
12525
12718
|
$colorScheme: colorScheme,
|
|
12719
|
+
getAriaValueText: (_formattedValue, value) => value != null ? `${Math.round(value / max * 100)}%` : "indeterminate progress",
|
|
12526
12720
|
max,
|
|
12527
12721
|
value: progress,
|
|
12528
12722
|
...props,
|
|
12529
|
-
children: /* @__PURE__ */ jsx(StyledProgressIndicator, {
|
|
12530
|
-
$colorScheme: colorScheme,
|
|
12531
|
-
$max: max,
|
|
12532
|
-
$progress: progress
|
|
12533
|
-
})
|
|
12723
|
+
children: /* @__PURE__ */ jsx(StyledTrack, { children: /* @__PURE__ */ jsx(StyledProgressIndicator, { $colorScheme: colorScheme }) })
|
|
12534
12724
|
}),
|
|
12535
12725
|
isNotNil(labelRight) ? /* @__PURE__ */ jsx(ProgressBarLabel, { children: labelRight }) : null
|
|
12536
12726
|
] });
|
|
@@ -13112,7 +13302,7 @@ const segmentedControlStyles = css`
|
|
|
13112
13302
|
position: relative;
|
|
13113
13303
|
width: ${({ $fullWidth }) => $fullWidth ? "100%" : "auto"};
|
|
13114
13304
|
`;
|
|
13115
|
-
const StyledSegmentedControl = styled(
|
|
13305
|
+
const StyledSegmentedControl = styled(ToggleGroup)`
|
|
13116
13306
|
${segmentedControlStyles}
|
|
13117
13307
|
`;
|
|
13118
13308
|
/**
|
|
@@ -13125,11 +13315,11 @@ const SegmentedControl = forwardRef(({ children, colorScheme = "inherit", disabl
|
|
|
13125
13315
|
$colorScheme: colorScheme,
|
|
13126
13316
|
$fullWidth: fullWidth,
|
|
13127
13317
|
disabled,
|
|
13128
|
-
|
|
13129
|
-
onValueChange:
|
|
13130
|
-
|
|
13131
|
-
|
|
13132
|
-
value: selectedValue,
|
|
13318
|
+
loopFocus: true,
|
|
13319
|
+
onValueChange: (newValue) => {
|
|
13320
|
+
if (newValue.length > 0 && newValue[0] !== void 0) onSelectedValueChange(newValue[0]);
|
|
13321
|
+
},
|
|
13322
|
+
value: [selectedValue],
|
|
13133
13323
|
...props,
|
|
13134
13324
|
children: /* @__PURE__ */ jsx(SegmentedControlValueProvider, {
|
|
13135
13325
|
value: selectedValue,
|
|
@@ -13141,7 +13331,7 @@ SegmentedControl.displayName = "SegmentedControl_UI";
|
|
|
13141
13331
|
//#endregion
|
|
13142
13332
|
//#region src/components/SegmentedControl/SegmentedControlItem.tsx
|
|
13143
13333
|
const segmentedControlItemStyles = css`
|
|
13144
|
-
all: unset;
|
|
13334
|
+
all: unset;
|
|
13145
13335
|
align-items: center;
|
|
13146
13336
|
border-radius: var(--wui-border-radius-rounded);
|
|
13147
13337
|
color: var(--wui-color-text-secondary);
|
|
@@ -13175,10 +13365,11 @@ const segmentedControlItemStyles = css`
|
|
|
13175
13365
|
/* note: react-toggle-group uses 'aria-selected' and react-tabs uses "active" */
|
|
13176
13366
|
|
|
13177
13367
|
/* we can't style off of 'data-state' since that gets overridden when wrapped in a Tooltip */
|
|
13178
|
-
&:hover:not([aria-checked='true'], [aria-selected='true']) {
|
|
13368
|
+
&:hover:not([aria-pressed='true'], [aria-checked='true'], [aria-selected='true']) {
|
|
13179
13369
|
background-color: var(--wui-color-bg-surface-secondary-hover);
|
|
13180
13370
|
}
|
|
13181
13371
|
|
|
13372
|
+
&[aria-pressed='true'],
|
|
13182
13373
|
&[aria-checked='true'],
|
|
13183
13374
|
&[aria-selected='true'] {
|
|
13184
13375
|
color: var(--wui-color-segmented-color-text-override, var(--wui-color-text-selected));
|
|
@@ -13208,7 +13399,7 @@ const segmentedControlItemStyles = css`
|
|
|
13208
13399
|
}
|
|
13209
13400
|
}
|
|
13210
13401
|
`;
|
|
13211
|
-
const StyledSegmentedControlItem = styled(
|
|
13402
|
+
const StyledSegmentedControlItem = styled(Toggle)`
|
|
13212
13403
|
${segmentedControlItemStyles}
|
|
13213
13404
|
`;
|
|
13214
13405
|
const SegmentedControlItem = forwardRef(({ disabled, icon, label, "aria-label": ariaLabel, value, ...otherProps }, forwardedRef) => {
|
|
@@ -13217,8 +13408,7 @@ const SegmentedControlItem = forwardRef(({ disabled, icon, label, "aria-label":
|
|
|
13217
13408
|
const buttonRef = useRef(null);
|
|
13218
13409
|
const combinedRef = mergeRefs([buttonRef, forwardedRef]);
|
|
13219
13410
|
const handleClick = (event) => {
|
|
13220
|
-
|
|
13221
|
-
if (state === "on") event.preventDefault();
|
|
13411
|
+
if (event.currentTarget.getAttribute("aria-pressed") === "true") event.preventDefault();
|
|
13222
13412
|
};
|
|
13223
13413
|
useEffect(() => {
|
|
13224
13414
|
const buttonElem = buttonRef.current;
|
|
@@ -13259,7 +13449,7 @@ const SegmentedControlItem = forwardRef(({ disabled, icon, label, "aria-label":
|
|
|
13259
13449
|
SegmentedControlItem.displayName = "SegmentedControlItem_UI";
|
|
13260
13450
|
//#endregion
|
|
13261
13451
|
//#region src/components/Select/Select.tsx
|
|
13262
|
-
const StyledTrigger = styled(Trigger
|
|
13452
|
+
const StyledTrigger = styled(Select$1.Trigger)`
|
|
13263
13453
|
${({ $colorScheme }) => getColorScheme($colorScheme)};
|
|
13264
13454
|
${inputCss};
|
|
13265
13455
|
padding: var(--wui-input-vertical-padding) var(--wui-input-horizontal-padding);
|
|
@@ -13305,7 +13495,7 @@ const StyledTrigger = styled(Trigger$4)`
|
|
|
13305
13495
|
color: var(--wui-input-placeholder);
|
|
13306
13496
|
}
|
|
13307
13497
|
`;
|
|
13308
|
-
const
|
|
13498
|
+
const StyledPopup = styled(Select$1.Popup)`
|
|
13309
13499
|
--wui-select-content-border: var(--wui-color-border);
|
|
13310
13500
|
--wui-select-content-bg: var(--wui-color-bg-surface);
|
|
13311
13501
|
--wui-select-content-border-radius: var(--wui-border-radius-02);
|
|
@@ -13319,8 +13509,8 @@ const StyledContent = styled(Content$5)`
|
|
|
13319
13509
|
border-radius: var(--wui-select-content-border-radius);
|
|
13320
13510
|
box-shadow: var(--wui-elevation-01);
|
|
13321
13511
|
padding: var(--wui-select-option-padding);
|
|
13322
|
-
min-width: var(--
|
|
13323
|
-
max-height: var(--
|
|
13512
|
+
min-width: var(--anchor-width);
|
|
13513
|
+
max-height: var(--available-height);
|
|
13324
13514
|
z-index: var(--wui-zindex-select);
|
|
13325
13515
|
|
|
13326
13516
|
[role='separator'] {
|
|
@@ -13332,55 +13522,87 @@ const scrollButtonStyles = css`
|
|
|
13332
13522
|
display: flex;
|
|
13333
13523
|
justify-content: center;
|
|
13334
13524
|
`;
|
|
13335
|
-
const
|
|
13525
|
+
const StyledScrollDownArrow = styled(Select$1.ScrollDownArrow)`
|
|
13336
13526
|
${scrollButtonStyles}
|
|
13337
13527
|
`;
|
|
13338
|
-
const
|
|
13528
|
+
const StyledScrollUpArrow = styled(Select$1.ScrollUpArrow)`
|
|
13339
13529
|
${scrollButtonStyles}
|
|
13340
13530
|
`;
|
|
13341
13531
|
/**
|
|
13532
|
+
* Walks the React children tree to build a value→label mapping for Base UI's `items` prop.
|
|
13533
|
+
* This ensures `Select.Value` displays the label text instead of the raw value.
|
|
13534
|
+
*/
|
|
13535
|
+
const collectItemLabels = (children) => {
|
|
13536
|
+
const items = [];
|
|
13537
|
+
Children.forEach(children, (child) => {
|
|
13538
|
+
if (!isValidElement(child)) return;
|
|
13539
|
+
const { value, selectedDisplayValue, children: childChildren, textValue } = child.props;
|
|
13540
|
+
if (typeof value === "string") {
|
|
13541
|
+
if (selectedDisplayValue !== void 0 && selectedDisplayValue !== null) items.push({
|
|
13542
|
+
value,
|
|
13543
|
+
label: selectedDisplayValue
|
|
13544
|
+
});
|
|
13545
|
+
else if (typeof childChildren === "string") items.push({
|
|
13546
|
+
value,
|
|
13547
|
+
label: childChildren
|
|
13548
|
+
});
|
|
13549
|
+
else if (typeof textValue === "string") items.push({
|
|
13550
|
+
value,
|
|
13551
|
+
label: textValue
|
|
13552
|
+
});
|
|
13553
|
+
return;
|
|
13554
|
+
}
|
|
13555
|
+
if (childChildren !== void 0 && childChildren !== null) items.push(...collectItemLabels(childChildren));
|
|
13556
|
+
});
|
|
13557
|
+
return items;
|
|
13558
|
+
};
|
|
13559
|
+
/**
|
|
13342
13560
|
* Display a list of options and choose one of them. Replacement for the native Select HTML element.
|
|
13343
13561
|
*/
|
|
13344
|
-
const Select = forwardRef(({ colorScheme = "inherit", children, onOpenChange = () => null, onChange = () => null, placeholder = "Select...", fullWidth = false, forceOpen = false, ...props }, forwardedRef) => {
|
|
13562
|
+
const Select = forwardRef(({ colorScheme = "inherit", children, onOpenChange = () => null, onChange = () => null, placeholder = "Select...", fullWidth = false, forceOpen = false, disabled, value, "aria-invalid": ariaInvalid, ...props }, forwardedRef) => {
|
|
13345
13563
|
const responsiveFullWidth = useResponsiveProp(fullWidth);
|
|
13346
13564
|
const rootProps = {
|
|
13347
|
-
|
|
13565
|
+
disabled,
|
|
13566
|
+
items: useMemo(() => collectItemLabels(children), [children]),
|
|
13348
13567
|
onOpenChange,
|
|
13349
|
-
onValueChange: onChange
|
|
13568
|
+
onValueChange: onChange,
|
|
13569
|
+
value
|
|
13350
13570
|
};
|
|
13351
13571
|
if (forceOpen) rootProps["open"] = true;
|
|
13352
|
-
return /* @__PURE__ */ jsxs(Root
|
|
13572
|
+
return /* @__PURE__ */ jsxs(Select$1.Root, {
|
|
13353
13573
|
...rootProps,
|
|
13354
13574
|
children: [/* @__PURE__ */ jsxs(StyledTrigger, {
|
|
13355
13575
|
ref: forwardedRef,
|
|
13356
13576
|
$colorScheme: colorScheme,
|
|
13357
13577
|
$fullWidth: responsiveFullWidth,
|
|
13578
|
+
"aria-invalid": ariaInvalid,
|
|
13358
13579
|
...props,
|
|
13359
|
-
children: [/* @__PURE__ */ jsx(Value, { placeholder }), /* @__PURE__ */ jsx(Icon, {
|
|
13580
|
+
children: [/* @__PURE__ */ jsx(Select$1.Value, { placeholder }), /* @__PURE__ */ jsx(Icon, {
|
|
13360
13581
|
size: "md",
|
|
13361
13582
|
type: "caret-down"
|
|
13362
13583
|
})]
|
|
13363
|
-
}), /* @__PURE__ */ jsx(Portal
|
|
13364
|
-
|
|
13584
|
+
}), /* @__PURE__ */ jsx(Select$1.Portal, { children: /* @__PURE__ */ jsx(Select$1.Positioner, {
|
|
13585
|
+
align: "start",
|
|
13586
|
+
alignItemWithTrigger: false,
|
|
13365
13587
|
sideOffset: 8,
|
|
13366
|
-
children: [
|
|
13367
|
-
/* @__PURE__ */ jsx(
|
|
13588
|
+
children: /* @__PURE__ */ jsxs(StyledPopup, { children: [
|
|
13589
|
+
/* @__PURE__ */ jsx(StyledScrollUpArrow, { children: /* @__PURE__ */ jsx(Icon, {
|
|
13368
13590
|
size: "sm",
|
|
13369
13591
|
type: "caret-up"
|
|
13370
13592
|
}) }),
|
|
13371
|
-
|
|
13372
|
-
/* @__PURE__ */ jsx(
|
|
13593
|
+
children,
|
|
13594
|
+
/* @__PURE__ */ jsx(StyledScrollDownArrow, { children: /* @__PURE__ */ jsx(Icon, {
|
|
13373
13595
|
size: "sm",
|
|
13374
13596
|
type: "caret-down"
|
|
13375
13597
|
}) })
|
|
13376
|
-
]
|
|
13598
|
+
] })
|
|
13377
13599
|
}) })]
|
|
13378
13600
|
});
|
|
13379
13601
|
});
|
|
13380
13602
|
Select.displayName = "Select_UI";
|
|
13381
13603
|
//#endregion
|
|
13382
13604
|
//#region src/components/Select/SelectOption.tsx
|
|
13383
|
-
const StyledItem = styled(Item
|
|
13605
|
+
const StyledItem = styled(Select$1.Item)`
|
|
13384
13606
|
${getTypographicStyles("label3")}
|
|
13385
13607
|
align-items: ${({ $checkmarkVerticalAlign }) => $checkmarkVerticalAlign === "center" ? "center" : "flex-start"};
|
|
13386
13608
|
background-color: transparent;
|
|
@@ -13406,15 +13628,17 @@ const StyledItem = styled(Item$2)`
|
|
|
13406
13628
|
background-color: transparent;
|
|
13407
13629
|
}
|
|
13408
13630
|
`;
|
|
13409
|
-
const SelectOption = forwardRef(({ children, selectedDisplayValue, checkmarkVerticalAlign = "center", ...props }, forwardedRef) => {
|
|
13631
|
+
const SelectOption = forwardRef(({ children, selectedDisplayValue, checkmarkVerticalAlign = "center", textValue, ...props }, forwardedRef) => {
|
|
13632
|
+
const label = typeof children === "string" ? children : textValue;
|
|
13410
13633
|
return /* @__PURE__ */ jsxs(StyledItem, {
|
|
13411
13634
|
...props,
|
|
13412
13635
|
ref: forwardedRef,
|
|
13413
13636
|
$checkmarkVerticalAlign: checkmarkVerticalAlign,
|
|
13637
|
+
...label != null ? { label } : {},
|
|
13414
13638
|
children: [isNotNil(selectedDisplayValue) ? /* @__PURE__ */ jsxs("div", { children: [children, /* @__PURE__ */ jsx("div", {
|
|
13415
13639
|
style: { display: "none" },
|
|
13416
|
-
children: /* @__PURE__ */ jsx(ItemText, { children: selectedDisplayValue })
|
|
13417
|
-
})] }) : /* @__PURE__ */ jsx(ItemText, { children }), /* @__PURE__ */ jsx(ItemIndicator, { children: /* @__PURE__ */ jsx(Icon, {
|
|
13640
|
+
children: /* @__PURE__ */ jsx(Select$1.ItemText, { children: selectedDisplayValue })
|
|
13641
|
+
})] }) : /* @__PURE__ */ jsx(Select$1.ItemText, { children }), /* @__PURE__ */ jsx(Select$1.ItemIndicator, { children: /* @__PURE__ */ jsx(Icon, {
|
|
13418
13642
|
size: "md",
|
|
13419
13643
|
type: "checkmark"
|
|
13420
13644
|
}) })]
|
|
@@ -13423,11 +13647,11 @@ const SelectOption = forwardRef(({ children, selectedDisplayValue, checkmarkVert
|
|
|
13423
13647
|
SelectOption.displayName = "SelectOption_UI";
|
|
13424
13648
|
//#endregion
|
|
13425
13649
|
//#region src/components/Select/SelectOptionGroup.tsx
|
|
13426
|
-
const StyledLabel = styled(
|
|
13650
|
+
const StyledLabel = styled(Select$1.GroupLabel)`
|
|
13427
13651
|
padding: var(--wui-select-option-padding);
|
|
13428
13652
|
`;
|
|
13429
13653
|
const SelectOptionGroup = ({ children, label, ...props }) => {
|
|
13430
|
-
return /* @__PURE__ */ jsxs(Group, {
|
|
13654
|
+
return /* @__PURE__ */ jsxs(Select$1.Group, {
|
|
13431
13655
|
...props,
|
|
13432
13656
|
children: [/* @__PURE__ */ jsx(StyledLabel, { children: /* @__PURE__ */ jsx(Heading, {
|
|
13433
13657
|
renderAs: "span",
|
|
@@ -13454,28 +13678,28 @@ const SliderContainer = styled.div`
|
|
|
13454
13678
|
pointer-events: none;
|
|
13455
13679
|
}
|
|
13456
13680
|
`;
|
|
13457
|
-
const StyledSliderRoot = styled(Root
|
|
13458
|
-
|
|
13681
|
+
const StyledSliderRoot = styled(Slider$1.Root)`
|
|
13682
|
+
width: 100%;
|
|
13683
|
+
`;
|
|
13684
|
+
const StyledSliderControl = styled(Slider$1.Control)`
|
|
13459
13685
|
display: flex;
|
|
13460
13686
|
align-items: center;
|
|
13461
13687
|
user-select: none;
|
|
13462
13688
|
touch-action: none;
|
|
13463
13689
|
width: 100%;
|
|
13464
13690
|
`;
|
|
13465
|
-
const StyledSliderTrack = styled(Track)`
|
|
13691
|
+
const StyledSliderTrack = styled(Slider$1.Track)`
|
|
13466
13692
|
background-color: var(--wui-slider-track-color);
|
|
13467
13693
|
border-radius: var(--wui-slider-track-border-radius);
|
|
13468
|
-
|
|
13694
|
+
width: 100%;
|
|
13469
13695
|
height: 6px;
|
|
13470
13696
|
position: relative;
|
|
13471
13697
|
`;
|
|
13472
|
-
const
|
|
13698
|
+
const StyledSliderIndicator = styled(Slider$1.Indicator)`
|
|
13473
13699
|
background-color: var(--wui-slider-range-color);
|
|
13474
13700
|
border-radius: var(--wui-slider-track-border-radius);
|
|
13475
|
-
height: 100%;
|
|
13476
|
-
position: absolute;
|
|
13477
13701
|
`;
|
|
13478
|
-
const StyledSliderThumb = styled(Thumb)`
|
|
13702
|
+
const StyledSliderThumb = styled(Slider$1.Thumb)`
|
|
13479
13703
|
background-color: var(--wui-slider-thumb-color);
|
|
13480
13704
|
border-radius: var(--wui-border-radius-rounded);
|
|
13481
13705
|
cursor: grab;
|
|
@@ -13502,16 +13726,19 @@ const StyledSliderThumb = styled(Thumb)`
|
|
|
13502
13726
|
outline-width: 2px;
|
|
13503
13727
|
}
|
|
13504
13728
|
`;
|
|
13505
|
-
const Slider = ({ "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, disabled = false, initialValue = [0], max = 100, min = 0, onChange,
|
|
13729
|
+
const Slider = ({ "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, disabled = false, initialValue = [0], max = 100, min = 0, onChange, onValueCommitted, step = 1, value, "data-testid": dataTestId = "ui-slider", ...otherProps }) => {
|
|
13506
13730
|
if (!(isNonEmptyString(ariaLabel) || isNonEmptyString(ariaLabelledby))) throw new Error("UI Slider: Sliders should have an accessible name. Add a label using the aria-label or aria-labelledby prop.");
|
|
13507
13731
|
const values = value ?? initialValue;
|
|
13508
13732
|
const handleValueChange = (newValue) => {
|
|
13509
|
-
if (onChange) onChange(newValue);
|
|
13733
|
+
if (onChange) onChange(typeof newValue === "number" ? [newValue] : [...newValue]);
|
|
13734
|
+
};
|
|
13735
|
+
const handleValueCommitted = (newValue) => {
|
|
13736
|
+
if (onValueCommitted) onValueCommitted(typeof newValue === "number" ? [newValue] : [...newValue]);
|
|
13510
13737
|
};
|
|
13511
13738
|
return /* @__PURE__ */ jsx(SliderContainer, {
|
|
13512
13739
|
...otherProps,
|
|
13513
13740
|
"data-testid": dataTestId,
|
|
13514
|
-
children: /* @__PURE__ */
|
|
13741
|
+
children: /* @__PURE__ */ jsx(StyledSliderRoot, {
|
|
13515
13742
|
"aria-label": ariaLabel,
|
|
13516
13743
|
"aria-labelledby": ariaLabelledby,
|
|
13517
13744
|
defaultValue: initialValue,
|
|
@@ -13519,13 +13746,13 @@ const Slider = ({ "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, di
|
|
|
13519
13746
|
max,
|
|
13520
13747
|
min,
|
|
13521
13748
|
onValueChange: handleValueChange,
|
|
13749
|
+
onValueCommitted: handleValueCommitted,
|
|
13522
13750
|
step,
|
|
13523
|
-
...onValueCommit ? { onValueCommit } : {},
|
|
13524
13751
|
...value ? { value } : {},
|
|
13525
|
-
children:
|
|
13752
|
+
children: /* @__PURE__ */ jsx(StyledSliderControl, { children: /* @__PURE__ */ jsxs(StyledSliderTrack, {
|
|
13526
13753
|
"data-testid": `${dataTestId}-track`,
|
|
13527
|
-
children: /* @__PURE__ */ jsx(
|
|
13528
|
-
})
|
|
13754
|
+
children: [/* @__PURE__ */ jsx(StyledSliderIndicator, { "data-testid": `${dataTestId}-range` }), values.map((_, index) => /* @__PURE__ */ jsx(StyledSliderThumb, { "data-testid": `${dataTestId}-thumb-${index}` }, `thumb-${index}`))]
|
|
13755
|
+
}) })
|
|
13529
13756
|
})
|
|
13530
13757
|
});
|
|
13531
13758
|
};
|
|
@@ -13543,7 +13770,7 @@ const StyledSplitButton = styled.span`
|
|
|
13543
13770
|
padding-right: 0;
|
|
13544
13771
|
}
|
|
13545
13772
|
|
|
13546
|
-
> [data-wui-button='true']:
|
|
13773
|
+
> [data-wui-button='true']:not(:first-child) {
|
|
13547
13774
|
border-top-left-radius: 0;
|
|
13548
13775
|
border-bottom-left-radius: 0;
|
|
13549
13776
|
display: inline-flex;
|
|
@@ -13725,18 +13952,22 @@ const useTabsValue = () => {
|
|
|
13725
13952
|
//#endregion
|
|
13726
13953
|
//#region src/components/Tabs/Tabs.tsx
|
|
13727
13954
|
const Tabs = ({ children, value: valueProp, onValueChange: onValueChangeProp, defaultValue, ...props }) => {
|
|
13728
|
-
const [
|
|
13955
|
+
const [internalValue, setInternalValue] = useState(valueProp ?? defaultValue);
|
|
13956
|
+
const isControlled = isNotNil(valueProp);
|
|
13957
|
+
const value = isControlled ? valueProp : internalValue;
|
|
13729
13958
|
const onValueChange = useCallback((newValue) => {
|
|
13730
|
-
|
|
13731
|
-
|
|
13959
|
+
if (newValue !== null) {
|
|
13960
|
+
setInternalValue(newValue);
|
|
13961
|
+
if (onValueChangeProp) onValueChangeProp(newValue);
|
|
13962
|
+
}
|
|
13732
13963
|
}, [onValueChangeProp]);
|
|
13733
13964
|
const rootProps = {
|
|
13734
13965
|
...props,
|
|
13735
13966
|
onValueChange
|
|
13736
13967
|
};
|
|
13737
13968
|
if (isNotNil(value)) rootProps.value = value;
|
|
13738
|
-
if (isNotNil(defaultValue)) rootProps.defaultValue = defaultValue;
|
|
13739
|
-
return /* @__PURE__ */ jsx(Root
|
|
13969
|
+
if (!isControlled && isNotNil(defaultValue)) rootProps.defaultValue = defaultValue;
|
|
13970
|
+
return /* @__PURE__ */ jsx(Tabs$1.Root, {
|
|
13740
13971
|
...rootProps,
|
|
13741
13972
|
children: /* @__PURE__ */ jsx(TabsValueProvider, {
|
|
13742
13973
|
value: value ?? defaultValue,
|
|
@@ -13748,7 +13979,7 @@ Tabs.displayName = "Tabs_UI";
|
|
|
13748
13979
|
//#endregion
|
|
13749
13980
|
//#region src/components/Tabs/TabsContent.tsx
|
|
13750
13981
|
const TabsContent = ({ children, value }) => {
|
|
13751
|
-
return /* @__PURE__ */ jsx(
|
|
13982
|
+
return /* @__PURE__ */ jsx(Tabs$1.Panel, {
|
|
13752
13983
|
value,
|
|
13753
13984
|
children
|
|
13754
13985
|
});
|
|
@@ -13773,7 +14004,7 @@ const SelectedTabIndicator = () => {
|
|
|
13773
14004
|
};
|
|
13774
14005
|
//#endregion
|
|
13775
14006
|
//#region src/components/Tabs/TabsList.tsx
|
|
13776
|
-
const StyledTabsList = styled(
|
|
14007
|
+
const StyledTabsList = styled(Tabs$1.List)`
|
|
13777
14008
|
${segmentedControlStyles}
|
|
13778
14009
|
`;
|
|
13779
14010
|
const TabsList = ({ children, fullWidth = true, ...props }) => {
|
|
@@ -13786,7 +14017,7 @@ const TabsList = ({ children, fullWidth = true, ...props }) => {
|
|
|
13786
14017
|
TabsList.displayName = "TabsList_UI";
|
|
13787
14018
|
//#endregion
|
|
13788
14019
|
//#region src/components/Tabs/StyledTabsTrigger.tsx
|
|
13789
|
-
const StyledTabsTrigger = styled(
|
|
14020
|
+
const StyledTabsTrigger = styled(Tabs$1.Tab)`
|
|
13790
14021
|
${segmentedControlItemStyles}
|
|
13791
14022
|
|
|
13792
14023
|
&:focus-visible {
|
|
@@ -14419,6 +14650,6 @@ const WistiaLogo = ({ description = void 0, height = 100, hoverColor = void 0, h
|
|
|
14419
14650
|
};
|
|
14420
14651
|
WistiaLogo.displayName = "WistiaLogo_UI";
|
|
14421
14652
|
//#endregion
|
|
14422
|
-
export { ActionButton, Avatar, Badge, Banner, Box, Breadcrumb, Breadcrumbs, Button, ButtonGroup, Card, Center, Checkbox, CheckboxGroup, CheckboxMenuItem, ClickRegion, Collapsible, CollapsibleContent, CollapsibleTrigger, CollapsibleTriggerIcon, ColorGrid, ColorGridOption, ColorList, ColorListGroup, ColorListOption, ColorPicker, ColorPickerPopoverContent, ColorPickerSection, ColorPickerTrigger, ColorSchemeWrapper, Combobox, ComboboxOption, ContextMenu, ContrastControls, CustomizableThemeWrapper, DataCard, DataCardHoverArrow, DataCardTrend, DataCards, DataList, DataListItem, DataListItemLabel, DataListItemValue, Divider, EditableHeading, EditableText, EditableTextCancelButton, EditableTextContext, EditableTextDisplay, EditableTextInput, EditableTextLabel, EditableTextRoot, EditableTextSubmitButton, EditableTextTrigger, Ellipsis, FeatureCard, FeatureCardImage, FileAmountLimitValidator, FileSizeValidator, FileTypeValidator, FilterMenu, FilterMenuItem, Form, FormErrorSummary, FormField, FormGroup, Grid, Heading, HexColorInput, HueSlider, Icon, IconButton, Image, ImageDimensionsValidator, Input, InputClickToCopy, InputPassword, KeyboardShortcut, Label, Link, List, ListItem, Mark, Markdown, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Meter, Modal, ModalCallout, ModalCallouts, PersistentFileAmountLimitValidator, Popover, PreviewCard, ProgressBar, Radio, RadioCard, RadioCardImage, RadioGroup, RadioMenuItem, SaturationAndValuePicker, ScreenReaderOnly, ScrollArea, SegmentedControl, SegmentedControlItem, Select, SelectOption, SelectOptionGroup, Slider, SplitButton, Stack, SubMenu, Switch, Table, TableBody, TableCell, TableFoot, TableHead, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, Text, Thumbnail, ThumbnailBadge, ThumbnailCollage, Tooltip, UIProvider, ValueNameOrHexCode, ValueSwatch, WistiaLogo, calculateContrast, coerceToBoolean, colorSchemeOptions, copyToClipboard, dateTime, iconSizeMap, isKeyboardKey, mergeRefs, mq, useActiveMq, useAriaLive, useBoolean, useClipboard, useElementObserver, useFilePicker, useFocusTrap, useForceUpdate, useFormState, useImperativeFilePicker, useIsHovered, useKey, useKeyPress, useLocalStorage, useLockBodyScroll, useMq, useOnClickOutside, usePreviousValue, useToast, useWindowSize, validateWithYup };
|
|
14653
|
+
export { ActionButton, Avatar, Badge, Banner, Box, Breadcrumb, Breadcrumbs, Button, ButtonGroup, Card, Center, Checkbox, CheckboxGroup, CheckboxMenuItem, ClickRegion, Collapsible, CollapsibleContent, CollapsibleTrigger, CollapsibleTriggerIcon, ColorGrid, ColorGridOption, ColorList, ColorListGroup, ColorListOption, ColorPicker, ColorPickerPopoverContent, ColorPickerSection, ColorPickerTrigger, ColorSchemeWrapper, Combobox, ComboboxOption, ContextMenu, ContrastControls, CustomizableThemeWrapper, DataCard, DataCardHoverArrow, DataCardTrend, DataCards, DataList, DataListItem, DataListItemLabel, DataListItemValue, Divider, EditableHeading, EditableText, EditableTextCancelButton, EditableTextContext, EditableTextDisplay, EditableTextInput, EditableTextLabel, EditableTextRoot, EditableTextSubmitButton, EditableTextTrigger, Ellipsis, FeatureCard, FeatureCardImage, FileAmountLimitValidator, FileSizeValidator, FileTypeValidator, FilterMenu, FilterMenuItem, Form, FormErrorSummary, FormField, FormGroup, Grid, Heading, HexColorInput, HueSlider, Icon, IconButton, Image, ImageDimensionsValidator, Input, InputClickToCopy, InputPassword, KeyboardShortcut, Label, Link, List, ListItem, Mark, Markdown, Menu, MenuItem, MenuItemDescription, MenuItemLabel, MenuLabel, MenuRadioGroup, Meter, Modal, ModalCallout, ModalCallouts, PersistentFileAmountLimitValidator, Popover, PopoverAnchor, PopoverArrow, PopoverClose, PopoverCloseButton, PopoverContent, PopoverPortal, PopoverRoot, PopoverTrigger, PreviewCard, ProgressBar, Radio, RadioCard, RadioCardImage, RadioGroup, RadioMenuItem, SaturationAndValuePicker, ScreenReaderOnly, ScrollArea, SegmentedControl, SegmentedControlItem, Select, SelectOption, SelectOptionGroup, Slider, SplitButton, Stack, SubMenu, Switch, Table, TableBody, TableCell, TableFoot, TableHead, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, Text, Thumbnail, ThumbnailBadge, ThumbnailCollage, Tooltip, UIProvider, ValueNameOrHexCode, ValueSwatch, WistiaLogo, calculateContrast, coerceToBoolean, colorSchemeOptions, copyToClipboard, dateTime, iconSizeMap, isKeyboardKey, mergeRefs, mq, useActiveMq, useAriaLive, useBoolean, useClipboard, useElementObserver, useFilePicker, useFocusTrap, useForceUpdate, useFormState, useImperativeFilePicker, useIsHovered, useKey, useKeyPress, useLocalStorage, useLockBodyScroll, useMq, useOnClickOutside, usePreviousValue, useToast, useWindowSize, validateWithYup };
|
|
14423
14654
|
|
|
14424
14655
|
//# sourceMappingURL=index.js.map
|