@teamturing/react-kit 2.18.1 → 2.19.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -7094,7 +7094,7 @@ const BaseActionList = styled__default.default.ul`
7094
7094
 
7095
7095
  ${sx}
7096
7096
  `;
7097
- var index$d = Object.assign(ActionList, {
7097
+ var index$a = Object.assign(ActionList, {
7098
7098
  Item: ActionListItem,
7099
7099
  SectionDivider: ActionListSectionDivider,
7100
7100
  SectionHeader: ActionListSectionHeader
@@ -16365,7 +16365,7 @@ const BaseAvatar = styled__default.default(Image)`
16365
16365
  })}
16366
16366
  ${sx}
16367
16367
  `;
16368
- var index$c = /*#__PURE__*/React.forwardRef(Avatar);
16368
+ var index$9 = /*#__PURE__*/React.forwardRef(Avatar);
16369
16369
 
16370
16370
  const Tooltip = ({
16371
16371
  children,
@@ -16753,7 +16753,7 @@ const BreadcrumbsItemWrapper = styled__default.default.span`
16753
16753
  }
16754
16754
  }
16755
16755
  `;
16756
- var index$b = Object.assign(Breadcrumbs, {
16756
+ var index$8 = Object.assign(Breadcrumbs, {
16757
16757
  Item: BreadcrumbsItem
16758
16758
  });
16759
16759
 
@@ -17290,7 +17290,7 @@ const BaseCheckbox = styled__default.default(UnstyledCheckbox)`
17290
17290
 
17291
17291
  ${sx}
17292
17292
  `;
17293
- var index$a = /*#__PURE__*/React.forwardRef(Checkbox);
17293
+ var Checkbox$1 = /*#__PURE__*/React.forwardRef(Checkbox);
17294
17294
 
17295
17295
  const Chip = ({
17296
17296
  children,
@@ -17643,7 +17643,7 @@ const DatagridWrapper = styled__default.default.div`
17643
17643
  const BaseDatagrid = styled__default.default.div`
17644
17644
  width: inherit;
17645
17645
  `;
17646
- var index$9 = Object.assign(Datagrid, {
17646
+ var index$7 = Object.assign(Datagrid, {
17647
17647
  Header: DatagridHeader,
17648
17648
  Subheader: DatagridSubheader,
17649
17649
  Body: DatagridBody,
@@ -18750,7 +18750,7 @@ const BaseDialog = styled__default.default.div(() => ({
18750
18750
  overflow: 'hidden',
18751
18751
  margin: 'auto'
18752
18752
  }), sx);
18753
- var index$8 = /*#__PURE__*/React.forwardRef(Dialog);
18753
+ var index$6 = /*#__PURE__*/React.forwardRef(Dialog);
18754
18754
 
18755
18755
  const useDialogHandler = () => {
18756
18756
  const [isOpen, setIsOpen] = React.useState(false);
@@ -18895,112 +18895,6 @@ const BaseEmptyState = styled__default.default.div`
18895
18895
  ${sx}
18896
18896
  `;
18897
18897
 
18898
- const GradientText = styled__default.default(Text)`
18899
- background: ${({
18900
- theme
18901
- }) => `linear-gradient(${theme.gradients['text/accent']})`};
18902
- background-clip: text;
18903
- -webkit-background-clip: text;
18904
- -webkit-text-fill-color: transparent;
18905
- `;
18906
-
18907
- const IconToggleButton = ({
18908
- icon: Icon,
18909
- size = 'm',
18910
- variant = 'primary',
18911
- selected = false,
18912
- disabled = false,
18913
- sx,
18914
- ...props
18915
- }) => {
18916
- return /*#__PURE__*/jsxRuntimeExports.jsx(BaseIconToggleButton, {
18917
- icon: Icon,
18918
- size: size,
18919
- variant: variant,
18920
- selected: selected,
18921
- type: 'button',
18922
- disabled: disabled,
18923
- $disabled: disabled,
18924
- sx: sx,
18925
- ...props,
18926
- children: /*#__PURE__*/jsxRuntimeExports.jsx(Icon, {})
18927
- });
18928
- };
18929
- const BaseIconToggleButton = styled__default.default(UnstyledButton)(({
18930
- $disabled
18931
- }) => ({
18932
- 'position': 'relative',
18933
- 'borderRadius': radii.full,
18934
- 'transition': 'background-color 100ms, color 100ms',
18935
- '& svg': {
18936
- display: 'block'
18937
- },
18938
- 'cursor': $disabled ? 'not-allowed' : 'pointer',
18939
- '&:focus-visible': {
18940
- outlineColor: color$1['border/focused'],
18941
- outlineStyle: 'solid',
18942
- outlineWidth: 2,
18943
- outlineOffset: 2
18944
- }
18945
- }), variant({
18946
- prop: 'size',
18947
- variants: {
18948
- l: {
18949
- 'p': 3,
18950
- '& svg': {
18951
- width: 24,
18952
- height: 24
18953
- }
18954
- },
18955
- m: {
18956
- 'p': 2,
18957
- '& svg': {
18958
- width: 24,
18959
- height: 24
18960
- }
18961
- },
18962
- s: {
18963
- 'p': 2,
18964
- '& svg': {
18965
- width: 16,
18966
- height: 16
18967
- }
18968
- }
18969
- }
18970
- }), ({
18971
- selected,
18972
- $disabled
18973
- }) => variant({
18974
- prop: 'variant',
18975
- variants: {
18976
- primary: {
18977
- ...(selected ? {
18978
- backgroundColor: color$1['bg/selected/violet'],
18979
- color: color$1['icon/inverse']
18980
- } : {
18981
- backgroundColor: color$1['bg/neutral'],
18982
- color: color$1['icon/accent/gray']
18983
- }),
18984
- ...($disabled ? {
18985
- backgroundColor: color$1['bg/disabled'],
18986
- color: color$1['icon/disabled']
18987
- } : {})
18988
- },
18989
- plain: {
18990
- backgroundColor: color$1['bg/neutral/subtler'],
18991
- ...(selected ? {
18992
- color: color$1['icon/selected/violet']
18993
- } : {
18994
- color: color$1['icon/neutral']
18995
- }),
18996
- ...($disabled ? {
18997
- backgroundColor: color$1['bg/disabled/subtlest'],
18998
- color: color$1['icon/disabled/subtler']
18999
- } : {})
19000
- }
19001
- }
19002
- }), sx);
19003
-
19004
18898
  const Overlay = ({
19005
18899
  children,
19006
18900
  isOpen,
@@ -20415,7 +20309,7 @@ const computePosition = (reference, floating, options) => {
20415
20309
  });
20416
20310
  };
20417
20311
 
20418
- var index$7 = typeof document !== 'undefined' ? React.useLayoutEffect : React.useEffect;
20312
+ var index$5 = typeof document !== 'undefined' ? React.useLayoutEffect : React.useEffect;
20419
20313
 
20420
20314
  // Fork of `fast-deep-equal` that only does the comparisons we need and compares
20421
20315
  // functions
@@ -20480,7 +20374,7 @@ function roundByDPR(element, value) {
20480
20374
 
20481
20375
  function useLatestRef(value) {
20482
20376
  const ref = React__namespace.useRef(value);
20483
- index$7(() => {
20377
+ index$5(() => {
20484
20378
  ref.current = value;
20485
20379
  });
20486
20380
  return ref;
@@ -20565,7 +20459,7 @@ function useFloating(options) {
20565
20459
  }
20566
20460
  });
20567
20461
  }, [latestMiddleware, placement, strategy, platformRef]);
20568
- index$7(() => {
20462
+ index$5(() => {
20569
20463
  if (open === false && dataRef.current.isPositioned) {
20570
20464
  dataRef.current.isPositioned = false;
20571
20465
  setData(data => ({
@@ -20575,13 +20469,13 @@ function useFloating(options) {
20575
20469
  }
20576
20470
  }, [open]);
20577
20471
  const isMountedRef = React__namespace.useRef(false);
20578
- index$7(() => {
20472
+ index$5(() => {
20579
20473
  isMountedRef.current = true;
20580
20474
  return () => {
20581
20475
  isMountedRef.current = false;
20582
20476
  };
20583
20477
  }, []);
20584
- index$7(() => {
20478
+ index$5(() => {
20585
20479
  if (referenceEl) referenceRef.current = referenceEl;
20586
20480
  if (floatingEl) floatingRef.current = floatingEl;
20587
20481
  if (referenceEl && floatingEl) {
@@ -20979,517 +20873,355 @@ const BaseInput$1 = styled__default.default(UnstyledInput$1)`
20979
20873
  theme
20980
20874
  }) => forcePixelValue(theme.space['5'])};
20981
20875
  `;
20982
- var index$6 = /*#__PURE__*/React.forwardRef(OverlaySelectInput);
20876
+ var OverlaySelectInput$1 = /*#__PURE__*/React.forwardRef(OverlaySelectInput);
20983
20877
 
20984
- const Pagination = ({
20985
- pages: propPages,
20986
- currentPageIndex,
20987
- aroundPageCount = 1,
20988
- edgePageCount = 1,
20989
- type = 'default',
20990
- sx,
20991
- onPageClick = noop$2,
20992
- onPreviousClick = noop$2,
20993
- onNextClick = noop$2,
20994
- renderPage = (page, i) => /*#__PURE__*/jsxRuntimeExports.jsx(PaginationPage, {
20995
- onClick: () => onPageClick(page, i),
20996
- selected: i === currentPageIndex,
20997
- children: page.label
20998
- }),
20999
- renderPageWrapper = (children, {
21000
- label
21001
- }, i) => /*#__PURE__*/jsxRuntimeExports.jsx(React.Fragment, {
21002
- children: children
21003
- }, [label, i].join('-')),
21004
- renderPreviousPageDirection = ({
21005
- previousPageDirectionProps
21006
- }) => /*#__PURE__*/jsxRuntimeExports.jsxs(PaginationPageDirection, {
21007
- ...previousPageDirectionProps,
21008
- children: [/*#__PURE__*/jsxRuntimeExports.jsx(SvgChevronLeft, {}), "\uC774\uC804"]
21009
- }),
21010
- renderNextPageDirection = ({
21011
- nextPageDirectionProps
21012
- }) => /*#__PURE__*/jsxRuntimeExports.jsxs(PaginationPageDirection, {
21013
- ...nextPageDirectionProps,
21014
- children: ["\uB2E4\uC74C", /*#__PURE__*/jsxRuntimeExports.jsx(SvgChevronRight, {})]
21015
- }),
21016
- renderTruncationIndicator = () => /*#__PURE__*/jsxRuntimeExports.jsx(PaginationTruncationIndicator, {
21017
- children: "\u2026"
21018
- })
20878
+ const SelectOption = ({
20879
+ children: propChildren,
20880
+ ...props
21019
20881
  }) => {
21020
- const CURRENT_PAGE_COUNT = 1;
21021
- const totalVisiblePageCount = CURRENT_PAGE_COUNT + 2 * aroundPageCount + 2 * edgePageCount;
21022
- const pages = propPages.map((page, i) => ({
21023
- page,
21024
- originalIndex: i
21025
- }));
21026
- const totalPageCount = propPages.length;
21027
- const isCurrentPageCloseToBeginEdge = currentPageIndex < edgePageCount + aroundPageCount + CURRENT_PAGE_COUNT;
21028
- const isCurrentPageCloseToEndEdge = totalPageCount - (edgePageCount + aroundPageCount + CURRENT_PAGE_COUNT) < currentPageIndex + 1;
21029
- const isTruncationNeeded = totalVisiblePageCount < totalPageCount;
21030
- const renderPaginationPage = React.useCallback((page, i) => renderPageWrapper(renderPage(page, i), page, i), [currentPageIndex]);
21031
- return /*#__PURE__*/jsxRuntimeExports.jsxs(BasePagination, {
21032
- type: type,
21033
- sx: sx,
21034
- children: [renderPreviousPageDirection({
21035
- previousPageDirectionProps: {
21036
- onClick: () => onPreviousClick(currentPageIndex),
21037
- disabled: currentPageIndex === 0
21038
- }
21039
- }), !isTruncationNeeded ? pages.map(({
21040
- page,
21041
- originalIndex
21042
- }) => renderPaginationPage(page, originalIndex)) : isTruncationNeeded && isCurrentPageCloseToBeginEdge ? [pages.slice(0, edgePageCount + aroundPageCount * 2 + CURRENT_PAGE_COUNT).map(({
21043
- page,
21044
- originalIndex
21045
- }) => renderPaginationPage(page, originalIndex)), /*#__PURE__*/jsxRuntimeExports.jsx(React.Fragment, {
21046
- children: renderTruncationIndicator()
21047
- }, 'end_truncation_indicator'), pages.slice(edgePageCount * -1).map(({
21048
- page,
21049
- originalIndex
21050
- }) => renderPaginationPage(page, originalIndex))] : isTruncationNeeded && isCurrentPageCloseToEndEdge ? [pages.slice(0, edgePageCount).map(({
21051
- page,
21052
- originalIndex
21053
- }) => renderPaginationPage(page, originalIndex)), /*#__PURE__*/jsxRuntimeExports.jsx(React.Fragment, {
21054
- children: renderTruncationIndicator()
21055
- }, 'begin_truncation_indicator'), pages.slice(totalPageCount - (edgePageCount + aroundPageCount * 2 + CURRENT_PAGE_COUNT)).map(({
21056
- page,
21057
- originalIndex
21058
- }) => renderPaginationPage(page, originalIndex))] : [pages.slice(0, edgePageCount).map(({
21059
- page,
21060
- originalIndex
21061
- }) => renderPaginationPage(page, originalIndex)), /*#__PURE__*/jsxRuntimeExports.jsx(React.Fragment, {
21062
- children: renderTruncationIndicator()
21063
- }, 'begin_truncation_indicator'), pages.slice(currentPageIndex - aroundPageCount, currentPageIndex + aroundPageCount + CURRENT_PAGE_COUNT).map(({
21064
- page,
21065
- originalIndex
21066
- }) => renderPaginationPage(page, originalIndex)), /*#__PURE__*/jsxRuntimeExports.jsx(React.Fragment, {
21067
- children: renderTruncationIndicator()
21068
- }, 'end_truncation_indicator'), pages.slice(edgePageCount * -1).map(({
21069
- page,
21070
- originalIndex
21071
- }) => renderPaginationPage(page, originalIndex))], renderNextPageDirection({
21072
- nextPageDirectionProps: {
21073
- onClick: () => onNextClick(currentPageIndex),
21074
- disabled: currentPageIndex === totalPageCount - 1
21075
- }
21076
- })]
20882
+ const children = isNullable(propChildren) ? props.label : propChildren;
20883
+ return /*#__PURE__*/jsxRuntimeExports.jsx(BaseSelectOption, {
20884
+ ...props,
20885
+ children: children
21077
20886
  });
21078
20887
  };
21079
- const BasePagination = styled__default.default.nav`
21080
- display: flex;
21081
- align-items: center;
21082
- justify-content: center;
21083
- flex-wrap: nowrap;
21084
- column-gap: ${({
21085
- theme
21086
- }) => forcePixelValue(theme.space[1])};
21087
-
21088
- ${variant({
21089
- prop: 'type',
21090
- variants: {
21091
- default: {},
21092
- simple: {
21093
- '& > *:not(:first-child):not(:last-child)': {
21094
- display: 'none !important'
21095
- }
21096
- }
21097
- }
21098
- })}
21099
- ${sx}
21100
- `;
21101
- const PaginationPage = styled__default.default(UnstyledButton)`
21102
- transition: background-color 100ms;
21103
-
21104
- height: ${forcePixelValue(32)};
21105
- min-width: ${forcePixelValue(32)};
21106
-
21107
- border-radius: ${({
21108
- theme
21109
- }) => forcePixelValue(theme.radii.xs)};
21110
- padding: ${({
21111
- theme
21112
- }) => `${forcePixelValue(theme.space[0])} ${forcePixelValue(theme.space[3])}`};
21113
- background-color: ${({
21114
- theme
21115
- }) => theme.colors['bg/neutral/subtler']};
21116
-
21117
- font-size: ${({
21118
- theme
21119
- }) => forcePixelValue(theme.fontSizes.xs)};
21120
- font-weight: ${({
21121
- theme
21122
- }) => theme.fontWeights.regular};
21123
- line-height: ${({
21124
- theme
21125
- }) => theme.lineHeights[2]};
21126
- color: ${({
21127
- theme
21128
- }) => theme.colors['text/neutral']};
20888
+ const BaseSelectOption = styled__default.default.option``;
21129
20889
 
21130
- ${({
21131
- selected
21132
- }) => selected ? styled.css`
21133
- background-color: ${({
21134
- theme
21135
- }) => theme.colors['bg/neutral/bolder']};
21136
- color: ${({
21137
- theme
21138
- }) => theme.colors['text/inverse']};
21139
- ` : styled.css`
21140
- &:hover {
21141
- background-color: ${({
21142
- theme
21143
- }) => theme.colors['bg/neutral/subtler/hovered']};
20890
+ const Select = ({
20891
+ children,
20892
+ disabled,
20893
+ validationStatus,
20894
+ leadingVisual: LeadingVisual,
20895
+ placeholder = '옵션 선택',
20896
+ ...props
20897
+ }, ref) => {
20898
+ const PLACEHOLDER_VALUE = '';
20899
+ const selectRef = useProvidedOrCreatedRef(ref);
20900
+ const [isValueEmpty, setIsValueEmpty] = React.useState(isNullable(props.value) || props.value === PLACEHOLDER_VALUE);
20901
+ const focusSelect = () => {
20902
+ selectRef.current?.focus();
20903
+ };
20904
+ return /*#__PURE__*/jsxRuntimeExports.jsxs(SelectWrapper, {
20905
+ disabled: disabled,
20906
+ onClick: focusSelect,
20907
+ hasLeadingVisual: !isNullable(LeadingVisual),
20908
+ validationStatus: validationStatus,
20909
+ isValueEmpty: isValueEmpty,
20910
+ children: [/*#__PURE__*/jsxRuntimeExports.jsx(View, {
20911
+ sx: {
20912
+ 'flexShrink': 0,
20913
+ 'fontSize': 'xxs',
20914
+ 'fontWeight': 'medium',
20915
+ 'color': 'text/neutral',
20916
+ '& > svg': {
20917
+ display: 'block',
20918
+ width: 16,
20919
+ height: 16,
20920
+ color: 'icon/neutral/bold'
20921
+ }
20922
+ },
20923
+ children: typeof LeadingVisual !== 'string' && reactIsExports.isValidElementType(LeadingVisual) ? /*#__PURE__*/jsxRuntimeExports.jsx(LeadingVisual, {}) : LeadingVisual
20924
+ }), /*#__PURE__*/jsxRuntimeExports.jsxs(BaseSelect, {
20925
+ ref: e => {
20926
+ isFunction(ref) ? ref(e) : null;
20927
+ selectRef.current = e;
20928
+ },
20929
+ placeholder: placeholder,
20930
+ disabled: disabled,
20931
+ ...props,
20932
+ onChange: e => {
20933
+ props.onChange?.(e);
20934
+ if (!e.defaultPrevented) {
20935
+ if (e.target.value === PLACEHOLDER_VALUE) {
20936
+ setIsValueEmpty(true);
20937
+ } else {
20938
+ setIsValueEmpty(false);
21144
20939
  }
21145
- `}
21146
- `;
21147
- const PaginationPageDirection = styled__default.default(UnstyledButton)`
21148
- transition: background-color 100ms;
21149
-
21150
- display: inline-flex;
21151
- align-items: center;
21152
- flex-wrap: nowrap;
21153
- column-gap: ${({
21154
- theme
21155
- }) => forcePixelValue(theme.space[1])};
21156
-
21157
- height: ${forcePixelValue(32)};
21158
- min-width: ${forcePixelValue(32)};
21159
-
20940
+ }
20941
+ },
20942
+ children: [/*#__PURE__*/jsxRuntimeExports.jsx(SelectOption, {
20943
+ label: placeholder,
20944
+ value: PLACEHOLDER_VALUE
20945
+ }), children]
20946
+ }), /*#__PURE__*/jsxRuntimeExports.jsx(StyledIcon, {
20947
+ sx: {
20948
+ position: 'absolute',
20949
+ top: '50%',
20950
+ transform: 'translateY(-50%)',
20951
+ right: 5,
20952
+ pointerEvents: 'none'
20953
+ },
20954
+ icon: SvgChevronDown,
20955
+ color: disabled ? 'icon/disabled' : 'icon/neutral/bolder',
20956
+ size: 16
20957
+ })]
20958
+ });
20959
+ };
20960
+ const SelectWrapper = styled__default.default.div`
20961
+ position: relative;
20962
+ width: ${forcePixelValue('100%')};
20963
+ border-width: ${forcePixelValue(1)};
20964
+ border-style: solid;
21160
20965
  border-radius: ${({
21161
20966
  theme
21162
20967
  }) => forcePixelValue(theme.radii.xs)};
21163
- padding: ${({
20968
+ border-color: ${({
21164
20969
  theme
21165
- }) => `${forcePixelValue(theme.space[0])} ${forcePixelValue(theme.space[3])}`};
20970
+ }) => theme.colors['border/input']};
21166
20971
  background-color: ${({
21167
20972
  theme
21168
- }) => theme.colors['bg/neutral/subtler']};
20973
+ }) => theme.colors['bg/input']};
20974
+ display: inline-flex;
20975
+ align-items: center;
21169
20976
 
21170
20977
  font-size: ${({
21171
20978
  theme
21172
20979
  }) => forcePixelValue(theme.fontSizes.xs)};
21173
20980
  font-weight: ${({
21174
20981
  theme
21175
- }) => theme.fontWeights.regular};
20982
+ }) => theme.fontWeights.medium};
21176
20983
  line-height: ${({
21177
20984
  theme
21178
20985
  }) => theme.lineHeights[2]};
21179
20986
  color: ${({
21180
20987
  theme
21181
- }) => theme.colors['text/neutral']};
20988
+ }) => theme.colors['text/neutral/subtle']};
21182
20989
 
21183
- & svg {
21184
- color: ${({
20990
+ /**
20991
+ * placeholder style
20992
+ */
20993
+ ${({
20994
+ theme,
20995
+ isValueEmpty
20996
+ }) => isValueEmpty ? styled.css`
20997
+ color: ${theme.colors['text/neutral/subtlest']};
20998
+ ` : null}
20999
+
21000
+ &:after {
21001
+ content: '';
21002
+ position: absolute;
21003
+ top: ${forcePixelValue(-1)};
21004
+ right: ${forcePixelValue(-1)};
21005
+ bottom: ${forcePixelValue(-1)};
21006
+ left: ${forcePixelValue(-1)};
21007
+
21008
+ border: ${forcePixelValue(2)} solid transparent;
21009
+ border-radius: ${({
21185
21010
  theme
21186
- }) => theme.colors['icon/accent/gray']};
21187
- width: ${forcePixelValue(16)};
21188
- height: ${forcePixelValue(16)};
21011
+ }) => forcePixelValue(theme.radii.xs)};
21012
+ pointer-events: none;
21189
21013
  }
21190
21014
 
21191
- &:hover:not(:disabled) {
21192
- background-color: ${({
21015
+ ${props => props.validationStatus !== 'error' && !props.disabled && styled.css`
21016
+ &:hover:not(:focus-within) {
21017
+ &:after {
21018
+ border-color: ${({
21193
21019
  theme
21194
- }) => theme.colors['bg/neutral/subtler/hovered']};
21195
- }
21196
- &:disabled {
21197
- cursor: not-allowed;
21198
- color: ${({
21020
+ }) => theme.colors['border/hovered']};
21021
+ }
21022
+ }
21023
+ `}
21024
+
21025
+ ${props => props.validationStatus === 'error' && styled.css`
21026
+ &:after {
21027
+ border-color: ${({
21199
21028
  theme
21200
- }) => theme.colors['text/disabled']};
21201
- & > svg {
21202
- color: ${({
21029
+ }) => theme.colors['border/danger']};
21030
+ }
21031
+ `}
21032
+
21033
+ ${props => props.validationStatus !== 'error' && styled.css`
21034
+ &:focus-within {
21035
+ &:after {
21036
+ border-color: ${({
21203
21037
  theme
21204
- }) => theme.colors['icon/disabled']};
21205
- }
21038
+ }) => theme.colors['border/focused']};
21039
+ }
21040
+ }
21041
+ `}
21042
+
21043
+ ${props => props.disabled && styled.css`
21044
+ border-color: ${props.theme.colors['border/input']};
21045
+ background-color: ${props.theme.colors['bg/disabled']};
21046
+ color: ${props.theme.colors['text/disabled']};
21047
+
21048
+ select::placeholder {
21049
+ color: ${props.theme.colors['text/disabled']};
21050
+ }
21051
+
21052
+ select {
21053
+ cursor: not-allowed;
21054
+ }
21055
+ `};
21056
+
21057
+ ${props => props.hasLeadingVisual && styled.css`
21058
+ padding-left: ${forcePixelValue(props.theme.space[5])};
21059
+ select {
21060
+ padding-left: ${forcePixelValue(props.theme.space[2])};
21061
+ }
21062
+ `}
21063
+
21064
+ transition: background-color 100ms;
21065
+ &:after {
21066
+ transition: border-color 100ms;
21206
21067
  }
21207
21068
  `;
21208
- const PaginationTruncationIndicator = styled__default.default.div`
21209
- min-width: ${forcePixelValue(32)};
21069
+ const UnstyledSelect = styled__default.default.select`
21070
+ font-size: inherit;
21071
+ font-weight: inherit;
21072
+ line-height: inherit;
21073
+ font-family: inherit;
21074
+ border-radius: inherit;
21075
+ color: inherit;
21076
+ transition: inherit;
21210
21077
 
21211
- border-radius: ${({
21212
- theme
21213
- }) => forcePixelValue(theme.radii.xs)};
21214
- padding: ${({
21215
- theme
21216
- }) => `${forcePixelValue(theme.space[0])} ${forcePixelValue(theme.space[3])}`};
21217
- background-color: ${({
21218
- theme
21219
- }) => theme.colors['bg/neutral/subtler']};
21078
+ border: 0;
21079
+ background-color: transparent;
21080
+ width: 100%;
21081
+ &:focus {
21082
+ outline: 0;
21083
+ }
21220
21084
 
21221
- font-size: ${({
21085
+ appearance: none;
21086
+ -webkit-appearance: none;
21087
+ -moz-appearance: none;
21088
+ `;
21089
+ const BaseSelect = styled__default.default(UnstyledSelect)`
21090
+ padding-top: ${({
21222
21091
  theme
21223
- }) => forcePixelValue(theme.fontSizes.xs)};
21224
- font-weight: ${({
21092
+ }) => forcePixelValue(theme.space['4'])};
21093
+ padding-right: ${({
21225
21094
  theme
21226
- }) => theme.fontWeights.regular};
21227
- line-height: ${({
21095
+ }) => forcePixelValue(theme.space['12'])};
21096
+ padding-bottom: ${({
21228
21097
  theme
21229
- }) => theme.lineHeights[2]};
21230
- color: ${({
21098
+ }) => forcePixelValue(theme.space['4'])};
21099
+ padding-left: ${({
21231
21100
  theme
21232
- }) => theme.colors['text/neutral']};
21233
-
21234
- pointer-events: none;
21101
+ }) => forcePixelValue(theme.space['5'])};
21235
21102
 
21236
- ${sx}
21103
+ white-space: pre;
21104
+ text-overflow: ellipsis;
21237
21105
  `;
21238
- var index$5 = Object.assign(Pagination, {
21239
- Page: PaginationPage,
21240
- PageDirection: PaginationPageDirection,
21241
- TruncationIndicator: PaginationTruncationIndicator
21106
+ var Select$1 = Object.assign( /*#__PURE__*/React.forwardRef(Select), {
21107
+ Option: SelectOption
21242
21108
  });
21243
21109
 
21244
- const Pill = ({
21245
- children,
21246
- size = 'm',
21247
- variant = 'outlined',
21248
- disabled = false,
21249
- leadingVisual: LeadingVisual,
21250
- trailingVisual: TrailingVisual,
21251
- onRemove: propOnRemove,
21252
- removeIcon: RemoveIcon = SvgClose,
21110
+ const TextInputTrailingAction = ({
21111
+ icon: Icon,
21112
+ disabled,
21253
21113
  ...props
21254
- }, ref) => {
21255
- const handleRemove = React.useCallback(event => {
21256
- propOnRemove?.(event);
21257
- }, [propOnRemove]);
21258
- const handleRemoveClick = React.useCallback(event => {
21259
- if (disabled) return;
21260
- handleRemove(event);
21261
- }, [handleRemove, disabled]);
21262
- const handleRemoveKeydown = React.useCallback(event => {
21263
- if (disabled) return;
21264
- if ([' ', 'Enter'].includes(event.key)) {
21265
- handleRemove(event);
21266
- }
21267
- }, [handleRemove, disabled]);
21268
- return /*#__PURE__*/jsxRuntimeExports.jsxs(BasePill, {
21269
- ref: ref,
21270
- size: size,
21271
- variant: variant,
21272
- hasLeadingVisual: !isNullable(LeadingVisual),
21273
- hasRemoveButton: !isNullable(propOnRemove),
21274
- disabled: disabled,
21275
- ...props,
21276
- children: [typeof LeadingVisual !== 'string' && reactIsExports.isValidElementType(LeadingVisual) ? /*#__PURE__*/jsxRuntimeExports.jsx(LeadingVisual, {}) : LeadingVisual, /*#__PURE__*/jsxRuntimeExports.jsx("span", {
21277
- title: children?.toString(),
21278
- children: children
21279
- }), typeof TrailingVisual !== 'string' && reactIsExports.isValidElementType(TrailingVisual) ? /*#__PURE__*/jsxRuntimeExports.jsx(TrailingVisual, {}) : TrailingVisual, propOnRemove ? /*#__PURE__*/jsxRuntimeExports.jsx("div", {
21280
- onClick: e => {
21281
- e.preventDefault();
21282
- handleRemoveClick(e);
21283
- e.stopPropagation();
21284
- },
21285
- onKeyDown: e => {
21286
- if ([' ', 'Enter'].includes(e.key)) {
21287
- e.preventDefault();
21288
- e.stopPropagation();
21289
- handleRemoveKeydown(e);
21290
- return;
21291
- }
21292
- },
21293
- "aria-label": 'Remove Pill',
21294
- role: 'button',
21295
- "aria-disabled": disabled,
21296
- tabIndex: disabled ? -1 : 0,
21297
- children: /*#__PURE__*/jsxRuntimeExports.jsx(RemoveIcon, {})
21298
- }) : null]
21299
- });
21300
- };
21301
- const BasePill = styled__default.default(UnstyledButton)`
21114
+ }, ref) => /*#__PURE__*/jsxRuntimeExports.jsx(BaseTextInputTrailingAction, {
21115
+ ref: ref,
21116
+ ...props,
21117
+ disabled: disabled,
21118
+ "aria-disabled": disabled,
21119
+ children: /*#__PURE__*/jsxRuntimeExports.jsx(Icon, {})
21120
+ });
21121
+ const BaseTextInputTrailingAction = styled__default.default(UnstyledButton)`
21302
21122
  display: inline-flex;
21303
- align-items: center;
21304
- border-radius: ${({
21305
- theme
21306
- }) => forcePixelValue(theme.radii.xs)};
21307
- column-gap: ${({
21123
+ padding: ${({
21308
21124
  theme
21309
21125
  }) => forcePixelValue(theme.space[2])};
21310
-
21311
- transition: background-color 100ms;
21312
-
21313
- & span {
21314
- max-width: 240px;
21315
- overflow: hidden;
21316
- text-overflow: ellipsis;
21317
- white-space: pre;
21318
- word-break: break-all;
21319
- }
21320
-
21321
- &:focus-visible {
21322
- outline-color: ${({
21126
+ background-color: ${({
21323
21127
  theme
21324
- }) => theme.colors['border/focused']};
21325
- outline-style: solid;
21326
- outline-width: ${forcePixelValue(2)};
21327
- outline-offset: ${({
21128
+ }) => theme.colors['bg/neutral/subtler']};
21129
+ border-radius: ${({
21328
21130
  theme
21329
- }) => forcePixelValue(theme.space[0.5])};
21330
- }
21131
+ }) => forcePixelValue(theme.radii.full)};
21331
21132
 
21332
- & > div {
21333
- display: flex;
21334
- border-radius: ${({
21133
+ & svg {
21134
+ width: ${forcePixelValue(16)};
21135
+ height: ${forcePixelValue(16)};
21136
+ color: ${({
21335
21137
  theme
21336
- }) => forcePixelValue(theme.radii.xxs)};
21138
+ }) => theme.colors['icon/neutral/bolder']};
21337
21139
  }
21338
- & > div:focus-visible {
21339
- outline-color: ${({
21340
- theme
21341
- }) => theme.colors['border/focused']};
21342
- outline-style: solid;
21343
- outline-width: ${forcePixelValue(2)};
21344
- outline-offset: ${({
21140
+
21141
+ &:hover {
21142
+ background-color: ${({
21345
21143
  theme
21346
- }) => forcePixelValue(theme.space[-0.5])};
21144
+ }) => theme.colors['bg/neutral/subtler/hovered']};
21347
21145
  }
21348
21146
 
21349
- ${({
21350
- theme,
21351
- hasRemoveButton
21352
- }) => variant({
21353
- prop: 'size',
21354
- variants: {
21355
- m: {
21356
- 'pl': 3,
21357
- 'pr': !hasRemoveButton ? 3 : 1,
21358
- 'height': forcePixelValue(32),
21359
- 'fontSize': theme.fontSizes.xxs,
21360
- 'fontWeight': theme.fontWeights.medium,
21361
- 'lineHeight': theme.lineHeights[2],
21362
- 'columnGap': 1,
21363
- '& svg': {
21364
- minWidth: 12,
21365
- height: 12
21366
- },
21367
- '& > div': {
21368
- p: 1
21369
- }
21370
- }
21371
- }
21372
- })}
21373
- ${({
21374
- theme,
21375
- disabled
21376
- }) => variant({
21377
- prop: 'variant',
21378
- variants: {
21379
- outlined: {
21380
- 'backgroundColor': theme.colors['bg/neutral/subtler'],
21381
- 'borderWidth': 1,
21382
- 'borderStyle': 'solid',
21383
- 'borderColor': theme.colors['border/neutral'],
21384
- 'color': 'text/neutral/subtle',
21385
- '& svg': {
21386
- color: theme.colors['icon/neutral/bolder']
21387
- },
21388
- '&:hover': {
21389
- backgroundColor: theme.colors['bg/neutral/subtler/hovered']
21390
- },
21391
- '&:active': {
21392
- backgroundColor: theme.colors['bg/neutral/subtler/pressed']
21393
- },
21394
- ...(disabled ? {
21395
- 'cursor': 'not-allowed',
21396
- 'backgroundColor': theme.colors['bg/disabled'],
21397
- 'color': theme.colors['text/disabled'],
21398
- '& svg': {
21399
- color: theme.colors['icon/disabled']
21400
- }
21401
- } : {})
21147
+ &[aria-disabled='true'] {
21148
+ cursor: not-allowed;
21149
+ & svg {
21150
+ color: ${({
21151
+ theme
21152
+ }) => theme.colors['icon/disabled']};
21402
21153
  }
21403
21154
  }
21404
- })}
21405
-
21155
+
21406
21156
  ${sx}
21407
21157
  `;
21408
- var index$4 = /*#__PURE__*/React.forwardRef(Pill);
21409
-
21410
- const SelectOption = ({
21411
- children: propChildren,
21412
- ...props
21413
- }) => {
21414
- const children = isNullable(propChildren) ? props.label : propChildren;
21415
- return /*#__PURE__*/jsxRuntimeExports.jsx(BaseSelectOption, {
21416
- ...props,
21417
- children: children
21418
- });
21419
- };
21420
- const BaseSelectOption = styled__default.default.option``;
21158
+ var TextInputTrailingAction$1 = /*#__PURE__*/React.forwardRef(TextInputTrailingAction);
21421
21159
 
21422
- const Select = ({
21423
- children,
21160
+ const TextInput = ({
21161
+ type = 'text',
21424
21162
  disabled,
21425
21163
  validationStatus,
21426
21164
  leadingVisual: LeadingVisual,
21427
- placeholder = '옵션 선택',
21165
+ trailingVisual: TrailingVisual,
21166
+ trailingAction,
21428
21167
  ...props
21429
21168
  }, ref) => {
21430
- const PLACEHOLDER_VALUE = '';
21431
- const selectRef = useProvidedOrCreatedRef(ref);
21432
- const [isValueEmpty, setIsValueEmpty] = React.useState(isNullable(props.value) || props.value === PLACEHOLDER_VALUE);
21433
- const focusSelect = () => {
21434
- selectRef.current?.focus();
21169
+ const inputRef = useProvidedOrCreatedRef(ref);
21170
+ const focusInput = () => {
21171
+ inputRef.current?.focus();
21435
21172
  };
21436
- return /*#__PURE__*/jsxRuntimeExports.jsxs(SelectWrapper, {
21173
+ return /*#__PURE__*/jsxRuntimeExports.jsxs(TextInputWrapper, {
21437
21174
  disabled: disabled,
21438
- onClick: focusSelect,
21175
+ onClick: focusInput,
21439
21176
  hasLeadingVisual: !isNullable(LeadingVisual),
21177
+ hasTrailingVisual: !isNullable(TrailingVisual),
21178
+ hasTrailingAction: !isNullable(trailingAction),
21440
21179
  validationStatus: validationStatus,
21441
- isValueEmpty: isValueEmpty,
21442
21180
  children: [/*#__PURE__*/jsxRuntimeExports.jsx(View, {
21443
21181
  sx: {
21444
21182
  'flexShrink': 0,
21445
21183
  'fontSize': 'xxs',
21446
21184
  'fontWeight': 'medium',
21447
- 'color': 'text/neutral',
21185
+ 'color': color$1['text/neutral'],
21448
21186
  '& > svg': {
21449
21187
  display: 'block',
21450
21188
  width: 16,
21451
21189
  height: 16,
21452
- color: 'icon/neutral/bold'
21190
+ color: color$1['icon/neutral/bold']
21453
21191
  }
21454
21192
  },
21455
21193
  children: typeof LeadingVisual !== 'string' && reactIsExports.isValidElementType(LeadingVisual) ? /*#__PURE__*/jsxRuntimeExports.jsx(LeadingVisual, {}) : LeadingVisual
21456
- }), /*#__PURE__*/jsxRuntimeExports.jsxs(BaseSelect, {
21194
+ }), /*#__PURE__*/jsxRuntimeExports.jsx(BaseInput, {
21457
21195
  ref: e => {
21458
21196
  isFunction(ref) ? ref(e) : null;
21459
- selectRef.current = e;
21197
+ inputRef.current = e;
21460
21198
  },
21461
- placeholder: placeholder,
21199
+ type: type,
21462
21200
  disabled: disabled,
21463
- ...props,
21464
- onChange: e => {
21465
- props.onChange?.(e);
21466
- if (!e.defaultPrevented) {
21467
- if (e.target.value === PLACEHOLDER_VALUE) {
21468
- setIsValueEmpty(true);
21469
- } else {
21470
- setIsValueEmpty(false);
21471
- }
21201
+ ...props
21202
+ }), /*#__PURE__*/jsxRuntimeExports.jsxs(View, {
21203
+ sx: {
21204
+ 'display': 'flex',
21205
+ 'alignItems': 'center',
21206
+ 'columnGap': 2,
21207
+ 'flexShrink': 0,
21208
+ 'fontSize': 'xxs',
21209
+ 'fontWeight': 'medium',
21210
+ 'color': color$1['text/neutral'],
21211
+ '& > svg': {
21212
+ display: 'block',
21213
+ width: 16,
21214
+ height: 16,
21215
+ color: color$1['icon/neutral/bold']
21472
21216
  }
21473
21217
  },
21474
- children: [/*#__PURE__*/jsxRuntimeExports.jsx(SelectOption, {
21475
- label: placeholder,
21476
- value: PLACEHOLDER_VALUE
21477
- }), children]
21478
- }), /*#__PURE__*/jsxRuntimeExports.jsx(StyledIcon, {
21479
- sx: {
21480
- position: 'absolute',
21481
- top: '50%',
21482
- transform: 'translateY(-50%)',
21483
- right: 5,
21484
- pointerEvents: 'none'
21485
- },
21486
- icon: SvgChevronDown,
21487
- color: disabled ? 'icon/disabled' : 'icon/neutral/bolder',
21488
- size: 16
21218
+ children: [typeof TrailingVisual !== 'string' && reactIsExports.isValidElementType(TrailingVisual) ? /*#__PURE__*/jsxRuntimeExports.jsx(TrailingVisual, {}) : TrailingVisual, trailingAction ? /*#__PURE__*/React.cloneElement(trailingAction, {
21219
+ disabled: disabled
21220
+ }) : null]
21489
21221
  })]
21490
21222
  });
21491
21223
  };
21492
- const SelectWrapper = styled__default.default.div`
21224
+ const TextInputWrapper = styled__default.default.div`
21493
21225
  position: relative;
21494
21226
  width: ${forcePixelValue('100%')};
21495
21227
  border-width: ${forcePixelValue(1)};
@@ -21503,6 +21235,7 @@ const SelectWrapper = styled__default.default.div`
21503
21235
  background-color: ${({
21504
21236
  theme
21505
21237
  }) => theme.colors['bg/input']};
21238
+ cursor: text;
21506
21239
  display: inline-flex;
21507
21240
  align-items: center;
21508
21241
 
@@ -21517,17 +21250,12 @@ const SelectWrapper = styled__default.default.div`
21517
21250
  }) => theme.lineHeights[2]};
21518
21251
  color: ${({
21519
21252
  theme
21520
- }) => theme.colors['text/neutral/subtle']};
21521
-
21522
- /**
21523
- * placeholder style
21524
- */
21525
- ${({
21526
- theme,
21527
- isValueEmpty
21528
- }) => isValueEmpty ? styled.css`
21529
- color: ${theme.colors['text/neutral/subtlest']};
21530
- ` : null}
21253
+ }) => theme.colors['text/neutral']};
21254
+ input::placeholder {
21255
+ color: ${({
21256
+ theme
21257
+ }) => theme.colors['text/neutral/subtlest']};
21258
+ }
21531
21259
 
21532
21260
  &:after {
21533
21261
  content: '';
@@ -21577,28 +21305,43 @@ const SelectWrapper = styled__default.default.div`
21577
21305
  background-color: ${props.theme.colors['bg/disabled']};
21578
21306
  color: ${props.theme.colors['text/disabled']};
21579
21307
 
21580
- select::placeholder {
21308
+ input::placeholder {
21581
21309
  color: ${props.theme.colors['text/disabled']};
21582
21310
  }
21583
21311
 
21584
- select {
21312
+ input {
21585
21313
  cursor: not-allowed;
21586
21314
  }
21587
21315
  `};
21588
21316
 
21589
21317
  ${props => props.hasLeadingVisual && styled.css`
21590
21318
  padding-left: ${forcePixelValue(props.theme.space[5])};
21591
- select {
21319
+ input {
21592
21320
  padding-left: ${forcePixelValue(props.theme.space[2])};
21593
21321
  }
21594
21322
  `}
21595
21323
 
21596
- transition: background-color 100ms;
21324
+ ${props => props.hasTrailingVisual && styled.css`
21325
+ padding-right: ${forcePixelValue(props.theme.space[5])};
21326
+ `}
21327
+
21328
+ ${props => props.hasTrailingAction && styled.css`
21329
+ padding-right: ${forcePixelValue(props.theme.space[3])};
21330
+ `}
21331
+
21332
+ ${props => (props.hasTrailingVisual || props.hasTrailingAction) && styled.css`
21333
+ input {
21334
+ padding-right: ${forcePixelValue(props.theme.space[2])};
21335
+ }
21336
+ `}
21337
+
21338
+
21339
+ transition: color 100ms, background-color 100ms;
21597
21340
  &:after {
21598
21341
  transition: border-color 100ms;
21599
21342
  }
21600
21343
  `;
21601
- const UnstyledSelect = styled__default.default.select`
21344
+ const UnstyledInput = styled__default.default.input`
21602
21345
  font-size: inherit;
21603
21346
  font-weight: inherit;
21604
21347
  line-height: inherit;
@@ -21613,131 +21356,868 @@ const UnstyledSelect = styled__default.default.select`
21613
21356
  &:focus {
21614
21357
  outline: 0;
21615
21358
  }
21616
-
21617
- appearance: none;
21618
- -webkit-appearance: none;
21619
- -moz-appearance: none;
21620
21359
  `;
21621
- const BaseSelect = styled__default.default(UnstyledSelect)`
21360
+ const BaseInput = styled__default.default(UnstyledInput)`
21622
21361
  padding-top: ${({
21623
21362
  theme
21624
21363
  }) => forcePixelValue(theme.space['4'])};
21625
21364
  padding-right: ${({
21626
21365
  theme
21627
- }) => forcePixelValue(theme.space['12'])};
21366
+ }) => forcePixelValue(theme.space['5'])};
21628
21367
  padding-bottom: ${({
21629
21368
  theme
21630
21369
  }) => forcePixelValue(theme.space['4'])};
21631
21370
  padding-left: ${({
21632
21371
  theme
21633
21372
  }) => forcePixelValue(theme.space['5'])};
21634
-
21635
- white-space: pre;
21636
- text-overflow: ellipsis;
21637
21373
  `;
21638
- var index$3 = Object.assign( /*#__PURE__*/React.forwardRef(Select), {
21639
- Option: SelectOption
21640
- });
21641
-
21642
- const Stack = /*#__PURE__*/React.forwardRef(({
21643
- gapX = 0,
21644
- gapY = 0,
21645
- children,
21646
- alignItems = 'center',
21647
- ...props
21648
- }, ref) => /*#__PURE__*/jsxRuntimeExports.jsx(BaseStack, {
21649
- ref: ref,
21650
- alignItems: alignItems,
21651
- gapX: gapX,
21652
- gapY: gapY,
21653
- ...props,
21654
- children: children
21655
- }));
21656
- const BaseStack = styled__default.default(View)({
21657
- display: 'flex',
21658
- flexDirection: 'row',
21659
- flexWrap: 'wrap'
21660
- }, variant({
21661
- prop: 'gapX',
21662
- variants: Object.fromEntries(Object.entries(space).map(([key, value]) => {
21663
- const styleValue = {
21664
- '& > *': {
21665
- px: forcePixelValue(value / 2)
21666
- },
21667
- 'mx': forcePixelValue(-value / 2)
21668
- };
21669
- return [key, styleValue];
21670
- }))
21671
- }), variant({
21672
- prop: 'gapY',
21673
- variants: Object.fromEntries(Object.entries(space).map(([key, value]) => {
21674
- const styleValue = {
21675
- '& > *': {
21676
- mt: forcePixelValue(value)
21677
- },
21678
- 'mt': forcePixelValue(-value)
21679
- };
21680
- return [key, styleValue];
21681
- }))
21682
- }));
21683
- const Item = ({
21684
- children,
21685
- ...props
21686
- }) => /*#__PURE__*/jsxRuntimeExports.jsx(View, {
21687
- ...props,
21688
- children: children
21689
- });
21690
- var Stack$1 = Object.assign(Stack, {
21691
- Item
21374
+ var TextInput$1 = Object.assign( /*#__PURE__*/React.forwardRef(TextInput), {
21375
+ TrailingAction: TextInputTrailingAction$1
21692
21376
  });
21693
21377
 
21694
- /**
21695
- * lodash (Custom Build) <https://lodash.com/>
21696
- * Build: `lodash modularize exports="npm" -o ./`
21697
- * Copyright jQuery Foundation and other contributors <https://jquery.org/>
21698
- * Released under MIT license <https://lodash.com/license>
21699
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
21700
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
21701
- */
21702
-
21703
- /** Used as the `TypeError` message for "Functions" methods. */
21704
- var FUNC_ERROR_TEXT$1 = 'Expected a function';
21705
-
21706
- /** Used as references for various `Number` constants. */
21707
- var NAN$1 = 0 / 0;
21708
-
21709
- /** `Object#toString` result references. */
21710
- var symbolTag$1 = '[object Symbol]';
21378
+ const FormControlCaption = ({
21379
+ children
21380
+ }) => {
21381
+ const {
21382
+ id
21383
+ } = React.useContext(FormControlContext);
21384
+ return /*#__PURE__*/jsxRuntimeExports.jsx(Text, {
21385
+ as: 'span',
21386
+ id: id,
21387
+ typography: 'xs',
21388
+ color: 'text/neutral/subtlest',
21389
+ children: children
21390
+ });
21391
+ };
21711
21392
 
21712
- /** Used to match leading and trailing whitespace. */
21713
- var reTrim$1 = /^\s+|\s+$/g;
21393
+ const FormControlErrorMessage = ({
21394
+ children
21395
+ }) => {
21396
+ const {
21397
+ id
21398
+ } = React.useContext(FormControlContext);
21399
+ return /*#__PURE__*/jsxRuntimeExports.jsx(StyledText$1, {
21400
+ id: id,
21401
+ typography: 'xs',
21402
+ color: 'text/danger',
21403
+ children: children
21404
+ });
21405
+ };
21406
+ const errorMessageKeyframe = styled.keyframes`
21407
+ 0% {
21408
+ opacity: 0;
21409
+ transform: translateY(-100%);
21410
+ }
21411
+ 100% {
21412
+ opacity: 1;
21413
+ transform: translateY(0);
21414
+ }
21415
+ `;
21416
+ const StyledText$1 = styled__default.default(Text)`
21417
+ animation: 170ms ${errorMessageKeyframe} cubic-bezier(0.44, 0.74, 0.36, 1);
21418
+ `;
21714
21419
 
21715
- /** Used to detect bad signed hexadecimal string values. */
21716
- var reIsBadHex$1 = /^[-+]0x[0-9a-f]+$/i;
21420
+ const FormControlLabel = ({
21421
+ children,
21422
+ visuallyHidden,
21423
+ ...props
21424
+ }) => {
21425
+ const {
21426
+ id,
21427
+ disabled,
21428
+ required
21429
+ } = React.useContext(FormControlContext);
21430
+ return /*#__PURE__*/jsxRuntimeExports.jsx(VisuallyHidden, {
21431
+ as: 'label',
21432
+ htmlFor: id,
21433
+ isVisible: !visuallyHidden,
21434
+ children: /*#__PURE__*/jsxRuntimeExports.jsxs(LabelWrapper, {
21435
+ ...props,
21436
+ disabled: disabled,
21437
+ children: [children, required ? /*#__PURE__*/jsxRuntimeExports.jsx(View, {
21438
+ as: 'span',
21439
+ "aria-hidden": "true",
21440
+ children: ' *'
21441
+ }) : null]
21442
+ })
21443
+ });
21444
+ };
21445
+ const VisuallyHidden = styled__default.default.span`
21446
+ ${({
21447
+ isVisible = false
21448
+ }) => {
21449
+ if (isVisible) {
21450
+ return sx;
21451
+ }
21452
+ return `
21453
+ position: absolute;
21454
+ width: 1px;
21455
+ height: 1px;
21456
+ padding: 0;
21457
+ margin: -1px;
21458
+ overflow: hidden;
21459
+ clip: rect(0, 0, 0, 0);
21460
+ white-space: nowrap;
21461
+ border-width: 0;
21462
+ `;
21463
+ }}
21464
+ `;
21465
+ const LabelWrapper = styled__default.default(View)`
21466
+ display: block;
21467
+ align-self: flex-start;
21717
21468
 
21718
- /** Used to detect binary string values. */
21719
- var reIsBinary$1 = /^0b[01]+$/i;
21469
+ font-size: ${({
21470
+ theme
21471
+ }) => forcePixelValue(theme.fontSizes.xs)};
21472
+ font-weight: ${({
21473
+ theme
21474
+ }) => theme.fontWeights.medium};
21475
+ line-height: ${({
21476
+ theme
21477
+ }) => theme.lineHeights[2]};
21720
21478
 
21721
- /** Used to detect octal string values. */
21722
- var reIsOctal$1 = /^0o[0-7]+$/i;
21479
+ color: ${({
21480
+ theme
21481
+ }) => theme.colors['text/neutral/subtle']};
21723
21482
 
21724
- /** Built-in method references without a dependency on `root`. */
21725
- var freeParseInt$1 = parseInt;
21483
+ cursor: ${({
21484
+ disabled
21485
+ }) => disabled ? 'not-allowed' : 'pointer'};
21726
21486
 
21727
- /** Detect free variable `global` from Node.js. */
21728
- var freeGlobal$1 = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
21487
+ ${sx};
21488
+ `;
21729
21489
 
21730
- /** Detect free variable `self`. */
21731
- var freeSelf$1 = typeof self == 'object' && self && self.Object === Object && self;
21490
+ const FormControlSuccessMessage = ({
21491
+ children
21492
+ }) => {
21493
+ const {
21494
+ id
21495
+ } = React.useContext(FormControlContext);
21496
+ return /*#__PURE__*/jsxRuntimeExports.jsx(StyledText, {
21497
+ id: id,
21498
+ typography: 'xs',
21499
+ color: 'text/success',
21500
+ children: children
21501
+ });
21502
+ };
21503
+ const successMessageKeyframe = styled.keyframes`
21504
+ 0% {
21505
+ opacity: 0;
21506
+ transform: translateY(-100%);
21507
+ }
21508
+ 100% {
21509
+ opacity: 1;
21510
+ transform: translateY(0);
21511
+ }
21512
+ `;
21513
+ const StyledText = styled__default.default(Text)`
21514
+ animation: 170ms ${successMessageKeyframe} cubic-bezier(0.44, 0.74, 0.36, 1);
21515
+ `;
21732
21516
 
21733
- /** Used as a reference to the global object. */
21734
- var root$1 = freeGlobal$1 || freeSelf$1 || Function('return this')();
21517
+ const FormControlContext = /*#__PURE__*/React.createContext({});
21518
+ const FormControl = ({
21519
+ children: propChildren,
21520
+ id,
21521
+ disabled,
21522
+ required,
21523
+ additionalInputComponentCandidates = []
21524
+ }, ref) => {
21525
+ const [relocatableComponentsObject, restComponents] = useRelocation({
21526
+ children: propChildren,
21527
+ config: {
21528
+ label: FormControlLabel,
21529
+ caption: FormControlCaption,
21530
+ errorMessage: FormControlErrorMessage,
21531
+ successMessage: FormControlSuccessMessage
21532
+ }
21533
+ });
21534
+ const inputComponentCandidates = [TextInput$1, Select$1, OverlaySelectInput$1, Checkbox$1, ...additionalInputComponentCandidates];
21535
+ const InputComponent = restComponents.find(component => inputComponentCandidates.some(candidate => /*#__PURE__*/React.isValidElement(component) && component.type === candidate));
21536
+ const isHorizontalLayoutNeeded = /*#__PURE__*/React.isValidElement(InputComponent) && InputComponent.type === Checkbox$1;
21537
+ return /*#__PURE__*/jsxRuntimeExports.jsx(FormControlContext.Provider, {
21538
+ value: {
21539
+ id,
21540
+ disabled,
21541
+ required
21542
+ },
21543
+ children: isHorizontalLayoutNeeded ? /*#__PURE__*/jsxRuntimeExports.jsxs(View, {
21544
+ ref: ref,
21545
+ display: 'flex',
21546
+ sx: {
21547
+ columnGap: 2
21548
+ },
21549
+ children: [/*#__PURE__*/jsxRuntimeExports.jsx(View, {
21550
+ children: /*#__PURE__*/React.cloneElement(InputComponent, {
21551
+ id,
21552
+ disabled,
21553
+ required
21554
+ })
21555
+ }), /*#__PURE__*/jsxRuntimeExports.jsxs(View, {
21556
+ sx: {
21557
+ '& > span': {
21558
+ mt: 0
21559
+ }
21560
+ },
21561
+ children: [relocatableComponentsObject.label, relocatableComponentsObject.caption, relocatableComponentsObject.errorMessage, relocatableComponentsObject.successMessage]
21562
+ })]
21563
+ }) : /*#__PURE__*/jsxRuntimeExports.jsxs(View, {
21564
+ ref: ref,
21565
+ display: 'flex',
21566
+ flexDirection: 'column',
21567
+ sx: {
21568
+ '& > label': {
21569
+ mb: 1
21570
+ },
21571
+ '& > span': {
21572
+ mt: 1
21573
+ }
21574
+ },
21575
+ children: [relocatableComponentsObject.label, /*#__PURE__*/React.cloneElement(InputComponent, {
21576
+ id,
21577
+ disabled,
21578
+ required
21579
+ }), relocatableComponentsObject.caption, relocatableComponentsObject.errorMessage, relocatableComponentsObject.successMessage]
21580
+ })
21581
+ });
21582
+ };
21583
+ var index$4 = Object.assign( /*#__PURE__*/React.forwardRef(FormControl), {
21584
+ Label: FormControlLabel,
21585
+ Caption: FormControlCaption,
21586
+ ErrorMessage: FormControlErrorMessage,
21587
+ SuccessMessage: FormControlSuccessMessage
21588
+ });
21735
21589
 
21736
- /** Used for built-in method references. */
21737
- var objectProto$1 = Object.prototype;
21590
+ const GradientText = styled__default.default(Text)`
21591
+ background: ${({
21592
+ theme
21593
+ }) => `linear-gradient(${theme.gradients['text/accent']})`};
21594
+ background-clip: text;
21595
+ -webkit-background-clip: text;
21596
+ -webkit-text-fill-color: transparent;
21597
+ `;
21738
21598
 
21739
- /**
21740
- * Used to resolve the
21599
+ const IconToggleButton = ({
21600
+ icon: Icon,
21601
+ size = 'm',
21602
+ variant = 'primary',
21603
+ selected = false,
21604
+ disabled = false,
21605
+ sx,
21606
+ ...props
21607
+ }) => {
21608
+ return /*#__PURE__*/jsxRuntimeExports.jsx(BaseIconToggleButton, {
21609
+ icon: Icon,
21610
+ size: size,
21611
+ variant: variant,
21612
+ selected: selected,
21613
+ type: 'button',
21614
+ disabled: disabled,
21615
+ $disabled: disabled,
21616
+ sx: sx,
21617
+ ...props,
21618
+ children: /*#__PURE__*/jsxRuntimeExports.jsx(Icon, {})
21619
+ });
21620
+ };
21621
+ const BaseIconToggleButton = styled__default.default(UnstyledButton)(({
21622
+ $disabled
21623
+ }) => ({
21624
+ 'position': 'relative',
21625
+ 'borderRadius': radii.full,
21626
+ 'transition': 'background-color 100ms, color 100ms',
21627
+ '& svg': {
21628
+ display: 'block'
21629
+ },
21630
+ 'cursor': $disabled ? 'not-allowed' : 'pointer',
21631
+ '&:focus-visible': {
21632
+ outlineColor: color$1['border/focused'],
21633
+ outlineStyle: 'solid',
21634
+ outlineWidth: 2,
21635
+ outlineOffset: 2
21636
+ }
21637
+ }), variant({
21638
+ prop: 'size',
21639
+ variants: {
21640
+ l: {
21641
+ 'p': 3,
21642
+ '& svg': {
21643
+ width: 24,
21644
+ height: 24
21645
+ }
21646
+ },
21647
+ m: {
21648
+ 'p': 2,
21649
+ '& svg': {
21650
+ width: 24,
21651
+ height: 24
21652
+ }
21653
+ },
21654
+ s: {
21655
+ 'p': 2,
21656
+ '& svg': {
21657
+ width: 16,
21658
+ height: 16
21659
+ }
21660
+ }
21661
+ }
21662
+ }), ({
21663
+ selected,
21664
+ $disabled
21665
+ }) => variant({
21666
+ prop: 'variant',
21667
+ variants: {
21668
+ primary: {
21669
+ ...(selected ? {
21670
+ backgroundColor: color$1['bg/selected/violet'],
21671
+ color: color$1['icon/inverse']
21672
+ } : {
21673
+ backgroundColor: color$1['bg/neutral'],
21674
+ color: color$1['icon/accent/gray']
21675
+ }),
21676
+ ...($disabled ? {
21677
+ backgroundColor: color$1['bg/disabled'],
21678
+ color: color$1['icon/disabled']
21679
+ } : {})
21680
+ },
21681
+ plain: {
21682
+ backgroundColor: color$1['bg/neutral/subtler'],
21683
+ ...(selected ? {
21684
+ color: color$1['icon/selected/violet']
21685
+ } : {
21686
+ color: color$1['icon/neutral']
21687
+ }),
21688
+ ...($disabled ? {
21689
+ backgroundColor: color$1['bg/disabled/subtlest'],
21690
+ color: color$1['icon/disabled/subtler']
21691
+ } : {})
21692
+ }
21693
+ }
21694
+ }), sx);
21695
+
21696
+ const Pagination = ({
21697
+ pages: propPages,
21698
+ currentPageIndex,
21699
+ aroundPageCount = 1,
21700
+ edgePageCount = 1,
21701
+ type = 'default',
21702
+ sx,
21703
+ onPageClick = noop$2,
21704
+ onPreviousClick = noop$2,
21705
+ onNextClick = noop$2,
21706
+ renderPage = (page, i) => /*#__PURE__*/jsxRuntimeExports.jsx(PaginationPage, {
21707
+ onClick: () => onPageClick(page, i),
21708
+ selected: i === currentPageIndex,
21709
+ children: page.label
21710
+ }),
21711
+ renderPageWrapper = (children, {
21712
+ label
21713
+ }, i) => /*#__PURE__*/jsxRuntimeExports.jsx(React.Fragment, {
21714
+ children: children
21715
+ }, [label, i].join('-')),
21716
+ renderPreviousPageDirection = ({
21717
+ previousPageDirectionProps
21718
+ }) => /*#__PURE__*/jsxRuntimeExports.jsxs(PaginationPageDirection, {
21719
+ ...previousPageDirectionProps,
21720
+ children: [/*#__PURE__*/jsxRuntimeExports.jsx(SvgChevronLeft, {}), "\uC774\uC804"]
21721
+ }),
21722
+ renderNextPageDirection = ({
21723
+ nextPageDirectionProps
21724
+ }) => /*#__PURE__*/jsxRuntimeExports.jsxs(PaginationPageDirection, {
21725
+ ...nextPageDirectionProps,
21726
+ children: ["\uB2E4\uC74C", /*#__PURE__*/jsxRuntimeExports.jsx(SvgChevronRight, {})]
21727
+ }),
21728
+ renderTruncationIndicator = () => /*#__PURE__*/jsxRuntimeExports.jsx(PaginationTruncationIndicator, {
21729
+ children: "\u2026"
21730
+ })
21731
+ }) => {
21732
+ const CURRENT_PAGE_COUNT = 1;
21733
+ const totalVisiblePageCount = CURRENT_PAGE_COUNT + 2 * aroundPageCount + 2 * edgePageCount;
21734
+ const pages = propPages.map((page, i) => ({
21735
+ page,
21736
+ originalIndex: i
21737
+ }));
21738
+ const totalPageCount = propPages.length;
21739
+ const isCurrentPageCloseToBeginEdge = currentPageIndex < edgePageCount + aroundPageCount + CURRENT_PAGE_COUNT;
21740
+ const isCurrentPageCloseToEndEdge = totalPageCount - (edgePageCount + aroundPageCount + CURRENT_PAGE_COUNT) < currentPageIndex + 1;
21741
+ const isTruncationNeeded = totalVisiblePageCount < totalPageCount;
21742
+ const renderPaginationPage = React.useCallback((page, i) => renderPageWrapper(renderPage(page, i), page, i), [currentPageIndex]);
21743
+ return /*#__PURE__*/jsxRuntimeExports.jsxs(BasePagination, {
21744
+ type: type,
21745
+ sx: sx,
21746
+ children: [renderPreviousPageDirection({
21747
+ previousPageDirectionProps: {
21748
+ onClick: () => onPreviousClick(currentPageIndex),
21749
+ disabled: currentPageIndex === 0
21750
+ }
21751
+ }), !isTruncationNeeded ? pages.map(({
21752
+ page,
21753
+ originalIndex
21754
+ }) => renderPaginationPage(page, originalIndex)) : isTruncationNeeded && isCurrentPageCloseToBeginEdge ? [pages.slice(0, edgePageCount + aroundPageCount * 2 + CURRENT_PAGE_COUNT).map(({
21755
+ page,
21756
+ originalIndex
21757
+ }) => renderPaginationPage(page, originalIndex)), /*#__PURE__*/jsxRuntimeExports.jsx(React.Fragment, {
21758
+ children: renderTruncationIndicator()
21759
+ }, 'end_truncation_indicator'), pages.slice(edgePageCount * -1).map(({
21760
+ page,
21761
+ originalIndex
21762
+ }) => renderPaginationPage(page, originalIndex))] : isTruncationNeeded && isCurrentPageCloseToEndEdge ? [pages.slice(0, edgePageCount).map(({
21763
+ page,
21764
+ originalIndex
21765
+ }) => renderPaginationPage(page, originalIndex)), /*#__PURE__*/jsxRuntimeExports.jsx(React.Fragment, {
21766
+ children: renderTruncationIndicator()
21767
+ }, 'begin_truncation_indicator'), pages.slice(totalPageCount - (edgePageCount + aroundPageCount * 2 + CURRENT_PAGE_COUNT)).map(({
21768
+ page,
21769
+ originalIndex
21770
+ }) => renderPaginationPage(page, originalIndex))] : [pages.slice(0, edgePageCount).map(({
21771
+ page,
21772
+ originalIndex
21773
+ }) => renderPaginationPage(page, originalIndex)), /*#__PURE__*/jsxRuntimeExports.jsx(React.Fragment, {
21774
+ children: renderTruncationIndicator()
21775
+ }, 'begin_truncation_indicator'), pages.slice(currentPageIndex - aroundPageCount, currentPageIndex + aroundPageCount + CURRENT_PAGE_COUNT).map(({
21776
+ page,
21777
+ originalIndex
21778
+ }) => renderPaginationPage(page, originalIndex)), /*#__PURE__*/jsxRuntimeExports.jsx(React.Fragment, {
21779
+ children: renderTruncationIndicator()
21780
+ }, 'end_truncation_indicator'), pages.slice(edgePageCount * -1).map(({
21781
+ page,
21782
+ originalIndex
21783
+ }) => renderPaginationPage(page, originalIndex))], renderNextPageDirection({
21784
+ nextPageDirectionProps: {
21785
+ onClick: () => onNextClick(currentPageIndex),
21786
+ disabled: currentPageIndex === totalPageCount - 1
21787
+ }
21788
+ })]
21789
+ });
21790
+ };
21791
+ const BasePagination = styled__default.default.nav`
21792
+ display: flex;
21793
+ align-items: center;
21794
+ justify-content: center;
21795
+ flex-wrap: nowrap;
21796
+ column-gap: ${({
21797
+ theme
21798
+ }) => forcePixelValue(theme.space[1])};
21799
+
21800
+ ${variant({
21801
+ prop: 'type',
21802
+ variants: {
21803
+ default: {},
21804
+ simple: {
21805
+ '& > *:not(:first-child):not(:last-child)': {
21806
+ display: 'none !important'
21807
+ }
21808
+ }
21809
+ }
21810
+ })}
21811
+ ${sx}
21812
+ `;
21813
+ const PaginationPage = styled__default.default(UnstyledButton)`
21814
+ transition: background-color 100ms;
21815
+
21816
+ height: ${forcePixelValue(32)};
21817
+ min-width: ${forcePixelValue(32)};
21818
+
21819
+ border-radius: ${({
21820
+ theme
21821
+ }) => forcePixelValue(theme.radii.xs)};
21822
+ padding: ${({
21823
+ theme
21824
+ }) => `${forcePixelValue(theme.space[0])} ${forcePixelValue(theme.space[3])}`};
21825
+ background-color: ${({
21826
+ theme
21827
+ }) => theme.colors['bg/neutral/subtler']};
21828
+
21829
+ font-size: ${({
21830
+ theme
21831
+ }) => forcePixelValue(theme.fontSizes.xs)};
21832
+ font-weight: ${({
21833
+ theme
21834
+ }) => theme.fontWeights.regular};
21835
+ line-height: ${({
21836
+ theme
21837
+ }) => theme.lineHeights[2]};
21838
+ color: ${({
21839
+ theme
21840
+ }) => theme.colors['text/neutral']};
21841
+
21842
+ ${({
21843
+ selected
21844
+ }) => selected ? styled.css`
21845
+ background-color: ${({
21846
+ theme
21847
+ }) => theme.colors['bg/neutral/bolder']};
21848
+ color: ${({
21849
+ theme
21850
+ }) => theme.colors['text/inverse']};
21851
+ ` : styled.css`
21852
+ &:hover {
21853
+ background-color: ${({
21854
+ theme
21855
+ }) => theme.colors['bg/neutral/subtler/hovered']};
21856
+ }
21857
+ `}
21858
+ `;
21859
+ const PaginationPageDirection = styled__default.default(UnstyledButton)`
21860
+ transition: background-color 100ms;
21861
+
21862
+ display: inline-flex;
21863
+ align-items: center;
21864
+ flex-wrap: nowrap;
21865
+ column-gap: ${({
21866
+ theme
21867
+ }) => forcePixelValue(theme.space[1])};
21868
+
21869
+ height: ${forcePixelValue(32)};
21870
+ min-width: ${forcePixelValue(32)};
21871
+
21872
+ border-radius: ${({
21873
+ theme
21874
+ }) => forcePixelValue(theme.radii.xs)};
21875
+ padding: ${({
21876
+ theme
21877
+ }) => `${forcePixelValue(theme.space[0])} ${forcePixelValue(theme.space[3])}`};
21878
+ background-color: ${({
21879
+ theme
21880
+ }) => theme.colors['bg/neutral/subtler']};
21881
+
21882
+ font-size: ${({
21883
+ theme
21884
+ }) => forcePixelValue(theme.fontSizes.xs)};
21885
+ font-weight: ${({
21886
+ theme
21887
+ }) => theme.fontWeights.regular};
21888
+ line-height: ${({
21889
+ theme
21890
+ }) => theme.lineHeights[2]};
21891
+ color: ${({
21892
+ theme
21893
+ }) => theme.colors['text/neutral']};
21894
+
21895
+ & svg {
21896
+ color: ${({
21897
+ theme
21898
+ }) => theme.colors['icon/accent/gray']};
21899
+ width: ${forcePixelValue(16)};
21900
+ height: ${forcePixelValue(16)};
21901
+ }
21902
+
21903
+ &:hover:not(:disabled) {
21904
+ background-color: ${({
21905
+ theme
21906
+ }) => theme.colors['bg/neutral/subtler/hovered']};
21907
+ }
21908
+ &:disabled {
21909
+ cursor: not-allowed;
21910
+ color: ${({
21911
+ theme
21912
+ }) => theme.colors['text/disabled']};
21913
+ & > svg {
21914
+ color: ${({
21915
+ theme
21916
+ }) => theme.colors['icon/disabled']};
21917
+ }
21918
+ }
21919
+ `;
21920
+ const PaginationTruncationIndicator = styled__default.default.div`
21921
+ min-width: ${forcePixelValue(32)};
21922
+
21923
+ border-radius: ${({
21924
+ theme
21925
+ }) => forcePixelValue(theme.radii.xs)};
21926
+ padding: ${({
21927
+ theme
21928
+ }) => `${forcePixelValue(theme.space[0])} ${forcePixelValue(theme.space[3])}`};
21929
+ background-color: ${({
21930
+ theme
21931
+ }) => theme.colors['bg/neutral/subtler']};
21932
+
21933
+ font-size: ${({
21934
+ theme
21935
+ }) => forcePixelValue(theme.fontSizes.xs)};
21936
+ font-weight: ${({
21937
+ theme
21938
+ }) => theme.fontWeights.regular};
21939
+ line-height: ${({
21940
+ theme
21941
+ }) => theme.lineHeights[2]};
21942
+ color: ${({
21943
+ theme
21944
+ }) => theme.colors['text/neutral']};
21945
+
21946
+ pointer-events: none;
21947
+
21948
+ ${sx}
21949
+ `;
21950
+ var index$3 = Object.assign(Pagination, {
21951
+ Page: PaginationPage,
21952
+ PageDirection: PaginationPageDirection,
21953
+ TruncationIndicator: PaginationTruncationIndicator
21954
+ });
21955
+
21956
+ const Pill = ({
21957
+ children,
21958
+ size = 'm',
21959
+ variant = 'outlined',
21960
+ disabled = false,
21961
+ leadingVisual: LeadingVisual,
21962
+ trailingVisual: TrailingVisual,
21963
+ onRemove: propOnRemove,
21964
+ removeIcon: RemoveIcon = SvgClose,
21965
+ ...props
21966
+ }, ref) => {
21967
+ const handleRemove = React.useCallback(event => {
21968
+ propOnRemove?.(event);
21969
+ }, [propOnRemove]);
21970
+ const handleRemoveClick = React.useCallback(event => {
21971
+ if (disabled) return;
21972
+ handleRemove(event);
21973
+ }, [handleRemove, disabled]);
21974
+ const handleRemoveKeydown = React.useCallback(event => {
21975
+ if (disabled) return;
21976
+ if ([' ', 'Enter'].includes(event.key)) {
21977
+ handleRemove(event);
21978
+ }
21979
+ }, [handleRemove, disabled]);
21980
+ return /*#__PURE__*/jsxRuntimeExports.jsxs(BasePill, {
21981
+ ref: ref,
21982
+ size: size,
21983
+ variant: variant,
21984
+ hasLeadingVisual: !isNullable(LeadingVisual),
21985
+ hasRemoveButton: !isNullable(propOnRemove),
21986
+ disabled: disabled,
21987
+ ...props,
21988
+ children: [typeof LeadingVisual !== 'string' && reactIsExports.isValidElementType(LeadingVisual) ? /*#__PURE__*/jsxRuntimeExports.jsx(LeadingVisual, {}) : LeadingVisual, /*#__PURE__*/jsxRuntimeExports.jsx("span", {
21989
+ title: children?.toString(),
21990
+ children: children
21991
+ }), typeof TrailingVisual !== 'string' && reactIsExports.isValidElementType(TrailingVisual) ? /*#__PURE__*/jsxRuntimeExports.jsx(TrailingVisual, {}) : TrailingVisual, propOnRemove ? /*#__PURE__*/jsxRuntimeExports.jsx("div", {
21992
+ onClick: e => {
21993
+ e.preventDefault();
21994
+ handleRemoveClick(e);
21995
+ e.stopPropagation();
21996
+ },
21997
+ onKeyDown: e => {
21998
+ if ([' ', 'Enter'].includes(e.key)) {
21999
+ e.preventDefault();
22000
+ e.stopPropagation();
22001
+ handleRemoveKeydown(e);
22002
+ return;
22003
+ }
22004
+ },
22005
+ "aria-label": 'Remove Pill',
22006
+ role: 'button',
22007
+ "aria-disabled": disabled,
22008
+ tabIndex: disabled ? -1 : 0,
22009
+ children: /*#__PURE__*/jsxRuntimeExports.jsx(RemoveIcon, {})
22010
+ }) : null]
22011
+ });
22012
+ };
22013
+ const BasePill = styled__default.default(UnstyledButton)`
22014
+ display: inline-flex;
22015
+ align-items: center;
22016
+ border-radius: ${({
22017
+ theme
22018
+ }) => forcePixelValue(theme.radii.xs)};
22019
+ column-gap: ${({
22020
+ theme
22021
+ }) => forcePixelValue(theme.space[2])};
22022
+
22023
+ transition: background-color 100ms;
22024
+
22025
+ & span {
22026
+ max-width: 240px;
22027
+ overflow: hidden;
22028
+ text-overflow: ellipsis;
22029
+ white-space: pre;
22030
+ word-break: break-all;
22031
+ }
22032
+
22033
+ &:focus-visible {
22034
+ outline-color: ${({
22035
+ theme
22036
+ }) => theme.colors['border/focused']};
22037
+ outline-style: solid;
22038
+ outline-width: ${forcePixelValue(2)};
22039
+ outline-offset: ${({
22040
+ theme
22041
+ }) => forcePixelValue(theme.space[0.5])};
22042
+ }
22043
+
22044
+ & > div {
22045
+ display: flex;
22046
+ border-radius: ${({
22047
+ theme
22048
+ }) => forcePixelValue(theme.radii.xxs)};
22049
+ }
22050
+ & > div:focus-visible {
22051
+ outline-color: ${({
22052
+ theme
22053
+ }) => theme.colors['border/focused']};
22054
+ outline-style: solid;
22055
+ outline-width: ${forcePixelValue(2)};
22056
+ outline-offset: ${({
22057
+ theme
22058
+ }) => forcePixelValue(theme.space[-0.5])};
22059
+ }
22060
+
22061
+ ${({
22062
+ theme,
22063
+ hasRemoveButton
22064
+ }) => variant({
22065
+ prop: 'size',
22066
+ variants: {
22067
+ m: {
22068
+ 'pl': 3,
22069
+ 'pr': !hasRemoveButton ? 3 : 1,
22070
+ 'height': forcePixelValue(32),
22071
+ 'fontSize': theme.fontSizes.xxs,
22072
+ 'fontWeight': theme.fontWeights.medium,
22073
+ 'lineHeight': theme.lineHeights[2],
22074
+ 'columnGap': 1,
22075
+ '& svg': {
22076
+ minWidth: 12,
22077
+ height: 12
22078
+ },
22079
+ '& > div': {
22080
+ p: 1
22081
+ }
22082
+ }
22083
+ }
22084
+ })}
22085
+ ${({
22086
+ theme,
22087
+ disabled
22088
+ }) => variant({
22089
+ prop: 'variant',
22090
+ variants: {
22091
+ outlined: {
22092
+ 'backgroundColor': theme.colors['bg/neutral/subtler'],
22093
+ 'borderWidth': 1,
22094
+ 'borderStyle': 'solid',
22095
+ 'borderColor': theme.colors['border/neutral'],
22096
+ 'color': 'text/neutral/subtle',
22097
+ '& svg': {
22098
+ color: theme.colors['icon/neutral/bolder']
22099
+ },
22100
+ '&:hover': {
22101
+ backgroundColor: theme.colors['bg/neutral/subtler/hovered']
22102
+ },
22103
+ '&:active': {
22104
+ backgroundColor: theme.colors['bg/neutral/subtler/pressed']
22105
+ },
22106
+ ...(disabled ? {
22107
+ 'cursor': 'not-allowed',
22108
+ 'backgroundColor': theme.colors['bg/disabled'],
22109
+ 'color': theme.colors['text/disabled'],
22110
+ '& svg': {
22111
+ color: theme.colors['icon/disabled']
22112
+ }
22113
+ } : {})
22114
+ }
22115
+ }
22116
+ })}
22117
+
22118
+ ${sx}
22119
+ `;
22120
+ var index$2 = /*#__PURE__*/React.forwardRef(Pill);
22121
+
22122
+ const Stack = /*#__PURE__*/React.forwardRef(({
22123
+ gapX = 0,
22124
+ gapY = 0,
22125
+ children,
22126
+ alignItems = 'center',
22127
+ ...props
22128
+ }, ref) => /*#__PURE__*/jsxRuntimeExports.jsx(BaseStack, {
22129
+ ref: ref,
22130
+ alignItems: alignItems,
22131
+ gapX: gapX,
22132
+ gapY: gapY,
22133
+ ...props,
22134
+ children: children
22135
+ }));
22136
+ const BaseStack = styled__default.default(View)({
22137
+ display: 'flex',
22138
+ flexDirection: 'row',
22139
+ flexWrap: 'wrap'
22140
+ }, variant({
22141
+ prop: 'gapX',
22142
+ variants: Object.fromEntries(Object.entries(space).map(([key, value]) => {
22143
+ const styleValue = {
22144
+ '& > *': {
22145
+ px: forcePixelValue(value / 2)
22146
+ },
22147
+ 'mx': forcePixelValue(-value / 2)
22148
+ };
22149
+ return [key, styleValue];
22150
+ }))
22151
+ }), variant({
22152
+ prop: 'gapY',
22153
+ variants: Object.fromEntries(Object.entries(space).map(([key, value]) => {
22154
+ const styleValue = {
22155
+ '& > *': {
22156
+ mt: forcePixelValue(value)
22157
+ },
22158
+ 'mt': forcePixelValue(-value)
22159
+ };
22160
+ return [key, styleValue];
22161
+ }))
22162
+ }));
22163
+ const Item = ({
22164
+ children,
22165
+ ...props
22166
+ }) => /*#__PURE__*/jsxRuntimeExports.jsx(View, {
22167
+ ...props,
22168
+ children: children
22169
+ });
22170
+ var Stack$1 = Object.assign(Stack, {
22171
+ Item
22172
+ });
22173
+
22174
+ /**
22175
+ * lodash (Custom Build) <https://lodash.com/>
22176
+ * Build: `lodash modularize exports="npm" -o ./`
22177
+ * Copyright jQuery Foundation and other contributors <https://jquery.org/>
22178
+ * Released under MIT license <https://lodash.com/license>
22179
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
22180
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
22181
+ */
22182
+
22183
+ /** Used as the `TypeError` message for "Functions" methods. */
22184
+ var FUNC_ERROR_TEXT$1 = 'Expected a function';
22185
+
22186
+ /** Used as references for various `Number` constants. */
22187
+ var NAN$1 = 0 / 0;
22188
+
22189
+ /** `Object#toString` result references. */
22190
+ var symbolTag$1 = '[object Symbol]';
22191
+
22192
+ /** Used to match leading and trailing whitespace. */
22193
+ var reTrim$1 = /^\s+|\s+$/g;
22194
+
22195
+ /** Used to detect bad signed hexadecimal string values. */
22196
+ var reIsBadHex$1 = /^[-+]0x[0-9a-f]+$/i;
22197
+
22198
+ /** Used to detect binary string values. */
22199
+ var reIsBinary$1 = /^0b[01]+$/i;
22200
+
22201
+ /** Used to detect octal string values. */
22202
+ var reIsOctal$1 = /^0o[0-7]+$/i;
22203
+
22204
+ /** Built-in method references without a dependency on `root`. */
22205
+ var freeParseInt$1 = parseInt;
22206
+
22207
+ /** Detect free variable `global` from Node.js. */
22208
+ var freeGlobal$1 = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
22209
+
22210
+ /** Detect free variable `self`. */
22211
+ var freeSelf$1 = typeof self == 'object' && self && self.Object === Object && self;
22212
+
22213
+ /** Used as a reference to the global object. */
22214
+ var root$1 = freeGlobal$1 || freeSelf$1 || Function('return this')();
22215
+
22216
+ /** Used for built-in method references. */
22217
+ var objectProto$1 = Object.prototype;
22218
+
22219
+ /**
22220
+ * Used to resolve the
21741
22221
  * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
21742
22222
  * of values.
21743
22223
  */
@@ -22517,620 +22997,377 @@ const scrollIntoView = ({
22517
22997
  });
22518
22998
  } else if (isChildrenBottomBelowScrollContainer) {
22519
22999
  const scrollDistance = childrenEnd - scrollContainerEnd + scrollContainerRef[scrollSide] + (options.offset || 0);
22520
- scrollContainerRef.scrollTo({
22521
- behavior: options.behavior,
22522
- [startSide]: scrollDistance
22523
- });
22524
- }
22525
- } else {
22526
- childrenRef.scrollIntoView({
22527
- behavior: options.behavior
22528
- });
22529
- }
22530
- };
22531
-
22532
- const TabItem = ({
22533
- children,
22534
- leadingIcon: LeadingIcon,
22535
- selected = false,
22536
- onClick,
22537
- size: propSize,
22538
- variant: propVariant
22539
- }) => {
22540
- const ref = React.useRef(null);
22541
- const {
22542
- size: contextSize,
22543
- variant: contextVariant,
22544
- containerRef
22545
- } = React.useContext(TabContext);
22546
- const size = propSize ?? contextSize;
22547
- const variant = propVariant ?? contextVariant;
22548
- const handleClick = e => {
22549
- if (containerRef && containerRef.current && ref.current) {
22550
- scrollIntoView({
22551
- scrollContainerRef: containerRef.current,
22552
- childrenRef: ref.current,
22553
- options: {
22554
- behavior: 'smooth',
22555
- offset: 72
22556
- }
22557
- });
22558
- }
22559
- onClick?.(e);
22560
- };
22561
- return /*#__PURE__*/jsxRuntimeExports.jsx(BaseTabItem, {
22562
- role: 'tab',
22563
- ref: ref,
22564
- variant: variant,
22565
- size: size,
22566
- leadingIcon: LeadingIcon,
22567
- selected: selected,
22568
- onClick: handleClick,
22569
- children: /*#__PURE__*/jsxRuntimeExports.jsxs(View, {
22570
- sx: {
22571
- display: 'flex',
22572
- flexDirection: 'row',
22573
- alignItems: 'center',
22574
- justifyContent: 'center',
22575
- columnGap: 1
22576
- },
22577
- children: [LeadingIcon ? /*#__PURE__*/jsxRuntimeExports.jsx(LeadingIcon, {}) : null, /*#__PURE__*/jsxRuntimeExports.jsx(View, {
22578
- children: children
22579
- })]
22580
- })
22581
- });
22582
- };
22583
- const BaseTabItem = styled__default.default(UnstyledButton)(({
22584
- theme
22585
- }) => ({
22586
- 'width': 'initial',
22587
- 'position': 'relative',
22588
- 'transition': 'background-color 100ms, color 100ms',
22589
- 'whiteSpace': 'nowrap',
22590
- '& svg': {
22591
- transition: 'color 100ms'
22592
- },
22593
- '&:focus-visible': {
22594
- outlineColor: theme.colors['border/focused'],
22595
- outlineStyle: 'solid',
22596
- outlineWidth: 2,
22597
- outlineOffset: 2
22598
- }
22599
- }), () => variant({
22600
- prop: 'size',
22601
- variants: {
22602
- l: {
22603
- 'px': 4,
22604
- 'py': 2,
22605
- 'fontSize': typography['s'].fontSize,
22606
- 'fontWeight': typography['s'].fontWeight,
22607
- 'lineHeight': typography['s'].lineHeight,
22608
- '& svg': {
22609
- width: 20,
22610
- height: 20
22611
- }
22612
- },
22613
- m: {
22614
- 'px': 4,
22615
- 'py': 2,
22616
- 'fontSize': typography['xs'].fontSize,
22617
- 'fontWeight': typography['xs'].fontWeight,
22618
- 'lineHeight': typography['xs'].lineHeight,
22619
- '& svg': {
22620
- width: 20,
22621
- height: 20
22622
- }
22623
- },
22624
- s: {
22625
- 'px': 3,
22626
- 'py': 2,
22627
- 'fontSize': typography['xxs'].fontSize,
22628
- 'fontWeight': typography['xxs'].fontWeight,
22629
- 'lineHeight': typography['xxs'].lineHeight,
22630
- '& svg': {
22631
- width: 16,
22632
- height: 16
22633
- }
22634
- }
22635
- }
22636
- }), ({
22637
- theme,
22638
- selected
22639
- }) => variant({
22640
- prop: 'variant',
22641
- variants: {
22642
- plain: {
22643
- borderRadius: theme.radii.full,
22644
- ...(selected ? {
22645
- 'color': theme.colors['text/neutral'],
22646
- 'backgroundColor': theme.colors['bg/selected/subtle'],
22647
- '& svg': {
22648
- color: theme.colors['icon/selected']
22649
- }
22650
- } : {
22651
- 'color': theme.colors['text/neutral/subtler'],
22652
- 'backgroundColor': theme.colors['bg/neutral/subtler'],
22653
- '& svg': {
22654
- color: theme.colors['icon/neutral']
22655
- },
22656
- '&:hover, &:active': {
22657
- 'color': theme.colors['text/neutral/subtle'],
22658
- '& svg': {
22659
- color: theme.colors['icon/neutral/bolder']
22660
- }
22661
- }
22662
- })
22663
- },
22664
- outlined: {
22665
- borderRadius: theme.radii.full,
22666
- ...(selected ? {
22667
- 'color': theme.colors['text/inverse'],
22668
- 'backgroundColor': theme.colors['bg/selected'],
22669
- '& svg': {
22670
- color: theme.colors['icon/inverse']
22671
- }
22672
- } : {
22673
- 'color': theme.colors['text/neutral/subtler'],
22674
- 'backgroundColor': theme.colors['bg/neutral/subtler'],
22675
- '& svg': {
22676
- color: theme.colors['icon/neutral']
22677
- },
22678
- '&:after': {
22679
- content: '""',
22680
- position: 'absolute',
22681
- top: 0,
22682
- right: 0,
22683
- bottom: 0,
22684
- left: 0,
22685
- borderWidth: 1,
22686
- borderStyle: 'solid',
22687
- borderColor: theme.colors['border/neutral/bolder'],
22688
- borderRadius: theme.radii.full,
22689
- boxSizing: 'border-box'
22690
- },
22691
- '&:hover': {
22692
- backgroundColor: theme.colors['bg/neutral/subtler/hovered']
22693
- },
22694
- '&:active': {
22695
- backgroundColor: theme.colors['bg/neutral/subtler/pressed']
22696
- }
22697
- })
22698
- },
22699
- underline: {
22700
- borderRadius: theme.radii.xxs,
22701
- ...(selected ? {
22702
- 'color': theme.colors['text/selected'],
22703
- 'backgroundColor': theme.colors['bg/neutral/subtler'],
22704
- '& svg': {
22705
- color: theme.colors['icon/selected']
22706
- },
22707
- ':after': {
22708
- content: '""',
22709
- position: 'absolute',
22710
- top: 0,
22711
- right: 0,
22712
- bottom: 0,
22713
- left: 0,
22714
- borderBottomWidth: 2,
22715
- borderBottomStyle: 'solid',
22716
- borderBottomColor: theme.colors['border/selected'],
22717
- borderRadius: theme.radii.none,
22718
- boxSizing: 'border-box'
22719
- }
22720
- } : {
22721
- 'color': theme.colors['text/neutral/subtler'],
22722
- 'backgroundColor': theme.colors['bg/neutral/subtler'],
22723
- '& svg': {
22724
- color: theme.colors['icon/neutral']
22725
- },
22726
- ':hover, :active': {
22727
- 'color': theme.colors['text/neutral/subtle'],
22728
- '& svg': {
22729
- color: theme.colors['icon/neutral/bolder']
22730
- }
22731
- }
22732
- })
23000
+ scrollContainerRef.scrollTo({
23001
+ behavior: options.behavior,
23002
+ [startSide]: scrollDistance
23003
+ });
22733
23004
  }
23005
+ } else {
23006
+ childrenRef.scrollIntoView({
23007
+ behavior: options.behavior
23008
+ });
22734
23009
  }
22735
- }));
23010
+ };
22736
23011
 
22737
- const TabContext = /*#__PURE__*/React.createContext({});
22738
- const Tab = ({
22739
- variant = 'plain',
22740
- size = 'm',
22741
- gap = 2,
22742
- children
23012
+ const TabItem = ({
23013
+ children,
23014
+ leadingIcon: LeadingIcon,
23015
+ selected = false,
23016
+ onClick,
23017
+ size: propSize,
23018
+ variant: propVariant
22743
23019
  }) => {
22744
- const rootRef = React.useRef(null);
22745
- const [isLeftButtonVisible, setIsLeftButtonVisible] = React.useState(rootRef.current ? rootRef.current.scrollLeft > 0 : false);
22746
- const [isRightButtonVisible, setIsRightButtonVisible] = React.useState(rootRef.current ? rootRef.current.clientWidth + rootRef.current.scrollLeft < rootRef.current.scrollWidth : false);
22747
- const handleScrollButtonVisibility = () => {
22748
- if (rootRef.current) {
22749
- setIsLeftButtonVisible(rootRef.current ? rootRef.current.scrollLeft > 0 : false);
22750
- setIsRightButtonVisible(rootRef.current ? rootRef.current.clientWidth + Math.ceil(rootRef.current.scrollLeft) < rootRef.current.scrollWidth : false);
22751
- }
22752
- };
22753
- const buttonWidth = 32;
22754
- const gradientWidth = 40;
22755
- const handleLeftButtonClick = () => {
22756
- if (rootRef.current) {
22757
- rootRef.current.scrollTo({
22758
- left: rootRef.current.scrollLeft - rootRef.current.clientWidth + buttonWidth + gradientWidth,
22759
- behavior: 'smooth'
22760
- });
22761
- }
22762
- };
22763
- const handleRightButtonClick = () => {
22764
- if (rootRef.current) {
22765
- rootRef.current.scrollTo({
22766
- left: rootRef.current.scrollLeft + rootRef.current.clientWidth - (buttonWidth + gradientWidth),
22767
- behavior: 'smooth'
23020
+ const ref = React.useRef(null);
23021
+ const {
23022
+ size: contextSize,
23023
+ variant: contextVariant,
23024
+ containerRef
23025
+ } = React.useContext(TabContext);
23026
+ const size = propSize ?? contextSize;
23027
+ const variant = propVariant ?? contextVariant;
23028
+ const handleClick = e => {
23029
+ if (containerRef && containerRef.current && ref.current) {
23030
+ scrollIntoView({
23031
+ scrollContainerRef: containerRef.current,
23032
+ childrenRef: ref.current,
23033
+ options: {
23034
+ behavior: 'smooth',
23035
+ offset: 72
23036
+ }
22768
23037
  });
22769
23038
  }
23039
+ onClick?.(e);
22770
23040
  };
22771
- React.useEffect(() => {
22772
- handleScrollButtonVisibility();
22773
- }, []);
22774
- useResize(handleScrollButtonVisibility);
22775
- return /*#__PURE__*/jsxRuntimeExports.jsx(TabContext.Provider, {
22776
- value: {
22777
- variant,
22778
- size,
22779
- containerRef: rootRef
22780
- },
23041
+ return /*#__PURE__*/jsxRuntimeExports.jsx(BaseTabItem, {
23042
+ role: 'tab',
23043
+ ref: ref,
23044
+ variant: variant,
23045
+ size: size,
23046
+ leadingIcon: LeadingIcon,
23047
+ selected: selected,
23048
+ onClick: handleClick,
22781
23049
  children: /*#__PURE__*/jsxRuntimeExports.jsxs(View, {
22782
- position: 'relative',
22783
- children: [/*#__PURE__*/jsxRuntimeExports.jsx(View, {
22784
- ref: rootRef,
22785
- role: 'tablist',
22786
- sx: {
22787
- 'width': 'auto',
22788
- 'display': 'flex',
22789
- 'flexDirection': 'row',
22790
- 'alignItems': 'center',
22791
- 'columnGap': gap,
22792
- 'overflowX': 'auto',
22793
- 'msOverflowStyle': 'none',
22794
- '::-webkit-scrollbar': {
22795
- display: 'none'
22796
- }
22797
- },
22798
- onScroll: throttle$1(handleScrollButtonVisibility, 150),
22799
- children: children
22800
- }), /*#__PURE__*/jsxRuntimeExports.jsxs(View, {
22801
- display: ['none', 'initial', 'initial'],
22802
- children: [isLeftButtonVisible ? /*#__PURE__*/jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
22803
- children: [/*#__PURE__*/jsxRuntimeExports.jsx(View, {
22804
- sx: {
22805
- position: 'absolute',
22806
- top: 0,
22807
- left: forcePixelValue(buttonWidth),
22808
- bottom: 0,
22809
- width: forcePixelValue(gradientWidth),
22810
- height: '100%',
22811
- background: `linear-gradient(${gradient['overlay/floating/toright']})`,
22812
- pointerEvents: 'none'
22813
- }
22814
- }), /*#__PURE__*/jsxRuntimeExports.jsx(View, {
22815
- sx: {
22816
- position: 'absolute',
22817
- display: 'flex',
22818
- alignItems: 'center',
22819
- top: 0,
22820
- left: 0,
22821
- bottom: 0,
22822
- backgroundColor: elevation.surface
22823
- },
22824
- children: /*#__PURE__*/jsxRuntimeExports.jsx(IconButton, {
22825
- size: 's',
22826
- variant: 'plain-bold',
22827
- icon: SvgChevronLeft,
22828
- onClick: handleLeftButtonClick
22829
- })
22830
- })]
22831
- }) : null, isRightButtonVisible ? /*#__PURE__*/jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
22832
- children: [/*#__PURE__*/jsxRuntimeExports.jsx(View, {
22833
- sx: {
22834
- position: 'absolute',
22835
- top: 0,
22836
- right: forcePixelValue(buttonWidth),
22837
- bottom: 0,
22838
- width: forcePixelValue(gradientWidth),
22839
- height: '100%',
22840
- background: `linear-gradient(${gradient['overlay/floating/toleft']})`,
22841
- pointerEvents: 'none'
22842
- }
22843
- }), /*#__PURE__*/jsxRuntimeExports.jsx(View, {
22844
- sx: {
22845
- position: 'absolute',
22846
- display: 'flex',
22847
- alignItems: 'center',
22848
- top: 0,
22849
- right: 0,
22850
- bottom: 0,
22851
- backgroundColor: elevation.surface
22852
- },
22853
- children: /*#__PURE__*/jsxRuntimeExports.jsx(IconButton, {
22854
- size: 's',
22855
- variant: 'plain-bold',
22856
- icon: SvgChevronRight,
22857
- onClick: handleRightButtonClick
22858
- })
22859
- })]
22860
- }) : null]
22861
- })]
22862
- })
22863
- });
22864
- };
22865
- var index$2 = Object.assign(Tab, {
22866
- Item: TabItem
22867
- });
22868
-
22869
- const Textarea = /*#__PURE__*/React.forwardRef(({
22870
- disabled,
22871
- ...props
22872
- }, ref) => {
22873
- const inputRef = useProvidedOrCreatedRef(ref);
22874
- const focusInput = () => {
22875
- inputRef.current?.focus();
22876
- };
22877
- return /*#__PURE__*/jsxRuntimeExports.jsx(TextareaWrapper, {
22878
- disabled: disabled,
22879
- onClick: focusInput,
22880
- children: /*#__PURE__*/jsxRuntimeExports.jsx(BaseTextarea, {
22881
- ref: e => {
22882
- isFunction(ref) ? ref(e) : null;
22883
- inputRef.current = e;
22884
- },
22885
- disabled: disabled,
22886
- ...props
22887
- })
22888
- });
22889
- });
22890
- const TextareaWrapper = styled__default.default.div`
22891
- position: relative;
22892
- width: ${forcePixelValue('100%')};
22893
- border-width: ${forcePixelValue(1)};
22894
- border-style: solid;
22895
- border-radius: ${({
22896
- theme
22897
- }) => forcePixelValue(theme.radii.xs)};
22898
- border-color: ${({
22899
- theme
22900
- }) => theme.colors['border/input']};
22901
- background-color: ${({
22902
- theme
22903
- }) => theme.colors['bg/input']};
22904
- cursor: text;
22905
- display: inline-flex;
22906
- align-items: center;
22907
-
22908
- padding-top: ${({
22909
- theme
22910
- }) => forcePixelValue(theme.space['4'])};
22911
- padding-right: ${({
22912
- theme
22913
- }) => forcePixelValue(theme.space['4'])};
22914
- padding-bottom: ${({
22915
- theme
22916
- }) => forcePixelValue(theme.space['4'])};
22917
- padding-left: ${({
22918
- theme
22919
- }) => forcePixelValue(theme.space['5'])};
22920
-
22921
- font-size: ${({
22922
- theme
22923
- }) => forcePixelValue(theme.fontSizes.xs)};
22924
- font-weight: ${({
22925
- theme
22926
- }) => theme.fontWeights.medium};
22927
- line-height: ${({
22928
- theme
22929
- }) => theme.lineHeights[2]};
22930
- color: ${({
22931
- theme
22932
- }) => theme.colors['text/neutral']};
22933
- input::placeholder {
22934
- color: ${({
22935
- theme
22936
- }) => theme.colors['text/neutral/subtlest']};
22937
- }
22938
-
22939
- height: 74px;
22940
-
22941
- &:after {
22942
- content: '';
22943
- position: absolute;
22944
- top: ${forcePixelValue(-1)};
22945
- right: ${forcePixelValue(-1)};
22946
- bottom: ${forcePixelValue(-1)};
22947
- left: ${forcePixelValue(-1)};
22948
-
22949
- border: ${forcePixelValue(2)} solid transparent;
22950
- border-radius: ${({
23050
+ sx: {
23051
+ display: 'flex',
23052
+ flexDirection: 'row',
23053
+ alignItems: 'center',
23054
+ justifyContent: 'center',
23055
+ columnGap: 1
23056
+ },
23057
+ children: [LeadingIcon ? /*#__PURE__*/jsxRuntimeExports.jsx(LeadingIcon, {}) : null, /*#__PURE__*/jsxRuntimeExports.jsx(View, {
23058
+ children: children
23059
+ })]
23060
+ })
23061
+ });
23062
+ };
23063
+ const BaseTabItem = styled__default.default(UnstyledButton)(({
22951
23064
  theme
22952
- }) => forcePixelValue(theme.radii.xs)};
22953
- pointer-events: none;
23065
+ }) => ({
23066
+ 'width': 'initial',
23067
+ 'position': 'relative',
23068
+ 'transition': 'background-color 100ms, color 100ms',
23069
+ 'whiteSpace': 'nowrap',
23070
+ '& svg': {
23071
+ transition: 'color 100ms'
23072
+ },
23073
+ '&:focus-visible': {
23074
+ outlineColor: theme.colors['border/focused'],
23075
+ outlineStyle: 'solid',
23076
+ outlineWidth: 2,
23077
+ outlineOffset: 2
22954
23078
  }
22955
-
22956
- ${props => props.validationStatus !== 'error' && !props.disabled && styled.css`
22957
- &:hover:not(:focus-within) {
22958
- &:after {
22959
- border-color: ${({
22960
- theme
22961
- }) => theme.colors['border/hovered']};
22962
- }
22963
- }
22964
- `}
22965
-
22966
- ${props => props.validationStatus === 'error' && styled.css`
22967
- &:after {
22968
- border-color: ${({
22969
- theme
22970
- }) => theme.colors['border/danger']};
22971
- }
22972
- `}
22973
-
22974
- ${props => props.validationStatus !== 'error' && styled.css`
22975
- &:focus-within {
22976
- &:after {
22977
- border-color: ${({
22978
- theme
22979
- }) => theme.colors['border/focused']};
22980
- }
23079
+ }), () => variant({
23080
+ prop: 'size',
23081
+ variants: {
23082
+ l: {
23083
+ 'px': 4,
23084
+ 'py': 2,
23085
+ 'fontSize': typography['s'].fontSize,
23086
+ 'fontWeight': typography['s'].fontWeight,
23087
+ 'lineHeight': typography['s'].lineHeight,
23088
+ '& svg': {
23089
+ width: 20,
23090
+ height: 20
22981
23091
  }
22982
- `}
22983
-
22984
- ${props => props.disabled && styled.css`
22985
- border-color: ${props.theme.colors['border/input']};
22986
- background-color: ${props.theme.colors['bg/disabled']};
22987
- color: ${props.theme.colors['text/disabled']};
22988
-
22989
- textarea::placeholder {
22990
- color: ${props.theme.colors['text/disabled']};
23092
+ },
23093
+ m: {
23094
+ 'px': 4,
23095
+ 'py': 2,
23096
+ 'fontSize': typography['xs'].fontSize,
23097
+ 'fontWeight': typography['xs'].fontWeight,
23098
+ 'lineHeight': typography['xs'].lineHeight,
23099
+ '& svg': {
23100
+ width: 20,
23101
+ height: 20
22991
23102
  }
22992
-
22993
- &,
22994
- textarea {
22995
- cursor: not-allowed;
23103
+ },
23104
+ s: {
23105
+ 'px': 3,
23106
+ 'py': 2,
23107
+ 'fontSize': typography['xxs'].fontSize,
23108
+ 'fontWeight': typography['xxs'].fontWeight,
23109
+ 'lineHeight': typography['xxs'].lineHeight,
23110
+ '& svg': {
23111
+ width: 16,
23112
+ height: 16
22996
23113
  }
22997
- `};
22998
- `;
22999
- const UnstyledTextarea = styled__default.default.textarea`
23000
- font-size: inherit;
23001
- font-weight: inherit;
23002
- line-height: inherit;
23003
- font-family: inherit;
23004
- border-radius: inherit;
23005
- color: inherit;
23006
- transition: inherit;
23007
-
23008
- border: 0;
23009
- background-color: transparent;
23010
- width: 100%;
23011
- &:focus {
23012
- outline: 0;
23013
- }
23014
- `;
23015
- const BaseTextarea = styled__default.default(UnstyledTextarea)`
23016
- resize: none;
23017
- `;
23018
-
23019
- const TextInputTrailingAction = ({
23020
- icon: Icon,
23021
- disabled,
23022
- ...props
23023
- }, ref) => /*#__PURE__*/jsxRuntimeExports.jsx(BaseTextInputTrailingAction, {
23024
- ref: ref,
23025
- ...props,
23026
- disabled: disabled,
23027
- "aria-disabled": disabled,
23028
- children: /*#__PURE__*/jsxRuntimeExports.jsx(Icon, {})
23029
- });
23030
- const BaseTextInputTrailingAction = styled__default.default(UnstyledButton)`
23031
- display: inline-flex;
23032
- padding: ${({
23033
- theme
23034
- }) => forcePixelValue(theme.space[2])};
23035
- background-color: ${({
23036
- theme
23037
- }) => theme.colors['bg/neutral/subtler']};
23038
- border-radius: ${({
23039
- theme
23040
- }) => forcePixelValue(theme.radii.full)};
23041
-
23042
- & svg {
23043
- width: ${forcePixelValue(16)};
23044
- height: ${forcePixelValue(16)};
23045
- color: ${({
23046
- theme
23047
- }) => theme.colors['icon/neutral/bolder']};
23048
- }
23049
-
23050
- &:hover {
23051
- background-color: ${({
23052
- theme
23053
- }) => theme.colors['bg/neutral/subtler/hovered']};
23114
+ }
23054
23115
  }
23055
-
23056
- &[aria-disabled='true'] {
23057
- cursor: not-allowed;
23058
- & svg {
23059
- color: ${({
23060
- theme
23061
- }) => theme.colors['icon/disabled']};
23116
+ }), ({
23117
+ theme,
23118
+ selected
23119
+ }) => variant({
23120
+ prop: 'variant',
23121
+ variants: {
23122
+ plain: {
23123
+ borderRadius: theme.radii.full,
23124
+ ...(selected ? {
23125
+ 'color': theme.colors['text/neutral'],
23126
+ 'backgroundColor': theme.colors['bg/selected/subtle'],
23127
+ '& svg': {
23128
+ color: theme.colors['icon/selected']
23129
+ }
23130
+ } : {
23131
+ 'color': theme.colors['text/neutral/subtler'],
23132
+ 'backgroundColor': theme.colors['bg/neutral/subtler'],
23133
+ '& svg': {
23134
+ color: theme.colors['icon/neutral']
23135
+ },
23136
+ '&:hover, &:active': {
23137
+ 'color': theme.colors['text/neutral/subtle'],
23138
+ '& svg': {
23139
+ color: theme.colors['icon/neutral/bolder']
23140
+ }
23141
+ }
23142
+ })
23143
+ },
23144
+ outlined: {
23145
+ borderRadius: theme.radii.full,
23146
+ ...(selected ? {
23147
+ 'color': theme.colors['text/inverse'],
23148
+ 'backgroundColor': theme.colors['bg/selected'],
23149
+ '& svg': {
23150
+ color: theme.colors['icon/inverse']
23151
+ }
23152
+ } : {
23153
+ 'color': theme.colors['text/neutral/subtler'],
23154
+ 'backgroundColor': theme.colors['bg/neutral/subtler'],
23155
+ '& svg': {
23156
+ color: theme.colors['icon/neutral']
23157
+ },
23158
+ '&:after': {
23159
+ content: '""',
23160
+ position: 'absolute',
23161
+ top: 0,
23162
+ right: 0,
23163
+ bottom: 0,
23164
+ left: 0,
23165
+ borderWidth: 1,
23166
+ borderStyle: 'solid',
23167
+ borderColor: theme.colors['border/neutral/bolder'],
23168
+ borderRadius: theme.radii.full,
23169
+ boxSizing: 'border-box'
23170
+ },
23171
+ '&:hover': {
23172
+ backgroundColor: theme.colors['bg/neutral/subtler/hovered']
23173
+ },
23174
+ '&:active': {
23175
+ backgroundColor: theme.colors['bg/neutral/subtler/pressed']
23176
+ }
23177
+ })
23178
+ },
23179
+ underline: {
23180
+ borderRadius: theme.radii.xxs,
23181
+ ...(selected ? {
23182
+ 'color': theme.colors['text/selected'],
23183
+ 'backgroundColor': theme.colors['bg/neutral/subtler'],
23184
+ '& svg': {
23185
+ color: theme.colors['icon/selected']
23186
+ },
23187
+ ':after': {
23188
+ content: '""',
23189
+ position: 'absolute',
23190
+ top: 0,
23191
+ right: 0,
23192
+ bottom: 0,
23193
+ left: 0,
23194
+ borderBottomWidth: 2,
23195
+ borderBottomStyle: 'solid',
23196
+ borderBottomColor: theme.colors['border/selected'],
23197
+ borderRadius: theme.radii.none,
23198
+ boxSizing: 'border-box'
23199
+ }
23200
+ } : {
23201
+ 'color': theme.colors['text/neutral/subtler'],
23202
+ 'backgroundColor': theme.colors['bg/neutral/subtler'],
23203
+ '& svg': {
23204
+ color: theme.colors['icon/neutral']
23205
+ },
23206
+ ':hover, :active': {
23207
+ 'color': theme.colors['text/neutral/subtle'],
23208
+ '& svg': {
23209
+ color: theme.colors['icon/neutral/bolder']
23210
+ }
23211
+ }
23212
+ })
23062
23213
  }
23063
23214
  }
23215
+ }));
23064
23216
 
23065
- ${sx}
23066
- `;
23067
- var TextInputTrailingAction$1 = /*#__PURE__*/React.forwardRef(TextInputTrailingAction);
23217
+ const TabContext = /*#__PURE__*/React.createContext({});
23218
+ const Tab = ({
23219
+ variant = 'plain',
23220
+ size = 'm',
23221
+ gap = 2,
23222
+ children
23223
+ }) => {
23224
+ const rootRef = React.useRef(null);
23225
+ const [isLeftButtonVisible, setIsLeftButtonVisible] = React.useState(rootRef.current ? rootRef.current.scrollLeft > 0 : false);
23226
+ const [isRightButtonVisible, setIsRightButtonVisible] = React.useState(rootRef.current ? rootRef.current.clientWidth + rootRef.current.scrollLeft < rootRef.current.scrollWidth : false);
23227
+ const handleScrollButtonVisibility = () => {
23228
+ if (rootRef.current) {
23229
+ setIsLeftButtonVisible(rootRef.current ? rootRef.current.scrollLeft > 0 : false);
23230
+ setIsRightButtonVisible(rootRef.current ? rootRef.current.clientWidth + Math.ceil(rootRef.current.scrollLeft) < rootRef.current.scrollWidth : false);
23231
+ }
23232
+ };
23233
+ const buttonWidth = 32;
23234
+ const gradientWidth = 40;
23235
+ const handleLeftButtonClick = () => {
23236
+ if (rootRef.current) {
23237
+ rootRef.current.scrollTo({
23238
+ left: rootRef.current.scrollLeft - rootRef.current.clientWidth + buttonWidth + gradientWidth,
23239
+ behavior: 'smooth'
23240
+ });
23241
+ }
23242
+ };
23243
+ const handleRightButtonClick = () => {
23244
+ if (rootRef.current) {
23245
+ rootRef.current.scrollTo({
23246
+ left: rootRef.current.scrollLeft + rootRef.current.clientWidth - (buttonWidth + gradientWidth),
23247
+ behavior: 'smooth'
23248
+ });
23249
+ }
23250
+ };
23251
+ React.useEffect(() => {
23252
+ handleScrollButtonVisibility();
23253
+ }, []);
23254
+ useResize(handleScrollButtonVisibility);
23255
+ return /*#__PURE__*/jsxRuntimeExports.jsx(TabContext.Provider, {
23256
+ value: {
23257
+ variant,
23258
+ size,
23259
+ containerRef: rootRef
23260
+ },
23261
+ children: /*#__PURE__*/jsxRuntimeExports.jsxs(View, {
23262
+ position: 'relative',
23263
+ children: [/*#__PURE__*/jsxRuntimeExports.jsx(View, {
23264
+ ref: rootRef,
23265
+ role: 'tablist',
23266
+ sx: {
23267
+ 'width': 'auto',
23268
+ 'display': 'flex',
23269
+ 'flexDirection': 'row',
23270
+ 'alignItems': 'center',
23271
+ 'columnGap': gap,
23272
+ 'overflowX': 'auto',
23273
+ 'msOverflowStyle': 'none',
23274
+ '::-webkit-scrollbar': {
23275
+ display: 'none'
23276
+ }
23277
+ },
23278
+ onScroll: throttle$1(handleScrollButtonVisibility, 150),
23279
+ children: children
23280
+ }), /*#__PURE__*/jsxRuntimeExports.jsxs(View, {
23281
+ display: ['none', 'initial', 'initial'],
23282
+ children: [isLeftButtonVisible ? /*#__PURE__*/jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
23283
+ children: [/*#__PURE__*/jsxRuntimeExports.jsx(View, {
23284
+ sx: {
23285
+ position: 'absolute',
23286
+ top: 0,
23287
+ left: forcePixelValue(buttonWidth),
23288
+ bottom: 0,
23289
+ width: forcePixelValue(gradientWidth),
23290
+ height: '100%',
23291
+ background: `linear-gradient(${gradient['overlay/floating/toright']})`,
23292
+ pointerEvents: 'none'
23293
+ }
23294
+ }), /*#__PURE__*/jsxRuntimeExports.jsx(View, {
23295
+ sx: {
23296
+ position: 'absolute',
23297
+ display: 'flex',
23298
+ alignItems: 'center',
23299
+ top: 0,
23300
+ left: 0,
23301
+ bottom: 0,
23302
+ backgroundColor: elevation.surface
23303
+ },
23304
+ children: /*#__PURE__*/jsxRuntimeExports.jsx(IconButton, {
23305
+ size: 's',
23306
+ variant: 'plain-bold',
23307
+ icon: SvgChevronLeft,
23308
+ onClick: handleLeftButtonClick
23309
+ })
23310
+ })]
23311
+ }) : null, isRightButtonVisible ? /*#__PURE__*/jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
23312
+ children: [/*#__PURE__*/jsxRuntimeExports.jsx(View, {
23313
+ sx: {
23314
+ position: 'absolute',
23315
+ top: 0,
23316
+ right: forcePixelValue(buttonWidth),
23317
+ bottom: 0,
23318
+ width: forcePixelValue(gradientWidth),
23319
+ height: '100%',
23320
+ background: `linear-gradient(${gradient['overlay/floating/toleft']})`,
23321
+ pointerEvents: 'none'
23322
+ }
23323
+ }), /*#__PURE__*/jsxRuntimeExports.jsx(View, {
23324
+ sx: {
23325
+ position: 'absolute',
23326
+ display: 'flex',
23327
+ alignItems: 'center',
23328
+ top: 0,
23329
+ right: 0,
23330
+ bottom: 0,
23331
+ backgroundColor: elevation.surface
23332
+ },
23333
+ children: /*#__PURE__*/jsxRuntimeExports.jsx(IconButton, {
23334
+ size: 's',
23335
+ variant: 'plain-bold',
23336
+ icon: SvgChevronRight,
23337
+ onClick: handleRightButtonClick
23338
+ })
23339
+ })]
23340
+ }) : null]
23341
+ })]
23342
+ })
23343
+ });
23344
+ };
23345
+ var index$1 = Object.assign(Tab, {
23346
+ Item: TabItem
23347
+ });
23068
23348
 
23069
- const TextInput = ({
23070
- type = 'text',
23349
+ const Textarea = /*#__PURE__*/React.forwardRef(({
23071
23350
  disabled,
23072
- validationStatus,
23073
- leadingVisual: LeadingVisual,
23074
- trailingVisual: TrailingVisual,
23075
- trailingAction,
23076
23351
  ...props
23077
23352
  }, ref) => {
23078
23353
  const inputRef = useProvidedOrCreatedRef(ref);
23079
23354
  const focusInput = () => {
23080
23355
  inputRef.current?.focus();
23081
23356
  };
23082
- return /*#__PURE__*/jsxRuntimeExports.jsxs(TextInputWrapper, {
23357
+ return /*#__PURE__*/jsxRuntimeExports.jsx(TextareaWrapper, {
23083
23358
  disabled: disabled,
23084
23359
  onClick: focusInput,
23085
- hasLeadingVisual: !isNullable(LeadingVisual),
23086
- hasTrailingVisual: !isNullable(TrailingVisual),
23087
- hasTrailingAction: !isNullable(trailingAction),
23088
- validationStatus: validationStatus,
23089
- children: [/*#__PURE__*/jsxRuntimeExports.jsx(View, {
23090
- sx: {
23091
- 'flexShrink': 0,
23092
- 'fontSize': 'xxs',
23093
- 'fontWeight': 'medium',
23094
- 'color': color$1['text/neutral'],
23095
- '& > svg': {
23096
- display: 'block',
23097
- width: 16,
23098
- height: 16,
23099
- color: color$1['icon/neutral/bold']
23100
- }
23101
- },
23102
- children: typeof LeadingVisual !== 'string' && reactIsExports.isValidElementType(LeadingVisual) ? /*#__PURE__*/jsxRuntimeExports.jsx(LeadingVisual, {}) : LeadingVisual
23103
- }), /*#__PURE__*/jsxRuntimeExports.jsx(BaseInput, {
23360
+ children: /*#__PURE__*/jsxRuntimeExports.jsx(BaseTextarea, {
23104
23361
  ref: e => {
23105
23362
  isFunction(ref) ? ref(e) : null;
23106
23363
  inputRef.current = e;
23107
23364
  },
23108
- type: type,
23109
23365
  disabled: disabled,
23110
23366
  ...props
23111
- }), /*#__PURE__*/jsxRuntimeExports.jsxs(View, {
23112
- sx: {
23113
- 'display': 'flex',
23114
- 'alignItems': 'center',
23115
- 'columnGap': 2,
23116
- 'flexShrink': 0,
23117
- 'fontSize': 'xxs',
23118
- 'fontWeight': 'medium',
23119
- 'color': color$1['text/neutral'],
23120
- '& > svg': {
23121
- display: 'block',
23122
- width: 16,
23123
- height: 16,
23124
- color: color$1['icon/neutral/bold']
23125
- }
23126
- },
23127
- children: [typeof TrailingVisual !== 'string' && reactIsExports.isValidElementType(TrailingVisual) ? /*#__PURE__*/jsxRuntimeExports.jsx(TrailingVisual, {}) : TrailingVisual, trailingAction ? /*#__PURE__*/React.cloneElement(trailingAction, {
23128
- disabled: disabled
23129
- }) : null]
23130
- })]
23367
+ })
23131
23368
  });
23132
- };
23133
- const TextInputWrapper = styled__default.default.div`
23369
+ });
23370
+ const TextareaWrapper = styled__default.default.div`
23134
23371
  position: relative;
23135
23372
  width: ${forcePixelValue('100%')};
23136
23373
  border-width: ${forcePixelValue(1)};
@@ -23148,6 +23385,19 @@ const TextInputWrapper = styled__default.default.div`
23148
23385
  display: inline-flex;
23149
23386
  align-items: center;
23150
23387
 
23388
+ padding-top: ${({
23389
+ theme
23390
+ }) => forcePixelValue(theme.space['4'])};
23391
+ padding-right: ${({
23392
+ theme
23393
+ }) => forcePixelValue(theme.space['4'])};
23394
+ padding-bottom: ${({
23395
+ theme
23396
+ }) => forcePixelValue(theme.space['4'])};
23397
+ padding-left: ${({
23398
+ theme
23399
+ }) => forcePixelValue(theme.space['5'])};
23400
+
23151
23401
  font-size: ${({
23152
23402
  theme
23153
23403
  }) => forcePixelValue(theme.fontSizes.xs)};
@@ -23166,6 +23416,8 @@ const TextInputWrapper = styled__default.default.div`
23166
23416
  }) => theme.colors['text/neutral/subtlest']};
23167
23417
  }
23168
23418
 
23419
+ height: 74px;
23420
+
23169
23421
  &:after {
23170
23422
  content: '';
23171
23423
  position: absolute;
@@ -23214,43 +23466,17 @@ const TextInputWrapper = styled__default.default.div`
23214
23466
  background-color: ${props.theme.colors['bg/disabled']};
23215
23467
  color: ${props.theme.colors['text/disabled']};
23216
23468
 
23217
- input::placeholder {
23469
+ textarea::placeholder {
23218
23470
  color: ${props.theme.colors['text/disabled']};
23219
23471
  }
23220
23472
 
23221
- input {
23473
+ &,
23474
+ textarea {
23222
23475
  cursor: not-allowed;
23223
23476
  }
23224
23477
  `};
23225
-
23226
- ${props => props.hasLeadingVisual && styled.css`
23227
- padding-left: ${forcePixelValue(props.theme.space[5])};
23228
- input {
23229
- padding-left: ${forcePixelValue(props.theme.space[2])};
23230
- }
23231
- `}
23232
-
23233
- ${props => props.hasTrailingVisual && styled.css`
23234
- padding-right: ${forcePixelValue(props.theme.space[5])};
23235
- `}
23236
-
23237
- ${props => props.hasTrailingAction && styled.css`
23238
- padding-right: ${forcePixelValue(props.theme.space[3])};
23239
- `}
23240
-
23241
- ${props => (props.hasTrailingVisual || props.hasTrailingAction) && styled.css`
23242
- input {
23243
- padding-right: ${forcePixelValue(props.theme.space[2])};
23244
- }
23245
- `}
23246
-
23247
-
23248
- transition: color 100ms, background-color 100ms;
23249
- &:after {
23250
- transition: border-color 100ms;
23251
- }
23252
23478
  `;
23253
- const UnstyledInput = styled__default.default.input`
23479
+ const UnstyledTextarea = styled__default.default.textarea`
23254
23480
  font-size: inherit;
23255
23481
  font-weight: inherit;
23256
23482
  line-height: inherit;
@@ -23266,23 +23492,9 @@ const UnstyledInput = styled__default.default.input`
23266
23492
  outline: 0;
23267
23493
  }
23268
23494
  `;
23269
- const BaseInput = styled__default.default(UnstyledInput)`
23270
- padding-top: ${({
23271
- theme
23272
- }) => forcePixelValue(theme.space['4'])};
23273
- padding-right: ${({
23274
- theme
23275
- }) => forcePixelValue(theme.space['5'])};
23276
- padding-bottom: ${({
23277
- theme
23278
- }) => forcePixelValue(theme.space['4'])};
23279
- padding-left: ${({
23280
- theme
23281
- }) => forcePixelValue(theme.space['5'])};
23495
+ const BaseTextarea = styled__default.default(UnstyledTextarea)`
23496
+ resize: none;
23282
23497
  `;
23283
- var index$1 = Object.assign( /*#__PURE__*/React.forwardRef(TextInput), {
23284
- TrailingAction: TextInputTrailingAction$1
23285
- });
23286
23498
 
23287
23499
  const theme = {
23288
23500
  breakpoints,
@@ -23713,19 +23925,20 @@ const useOutsideClick = ({
23713
23925
  });
23714
23926
  };
23715
23927
 
23716
- exports.ActionList = index$d;
23928
+ exports.ActionList = index$a;
23717
23929
  exports.AnimatePresence = AnimatePresence;
23718
- exports.Avatar = index$c;
23719
- exports.Breadcrumbs = index$b;
23930
+ exports.Avatar = index$9;
23931
+ exports.Breadcrumbs = index$8;
23720
23932
  exports.Button = Button;
23721
- exports.Checkbox = index$a;
23933
+ exports.Checkbox = Checkbox$1;
23722
23934
  exports.Chip = Chip;
23723
- exports.Datagrid = index$9;
23935
+ exports.Datagrid = index$7;
23724
23936
  exports.DescriptionList = DescriptionList;
23725
- exports.Dialog = index$8;
23937
+ exports.Dialog = index$6;
23726
23938
  exports.DialogHandler = DialogHandler;
23727
23939
  exports.EmptyState = EmptyState;
23728
23940
  exports.EnigmaUI = index;
23941
+ exports.FormControl = index$4;
23729
23942
  exports.GradientText = GradientText;
23730
23943
  exports.Grid = Grid$1;
23731
23944
  exports.HorizontalDivider = HorizontalDivider;
@@ -23736,17 +23949,17 @@ exports.ItemList = ItemList;
23736
23949
  exports.MotionView = MotionView;
23737
23950
  exports.Overlay = Overlay$1;
23738
23951
  exports.OverlayPopper = OverlayPopper;
23739
- exports.OverlaySelectInput = index$6;
23740
- exports.Pagination = index$5;
23741
- exports.Pill = index$4;
23742
- exports.Select = index$3;
23952
+ exports.OverlaySelectInput = OverlaySelectInput$1;
23953
+ exports.Pagination = index$3;
23954
+ exports.Pill = index$2;
23955
+ exports.Select = Select$1;
23743
23956
  exports.Space = Space;
23744
23957
  exports.Spinner = Spinner;
23745
23958
  exports.Stack = Stack$1;
23746
23959
  exports.StyledIcon = StyledIcon;
23747
- exports.Tab = index$2;
23960
+ exports.Tab = index$1;
23748
23961
  exports.Text = Text;
23749
- exports.TextInput = index$1;
23962
+ exports.TextInput = TextInput$1;
23750
23963
  exports.Textarea = Textarea;
23751
23964
  exports.ThemeProvider = ThemeProvider;
23752
23965
  exports.Toast = Toast;