@strapi/design-system 2.0.0-rc.24 → 2.0.0-rc.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Combobox/Combobox.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +1 -0
- package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/components/DateTimePicker/DateTimePicker.d.ts.map +1 -1
- package/dist/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/Searchbar/Searchbar.d.ts.map +1 -1
- package/dist/components/Select/SelectParts.d.ts.map +1 -1
- package/dist/components/SimpleMenu/Menu.d.ts +3 -1
- package/dist/components/SimpleMenu/Menu.d.ts.map +1 -1
- package/dist/components/SimpleMenu/SimpleMenu.d.ts +3 -2
- package/dist/components/SimpleMenu/SimpleMenu.d.ts.map +1 -1
- package/dist/components/SimpleMenu/utils.d.ts +6 -0
- package/dist/components/SimpleMenu/utils.d.ts.map +1 -0
- package/dist/components/Textarea/Textarea.d.ts.map +1 -1
- package/dist/components/TimePicker/TimePicker.d.ts.map +1 -1
- package/dist/index.js +315 -299
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +99 -85
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { DateFormatter, getLocalTimeZone, today, minDate, maxDate, startOfMonth,
|
|
|
5
5
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
6
6
|
import * as Tooltip from "@radix-ui/react-tooltip";
|
|
7
7
|
import { Provider as Provider$1 } from "@radix-ui/react-tooltip";
|
|
8
|
-
import { styled, css, keyframes, useTheme, createGlobalStyle, ThemeProvider } from "styled-components";
|
|
8
|
+
import styled$1, { styled, css, keyframes, useTheme, createGlobalStyle, ThemeProvider } from "styled-components";
|
|
9
9
|
import * as DismissibleLayerPrimitive from "@radix-ui/react-dismissable-layer";
|
|
10
10
|
import { useCallbackRef as useCallbackRef$1, Combobox as Combobox$1, Select, composeEventHandlers, usePrev } from "@strapi/ui-primitives";
|
|
11
11
|
import { composeEventHandlers as composeEventHandlers2, useCallbackRef as useCallbackRef2, useCollator, useFilter } from "@strapi/ui-primitives";
|
|
@@ -586,7 +586,7 @@ const Trigger$7 = React.forwardRef(
|
|
|
586
586
|
return /* @__PURE__ */ jsxs(AccordionTrigger, { $caretPosition: caretPosition, $size: size, ref: forwardedRef, ...restProps, children: [
|
|
587
587
|
caretPosition === "left" ? /* @__PURE__ */ jsx(TriggerIcon, { $size: size, children: /* @__PURE__ */ jsx(CaretDown, { width: size === "S" ? "1.2rem" : "1.6rem", height: size === "S" ? "1.2rem" : "1.6rem" }) }) : null,
|
|
588
588
|
/* @__PURE__ */ jsxs(Flex, { tag: "span", gap: 2, overflow: "hidden", children: [
|
|
589
|
-
Icon && size === "S" ? /* @__PURE__ */ jsx(IconBox$
|
|
589
|
+
Icon && size === "S" ? /* @__PURE__ */ jsx(IconBox$1, { children: /* @__PURE__ */ jsx(Icon, { ...iconProps }) }) : null,
|
|
590
590
|
/* @__PURE__ */ jsxs(Flex, { alignItems: "flex-start", direction: "column", tag: "span", ref: forwardedRef, overflow: "hidden", children: [
|
|
591
591
|
/* @__PURE__ */ jsx(
|
|
592
592
|
Typography,
|
|
@@ -606,7 +606,7 @@ const Trigger$7 = React.forwardRef(
|
|
|
606
606
|
] });
|
|
607
607
|
}
|
|
608
608
|
);
|
|
609
|
-
const IconBox$
|
|
609
|
+
const IconBox$1 = styled(Box)`
|
|
610
610
|
color: ${(props) => props.theme.colors.neutral500};
|
|
611
611
|
display: flex;
|
|
612
612
|
|
|
@@ -703,7 +703,7 @@ const AccordionHeader = styled(RadixAccordion.Header)`
|
|
|
703
703
|
& > ${AccordionTrigger} {
|
|
704
704
|
color: ${(props) => props.theme.colors.primary600};
|
|
705
705
|
|
|
706
|
-
& ${IconBox$
|
|
706
|
+
& ${IconBox$1} {
|
|
707
707
|
color: ${(props) => props.theme.colors.primary600};
|
|
708
708
|
}
|
|
709
709
|
|
|
@@ -1684,8 +1684,8 @@ const IconButtonWrapper = styled(Flex)`
|
|
|
1684
1684
|
switch (props.$size) {
|
|
1685
1685
|
case "XS": {
|
|
1686
1686
|
return css`
|
|
1687
|
-
padding-block: 0.
|
|
1688
|
-
padding-inline: 0.
|
|
1687
|
+
padding-block: 0.2rem;
|
|
1688
|
+
padding-inline: 0.2rem;
|
|
1689
1689
|
`;
|
|
1690
1690
|
}
|
|
1691
1691
|
case "S": {
|
|
@@ -1793,6 +1793,30 @@ const LinkWrapper$1 = styled(BaseLinkImpl)`
|
|
|
1793
1793
|
|
|
1794
1794
|
${focus};
|
|
1795
1795
|
`;
|
|
1796
|
+
const getBackgroundColorHover = (variant2) => {
|
|
1797
|
+
switch (variant2) {
|
|
1798
|
+
case "danger":
|
|
1799
|
+
return "danger100";
|
|
1800
|
+
default:
|
|
1801
|
+
return "primary100";
|
|
1802
|
+
}
|
|
1803
|
+
};
|
|
1804
|
+
const getTextColor = (variant2, disabled) => {
|
|
1805
|
+
switch (variant2) {
|
|
1806
|
+
case "danger":
|
|
1807
|
+
return disabled ? "danger500" : "danger700";
|
|
1808
|
+
default:
|
|
1809
|
+
return disabled ? "neutral500" : "neutral800";
|
|
1810
|
+
}
|
|
1811
|
+
};
|
|
1812
|
+
const getIconColor = (variant2, disabled) => {
|
|
1813
|
+
switch (variant2) {
|
|
1814
|
+
case "danger":
|
|
1815
|
+
return disabled ? "danger500" : "danger700";
|
|
1816
|
+
default:
|
|
1817
|
+
return disabled ? "neutral300" : "neutral500";
|
|
1818
|
+
}
|
|
1819
|
+
};
|
|
1796
1820
|
const MenuRoot = DropdownMenu.Root;
|
|
1797
1821
|
const MenuTrigger = React.forwardRef(
|
|
1798
1822
|
({ label, endIcon = /* @__PURE__ */ jsx(CaretDown, { width: "1.2rem", height: "1.2rem", "aria-hidden": true }), tag = Button, icon, ...rest }, ref) => {
|
|
@@ -1859,35 +1883,46 @@ const DropdownMenuContent = styled(DropdownMenu.Content)`
|
|
|
1859
1883
|
}
|
|
1860
1884
|
}
|
|
1861
1885
|
`;
|
|
1862
|
-
const MenuItem$1 = ({
|
|
1886
|
+
const MenuItem$1 = ({
|
|
1887
|
+
onSelect,
|
|
1888
|
+
disabled = false,
|
|
1889
|
+
isLink,
|
|
1890
|
+
startIcon,
|
|
1891
|
+
endIcon,
|
|
1892
|
+
isExternal,
|
|
1893
|
+
variant: variant2 = "default",
|
|
1894
|
+
...props
|
|
1895
|
+
}) => {
|
|
1863
1896
|
return /* @__PURE__ */ jsx(DropdownMenu.Item, { asChild: true, onSelect, disabled, children: isLink || isExternal ? /* @__PURE__ */ jsx(
|
|
1864
1897
|
OptionLink,
|
|
1865
1898
|
{
|
|
1866
|
-
color:
|
|
1899
|
+
color: getTextColor(variant2, disabled),
|
|
1867
1900
|
startIcon,
|
|
1868
1901
|
endIcon,
|
|
1869
1902
|
...props,
|
|
1870
1903
|
isExternal: isExternal ?? false,
|
|
1871
|
-
|
|
1904
|
+
$variant: variant2,
|
|
1905
|
+
children: props.children
|
|
1872
1906
|
}
|
|
1873
1907
|
) : /* @__PURE__ */ jsxs(
|
|
1874
1908
|
OptionButton,
|
|
1875
1909
|
{
|
|
1876
1910
|
cursor: "pointer",
|
|
1877
|
-
color:
|
|
1911
|
+
color: getTextColor(variant2, disabled),
|
|
1878
1912
|
background: "transparent",
|
|
1879
1913
|
borderStyle: "none",
|
|
1880
1914
|
gap: 2,
|
|
1915
|
+
$variant: variant2,
|
|
1881
1916
|
...props,
|
|
1882
1917
|
children: [
|
|
1883
|
-
startIcon && /* @__PURE__ */ jsx(Flex, { tag: "span", "aria-hidden": true, children: startIcon }),
|
|
1918
|
+
startIcon && /* @__PURE__ */ jsx(Flex, { tag: "span", color: getIconColor(variant2, disabled), "aria-hidden": true, children: startIcon }),
|
|
1884
1919
|
/* @__PURE__ */ jsx(Typography, { grow: 1, children: props.children }),
|
|
1885
|
-
endIcon && /* @__PURE__ */ jsx(Flex, { tag: "span", "aria-hidden": true, children: endIcon })
|
|
1920
|
+
endIcon && /* @__PURE__ */ jsx(Flex, { tag: "span", color: getIconColor(variant2, disabled), "aria-hidden": true, children: endIcon })
|
|
1886
1921
|
]
|
|
1887
1922
|
}
|
|
1888
1923
|
) });
|
|
1889
1924
|
};
|
|
1890
|
-
const getOptionStyle = ({ theme }) => css`
|
|
1925
|
+
const getOptionStyle = ({ theme, $variant }) => css`
|
|
1891
1926
|
text-align: left;
|
|
1892
1927
|
width: 100%;
|
|
1893
1928
|
border-radius: ${theme.borderRadius};
|
|
@@ -1895,11 +1930,10 @@ const getOptionStyle = ({ theme }) => css`
|
|
|
1895
1930
|
|
|
1896
1931
|
&[aria-disabled='true'] {
|
|
1897
1932
|
cursor: not-allowed;
|
|
1898
|
-
color: ${theme.colors.neutral500};
|
|
1899
1933
|
}
|
|
1900
1934
|
|
|
1901
1935
|
&[data-highlighted] {
|
|
1902
|
-
background-color: ${theme.colors
|
|
1936
|
+
background-color: ${theme.colors[getBackgroundColorHover($variant)]};
|
|
1903
1937
|
}
|
|
1904
1938
|
|
|
1905
1939
|
&:focus-visible {
|
|
@@ -1911,7 +1945,7 @@ const getOptionStyle = ({ theme }) => css`
|
|
|
1911
1945
|
}
|
|
1912
1946
|
`;
|
|
1913
1947
|
const OptionButton = styled(Flex)`
|
|
1914
|
-
${getOptionStyle}
|
|
1948
|
+
${({ theme, $variant }) => getOptionStyle({ theme, $variant })}
|
|
1915
1949
|
`;
|
|
1916
1950
|
const OptionLink = styled(Link)`
|
|
1917
1951
|
/* We include this here again because typically when people use OptionLink they provide an as prop which cancels the Box props */
|
|
@@ -1928,7 +1962,7 @@ const OptionLink = styled(Link)`
|
|
|
1928
1962
|
fill: currentColor;
|
|
1929
1963
|
}
|
|
1930
1964
|
|
|
1931
|
-
${getOptionStyle}
|
|
1965
|
+
${({ theme, $variant }) => getOptionStyle({ theme, $variant })}
|
|
1932
1966
|
`;
|
|
1933
1967
|
const StyledSeparator = styled(Box)`
|
|
1934
1968
|
/* Negative horizontal margin to compensate Menu.Content's padding */
|
|
@@ -2178,8 +2212,8 @@ const CheckboxRoot = styled(Checkbox.Root)`
|
|
|
2178
2212
|
// this ensures the checkbox is always a square even in flex-containers.
|
|
2179
2213
|
flex: 0 0 2rem;
|
|
2180
2214
|
|
|
2181
|
-
&[data-state='checked'],
|
|
2182
|
-
&[data-state='indeterminate'] {
|
|
2215
|
+
&[data-state='checked']:not([data-disabled]),
|
|
2216
|
+
&[data-state='indeterminate']:not([data-disabled]) {
|
|
2183
2217
|
border: 1px solid ${(props) => props.theme.colors.primary600};
|
|
2184
2218
|
background-color: ${(props) => props.theme.colors.primary600};
|
|
2185
2219
|
}
|
|
@@ -2714,8 +2748,8 @@ const InputElement = styled.input`
|
|
|
2714
2748
|
width: 100%;
|
|
2715
2749
|
background: inherit;
|
|
2716
2750
|
|
|
2717
|
-
|
|
2718
|
-
color: ${({ theme }) => theme.colors.
|
|
2751
|
+
&::placeholder {
|
|
2752
|
+
color: ${({ theme }) => theme.colors.neutral600};
|
|
2719
2753
|
opacity: 1;
|
|
2720
2754
|
}
|
|
2721
2755
|
|
|
@@ -3221,6 +3255,11 @@ const TextInput$1 = styled(Combobox$1.TextInput)`
|
|
|
3221
3255
|
outline: none;
|
|
3222
3256
|
}
|
|
3223
3257
|
|
|
3258
|
+
&::placeholder {
|
|
3259
|
+
color: ${({ theme }) => theme.colors.neutral600};
|
|
3260
|
+
opacity: 1;
|
|
3261
|
+
}
|
|
3262
|
+
|
|
3224
3263
|
&[aria-disabled='true'] {
|
|
3225
3264
|
cursor: inherit;
|
|
3226
3265
|
}
|
|
@@ -3339,22 +3378,20 @@ const OptionBox = styled.div`
|
|
|
3339
3378
|
font-weight: bold;
|
|
3340
3379
|
}
|
|
3341
3380
|
`;
|
|
3381
|
+
const setOpacity = (hex, alpha) => `${hex}${Math.floor(alpha * 255).toString(16).padStart(2, "0")}`;
|
|
3342
3382
|
const Root$5 = AlertDialog.Root;
|
|
3343
3383
|
const Trigger$4 = React.forwardRef((props, forwardedRef) => {
|
|
3344
3384
|
return /* @__PURE__ */ jsx(AlertDialog.Trigger, { ...props, asChild: true, ref: forwardedRef });
|
|
3345
3385
|
});
|
|
3346
3386
|
const Content$4 = React.forwardRef((props, forwardedRef) => {
|
|
3347
|
-
return /* @__PURE__ */
|
|
3348
|
-
/* @__PURE__ */ jsx(Overlay$1, {}),
|
|
3349
|
-
/* @__PURE__ */ jsx(ContentImpl$1, { ref: forwardedRef, ...props })
|
|
3350
|
-
] });
|
|
3387
|
+
return /* @__PURE__ */ jsx(AlertDialog.Portal, { children: /* @__PURE__ */ jsx(Overlay$1, { children: /* @__PURE__ */ jsx(ContentImpl$1, { ref: forwardedRef, ...props }) }) });
|
|
3351
3388
|
});
|
|
3352
3389
|
const Overlay$1 = styled(AlertDialog.Overlay)`
|
|
3353
|
-
background
|
|
3390
|
+
background: ${(props) => setOpacity(props.theme.colors.neutral800, 0.2)};
|
|
3354
3391
|
position: fixed;
|
|
3355
3392
|
inset: 0;
|
|
3356
3393
|
z-index: ${(props) => props.theme.zIndices.overlay};
|
|
3357
|
-
|
|
3394
|
+
will-change: opacity;
|
|
3358
3395
|
|
|
3359
3396
|
@media (prefers-reduced-motion: no-preference) {
|
|
3360
3397
|
animation: ${ANIMATIONS.overlayFadeIn} ${(props) => props.theme.motion.timings["200"]}
|
|
@@ -3703,18 +3740,14 @@ const SelectTrigger = React.forwardRef(
|
|
|
3703
3740
|
] }),
|
|
3704
3741
|
/* @__PURE__ */ jsxs(Flex, { tag: "span", gap: 3, children: [
|
|
3705
3742
|
onClear ? /* @__PURE__ */ jsx(
|
|
3706
|
-
|
|
3743
|
+
IconButton,
|
|
3707
3744
|
{
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
background: "transparent",
|
|
3711
|
-
role: "button",
|
|
3712
|
-
tabIndex: 0,
|
|
3745
|
+
size: "XS",
|
|
3746
|
+
variant: "ghost",
|
|
3713
3747
|
onClick: handleClearClick,
|
|
3714
3748
|
"aria-disabled": disabled,
|
|
3715
3749
|
"aria-label": clearLabel,
|
|
3716
|
-
|
|
3717
|
-
cursor: "pointer",
|
|
3750
|
+
label: clearLabel,
|
|
3718
3751
|
children: /* @__PURE__ */ jsx(Cross, {})
|
|
3719
3752
|
}
|
|
3720
3753
|
) : null,
|
|
@@ -3725,19 +3758,6 @@ const SelectTrigger = React.forwardRef(
|
|
|
3725
3758
|
) });
|
|
3726
3759
|
}
|
|
3727
3760
|
);
|
|
3728
|
-
const IconBox$1 = styled(Box)`
|
|
3729
|
-
border: none;
|
|
3730
|
-
display: flex;
|
|
3731
|
-
|
|
3732
|
-
svg {
|
|
3733
|
-
height: 1.1rem;
|
|
3734
|
-
width: 1.1rem;
|
|
3735
|
-
}
|
|
3736
|
-
|
|
3737
|
-
svg path {
|
|
3738
|
-
fill: ${({ theme }) => theme.colors.neutral500};
|
|
3739
|
-
}
|
|
3740
|
-
`;
|
|
3741
3761
|
const StyledTrigger = styled(Flex)`
|
|
3742
3762
|
border: 1px solid ${({ theme, $hasError }) => $hasError ? theme.colors.danger600 : theme.colors.neutral200};
|
|
3743
3763
|
${(props) => {
|
|
@@ -3780,6 +3800,7 @@ const ValueType = styled(Typography)`
|
|
|
3780
3800
|
flex: 1;
|
|
3781
3801
|
font-size: 1.4rem;
|
|
3782
3802
|
line-height: 2.2rem;
|
|
3803
|
+
min-height: 2.2rem;
|
|
3783
3804
|
`;
|
|
3784
3805
|
const StyledValue = styled(Select.Value)`
|
|
3785
3806
|
display: flex;
|
|
@@ -3848,12 +3869,6 @@ const StyledSelectItem = styled(Select.Item)`
|
|
|
3848
3869
|
background-color: ${({ theme }) => theme.colors.primary100};
|
|
3849
3870
|
cursor: pointer;
|
|
3850
3871
|
}
|
|
3851
|
-
|
|
3852
|
-
&[data-state='checked'] {
|
|
3853
|
-
font-weight: bold;
|
|
3854
|
-
color: ${({ theme }) => theme.colors.primary600};
|
|
3855
|
-
font-weight: bold;
|
|
3856
|
-
}
|
|
3857
3872
|
`;
|
|
3858
3873
|
const Root$4 = Select.Root;
|
|
3859
3874
|
const Trigger$3 = SelectTrigger;
|
|
@@ -3980,7 +3995,7 @@ const SingleSelectOption = React.forwardRef(
|
|
|
3980
3995
|
const DEFAULT_PAST_RANGE = 200;
|
|
3981
3996
|
const DEFAULT_FUTURE_RANGE = 15;
|
|
3982
3997
|
const [DatePickerProvider, useDatePickerContext] = createContext("DatePicker");
|
|
3983
|
-
const DatePicker
|
|
3998
|
+
const DatePicker = React.forwardRef(
|
|
3984
3999
|
({
|
|
3985
4000
|
/**
|
|
3986
4001
|
* DatePickerCalendar props
|
|
@@ -4109,6 +4124,7 @@ const DatePicker$1 = React.forwardRef(
|
|
|
4109
4124
|
onTextValueChange: setTextValue,
|
|
4110
4125
|
onTriggerChange: setTrigger,
|
|
4111
4126
|
onValueChange: setValue,
|
|
4127
|
+
onClear,
|
|
4112
4128
|
required,
|
|
4113
4129
|
textInput,
|
|
4114
4130
|
textValue,
|
|
@@ -4186,6 +4202,7 @@ const DatePickerTrigger = React.forwardRef(
|
|
|
4186
4202
|
ref: composedRefs,
|
|
4187
4203
|
$hasError: hasError,
|
|
4188
4204
|
$size: size,
|
|
4205
|
+
$hasOnClear: Boolean(context.onClear),
|
|
4189
4206
|
...restProps,
|
|
4190
4207
|
hasRadius: true,
|
|
4191
4208
|
gap: 3,
|
|
@@ -4215,6 +4232,7 @@ const DatePickerTrigger = React.forwardRef(
|
|
|
4215
4232
|
}
|
|
4216
4233
|
);
|
|
4217
4234
|
const TriggerElement = styled(Flex)`
|
|
4235
|
+
min-width: ${({ $hasOnClear }) => $hasOnClear ? "160px" : "130px"};
|
|
4218
4236
|
border: 1px solid ${({ theme, $hasError }) => $hasError ? theme.colors.danger600 : theme.colors.neutral200};
|
|
4219
4237
|
${(props) => {
|
|
4220
4238
|
switch (props.$size) {
|
|
@@ -4439,6 +4457,11 @@ const Input$1 = styled.input`
|
|
|
4439
4457
|
outline: none;
|
|
4440
4458
|
}
|
|
4441
4459
|
|
|
4460
|
+
&::placeholder {
|
|
4461
|
+
color: ${({ theme }) => theme.colors.neutral600};
|
|
4462
|
+
opacity: 1;
|
|
4463
|
+
}
|
|
4464
|
+
|
|
4442
4465
|
&[aria-disabled='true'] {
|
|
4443
4466
|
cursor: inherit;
|
|
4444
4467
|
}
|
|
@@ -4754,7 +4777,10 @@ const isNotAlphabeticalCharacter = (str) => {
|
|
|
4754
4777
|
function escapeForRegex(str = "") {
|
|
4755
4778
|
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
4756
4779
|
}
|
|
4757
|
-
const
|
|
4780
|
+
const TimePickerCombobox = styled$1(Combobox)`
|
|
4781
|
+
min-width: ${({ onClear }) => onClear ? "160px" : "130px"};
|
|
4782
|
+
`;
|
|
4783
|
+
const TimePicker = React.forwardRef(
|
|
4758
4784
|
({ step = 15, value: valueProp, defaultValue, onChange, ...restProps }, forwardedRef) => {
|
|
4759
4785
|
const context = useDesignSystem("TimePicker");
|
|
4760
4786
|
const [textValue, setTextValue] = React.useState("");
|
|
@@ -4820,7 +4846,7 @@ const TimePicker$1 = React.forwardRef(
|
|
|
4820
4846
|
const escapedSeparator = escapeForRegex(separator);
|
|
4821
4847
|
const pattern = `\\d{2}${escapedSeparator}\\d{2}`;
|
|
4822
4848
|
return /* @__PURE__ */ jsx(
|
|
4823
|
-
|
|
4849
|
+
TimePickerCombobox,
|
|
4824
4850
|
{
|
|
4825
4851
|
...restProps,
|
|
4826
4852
|
ref: forwardedRef,
|
|
@@ -4841,14 +4867,6 @@ const TimePicker$1 = React.forwardRef(
|
|
|
4841
4867
|
);
|
|
4842
4868
|
}
|
|
4843
4869
|
);
|
|
4844
|
-
const DatePicker = styled(DatePicker$1)`
|
|
4845
|
-
flex: 1 1 70%;
|
|
4846
|
-
min-width: 120px;
|
|
4847
|
-
`;
|
|
4848
|
-
const TimePicker = styled(TimePicker$1)`
|
|
4849
|
-
flex: 1 1 30%;
|
|
4850
|
-
min-width: 140px;
|
|
4851
|
-
`;
|
|
4852
4870
|
const DateTimePicker = React.forwardRef(
|
|
4853
4871
|
({
|
|
4854
4872
|
clearLabel = "clear",
|
|
@@ -4917,8 +4935,8 @@ const DateTimePicker = React.forwardRef(
|
|
|
4917
4935
|
const composedRefs = useComposedRefs(DatePickerElement2, forwardedRef);
|
|
4918
4936
|
const { error, id, labelNode } = useField("DateTimePicker");
|
|
4919
4937
|
const hasError = Boolean(error) || hasErrorProp;
|
|
4920
|
-
return /* @__PURE__ */ jsxs(Flex, { "aria-labelledby": labelNode ? `${id}-label` : void 0, role: "group", flex: "1", gap: 1, children: [
|
|
4921
|
-
/* @__PURE__ */ jsx(Root$6, { children: /* @__PURE__ */ jsx(
|
|
4938
|
+
return /* @__PURE__ */ jsxs(Flex, { "aria-labelledby": labelNode ? `${id}-label` : void 0, role: "group", flex: "1", gap: 1, wrap: "wrap", children: [
|
|
4939
|
+
/* @__PURE__ */ jsx(Root$6, { flex: "1", children: /* @__PURE__ */ jsx(
|
|
4922
4940
|
DatePicker,
|
|
4923
4941
|
{
|
|
4924
4942
|
...props,
|
|
@@ -4933,7 +4951,7 @@ const DateTimePicker = React.forwardRef(
|
|
|
4933
4951
|
"aria-label": dateLabel
|
|
4934
4952
|
}
|
|
4935
4953
|
) }),
|
|
4936
|
-
/* @__PURE__ */ jsx(Root$6, { children: /* @__PURE__ */ jsx(
|
|
4954
|
+
/* @__PURE__ */ jsx(Root$6, { flex: "1", children: /* @__PURE__ */ jsx(
|
|
4937
4955
|
TimePicker,
|
|
4938
4956
|
{
|
|
4939
4957
|
size,
|
|
@@ -5236,17 +5254,13 @@ const Trigger$2 = React.forwardRef((props, forwardedRef) => {
|
|
|
5236
5254
|
return /* @__PURE__ */ jsx(Dialog$1.Trigger, { ...props, asChild: true, ref: forwardedRef });
|
|
5237
5255
|
});
|
|
5238
5256
|
const Content$2 = React.forwardRef((props, forwardedRef) => {
|
|
5239
|
-
return /* @__PURE__ */
|
|
5240
|
-
/* @__PURE__ */ jsx(Overlay, {}),
|
|
5241
|
-
/* @__PURE__ */ jsx(ContentImpl, { ref: forwardedRef, ...props })
|
|
5242
|
-
] });
|
|
5257
|
+
return /* @__PURE__ */ jsx(Dialog$1.Portal, { children: /* @__PURE__ */ jsx(Overlay, { children: /* @__PURE__ */ jsx(ContentImpl, { ref: forwardedRef, ...props }) }) });
|
|
5243
5258
|
});
|
|
5244
5259
|
const Overlay = styled(Dialog$1.Overlay)`
|
|
5245
|
-
background
|
|
5260
|
+
background: ${(props) => setOpacity(props.theme.colors.neutral800, 0.2)};
|
|
5246
5261
|
position: fixed;
|
|
5247
5262
|
inset: 0;
|
|
5248
5263
|
z-index: ${(props) => props.theme.zIndices.overlay};
|
|
5249
|
-
opacity: 0.2;
|
|
5250
5264
|
will-change: opacity;
|
|
5251
5265
|
|
|
5252
5266
|
@media (prefers-reduced-motion: no-preference) {
|
|
@@ -5274,6 +5288,11 @@ const ContentImpl = styled(Dialog$1.Content)`
|
|
|
5274
5288
|
box-shadow: ${(props) => props.theme.shadows.popupShadow};
|
|
5275
5289
|
z-index: ${(props) => props.theme.zIndices.modal};
|
|
5276
5290
|
|
|
5291
|
+
> form {
|
|
5292
|
+
display: flex;
|
|
5293
|
+
flex-direction: column;
|
|
5294
|
+
overflow: hidden;
|
|
5295
|
+
}
|
|
5277
5296
|
@media (prefers-reduced-motion: no-preference) {
|
|
5278
5297
|
&[data-state='open'] {
|
|
5279
5298
|
animation-duration: ${(props) => props.theme.motion.timings["200"]};
|
|
@@ -5322,7 +5341,7 @@ const Body = React.forwardRef(({ children, ...restProps }, forwardedRef) => {
|
|
|
5322
5341
|
return /* @__PURE__ */ jsx(BodyScroll, { ref: forwardedRef, ...restProps, children });
|
|
5323
5342
|
});
|
|
5324
5343
|
const BodyScroll = styled(ScrollAreaImpl$1)`
|
|
5325
|
-
padding-inline: ${(props) => props.theme.spaces[
|
|
5344
|
+
padding-inline: ${(props) => props.theme.spaces[7]};
|
|
5326
5345
|
|
|
5327
5346
|
& > div {
|
|
5328
5347
|
padding-block: ${(props) => props.theme.spaces[8]};
|
|
@@ -6045,11 +6064,7 @@ const SearchbarInput = styled(Input$2)`
|
|
|
6045
6064
|
height: 16px;
|
|
6046
6065
|
padding: 0 0 0 8px;
|
|
6047
6066
|
color: ${({ theme }) => theme.colors.neutral800};
|
|
6048
|
-
|
|
6049
|
-
&::placeholder {
|
|
6050
|
-
color: ${({ theme }) => theme.colors.neutral500};
|
|
6051
|
-
}
|
|
6052
|
-
|
|
6067
|
+
|
|
6053
6068
|
&:hover {
|
|
6054
6069
|
button {
|
|
6055
6070
|
cursor: pointer;
|
|
@@ -7081,10 +7096,9 @@ const TextareaElement = styled(Box)`
|
|
|
7081
7096
|
border: none;
|
|
7082
7097
|
resize: none;
|
|
7083
7098
|
|
|
7084
|
-
|
|
7085
|
-
color: ${({ theme }) => theme.colors.
|
|
7099
|
+
&::placeholder {
|
|
7100
|
+
color: ${({ theme }) => theme.colors.neutral600};
|
|
7086
7101
|
font-size: ${({ theme }) => theme.fontSizes[2]};
|
|
7087
|
-
color: ${({ theme }) => theme.colors.neutral500};
|
|
7088
7102
|
opacity: 1;
|
|
7089
7103
|
}
|
|
7090
7104
|
|
|
@@ -7435,7 +7449,7 @@ export {
|
|
|
7435
7449
|
Crumb,
|
|
7436
7450
|
CrumbLink,
|
|
7437
7451
|
CrumbSimpleMenu,
|
|
7438
|
-
DatePicker
|
|
7452
|
+
DatePicker,
|
|
7439
7453
|
DateTimePicker,
|
|
7440
7454
|
DesignSystemProvider,
|
|
7441
7455
|
Dialog,
|
|
@@ -7504,7 +7518,7 @@ export {
|
|
|
7504
7518
|
Textarea,
|
|
7505
7519
|
Th,
|
|
7506
7520
|
Thead,
|
|
7507
|
-
TimePicker
|
|
7521
|
+
TimePicker,
|
|
7508
7522
|
Toggle,
|
|
7509
7523
|
TooltipImpl as Tooltip,
|
|
7510
7524
|
Tr,
|