@tinybigui/react 0.17.0 → 0.19.0
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/README.md +16 -16
- package/dist/index.cjs +746 -766
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +356 -108
- package/dist/index.d.ts +356 -108
- package/dist/index.js +732 -766
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8611,6 +8611,30 @@ var InteractiveStyledListItem = forwardRef(
|
|
|
8611
8611
|
}
|
|
8612
8612
|
);
|
|
8613
8613
|
InteractiveStyledListItem.displayName = "InteractiveStyledListItem";
|
|
8614
|
+
var ArrowBackIcon = () => /* @__PURE__ */ jsx(
|
|
8615
|
+
"svg",
|
|
8616
|
+
{
|
|
8617
|
+
width: "24",
|
|
8618
|
+
height: "24",
|
|
8619
|
+
viewBox: "0 0 24 24",
|
|
8620
|
+
fill: "currentColor",
|
|
8621
|
+
"aria-hidden": "true",
|
|
8622
|
+
focusable: "false",
|
|
8623
|
+
children: /* @__PURE__ */ jsx("path", { d: "M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" })
|
|
8624
|
+
}
|
|
8625
|
+
);
|
|
8626
|
+
var CloseIcon3 = () => /* @__PURE__ */ jsx(
|
|
8627
|
+
"svg",
|
|
8628
|
+
{
|
|
8629
|
+
width: "24",
|
|
8630
|
+
height: "24",
|
|
8631
|
+
viewBox: "0 0 24 24",
|
|
8632
|
+
fill: "currentColor",
|
|
8633
|
+
"aria-hidden": "true",
|
|
8634
|
+
focusable: "false",
|
|
8635
|
+
children: /* @__PURE__ */ jsx("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" })
|
|
8636
|
+
}
|
|
8637
|
+
);
|
|
8614
8638
|
var SearchBarHeadless = forwardRef(
|
|
8615
8639
|
({
|
|
8616
8640
|
value,
|
|
@@ -8626,7 +8650,9 @@ var SearchBarHeadless = forwardRef(
|
|
|
8626
8650
|
"aria-label": ariaLabel,
|
|
8627
8651
|
className,
|
|
8628
8652
|
onFocus,
|
|
8629
|
-
onBlur
|
|
8653
|
+
onBlur,
|
|
8654
|
+
inputClassName,
|
|
8655
|
+
trailingActionsClassName
|
|
8630
8656
|
}, forwardedRef) => {
|
|
8631
8657
|
const inputRef = useRef(null);
|
|
8632
8658
|
const internalFormRef = useRef(null);
|
|
@@ -8660,8 +8686,17 @@ var SearchBarHeadless = forwardRef(
|
|
|
8660
8686
|
);
|
|
8661
8687
|
return /* @__PURE__ */ jsxs("form", { ref: formRef, role: "search", className, onSubmit: handleFormSubmit, children: [
|
|
8662
8688
|
leadingIcon && /* @__PURE__ */ jsx("span", { "data-slot": "leading-icon", children: leadingIcon }),
|
|
8663
|
-
/* @__PURE__ */ jsx(
|
|
8664
|
-
|
|
8689
|
+
/* @__PURE__ */ jsx(
|
|
8690
|
+
"input",
|
|
8691
|
+
{
|
|
8692
|
+
...inputProps,
|
|
8693
|
+
ref: inputRef,
|
|
8694
|
+
role: "searchbox",
|
|
8695
|
+
"data-slot": "input",
|
|
8696
|
+
className: inputClassName
|
|
8697
|
+
}
|
|
8698
|
+
),
|
|
8699
|
+
trailingActions && trailingActions.length > 0 && /* @__PURE__ */ jsx("span", { "data-slot": "trailing-actions", className: trailingActionsClassName, children: trailingActions }),
|
|
8665
8700
|
avatar && /* @__PURE__ */ jsx("span", { "data-slot": "avatar", children: avatar })
|
|
8666
8701
|
] });
|
|
8667
8702
|
}
|
|
@@ -8681,32 +8716,45 @@ var SearchViewHeadless = forwardRef(
|
|
|
8681
8716
|
children,
|
|
8682
8717
|
leadingIcon,
|
|
8683
8718
|
trailingActions,
|
|
8684
|
-
showDivider
|
|
8719
|
+
showDivider,
|
|
8720
|
+
layout = "fullscreen",
|
|
8721
|
+
headerClassName,
|
|
8722
|
+
backButtonClassName,
|
|
8723
|
+
clearButtonClassName,
|
|
8724
|
+
inputClassName,
|
|
8725
|
+
trailingActionsClassName,
|
|
8726
|
+
dividerClassName,
|
|
8727
|
+
contentClassName
|
|
8685
8728
|
}, forwardedRef) => {
|
|
8686
8729
|
if (!isOpen) {
|
|
8687
8730
|
return null;
|
|
8688
8731
|
}
|
|
8689
|
-
|
|
8690
|
-
|
|
8691
|
-
|
|
8692
|
-
|
|
8693
|
-
|
|
8694
|
-
|
|
8695
|
-
|
|
8696
|
-
|
|
8697
|
-
|
|
8698
|
-
|
|
8699
|
-
|
|
8700
|
-
|
|
8701
|
-
|
|
8702
|
-
|
|
8703
|
-
|
|
8704
|
-
|
|
8705
|
-
|
|
8706
|
-
|
|
8707
|
-
|
|
8708
|
-
|
|
8709
|
-
|
|
8732
|
+
const panelProps = {
|
|
8733
|
+
onClose,
|
|
8734
|
+
ariaLabel,
|
|
8735
|
+
layout,
|
|
8736
|
+
children,
|
|
8737
|
+
...className !== void 0 ? { className } : {},
|
|
8738
|
+
...leadingIcon !== void 0 ? { leadingIcon } : {},
|
|
8739
|
+
...trailingActions !== void 0 ? { trailingActions } : {},
|
|
8740
|
+
...showDivider !== void 0 ? { showDivider } : {},
|
|
8741
|
+
...value !== void 0 ? { value } : {},
|
|
8742
|
+
...defaultValue !== void 0 ? { defaultValue } : {},
|
|
8743
|
+
...onChange !== void 0 ? { onChange } : {},
|
|
8744
|
+
...onSubmit !== void 0 ? { onSubmit } : {},
|
|
8745
|
+
...placeholder !== void 0 ? { placeholder } : {},
|
|
8746
|
+
headerClassName,
|
|
8747
|
+
backButtonClassName,
|
|
8748
|
+
clearButtonClassName,
|
|
8749
|
+
inputClassName,
|
|
8750
|
+
trailingActionsClassName,
|
|
8751
|
+
dividerClassName,
|
|
8752
|
+
contentClassName
|
|
8753
|
+
};
|
|
8754
|
+
if (layout === "docked") {
|
|
8755
|
+
return /* @__PURE__ */ jsx(SearchViewPanel, { ref: forwardedRef, ...panelProps });
|
|
8756
|
+
}
|
|
8757
|
+
return createPortal(/* @__PURE__ */ jsx(SearchViewPanel, { ref: forwardedRef, ...panelProps }), document.body);
|
|
8710
8758
|
}
|
|
8711
8759
|
);
|
|
8712
8760
|
SearchViewHeadless.displayName = "SearchViewHeadless";
|
|
@@ -8723,12 +8771,21 @@ var SearchViewPanel = forwardRef(
|
|
|
8723
8771
|
children,
|
|
8724
8772
|
leadingIcon,
|
|
8725
8773
|
trailingActions,
|
|
8726
|
-
showDivider
|
|
8774
|
+
showDivider,
|
|
8775
|
+
layout,
|
|
8776
|
+
headerClassName,
|
|
8777
|
+
backButtonClassName,
|
|
8778
|
+
clearButtonClassName,
|
|
8779
|
+
inputClassName,
|
|
8780
|
+
trailingActionsClassName,
|
|
8781
|
+
dividerClassName,
|
|
8782
|
+
contentClassName
|
|
8727
8783
|
}, forwardedRef) => {
|
|
8728
8784
|
const panelRef = useRef(null);
|
|
8729
8785
|
const inputRef = useRef(null);
|
|
8730
8786
|
const ref = forwardedRef ?? panelRef;
|
|
8731
|
-
|
|
8787
|
+
const isFullscreen = layout === "fullscreen";
|
|
8788
|
+
usePreventScroll({ isDisabled: !isFullscreen });
|
|
8732
8789
|
const { overlayProps } = useOverlay(
|
|
8733
8790
|
{
|
|
8734
8791
|
isOpen: true,
|
|
@@ -8761,7 +8818,17 @@ var SearchViewPanel = forwardRef(
|
|
|
8761
8818
|
const handleBackClick = useCallback(() => {
|
|
8762
8819
|
onClose();
|
|
8763
8820
|
}, [onClose]);
|
|
8764
|
-
const
|
|
8821
|
+
const defaultBackButton = /* @__PURE__ */ jsx(
|
|
8822
|
+
"button",
|
|
8823
|
+
{
|
|
8824
|
+
type: "button",
|
|
8825
|
+
"aria-label": "Back",
|
|
8826
|
+
onClick: handleBackClick,
|
|
8827
|
+
"data-slot": "back-button",
|
|
8828
|
+
className: backButtonClassName,
|
|
8829
|
+
children: /* @__PURE__ */ jsx(ArrowBackIcon, {})
|
|
8830
|
+
}
|
|
8831
|
+
);
|
|
8765
8832
|
const clearButton = state.value ? /* @__PURE__ */ jsx(
|
|
8766
8833
|
"button",
|
|
8767
8834
|
{
|
|
@@ -8770,66 +8837,109 @@ var SearchViewPanel = forwardRef(
|
|
|
8770
8837
|
type: "button",
|
|
8771
8838
|
"aria-label": "Clear search",
|
|
8772
8839
|
"data-slot": "clear-button",
|
|
8773
|
-
|
|
8840
|
+
className: clearButtonClassName,
|
|
8841
|
+
children: /* @__PURE__ */ jsx(CloseIcon3, {})
|
|
8774
8842
|
}
|
|
8775
8843
|
) : null;
|
|
8776
|
-
return
|
|
8777
|
-
|
|
8778
|
-
|
|
8779
|
-
|
|
8780
|
-
|
|
8781
|
-
|
|
8782
|
-
|
|
8783
|
-
|
|
8784
|
-
|
|
8785
|
-
|
|
8844
|
+
return (
|
|
8845
|
+
// Focus containment only for fullscreen — docked uses restoreFocus + autoFocus only
|
|
8846
|
+
// so tabbing can naturally leave the widget.
|
|
8847
|
+
/* @__PURE__ */ jsx(FocusScope, { contain: isFullscreen, restoreFocus: true, autoFocus: true, children: /* @__PURE__ */ jsxs("div", { ...overlayProps, ref, role: "search", "aria-label": ariaLabel, className, children: [
|
|
8848
|
+
/* @__PURE__ */ jsxs("div", { "data-slot": "header", className: headerClassName, children: [
|
|
8849
|
+
leadingIcon ?? defaultBackButton,
|
|
8850
|
+
/* @__PURE__ */ jsx(
|
|
8851
|
+
"input",
|
|
8852
|
+
{
|
|
8853
|
+
...inputProps,
|
|
8854
|
+
ref: inputRef,
|
|
8855
|
+
role: "searchbox",
|
|
8856
|
+
"data-slot": "input",
|
|
8857
|
+
className: inputClassName
|
|
8858
|
+
}
|
|
8859
|
+
),
|
|
8860
|
+
clearButton,
|
|
8861
|
+
trailingActions && trailingActions.length > 0 && /* @__PURE__ */ jsx("span", { "data-slot": "trailing-actions", className: trailingActionsClassName, children: trailingActions })
|
|
8862
|
+
] }),
|
|
8863
|
+
showDivider && /* @__PURE__ */ jsx("hr", { "data-slot": "divider", className: dividerClassName }),
|
|
8864
|
+
/* @__PURE__ */ jsx("div", { "data-slot": "content", "aria-live": "polite", className: contentClassName, children })
|
|
8865
|
+
] }) })
|
|
8866
|
+
);
|
|
8786
8867
|
}
|
|
8787
8868
|
);
|
|
8788
8869
|
SearchViewPanel.displayName = "SearchViewPanel";
|
|
8789
|
-
var
|
|
8870
|
+
var searchBarRootVariants = cva(
|
|
8790
8871
|
[
|
|
8791
|
-
"relative flex items-center h-14 rounded-full
|
|
8792
|
-
"
|
|
8872
|
+
"relative flex items-center h-14 rounded-full",
|
|
8873
|
+
"bg-surface-container-high shadow-elevation-3",
|
|
8874
|
+
"w-full text-body-large cursor-text",
|
|
8875
|
+
// Disabled — self-targeting; pointer-events lets ripple/hover stop cleanly
|
|
8876
|
+
"data-[disabled]:opacity-38 data-[disabled]:pointer-events-none data-[disabled]:cursor-not-allowed"
|
|
8793
8877
|
],
|
|
8794
8878
|
{
|
|
8795
8879
|
variants: {
|
|
8880
|
+
/**
|
|
8881
|
+
* Visual style of the search bar.
|
|
8882
|
+
* - contained: M3 Expressive — fills container, expressive motion, adjustable spacing
|
|
8883
|
+
* - divided: Baseline — 16dp fixed spacing, no expressive motion
|
|
8884
|
+
*/
|
|
8796
8885
|
style: {
|
|
8797
|
-
|
|
8886
|
+
/**
|
|
8887
|
+
* Contained (Expressive): spacing governed by data-[with-actions] content flag.
|
|
8888
|
+
* With actions: px-1 gap-1 (4dp each)
|
|
8889
|
+
* Without actions: px-4 (16dp each)
|
|
8890
|
+
*/
|
|
8891
|
+
contained: [
|
|
8892
|
+
"px-4",
|
|
8893
|
+
// default: no-actions 16dp
|
|
8894
|
+
"data-[with-actions]:px-1 data-[with-actions]:gap-1"
|
|
8895
|
+
// with-actions: 4dp
|
|
8896
|
+
],
|
|
8897
|
+
/**
|
|
8898
|
+
* Divided (Baseline): fixed 16dp side padding, 16dp icon-label gap.
|
|
8899
|
+
*/
|
|
8798
8900
|
divided: "px-4 gap-4"
|
|
8799
|
-
},
|
|
8800
|
-
noActions: {
|
|
8801
|
-
true: "",
|
|
8802
|
-
false: ""
|
|
8803
|
-
},
|
|
8804
|
-
focused: {
|
|
8805
|
-
true: "",
|
|
8806
|
-
false: ""
|
|
8807
|
-
},
|
|
8808
|
-
disabled: {
|
|
8809
|
-
true: "opacity-38 pointer-events-none",
|
|
8810
|
-
false: ""
|
|
8811
8901
|
}
|
|
8812
8902
|
},
|
|
8813
|
-
|
|
8814
|
-
{
|
|
8815
|
-
style: "contained",
|
|
8816
|
-
noActions: false,
|
|
8817
|
-
class: "px-1 gap-1"
|
|
8818
|
-
},
|
|
8819
|
-
{
|
|
8820
|
-
style: "contained",
|
|
8821
|
-
noActions: true,
|
|
8822
|
-
class: "px-4"
|
|
8823
|
-
}
|
|
8824
|
-
],
|
|
8825
|
-
defaultVariants: {
|
|
8826
|
-
style: "contained",
|
|
8827
|
-
noActions: false,
|
|
8828
|
-
focused: false,
|
|
8829
|
-
disabled: false
|
|
8830
|
-
}
|
|
8903
|
+
defaultVariants: { style: "contained" }
|
|
8831
8904
|
}
|
|
8832
8905
|
);
|
|
8906
|
+
var searchBarStateLayerVariants = cva([
|
|
8907
|
+
"absolute inset-0 rounded-full pointer-events-none opacity-0",
|
|
8908
|
+
"bg-on-surface",
|
|
8909
|
+
// Effects transition — no overshoot on opacity
|
|
8910
|
+
"transition-opacity duration-spring-standard-fast-effects ease-spring-standard-fast-effects",
|
|
8911
|
+
// Hover: 8%
|
|
8912
|
+
"group-data-[hovered]/search:opacity-8",
|
|
8913
|
+
// Pressed: 10%, doubled selector wins over hover at equal cascade position
|
|
8914
|
+
"group-data-[pressed]/search:group-data-[pressed]/search:opacity-10",
|
|
8915
|
+
// No state layer when disabled
|
|
8916
|
+
"group-data-[disabled]/search:hidden"
|
|
8917
|
+
]);
|
|
8918
|
+
var searchBarFocusRingVariants = cva([
|
|
8919
|
+
"pointer-events-none absolute inset-[-3px] rounded-full",
|
|
8920
|
+
"outline outline-[3px] outline-offset-0 outline-secondary",
|
|
8921
|
+
// Effects transition
|
|
8922
|
+
"transition-opacity duration-spring-standard-fast-effects ease-spring-standard-fast-effects",
|
|
8923
|
+
"opacity-0",
|
|
8924
|
+
"group-data-[focus-visible]/search:opacity-100"
|
|
8925
|
+
]);
|
|
8926
|
+
var searchBarLeadingIconVariants = cva([
|
|
8927
|
+
"flex size-12 shrink-0 items-center justify-center text-on-surface"
|
|
8928
|
+
]);
|
|
8929
|
+
var searchBarTrailingActionVariants = cva([
|
|
8930
|
+
"flex size-12 shrink-0 items-center justify-center text-on-surface-variant"
|
|
8931
|
+
]);
|
|
8932
|
+
var searchBarAvatarVariants = cva(["flex size-12 shrink-0 items-center justify-center"]);
|
|
8933
|
+
var searchBarTrailingActionsVariants = cva(["flex items-center"]);
|
|
8934
|
+
var searchBarInputVariants = cva([
|
|
8935
|
+
"flex-1 min-w-0 bg-transparent outline-none",
|
|
8936
|
+
"text-body-large text-on-surface",
|
|
8937
|
+
"placeholder:text-on-surface-variant",
|
|
8938
|
+
"focus-visible:outline-none",
|
|
8939
|
+
// Hide native browser search affordances — our MD3 clear button handles clearing
|
|
8940
|
+
"[&::-webkit-search-cancel-button]:appearance-none",
|
|
8941
|
+
"[&::-webkit-search-decoration]:appearance-none"
|
|
8942
|
+
]);
|
|
8833
8943
|
var searchViewVariants = cva(["flex flex-col shadow-elevation-3 z-50 overflow-hidden"], {
|
|
8834
8944
|
variants: {
|
|
8835
8945
|
style: {
|
|
@@ -8842,31 +8952,32 @@ var searchViewVariants = cva(["flex flex-col shadow-elevation-3 z-50 overflow-hi
|
|
|
8842
8952
|
}
|
|
8843
8953
|
},
|
|
8844
8954
|
compoundVariants: [
|
|
8955
|
+
// Contained + fullscreen: surface-container-low, square corners
|
|
8845
8956
|
{
|
|
8846
8957
|
style: "contained",
|
|
8847
8958
|
layout: "fullscreen",
|
|
8848
8959
|
class: "bg-surface-container-low rounded-none"
|
|
8849
8960
|
},
|
|
8961
|
+
// Contained + docked: surface-container-high, 12dp results rounding, 2dp gap
|
|
8850
8962
|
{
|
|
8851
8963
|
style: "contained",
|
|
8852
8964
|
layout: "docked",
|
|
8853
8965
|
class: "bg-surface-container-high rounded-xl gap-0.5"
|
|
8854
8966
|
},
|
|
8967
|
+
// Divided + fullscreen: surface-container-high, square corners
|
|
8855
8968
|
{
|
|
8856
8969
|
style: "divided",
|
|
8857
8970
|
layout: "fullscreen",
|
|
8858
8971
|
class: "bg-surface-container-high rounded-none"
|
|
8859
8972
|
},
|
|
8973
|
+
// Divided + docked: surface-container-high, extra-large rounding (28dp)
|
|
8860
8974
|
{
|
|
8861
8975
|
style: "divided",
|
|
8862
8976
|
layout: "docked",
|
|
8863
8977
|
class: "bg-surface-container-high rounded-[28px]"
|
|
8864
8978
|
}
|
|
8865
8979
|
],
|
|
8866
|
-
defaultVariants: {
|
|
8867
|
-
style: "contained",
|
|
8868
|
-
layout: "fullscreen"
|
|
8869
|
-
}
|
|
8980
|
+
defaultVariants: { style: "contained", layout: "fullscreen" }
|
|
8870
8981
|
});
|
|
8871
8982
|
var searchViewHeaderVariants = cva(
|
|
8872
8983
|
["flex items-center w-full bg-surface-container-high gap-1"],
|
|
@@ -8877,14 +8988,50 @@ var searchViewHeaderVariants = cva(
|
|
|
8877
8988
|
divided: "h-[72px] px-4"
|
|
8878
8989
|
},
|
|
8879
8990
|
layout: {
|
|
8991
|
+
// Docked overrides height to 56dp regardless of style
|
|
8880
8992
|
docked: "h-14",
|
|
8881
8993
|
fullscreen: ""
|
|
8882
8994
|
}
|
|
8883
8995
|
},
|
|
8884
|
-
defaultVariants: {
|
|
8885
|
-
|
|
8886
|
-
|
|
8887
|
-
|
|
8996
|
+
defaultVariants: { style: "contained", layout: "fullscreen" }
|
|
8997
|
+
}
|
|
8998
|
+
);
|
|
8999
|
+
var searchViewBackButtonVariants = cva([
|
|
9000
|
+
"flex size-12 shrink-0 items-center justify-center",
|
|
9001
|
+
"text-on-surface rounded-full",
|
|
9002
|
+
"cursor-pointer"
|
|
9003
|
+
]);
|
|
9004
|
+
var searchViewClearButtonVariants = cva([
|
|
9005
|
+
"flex size-12 shrink-0 items-center justify-center",
|
|
9006
|
+
"text-on-surface-variant rounded-full",
|
|
9007
|
+
"cursor-pointer",
|
|
9008
|
+
"transition-opacity duration-spring-standard-fast-effects ease-spring-standard-fast-effects"
|
|
9009
|
+
]);
|
|
9010
|
+
var searchViewTrailingActionVariants = cva([
|
|
9011
|
+
"flex size-12 shrink-0 items-center justify-center text-on-surface-variant"
|
|
9012
|
+
]);
|
|
9013
|
+
var searchViewTrailingActionsVariants = cva(["flex items-center"]);
|
|
9014
|
+
var searchViewInputVariants = cva([
|
|
9015
|
+
"flex-1 min-w-0 bg-transparent outline-none",
|
|
9016
|
+
"text-body-large text-on-surface",
|
|
9017
|
+
"placeholder:text-on-surface-variant",
|
|
9018
|
+
"focus-visible:outline-none",
|
|
9019
|
+
// Hide native browser search affordances
|
|
9020
|
+
"[&::-webkit-search-cancel-button]:appearance-none",
|
|
9021
|
+
"[&::-webkit-search-decoration]:appearance-none"
|
|
9022
|
+
]);
|
|
9023
|
+
var searchViewDividerVariants = cva(["border-t border-outline w-full"]);
|
|
9024
|
+
var searchViewContentVariants = cva(["flex-1 overflow-y-auto"]);
|
|
9025
|
+
var DefaultSearchIcon = () => /* @__PURE__ */ jsx(
|
|
9026
|
+
"svg",
|
|
9027
|
+
{
|
|
9028
|
+
width: "24",
|
|
9029
|
+
height: "24",
|
|
9030
|
+
viewBox: "0 0 24 24",
|
|
9031
|
+
fill: "currentColor",
|
|
9032
|
+
"aria-hidden": "true",
|
|
9033
|
+
focusable: "false",
|
|
9034
|
+
children: /* @__PURE__ */ jsx("path", { d: "M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" })
|
|
8888
9035
|
}
|
|
8889
9036
|
);
|
|
8890
9037
|
var SearchBar = forwardRef(
|
|
@@ -8905,7 +9052,7 @@ var SearchBar = forwardRef(
|
|
|
8905
9052
|
onFocus,
|
|
8906
9053
|
onBlur
|
|
8907
9054
|
}, ref) => {
|
|
8908
|
-
const
|
|
9055
|
+
const hasActions = trailingActions != null && trailingActions.length > 0 || !!avatar;
|
|
8909
9056
|
const reducedMotion = useReducedMotion();
|
|
8910
9057
|
const [isFocused, setIsFocused] = useState(false);
|
|
8911
9058
|
const handleFocusInternal = useCallback(() => {
|
|
@@ -8916,83 +9063,85 @@ var SearchBar = forwardRef(
|
|
|
8916
9063
|
setIsFocused(false);
|
|
8917
9064
|
onBlur?.();
|
|
8918
9065
|
}, [onBlur]);
|
|
8919
|
-
const {
|
|
8920
|
-
|
|
8921
|
-
|
|
8922
|
-
const
|
|
8923
|
-
const
|
|
8924
|
-
|
|
8925
|
-
|
|
8926
|
-
|
|
8927
|
-
children: action
|
|
9066
|
+
const { isHovered, hoverProps } = useHover({ isDisabled });
|
|
9067
|
+
const { isFocusVisible, focusProps } = useFocusRing({ within: true });
|
|
9068
|
+
const [isPressed, setIsPressed] = useState(false);
|
|
9069
|
+
const { onMouseDown: handleRipple, ripples } = useRipple({ disabled: isDisabled });
|
|
9070
|
+
const handleMouseDown = useCallback(
|
|
9071
|
+
(e) => {
|
|
9072
|
+
setIsPressed(true);
|
|
9073
|
+
handleRipple(e);
|
|
8928
9074
|
},
|
|
8929
|
-
|
|
8930
|
-
)
|
|
8931
|
-
const
|
|
9075
|
+
[handleRipple]
|
|
9076
|
+
);
|
|
9077
|
+
const handleMouseUp = useCallback(() => setIsPressed(false), []);
|
|
9078
|
+
const styledLeadingIcon = /* @__PURE__ */ jsx("span", { className: cn(searchBarLeadingIconVariants()), children: /* @__PURE__ */ jsx("span", { className: "size-6", children: leadingIcon ?? /* @__PURE__ */ jsx(DefaultSearchIcon, {}) }) });
|
|
9079
|
+
const styledTrailingActions = trailingActions?.map((action, index) => /* @__PURE__ */ jsx("span", { className: cn(searchBarTrailingActionVariants()), children: action }, index));
|
|
9080
|
+
const styledAvatar = avatar ? /* @__PURE__ */ jsx("span", { className: cn(searchBarAvatarVariants()), children: /* @__PURE__ */ jsx("span", { className: "size-[30px] overflow-hidden rounded-full", children: avatar }) }) : void 0;
|
|
9081
|
+
const paneMarginClass = searchStyle === "contained" ? isFocused ? "mx-3" : "mx-6" : "";
|
|
9082
|
+
const paneTransitionClass = searchStyle === "contained" && !reducedMotion ? "transition-[margin] duration-expressive-fast-spatial ease-expressive-fast-spatial" : "";
|
|
8932
9083
|
return /* @__PURE__ */ jsx(
|
|
8933
9084
|
"div",
|
|
8934
9085
|
{
|
|
8935
|
-
|
|
8936
|
-
|
|
8937
|
-
|
|
8938
|
-
|
|
8939
|
-
children: /* @__PURE__ */ jsxs(
|
|
8940
|
-
"
|
|
8941
|
-
|
|
8942
|
-
|
|
8943
|
-
|
|
8944
|
-
|
|
8945
|
-
|
|
8946
|
-
|
|
8947
|
-
|
|
8948
|
-
|
|
8949
|
-
|
|
9086
|
+
role: "presentation",
|
|
9087
|
+
...mergeProps$1(hoverProps, focusProps),
|
|
9088
|
+
className: cn(paneTransitionClass, paneMarginClass),
|
|
9089
|
+
onMouseUp: handleMouseUp,
|
|
9090
|
+
children: /* @__PURE__ */ jsxs("div", { role: "presentation", className: "relative", children: [
|
|
9091
|
+
/* @__PURE__ */ jsx("span", { className: cn(searchBarFocusRingVariants()), "aria-hidden": "true" }),
|
|
9092
|
+
/* @__PURE__ */ jsxs(
|
|
9093
|
+
"div",
|
|
9094
|
+
{
|
|
9095
|
+
role: "presentation",
|
|
9096
|
+
...getInteractionDataAttributes({
|
|
9097
|
+
isHovered,
|
|
9098
|
+
isFocusVisible,
|
|
9099
|
+
isPressed,
|
|
9100
|
+
isDisabled
|
|
8950
9101
|
}),
|
|
8951
|
-
|
|
8952
|
-
|
|
8953
|
-
|
|
8954
|
-
|
|
8955
|
-
|
|
8956
|
-
"span",
|
|
8957
|
-
{
|
|
8958
|
-
"data-slot": "state-layer",
|
|
8959
|
-
className: cn(
|
|
8960
|
-
"bg-on-surface pointer-events-none absolute inset-0 rounded-full opacity-0",
|
|
8961
|
-
"group-hover:opacity-8 group-active:opacity-10",
|
|
8962
|
-
"duration-spring-standard-fast-effects ease-spring-standard-fast-effects transition-opacity"
|
|
8963
|
-
)
|
|
8964
|
-
}
|
|
8965
|
-
),
|
|
8966
|
-
/* @__PURE__ */ jsx(
|
|
8967
|
-
SearchBarHeadless,
|
|
8968
|
-
{
|
|
8969
|
-
ref,
|
|
8970
|
-
...value !== void 0 ? { value } : {},
|
|
8971
|
-
...defaultValue !== void 0 ? { defaultValue } : {},
|
|
8972
|
-
...onChange !== void 0 ? { onChange } : {},
|
|
8973
|
-
...onSubmit !== void 0 ? { onSubmit } : {},
|
|
8974
|
-
...onClear !== void 0 ? { onClear } : {},
|
|
8975
|
-
...placeholder !== void 0 ? { placeholder } : {},
|
|
8976
|
-
...styledLeadingIcon !== void 0 ? { leadingIcon: styledLeadingIcon } : {},
|
|
8977
|
-
...styledTrailingActions !== void 0 ? { trailingActions: styledTrailingActions } : {},
|
|
8978
|
-
...styledAvatar !== void 0 ? { avatar: styledAvatar } : {},
|
|
8979
|
-
...isDisabled !== void 0 ? { isDisabled } : {},
|
|
8980
|
-
...ariaLabel !== void 0 ? { "aria-label": ariaLabel } : {},
|
|
8981
|
-
onFocus: handleFocusInternal,
|
|
8982
|
-
onBlur: handleBlurInternal,
|
|
8983
|
-
className: cn(
|
|
8984
|
-
"relative z-0 flex h-full w-full items-center",
|
|
8985
|
-
"[&_input]:flex-1 [&_input]:bg-transparent [&_input]:outline-none",
|
|
8986
|
-
"[&_input]:text-body-large [&_input]:text-on-surface",
|
|
8987
|
-
"[&_input]:placeholder:text-on-surface-variant",
|
|
8988
|
-
"[&_input]:focus-visible:outline-none"
|
|
8989
|
-
)
|
|
8990
|
-
}
|
|
9102
|
+
"data-with-actions": hasActions ? "" : void 0,
|
|
9103
|
+
className: cn(
|
|
9104
|
+
"group/search overflow-hidden",
|
|
9105
|
+
searchBarRootVariants({ style: searchStyle }),
|
|
9106
|
+
className
|
|
8991
9107
|
),
|
|
8992
|
-
|
|
8993
|
-
|
|
8994
|
-
|
|
8995
|
-
|
|
9108
|
+
onMouseDown: (e) => handleMouseDown(e),
|
|
9109
|
+
children: [
|
|
9110
|
+
/* @__PURE__ */ jsx(
|
|
9111
|
+
"span",
|
|
9112
|
+
{
|
|
9113
|
+
"data-slot": "state-layer",
|
|
9114
|
+
className: cn(searchBarStateLayerVariants()),
|
|
9115
|
+
"aria-hidden": "true"
|
|
9116
|
+
}
|
|
9117
|
+
),
|
|
9118
|
+
ripples,
|
|
9119
|
+
/* @__PURE__ */ jsx(
|
|
9120
|
+
SearchBarHeadless,
|
|
9121
|
+
{
|
|
9122
|
+
ref,
|
|
9123
|
+
...value !== void 0 ? { value } : {},
|
|
9124
|
+
...defaultValue !== void 0 ? { defaultValue } : {},
|
|
9125
|
+
...onChange !== void 0 ? { onChange } : {},
|
|
9126
|
+
...onSubmit !== void 0 ? { onSubmit } : {},
|
|
9127
|
+
...onClear !== void 0 ? { onClear } : {},
|
|
9128
|
+
...placeholder !== void 0 ? { placeholder } : {},
|
|
9129
|
+
leadingIcon: styledLeadingIcon,
|
|
9130
|
+
...styledTrailingActions !== void 0 ? { trailingActions: styledTrailingActions } : {},
|
|
9131
|
+
...styledAvatar !== void 0 ? { avatar: styledAvatar } : {},
|
|
9132
|
+
isDisabled,
|
|
9133
|
+
...ariaLabel !== void 0 ? { "aria-label": ariaLabel } : {},
|
|
9134
|
+
onFocus: handleFocusInternal,
|
|
9135
|
+
onBlur: handleBlurInternal,
|
|
9136
|
+
className: "relative z-0 flex h-full w-full items-center",
|
|
9137
|
+
inputClassName: cn(searchBarInputVariants()),
|
|
9138
|
+
trailingActionsClassName: cn(searchBarTrailingActionsVariants())
|
|
9139
|
+
}
|
|
9140
|
+
)
|
|
9141
|
+
]
|
|
9142
|
+
}
|
|
9143
|
+
)
|
|
9144
|
+
] })
|
|
8996
9145
|
}
|
|
8997
9146
|
);
|
|
8998
9147
|
}
|
|
@@ -9017,21 +9166,29 @@ var SearchView = forwardRef(
|
|
|
9017
9166
|
showDivider
|
|
9018
9167
|
}, ref) => {
|
|
9019
9168
|
const resolvedShowDivider = showDivider ?? searchStyle === "divided";
|
|
9169
|
+
const enterMotionClass = layout === "docked" ? "animate-md-scale-in" : "animate-md-fade-in";
|
|
9170
|
+
const containerClass = cn(
|
|
9171
|
+
searchViewVariants({ style: searchStyle, layout }),
|
|
9172
|
+
enterMotionClass,
|
|
9173
|
+
className
|
|
9174
|
+
);
|
|
9175
|
+
const headerClass = cn(searchViewHeaderVariants({ style: searchStyle, layout }));
|
|
9176
|
+
const backButtonClass = cn(searchViewBackButtonVariants());
|
|
9177
|
+
const clearButtonClass = cn(searchViewClearButtonVariants());
|
|
9178
|
+
const trailingActionClass = cn(searchViewTrailingActionVariants());
|
|
9179
|
+
const trailingActionsGroupClass = cn(searchViewTrailingActionsVariants());
|
|
9180
|
+
const inputClass = cn(searchViewInputVariants());
|
|
9181
|
+
const dividerClass = cn(searchViewDividerVariants());
|
|
9182
|
+
const contentClass = cn(searchViewContentVariants());
|
|
9020
9183
|
const styledLeadingIcon = leadingIcon ? /* @__PURE__ */ jsx("span", { className: "text-on-surface flex size-12 shrink-0 items-center justify-center", children: leadingIcon }) : void 0;
|
|
9021
|
-
const styledTrailingActions = trailingActions?.map((action, index) => /* @__PURE__ */ jsx(
|
|
9022
|
-
"span",
|
|
9023
|
-
{
|
|
9024
|
-
className: "text-on-surface-variant flex size-12 shrink-0 items-center justify-center",
|
|
9025
|
-
children: action
|
|
9026
|
-
},
|
|
9027
|
-
index
|
|
9028
|
-
));
|
|
9184
|
+
const styledTrailingActions = trailingActions?.map((action, index) => /* @__PURE__ */ jsx("span", { className: trailingActionClass, children: action }, index));
|
|
9029
9185
|
return /* @__PURE__ */ jsx(
|
|
9030
9186
|
SearchViewHeadless,
|
|
9031
9187
|
{
|
|
9032
9188
|
ref,
|
|
9033
9189
|
isOpen,
|
|
9034
9190
|
onClose,
|
|
9191
|
+
layout,
|
|
9035
9192
|
...value !== void 0 ? { value } : {},
|
|
9036
9193
|
...defaultValue !== void 0 ? { defaultValue } : {},
|
|
9037
9194
|
...onChange !== void 0 ? { onChange } : {},
|
|
@@ -9041,53 +9198,20 @@ var SearchView = forwardRef(
|
|
|
9041
9198
|
...styledLeadingIcon !== void 0 ? { leadingIcon: styledLeadingIcon } : {},
|
|
9042
9199
|
...styledTrailingActions !== void 0 ? { trailingActions: styledTrailingActions } : {},
|
|
9043
9200
|
showDivider: resolvedShowDivider,
|
|
9044
|
-
className:
|
|
9045
|
-
|
|
9046
|
-
|
|
9047
|
-
|
|
9048
|
-
|
|
9049
|
-
|
|
9050
|
-
|
|
9201
|
+
className: containerClass,
|
|
9202
|
+
headerClassName: headerClass,
|
|
9203
|
+
backButtonClassName: backButtonClass,
|
|
9204
|
+
clearButtonClassName: clearButtonClass,
|
|
9205
|
+
inputClassName: inputClass,
|
|
9206
|
+
trailingActionsClassName: trailingActionsGroupClass,
|
|
9207
|
+
dividerClassName: dividerClass,
|
|
9208
|
+
contentClassName: contentClass,
|
|
9051
9209
|
children
|
|
9052
9210
|
}
|
|
9053
9211
|
);
|
|
9054
9212
|
}
|
|
9055
9213
|
);
|
|
9056
9214
|
SearchView.displayName = "SearchView";
|
|
9057
|
-
var slotClasses = cn(
|
|
9058
|
-
// Input styling
|
|
9059
|
-
"[&_input]:flex-1 [&_input]:bg-transparent [&_input]:outline-none",
|
|
9060
|
-
"[&_input]:text-body-large [&_input]:text-on-surface",
|
|
9061
|
-
"[&_input]:placeholder:text-on-surface-variant",
|
|
9062
|
-
// Divider
|
|
9063
|
-
"[&>[data-slot=divider]]:border-outline",
|
|
9064
|
-
// Content area
|
|
9065
|
-
"[&>[data-slot=content]]:flex-1 [&>[data-slot=content]]:overflow-y-auto",
|
|
9066
|
-
// Clear button
|
|
9067
|
-
"[&_[data-slot=clear-button]]:size-12 [&_[data-slot=clear-button]]:flex",
|
|
9068
|
-
"[&_[data-slot=clear-button]]:items-center [&_[data-slot=clear-button]]:justify-center",
|
|
9069
|
-
"[&_[data-slot=clear-button]]:text-on-surface-variant",
|
|
9070
|
-
"[&_[data-slot=clear-button]]:transition-opacity [&_[data-slot=clear-button]]:duration-short4",
|
|
9071
|
-
"[&_[data-slot=clear-button]]:ease-standard",
|
|
9072
|
-
// Back button
|
|
9073
|
-
"[&_[data-slot=back-button]]:size-12 [&_[data-slot=back-button]]:flex",
|
|
9074
|
-
"[&_[data-slot=back-button]]:items-center [&_[data-slot=back-button]]:justify-center",
|
|
9075
|
-
"[&_[data-slot=back-button]]:text-on-surface"
|
|
9076
|
-
);
|
|
9077
|
-
function getHeaderClasses(style, layout) {
|
|
9078
|
-
const base = "[&>[data-slot=header]]:flex [&>[data-slot=header]]:items-center [&>[data-slot=header]]:w-full [&>[data-slot=header]]:bg-surface-container-high [&>[data-slot=header]]:gap-1";
|
|
9079
|
-
if (layout === "docked") {
|
|
9080
|
-
return cn(
|
|
9081
|
-
base,
|
|
9082
|
-
"[&>[data-slot=header]]:h-14",
|
|
9083
|
-
style === "contained" ? "[&>[data-slot=header]]:px-3" : "[&>[data-slot=header]]:px-4"
|
|
9084
|
-
);
|
|
9085
|
-
}
|
|
9086
|
-
if (style === "contained") {
|
|
9087
|
-
return cn(base, "[&>[data-slot=header]]:h-14 [&>[data-slot=header]]:px-3");
|
|
9088
|
-
}
|
|
9089
|
-
return cn(base, "[&>[data-slot=header]]:h-[72px] [&>[data-slot=header]]:px-4");
|
|
9090
|
-
}
|
|
9091
9215
|
var Search = forwardRef(
|
|
9092
9216
|
({
|
|
9093
9217
|
isOpen: controlledIsOpen,
|
|
@@ -10285,9 +10409,12 @@ function SliderThumbInternal({
|
|
|
10285
10409
|
state,
|
|
10286
10410
|
trackRef,
|
|
10287
10411
|
isDisabled,
|
|
10412
|
+
orientation,
|
|
10288
10413
|
formatValue: formatValue2,
|
|
10289
10414
|
className,
|
|
10290
10415
|
"data-direction": dataDirection,
|
|
10416
|
+
renderContent,
|
|
10417
|
+
onDraggingChange,
|
|
10291
10418
|
...ariaProps
|
|
10292
10419
|
}) {
|
|
10293
10420
|
const inputRef = useRef(null);
|
|
@@ -10302,33 +10429,70 @@ function SliderThumbInternal({
|
|
|
10302
10429
|
state
|
|
10303
10430
|
);
|
|
10304
10431
|
const { isFocusVisible, focusProps } = useFocusRing();
|
|
10432
|
+
const { isHovered, hoverProps } = useHover({ isDisabled });
|
|
10433
|
+
useEffect(() => {
|
|
10434
|
+
onDraggingChange?.(isDragging);
|
|
10435
|
+
}, [isDragging, onDraggingChange]);
|
|
10305
10436
|
const currentValue = state.getThumbValue(index);
|
|
10306
10437
|
const ariaValueText = formatValue2 ? formatValue2(currentValue) : void 0;
|
|
10307
|
-
|
|
10438
|
+
const thumbPercent = state.getThumbPercent(index);
|
|
10439
|
+
const positionStyle = orientation === "horizontal" ? {
|
|
10440
|
+
position: "absolute",
|
|
10441
|
+
left: `${thumbPercent * 100}%`,
|
|
10442
|
+
top: "50%",
|
|
10443
|
+
transform: "translate(-50%, -50%)",
|
|
10444
|
+
zIndex: 10
|
|
10445
|
+
} : {
|
|
10446
|
+
position: "absolute",
|
|
10447
|
+
bottom: `${thumbPercent * 100}%`,
|
|
10448
|
+
left: "50%",
|
|
10449
|
+
transform: "translate(-50%, 50%)",
|
|
10450
|
+
zIndex: 10
|
|
10451
|
+
};
|
|
10452
|
+
const renderState = {
|
|
10453
|
+
index,
|
|
10454
|
+
value: currentValue,
|
|
10455
|
+
isDragging,
|
|
10456
|
+
isFocusVisible,
|
|
10457
|
+
isHovered,
|
|
10458
|
+
isDisabled
|
|
10459
|
+
};
|
|
10460
|
+
return /* @__PURE__ */ jsxs(
|
|
10308
10461
|
"div",
|
|
10309
10462
|
{
|
|
10310
|
-
...thumbProps,
|
|
10463
|
+
...mergeProps$1(thumbProps, hoverProps, { style: positionStyle }),
|
|
10464
|
+
"data-slot": "slider-thumb",
|
|
10311
10465
|
"data-dragging": isDragging || void 0,
|
|
10312
10466
|
"data-focused": isFocused || void 0,
|
|
10313
|
-
"data-focus-visible": isFocusVisible || void 0,
|
|
10314
|
-
"data-disabled": isDisabled || void 0,
|
|
10315
10467
|
...dataDirection !== void 0 ? { "data-direction": dataDirection } : {},
|
|
10468
|
+
...getInteractionDataAttributes({
|
|
10469
|
+
isHovered,
|
|
10470
|
+
isFocusVisible,
|
|
10471
|
+
isPressed: isDragging,
|
|
10472
|
+
isDisabled
|
|
10473
|
+
}),
|
|
10316
10474
|
className: cn(
|
|
10475
|
+
// Group scope: interaction selectors on children target this element
|
|
10476
|
+
"group/slider-thumb",
|
|
10477
|
+
// Accessibility: remove default outline (custom focus ring via data-[focus-visible])
|
|
10317
10478
|
"outline-none",
|
|
10318
|
-
// Focus ring visible only on keyboard focus — matches project pattern
|
|
10479
|
+
// Focus ring visible only on keyboard focus — matches project pattern
|
|
10319
10480
|
"data-[focus-visible]:ring-3",
|
|
10320
10481
|
"data-[focus-visible]:ring-secondary",
|
|
10321
10482
|
"data-[focus-visible]:ring-offset-2",
|
|
10322
10483
|
className
|
|
10323
10484
|
),
|
|
10324
|
-
children:
|
|
10325
|
-
|
|
10326
|
-
|
|
10327
|
-
|
|
10328
|
-
|
|
10329
|
-
|
|
10330
|
-
|
|
10331
|
-
|
|
10485
|
+
children: [
|
|
10486
|
+
/* @__PURE__ */ jsx(VisuallyHidden, { children: /* @__PURE__ */ jsx(
|
|
10487
|
+
"input",
|
|
10488
|
+
{
|
|
10489
|
+
ref: inputRef,
|
|
10490
|
+
...mergeProps$1(inputProps, focusProps),
|
|
10491
|
+
...ariaValueText !== void 0 ? { "aria-valuetext": ariaValueText } : {}
|
|
10492
|
+
}
|
|
10493
|
+
) }),
|
|
10494
|
+
renderContent?.(renderState)
|
|
10495
|
+
]
|
|
10332
10496
|
}
|
|
10333
10497
|
);
|
|
10334
10498
|
}
|
|
@@ -10351,6 +10515,9 @@ var SliderHeadless = forwardRef(
|
|
|
10351
10515
|
className,
|
|
10352
10516
|
style,
|
|
10353
10517
|
children,
|
|
10518
|
+
trackClassName,
|
|
10519
|
+
renderThumbContent,
|
|
10520
|
+
onThumbDraggingChange,
|
|
10354
10521
|
...ariaProps
|
|
10355
10522
|
} = props;
|
|
10356
10523
|
const trackRef = useRef(null);
|
|
@@ -10412,7 +10579,18 @@ var SliderHeadless = forwardRef(
|
|
|
10412
10579
|
"data-variant": variant,
|
|
10413
10580
|
...zeroPercent !== void 0 ? { "data-zero-percent": zeroPercent } : {},
|
|
10414
10581
|
children: [
|
|
10415
|
-
label && /* @__PURE__ */ jsx("label", { ...labelProps, children: label }),
|
|
10582
|
+
label && /* @__PURE__ */ jsx("label", { ...labelProps, className: cn(orientation === "vertical" && "sr-only"), children: label }),
|
|
10583
|
+
/* @__PURE__ */ jsx(
|
|
10584
|
+
"output",
|
|
10585
|
+
{
|
|
10586
|
+
...outputProps,
|
|
10587
|
+
className: cn(
|
|
10588
|
+
orientation === "horizontal" && "justify-self-end",
|
|
10589
|
+
orientation === "vertical" && "sr-only"
|
|
10590
|
+
),
|
|
10591
|
+
children: isRange ? formatValue2 ? `${formatValue2(state.getThumbValue(0))} \u2013 ${formatValue2(state.getThumbValue(1))}` : `${state.getThumbValueLabel(0)} \u2013 ${state.getThumbValueLabel(1)}` : formatValue2 ? formatValue2(state.getThumbValue(0)) : state.getThumbValueLabel(0)
|
|
10592
|
+
}
|
|
10593
|
+
),
|
|
10416
10594
|
/* @__PURE__ */ jsxs(
|
|
10417
10595
|
"div",
|
|
10418
10596
|
{
|
|
@@ -10421,6 +10599,10 @@ var SliderHeadless = forwardRef(
|
|
|
10421
10599
|
"data-orientation": orientation,
|
|
10422
10600
|
"data-track": true,
|
|
10423
10601
|
...zeroPercent !== void 0 ? { "data-zero-percent": zeroPercent } : {},
|
|
10602
|
+
className: cn(
|
|
10603
|
+
trackClassName ?? "relative w-full",
|
|
10604
|
+
orientation === "vertical" && !trackClassName && "h-full"
|
|
10605
|
+
),
|
|
10424
10606
|
children: [
|
|
10425
10607
|
children,
|
|
10426
10608
|
/* @__PURE__ */ jsx(
|
|
@@ -10430,9 +10612,12 @@ var SliderHeadless = forwardRef(
|
|
|
10430
10612
|
state,
|
|
10431
10613
|
trackRef,
|
|
10432
10614
|
isDisabled,
|
|
10615
|
+
orientation,
|
|
10433
10616
|
...formatValue2 !== void 0 ? { formatValue: formatValue2 } : {},
|
|
10434
10617
|
...thumb0Label !== void 0 ? { "aria-label": thumb0Label } : {},
|
|
10435
|
-
...direction !== void 0 ? { "data-direction": direction } : {}
|
|
10618
|
+
...direction !== void 0 ? { "data-direction": direction } : {},
|
|
10619
|
+
...renderThumbContent !== void 0 ? { renderContent: renderThumbContent } : {},
|
|
10620
|
+
...onThumbDraggingChange !== void 0 ? { onDraggingChange: (d) => onThumbDraggingChange(0, d) } : {}
|
|
10436
10621
|
}
|
|
10437
10622
|
),
|
|
10438
10623
|
isRange && /* @__PURE__ */ jsx(
|
|
@@ -10442,144 +10627,174 @@ var SliderHeadless = forwardRef(
|
|
|
10442
10627
|
state,
|
|
10443
10628
|
trackRef,
|
|
10444
10629
|
isDisabled,
|
|
10630
|
+
orientation,
|
|
10445
10631
|
...formatValue2 !== void 0 ? { formatValue: formatValue2 } : {},
|
|
10446
|
-
"aria-label": thumbLabels?.[1] ?? "Maximum"
|
|
10632
|
+
"aria-label": thumbLabels?.[1] ?? "Maximum",
|
|
10633
|
+
...renderThumbContent !== void 0 ? { renderContent: renderThumbContent } : {},
|
|
10634
|
+
...onThumbDraggingChange !== void 0 ? { onDraggingChange: (d) => onThumbDraggingChange(1, d) } : {}
|
|
10447
10635
|
}
|
|
10448
10636
|
)
|
|
10449
10637
|
]
|
|
10450
10638
|
}
|
|
10451
|
-
)
|
|
10452
|
-
/* @__PURE__ */ jsx("output", { ...outputProps, children: isRange ? formatValue2 ? `${formatValue2(state.getThumbValue(0))} \u2013 ${formatValue2(state.getThumbValue(1))}` : `${state.getThumbValueLabel(0)} \u2013 ${state.getThumbValueLabel(1)}` : formatValue2 ? formatValue2(state.getThumbValue(0)) : state.getThumbValueLabel(0) })
|
|
10639
|
+
)
|
|
10453
10640
|
]
|
|
10454
10641
|
}
|
|
10455
10642
|
);
|
|
10456
10643
|
}
|
|
10457
10644
|
);
|
|
10458
10645
|
SliderHeadless.displayName = "SliderHeadless";
|
|
10459
|
-
var sliderContainerVariants = cva(
|
|
10646
|
+
var sliderContainerVariants = cva(["group/slider", "relative", "select-none"], {
|
|
10647
|
+
variants: {
|
|
10648
|
+
orientation: {
|
|
10649
|
+
// Grid: 1fr for label, auto for output value; gap-x for label↔output spacing
|
|
10650
|
+
horizontal: "grid grid-cols-[1fr_auto] items-center gap-x-2 w-full",
|
|
10651
|
+
// Flex column: label → track → output stacked; width = handle height (per size)
|
|
10652
|
+
vertical: "flex flex-col items-center h-full"
|
|
10653
|
+
},
|
|
10654
|
+
size: {
|
|
10655
|
+
// Vertical orientation: container width = handle height (dimensions transposed)
|
|
10656
|
+
// Applied only for vertical via compoundVariants below
|
|
10657
|
+
// NOTE: measurement-derived values from MD3 spec §4.2; permitted exception
|
|
10658
|
+
xsmall: "",
|
|
10659
|
+
small: "",
|
|
10660
|
+
medium: "",
|
|
10661
|
+
large: "",
|
|
10662
|
+
xlarge: ""
|
|
10663
|
+
}
|
|
10664
|
+
},
|
|
10665
|
+
compoundVariants: [
|
|
10666
|
+
// Vertical: container WIDTH = handle height (MD3 §10.9 — dimensions transposed)
|
|
10667
|
+
// NOTE: measurement-derived values from MD3 spec §4.2; permitted exception
|
|
10668
|
+
{ orientation: "vertical", size: "xsmall", class: "w-[44px]" },
|
|
10669
|
+
{ orientation: "vertical", size: "small", class: "w-[44px]" },
|
|
10670
|
+
{ orientation: "vertical", size: "medium", class: "w-[52px]" },
|
|
10671
|
+
{ orientation: "vertical", size: "large", class: "w-[68px]" },
|
|
10672
|
+
{ orientation: "vertical", size: "xlarge", class: "w-[108px]" }
|
|
10673
|
+
],
|
|
10674
|
+
defaultVariants: {
|
|
10675
|
+
orientation: "horizontal",
|
|
10676
|
+
size: "xsmall"
|
|
10677
|
+
}
|
|
10678
|
+
});
|
|
10679
|
+
var sliderTrackRegionVariants = cva(["relative", "touch-none"], {
|
|
10680
|
+
variants: {
|
|
10681
|
+
orientation: {
|
|
10682
|
+
horizontal: "col-span-2 w-full",
|
|
10683
|
+
// flex-1 fills the vertical container reliably; h-full collapses when the
|
|
10684
|
+
// container itself is a flex item without an explicit pixel height (CSS spec).
|
|
10685
|
+
// min-h-0 allows the flex child to shrink below its natural size if needed.
|
|
10686
|
+
vertical: "flex-1 min-h-0"
|
|
10687
|
+
},
|
|
10688
|
+
size: {
|
|
10689
|
+
// Horizontal: size controls track region HEIGHT (= handle height)
|
|
10690
|
+
// Vertical: size controls track region WIDTH (= handle height, dimensions transposed)
|
|
10691
|
+
// Applied as compound variants below to avoid cross-orientation conflicts
|
|
10692
|
+
xsmall: "",
|
|
10693
|
+
small: "",
|
|
10694
|
+
medium: "",
|
|
10695
|
+
large: "",
|
|
10696
|
+
xlarge: ""
|
|
10697
|
+
}
|
|
10698
|
+
},
|
|
10699
|
+
compoundVariants: [
|
|
10700
|
+
// Horizontal: height = handle height per MD3 §4.2
|
|
10701
|
+
{ orientation: "horizontal", size: "xsmall", class: "h-[44px]" },
|
|
10702
|
+
{ orientation: "horizontal", size: "small", class: "h-[44px]" },
|
|
10703
|
+
{ orientation: "horizontal", size: "medium", class: "h-[52px]" },
|
|
10704
|
+
{ orientation: "horizontal", size: "large", class: "h-[68px]" },
|
|
10705
|
+
{ orientation: "horizontal", size: "xlarge", class: "h-[108px]" },
|
|
10706
|
+
// Vertical: width = handle height (transposed per MD3 §10.9)
|
|
10707
|
+
{ orientation: "vertical", size: "xsmall", class: "w-[44px]" },
|
|
10708
|
+
{ orientation: "vertical", size: "small", class: "w-[44px]" },
|
|
10709
|
+
{ orientation: "vertical", size: "medium", class: "w-[52px]" },
|
|
10710
|
+
{ orientation: "vertical", size: "large", class: "w-[68px]" },
|
|
10711
|
+
{ orientation: "vertical", size: "xlarge", class: "w-[108px]" }
|
|
10712
|
+
],
|
|
10713
|
+
defaultVariants: {
|
|
10714
|
+
orientation: "horizontal",
|
|
10715
|
+
size: "xsmall"
|
|
10716
|
+
}
|
|
10717
|
+
});
|
|
10718
|
+
var sliderTrackLayoutVariants = cva(["absolute", "inset-0", "pointer-events-none"]);
|
|
10719
|
+
var sliderActiveTrackVariants = cva(
|
|
10460
10720
|
[
|
|
10461
|
-
|
|
10462
|
-
"
|
|
10463
|
-
|
|
10464
|
-
"
|
|
10465
|
-
"
|
|
10466
|
-
//
|
|
10467
|
-
"
|
|
10721
|
+
// Color
|
|
10722
|
+
"bg-primary",
|
|
10723
|
+
// Disabled — driven by root group/slider data-disabled attr
|
|
10724
|
+
"group-data-[disabled]/slider:bg-on-surface",
|
|
10725
|
+
"group-data-[disabled]/slider:opacity-38",
|
|
10726
|
+
// Layout — absolute fill within the track region
|
|
10727
|
+
"absolute",
|
|
10728
|
+
"overflow-hidden"
|
|
10468
10729
|
],
|
|
10469
10730
|
{
|
|
10470
10731
|
variants: {
|
|
10471
10732
|
size: {
|
|
10472
|
-
//
|
|
10473
|
-
|
|
10474
|
-
|
|
10475
|
-
|
|
10476
|
-
|
|
10477
|
-
|
|
10733
|
+
// Horizontal: left (start) = outer corner, right (near handle) = 2dp inner
|
|
10734
|
+
// NOTE: measurement-derived values from MD3 spec §4.2, §6; permitted exception
|
|
10735
|
+
xsmall: "h-[16px] rounded-l-[16px] rounded-r-[2px]",
|
|
10736
|
+
small: "h-[16px] rounded-l-[16px] rounded-r-[2px]",
|
|
10737
|
+
medium: "h-[40px] rounded-l-[12px] rounded-r-[2px]",
|
|
10738
|
+
large: "h-[56px] rounded-l-[16px] rounded-r-[2px]",
|
|
10739
|
+
xlarge: "h-[96px] rounded-l-[28px] rounded-r-[2px]"
|
|
10478
10740
|
},
|
|
10479
10741
|
orientation: {
|
|
10480
|
-
// Horizontal:
|
|
10481
|
-
horizontal: "",
|
|
10482
|
-
// Vertical:
|
|
10483
|
-
|
|
10484
|
-
// NOTE: h-full requires a parent with defined height; w-[...] set via compound variants
|
|
10485
|
-
vertical: "h-full flex-col"
|
|
10486
|
-
},
|
|
10487
|
-
disabled: {
|
|
10488
|
-
true: "cursor-not-allowed pointer-events-none",
|
|
10489
|
-
false: "cursor-pointer"
|
|
10742
|
+
// Horizontal: center vertically within track region
|
|
10743
|
+
horizontal: "top-1/2 -translate-y-1/2",
|
|
10744
|
+
// Vertical: center horizontally; length controlled by inline top/height styles
|
|
10745
|
+
vertical: "left-1/2 -translate-x-1/2"
|
|
10490
10746
|
}
|
|
10491
10747
|
},
|
|
10492
10748
|
compoundVariants: [
|
|
10493
|
-
// Vertical:
|
|
10494
|
-
//
|
|
10495
|
-
// NOTE: measurement-derived values from MD3 spec §4.2; permitted exception
|
|
10496
|
-
{ orientation: "vertical", size: "xsmall", className: "w-[44px]" },
|
|
10497
|
-
{ orientation: "vertical", size: "small", className: "w-[44px]" },
|
|
10498
|
-
{ orientation: "vertical", size: "medium", className: "w-[52px]" },
|
|
10499
|
-
{ orientation: "vertical", size: "large", className: "w-[68px]" },
|
|
10500
|
-
{ orientation: "vertical", size: "xlarge", className: "w-[108px]" }
|
|
10501
|
-
],
|
|
10502
|
-
defaultVariants: {
|
|
10503
|
-
size: "xsmall",
|
|
10504
|
-
orientation: "horizontal",
|
|
10505
|
-
disabled: false
|
|
10506
|
-
}
|
|
10507
|
-
}
|
|
10508
|
-
);
|
|
10509
|
-
var sliderActiveTrackVariants = cva(
|
|
10510
|
-
["bg-primary", "flex-shrink-0", "overflow-hidden", "relative"],
|
|
10511
|
-
{
|
|
10512
|
-
variants: {
|
|
10513
|
-
size: {
|
|
10514
|
-
// NOTE: measurement-derived values from MD3 spec §4.2, §6 Corner tokens; permitted exception
|
|
10515
|
-
// Corner classes are in compound variants to avoid conflicts with vertical orientation corners
|
|
10516
|
-
xsmall: "h-[16px] rounded-l-[16px] rounded-r-[2px]",
|
|
10517
|
-
// corner.large outer (16dp), 2dp inner
|
|
10518
|
-
small: "h-[16px] rounded-l-[16px] rounded-r-[2px]",
|
|
10519
|
-
medium: "h-[40px] rounded-l-[12px] rounded-r-[2px]",
|
|
10520
|
-
// corner.medium outer (12dp), 2dp inner
|
|
10521
|
-
large: "h-[56px] rounded-l-[16px] rounded-r-[2px]",
|
|
10522
|
-
// corner.large outer (16dp), 2dp inner
|
|
10523
|
-
xlarge: "h-[96px] rounded-l-[28px] rounded-r-[2px]"
|
|
10524
|
-
// corner.extra-large outer (28dp), 2dp inner
|
|
10525
|
-
},
|
|
10526
|
-
orientation: {
|
|
10527
|
-
horizontal: "",
|
|
10528
|
-
// Vertical: track thickness is now width; flex-basis (inline style) controls height.
|
|
10529
|
-
// h-[...] from size variant is overridden by flex-basis in a flex-col container.
|
|
10530
|
-
// Individual corner classes (rounded-tl/tr/bl/br) override the horizontal rounded-l/r
|
|
10531
|
-
// via tailwind-merge conflict resolution in cn().
|
|
10532
|
-
vertical: ""
|
|
10533
|
-
},
|
|
10534
|
-
disabled: {
|
|
10535
|
-
true: "bg-on-surface opacity-38",
|
|
10536
|
-
false: ""
|
|
10537
|
-
}
|
|
10538
|
-
},
|
|
10539
|
-
compoundVariants: [
|
|
10540
|
-
// Vertical: width = track thickness, corners transposed (bottom = outer, top = inner near handle)
|
|
10541
|
-
// Using individual corner utilities so tailwind-merge correctly resolves conflicts with
|
|
10542
|
-
// the horizontal rounded-l/rounded-r classes from size variants.
|
|
10543
|
-
// NOTE: measurement-derived values from MD3 spec §4.2, §6 Corner tokens; permitted exception
|
|
10749
|
+
// Vertical: width = track thickness; bottom = outer corner, top = 2dp inner (near handle)
|
|
10750
|
+
// NOTE: measurement-derived values from MD3 spec §4.2, §6; permitted exception
|
|
10544
10751
|
{
|
|
10545
10752
|
orientation: "vertical",
|
|
10546
10753
|
size: "xsmall",
|
|
10547
|
-
|
|
10754
|
+
class: "w-[16px] rounded-tl-[2px] rounded-tr-[2px] rounded-bl-[16px] rounded-br-[16px]"
|
|
10548
10755
|
},
|
|
10549
10756
|
{
|
|
10550
10757
|
orientation: "vertical",
|
|
10551
10758
|
size: "small",
|
|
10552
|
-
|
|
10759
|
+
class: "w-[16px] rounded-tl-[2px] rounded-tr-[2px] rounded-bl-[16px] rounded-br-[16px]"
|
|
10553
10760
|
},
|
|
10554
10761
|
{
|
|
10555
10762
|
orientation: "vertical",
|
|
10556
10763
|
size: "medium",
|
|
10557
|
-
|
|
10764
|
+
class: "w-[40px] rounded-tl-[2px] rounded-tr-[2px] rounded-bl-[12px] rounded-br-[12px]"
|
|
10558
10765
|
},
|
|
10559
10766
|
{
|
|
10560
10767
|
orientation: "vertical",
|
|
10561
10768
|
size: "large",
|
|
10562
|
-
|
|
10769
|
+
class: "w-[56px] rounded-tl-[2px] rounded-tr-[2px] rounded-bl-[16px] rounded-br-[16px]"
|
|
10563
10770
|
},
|
|
10564
10771
|
{
|
|
10565
10772
|
orientation: "vertical",
|
|
10566
10773
|
size: "xlarge",
|
|
10567
|
-
|
|
10774
|
+
class: "w-[96px] rounded-tl-[2px] rounded-tr-[2px] rounded-bl-[28px] rounded-br-[28px]"
|
|
10568
10775
|
}
|
|
10569
10776
|
],
|
|
10570
10777
|
defaultVariants: {
|
|
10571
10778
|
size: "xsmall",
|
|
10572
|
-
orientation: "horizontal"
|
|
10573
|
-
disabled: false
|
|
10779
|
+
orientation: "horizontal"
|
|
10574
10780
|
}
|
|
10575
10781
|
}
|
|
10576
10782
|
);
|
|
10577
10783
|
var sliderInactiveTrackVariants = cva(
|
|
10578
|
-
[
|
|
10784
|
+
[
|
|
10785
|
+
// Color
|
|
10786
|
+
"bg-secondary-container",
|
|
10787
|
+
// Disabled — driven by root group/slider data-disabled attr
|
|
10788
|
+
"group-data-[disabled]/slider:bg-on-surface/10",
|
|
10789
|
+
// Layout — absolute fill within the track region
|
|
10790
|
+
"absolute",
|
|
10791
|
+
"overflow-hidden"
|
|
10792
|
+
],
|
|
10579
10793
|
{
|
|
10580
10794
|
variants: {
|
|
10581
10795
|
size: {
|
|
10582
|
-
//
|
|
10796
|
+
// Horizontal: left (near handle) = 2dp inner, right (end) = outer corner
|
|
10797
|
+
// NOTE: measurement-derived values from MD3 spec §4.2, §6; permitted exception
|
|
10583
10798
|
xsmall: "h-[16px] rounded-l-[2px] rounded-r-[16px]",
|
|
10584
10799
|
small: "h-[16px] rounded-l-[2px] rounded-r-[16px]",
|
|
10585
10800
|
medium: "h-[40px] rounded-l-[2px] rounded-r-[12px]",
|
|
@@ -10587,68 +10802,65 @@ var sliderInactiveTrackVariants = cva(
|
|
|
10587
10802
|
xlarge: "h-[96px] rounded-l-[2px] rounded-r-[28px]"
|
|
10588
10803
|
},
|
|
10589
10804
|
orientation: {
|
|
10590
|
-
|
|
10591
|
-
|
|
10592
|
-
//
|
|
10593
|
-
vertical: ""
|
|
10594
|
-
},
|
|
10595
|
-
disabled: {
|
|
10596
|
-
true: "bg-on-surface/10",
|
|
10597
|
-
// MD3 §8.2: 10% opacity via background alpha
|
|
10598
|
-
false: ""
|
|
10805
|
+
// Horizontal: center vertically within track region
|
|
10806
|
+
horizontal: "top-1/2 -translate-y-1/2",
|
|
10807
|
+
// Vertical: center horizontally; length controlled by inline top/height styles
|
|
10808
|
+
vertical: "left-1/2 -translate-x-1/2"
|
|
10599
10809
|
}
|
|
10600
10810
|
},
|
|
10601
10811
|
compoundVariants: [
|
|
10602
|
-
// Vertical: width = track thickness
|
|
10603
|
-
// NOTE: measurement-derived values from MD3 spec §4.2, §6
|
|
10812
|
+
// Vertical: width = track thickness; top = outer corner, bottom = 2dp inner (near handle)
|
|
10813
|
+
// NOTE: measurement-derived values from MD3 spec §4.2, §6; permitted exception
|
|
10604
10814
|
{
|
|
10605
10815
|
orientation: "vertical",
|
|
10606
10816
|
size: "xsmall",
|
|
10607
|
-
|
|
10817
|
+
class: "w-[16px] rounded-tl-[16px] rounded-tr-[16px] rounded-bl-[2px] rounded-br-[2px]"
|
|
10608
10818
|
},
|
|
10609
10819
|
{
|
|
10610
10820
|
orientation: "vertical",
|
|
10611
10821
|
size: "small",
|
|
10612
|
-
|
|
10822
|
+
class: "w-[16px] rounded-tl-[16px] rounded-tr-[16px] rounded-bl-[2px] rounded-br-[2px]"
|
|
10613
10823
|
},
|
|
10614
10824
|
{
|
|
10615
10825
|
orientation: "vertical",
|
|
10616
10826
|
size: "medium",
|
|
10617
|
-
|
|
10827
|
+
class: "w-[40px] rounded-tl-[12px] rounded-tr-[12px] rounded-bl-[2px] rounded-br-[2px]"
|
|
10618
10828
|
},
|
|
10619
10829
|
{
|
|
10620
10830
|
orientation: "vertical",
|
|
10621
10831
|
size: "large",
|
|
10622
|
-
|
|
10832
|
+
class: "w-[56px] rounded-tl-[16px] rounded-tr-[16px] rounded-bl-[2px] rounded-br-[2px]"
|
|
10623
10833
|
},
|
|
10624
10834
|
{
|
|
10625
10835
|
orientation: "vertical",
|
|
10626
10836
|
size: "xlarge",
|
|
10627
|
-
|
|
10837
|
+
class: "w-[96px] rounded-tl-[28px] rounded-tr-[28px] rounded-bl-[2px] rounded-br-[2px]"
|
|
10628
10838
|
}
|
|
10629
10839
|
],
|
|
10630
10840
|
defaultVariants: {
|
|
10631
10841
|
size: "xsmall",
|
|
10632
|
-
orientation: "horizontal"
|
|
10633
|
-
disabled: false
|
|
10842
|
+
orientation: "horizontal"
|
|
10634
10843
|
}
|
|
10635
10844
|
}
|
|
10636
10845
|
);
|
|
10637
10846
|
var sliderHandleVariants = cva(
|
|
10638
10847
|
[
|
|
10848
|
+
// Color
|
|
10639
10849
|
"bg-primary",
|
|
10850
|
+
// Disabled — driven by thumb group/slider-thumb data-disabled attr
|
|
10851
|
+
"group-data-[disabled]/slider-thumb:bg-on-surface",
|
|
10852
|
+
"group-data-[disabled]/slider-thumb:opacity-38",
|
|
10853
|
+
// Pressed width (MD3: 4dp → 2dp on press, spatial spring)
|
|
10854
|
+
"group-data-[pressed]/slider-thumb:w-[2px]",
|
|
10855
|
+
// Shape
|
|
10640
10856
|
"rounded-[2px]",
|
|
10641
|
-
//
|
|
10857
|
+
// Layout
|
|
10642
10858
|
"flex-shrink-0",
|
|
10643
|
-
"
|
|
10644
|
-
"z-10",
|
|
10645
|
-
"outline-none"
|
|
10646
|
-
// Motion classes applied conditionally in Slider.tsx via useReducedMotion guard
|
|
10859
|
+
"pointer-events-none"
|
|
10647
10860
|
],
|
|
10648
10861
|
{
|
|
10649
10862
|
variants: {
|
|
10650
10863
|
size: {
|
|
10651
|
-
// NOTE: measurement-derived values from MD3 spec §4.2, §10.3; permitted exception
|
|
10652
10864
|
xsmall: "w-[4px] h-[44px]",
|
|
10653
10865
|
small: "w-[4px] h-[44px]",
|
|
10654
10866
|
medium: "w-[4px] h-[52px]",
|
|
@@ -10657,79 +10869,99 @@ var sliderHandleVariants = cva(
|
|
|
10657
10869
|
},
|
|
10658
10870
|
orientation: {
|
|
10659
10871
|
horizontal: "",
|
|
10660
|
-
// Vertical:
|
|
10661
|
-
//
|
|
10662
|
-
//
|
|
10663
|
-
|
|
10664
|
-
|
|
10665
|
-
pressed: {
|
|
10666
|
-
true: "w-[2px]",
|
|
10667
|
-
// NOTE: measurement-derived value from MD3 spec §10.3 (2dp pressed width); permitted exception
|
|
10668
|
-
false: ""
|
|
10669
|
-
},
|
|
10670
|
-
disabled: {
|
|
10671
|
-
true: "bg-on-surface opacity-38",
|
|
10672
|
-
false: ""
|
|
10872
|
+
// Vertical: handle is a thin horizontal bar. h-[4px] overrides the base
|
|
10873
|
+
// h-[44px..108px]. Width is explicitly set per size below so the RA thumb
|
|
10874
|
+
// (which is shrink-to-fit) assumes the correct measured width — this also
|
|
10875
|
+
// fixes the hit-area (w-full) and state-layer (inset-0) widths.
|
|
10876
|
+
vertical: "h-[4px]"
|
|
10673
10877
|
}
|
|
10674
10878
|
},
|
|
10879
|
+
compoundVariants: [
|
|
10880
|
+
// Vertical: override to height-based narrowing on press
|
|
10881
|
+
{
|
|
10882
|
+
orientation: "vertical",
|
|
10883
|
+
class: "group-data-[pressed]/slider-thumb:h-[2px]"
|
|
10884
|
+
},
|
|
10885
|
+
// Vertical per-size widths (transposed handle length = track region width per MD3 §10.9)
|
|
10886
|
+
// NOTE: measurement-derived values from MD3 spec §4.2; permitted exception
|
|
10887
|
+
{ orientation: "vertical", size: "xsmall", class: "w-[44px]" },
|
|
10888
|
+
{ orientation: "vertical", size: "small", class: "w-[44px]" },
|
|
10889
|
+
{ orientation: "vertical", size: "medium", class: "w-[52px]" },
|
|
10890
|
+
{ orientation: "vertical", size: "large", class: "w-[68px]" },
|
|
10891
|
+
{ orientation: "vertical", size: "xlarge", class: "w-[108px]" }
|
|
10892
|
+
],
|
|
10675
10893
|
defaultVariants: {
|
|
10676
10894
|
size: "xsmall",
|
|
10677
|
-
orientation: "horizontal"
|
|
10678
|
-
pressed: false,
|
|
10679
|
-
disabled: false
|
|
10680
|
-
}
|
|
10681
|
-
}
|
|
10682
|
-
);
|
|
10683
|
-
var sliderHandleStateLayerVariants = cva(
|
|
10684
|
-
[
|
|
10685
|
-
"absolute",
|
|
10686
|
-
"inset-0",
|
|
10687
|
-
"rounded-[4px]",
|
|
10688
|
-
// NOTE: measurement-derived value from MD3 spec §10.3 (4dp state layer border-radius); permitted exception
|
|
10689
|
-
"bg-on-primary",
|
|
10690
|
-
"pointer-events-none"
|
|
10691
|
-
// Motion classes applied conditionally in Slider.tsx via useReducedMotion guard
|
|
10692
|
-
],
|
|
10693
|
-
{
|
|
10694
|
-
variants: {
|
|
10695
|
-
state: {
|
|
10696
|
-
enabled: "opacity-0",
|
|
10697
|
-
hovered: "opacity-8",
|
|
10698
|
-
// MD3 §8.3: 8% hover
|
|
10699
|
-
pressed: "opacity-10",
|
|
10700
|
-
// MD3 §8.3: 10% pressed
|
|
10701
|
-
focused: "opacity-10",
|
|
10702
|
-
// MD3 §8.3: 10% focus
|
|
10703
|
-
disabled: "opacity-0"
|
|
10704
|
-
}
|
|
10705
|
-
},
|
|
10706
|
-
defaultVariants: {
|
|
10707
|
-
state: "enabled"
|
|
10895
|
+
orientation: "horizontal"
|
|
10708
10896
|
}
|
|
10709
10897
|
}
|
|
10710
10898
|
);
|
|
10711
|
-
var
|
|
10712
|
-
|
|
10713
|
-
|
|
10714
|
-
|
|
10715
|
-
|
|
10716
|
-
|
|
10717
|
-
|
|
10718
|
-
|
|
10719
|
-
|
|
10720
|
-
|
|
10721
|
-
|
|
10722
|
-
|
|
10723
|
-
|
|
10724
|
-
|
|
10725
|
-
|
|
10726
|
-
|
|
10899
|
+
var sliderHandleStateLayerVariants = cva([
|
|
10900
|
+
// Color
|
|
10901
|
+
"bg-primary",
|
|
10902
|
+
// Positioning — covers the handle
|
|
10903
|
+
"absolute",
|
|
10904
|
+
"inset-0",
|
|
10905
|
+
"rounded-[2px]",
|
|
10906
|
+
// Interaction: hidden by default
|
|
10907
|
+
"opacity-0",
|
|
10908
|
+
"pointer-events-none",
|
|
10909
|
+
// State opacities — driven by group/slider-thumb data attrs
|
|
10910
|
+
"group-data-[hovered]/slider-thumb:opacity-8",
|
|
10911
|
+
"group-data-[focus-visible]/slider-thumb:opacity-10",
|
|
10912
|
+
"group-data-[pressed]/slider-thumb:opacity-10",
|
|
10913
|
+
// Disabled: hide state layer (no interaction feedback)
|
|
10914
|
+
"group-data-[disabled]/slider-thumb:hidden",
|
|
10915
|
+
// Motion: effects spring (opacity transition only)
|
|
10916
|
+
"transition-opacity",
|
|
10917
|
+
"duration-spring-standard-fast-effects",
|
|
10918
|
+
"ease-spring-standard-fast-effects"
|
|
10919
|
+
]);
|
|
10920
|
+
var sliderValueIndicatorVariants = cva([
|
|
10921
|
+
// Positioning: float above handle center
|
|
10922
|
+
"absolute",
|
|
10923
|
+
"left-1/2",
|
|
10924
|
+
"-translate-x-1/2",
|
|
10925
|
+
"bottom-[calc(100%+4px)]",
|
|
10926
|
+
// Shape & color
|
|
10927
|
+
"bg-inverse-surface",
|
|
10928
|
+
"rounded-full",
|
|
10929
|
+
"px-[12px]",
|
|
10930
|
+
"py-[6px]",
|
|
10931
|
+
"min-w-[48px]",
|
|
10932
|
+
"text-center",
|
|
10933
|
+
// Hidden by default; revealed when thumb group has data-pressed
|
|
10934
|
+
"opacity-0",
|
|
10935
|
+
"scale-0",
|
|
10936
|
+
"group-data-[pressed]/slider-thumb:opacity-100",
|
|
10937
|
+
"group-data-[pressed]/slider-thumb:scale-100",
|
|
10938
|
+
// Prevent interaction (value display only)
|
|
10939
|
+
"pointer-events-none",
|
|
10940
|
+
// Z-index above track overlays
|
|
10941
|
+
"z-10",
|
|
10942
|
+
// In Tailwind v4, scale-* maps to the CSS `scale` property (not `transform`),
|
|
10943
|
+
// so we must list `scale` here — not `transform` — to animate the reveal.
|
|
10944
|
+
"will-change-[scale,opacity]"
|
|
10945
|
+
]);
|
|
10946
|
+
var sliderStopDotVariants = cva(["rounded-full", "flex-shrink-0", "pointer-events-none"], {
|
|
10947
|
+
variants: {
|
|
10948
|
+
region: {
|
|
10949
|
+
active: "bg-on-primary",
|
|
10950
|
+
inactive: "bg-on-secondary-container"
|
|
10727
10951
|
},
|
|
10728
|
-
|
|
10729
|
-
|
|
10952
|
+
size: {
|
|
10953
|
+
xsmall: "w-[4px] h-[4px]",
|
|
10954
|
+
small: "w-[4px] h-[4px]",
|
|
10955
|
+
medium: "w-[6px] h-[6px]",
|
|
10956
|
+
large: "w-[6px] h-[6px]",
|
|
10957
|
+
xlarge: "w-[8px] h-[8px]"
|
|
10730
10958
|
}
|
|
10959
|
+
},
|
|
10960
|
+
defaultVariants: {
|
|
10961
|
+
region: "inactive",
|
|
10962
|
+
size: "xsmall"
|
|
10731
10963
|
}
|
|
10732
|
-
);
|
|
10964
|
+
});
|
|
10733
10965
|
var sliderStopsContainerVariants = cva([
|
|
10734
10966
|
"absolute",
|
|
10735
10967
|
"inset-0",
|
|
@@ -10737,58 +10969,22 @@ var sliderStopsContainerVariants = cva([
|
|
|
10737
10969
|
"items-center",
|
|
10738
10970
|
"justify-between",
|
|
10739
10971
|
"px-[4px]",
|
|
10740
|
-
// NOTE: measurement-derived value from MD3 spec §10.5 (stopPadding: 4dp); permitted exception
|
|
10741
10972
|
"pointer-events-none",
|
|
10742
|
-
"z-
|
|
10973
|
+
"z-10"
|
|
10743
10974
|
]);
|
|
10744
|
-
var sliderStopDotVariants = cva(
|
|
10745
|
-
[
|
|
10746
|
-
"rounded-full",
|
|
10747
|
-
"flex-shrink-0",
|
|
10748
|
-
"w-[4px]",
|
|
10749
|
-
// NOTE: measurement-derived value from MD3 spec §10.5 (stopIndicatorSize: 4dp); permitted exception
|
|
10750
|
-
"h-[4px]"
|
|
10751
|
-
],
|
|
10752
|
-
{
|
|
10753
|
-
variants: {
|
|
10754
|
-
/**
|
|
10755
|
-
* Whether this dot is positioned on the active track portion.
|
|
10756
|
-
* Determines the dot color per MD3 spec §5.2.
|
|
10757
|
-
*/
|
|
10758
|
-
onActiveTrack: {
|
|
10759
|
-
true: "bg-on-primary",
|
|
10760
|
-
// Light dots on primary background
|
|
10761
|
-
false: "bg-on-secondary-container"
|
|
10762
|
-
// Dark dots on secondary-container background
|
|
10763
|
-
},
|
|
10764
|
-
disabled: {
|
|
10765
|
-
true: "opacity-38",
|
|
10766
|
-
false: ""
|
|
10767
|
-
}
|
|
10768
|
-
},
|
|
10769
|
-
defaultVariants: {
|
|
10770
|
-
onActiveTrack: false,
|
|
10771
|
-
disabled: false
|
|
10772
|
-
}
|
|
10773
|
-
}
|
|
10774
|
-
);
|
|
10775
10975
|
var sliderTrackStopVariants = cva(
|
|
10776
10976
|
[
|
|
10777
10977
|
"absolute",
|
|
10778
|
-
"top-1/2",
|
|
10779
|
-
"-translate-y-1/2",
|
|
10780
|
-
"w-[4px]",
|
|
10781
|
-
// NOTE: measurement-derived value from MD3 spec §10.6 (trackStopDiameter: 4dp); permitted exception
|
|
10782
|
-
"h-[4px]",
|
|
10783
10978
|
"rounded-full",
|
|
10784
10979
|
"bg-on-secondary-container",
|
|
10785
|
-
"pointer-events-none"
|
|
10980
|
+
"pointer-events-none",
|
|
10981
|
+
"w-[4px]",
|
|
10982
|
+
"h-[4px]"
|
|
10786
10983
|
],
|
|
10787
10984
|
{
|
|
10788
10985
|
variants: {
|
|
10789
10986
|
position: {
|
|
10790
10987
|
start: "left-[4px]",
|
|
10791
|
-
// NOTE: measurement-derived (trackStopOffset: 4dp); permitted exception
|
|
10792
10988
|
end: "right-[4px]"
|
|
10793
10989
|
}
|
|
10794
10990
|
},
|
|
@@ -10797,64 +10993,23 @@ var sliderTrackStopVariants = cva(
|
|
|
10797
10993
|
}
|
|
10798
10994
|
}
|
|
10799
10995
|
);
|
|
10800
|
-
var sliderValueIndicatorVariants = cva(
|
|
10801
|
-
[
|
|
10802
|
-
"absolute",
|
|
10803
|
-
"left-1/2",
|
|
10804
|
-
"-translate-x-1/2",
|
|
10805
|
-
"bottom-[calc(100%+4px)]",
|
|
10806
|
-
// NOTE: measurement-derived (4dp gap above handle); permitted exception
|
|
10807
|
-
"bg-inverse-surface",
|
|
10808
|
-
"rounded-full",
|
|
10809
|
-
// pill shape (1000dp radius)
|
|
10810
|
-
"px-[16px]",
|
|
10811
|
-
// NOTE: measurement-derived (valueIndicatorPaddingH: 16dp); permitted exception
|
|
10812
|
-
"py-[12px]",
|
|
10813
|
-
// NOTE: measurement-derived (valueIndicatorPaddingV: 12dp); permitted exception
|
|
10814
|
-
"min-w-[48px]",
|
|
10815
|
-
// NOTE: measurement-derived (valueIndicatorWidth: 48dp); permitted exception
|
|
10816
|
-
"flex",
|
|
10817
|
-
"items-center",
|
|
10818
|
-
"justify-center",
|
|
10819
|
-
"pointer-events-none",
|
|
10820
|
-
"z-20"
|
|
10821
|
-
// Motion classes (transition-[transform,opacity] with directional easing) applied
|
|
10822
|
-
// conditionally in SliderValueIndicator.tsx via useReducedMotion guard.
|
|
10823
|
-
],
|
|
10824
|
-
{
|
|
10825
|
-
variants: {
|
|
10826
|
-
visible: {
|
|
10827
|
-
true: "opacity-100 scale-100",
|
|
10828
|
-
false: "opacity-0 scale-0"
|
|
10829
|
-
}
|
|
10830
|
-
},
|
|
10831
|
-
defaultVariants: {
|
|
10832
|
-
visible: false
|
|
10833
|
-
}
|
|
10834
|
-
}
|
|
10835
|
-
);
|
|
10836
10996
|
var sliderValueIndicatorTextVariants = cva([
|
|
10837
10997
|
"text-inverse-on-surface",
|
|
10838
10998
|
"text-label-large",
|
|
10839
|
-
|
|
10840
|
-
"whitespace-nowrap"
|
|
10841
|
-
"text-center"
|
|
10999
|
+
"select-none",
|
|
11000
|
+
"whitespace-nowrap"
|
|
10842
11001
|
]);
|
|
10843
11002
|
var sliderInsetIconVariants = cva(
|
|
10844
11003
|
["absolute", "text-on-primary", "pointer-events-none", "flex", "items-center", "justify-center"],
|
|
10845
11004
|
{
|
|
10846
11005
|
variants: {
|
|
10847
11006
|
size: {
|
|
10848
|
-
// NOTE: measurement-derived values from MD3 spec §10.7 (icon sizes); permitted exception
|
|
10849
11007
|
medium: "w-[24px] h-[24px]",
|
|
10850
11008
|
large: "w-[24px] h-[24px]",
|
|
10851
11009
|
xlarge: "w-[32px] h-[32px]"
|
|
10852
11010
|
},
|
|
10853
11011
|
orientation: {
|
|
10854
|
-
// Horizontal: 8dp from active track left edge, vertically centered
|
|
10855
|
-
// NOTE: measurement-derived value from MD3 spec §10.7 (iconOffset: 8dp); permitted exception
|
|
10856
11012
|
horizontal: "left-[8px] top-1/2 -translate-y-1/2",
|
|
10857
|
-
// Vertical: 8dp from active track bottom edge (outer end), horizontally centered
|
|
10858
11013
|
vertical: "bottom-[8px] left-1/2 -translate-x-1/2"
|
|
10859
11014
|
}
|
|
10860
11015
|
},
|
|
@@ -10885,7 +11040,7 @@ function SliderStops({
|
|
|
10885
11040
|
step,
|
|
10886
11041
|
values,
|
|
10887
11042
|
variant,
|
|
10888
|
-
|
|
11043
|
+
size = "xsmall",
|
|
10889
11044
|
className
|
|
10890
11045
|
}) {
|
|
10891
11046
|
const stopCount = Math.floor((maxValue - minValue) / step) + 1;
|
|
@@ -10903,7 +11058,10 @@ function SliderStops({
|
|
|
10903
11058
|
{
|
|
10904
11059
|
"data-slot": "stop-dot",
|
|
10905
11060
|
className: cn(
|
|
10906
|
-
sliderStopDotVariants({
|
|
11061
|
+
sliderStopDotVariants({
|
|
11062
|
+
region: isOnActive ? "active" : "inactive",
|
|
11063
|
+
size
|
|
11064
|
+
})
|
|
10907
11065
|
)
|
|
10908
11066
|
},
|
|
10909
11067
|
i
|
|
@@ -10914,27 +11072,19 @@ function SliderStops({
|
|
|
10914
11072
|
}
|
|
10915
11073
|
function SliderValueIndicator({
|
|
10916
11074
|
value,
|
|
10917
|
-
isVisible,
|
|
10918
11075
|
formatValue: formatValue2,
|
|
10919
11076
|
className
|
|
10920
11077
|
}) {
|
|
10921
11078
|
const displayValue = formatValue2 ? formatValue2(value) : `${Math.round(value)}`;
|
|
10922
11079
|
const reducedMotion = useReducedMotion();
|
|
10923
|
-
const transitionClasses = reducedMotion ? "" :
|
|
10924
|
-
"transition-[transform,opacity]",
|
|
10925
|
-
isVisible ? "duration-short3 ease-standard-decelerate" : "duration-short2 ease-standard-accelerate"
|
|
10926
|
-
);
|
|
11080
|
+
const transitionClasses = reducedMotion ? "" : "transition-[scale,opacity] duration-spring-standard-fast-spatial ease-spring-standard-fast-spatial";
|
|
10927
11081
|
return /* @__PURE__ */ jsx(
|
|
10928
11082
|
"div",
|
|
10929
11083
|
{
|
|
10930
11084
|
"data-slot": "value-indicator",
|
|
10931
|
-
className: cn(
|
|
10932
|
-
sliderValueIndicatorVariants({ visible: isVisible }),
|
|
10933
|
-
transitionClasses,
|
|
10934
|
-
className
|
|
10935
|
-
),
|
|
11085
|
+
className: cn(sliderValueIndicatorVariants(), transitionClasses, className),
|
|
10936
11086
|
role: "tooltip",
|
|
10937
|
-
"aria-hidden":
|
|
11087
|
+
"aria-hidden": "true",
|
|
10938
11088
|
children: /* @__PURE__ */ jsx("span", { className: sliderValueIndicatorTextVariants(), children: displayValue })
|
|
10939
11089
|
}
|
|
10940
11090
|
);
|
|
@@ -10947,6 +11097,16 @@ function resolveDefaultValue(variant, minValue) {
|
|
|
10947
11097
|
if (variant === "centered") return [0];
|
|
10948
11098
|
return [minValue];
|
|
10949
11099
|
}
|
|
11100
|
+
var GAP_PX = 3;
|
|
11101
|
+
function segmentStyle(orientation, opts) {
|
|
11102
|
+
const { start, end, startGap = 0, endGap = 0 } = opts;
|
|
11103
|
+
const startVal = start !== null ? `calc(${start}% + ${startGap}px)` : `${startGap}px`;
|
|
11104
|
+
const endVal = end !== null ? `calc(${100 - end}% + ${endGap}px)` : `${endGap}px`;
|
|
11105
|
+
if (orientation === "horizontal") {
|
|
11106
|
+
return { left: startVal, right: endVal };
|
|
11107
|
+
}
|
|
11108
|
+
return { bottom: startVal, top: endVal };
|
|
11109
|
+
}
|
|
10950
11110
|
var Slider = forwardRef(
|
|
10951
11111
|
({
|
|
10952
11112
|
size = "xsmall",
|
|
@@ -10980,103 +11140,75 @@ var Slider = forwardRef(
|
|
|
10980
11140
|
},
|
|
10981
11141
|
[value, onChange]
|
|
10982
11142
|
);
|
|
10983
|
-
const
|
|
10984
|
-
const
|
|
10985
|
-
()
|
|
10986
|
-
);
|
|
10987
|
-
const
|
|
10988
|
-
const trackTransition = reducedMotion ||
|
|
10989
|
-
const handleMotion = reducedMotion ? "" : "transition-[width] duration-
|
|
10990
|
-
const stateLayerMotion = reducedMotion ? "" : "transition-opacity duration-short1 ease-standard";
|
|
11143
|
+
const [anyThumbDragging, setAnyThumbDragging] = useState(false);
|
|
11144
|
+
const handleThumbDraggingChange = useCallback((_index, isDragging) => {
|
|
11145
|
+
setAnyThumbDragging(isDragging);
|
|
11146
|
+
}, []);
|
|
11147
|
+
const springTokens = "duration-spring-standard-fast-spatial ease-spring-standard-fast-spatial";
|
|
11148
|
+
const trackTransition = reducedMotion || anyThumbDragging ? "" : orientation === "vertical" ? `transition-[top,bottom,height] ${springTokens}` : `transition-[left,width,right] ${springTokens}`;
|
|
11149
|
+
const handleMotion = reducedMotion ? "" : "transition-[width] duration-spring-standard-fast-spatial ease-spring-standard-fast-spatial";
|
|
10991
11150
|
const isRange = variant === "range";
|
|
10992
11151
|
const isCentered = variant === "centered";
|
|
10993
11152
|
const showIcon = icon !== void 0 && variant === "standard" && (size === "medium" || size === "large" || size === "xlarge");
|
|
11153
|
+
const renderThumbContent = useCallback(
|
|
11154
|
+
({ value: thumbValue }) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
11155
|
+
/* @__PURE__ */ jsx(
|
|
11156
|
+
"div",
|
|
11157
|
+
{
|
|
11158
|
+
"aria-hidden": "true",
|
|
11159
|
+
className: cn(
|
|
11160
|
+
"absolute",
|
|
11161
|
+
"left-1/2",
|
|
11162
|
+
"top-1/2",
|
|
11163
|
+
"-translate-x-1/2",
|
|
11164
|
+
"-translate-y-1/2",
|
|
11165
|
+
orientation === "vertical" ? "h-[20px] w-full" : "h-full w-[20px]"
|
|
11166
|
+
)
|
|
11167
|
+
}
|
|
11168
|
+
),
|
|
11169
|
+
/* @__PURE__ */ jsx(
|
|
11170
|
+
"div",
|
|
11171
|
+
{
|
|
11172
|
+
"data-slot": "handle",
|
|
11173
|
+
className: cn(sliderHandleVariants({ size, orientation }), handleMotion)
|
|
11174
|
+
}
|
|
11175
|
+
),
|
|
11176
|
+
/* @__PURE__ */ jsx("div", { "data-slot": "state-layer", className: cn(sliderHandleStateLayerVariants()) }),
|
|
11177
|
+
showValueIndicator && /* @__PURE__ */ jsx(
|
|
11178
|
+
SliderValueIndicator,
|
|
11179
|
+
{
|
|
11180
|
+
value: thumbValue,
|
|
11181
|
+
...formatValue2 !== void 0 ? { formatValue: formatValue2 } : {}
|
|
11182
|
+
}
|
|
11183
|
+
)
|
|
11184
|
+
] }),
|
|
11185
|
+
[size, orientation, showValueIndicator, formatValue2, handleMotion]
|
|
11186
|
+
);
|
|
10994
11187
|
const renderStandardTrack = () => {
|
|
10995
11188
|
const pct = clampPercent(currentValues[0] ?? minValue, minValue, maxValue);
|
|
10996
|
-
const thumb0State = isDisabled ? "disabled" : thumbStates[0] ?? "enabled";
|
|
10997
11189
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
10998
11190
|
/* @__PURE__ */ jsx(
|
|
10999
11191
|
"div",
|
|
11000
11192
|
{
|
|
11001
11193
|
"data-slot": "active-track",
|
|
11002
|
-
className: cn(
|
|
11003
|
-
|
|
11004
|
-
trackTransition
|
|
11005
|
-
),
|
|
11006
|
-
style: { flexBasis: `${pct}%` },
|
|
11194
|
+
className: cn(sliderActiveTrackVariants({ size, orientation }), trackTransition),
|
|
11195
|
+
style: segmentStyle(orientation, { start: null, end: pct, endGap: GAP_PX }),
|
|
11007
11196
|
children: showIcon && /* @__PURE__ */ jsx(
|
|
11008
11197
|
"span",
|
|
11009
11198
|
{
|
|
11010
11199
|
"data-slot": "inset-icon",
|
|
11011
|
-
className: cn(
|
|
11012
|
-
sliderInsetIconVariants({
|
|
11013
|
-
size,
|
|
11014
|
-
orientation
|
|
11015
|
-
})
|
|
11016
|
-
),
|
|
11200
|
+
className: cn(sliderInsetIconVariants({ size, orientation })),
|
|
11017
11201
|
children: icon
|
|
11018
11202
|
}
|
|
11019
11203
|
)
|
|
11020
11204
|
}
|
|
11021
11205
|
),
|
|
11022
|
-
/* @__PURE__ */ jsxs(
|
|
11023
|
-
"div",
|
|
11024
|
-
{
|
|
11025
|
-
"data-slot": "handle",
|
|
11026
|
-
className: cn(
|
|
11027
|
-
sliderHandleVariants({
|
|
11028
|
-
size,
|
|
11029
|
-
disabled: isDisabled,
|
|
11030
|
-
pressed: thumb0State === "pressed",
|
|
11031
|
-
orientation
|
|
11032
|
-
}),
|
|
11033
|
-
handleMotion
|
|
11034
|
-
),
|
|
11035
|
-
onPointerEnter: () => {
|
|
11036
|
-
if (!isDisabled) setThumbStates(["hovered"]);
|
|
11037
|
-
},
|
|
11038
|
-
onPointerLeave: () => {
|
|
11039
|
-
if (!isDisabled) setThumbStates(["enabled"]);
|
|
11040
|
-
},
|
|
11041
|
-
onPointerDown: (e) => {
|
|
11042
|
-
e.stopPropagation();
|
|
11043
|
-
if (!isDisabled) setThumbStates(["pressed"]);
|
|
11044
|
-
},
|
|
11045
|
-
onPointerUp: (e) => {
|
|
11046
|
-
e.stopPropagation();
|
|
11047
|
-
if (!isDisabled) setThumbStates(["enabled"]);
|
|
11048
|
-
},
|
|
11049
|
-
children: [
|
|
11050
|
-
/* @__PURE__ */ jsx(
|
|
11051
|
-
"div",
|
|
11052
|
-
{
|
|
11053
|
-
"data-slot": "state-layer",
|
|
11054
|
-
className: cn(
|
|
11055
|
-
sliderHandleStateLayerVariants({ state: thumb0State }),
|
|
11056
|
-
stateLayerMotion
|
|
11057
|
-
)
|
|
11058
|
-
}
|
|
11059
|
-
),
|
|
11060
|
-
showValueIndicator && /* @__PURE__ */ jsx(
|
|
11061
|
-
SliderValueIndicator,
|
|
11062
|
-
{
|
|
11063
|
-
value: currentValues[0] ?? minValue,
|
|
11064
|
-
isVisible: thumb0State === "pressed",
|
|
11065
|
-
...formatValue2 !== void 0 ? { formatValue: formatValue2 } : {}
|
|
11066
|
-
}
|
|
11067
|
-
)
|
|
11068
|
-
]
|
|
11069
|
-
}
|
|
11070
|
-
),
|
|
11071
11206
|
/* @__PURE__ */ jsx(
|
|
11072
11207
|
"div",
|
|
11073
11208
|
{
|
|
11074
11209
|
"data-slot": "inactive-track",
|
|
11075
|
-
className: cn(
|
|
11076
|
-
|
|
11077
|
-
trackTransition
|
|
11078
|
-
),
|
|
11079
|
-
style: { flexBasis: `${100 - pct}%` },
|
|
11210
|
+
className: cn(sliderInactiveTrackVariants({ size, orientation }), trackTransition),
|
|
11211
|
+
style: segmentStyle(orientation, { start: pct, startGap: GAP_PX, end: null }),
|
|
11080
11212
|
children: showStops && /* @__PURE__ */ jsx(
|
|
11081
11213
|
"span",
|
|
11082
11214
|
{
|
|
@@ -11091,20 +11223,13 @@ var Slider = forwardRef(
|
|
|
11091
11223
|
const renderRangeTrack = () => {
|
|
11092
11224
|
const leftPct = clampPercent(currentValues[0] ?? minValue, minValue, maxValue);
|
|
11093
11225
|
const rightPct = clampPercent(currentValues[1] ?? maxValue, minValue, maxValue);
|
|
11094
|
-
const thumb0State = isDisabled ? "disabled" : thumbStates[0] ?? "enabled";
|
|
11095
|
-
const thumb1State = isDisabled ? "disabled" : thumbStates[1] ?? "enabled";
|
|
11096
|
-
const setThumb0 = (next) => setThumbStates((s) => [next, s[1] ?? "enabled"]);
|
|
11097
|
-
const setThumb1 = (next) => setThumbStates((s) => [s[0] ?? "enabled", next]);
|
|
11098
11226
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
11099
11227
|
/* @__PURE__ */ jsx(
|
|
11100
11228
|
"div",
|
|
11101
11229
|
{
|
|
11102
11230
|
"data-slot": "inactive-track-left",
|
|
11103
|
-
className: cn(
|
|
11104
|
-
|
|
11105
|
-
trackTransition
|
|
11106
|
-
),
|
|
11107
|
-
style: { flexBasis: `${leftPct}%` },
|
|
11231
|
+
className: cn(sliderInactiveTrackVariants({ size, orientation }), trackTransition),
|
|
11232
|
+
style: segmentStyle(orientation, { start: null, end: leftPct, endGap: GAP_PX }),
|
|
11108
11233
|
children: showStops && /* @__PURE__ */ jsx(
|
|
11109
11234
|
"span",
|
|
11110
11235
|
{
|
|
@@ -11114,128 +11239,30 @@ var Slider = forwardRef(
|
|
|
11114
11239
|
)
|
|
11115
11240
|
}
|
|
11116
11241
|
),
|
|
11117
|
-
/* @__PURE__ */ jsxs(
|
|
11118
|
-
"div",
|
|
11119
|
-
{
|
|
11120
|
-
"data-slot": "handle",
|
|
11121
|
-
"data-index": "0",
|
|
11122
|
-
className: cn(
|
|
11123
|
-
sliderHandleVariants({
|
|
11124
|
-
size,
|
|
11125
|
-
disabled: isDisabled,
|
|
11126
|
-
pressed: thumb0State === "pressed",
|
|
11127
|
-
orientation
|
|
11128
|
-
}),
|
|
11129
|
-
handleMotion
|
|
11130
|
-
),
|
|
11131
|
-
onPointerEnter: () => {
|
|
11132
|
-
if (!isDisabled) setThumb0("hovered");
|
|
11133
|
-
},
|
|
11134
|
-
onPointerLeave: () => {
|
|
11135
|
-
if (!isDisabled) setThumb0("enabled");
|
|
11136
|
-
},
|
|
11137
|
-
onPointerDown: (e) => {
|
|
11138
|
-
e.stopPropagation();
|
|
11139
|
-
if (!isDisabled) setThumb0("pressed");
|
|
11140
|
-
},
|
|
11141
|
-
onPointerUp: (e) => {
|
|
11142
|
-
e.stopPropagation();
|
|
11143
|
-
if (!isDisabled) setThumb0("enabled");
|
|
11144
|
-
},
|
|
11145
|
-
children: [
|
|
11146
|
-
/* @__PURE__ */ jsx(
|
|
11147
|
-
"div",
|
|
11148
|
-
{
|
|
11149
|
-
"data-slot": "state-layer",
|
|
11150
|
-
className: cn(
|
|
11151
|
-
sliderHandleStateLayerVariants({ state: thumb0State }),
|
|
11152
|
-
stateLayerMotion
|
|
11153
|
-
)
|
|
11154
|
-
}
|
|
11155
|
-
),
|
|
11156
|
-
showValueIndicator && /* @__PURE__ */ jsx(
|
|
11157
|
-
SliderValueIndicator,
|
|
11158
|
-
{
|
|
11159
|
-
value: currentValues[0] ?? minValue,
|
|
11160
|
-
isVisible: thumb0State === "pressed",
|
|
11161
|
-
...formatValue2 !== void 0 ? { formatValue: formatValue2 } : {}
|
|
11162
|
-
}
|
|
11163
|
-
)
|
|
11164
|
-
]
|
|
11165
|
-
}
|
|
11166
|
-
),
|
|
11167
11242
|
/* @__PURE__ */ jsx(
|
|
11168
11243
|
"div",
|
|
11169
11244
|
{
|
|
11170
11245
|
"data-slot": "active-track",
|
|
11171
11246
|
className: cn(
|
|
11172
|
-
sliderActiveTrackVariants({ size,
|
|
11247
|
+
sliderActiveTrackVariants({ size, orientation }),
|
|
11173
11248
|
"rounded-[2px]",
|
|
11174
|
-
// Both ends near handles: 2dp (MD3 §10.2)
|
|
11249
|
+
// Both ends near handles: 2dp inner (MD3 §10.2)
|
|
11175
11250
|
trackTransition
|
|
11176
11251
|
),
|
|
11177
|
-
style:
|
|
11178
|
-
|
|
11179
|
-
|
|
11180
|
-
|
|
11181
|
-
|
|
11182
|
-
|
|
11183
|
-
"data-slot": "handle",
|
|
11184
|
-
"data-index": "1",
|
|
11185
|
-
className: cn(
|
|
11186
|
-
sliderHandleVariants({
|
|
11187
|
-
size,
|
|
11188
|
-
disabled: isDisabled,
|
|
11189
|
-
pressed: thumb1State === "pressed",
|
|
11190
|
-
orientation
|
|
11191
|
-
}),
|
|
11192
|
-
handleMotion
|
|
11193
|
-
),
|
|
11194
|
-
onPointerEnter: () => {
|
|
11195
|
-
if (!isDisabled) setThumb1("hovered");
|
|
11196
|
-
},
|
|
11197
|
-
onPointerLeave: () => {
|
|
11198
|
-
if (!isDisabled) setThumb1("enabled");
|
|
11199
|
-
},
|
|
11200
|
-
onPointerDown: (e) => {
|
|
11201
|
-
e.stopPropagation();
|
|
11202
|
-
if (!isDisabled) setThumb1("pressed");
|
|
11203
|
-
},
|
|
11204
|
-
onPointerUp: (e) => {
|
|
11205
|
-
e.stopPropagation();
|
|
11206
|
-
if (!isDisabled) setThumb1("enabled");
|
|
11207
|
-
},
|
|
11208
|
-
children: [
|
|
11209
|
-
/* @__PURE__ */ jsx(
|
|
11210
|
-
"div",
|
|
11211
|
-
{
|
|
11212
|
-
"data-slot": "state-layer",
|
|
11213
|
-
className: cn(
|
|
11214
|
-
sliderHandleStateLayerVariants({ state: thumb1State }),
|
|
11215
|
-
stateLayerMotion
|
|
11216
|
-
)
|
|
11217
|
-
}
|
|
11218
|
-
),
|
|
11219
|
-
showValueIndicator && /* @__PURE__ */ jsx(
|
|
11220
|
-
SliderValueIndicator,
|
|
11221
|
-
{
|
|
11222
|
-
value: currentValues[1] ?? maxValue,
|
|
11223
|
-
isVisible: thumb1State === "pressed",
|
|
11224
|
-
...formatValue2 !== void 0 ? { formatValue: formatValue2 } : {}
|
|
11225
|
-
}
|
|
11226
|
-
)
|
|
11227
|
-
]
|
|
11252
|
+
style: segmentStyle(orientation, {
|
|
11253
|
+
start: leftPct,
|
|
11254
|
+
startGap: GAP_PX,
|
|
11255
|
+
end: rightPct,
|
|
11256
|
+
endGap: GAP_PX
|
|
11257
|
+
})
|
|
11228
11258
|
}
|
|
11229
11259
|
),
|
|
11230
11260
|
/* @__PURE__ */ jsx(
|
|
11231
11261
|
"div",
|
|
11232
11262
|
{
|
|
11233
11263
|
"data-slot": "inactive-track-right",
|
|
11234
|
-
className: cn(
|
|
11235
|
-
|
|
11236
|
-
trackTransition
|
|
11237
|
-
),
|
|
11238
|
-
style: { flexBasis: `${100 - rightPct}%` },
|
|
11264
|
+
className: cn(sliderInactiveTrackVariants({ size, orientation }), trackTransition),
|
|
11265
|
+
style: segmentStyle(orientation, { start: rightPct, startGap: GAP_PX, end: null }),
|
|
11239
11266
|
children: showStops && /* @__PURE__ */ jsx(
|
|
11240
11267
|
"span",
|
|
11241
11268
|
{
|
|
@@ -11250,126 +11277,65 @@ var Slider = forwardRef(
|
|
|
11250
11277
|
const renderCenteredTrack = () => {
|
|
11251
11278
|
const thumbPct = clampPercent(currentValues[0] ?? minValue, minValue, maxValue);
|
|
11252
11279
|
const zeroPct = minValue >= 0 ? 0 : maxValue <= 0 ? 100 : (0 - minValue) / (maxValue - minValue) * 100;
|
|
11253
|
-
const thumb0State = isDisabled ? "disabled" : thumbStates[0] ?? "enabled";
|
|
11254
|
-
const handleEl = /* @__PURE__ */ jsxs(
|
|
11255
|
-
"div",
|
|
11256
|
-
{
|
|
11257
|
-
"data-slot": "handle",
|
|
11258
|
-
className: cn(
|
|
11259
|
-
sliderHandleVariants({
|
|
11260
|
-
size,
|
|
11261
|
-
disabled: isDisabled,
|
|
11262
|
-
pressed: thumb0State === "pressed",
|
|
11263
|
-
orientation
|
|
11264
|
-
}),
|
|
11265
|
-
handleMotion
|
|
11266
|
-
),
|
|
11267
|
-
onPointerEnter: () => {
|
|
11268
|
-
if (!isDisabled) setThumbStates(["hovered"]);
|
|
11269
|
-
},
|
|
11270
|
-
onPointerLeave: () => {
|
|
11271
|
-
if (!isDisabled) setThumbStates(["enabled"]);
|
|
11272
|
-
},
|
|
11273
|
-
onPointerDown: (e) => {
|
|
11274
|
-
e.stopPropagation();
|
|
11275
|
-
if (!isDisabled) setThumbStates(["pressed"]);
|
|
11276
|
-
},
|
|
11277
|
-
onPointerUp: (e) => {
|
|
11278
|
-
e.stopPropagation();
|
|
11279
|
-
if (!isDisabled) setThumbStates(["enabled"]);
|
|
11280
|
-
},
|
|
11281
|
-
children: [
|
|
11282
|
-
/* @__PURE__ */ jsx(
|
|
11283
|
-
"div",
|
|
11284
|
-
{
|
|
11285
|
-
"data-slot": "state-layer",
|
|
11286
|
-
className: cn(sliderHandleStateLayerVariants({ state: thumb0State }), stateLayerMotion)
|
|
11287
|
-
}
|
|
11288
|
-
),
|
|
11289
|
-
showValueIndicator && /* @__PURE__ */ jsx(
|
|
11290
|
-
SliderValueIndicator,
|
|
11291
|
-
{
|
|
11292
|
-
value: currentValues[0] ?? minValue,
|
|
11293
|
-
isVisible: thumb0State === "pressed",
|
|
11294
|
-
...formatValue2 !== void 0 ? { formatValue: formatValue2 } : {}
|
|
11295
|
-
}
|
|
11296
|
-
)
|
|
11297
|
-
]
|
|
11298
|
-
}
|
|
11299
|
-
);
|
|
11300
11280
|
if (thumbPct >= zeroPct) {
|
|
11301
|
-
const activePct = thumbPct - zeroPct;
|
|
11302
11281
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
11303
11282
|
/* @__PURE__ */ jsx(
|
|
11304
11283
|
"div",
|
|
11305
11284
|
{
|
|
11306
11285
|
"data-slot": "inactive-track-left",
|
|
11307
|
-
className: cn(
|
|
11308
|
-
|
|
11309
|
-
trackTransition
|
|
11310
|
-
),
|
|
11311
|
-
style: { flexBasis: `${zeroPct}%` }
|
|
11286
|
+
className: cn(sliderInactiveTrackVariants({ size, orientation }), trackTransition),
|
|
11287
|
+
style: segmentStyle(orientation, { start: null, end: zeroPct })
|
|
11312
11288
|
}
|
|
11313
11289
|
),
|
|
11314
|
-
handleEl,
|
|
11315
11290
|
/* @__PURE__ */ jsx(
|
|
11316
11291
|
"div",
|
|
11317
11292
|
{
|
|
11318
11293
|
"data-slot": "active-track",
|
|
11319
|
-
className: cn(
|
|
11320
|
-
|
|
11321
|
-
|
|
11322
|
-
|
|
11323
|
-
|
|
11294
|
+
className: cn(sliderActiveTrackVariants({ size, orientation }), trackTransition),
|
|
11295
|
+
style: segmentStyle(orientation, {
|
|
11296
|
+
start: zeroPct,
|
|
11297
|
+
end: thumbPct,
|
|
11298
|
+
endGap: GAP_PX
|
|
11299
|
+
})
|
|
11324
11300
|
}
|
|
11325
11301
|
),
|
|
11326
11302
|
/* @__PURE__ */ jsx(
|
|
11327
11303
|
"div",
|
|
11328
11304
|
{
|
|
11329
11305
|
"data-slot": "inactive-track-right",
|
|
11330
|
-
className: cn(
|
|
11331
|
-
|
|
11332
|
-
trackTransition
|
|
11333
|
-
),
|
|
11334
|
-
style: { flexBasis: `${100 - zeroPct - activePct}%` }
|
|
11306
|
+
className: cn(sliderInactiveTrackVariants({ size, orientation }), trackTransition),
|
|
11307
|
+
style: segmentStyle(orientation, { start: thumbPct, startGap: GAP_PX, end: null })
|
|
11335
11308
|
}
|
|
11336
11309
|
)
|
|
11337
11310
|
] });
|
|
11338
11311
|
} else {
|
|
11339
|
-
const activePct = zeroPct - thumbPct;
|
|
11340
11312
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
11341
11313
|
/* @__PURE__ */ jsx(
|
|
11342
11314
|
"div",
|
|
11343
11315
|
{
|
|
11344
11316
|
"data-slot": "inactive-track-left",
|
|
11345
|
-
className: cn(
|
|
11346
|
-
|
|
11347
|
-
trackTransition
|
|
11348
|
-
),
|
|
11349
|
-
style: { flexBasis: `${thumbPct}%` }
|
|
11317
|
+
className: cn(sliderInactiveTrackVariants({ size, orientation }), trackTransition),
|
|
11318
|
+
style: segmentStyle(orientation, { start: null, end: thumbPct, endGap: GAP_PX })
|
|
11350
11319
|
}
|
|
11351
11320
|
),
|
|
11352
11321
|
/* @__PURE__ */ jsx(
|
|
11353
11322
|
"div",
|
|
11354
11323
|
{
|
|
11355
11324
|
"data-slot": "active-track",
|
|
11356
|
-
className: cn(
|
|
11357
|
-
|
|
11358
|
-
|
|
11359
|
-
|
|
11360
|
-
|
|
11325
|
+
className: cn(sliderActiveTrackVariants({ size, orientation }), trackTransition),
|
|
11326
|
+
style: segmentStyle(orientation, {
|
|
11327
|
+
start: thumbPct,
|
|
11328
|
+
startGap: GAP_PX,
|
|
11329
|
+
end: zeroPct
|
|
11330
|
+
})
|
|
11361
11331
|
}
|
|
11362
11332
|
),
|
|
11363
|
-
handleEl,
|
|
11364
11333
|
/* @__PURE__ */ jsx(
|
|
11365
11334
|
"div",
|
|
11366
11335
|
{
|
|
11367
11336
|
"data-slot": "inactive-track-right",
|
|
11368
|
-
className: cn(
|
|
11369
|
-
|
|
11370
|
-
trackTransition
|
|
11371
|
-
),
|
|
11372
|
-
style: { flexBasis: `${100 - zeroPct}%` }
|
|
11337
|
+
className: cn(sliderInactiveTrackVariants({ size, orientation }), trackTransition),
|
|
11338
|
+
style: segmentStyle(orientation, { start: zeroPct, end: null })
|
|
11373
11339
|
}
|
|
11374
11340
|
)
|
|
11375
11341
|
] });
|
|
@@ -11392,11 +11358,11 @@ var Slider = forwardRef(
|
|
|
11392
11358
|
...value !== void 0 ? { value } : {},
|
|
11393
11359
|
...defaultValue !== void 0 ? { defaultValue } : {},
|
|
11394
11360
|
...onChangeEnd !== void 0 ? { onChangeEnd } : {},
|
|
11395
|
-
|
|
11396
|
-
|
|
11397
|
-
|
|
11398
|
-
),
|
|
11399
|
-
children: /* @__PURE__ */ jsxs("div", { "data-slot": "track-layout", className: cn(sliderTrackLayoutVariants(
|
|
11361
|
+
renderThumbContent,
|
|
11362
|
+
onThumbDraggingChange: handleThumbDraggingChange,
|
|
11363
|
+
className: cn(sliderContainerVariants({ size, orientation }), className),
|
|
11364
|
+
trackClassName: sliderTrackRegionVariants({ size, orientation }),
|
|
11365
|
+
children: /* @__PURE__ */ jsxs("div", { "data-slot": "track-layout", className: cn(sliderTrackLayoutVariants()), children: [
|
|
11400
11366
|
isRange ? renderRangeTrack() : isCentered ? renderCenteredTrack() : renderStandardTrack(),
|
|
11401
11367
|
canShowStops && /* @__PURE__ */ jsx(
|
|
11402
11368
|
SliderStops,
|
|
@@ -11406,7 +11372,7 @@ var Slider = forwardRef(
|
|
|
11406
11372
|
step,
|
|
11407
11373
|
values: currentValues,
|
|
11408
11374
|
variant,
|
|
11409
|
-
|
|
11375
|
+
size
|
|
11410
11376
|
}
|
|
11411
11377
|
)
|
|
11412
11378
|
] })
|
|
@@ -15911,6 +15877,6 @@ var DateField = forwardRef((props, forwardedRef) => {
|
|
|
15911
15877
|
});
|
|
15912
15878
|
DateField.displayName = "DateField";
|
|
15913
15879
|
|
|
15914
|
-
export { AppBar, AppBarHeadless, Badge, BadgeContent, BadgeHeadless, BottomSheet, BottomSheetContext, BottomSheetHandle, BottomSheetHeadless, Button, ButtonGroup, ButtonGroupContext, ButtonGroupHeadless, CalendarCore, Card, CardActions, CardContent, CardHeader, CardHeadless, CardMedia, Checkbox, Chip, ChipHeadless, ChipSet, DateField, DatePicker, DatePickerDocked, DatePickerModal, DatePickerModalInput, Dialog, DialogActions, DialogContent, DialogContext, DialogHeadless, DialogHeadline, Divider, DividerHeadless, Drawer, DrawerIconOnlyContext, DrawerItem, DrawerSection, FAB, FABHeadless, FABMenu, FABMenuContext, FABMenuHeadless, FABMenuItem, HeadlessDrawer, HeadlessDrawerItem, HeadlessMenu, HeadlessMenuDivider, HeadlessMenuItem, HeadlessMenuSection, HeadlessMenuTrigger, HeadlessNavigationBar, HeadlessNavigationBarItem, HeadlessTab, HeadlessTabList, HeadlessTabPanel, IconButton, IconButtonHeadless, List, ListHeadless, ListItem, ListItemHeadless, ListItemLeading, ListItemText, ListItemTrailing, Menu, MenuContext, MenuDivider, MenuItem, MenuSection, MenuTrigger, NavigationBar, NavigationBarItem, Progress, ProgressHeadless, Radio, RadioGroup, RadioGroupHeadless, RadioHeadless, RichTooltip, STATE_LAYER_OPACITY, Search, SearchBar, SearchBarHeadless, SearchView, SearchViewHeadless, Slider, SliderHeadless, Snackbar, SnackbarContext, SnackbarHeadless, SnackbarProvider, SplitButton, SplitButtonHeadless, StyledActionButton, StyledCalendarCell, StyledCalendarTitle, StyledNavButton, StyledWeekday, StyledYearItem, Switch, TYPOGRAPHY_ELEMENT_MAP, TYPOGRAPHY_USAGE, Tab, TabList, TabPanel, Tabs, TextField, TimePicker, TimePickerDial, TimePickerInput, Tooltip, TooltipOverlayHeadless, TooltipTrigger, TooltipTriggerHeadless, actionButtonFocusRingVariants, actionButtonStateLayerVariants, actionButtonVariants, actionRowVariants, applyStateLayer, badgeVariants2 as badgeVariants, bottomSheetAnimationVariants, bottomSheetHandlePillVariants, bottomSheetHandleWrapperVariants, bottomSheetScrimVariants, bottomSheetVariants, buttonGroupFocusRingVariants, buttonGroupRootVariants, buttonGroupVariants, calendarCellFocusRingVariants, calendarCellStateLayerVariants, calendarCellVariants, calendarDividerVariants, calendarHeaderVariants, calendarTitleIconVariants, calendarTitleStateLayerVariants, calendarTitleTextVariants, calendarTitleVariants, cardVariants, chipVariants, clockDialContainerVariants, clockDialNumberVariants, clockHandCenterVariants, clockHandHandleVariants, clockHandTrackVariants, cn, dateFieldVariants, dateInputErrorVariants, dateInputFieldGroupVariants, dateInputFieldVariants, dateInputLabelVariants, datePickerContainerVariants, dateSegmentPlaceholderVariants, dividerVariants, dockedFieldGroupVariants, dockedLabelVariants, dockedTriggerStateLayerVariants, dockedTriggerVariants, fabMenuItemFocusRingVariants, fabMenuItemIconVariants, fabMenuItemLabelVariants, fabMenuItemStateLayerVariants, fabMenuItemVariants, fabMenuListVariants, fabMenuVariants, generateMD3Theme, getColorValue, getConnectedRadiusClasses, getFontFamily, getMD3Color, getResponsiveTypography, getTypographyClassName, getTypographyForElement, getTypographyStyle, getTypographyToken, headlineVariants, hexToRgb, listItemVariants, listVariants, modalDialogVariants, modalHeaderVariants, modeToggleStateLayerVariants, modeToggleVariants, navButtonFocusRingVariants, navButtonStateLayerVariants, navButtonVariants, periodSelectorContainerVariants, periodSelectorItemVariants, popoverVariants, pxToRem, remToPx, rgbToHex, richTooltipVariants, scrimVariants2 as scrimVariants,
|
|
15880
|
+
export { AppBar, AppBarHeadless, Badge, BadgeContent, BadgeHeadless, BottomSheet, BottomSheetContext, BottomSheetHandle, BottomSheetHeadless, Button, ButtonGroup, ButtonGroupContext, ButtonGroupHeadless, CalendarCore, Card, CardActions, CardContent, CardHeader, CardHeadless, CardMedia, Checkbox, Chip, ChipHeadless, ChipSet, DateField, DatePicker, DatePickerDocked, DatePickerModal, DatePickerModalInput, Dialog, DialogActions, DialogContent, DialogContext, DialogHeadless, DialogHeadline, Divider, DividerHeadless, Drawer, DrawerIconOnlyContext, DrawerItem, DrawerSection, FAB, FABHeadless, FABMenu, FABMenuContext, FABMenuHeadless, FABMenuItem, HeadlessDrawer, HeadlessDrawerItem, HeadlessMenu, HeadlessMenuDivider, HeadlessMenuItem, HeadlessMenuSection, HeadlessMenuTrigger, HeadlessNavigationBar, HeadlessNavigationBarItem, HeadlessTab, HeadlessTabList, HeadlessTabPanel, IconButton, IconButtonHeadless, List, ListHeadless, ListItem, ListItemHeadless, ListItemLeading, ListItemText, ListItemTrailing, Menu, MenuContext, MenuDivider, MenuItem, MenuSection, MenuTrigger, NavigationBar, NavigationBarItem, Progress, ProgressHeadless, Radio, RadioGroup, RadioGroupHeadless, RadioHeadless, RichTooltip, STATE_LAYER_OPACITY, Search, SearchBar, SearchBarHeadless, SearchView, SearchViewHeadless, Slider, SliderHeadless, Snackbar, SnackbarContext, SnackbarHeadless, SnackbarProvider, SplitButton, SplitButtonHeadless, StyledActionButton, StyledCalendarCell, StyledCalendarTitle, StyledNavButton, StyledWeekday, StyledYearItem, Switch, TYPOGRAPHY_ELEMENT_MAP, TYPOGRAPHY_USAGE, Tab, TabList, TabPanel, Tabs, TextField, TimePicker, TimePickerDial, TimePickerInput, Tooltip, TooltipOverlayHeadless, TooltipTrigger, TooltipTriggerHeadless, actionButtonFocusRingVariants, actionButtonStateLayerVariants, actionButtonVariants, actionRowVariants, applyStateLayer, badgeVariants2 as badgeVariants, bottomSheetAnimationVariants, bottomSheetHandlePillVariants, bottomSheetHandleWrapperVariants, bottomSheetScrimVariants, bottomSheetVariants, buttonGroupFocusRingVariants, buttonGroupRootVariants, buttonGroupVariants, calendarCellFocusRingVariants, calendarCellStateLayerVariants, calendarCellVariants, calendarDividerVariants, calendarHeaderVariants, calendarTitleIconVariants, calendarTitleStateLayerVariants, calendarTitleTextVariants, calendarTitleVariants, cardVariants, chipVariants, clockDialContainerVariants, clockDialNumberVariants, clockHandCenterVariants, clockHandHandleVariants, clockHandTrackVariants, cn, dateFieldVariants, dateInputErrorVariants, dateInputFieldGroupVariants, dateInputFieldVariants, dateInputLabelVariants, datePickerContainerVariants, dateSegmentPlaceholderVariants, dividerVariants, dockedFieldGroupVariants, dockedLabelVariants, dockedTriggerStateLayerVariants, dockedTriggerVariants, fabMenuItemFocusRingVariants, fabMenuItemIconVariants, fabMenuItemLabelVariants, fabMenuItemStateLayerVariants, fabMenuItemVariants, fabMenuListVariants, fabMenuVariants, generateMD3Theme, getColorValue, getConnectedRadiusClasses, getFontFamily, getMD3Color, getResponsiveTypography, getTypographyClassName, getTypographyForElement, getTypographyStyle, getTypographyToken, headlineVariants, hexToRgb, listItemVariants, listVariants, modalDialogVariants, modalHeaderVariants, modeToggleStateLayerVariants, modeToggleVariants, navButtonFocusRingVariants, navButtonStateLayerVariants, navButtonVariants, periodSelectorContainerVariants, periodSelectorItemVariants, popoverVariants, pxToRem, remToPx, rgbToHex, richTooltipVariants, scrimVariants2 as scrimVariants, searchBarAvatarVariants, searchBarFocusRingVariants, searchBarInputVariants, searchBarLeadingIconVariants, searchBarRootVariants, searchBarStateLayerVariants, searchBarTrailingActionVariants, searchBarTrailingActionsVariants, searchViewBackButtonVariants, searchViewClearButtonVariants, searchViewContentVariants, searchViewDividerVariants, searchViewHeaderVariants, searchViewInputVariants, searchViewTrailingActionVariants, searchViewTrailingActionsVariants, searchViewVariants, sliderActiveTrackVariants, sliderContainerVariants, sliderHandleStateLayerVariants, sliderHandleVariants, sliderInactiveTrackVariants, sliderTrackLayoutVariants, splitButtonContainerVariants, splitButtonDropdownVariants, splitButtonPrimaryVariants, splitButtonVariants, supportingTextVariants, timeInputFieldVariants, timePickerActionButtonVariants, timePickerActionRowVariants, timePickerContainerVariants, timePickerHeadlineVariants, timePickerModeToggleVariants, timeSelectorContainerVariants, timeSeparatorVariants, tooltipVariants, truncateText, useBottomSheetContext, useBottomSheetDrag, useButtonGroup, useDialogContext, useFABMenuContext, useMenuContext, useOptionalButtonGroup, useSnackbar, weekdayVariants, withOpacity, yearGridVariants, yearItemFocusRingVariants, yearItemStateLayerVariants, yearItemVariants };
|
|
15915
15881
|
//# sourceMappingURL=index.js.map
|
|
15916
15882
|
//# sourceMappingURL=index.js.map
|