@wistia/ui 1.9.1 → 1.10.0-beta.7b835d60.8a2214c
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 +98 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +642 -437
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/CHANGELOG.md +0 -2295
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v1.
|
|
3
|
+
* @license @wistia/ui v1.10.0-beta.7b835d60.8a2214c
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2026, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -6704,6 +6704,9 @@ const StyledHeading$1 = styled.div`
|
|
|
6704
6704
|
${({ $align }) => css`
|
|
6705
6705
|
text-align: ${$align};
|
|
6706
6706
|
`}
|
|
6707
|
+
${({ $textTransform }) => isNotNil($textTransform) && css`
|
|
6708
|
+
text-transform: ${$textTransform};
|
|
6709
|
+
`}
|
|
6707
6710
|
margin: 0;
|
|
6708
6711
|
|
|
6709
6712
|
${iconInlineStyle}
|
|
@@ -6717,7 +6720,7 @@ const variantElementMap$1 = {
|
|
|
6717
6720
|
heading5: "h5",
|
|
6718
6721
|
heading6: "h6"
|
|
6719
6722
|
};
|
|
6720
|
-
const HeadingComponent = ({ ref, align = "left", children, colorScheme = "inherit", disabled = false, inline = false, maxChars, preventUserSelect = false, prominence = "primary", maxLines, variant = "heading1", renderAs, ...props }) => {
|
|
6723
|
+
const HeadingComponent = ({ ref, align = "left", children, colorScheme = "inherit", disabled = false, inline = false, maxChars, preventUserSelect = false, prominence = "primary", maxLines, textTransform, variant = "heading1", renderAs, ...props }) => {
|
|
6721
6724
|
const processedChildren = applyMaxCharsToChildren(children, maxChars);
|
|
6722
6725
|
return /* @__PURE__ */ jsx(StyledHeading$1, {
|
|
6723
6726
|
ref,
|
|
@@ -6728,6 +6731,7 @@ const HeadingComponent = ({ ref, align = "left", children, colorScheme = "inheri
|
|
|
6728
6731
|
$maxLines: maxLines,
|
|
6729
6732
|
$preventUserSelect: preventUserSelect,
|
|
6730
6733
|
$prominence: prominence,
|
|
6734
|
+
$textTransform: textTransform,
|
|
6731
6735
|
$variant: variant,
|
|
6732
6736
|
as: renderAs ?? variantElementMap$1[variant] ?? DEFAULT_ELEMENT$3,
|
|
6733
6737
|
...props,
|
|
@@ -6930,6 +6934,9 @@ const StyledText = styled.div`
|
|
|
6930
6934
|
${({ $align }) => css`
|
|
6931
6935
|
text-align: ${$align};
|
|
6932
6936
|
`}
|
|
6937
|
+
${({ $textTransform }) => isNotNil($textTransform) && css`
|
|
6938
|
+
text-transform: ${$textTransform};
|
|
6939
|
+
`}
|
|
6933
6940
|
${({ as }) => as === "p" && css`
|
|
6934
6941
|
display: block;
|
|
6935
6942
|
|
|
@@ -6938,7 +6945,7 @@ const StyledText = styled.div`
|
|
|
6938
6945
|
}
|
|
6939
6946
|
`}
|
|
6940
6947
|
`;
|
|
6941
|
-
const TextComponent = ({ ref, align = "left", children, colorScheme = "inherit", disabled = false, inline = false, maxChars, preventUserSelect = false, prominence = "primary", maxLines, variant = "body2", renderAs, ...props }) => {
|
|
6948
|
+
const TextComponent = ({ ref, align = "left", children, colorScheme = "inherit", disabled = false, inline = false, maxChars, preventUserSelect = false, prominence = "primary", maxLines, textTransform, variant = "body2", renderAs, ...props }) => {
|
|
6942
6949
|
const processedChildren = applyMaxCharsToChildren(children, maxChars);
|
|
6943
6950
|
return /* @__PURE__ */ jsx(StyledText, {
|
|
6944
6951
|
ref,
|
|
@@ -6949,6 +6956,7 @@ const TextComponent = ({ ref, align = "left", children, colorScheme = "inherit",
|
|
|
6949
6956
|
$maxLines: maxLines,
|
|
6950
6957
|
$preventUserSelect: preventUserSelect,
|
|
6951
6958
|
$prominence: prominence,
|
|
6959
|
+
$textTransform: textTransform,
|
|
6952
6960
|
$variant: variant,
|
|
6953
6961
|
as: renderAs ?? variantElementMap[variant] ?? DEFAULT_ELEMENT$2,
|
|
6954
6962
|
...props,
|
|
@@ -7483,7 +7491,7 @@ const CheckboxGroup = ({ children, name, onChange, value, ...props }) => {
|
|
|
7483
7491
|
CheckboxGroup.displayName = "CheckboxGroup_UI";
|
|
7484
7492
|
//#endregion
|
|
7485
7493
|
//#region src/components/Checkbox/Checkbox.tsx
|
|
7486
|
-
const CheckIcon = () => /* @__PURE__ */ jsx("svg", {
|
|
7494
|
+
const CheckIcon$1 = () => /* @__PURE__ */ jsx("svg", {
|
|
7487
7495
|
fill: "inherit",
|
|
7488
7496
|
height: "8",
|
|
7489
7497
|
viewBox: "0 0 10 8",
|
|
@@ -7611,7 +7619,7 @@ const Checkbox = ({ checked, disabled = false, id, label, description, name, onC
|
|
|
7611
7619
|
$disabled: disabled,
|
|
7612
7620
|
$size: size,
|
|
7613
7621
|
"data-wui-faux-input": "true",
|
|
7614
|
-
children: /* @__PURE__ */ jsx(CheckIcon, {})
|
|
7622
|
+
children: /* @__PURE__ */ jsx(CheckIcon$1, {})
|
|
7615
7623
|
}),
|
|
7616
7624
|
description,
|
|
7617
7625
|
disabled,
|
|
@@ -7622,184 +7630,542 @@ const Checkbox = ({ checked, disabled = false, id, label, description, name, onC
|
|
|
7622
7630
|
});
|
|
7623
7631
|
};
|
|
7624
7632
|
//#endregion
|
|
7625
|
-
//#region src/components/
|
|
7626
|
-
const
|
|
7627
|
-
|
|
7628
|
-
|
|
7629
|
-
|
|
7630
|
-
|
|
7633
|
+
//#region src/components/CheckboxCard/CheckboxCardChildrenContainer.tsx
|
|
7634
|
+
const CheckboxCardChildrenContainer = styled.div`
|
|
7635
|
+
flex: 1 1 auto;
|
|
7636
|
+
`;
|
|
7637
|
+
//#endregion
|
|
7638
|
+
//#region src/components/FormGroup/RadioGroup.tsx
|
|
7639
|
+
const RadioGroupContext = createContext(null);
|
|
7631
7640
|
/**
|
|
7632
|
-
*
|
|
7633
|
-
*
|
|
7634
|
-
* For buttons, when the element is clicked, it will proxy a click event to the targetRef, which should be inside the ClickRegion.
|
|
7635
|
-
*
|
|
7636
|
-
* For links, a pseudo-element of the link is created that is the size of the ClickRegion. **Note**: this will prevent text selection
|
|
7637
|
-
* inside the text region.
|
|
7638
|
-
*
|
|
7639
|
-
* In either case, a link or button must be present, but can be hidden by using `ScreenReaderOnly`.
|
|
7641
|
+
* Connects Radio components with their parent RadioGroup; provides access to `name` and `onChange`
|
|
7640
7642
|
*/
|
|
7641
|
-
const
|
|
7642
|
-
|
|
7643
|
-
const node = targetRef.current;
|
|
7644
|
-
if (node?.tagName === "A") node.dataset["clickRegionTargetLink"] = "";
|
|
7645
|
-
else if (node?.tagName === "BUTTON") node.dataset["clickRegionTargetButton"] = "";
|
|
7646
|
-
}, [targetRef]);
|
|
7647
|
-
const handleClick = useCallback((event) => {
|
|
7648
|
-
const node = targetRef.current;
|
|
7649
|
-
if (event.target === node) return;
|
|
7650
|
-
if (isClickableElement(event.target) && event.target !== node) {
|
|
7651
|
-
event.stopPropagation();
|
|
7652
|
-
return;
|
|
7653
|
-
}
|
|
7654
|
-
if (node === null || event.defaultPrevented || !Object.hasOwn(node.dataset, "clickRegionTargetButton")) return;
|
|
7655
|
-
event.stopPropagation();
|
|
7656
|
-
event.preventDefault();
|
|
7657
|
-
node.focus();
|
|
7658
|
-
node.click();
|
|
7659
|
-
}, [targetRef]);
|
|
7660
|
-
return cloneElement(Children.only(children), {
|
|
7661
|
-
"data-click-region": true,
|
|
7662
|
-
onClick: handleClick
|
|
7663
|
-
});
|
|
7643
|
+
const useRadioGroup = () => {
|
|
7644
|
+
return useContext(RadioGroupContext);
|
|
7664
7645
|
};
|
|
7665
|
-
ClickRegion.displayName = "ClickRegion_UI";
|
|
7666
|
-
//#endregion
|
|
7667
|
-
//#region src/components/Collapsible/Collapsible.tsx
|
|
7668
|
-
const StyledRoot = styled(Collapsible$1.Root)`
|
|
7669
|
-
${({ $isOpen }) => !$isOpen && css`
|
|
7670
|
-
[data-wui-collapsible-content] {
|
|
7671
|
-
display: -webkit-box;
|
|
7672
|
-
-webkit-box-orient: vertical;
|
|
7673
|
-
-webkit-line-clamp: var(--wui-collapsible-content-clamp-lines);
|
|
7674
|
-
overflow: hidden;
|
|
7675
|
-
}
|
|
7676
|
-
`}
|
|
7677
|
-
`;
|
|
7678
7646
|
/**
|
|
7679
|
-
*
|
|
7647
|
+
* For grouping like form elements together. Can serve as a checkbox
|
|
7680
7648
|
*/
|
|
7681
|
-
const
|
|
7682
|
-
const
|
|
7683
|
-
const [
|
|
7684
|
-
const
|
|
7685
|
-
|
|
7686
|
-
|
|
7687
|
-
|
|
7688
|
-
|
|
7689
|
-
|
|
7690
|
-
|
|
7691
|
-
|
|
7692
|
-
|
|
7693
|
-
|
|
7694
|
-
|
|
7649
|
+
const RadioGroup = ({ children, name, onChange, value, ...props }) => {
|
|
7650
|
+
const formState = useContext(FormContext);
|
|
7651
|
+
const derivedValue = typeof formState.values[name] === "string" ? formState.values[name] : value;
|
|
7652
|
+
const context = useMemo(() => {
|
|
7653
|
+
return {
|
|
7654
|
+
name,
|
|
7655
|
+
onChange,
|
|
7656
|
+
value: derivedValue
|
|
7657
|
+
};
|
|
7658
|
+
}, [
|
|
7659
|
+
name,
|
|
7660
|
+
derivedValue,
|
|
7661
|
+
onChange
|
|
7662
|
+
]);
|
|
7663
|
+
return /* @__PURE__ */ jsx(RadioGroupContext, {
|
|
7664
|
+
value: context,
|
|
7665
|
+
children: /* @__PURE__ */ jsx(FormGroup, {
|
|
7666
|
+
...props,
|
|
7667
|
+
role: "radiogroup",
|
|
7668
|
+
children
|
|
7669
|
+
})
|
|
7695
7670
|
});
|
|
7696
7671
|
};
|
|
7697
|
-
|
|
7672
|
+
RadioGroup.displayName = "RadioGroup_UI";
|
|
7698
7673
|
//#endregion
|
|
7699
|
-
//#region src/components/
|
|
7700
|
-
const
|
|
7701
|
-
|
|
7702
|
-
|
|
7703
|
-
|
|
7674
|
+
//#region src/components/RadioCard/RadioCardRoot.tsx
|
|
7675
|
+
const checkedStyles = css`
|
|
7676
|
+
--wui-radio-card-border-color: var(--wui-color-focus-ring);
|
|
7677
|
+
--wui-color-icon: var(--wui-color-icon-selected);
|
|
7678
|
+
--wui-radio-card-background-color: var(--wui-color-bg-surface-info);
|
|
7679
|
+
--wui-color-text: var(--wui-color-text-info);
|
|
7680
|
+
--wui-color-text-secondary: var(--wui-color-text-info);
|
|
7681
|
+
`;
|
|
7682
|
+
const disabledStyles = css`
|
|
7683
|
+
--wui-radio-card-border-color: var(--wui-color-border-disabled);
|
|
7684
|
+
--wui-radio-card-background-color: var(--wui-color-bg-surface-disabled);
|
|
7685
|
+
--wui-radio-card-cursor: not-allowed;
|
|
7686
|
+
--wui-color-icon: var(--wui-color-icon-disabled);
|
|
7687
|
+
--wui-color-text: var(--wui-color-text-disabled);
|
|
7688
|
+
--wui-color-text-secondary: var(--wui-color-text-disabled);
|
|
7689
|
+
`;
|
|
7690
|
+
const focusStyles = css`
|
|
7691
|
+
outline: 2px solid var(--wui-color-focus-ring);
|
|
7692
|
+
`;
|
|
7693
|
+
const imageCoverStyles = css`
|
|
7694
|
+
--wui-radio-card-image-inset: 0px;
|
|
7695
|
+
--wui-radio-card-border-width: 0px;
|
|
7696
|
+
--wui-inset-shadow-width: 1px;
|
|
7697
|
+
--wui-radio-card-border-color: rgb(0 0 0 / 25%);
|
|
7704
7698
|
|
|
7705
|
-
|
|
7706
|
-
& [data-wui-collapsible-icon] {
|
|
7707
|
-
&[data-wui-collapsible-icon-rotate='90'] {
|
|
7708
|
-
transform: rotate(90deg);
|
|
7709
|
-
}
|
|
7699
|
+
overflow: hidden;
|
|
7710
7700
|
|
|
7711
|
-
|
|
7712
|
-
|
|
7713
|
-
|
|
7701
|
+
&:has(input:checked) {
|
|
7702
|
+
--wui-radio-card-border-color: var(--wui-color-focus-ring);
|
|
7703
|
+
--wui-radio-card-image-inset: 2px;
|
|
7704
|
+
--wui-inset-shadow-width: 2px;
|
|
7705
|
+
}
|
|
7714
7706
|
|
|
7715
|
-
|
|
7716
|
-
|
|
7717
|
-
}
|
|
7718
|
-
}
|
|
7707
|
+
&:hover:not(:has(input:disabled, input:checked)) {
|
|
7708
|
+
--wui-radio-card-border-color: rgb(0 0 0 / 50%);
|
|
7719
7709
|
}
|
|
7720
|
-
|
|
7721
|
-
const CollapsibleTrigger = ({ children }) => {
|
|
7722
|
-
Children.only(children);
|
|
7723
|
-
return /* @__PURE__ */ jsx(StyledTrigger$1, { render: children });
|
|
7724
|
-
};
|
|
7725
|
-
//#endregion
|
|
7726
|
-
//#region src/components/Collapsible/CollapsibleTriggerIcon.tsx
|
|
7727
|
-
const iconRotationMap = {
|
|
7728
|
-
"caret-left-strong": "-90",
|
|
7729
|
-
"caret-left": "-90",
|
|
7730
|
-
"caret-right-strong": "90",
|
|
7731
|
-
"caret-right": "90",
|
|
7732
|
-
plus: "45"
|
|
7733
|
-
};
|
|
7734
|
-
const CollapsibleTriggerIcon = ({ type, ...props }) => {
|
|
7735
|
-
return /* @__PURE__ */ jsx(Icon, {
|
|
7736
|
-
...props,
|
|
7737
|
-
"data-wui-collapsible-icon": "true",
|
|
7738
|
-
"data-wui-collapsible-icon-rotate": iconRotationMap[type],
|
|
7739
|
-
type
|
|
7740
|
-
});
|
|
7741
|
-
};
|
|
7742
|
-
CollapsibleTriggerIcon.displayName = "CollapsibleTriggerIcon_UI";
|
|
7743
|
-
//#endregion
|
|
7744
|
-
//#region src/components/Collapsible/CollapsibleContent.tsx
|
|
7745
|
-
const ClampedContent = styled.div`
|
|
7746
|
-
--wui-collapsible-content-clamp-lines: ${({ $clamp }) => $clamp};
|
|
7747
|
-
`;
|
|
7748
|
-
const CollapsibleContent = ({ clamp, children }) => {
|
|
7749
|
-
if (isNotUndefined(clamp)) return /* @__PURE__ */ jsx(ClampedContent, {
|
|
7750
|
-
$clamp: clamp,
|
|
7751
|
-
"data-wui-collapsible-content": "true",
|
|
7752
|
-
children
|
|
7753
|
-
});
|
|
7754
|
-
return /* @__PURE__ */ jsx(Collapsible$1.Panel, { children: /* @__PURE__ */ jsxs(Fragment, { children: [children, " "] }) });
|
|
7755
|
-
};
|
|
7756
|
-
//#endregion
|
|
7757
|
-
//#region src/components/Label/Label.tsx
|
|
7758
|
-
const requiredStyle = css`
|
|
7710
|
+
|
|
7759
7711
|
&::after {
|
|
7760
|
-
|
|
7761
|
-
|
|
7762
|
-
|
|
7763
|
-
|
|
7712
|
+
content: '';
|
|
7713
|
+
position: absolute;
|
|
7714
|
+
top: 0;
|
|
7715
|
+
width: 100%;
|
|
7716
|
+
height: 100%;
|
|
7717
|
+
border-radius: var(--wui-radio-card-border-radius);
|
|
7718
|
+
box-shadow:
|
|
7719
|
+
inset 0 0 0 var(--wui-inset-shadow-width) var(--wui-radio-card-border-color),
|
|
7720
|
+
inset 0 0 0 calc(var(--wui-radio-card-image-inset) * 2) var(--wui-radio-card-background-color);
|
|
7721
|
+
transition: all var(--wui-motion-duration-02) var(--wui-motion-ease);
|
|
7764
7722
|
}
|
|
7765
7723
|
`;
|
|
7766
|
-
const
|
|
7767
|
-
|
|
7768
|
-
|
|
7769
|
-
|
|
7770
|
-
|
|
7771
|
-
|
|
7772
|
-
color: var(--wui-color-text);
|
|
7773
|
-
font: var(--wui-typography-heading-6);
|
|
7724
|
+
const StyledCard = styled.label`
|
|
7725
|
+
--wui-radio-card-border-color: var(--wui-color-border-secondary);
|
|
7726
|
+
--wui-radio-card-background-color: var(--wui-color-bg-surface);
|
|
7727
|
+
--wui-radio-card-cursor: pointer;
|
|
7728
|
+
--wui-radio-card-border-width: 1px;
|
|
7729
|
+
--wui-radio-card-border-radius: var(--wui-border-radius-02);
|
|
7774
7730
|
|
|
7775
|
-
|
|
7776
|
-
|
|
7777
|
-
|
|
7778
|
-
|
|
7779
|
-
|
|
7780
|
-
|
|
7731
|
+
position: relative;
|
|
7732
|
+
display: inline-flex;
|
|
7733
|
+
padding: ${({ $padding }) => `var(--wui-${$padding})`};
|
|
7734
|
+
aspect-ratio: ${({ $aspectRatio }) => $aspectRatio};
|
|
7735
|
+
border: var(--wui-radio-card-border-width) solid var(--wui-radio-card-border-color);
|
|
7736
|
+
border-radius: var(--wui-radio-card-border-radius);
|
|
7737
|
+
background-color: var(--wui-radio-card-background-color);
|
|
7738
|
+
cursor: var(--wui-radio-card-cursor);
|
|
7739
|
+
overflow: hidden;
|
|
7740
|
+
transition: all var(--wui-motion-duration-03) var(--wui-motion-ease);
|
|
7781
7741
|
|
|
7782
|
-
|
|
7783
|
-
|
|
7784
|
-
|
|
7742
|
+
svg {
|
|
7743
|
+
transition: all var(--wui-motion-duration-03) var(--wui-motion-ease);
|
|
7744
|
+
}
|
|
7785
7745
|
|
|
7786
|
-
|
|
7787
|
-
|
|
7788
|
-
|
|
7789
|
-
|
|
7790
|
-
|
|
7791
|
-
|
|
7792
|
-
|
|
7793
|
-
|
|
7794
|
-
|
|
7795
|
-
|
|
7796
|
-
|
|
7797
|
-
|
|
7798
|
-
|
|
7799
|
-
|
|
7800
|
-
|
|
7801
|
-
|
|
7802
|
-
|
|
7746
|
+
&:hover {
|
|
7747
|
+
--wui-radio-card-border-color: var(--wui-color-border-secondary-hover);
|
|
7748
|
+
}
|
|
7749
|
+
|
|
7750
|
+
&:active {
|
|
7751
|
+
--wui-radio-card-border-color: var(--wui-color-border-secondary-active);
|
|
7752
|
+
}
|
|
7753
|
+
|
|
7754
|
+
&:has(input:checked) {
|
|
7755
|
+
${({ $isGated }) => $isGated ? getColorScheme("purple") : checkedStyles}
|
|
7756
|
+
}
|
|
7757
|
+
|
|
7758
|
+
&:has(input:disabled) {
|
|
7759
|
+
${disabledStyles}
|
|
7760
|
+
}
|
|
7761
|
+
|
|
7762
|
+
&:has(input:focus-visible) {
|
|
7763
|
+
${focusStyles}
|
|
7764
|
+
}
|
|
7765
|
+
|
|
7766
|
+
&:has([data-wui-radio-card-image]) {
|
|
7767
|
+
&:has(input:disabled) {
|
|
7768
|
+
& [data-wui-radio-card-image] {
|
|
7769
|
+
filter: grayscale(100%);
|
|
7770
|
+
}
|
|
7771
|
+
}
|
|
7772
|
+
|
|
7773
|
+
&:has([data-wui-radio-card-image='cover']) {
|
|
7774
|
+
${imageCoverStyles}
|
|
7775
|
+
}
|
|
7776
|
+
}
|
|
7777
|
+
`;
|
|
7778
|
+
const StyledHiddenInput$1 = styled.input`
|
|
7779
|
+
${visuallyHiddenStyle}
|
|
7780
|
+
`;
|
|
7781
|
+
const RadioCardRoot = ({ children, disabled = false, id, isGated = false, name, onChange, value, aspectRatio = "initial", padding = "space-04", checked, ref, ...props }) => {
|
|
7782
|
+
const generatedId = useId();
|
|
7783
|
+
const computedId = isNonEmptyString(id) ? id : `wistia-ui-radio-${generatedId}`;
|
|
7784
|
+
const radioGroupContext = useRadioGroup();
|
|
7785
|
+
const contextName = radioGroupContext?.name;
|
|
7786
|
+
const contextOnChange = radioGroupContext?.onChange;
|
|
7787
|
+
const contextValue = radioGroupContext?.value;
|
|
7788
|
+
const radioName = name ?? contextName;
|
|
7789
|
+
const handleOnChange = onChange ?? contextOnChange;
|
|
7790
|
+
const isChecked = isNotUndefined(value) && isNotUndefined(contextValue) ? contextValue === value : checked;
|
|
7791
|
+
return /* @__PURE__ */ jsxs(StyledCard, {
|
|
7792
|
+
$aspectRatio: aspectRatio,
|
|
7793
|
+
$isGated: isGated,
|
|
7794
|
+
$padding: padding,
|
|
7795
|
+
htmlFor: computedId,
|
|
7796
|
+
children: [/* @__PURE__ */ jsx(StyledHiddenInput$1, {
|
|
7797
|
+
...props,
|
|
7798
|
+
ref,
|
|
7799
|
+
checked: isChecked,
|
|
7800
|
+
disabled,
|
|
7801
|
+
id: computedId,
|
|
7802
|
+
name: radioName,
|
|
7803
|
+
onChange: handleOnChange,
|
|
7804
|
+
type: "radio",
|
|
7805
|
+
value
|
|
7806
|
+
}), children]
|
|
7807
|
+
});
|
|
7808
|
+
};
|
|
7809
|
+
//#endregion
|
|
7810
|
+
//#region src/components/CheckboxCard/CheckboxCardIndicator.tsx
|
|
7811
|
+
const CheckIcon = () => /* @__PURE__ */ jsx("svg", {
|
|
7812
|
+
fill: "inherit",
|
|
7813
|
+
height: "8",
|
|
7814
|
+
viewBox: "0 0 10 8",
|
|
7815
|
+
width: "10",
|
|
7816
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7817
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
7818
|
+
d: "M3.47281 7.19303L0.377565 4.07999C0.191609 3.89297 0.191609 3.58973 0.377565 3.40268L1.05098 2.72537C1.23694 2.53833 1.53847 2.53833 1.72442 2.72537L3.80953 4.82245L8.27558 0.330729C8.46154 0.143704 8.76306 0.143704 8.94902 0.330729L9.62244 1.00804C9.8084 1.19506 9.8084 1.49831 9.62244 1.68535L4.14624 7.19305C3.96027 7.38008 3.65876 7.38008 3.47281 7.19303Z",
|
|
7819
|
+
fill: "var(--wui-checkbox-card-indicator-icon-color)"
|
|
7820
|
+
})
|
|
7821
|
+
});
|
|
7822
|
+
const StyledIndicator = styled.div`
|
|
7823
|
+
--wui-checkbox-card-indicator-size: 14px;
|
|
7824
|
+
--wui-checkbox-card-indicator-icon-size: 7px;
|
|
7825
|
+
--wui-checkbox-card-indicator-background-color: var(--wui-color-bg-surface);
|
|
7826
|
+
--wui-checkbox-card-indicator-icon-color: transparent;
|
|
7827
|
+
|
|
7828
|
+
/* TODO: figure out radio / checkbox / switch colors */
|
|
7829
|
+
--wui-checkbox-card-indicator-border-color: var(--wui-color-border-secondary-active);
|
|
7830
|
+
|
|
7831
|
+
width: var(--wui-checkbox-card-indicator-size);
|
|
7832
|
+
height: var(--wui-checkbox-card-indicator-size);
|
|
7833
|
+
min-width: var(--wui-checkbox-card-indicator-size);
|
|
7834
|
+
min-height: var(--wui-checkbox-card-indicator-size);
|
|
7835
|
+
display: grid;
|
|
7836
|
+
place-content: center;
|
|
7837
|
+
background-color: var(--wui-checkbox-card-indicator-background-color);
|
|
7838
|
+
box-shadow: inset 0 0 0 1px var(--wui-checkbox-card-indicator-border-color);
|
|
7839
|
+
border-radius: var(--wui-border-radius-01);
|
|
7840
|
+
cursor: pointer;
|
|
7841
|
+
transition: all var(--wui-motion-duration-03) var(--wui-motion-ease);
|
|
7842
|
+
|
|
7843
|
+
/* check icon */
|
|
7844
|
+
svg {
|
|
7845
|
+
width: var(--wui-checkbox-card-indicator-icon-size);
|
|
7846
|
+
height: var(--wui-checkbox-card-indicator-icon-size);
|
|
7847
|
+
}
|
|
7848
|
+
|
|
7849
|
+
${StyledCard}:has(input:checked) & {
|
|
7850
|
+
--wui-checkbox-card-indicator-background-color: var(--wui-color-bg-fill);
|
|
7851
|
+
--wui-checkbox-card-indicator-border-color: transparent;
|
|
7852
|
+
--wui-checkbox-card-indicator-icon-color: var(--wui-color-bg-fill-white);
|
|
7853
|
+
}
|
|
7854
|
+
|
|
7855
|
+
${StyledCard}:has(input:disabled) & {
|
|
7856
|
+
--wui-checkbox-card-indicator-border-color: var(--wui-color-border-secondary);
|
|
7857
|
+
--wui-checkbox-card-indicator-background-color: var(--wui-color-bg-surface-disabled);
|
|
7858
|
+
}
|
|
7859
|
+
|
|
7860
|
+
${StyledCard}:has(input:disabled:checked) & {
|
|
7861
|
+
--wui-checkbox-card-indicator-icon-color: var(--wui-color-icon-disabled);
|
|
7862
|
+
}
|
|
7863
|
+
`;
|
|
7864
|
+
const CheckboxCardIndicator = (props) => /* @__PURE__ */ jsx(StyledIndicator, {
|
|
7865
|
+
...props,
|
|
7866
|
+
children: /* @__PURE__ */ jsx(CheckIcon, {})
|
|
7867
|
+
});
|
|
7868
|
+
CheckboxCardIndicator.displayName = "CheckboxCardIndicator_UI";
|
|
7869
|
+
//#endregion
|
|
7870
|
+
//#region src/components/CheckboxCard/CheckboxCardDefaultLayout.tsx
|
|
7871
|
+
const StyledCardContent$1 = styled.div`
|
|
7872
|
+
display: grid;
|
|
7873
|
+
grid-auto-flow: column;
|
|
7874
|
+
gap: var(--wui-space-02);
|
|
7875
|
+
`;
|
|
7876
|
+
const StyledCardIcon$1 = styled.div`
|
|
7877
|
+
display: contents;
|
|
7878
|
+
`;
|
|
7879
|
+
const StyledGatedIcon$1 = styled.div`
|
|
7880
|
+
position: absolute;
|
|
7881
|
+
right: 10px;
|
|
7882
|
+
top: 10px;
|
|
7883
|
+
z-index: 1;
|
|
7884
|
+
`;
|
|
7885
|
+
const StyledIndicatorContainer$1 = styled.div`
|
|
7886
|
+
height: ${({ $hasIcon }) => $hasIcon ? "24px" : "16px"};
|
|
7887
|
+
display: flex;
|
|
7888
|
+
align-items: center;
|
|
7889
|
+
`;
|
|
7890
|
+
const CheckboxCardDefaultLayout = ({ icon, label, description, showIndicator = true, isGated = false }) => {
|
|
7891
|
+
return /* @__PURE__ */ jsxs(StyledCardContent$1, { children: [
|
|
7892
|
+
showIndicator ? /* @__PURE__ */ jsx(StyledIndicatorContainer$1, {
|
|
7893
|
+
$hasIcon: isNotNil(icon),
|
|
7894
|
+
children: /* @__PURE__ */ jsx(CheckboxCardIndicator, { "data-testid": "wui-checkbox-card-indicator" })
|
|
7895
|
+
}) : null,
|
|
7896
|
+
isGated ? /* @__PURE__ */ jsx(StyledGatedIcon$1, {
|
|
7897
|
+
"data-testid": "wui-checkbox-gated-icon",
|
|
7898
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
7899
|
+
colorScheme: "purple",
|
|
7900
|
+
"data-testid": "wui-icon-sparkle",
|
|
7901
|
+
type: "sparkle"
|
|
7902
|
+
})
|
|
7903
|
+
}) : null,
|
|
7904
|
+
/* @__PURE__ */ jsxs(Stack, {
|
|
7905
|
+
gap: "space-02",
|
|
7906
|
+
children: [isNotNil(icon) && /* @__PURE__ */ jsx(StyledCardIcon$1, {
|
|
7907
|
+
"data-wui-checkbox-card-icon": true,
|
|
7908
|
+
children: icon
|
|
7909
|
+
}), /* @__PURE__ */ jsxs(Stack, {
|
|
7910
|
+
gap: "space-01",
|
|
7911
|
+
style: isNotNil(icon) ? { paddingLeft: 2 } : void 0,
|
|
7912
|
+
children: [isNotNil(label) && /* @__PURE__ */ jsx(Text, {
|
|
7913
|
+
variant: "label3",
|
|
7914
|
+
children: /* @__PURE__ */ jsx("strong", { children: label })
|
|
7915
|
+
}), isNotNil(description) && /* @__PURE__ */ jsx(Text, {
|
|
7916
|
+
prominence: "secondary",
|
|
7917
|
+
variant: "body3",
|
|
7918
|
+
children: description
|
|
7919
|
+
})]
|
|
7920
|
+
})]
|
|
7921
|
+
})
|
|
7922
|
+
] });
|
|
7923
|
+
};
|
|
7924
|
+
CheckboxCardDefaultLayout.displayName = "CheckboxCardDefaultLayout_UI";
|
|
7925
|
+
//#endregion
|
|
7926
|
+
//#region src/components/CheckboxCard/CheckboxCardRoot.tsx
|
|
7927
|
+
const StyledHiddenInput = styled.input`
|
|
7928
|
+
${visuallyHiddenStyle}
|
|
7929
|
+
`;
|
|
7930
|
+
/**
|
|
7931
|
+
* `CheckboxCardRoot` renders the same card shell as `RadioCardRoot` (`StyledCard`) so
|
|
7932
|
+
* radio and checkbox cards stay visually identical — including the `--wui-radio-card-*`
|
|
7933
|
+
* custom properties consumers may override — but wires it to a hidden checkbox input
|
|
7934
|
+
* and the `CheckboxGroup` context instead.
|
|
7935
|
+
*/
|
|
7936
|
+
const CheckboxCardRoot = ({ children, disabled = false, id, isGated = false, name, onChange, value, aspectRatio = "initial", padding = "space-04", checked, ref, ...props }) => {
|
|
7937
|
+
const generatedId = useId();
|
|
7938
|
+
const computedId = isNonEmptyString(id) ? id : `wistia-ui-checkbox-card-${generatedId}`;
|
|
7939
|
+
const checkboxGroupContext = useCheckboxGroup();
|
|
7940
|
+
const contextName = checkboxGroupContext?.name;
|
|
7941
|
+
const contextOnChange = checkboxGroupContext?.onChange;
|
|
7942
|
+
const contextValue = checkboxGroupContext?.value;
|
|
7943
|
+
const checkboxName = name ?? contextName;
|
|
7944
|
+
const handleOnChange = onChange ?? contextOnChange;
|
|
7945
|
+
const isChecked = isNotUndefined(value) && isNotUndefined(contextValue) ? contextValue.includes(value) : checked;
|
|
7946
|
+
return /* @__PURE__ */ jsxs(StyledCard, {
|
|
7947
|
+
$aspectRatio: aspectRatio,
|
|
7948
|
+
$isGated: isGated,
|
|
7949
|
+
$padding: padding,
|
|
7950
|
+
htmlFor: computedId,
|
|
7951
|
+
children: [/* @__PURE__ */ jsx(StyledHiddenInput, {
|
|
7952
|
+
...props,
|
|
7953
|
+
ref,
|
|
7954
|
+
checked: isChecked,
|
|
7955
|
+
disabled,
|
|
7956
|
+
id: computedId,
|
|
7957
|
+
name: checkboxName,
|
|
7958
|
+
onChange: handleOnChange,
|
|
7959
|
+
type: "checkbox",
|
|
7960
|
+
value
|
|
7961
|
+
}), children]
|
|
7962
|
+
});
|
|
7963
|
+
};
|
|
7964
|
+
//#endregion
|
|
7965
|
+
//#region src/components/CheckboxCard/CheckboxCard.tsx
|
|
7966
|
+
/**
|
|
7967
|
+
* A `CheckboxCard` lets users select one or more options from a set of visually rich,
|
|
7968
|
+
* card-based choices. It shares its card styling with `RadioCard`, so the two can be
|
|
7969
|
+
* used side by side for single-select and multi-select questions. It supports both
|
|
7970
|
+
* standalone controlled usage and grouped usage via `CheckboxGroup`.
|
|
7971
|
+
*/
|
|
7972
|
+
const CheckboxCard = ({ icon, label, description, showIndicator, isGated, children, padding, ref, ...rootProps }) => {
|
|
7973
|
+
return /* @__PURE__ */ jsx(CheckboxCardRoot, {
|
|
7974
|
+
ref,
|
|
7975
|
+
isGated,
|
|
7976
|
+
padding: padding ?? (children != null ? "space-00" : "space-04"),
|
|
7977
|
+
...rootProps,
|
|
7978
|
+
children: children != null ? /* @__PURE__ */ jsx(CheckboxCardChildrenContainer, {
|
|
7979
|
+
"data-wui-radio-card-image": "cover",
|
|
7980
|
+
children
|
|
7981
|
+
}) : /* @__PURE__ */ jsx(CheckboxCardDefaultLayout, {
|
|
7982
|
+
description,
|
|
7983
|
+
icon,
|
|
7984
|
+
isGated,
|
|
7985
|
+
label,
|
|
7986
|
+
showIndicator
|
|
7987
|
+
})
|
|
7988
|
+
});
|
|
7989
|
+
};
|
|
7990
|
+
//#endregion
|
|
7991
|
+
//#region src/components/ClickRegion/ClickRegion.tsx
|
|
7992
|
+
const isClickableElement = (element) => {
|
|
7993
|
+
if (!element) return false;
|
|
7994
|
+
const el = element;
|
|
7995
|
+
return el.closest("button") !== null || el.closest("a") !== null || el.closest("input") !== null || el.closest("select") !== null || el.closest("textarea") !== null || el.closest("label") !== null || el.closest("[data-wui-faux-input]") !== null;
|
|
7996
|
+
};
|
|
7997
|
+
/**
|
|
7998
|
+
* This allows larger elements to be interactive links or buttons while maintaining acessibility.
|
|
7999
|
+
*
|
|
8000
|
+
* For buttons, when the element is clicked, it will proxy a click event to the targetRef, which should be inside the ClickRegion.
|
|
8001
|
+
*
|
|
8002
|
+
* For links, a pseudo-element of the link is created that is the size of the ClickRegion. **Note**: this will prevent text selection
|
|
8003
|
+
* inside the text region.
|
|
8004
|
+
*
|
|
8005
|
+
* In either case, a link or button must be present, but can be hidden by using `ScreenReaderOnly`.
|
|
8006
|
+
*/
|
|
8007
|
+
const ClickRegion = ({ children, targetRef }) => {
|
|
8008
|
+
useEffect(() => {
|
|
8009
|
+
const node = targetRef.current;
|
|
8010
|
+
if (node?.tagName === "A") node.dataset["clickRegionTargetLink"] = "";
|
|
8011
|
+
else if (node?.tagName === "BUTTON") node.dataset["clickRegionTargetButton"] = "";
|
|
8012
|
+
}, [targetRef]);
|
|
8013
|
+
const handleClick = useCallback((event) => {
|
|
8014
|
+
const node = targetRef.current;
|
|
8015
|
+
if (event.target === node) return;
|
|
8016
|
+
if (isClickableElement(event.target) && event.target !== node) {
|
|
8017
|
+
event.stopPropagation();
|
|
8018
|
+
return;
|
|
8019
|
+
}
|
|
8020
|
+
if (node === null || event.defaultPrevented || !Object.hasOwn(node.dataset, "clickRegionTargetButton")) return;
|
|
8021
|
+
event.stopPropagation();
|
|
8022
|
+
event.preventDefault();
|
|
8023
|
+
node.focus();
|
|
8024
|
+
node.click();
|
|
8025
|
+
}, [targetRef]);
|
|
8026
|
+
return cloneElement(Children.only(children), {
|
|
8027
|
+
"data-click-region": true,
|
|
8028
|
+
onClick: handleClick
|
|
8029
|
+
});
|
|
8030
|
+
};
|
|
8031
|
+
ClickRegion.displayName = "ClickRegion_UI";
|
|
8032
|
+
//#endregion
|
|
8033
|
+
//#region src/components/Collapsible/Collapsible.tsx
|
|
8034
|
+
const StyledRoot = styled(Collapsible$1.Root)`
|
|
8035
|
+
${({ $isOpen }) => !$isOpen && css`
|
|
8036
|
+
[data-wui-collapsible-content] {
|
|
8037
|
+
display: -webkit-box;
|
|
8038
|
+
-webkit-box-orient: vertical;
|
|
8039
|
+
-webkit-line-clamp: var(--wui-collapsible-content-clamp-lines);
|
|
8040
|
+
overflow: hidden;
|
|
8041
|
+
}
|
|
8042
|
+
`}
|
|
8043
|
+
`;
|
|
8044
|
+
/**
|
|
8045
|
+
* Toggle the visibility of content with a trigger.
|
|
8046
|
+
*/
|
|
8047
|
+
const Collapsible = ({ children, isOpen, onOpenChange }) => {
|
|
8048
|
+
const isControlled = isNotNil(isOpen);
|
|
8049
|
+
const [internalOpen, setInternalOpen] = useState(false);
|
|
8050
|
+
const handleOpenChange = (open) => {
|
|
8051
|
+
if (!isControlled) setInternalOpen(open);
|
|
8052
|
+
onOpenChange?.(open);
|
|
8053
|
+
};
|
|
8054
|
+
return /* @__PURE__ */ jsx(StyledRoot, {
|
|
8055
|
+
$isOpen: isControlled ? isOpen : internalOpen,
|
|
8056
|
+
...isControlled ? {
|
|
8057
|
+
open: isOpen,
|
|
8058
|
+
onOpenChange: handleOpenChange
|
|
8059
|
+
} : { onOpenChange: handleOpenChange },
|
|
8060
|
+
children
|
|
8061
|
+
});
|
|
8062
|
+
};
|
|
8063
|
+
Collapsible.displayName = "Collapsible_UI";
|
|
8064
|
+
//#endregion
|
|
8065
|
+
//#region src/components/Collapsible/CollapsibleTrigger.tsx
|
|
8066
|
+
const StyledTrigger$1 = styled(Collapsible$1.Trigger)`
|
|
8067
|
+
[data-wui-collapsible-icon] {
|
|
8068
|
+
transition: transform var(--wui-motion-duration-03) ease-in-out;
|
|
8069
|
+
}
|
|
8070
|
+
|
|
8071
|
+
&[aria-expanded='true'] {
|
|
8072
|
+
& [data-wui-collapsible-icon] {
|
|
8073
|
+
&[data-wui-collapsible-icon-rotate='90'] {
|
|
8074
|
+
transform: rotate(90deg);
|
|
8075
|
+
}
|
|
8076
|
+
|
|
8077
|
+
&[data-wui-collapsible-icon-rotate='-90'] {
|
|
8078
|
+
transform: rotate(-90deg);
|
|
8079
|
+
}
|
|
8080
|
+
|
|
8081
|
+
&[data-wui-collapsible-icon-rotate='45'] {
|
|
8082
|
+
transform: rotate(45deg);
|
|
8083
|
+
}
|
|
8084
|
+
}
|
|
8085
|
+
}
|
|
8086
|
+
`;
|
|
8087
|
+
const CollapsibleTrigger = ({ children }) => {
|
|
8088
|
+
Children.only(children);
|
|
8089
|
+
return /* @__PURE__ */ jsx(StyledTrigger$1, { render: children });
|
|
8090
|
+
};
|
|
8091
|
+
//#endregion
|
|
8092
|
+
//#region src/components/Collapsible/CollapsibleTriggerIcon.tsx
|
|
8093
|
+
const iconRotationMap = {
|
|
8094
|
+
"caret-left-strong": "-90",
|
|
8095
|
+
"caret-left": "-90",
|
|
8096
|
+
"caret-right-strong": "90",
|
|
8097
|
+
"caret-right": "90",
|
|
8098
|
+
plus: "45"
|
|
8099
|
+
};
|
|
8100
|
+
const CollapsibleTriggerIcon = ({ type, ...props }) => {
|
|
8101
|
+
return /* @__PURE__ */ jsx(Icon, {
|
|
8102
|
+
...props,
|
|
8103
|
+
"data-wui-collapsible-icon": "true",
|
|
8104
|
+
"data-wui-collapsible-icon-rotate": iconRotationMap[type],
|
|
8105
|
+
type
|
|
8106
|
+
});
|
|
8107
|
+
};
|
|
8108
|
+
CollapsibleTriggerIcon.displayName = "CollapsibleTriggerIcon_UI";
|
|
8109
|
+
//#endregion
|
|
8110
|
+
//#region src/components/Collapsible/CollapsibleContent.tsx
|
|
8111
|
+
const ClampedContent = styled.div`
|
|
8112
|
+
--wui-collapsible-content-clamp-lines: ${({ $clamp }) => $clamp};
|
|
8113
|
+
`;
|
|
8114
|
+
const CollapsibleContent = ({ clamp, children }) => {
|
|
8115
|
+
if (isNotUndefined(clamp)) return /* @__PURE__ */ jsx(ClampedContent, {
|
|
8116
|
+
$clamp: clamp,
|
|
8117
|
+
"data-wui-collapsible-content": "true",
|
|
8118
|
+
children
|
|
8119
|
+
});
|
|
8120
|
+
return /* @__PURE__ */ jsx(Collapsible$1.Panel, { children: /* @__PURE__ */ jsxs(Fragment, { children: [children, " "] }) });
|
|
8121
|
+
};
|
|
8122
|
+
//#endregion
|
|
8123
|
+
//#region src/components/Label/Label.tsx
|
|
8124
|
+
const requiredStyle = css`
|
|
8125
|
+
&::after {
|
|
8126
|
+
color: var(--wui-color-text-error);
|
|
8127
|
+
display: inline;
|
|
8128
|
+
padding-left: var(--wui-space-01);
|
|
8129
|
+
content: '*';
|
|
8130
|
+
}
|
|
8131
|
+
`;
|
|
8132
|
+
const disabledStyle = css`
|
|
8133
|
+
color: var(--wui-color-text-disabled);
|
|
8134
|
+
`;
|
|
8135
|
+
const StyledLabel$2 = styled.label`
|
|
8136
|
+
display: block;
|
|
8137
|
+
width: 100%;
|
|
8138
|
+
color: var(--wui-color-text);
|
|
8139
|
+
font: var(--wui-typography-heading-6);
|
|
8140
|
+
|
|
8141
|
+
/* if label is wrapping an input this ensures it appears beneath the label with a nice margin */
|
|
8142
|
+
> input,
|
|
8143
|
+
> textarea,
|
|
8144
|
+
> select {
|
|
8145
|
+
display: block;
|
|
8146
|
+
}
|
|
8147
|
+
|
|
8148
|
+
> label {
|
|
8149
|
+
font-weight: normal;
|
|
8150
|
+
}
|
|
8151
|
+
|
|
8152
|
+
${({ $screenReaderOnly }) => $screenReaderOnly && visuallyHiddenStyle}
|
|
8153
|
+
${({ $disabled }) => $disabled && disabledStyle}
|
|
8154
|
+
${({ $required }) => $required && requiredStyle}
|
|
8155
|
+
`;
|
|
8156
|
+
/**
|
|
8157
|
+
* Labels are used to give a title to a form component (eg. Input, Select, etc.)
|
|
8158
|
+
*/
|
|
8159
|
+
const Label = ({ children, disabled = false, htmlFor, required = false, screenReaderOnly = false, ...props }) => {
|
|
8160
|
+
return /* @__PURE__ */ jsx(StyledLabel$2, {
|
|
8161
|
+
...props,
|
|
8162
|
+
$disabled: disabled,
|
|
8163
|
+
$required: required,
|
|
8164
|
+
$screenReaderOnly: screenReaderOnly,
|
|
8165
|
+
htmlFor,
|
|
8166
|
+
children
|
|
8167
|
+
});
|
|
8168
|
+
};
|
|
7803
8169
|
Label.displayName = "Label_UI";
|
|
7804
8170
|
//#endregion
|
|
7805
8171
|
//#region src/components/ColorPicker/color-conversion-utils.ts
|
|
@@ -12737,42 +13103,6 @@ const FormField = ({ children, description, error, id, label, labelPosition, nam
|
|
|
12737
13103
|
};
|
|
12738
13104
|
FormField.displayName = "FormField_UI";
|
|
12739
13105
|
//#endregion
|
|
12740
|
-
//#region src/components/FormGroup/RadioGroup.tsx
|
|
12741
|
-
const RadioGroupContext = createContext(null);
|
|
12742
|
-
/**
|
|
12743
|
-
* Connects Radio components with their parent RadioGroup; provides access to `name` and `onChange`
|
|
12744
|
-
*/
|
|
12745
|
-
const useRadioGroup = () => {
|
|
12746
|
-
return useContext(RadioGroupContext);
|
|
12747
|
-
};
|
|
12748
|
-
/**
|
|
12749
|
-
* For grouping like form elements together. Can serve as a checkbox
|
|
12750
|
-
*/
|
|
12751
|
-
const RadioGroup = ({ children, name, onChange, value, ...props }) => {
|
|
12752
|
-
const formState = useContext(FormContext);
|
|
12753
|
-
const derivedValue = typeof formState.values[name] === "string" ? formState.values[name] : value;
|
|
12754
|
-
const context = useMemo(() => {
|
|
12755
|
-
return {
|
|
12756
|
-
name,
|
|
12757
|
-
onChange,
|
|
12758
|
-
value: derivedValue
|
|
12759
|
-
};
|
|
12760
|
-
}, [
|
|
12761
|
-
name,
|
|
12762
|
-
derivedValue,
|
|
12763
|
-
onChange
|
|
12764
|
-
]);
|
|
12765
|
-
return /* @__PURE__ */ jsx(RadioGroupContext, {
|
|
12766
|
-
value: context,
|
|
12767
|
-
children: /* @__PURE__ */ jsx(FormGroup, {
|
|
12768
|
-
...props,
|
|
12769
|
-
role: "radiogroup",
|
|
12770
|
-
children
|
|
12771
|
-
})
|
|
12772
|
-
});
|
|
12773
|
-
};
|
|
12774
|
-
RadioGroup.displayName = "RadioGroup_UI";
|
|
12775
|
-
//#endregion
|
|
12776
13106
|
//#region src/components/Grid/Grid.tsx
|
|
12777
13107
|
const DEFAULT_ELEMENT = "div";
|
|
12778
13108
|
/**
|
|
@@ -14661,7 +14991,113 @@ const Meter = ({ segments, label, labelMeta, description, hideKey = false, max =
|
|
|
14661
14991
|
]
|
|
14662
14992
|
});
|
|
14663
14993
|
};
|
|
14664
|
-
Meter.displayName = "Meter_UI";
|
|
14994
|
+
Meter.displayName = "Meter_UI";
|
|
14995
|
+
//#endregion
|
|
14996
|
+
//#region src/components/ScrollArea/ScrollArea.tsx
|
|
14997
|
+
const SHADOW_SIZE_PX = 8;
|
|
14998
|
+
const Container = styled.div`
|
|
14999
|
+
overflow: hidden;
|
|
15000
|
+
position: relative;
|
|
15001
|
+
flex: 1 1 auto;
|
|
15002
|
+
`;
|
|
15003
|
+
const ScrollContainer = styled.div`
|
|
15004
|
+
overflow: ${({ $locked }) => $locked ? "hidden" : "auto"};
|
|
15005
|
+
height: 100%;
|
|
15006
|
+
width: 100%;
|
|
15007
|
+
`;
|
|
15008
|
+
const Shadow = styled.div`
|
|
15009
|
+
pointer-events: none;
|
|
15010
|
+
position: absolute;
|
|
15011
|
+
transition: box-shadow var(--wui-motion-duration-04) var(--wui-motion-ease);
|
|
15012
|
+
box-shadow: ${({ $isVisible }) => $isVisible ? `0 0 ${SHADOW_SIZE_PX}px ${SHADOW_SIZE_PX}px var(--wui-color-drop-shadow)` : "none"};
|
|
15013
|
+
z-index: 1;
|
|
15014
|
+
`;
|
|
15015
|
+
const ShadowAtTop = styled(Shadow)`
|
|
15016
|
+
transform: translateY(-${SHADOW_SIZE_PX}px);
|
|
15017
|
+
height: 0;
|
|
15018
|
+
left: 0;
|
|
15019
|
+
right: 0;
|
|
15020
|
+
top: 0;
|
|
15021
|
+
`;
|
|
15022
|
+
const ShadowAtBottom = styled(Shadow)`
|
|
15023
|
+
transform: translateY(${SHADOW_SIZE_PX}px);
|
|
15024
|
+
bottom: 0;
|
|
15025
|
+
height: 0;
|
|
15026
|
+
left: 0;
|
|
15027
|
+
right: 0;
|
|
15028
|
+
`;
|
|
15029
|
+
const ShadowAtLeft = styled(Shadow)`
|
|
15030
|
+
transform: translateX(-${SHADOW_SIZE_PX}px);
|
|
15031
|
+
bottom: 0;
|
|
15032
|
+
left: 0;
|
|
15033
|
+
top: 0;
|
|
15034
|
+
width: 0;
|
|
15035
|
+
`;
|
|
15036
|
+
const ShadowAtRight = styled(Shadow)`
|
|
15037
|
+
transform: translateX(${SHADOW_SIZE_PX}px);
|
|
15038
|
+
bottom: 0;
|
|
15039
|
+
right: 0;
|
|
15040
|
+
top: 0;
|
|
15041
|
+
width: 0;
|
|
15042
|
+
`;
|
|
15043
|
+
/**
|
|
15044
|
+
* ScrollArea is a simple scrollable container with shadow effects to indicate
|
|
15045
|
+
* scrollability.
|
|
15046
|
+
*/
|
|
15047
|
+
const ScrollArea = ({ children, onScroll, style, locked = false, ref: forwardedRef, ...props }) => {
|
|
15048
|
+
const scrollContainerRefInternal = useRef(null);
|
|
15049
|
+
const [shadowState, setShadowState] = useState({
|
|
15050
|
+
canScrollUp: false,
|
|
15051
|
+
canScrollLeft: false,
|
|
15052
|
+
canScrollDown: false,
|
|
15053
|
+
canScrollRight: false
|
|
15054
|
+
});
|
|
15055
|
+
const scrollContainerRef = mergeRefs([scrollContainerRefInternal, forwardedRef]);
|
|
15056
|
+
const updateShadows = useCallback(() => {
|
|
15057
|
+
const scrollContainer = scrollContainerRefInternal.current;
|
|
15058
|
+
if (!scrollContainer) return;
|
|
15059
|
+
setShadowState({
|
|
15060
|
+
canScrollUp: scrollContainer.scrollTop > 0,
|
|
15061
|
+
canScrollLeft: scrollContainer.scrollLeft > 0,
|
|
15062
|
+
canScrollDown: scrollContainer.scrollTop + scrollContainer.clientHeight < scrollContainer.scrollHeight,
|
|
15063
|
+
canScrollRight: scrollContainer.scrollLeft + scrollContainer.clientWidth < scrollContainer.scrollWidth
|
|
15064
|
+
});
|
|
15065
|
+
}, []);
|
|
15066
|
+
const throttledUpdateShadows = useMemo(() => throttle(100, updateShadows), [updateShadows]);
|
|
15067
|
+
const onScrollScrollContainer = useCallback((event) => {
|
|
15068
|
+
onScroll?.(event);
|
|
15069
|
+
throttledUpdateShadows();
|
|
15070
|
+
}, [onScroll, throttledUpdateShadows]);
|
|
15071
|
+
useEffect(() => {
|
|
15072
|
+
updateShadows();
|
|
15073
|
+
const scrollContainer = scrollContainerRefInternal.current;
|
|
15074
|
+
if (!scrollContainer || typeof ResizeObserver === "undefined") return;
|
|
15075
|
+
const resizeObserver = new ResizeObserver(() => {
|
|
15076
|
+
throttledUpdateShadows();
|
|
15077
|
+
});
|
|
15078
|
+
resizeObserver.observe(scrollContainer);
|
|
15079
|
+
for (const child of scrollContainer.children) resizeObserver.observe(child);
|
|
15080
|
+
return () => {
|
|
15081
|
+
resizeObserver.disconnect();
|
|
15082
|
+
};
|
|
15083
|
+
}, [updateShadows, throttledUpdateShadows]);
|
|
15084
|
+
return /* @__PURE__ */ jsxs(Container, {
|
|
15085
|
+
style,
|
|
15086
|
+
children: [
|
|
15087
|
+
/* @__PURE__ */ jsx(ShadowAtTop, { $isVisible: shadowState.canScrollUp }),
|
|
15088
|
+
/* @__PURE__ */ jsx(ShadowAtBottom, { $isVisible: shadowState.canScrollDown }),
|
|
15089
|
+
/* @__PURE__ */ jsx(ShadowAtLeft, { $isVisible: shadowState.canScrollLeft }),
|
|
15090
|
+
/* @__PURE__ */ jsx(ShadowAtRight, { $isVisible: shadowState.canScrollRight }),
|
|
15091
|
+
/* @__PURE__ */ jsx(ScrollContainer, {
|
|
15092
|
+
ref: scrollContainerRef,
|
|
15093
|
+
$locked: locked,
|
|
15094
|
+
onScroll: onScrollScrollContainer,
|
|
15095
|
+
...props,
|
|
15096
|
+
children
|
|
15097
|
+
})
|
|
15098
|
+
]
|
|
15099
|
+
});
|
|
15100
|
+
};
|
|
14665
15101
|
//#endregion
|
|
14666
15102
|
//#region src/components/Modal/constants.ts
|
|
14667
15103
|
const DEFAULT_MODAL_WIDTH = "532px";
|
|
@@ -14882,8 +15318,9 @@ const ModalBody = styled.div`
|
|
|
14882
15318
|
`;
|
|
14883
15319
|
const ModalScrollArea = styled.div`
|
|
14884
15320
|
order: 2;
|
|
15321
|
+
display: flex;
|
|
14885
15322
|
max-height: 90vh;
|
|
14886
|
-
|
|
15323
|
+
min-height: 0;
|
|
14887
15324
|
height: 100%;
|
|
14888
15325
|
`;
|
|
14889
15326
|
const ModalFooter = styled.footer`
|
|
@@ -14912,7 +15349,7 @@ const Modal = ({ children, footer, hideCloseButton = false, hideTitle = false, i
|
|
|
14912
15349
|
width,
|
|
14913
15350
|
...props,
|
|
14914
15351
|
children: [
|
|
14915
|
-
/* @__PURE__ */ jsx(ModalScrollArea, { children: /* @__PURE__ */ jsx(ModalBody, { children }) }),
|
|
15352
|
+
/* @__PURE__ */ jsx(ModalScrollArea, { children: /* @__PURE__ */ jsx(ScrollArea, { children: /* @__PURE__ */ jsx(ModalBody, { children }) }) }),
|
|
14916
15353
|
isNotNil(footer) ? /* @__PURE__ */ jsx(ModalFooter, { children: footer }) : null,
|
|
14917
15354
|
hideCloseButton && hideTitle ? null : /* @__PURE__ */ jsx(ModalHeader, {
|
|
14918
15355
|
hideCloseButton,
|
|
@@ -15133,142 +15570,6 @@ const RadioCardChildrenContainer = styled.div`
|
|
|
15133
15570
|
flex: 1 1 auto;
|
|
15134
15571
|
`;
|
|
15135
15572
|
//#endregion
|
|
15136
|
-
//#region src/components/RadioCard/RadioCardRoot.tsx
|
|
15137
|
-
const checkedStyles = css`
|
|
15138
|
-
--wui-radio-card-border-color: var(--wui-color-focus-ring);
|
|
15139
|
-
--wui-color-icon: var(--wui-color-icon-selected);
|
|
15140
|
-
--wui-radio-card-background-color: var(--wui-color-bg-surface-info);
|
|
15141
|
-
--wui-color-text: var(--wui-color-text-info);
|
|
15142
|
-
--wui-color-text-secondary: var(--wui-color-text-info);
|
|
15143
|
-
`;
|
|
15144
|
-
const disabledStyles = css`
|
|
15145
|
-
--wui-radio-card-border-color: var(--wui-color-border-disabled);
|
|
15146
|
-
--wui-radio-card-background-color: var(--wui-color-bg-surface-disabled);
|
|
15147
|
-
--wui-radio-card-cursor: not-allowed;
|
|
15148
|
-
--wui-color-icon: var(--wui-color-icon-disabled);
|
|
15149
|
-
--wui-color-text: var(--wui-color-text-disabled);
|
|
15150
|
-
--wui-color-text-secondary: var(--wui-color-text-disabled);
|
|
15151
|
-
`;
|
|
15152
|
-
const focusStyles = css`
|
|
15153
|
-
outline: 2px solid var(--wui-color-focus-ring);
|
|
15154
|
-
`;
|
|
15155
|
-
const imageCoverStyles = css`
|
|
15156
|
-
--wui-radio-card-image-inset: 0px;
|
|
15157
|
-
--wui-radio-card-border-width: 0px;
|
|
15158
|
-
--wui-inset-shadow-width: 1px;
|
|
15159
|
-
--wui-radio-card-border-color: rgb(0 0 0 / 25%);
|
|
15160
|
-
|
|
15161
|
-
overflow: hidden;
|
|
15162
|
-
|
|
15163
|
-
&:has(input:checked) {
|
|
15164
|
-
--wui-radio-card-border-color: var(--wui-color-focus-ring);
|
|
15165
|
-
--wui-radio-card-image-inset: 2px;
|
|
15166
|
-
--wui-inset-shadow-width: 2px;
|
|
15167
|
-
}
|
|
15168
|
-
|
|
15169
|
-
&:hover:not(:has(input:disabled, input:checked)) {
|
|
15170
|
-
--wui-radio-card-border-color: rgb(0 0 0 / 50%);
|
|
15171
|
-
}
|
|
15172
|
-
|
|
15173
|
-
&::after {
|
|
15174
|
-
content: '';
|
|
15175
|
-
position: absolute;
|
|
15176
|
-
top: 0;
|
|
15177
|
-
width: 100%;
|
|
15178
|
-
height: 100%;
|
|
15179
|
-
border-radius: var(--wui-radio-card-border-radius);
|
|
15180
|
-
box-shadow:
|
|
15181
|
-
inset 0 0 0 var(--wui-inset-shadow-width) var(--wui-radio-card-border-color),
|
|
15182
|
-
inset 0 0 0 calc(var(--wui-radio-card-image-inset) * 2) var(--wui-radio-card-background-color);
|
|
15183
|
-
transition: all var(--wui-motion-duration-02) var(--wui-motion-ease);
|
|
15184
|
-
}
|
|
15185
|
-
`;
|
|
15186
|
-
const StyledCard = styled.label`
|
|
15187
|
-
--wui-radio-card-border-color: var(--wui-color-border-secondary);
|
|
15188
|
-
--wui-radio-card-background-color: var(--wui-color-bg-surface);
|
|
15189
|
-
--wui-radio-card-cursor: pointer;
|
|
15190
|
-
--wui-radio-card-border-width: 1px;
|
|
15191
|
-
--wui-radio-card-border-radius: var(--wui-border-radius-02);
|
|
15192
|
-
|
|
15193
|
-
position: relative;
|
|
15194
|
-
display: inline-flex;
|
|
15195
|
-
padding: ${({ $padding }) => `var(--wui-${$padding})`};
|
|
15196
|
-
aspect-ratio: ${({ $aspectRatio }) => $aspectRatio};
|
|
15197
|
-
border: var(--wui-radio-card-border-width) solid var(--wui-radio-card-border-color);
|
|
15198
|
-
border-radius: var(--wui-radio-card-border-radius);
|
|
15199
|
-
background-color: var(--wui-radio-card-background-color);
|
|
15200
|
-
cursor: var(--wui-radio-card-cursor);
|
|
15201
|
-
overflow: hidden;
|
|
15202
|
-
transition: all var(--wui-motion-duration-03) var(--wui-motion-ease);
|
|
15203
|
-
|
|
15204
|
-
svg {
|
|
15205
|
-
transition: all var(--wui-motion-duration-03) var(--wui-motion-ease);
|
|
15206
|
-
}
|
|
15207
|
-
|
|
15208
|
-
&:hover {
|
|
15209
|
-
--wui-radio-card-border-color: var(--wui-color-border-secondary-hover);
|
|
15210
|
-
}
|
|
15211
|
-
|
|
15212
|
-
&:active {
|
|
15213
|
-
--wui-radio-card-border-color: var(--wui-color-border-secondary-active);
|
|
15214
|
-
}
|
|
15215
|
-
|
|
15216
|
-
&:has(input:checked) {
|
|
15217
|
-
${({ $isGated }) => $isGated ? getColorScheme("purple") : checkedStyles}
|
|
15218
|
-
}
|
|
15219
|
-
|
|
15220
|
-
&:has(input:disabled) {
|
|
15221
|
-
${disabledStyles}
|
|
15222
|
-
}
|
|
15223
|
-
|
|
15224
|
-
&:has(input:focus-visible) {
|
|
15225
|
-
${focusStyles}
|
|
15226
|
-
}
|
|
15227
|
-
|
|
15228
|
-
&:has([data-wui-radio-card-image]) {
|
|
15229
|
-
&:has(input:disabled) {
|
|
15230
|
-
& [data-wui-radio-card-image] {
|
|
15231
|
-
filter: grayscale(100%);
|
|
15232
|
-
}
|
|
15233
|
-
}
|
|
15234
|
-
|
|
15235
|
-
&:has([data-wui-radio-card-image='cover']) {
|
|
15236
|
-
${imageCoverStyles}
|
|
15237
|
-
}
|
|
15238
|
-
}
|
|
15239
|
-
`;
|
|
15240
|
-
const StyledHiddenInput = styled.input`
|
|
15241
|
-
${visuallyHiddenStyle}
|
|
15242
|
-
`;
|
|
15243
|
-
const RadioCardRoot = ({ children, disabled = false, id, isGated = false, name, onChange, value, aspectRatio = "initial", padding = "space-04", checked, ref, ...props }) => {
|
|
15244
|
-
const generatedId = useId();
|
|
15245
|
-
const computedId = isNonEmptyString(id) ? id : `wistia-ui-radio-${generatedId}`;
|
|
15246
|
-
const radioGroupContext = useRadioGroup();
|
|
15247
|
-
const contextName = radioGroupContext?.name;
|
|
15248
|
-
const contextOnChange = radioGroupContext?.onChange;
|
|
15249
|
-
const contextValue = radioGroupContext?.value;
|
|
15250
|
-
const radioName = name ?? contextName;
|
|
15251
|
-
const handleOnChange = onChange ?? contextOnChange;
|
|
15252
|
-
const isChecked = isNotUndefined(value) && isNotUndefined(contextValue) ? contextValue === value : checked;
|
|
15253
|
-
return /* @__PURE__ */ jsxs(StyledCard, {
|
|
15254
|
-
$aspectRatio: aspectRatio,
|
|
15255
|
-
$isGated: isGated,
|
|
15256
|
-
$padding: padding,
|
|
15257
|
-
htmlFor: computedId,
|
|
15258
|
-
children: [/* @__PURE__ */ jsx(StyledHiddenInput, {
|
|
15259
|
-
...props,
|
|
15260
|
-
ref,
|
|
15261
|
-
checked: isChecked,
|
|
15262
|
-
disabled,
|
|
15263
|
-
id: computedId,
|
|
15264
|
-
name: radioName,
|
|
15265
|
-
onChange: handleOnChange,
|
|
15266
|
-
type: "radio",
|
|
15267
|
-
value
|
|
15268
|
-
}), children]
|
|
15269
|
-
});
|
|
15270
|
-
};
|
|
15271
|
-
//#endregion
|
|
15272
15573
|
//#region src/components/RadioCard/RadioCardIndicator.tsx
|
|
15273
15574
|
const RadioCardIndicator = styled.div`
|
|
15274
15575
|
--wui-radio-card-indicator-size: 14px;
|
|
@@ -15414,102 +15715,6 @@ const RadioCardImage = ({ label, imageSrc, aspectRatio, padding = "space-04", re
|
|
|
15414
15715
|
});
|
|
15415
15716
|
};
|
|
15416
15717
|
//#endregion
|
|
15417
|
-
//#region src/components/ScrollArea/ScrollArea.tsx
|
|
15418
|
-
const SHADOW_SIZE_PX = 8;
|
|
15419
|
-
const Container = styled.div`
|
|
15420
|
-
overflow: hidden;
|
|
15421
|
-
position: relative;
|
|
15422
|
-
flex: 1 1 auto;
|
|
15423
|
-
`;
|
|
15424
|
-
const ScrollContainer = styled.div`
|
|
15425
|
-
overflow: ${({ $locked }) => $locked ? "hidden" : "auto"};
|
|
15426
|
-
height: 100%;
|
|
15427
|
-
width: 100%;
|
|
15428
|
-
`;
|
|
15429
|
-
const Shadow = styled.div`
|
|
15430
|
-
pointer-events: none;
|
|
15431
|
-
position: absolute;
|
|
15432
|
-
transition: box-shadow var(--wui-motion-duration-04) var(--wui-motion-ease);
|
|
15433
|
-
box-shadow: ${({ $isVisible }) => $isVisible ? `0 0 ${SHADOW_SIZE_PX}px ${SHADOW_SIZE_PX}px var(--wui-color-drop-shadow)` : "none"};
|
|
15434
|
-
z-index: 1;
|
|
15435
|
-
`;
|
|
15436
|
-
const ShadowAtTop = styled(Shadow)`
|
|
15437
|
-
transform: translateY(-${SHADOW_SIZE_PX}px);
|
|
15438
|
-
height: 0;
|
|
15439
|
-
left: 0;
|
|
15440
|
-
right: 0;
|
|
15441
|
-
top: 0;
|
|
15442
|
-
`;
|
|
15443
|
-
const ShadowAtBottom = styled(Shadow)`
|
|
15444
|
-
transform: translateY(${SHADOW_SIZE_PX}px);
|
|
15445
|
-
bottom: 0;
|
|
15446
|
-
height: 0;
|
|
15447
|
-
left: 0;
|
|
15448
|
-
right: 0;
|
|
15449
|
-
`;
|
|
15450
|
-
const ShadowAtLeft = styled(Shadow)`
|
|
15451
|
-
transform: translateX(-${SHADOW_SIZE_PX}px);
|
|
15452
|
-
bottom: 0;
|
|
15453
|
-
left: 0;
|
|
15454
|
-
top: 0;
|
|
15455
|
-
width: 0;
|
|
15456
|
-
`;
|
|
15457
|
-
const ShadowAtRight = styled(Shadow)`
|
|
15458
|
-
transform: translateX(${SHADOW_SIZE_PX}px);
|
|
15459
|
-
bottom: 0;
|
|
15460
|
-
right: 0;
|
|
15461
|
-
top: 0;
|
|
15462
|
-
width: 0;
|
|
15463
|
-
`;
|
|
15464
|
-
/**
|
|
15465
|
-
* ScrollArea is a simple scrollable container with shadow effects to indicate
|
|
15466
|
-
* scrollability.
|
|
15467
|
-
*/
|
|
15468
|
-
const ScrollArea = ({ children, onScroll, style, locked = false, ref: forwardedRef, ...props }) => {
|
|
15469
|
-
const scrollContainerRefInternal = useRef(null);
|
|
15470
|
-
const [shadowState, setShadowState] = useState({
|
|
15471
|
-
canScrollUp: false,
|
|
15472
|
-
canScrollLeft: false,
|
|
15473
|
-
canScrollDown: false,
|
|
15474
|
-
canScrollRight: false
|
|
15475
|
-
});
|
|
15476
|
-
const scrollContainerRef = mergeRefs([scrollContainerRefInternal, forwardedRef]);
|
|
15477
|
-
const updateShadows = useCallback(() => {
|
|
15478
|
-
const scrollContainer = scrollContainerRefInternal.current;
|
|
15479
|
-
if (!scrollContainer) return;
|
|
15480
|
-
setShadowState({
|
|
15481
|
-
canScrollUp: scrollContainer.scrollTop > 0,
|
|
15482
|
-
canScrollLeft: scrollContainer.scrollLeft > 0,
|
|
15483
|
-
canScrollDown: scrollContainer.scrollTop + scrollContainer.clientHeight < scrollContainer.scrollHeight,
|
|
15484
|
-
canScrollRight: scrollContainer.scrollLeft + scrollContainer.clientWidth < scrollContainer.scrollWidth
|
|
15485
|
-
});
|
|
15486
|
-
}, []);
|
|
15487
|
-
const throttledUpdateShadows = useMemo(() => throttle(100, updateShadows), [updateShadows]);
|
|
15488
|
-
const onScrollScrollContainer = useCallback((event) => {
|
|
15489
|
-
onScroll?.(event);
|
|
15490
|
-
throttledUpdateShadows();
|
|
15491
|
-
}, [onScroll, throttledUpdateShadows]);
|
|
15492
|
-
useEffect(() => {
|
|
15493
|
-
updateShadows();
|
|
15494
|
-
}, [updateShadows]);
|
|
15495
|
-
return /* @__PURE__ */ jsxs(Container, {
|
|
15496
|
-
style,
|
|
15497
|
-
children: [
|
|
15498
|
-
/* @__PURE__ */ jsx(ShadowAtTop, { $isVisible: shadowState.canScrollUp }),
|
|
15499
|
-
/* @__PURE__ */ jsx(ShadowAtBottom, { $isVisible: shadowState.canScrollDown }),
|
|
15500
|
-
/* @__PURE__ */ jsx(ShadowAtLeft, { $isVisible: shadowState.canScrollLeft }),
|
|
15501
|
-
/* @__PURE__ */ jsx(ShadowAtRight, { $isVisible: shadowState.canScrollRight }),
|
|
15502
|
-
/* @__PURE__ */ jsx(ScrollContainer, {
|
|
15503
|
-
ref: scrollContainerRef,
|
|
15504
|
-
$locked: locked,
|
|
15505
|
-
onScroll: onScrollScrollContainer,
|
|
15506
|
-
...props,
|
|
15507
|
-
children
|
|
15508
|
-
})
|
|
15509
|
-
]
|
|
15510
|
-
});
|
|
15511
|
-
};
|
|
15512
|
-
//#endregion
|
|
15513
15718
|
//#region src/components/SegmentedControl/useSegmentedControlValue.tsx
|
|
15514
15719
|
const SegmentedControlValueContext = createContext(null);
|
|
15515
15720
|
const SegmentedControlValueProvider = SegmentedControlValueContext;
|
|
@@ -17042,6 +17247,6 @@ const WistiaLogo = ({ description, height = 100, hoverColor, href, iconOnly = fa
|
|
|
17042
17247
|
};
|
|
17043
17248
|
WistiaLogo.displayName = "WistiaLogo_UI";
|
|
17044
17249
|
//#endregion
|
|
17045
|
-
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, ContrastEnforcerSwitch, ContrastIndicator, ContrastPreview, CustomizableThemeWrapper, DOCUMENT_COLOR_MODE_ATTRIBUTE, DataCard, DataCardHoverArrow, DataCardTrend, DataCards, DataList, DataListItem, DataListItemLabel, DataListItemValue, DatePicker, Dimmer, 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, InputDuration, 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, Sidebar, SidebarButton, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarHeader, SidebarSearchInput, SidebarTitle, 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, buildTimeDuration, calculateContrast, coerceToBoolean, colorModeOptions, colorSchemeOptions, copyToClipboard, dateOnlyISOString, dateOnlyString, dateOnlyStringForSentence, dateOnlyStringNumeric, dateTime, dateTimeRounded, dateTimeString, dateTimeStringForSentence, dateTimeToDate, dateTimeToISO, dateToDateTime, dateUTCOffset, dayOfWeekString, documentColorModeOptions, getBackgroundGradient, getDocumentColorMode, getSemiRandomBackgroundGradient, iconSizeMap, isKeyboardKey, isUrl, mediaDurationString, mergeRefs, millisecondsToDurationISOString, monthDayStringNumeric, mq, parseDateString, sessionDurationString, setDocumentColorMode, stripExtension, timeAgoString, timeOnlyString, useActiveMq, useAriaLive, useBoolean, useClipboard, useDocumentColorMode, useElementObserver, useFilePicker, useFocusTrap, useForceUpdate, useFormState, useImperativeFilePicker, useIsHovered, useKey, useKeyPress, useLocalStorage, useLockBodyScroll, useMq, useOnClickOutside, usePreviousValue, useToast, useWindowSize, validateWithYup };
|
|
17250
|
+
export { ActionButton, Avatar, Badge, Banner, Box, Breadcrumb, Breadcrumbs, Button, ButtonGroup, Card, Center, Checkbox, CheckboxCard, CheckboxGroup, CheckboxMenuItem, ClickRegion, Collapsible, CollapsibleContent, CollapsibleTrigger, CollapsibleTriggerIcon, ColorGrid, ColorGridOption, ColorList, ColorListGroup, ColorListOption, ColorPicker, ColorPickerPopoverContent, ColorPickerSection, ColorPickerTrigger, ColorSchemeWrapper, Combobox, ComboboxOption, ContextMenu, ContrastControls, ContrastEnforcerSwitch, ContrastIndicator, ContrastPreview, CustomizableThemeWrapper, DOCUMENT_COLOR_MODE_ATTRIBUTE, DataCard, DataCardHoverArrow, DataCardTrend, DataCards, DataList, DataListItem, DataListItemLabel, DataListItemValue, DatePicker, Dimmer, 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, InputDuration, 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, Sidebar, SidebarButton, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarHeader, SidebarSearchInput, SidebarTitle, 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, buildTimeDuration, calculateContrast, coerceToBoolean, colorModeOptions, colorSchemeOptions, copyToClipboard, dateOnlyISOString, dateOnlyString, dateOnlyStringForSentence, dateOnlyStringNumeric, dateTime, dateTimeRounded, dateTimeString, dateTimeStringForSentence, dateTimeToDate, dateTimeToISO, dateToDateTime, dateUTCOffset, dayOfWeekString, documentColorModeOptions, getBackgroundGradient, getDocumentColorMode, getSemiRandomBackgroundGradient, iconSizeMap, isKeyboardKey, isUrl, mediaDurationString, mergeRefs, millisecondsToDurationISOString, monthDayStringNumeric, mq, parseDateString, sessionDurationString, setDocumentColorMode, stripExtension, timeAgoString, timeOnlyString, useActiveMq, useAriaLive, useBoolean, useClipboard, useDocumentColorMode, useElementObserver, useFilePicker, useFocusTrap, useForceUpdate, useFormState, useImperativeFilePicker, useIsHovered, useKey, useKeyPress, useLocalStorage, useLockBodyScroll, useMq, useOnClickOutside, usePreviousValue, useToast, useWindowSize, validateWithYup };
|
|
17046
17251
|
|
|
17047
17252
|
//# sourceMappingURL=index.js.map
|