@strapi/design-system 2.0.0-rc.18 → 2.0.0-rc.20
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/Accordion/Accordion.d.ts.map +1 -1
- package/dist/components/Combobox/Combobox.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/components/Searchbar/Searchbar.d.ts.map +1 -1
- package/dist/components/SimpleMenu/Menu.d.ts.map +1 -1
- package/dist/index.js +84 -94
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +83 -93
- package/dist/index.mjs.map +1 -1
- package/dist/utilities/ScrollArea/ScrollArea.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -14,13 +14,13 @@ import { CaretDown, Cross, CheckCircle, WarningCircle, Information, Loader as Lo
|
|
|
14
14
|
import * as Avatar$1 from "@radix-ui/react-avatar";
|
|
15
15
|
import * as DropdownMenu from "@radix-ui/react-dropdown-menu";
|
|
16
16
|
import * as Checkbox from "@radix-ui/react-checkbox";
|
|
17
|
+
import * as ScrollArea from "@radix-ui/react-scroll-area";
|
|
17
18
|
import * as AlertDialog from "@radix-ui/react-alert-dialog";
|
|
18
19
|
import { useFloating, offset, shift, flip, autoUpdate } from "@floating-ui/react-dom";
|
|
19
20
|
import { useFocusGuards } from "@radix-ui/react-focus-guards";
|
|
20
21
|
import { FocusScope } from "@radix-ui/react-focus-scope";
|
|
21
22
|
import { createPortal } from "react-dom";
|
|
22
23
|
import { RemoveScroll } from "react-remove-scroll";
|
|
23
|
-
import * as ScrollArea from "@radix-ui/react-scroll-area";
|
|
24
24
|
import { json, jsonParseLinter } from "@codemirror/lang-json";
|
|
25
25
|
import { useCodeMirror } from "@uiw/react-codemirror";
|
|
26
26
|
import { StateEffect, StateField } from "@codemirror/state";
|
|
@@ -585,9 +585,9 @@ const Trigger$7 = React.forwardRef(
|
|
|
585
585
|
const { size } = useAccordion("Trigger");
|
|
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
|
-
/* @__PURE__ */ jsxs(Flex, { tag: "span", gap: 2, children: [
|
|
589
|
-
Icon && size === "S" ? /* @__PURE__ */ jsx(IconBox$
|
|
590
|
-
/* @__PURE__ */ jsxs(Flex, { alignItems: "flex-start", direction: "column", tag: "span", ref: forwardedRef, children: [
|
|
588
|
+
/* @__PURE__ */ jsxs(Flex, { tag: "span", gap: 2, overflow: "hidden", children: [
|
|
589
|
+
Icon && size === "S" ? /* @__PURE__ */ jsx(IconBox$2, { children: /* @__PURE__ */ jsx(Icon, { ...iconProps }) }) : null,
|
|
590
|
+
/* @__PURE__ */ jsxs(Flex, { alignItems: "flex-start", direction: "column", tag: "span", ref: forwardedRef, overflow: "hidden", children: [
|
|
591
591
|
/* @__PURE__ */ jsx(
|
|
592
592
|
Typography,
|
|
593
593
|
{
|
|
@@ -595,6 +595,7 @@ const Trigger$7 = React.forwardRef(
|
|
|
595
595
|
ellipsis: true,
|
|
596
596
|
variant: size === "M" ? "delta" : void 0,
|
|
597
597
|
textAlign: "left",
|
|
598
|
+
width: "100%",
|
|
598
599
|
children
|
|
599
600
|
}
|
|
600
601
|
),
|
|
@@ -605,7 +606,7 @@ const Trigger$7 = React.forwardRef(
|
|
|
605
606
|
] });
|
|
606
607
|
}
|
|
607
608
|
);
|
|
608
|
-
const IconBox$
|
|
609
|
+
const IconBox$2 = styled(Box)`
|
|
609
610
|
color: ${(props) => props.theme.colors.neutral500};
|
|
610
611
|
display: flex;
|
|
611
612
|
|
|
@@ -640,6 +641,7 @@ const AccordionTrigger = styled(RadixAccordion.Trigger)`
|
|
|
640
641
|
padding-block: ${(props) => props.$size === "S" ? props.theme.spaces[3] : props.theme.spaces[6]};
|
|
641
642
|
cursor: pointer;
|
|
642
643
|
color: ${(props) => props.theme.colors.neutral800};
|
|
644
|
+
overflow: hidden;
|
|
643
645
|
|
|
644
646
|
&[data-disabled] {
|
|
645
647
|
cursor: default;
|
|
@@ -701,7 +703,7 @@ const AccordionHeader = styled(RadixAccordion.Header)`
|
|
|
701
703
|
& > ${AccordionTrigger} {
|
|
702
704
|
color: ${(props) => props.theme.colors.primary600};
|
|
703
705
|
|
|
704
|
-
& ${IconBox$
|
|
706
|
+
& ${IconBox$2} {
|
|
705
707
|
color: ${(props) => props.theme.colors.primary600};
|
|
706
708
|
}
|
|
707
709
|
|
|
@@ -1834,6 +1836,7 @@ const Viewport$2 = styled(Flex)`
|
|
|
1834
1836
|
scrollbar-width: none;
|
|
1835
1837
|
-ms-overflow-style: none;
|
|
1836
1838
|
-webkit-overflow-scrolling: touch;
|
|
1839
|
+
z-index: ${(props) => props.theme.zIndices.popover};
|
|
1837
1840
|
|
|
1838
1841
|
&::-webkit-scrollbar {
|
|
1839
1842
|
display: none;
|
|
@@ -2883,6 +2886,61 @@ const CarouselSlide = ({ label, children, selected = false, ...props }) => /* @_
|
|
|
2883
2886
|
children
|
|
2884
2887
|
}
|
|
2885
2888
|
);
|
|
2889
|
+
const ScrollAreaImpl$1 = React.forwardRef(
|
|
2890
|
+
({ children, viewportRef, ...restProps }, forwardedRef) => {
|
|
2891
|
+
return /* @__PURE__ */ jsxs(ScrollAreaRoot, { ref: forwardedRef, ...restProps, children: [
|
|
2892
|
+
/* @__PURE__ */ jsx(ScrollAreaViewport, { ref: viewportRef, children }),
|
|
2893
|
+
/* @__PURE__ */ jsx(Scrollbar, { orientation: "vertical", children: /* @__PURE__ */ jsx(Thumb, {}) }),
|
|
2894
|
+
/* @__PURE__ */ jsx(Scrollbar, { orientation: "horizontal", children: /* @__PURE__ */ jsx(Thumb, {}) })
|
|
2895
|
+
] });
|
|
2896
|
+
}
|
|
2897
|
+
);
|
|
2898
|
+
const ScrollAreaRoot = styled(ScrollArea.Root)`
|
|
2899
|
+
width: 100%;
|
|
2900
|
+
height: 100%;
|
|
2901
|
+
overflow: hidden;
|
|
2902
|
+
display: flex;
|
|
2903
|
+
`;
|
|
2904
|
+
const ScrollAreaViewport = styled(ScrollArea.Viewport)`
|
|
2905
|
+
min-width: 100%;
|
|
2906
|
+
`;
|
|
2907
|
+
const Scrollbar = styled(ScrollArea.Scrollbar)`
|
|
2908
|
+
display: flex;
|
|
2909
|
+
/* ensures no selection */
|
|
2910
|
+
user-select: none;
|
|
2911
|
+
/* disable browser handling of all panning and zooming gestures on touch devices */
|
|
2912
|
+
touch-action: none;
|
|
2913
|
+
|
|
2914
|
+
&[data-orientation='vertical'] {
|
|
2915
|
+
width: 0.4rem;
|
|
2916
|
+
margin: 0.4rem;
|
|
2917
|
+
}
|
|
2918
|
+
|
|
2919
|
+
&[data-orientation='horizontal'] {
|
|
2920
|
+
flex-direction: column;
|
|
2921
|
+
height: 0.4rem;
|
|
2922
|
+
margin: 0.4rem;
|
|
2923
|
+
}
|
|
2924
|
+
`;
|
|
2925
|
+
const Thumb = styled(ScrollArea.Thumb)`
|
|
2926
|
+
position: relative;
|
|
2927
|
+
flex: 1;
|
|
2928
|
+
background-color: ${(props) => props.theme.colors.neutral150};
|
|
2929
|
+
border-radius: 0.4rem;
|
|
2930
|
+
|
|
2931
|
+
/* increase target size for touch devices https://www.w3.org/WAI/WCAG21/Understanding/target-size.html */
|
|
2932
|
+
&::before {
|
|
2933
|
+
content: '';
|
|
2934
|
+
position: absolute;
|
|
2935
|
+
top: 50%;
|
|
2936
|
+
left: 50%;
|
|
2937
|
+
transform: translate(-50%, -50%);
|
|
2938
|
+
width: 100%;
|
|
2939
|
+
height: 100%;
|
|
2940
|
+
min-width: 44px;
|
|
2941
|
+
min-height: 44px;
|
|
2942
|
+
}
|
|
2943
|
+
`;
|
|
2886
2944
|
const loaderSvg = "data:image/svg+xml,%3csvg%20width='63'%20height='63'%20viewBox='0%200%2063%2063'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M42.5563%2011.9816C39.484%2010.3071%2035.8575%209.29097%2032.3354%209.13521C28.6443%208.92888%2024.8295%209.72318%2021.3336%2011.4129C20.9123%2011.5901%2020.5376%2011.8101%2020.1722%2012.0249L20.0108%2012.1179C19.8774%2012.1951%2019.7441%2012.2724%2019.608%2012.3536C19.3253%2012.5146%2019.0492%2012.6744%2018.7544%2012.8792C18.5463%2013.0329%2018.3395%2013.1759%2018.1301%2013.323C17.5658%2013.7208%2016.9868%2014.1317%2016.4983%2014.5979C14.8476%2015.9524%2013.5571%2017.6075%2012.6071%2018.9214C10.4365%2022.1566%209.08622%2025.9567%208.80702%2029.6143L8.7764%2030.1588C8.73328%2030.9196%208.68476%2031.7057%208.75353%2032.4555C8.76648%2032.6084%208.7661%2032.7638%208.77506%2032.914C8.78895%2033.229%208.80152%2033.5373%208.846%2033.8672L9.07396%2035.4221C9.09756%2035.5764%209.1198%2035.7413%209.1633%2035.9263L9.65919%2037.9272L10.138%2039.2823C10.2729%2039.6673%2010.4158%2040.0751%2010.6%2040.43C12.0292%2043.637%2014.1425%2046.4578%2016.7063%2048.585C19.0508%2050.5296%2021.824%2052.0023%2024.7491%2052.8452L26.2371%2053.2376C26.3781%2053.2693%2026.4926%2053.2889%2026.6031%2053.3058L26.7775%2053.3311C27.0052%2053.3636%2027.2195%2053.3986%2027.4445%2053.435C27.8598%2053.5076%2028.2672%2053.5748%2028.7079%2053.6183L30.5641%2053.7229C30.9516%2053.7249%2031.3352%2053.7068%2031.7081%2053.6874C31.9039%2053.681%2032.0984%2053.6681%2032.3288%2053.662C34.5253%2053.4772%2036.5106%2053.0634%2038.0516%2052.4652C38.1769%2052.4171%2038.3008%2052.3796%2038.4234%2052.3355C38.6727%2052.2499%2038.9259%2052.167%2039.1432%2052.0599L40.8591%2051.2626L42.5702%2050.266C42.9009%2050.0682%2043.0205%2049.6414%2042.8282%2049.2984C42.632%2048.9526%2042.2034%2048.8308%2041.8634%2049.0166L40.1792%2049.9218L38.4995%2050.6224C38.3169%2050.6953%2038.121%2050.7534%2037.9224%2050.8155C37.7838%2050.8489%2037.6518%2050.8983%2037.5012%2050.9408C36.0711%2051.435%2034.2445%2051.7425%2032.244%2051.8346C32.0442%2051.8383%2031.8471%2051.8379%2031.654%2051.8403C31.3051%2051.8414%2030.9602%2051.8451%2030.6392%2051.8305L28.9177%2051.6725C28.5476%2051.619%2028.1695%2051.5427%2027.7848%2051.4678C27.5639%2051.4167%2027.3376%2051.3737%2027.1299%2051.3374L26.9529%2051.2987C26.8704%2051.2834%2026.7772%2051.2667%2026.7333%2051.2543L25.3466%2050.8322C22.7651%2049.9789%2020.33%2048.5729%2018.2942%2046.7557C16.1056%2044.7951%2014.3339%2042.2335%2013.1742%2039.3582C12.0276%2036.6013%2011.5988%2033.2792%2011.9716%2030.0076C12.3145%2027.0213%2013.3948%2024.1635%2015.1858%2021.5083C15.3034%2021.3339%2015.421%2021.1596%2015.5212%2021.0196C16.4309%2019.8688%2017.5408%2018.5589%2018.9483%2017.496C19.3367%2017.1525%2019.7862%2016.856%2020.2611%2016.5478C20.4878%2016.4009%2020.7079%2016.2553%2020.8907%2016.1306C21.0974%2016.0048%2021.3188%2015.8831%2021.5348%2015.7694C21.6761%2015.6975%2021.8162%2015.619%2021.9388%2015.5576L22.1002%2015.4646C22.4002%2015.3037%2022.6749%2015.1546%2022.9908%2015.039L24.1186%2014.5715C24.3399%2014.4844%2024.5718%2014.4159%2024.7997%2014.3447C24.953%2014.2982%2025.0982%2014.2635%2025.2635%2014.2078C25.786%2014.0182%2026.3283%2013.9112%2026.9105%2013.7965C27.117%2013.7571%2027.3302%2013.7163%2027.5608%2013.6585C27.7553%2013.611%2027.9737%2013.5969%2028.2082%2013.5762C28.364%2013.5603%2028.5172%2013.5483%2028.6318%2013.5333C28.7876%2013.5173%2028.9342%2013.5066%2029.0927%2013.4867C29.3285%2013.4555%2029.5456%2013.4347%2029.7494%2013.4337C30.0237%2013.44%2030.2994%2013.4357%2030.5777%2013.4274C31.0811%2013.421%2031.5579%2013.4197%2032.0318%2013.4914C34.9664%2013.7352%2037.7144%2014.6085%2040.2052%2016.0868C42.3489%2017.3655%2044.2716%2019.1525%2045.7607%2021.264C47.0255%2023.0628%2047.9756%2025.0528%2048.4928%2027.0393C48.572%2027.3176%2048.6299%2027.5931%2048.6839%2027.8659C48.7154%2028.0428%2048.7563%2028.2145%2048.7892%2028.3636C48.8037%2028.4541%2048.8208%2028.5406%2048.8445%2028.6258C48.8749%2028.7443%2048.8986%2028.864%2048.9116%2028.9651L48.9793%2029.6047C48.9922%2029.7748%2049.0132%2029.9331%2049.0301%2030.0887C49.0668%2030.3268%2049.0889%2030.5608%2049.0964%2030.7561L49.1083%2031.9001C49.1312%2032.3307%2049.089%2032.7116%2049.0522%2033.0673C49.0384%2033.2598%2049.0126%2033.4443%2049.0123%2033.5824C48.9961%2033.6926%2048.9918%2033.7935%2048.9836%2033.8917C48.9753%2034.0072%2048.9724%2034.1148%2048.9414%2034.2554L48.5449%2036.3059C48.3134%2037.8623%2049.3793%2039.3365%2050.9488%2039.5822C52.0417%2039.7601%2053.1536%2039.2819%2053.7711%2038.3664C54.0063%2038.0176%2054.1604%2037.6257%2054.2227%2037.2064L54.5217%2035.2574C54.5514%2035.0756%2054.572%2034.83%2054.5846%2034.5791L54.6028%2034.2338C54.6098%2034.0598%2054.6223%2033.8779%2054.6347%2033.6788C54.6734%2033.1052%2054.7163%2032.4479%2054.6619%2031.8058L54.5867%2030.4289C54.5622%2030.0952%2054.5097%2029.76%2054.4559%2029.4181C54.431%2029.2572%2054.4048%2029.0896%2054.3826%2028.9074L54.2687%2028.104C54.2332%2027.9244%2054.1804%2027.7273%2054.1329%2027.5396L54.0643%2027.2454C54.0195%2027.071%2053.9773%2026.8927%2053.9338%2026.7076C53.8455%2026.3309%2053.7479%2025.9422%2053.613%2025.5571C52.84%2023.0292%2051.5383%2020.5194%2049.8338%2018.2799C47.8544%2015.682%2045.3333%2013.5087%2042.5563%2011.9816Z'%20fill='%234945FF'/%3e%3c/svg%3e";
|
|
2887
2945
|
const Loader = React.forwardRef(({ children, small = false, ...props }, ref) => {
|
|
2888
2946
|
return /* @__PURE__ */ jsxs("div", { role: "alert", "aria-live": "assertive", ref, ...props, children: [
|
|
@@ -2909,7 +2967,7 @@ const Combobox = React.forwardRef(
|
|
|
2909
2967
|
autocomplete,
|
|
2910
2968
|
children,
|
|
2911
2969
|
className,
|
|
2912
|
-
clearLabel = "
|
|
2970
|
+
clearLabel = "Clear",
|
|
2913
2971
|
creatable = false,
|
|
2914
2972
|
createMessage = (value2) => `Create "${value2}"`,
|
|
2915
2973
|
defaultFilterValue,
|
|
@@ -3055,19 +3113,14 @@ const Combobox = React.forwardRef(
|
|
|
3055
3113
|
] }),
|
|
3056
3114
|
/* @__PURE__ */ jsxs(Flex, { tag: "span", gap: 3, children: [
|
|
3057
3115
|
internalTextValue && onClear ? /* @__PURE__ */ jsx(
|
|
3058
|
-
|
|
3116
|
+
IconButton,
|
|
3059
3117
|
{
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
background: "transparent",
|
|
3063
|
-
type: "button",
|
|
3064
|
-
padding: 0,
|
|
3065
|
-
color: "neutral600",
|
|
3066
|
-
borderStyle: "none",
|
|
3118
|
+
size: "XS",
|
|
3119
|
+
variant: "ghost",
|
|
3067
3120
|
onClick: handleClearClick,
|
|
3068
3121
|
"aria-disabled": disabled,
|
|
3069
3122
|
"aria-label": clearLabel,
|
|
3070
|
-
|
|
3123
|
+
label: clearLabel,
|
|
3071
3124
|
ref: clearRef,
|
|
3072
3125
|
children: /* @__PURE__ */ jsx(Cross, {})
|
|
3073
3126
|
}
|
|
@@ -3075,7 +3128,7 @@ const Combobox = React.forwardRef(
|
|
|
3075
3128
|
/* @__PURE__ */ jsx(DownIcon$1, { children: /* @__PURE__ */ jsx(CaretDown, { fill: "neutral500" }) })
|
|
3076
3129
|
] })
|
|
3077
3130
|
] }),
|
|
3078
|
-
/* @__PURE__ */ jsx(Combobox$1.Portal, { children: /* @__PURE__ */ jsx(Content$5, { sideOffset: 4, children: /* @__PURE__ */ jsxs(Viewport$1, { ref: viewportRef, children: [
|
|
3131
|
+
/* @__PURE__ */ jsx(Combobox$1.Portal, { children: /* @__PURE__ */ jsx(Content$5, { sideOffset: 4, children: /* @__PURE__ */ jsx(ScrollAreaImpl$1, { children: /* @__PURE__ */ jsxs(Viewport$1, { ref: viewportRef, children: [
|
|
3079
3132
|
children,
|
|
3080
3133
|
creatable ? /* @__PURE__ */ jsx(
|
|
3081
3134
|
Combobox$1.CreateItem,
|
|
@@ -3089,15 +3142,12 @@ const Combobox = React.forwardRef(
|
|
|
3089
3142
|
!creatable && !loading ? /* @__PURE__ */ jsx(Combobox$1.NoValueFound, { asChild: true, children: /* @__PURE__ */ jsx(OptionBox, { $hasHover: false, children: /* @__PURE__ */ jsx(Typography, { children: noOptionsMessage(internalTextValue ?? "") }) }) }) : null,
|
|
3090
3143
|
loading ? /* @__PURE__ */ jsx(Flex, { justifyContent: "center", alignItems: "center", paddingTop: 2, paddingBottom: 2, children: /* @__PURE__ */ jsx(Loader, { small: true, children: loadingMessage }) }) : null,
|
|
3091
3144
|
/* @__PURE__ */ jsx(Box, { id: intersectionId, width: "100%", height: "1px" })
|
|
3092
|
-
] }) }) })
|
|
3145
|
+
] }) }) }) })
|
|
3093
3146
|
]
|
|
3094
3147
|
}
|
|
3095
3148
|
);
|
|
3096
3149
|
}
|
|
3097
3150
|
);
|
|
3098
|
-
const IconBox$3 = styled(Box)`
|
|
3099
|
-
padding: 0;
|
|
3100
|
-
`;
|
|
3101
3151
|
const Trigger$5 = styled(Combobox$1.Trigger)`
|
|
3102
3152
|
position: relative;
|
|
3103
3153
|
border: 1px solid ${({ theme, $hasError }) => $hasError ? theme.colors.danger600 : theme.colors.neutral200};
|
|
@@ -3549,60 +3599,6 @@ const Portal$1 = React.forwardRef(
|
|
|
3549
3599
|
}
|
|
3550
3600
|
);
|
|
3551
3601
|
Portal$1.displayName = "Portal";
|
|
3552
|
-
const ScrollAreaImpl$1 = React.forwardRef(
|
|
3553
|
-
({ children, viewportRef, ...restProps }, forwardedRef) => {
|
|
3554
|
-
return /* @__PURE__ */ jsxs(ScrollAreaRoot, { ref: forwardedRef, ...restProps, children: [
|
|
3555
|
-
/* @__PURE__ */ jsx(ScrollAreaViewport, { ref: viewportRef, children }),
|
|
3556
|
-
/* @__PURE__ */ jsx(Scrollbar, { orientation: "vertical", children: /* @__PURE__ */ jsx(Thumb, {}) }),
|
|
3557
|
-
/* @__PURE__ */ jsx(Scrollbar, { orientation: "horizontal", children: /* @__PURE__ */ jsx(Thumb, {}) })
|
|
3558
|
-
] });
|
|
3559
|
-
}
|
|
3560
|
-
);
|
|
3561
|
-
const ScrollAreaRoot = styled(ScrollArea.Root)`
|
|
3562
|
-
width: 100%;
|
|
3563
|
-
height: 100%;
|
|
3564
|
-
overflow: hidden;
|
|
3565
|
-
display: flex;
|
|
3566
|
-
`;
|
|
3567
|
-
const ScrollAreaViewport = styled(ScrollArea.Viewport)`
|
|
3568
|
-
min-width: 100%;
|
|
3569
|
-
padding-inline: 4px;
|
|
3570
|
-
`;
|
|
3571
|
-
const Scrollbar = styled(ScrollArea.Scrollbar)`
|
|
3572
|
-
display: flex;
|
|
3573
|
-
/* ensures no selection */
|
|
3574
|
-
user-select: none;
|
|
3575
|
-
/* disable browser handling of all panning and zooming gestures on touch devices */
|
|
3576
|
-
touch-action: none;
|
|
3577
|
-
|
|
3578
|
-
&[data-orientation='vertical'] {
|
|
3579
|
-
width: 0.4rem;
|
|
3580
|
-
}
|
|
3581
|
-
|
|
3582
|
-
&[data-orientation='horizontal'] {
|
|
3583
|
-
flex-direction: column;
|
|
3584
|
-
height: 0.4rem;
|
|
3585
|
-
}
|
|
3586
|
-
`;
|
|
3587
|
-
const Thumb = styled(ScrollArea.Thumb)`
|
|
3588
|
-
position: relative;
|
|
3589
|
-
flex: 1;
|
|
3590
|
-
background-color: ${(props) => props.theme.colors.neutral150};
|
|
3591
|
-
border-radius: var(--scrollbar-size);
|
|
3592
|
-
|
|
3593
|
-
/* increase target size for touch devices https://www.w3.org/WAI/WCAG21/Understanding/target-size.html */
|
|
3594
|
-
&::before {
|
|
3595
|
-
content: '';
|
|
3596
|
-
position: absolute;
|
|
3597
|
-
top: 50%;
|
|
3598
|
-
left: 50%;
|
|
3599
|
-
transform: translate(-50%, -50%);
|
|
3600
|
-
width: 100%;
|
|
3601
|
-
height: 100%;
|
|
3602
|
-
min-width: 44px;
|
|
3603
|
-
min-height: 44px;
|
|
3604
|
-
}
|
|
3605
|
-
`;
|
|
3606
3602
|
const SelectTrigger = React.forwardRef(
|
|
3607
3603
|
({ onClear, clearLabel = "Clear", startIcon, disabled, hasError, children, id, size = "M", withTags, ...restProps }, ref) => {
|
|
3608
3604
|
const triggerRef = React.useRef(null);
|
|
@@ -3639,7 +3635,7 @@ const SelectTrigger = React.forwardRef(
|
|
|
3639
3635
|
] }),
|
|
3640
3636
|
/* @__PURE__ */ jsxs(Flex, { tag: "span", gap: 3, children: [
|
|
3641
3637
|
onClear ? /* @__PURE__ */ jsx(
|
|
3642
|
-
IconBox$
|
|
3638
|
+
IconBox$1,
|
|
3643
3639
|
{
|
|
3644
3640
|
tag: "button",
|
|
3645
3641
|
hasRadius: true,
|
|
@@ -3661,7 +3657,7 @@ const SelectTrigger = React.forwardRef(
|
|
|
3661
3657
|
) });
|
|
3662
3658
|
}
|
|
3663
3659
|
);
|
|
3664
|
-
const IconBox$
|
|
3660
|
+
const IconBox$1 = styled(Box)`
|
|
3665
3661
|
border: none;
|
|
3666
3662
|
display: flex;
|
|
3667
3663
|
|
|
@@ -3782,11 +3778,11 @@ const StyledSelectItem = styled(Select.Item)`
|
|
|
3782
3778
|
|
|
3783
3779
|
&:hover {
|
|
3784
3780
|
background-color: ${({ theme }) => theme.colors.primary100};
|
|
3781
|
+
cursor: pointer;
|
|
3785
3782
|
}
|
|
3786
3783
|
|
|
3787
3784
|
&[data-state='checked'] {
|
|
3788
3785
|
font-weight: bold;
|
|
3789
|
-
background-color: ${({ theme }) => theme.colors.primary100};
|
|
3790
3786
|
color: ${({ theme }) => theme.colors.primary600};
|
|
3791
3787
|
font-weight: bold;
|
|
3792
3788
|
}
|
|
@@ -4056,16 +4052,14 @@ const DatePicker$1 = React.forwardRef(
|
|
|
4056
4052
|
/* @__PURE__ */ jsx(Calendar, { fill: "neutral500", "aria-hidden": true }),
|
|
4057
4053
|
/* @__PURE__ */ jsx(DatePickerTextInput, { ref, "aria-describedby": ariaDescription, id, name, ...restProps }),
|
|
4058
4054
|
textValue && onClear ? /* @__PURE__ */ jsx(
|
|
4059
|
-
|
|
4055
|
+
IconButton,
|
|
4060
4056
|
{
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
background: "transparent",
|
|
4064
|
-
type: "button",
|
|
4057
|
+
size: "XS",
|
|
4058
|
+
variant: "ghost",
|
|
4065
4059
|
onClick: handleClearClick,
|
|
4066
4060
|
"aria-disabled": disabled,
|
|
4067
4061
|
"aria-label": clearLabel,
|
|
4068
|
-
|
|
4062
|
+
label: clearLabel,
|
|
4069
4063
|
ref: clearRef,
|
|
4070
4064
|
children: /* @__PURE__ */ jsx(Cross, {})
|
|
4071
4065
|
}
|
|
@@ -4186,12 +4180,6 @@ const TriggerElement = styled(Flex)`
|
|
|
4186
4180
|
|
|
4187
4181
|
${({ theme, $hasError }) => inputFocusStyle()({ theme, $hasError })};
|
|
4188
4182
|
`;
|
|
4189
|
-
const IconBox$1 = styled(Box)`
|
|
4190
|
-
border: none;
|
|
4191
|
-
color: ${({ theme }) => theme.colors.neutral600};
|
|
4192
|
-
padding: 0;
|
|
4193
|
-
cursor: pointer;
|
|
4194
|
-
`;
|
|
4195
4183
|
const DATE_PICKER_TEXT_INPUT_NAME = "DatePickerTextInput";
|
|
4196
4184
|
const DatePickerTextInput = React.forwardRef(
|
|
4197
4185
|
({ placeholder, ...props }, forwardedRef) => {
|
|
@@ -5986,7 +5974,7 @@ const SearchbarInput = styled(Input$2)`
|
|
|
5986
5974
|
${inputFocusStyle()}
|
|
5987
5975
|
`;
|
|
5988
5976
|
const Searchbar = React.forwardRef(
|
|
5989
|
-
({ name, children, value = "", onClear, clearLabel, ...props }, ref) => {
|
|
5977
|
+
({ name, children, value = "", onClear, clearLabel = "Clear", ...props }, ref) => {
|
|
5990
5978
|
const inputRef = React.useRef(null);
|
|
5991
5979
|
const isCompleting = value.length > 0;
|
|
5992
5980
|
const handleClear = (e) => {
|
|
@@ -6004,13 +5992,15 @@ const Searchbar = React.forwardRef(
|
|
|
6004
5992
|
value,
|
|
6005
5993
|
startAction: /* @__PURE__ */ jsx(SearchIcon, { "aria-hidden": true }),
|
|
6006
5994
|
endAction: isCompleting ? /* @__PURE__ */ jsx(
|
|
6007
|
-
|
|
5995
|
+
IconButton,
|
|
6008
5996
|
{
|
|
6009
|
-
label: clearLabel,
|
|
6010
5997
|
onClick: handleClear,
|
|
6011
5998
|
onMouseDown: (e) => {
|
|
6012
5999
|
e.preventDefault();
|
|
6013
6000
|
},
|
|
6001
|
+
label: clearLabel,
|
|
6002
|
+
size: "XS",
|
|
6003
|
+
variant: "ghost",
|
|
6014
6004
|
children: /* @__PURE__ */ jsx(CloseIcon, {})
|
|
6015
6005
|
}
|
|
6016
6006
|
) : void 0,
|