@redsift/design-system 9.0.0-alpha.7 → 9.0.0-alpha.8
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/index.d.ts +2 -0
- package/index.js +42 -24
- package/index.js.map +1 -1
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -2689,6 +2689,8 @@ interface TextFieldProps extends Omit<ComponentProps<'div'>, 'onChange'>, Stylin
|
|
|
2689
2689
|
onClear?(): void;
|
|
2690
2690
|
/** Placeholder. */
|
|
2691
2691
|
placeholder?: string;
|
|
2692
|
+
/** Input type. */
|
|
2693
|
+
type?: HTMLInputElement['type'];
|
|
2692
2694
|
/**
|
|
2693
2695
|
* Input value.
|
|
2694
2696
|
* Used for controlled version.
|
package/index.js
CHANGED
|
@@ -2214,7 +2214,7 @@ const StyledAppSidePanel = styled.div`
|
|
|
2214
2214
|
align-items: center;
|
|
2215
2215
|
background-color: var(--redsift-side-navigation-color-background);
|
|
2216
2216
|
border-right: 4px solid #e1e1e1;
|
|
2217
|
-
box-sizing:
|
|
2217
|
+
box-sizing: border-box;
|
|
2218
2218
|
flex-direction: column;
|
|
2219
2219
|
height: 100%;
|
|
2220
2220
|
left: 0px;
|
|
@@ -2226,7 +2226,7 @@ const StyledAppSidePanel = styled.div`
|
|
|
2226
2226
|
let {
|
|
2227
2227
|
$variant
|
|
2228
2228
|
} = _ref;
|
|
2229
|
-
return $variant === AppSidePanelVariant.shrinked ? '
|
|
2229
|
+
return $variant === AppSidePanelVariant.shrinked ? '68px' : '254px';
|
|
2230
2230
|
}};
|
|
2231
2231
|
z-index: var(--redsift-layout-z-index-side-panel);
|
|
2232
2232
|
|
|
@@ -3924,6 +3924,7 @@ const DEFAULT_PROPS$x = {};
|
|
|
3924
3924
|
* The AppBar component.
|
|
3925
3925
|
*/
|
|
3926
3926
|
const AppBar = /*#__PURE__*/forwardRef((props, ref) => {
|
|
3927
|
+
var _breadcrumbs$;
|
|
3927
3928
|
const {
|
|
3928
3929
|
breadcrumbs,
|
|
3929
3930
|
children,
|
|
@@ -3965,12 +3966,13 @@ const AppBar = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
3965
3966
|
}, propsTitle) : breadcrumbs ? /*#__PURE__*/React__default.createElement(Breadcrumbs, {
|
|
3966
3967
|
"aria-label": "Breadcrumb"
|
|
3967
3968
|
}, appContainerState && appContainerState.sidePanelVariant === AppSidePanelVariant.shrinked ? /*#__PURE__*/React__default.createElement(Breadcrumbs.Item, {
|
|
3968
|
-
href: "/"
|
|
3969
|
+
href: "/",
|
|
3970
|
+
as: ((_breadcrumbs$ = breadcrumbs[0]) === null || _breadcrumbs$ === void 0 ? void 0 : _breadcrumbs$.as) || 'a'
|
|
3969
3971
|
}, ProductName[appContainerState.product]) : null, breadcrumbs.map((breadcrumbItem, index) => /*#__PURE__*/React__default.createElement(Breadcrumbs.Item, _extends$1({
|
|
3970
3972
|
key: index
|
|
3971
3973
|
}, breadcrumbItem, {
|
|
3972
|
-
isDisabled: breadcrumbItem.href === undefined,
|
|
3973
|
-
as: index === breadcrumbs.length - 1 ? 'h1' : breadcrumbItem.href === undefined ? 'span' : 'a'
|
|
3974
|
+
isDisabled: breadcrumbItem.isDisabled || breadcrumbItem.href === undefined,
|
|
3975
|
+
as: index === breadcrumbs.length - 1 ? 'h1' : breadcrumbItem.href === undefined ? 'span' : breadcrumbItem.as || 'a'
|
|
3974
3976
|
})))) : fallbackTitle ? /*#__PURE__*/React__default.createElement(Heading, {
|
|
3975
3977
|
as: "h1"
|
|
3976
3978
|
}, fallbackTitle) : null), /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -3985,11 +3987,11 @@ AppBar.displayName = COMPONENT_NAME$x;
|
|
|
3985
3987
|
* Component style.
|
|
3986
3988
|
*/
|
|
3987
3989
|
const StyledAppContent = styled.main`
|
|
3990
|
+
padding: 16px 64px;
|
|
3988
3991
|
${baseContainer}
|
|
3989
3992
|
|
|
3990
3993
|
box-sizing: border-box;
|
|
3991
3994
|
min-height: calc(100vh - 92px);
|
|
3992
|
-
padding: 16px 64px;
|
|
3993
3995
|
|
|
3994
3996
|
@media screen and (max-width: 768px) {
|
|
3995
3997
|
padding: 0px;
|
|
@@ -4000,11 +4002,11 @@ const StyledAppContent = styled.main`
|
|
|
4000
4002
|
$isSidePanelCollapsed
|
|
4001
4003
|
} = _ref;
|
|
4002
4004
|
return !$isSidePanelCollapsed ? css`
|
|
4003
|
-
transform: translate(
|
|
4004
|
-
width: calc(100% -
|
|
4005
|
+
transform: translate(254px);
|
|
4006
|
+
width: calc(100% - 254px);
|
|
4005
4007
|
` : css`
|
|
4006
|
-
transform: translate(
|
|
4007
|
-
width: calc(100% -
|
|
4008
|
+
transform: translate(68px);
|
|
4009
|
+
width: calc(100% - 68px);
|
|
4008
4010
|
`;
|
|
4009
4011
|
}}
|
|
4010
4012
|
|
|
@@ -4132,7 +4134,6 @@ const StyledCard = styled.div`
|
|
|
4132
4134
|
|
|
4133
4135
|
display: flex;
|
|
4134
4136
|
flex-direction: column;
|
|
4135
|
-
padding: 16px;
|
|
4136
4137
|
|
|
4137
4138
|
.redsift-card__header {
|
|
4138
4139
|
align-items: flex-start;
|
|
@@ -5555,11 +5556,16 @@ const StyledPill = styled.div`
|
|
|
5555
5556
|
|
|
5556
5557
|
padding: 2px 8px;
|
|
5557
5558
|
text-align: center;
|
|
5558
|
-
|
|
5559
|
+
|
|
5560
|
+
${_ref => {
|
|
5559
5561
|
let {
|
|
5560
5562
|
$autoBreak
|
|
5561
5563
|
} = _ref;
|
|
5562
|
-
return
|
|
5564
|
+
return !$autoBreak ? css`
|
|
5565
|
+
text-wrap: nowrap;
|
|
5566
|
+
` : css`
|
|
5567
|
+
word-break: break-word;
|
|
5568
|
+
`;
|
|
5563
5569
|
}};
|
|
5564
5570
|
|
|
5565
5571
|
${_ref2 => {
|
|
@@ -10301,6 +10307,7 @@ const StyledGrid = styled.div`
|
|
|
10301
10307
|
return inline ? 'inline-grid' : 'grid';
|
|
10302
10308
|
}};
|
|
10303
10309
|
flex: 1;
|
|
10310
|
+
max-width: fit-content;
|
|
10304
10311
|
|
|
10305
10312
|
${baseStyling}
|
|
10306
10313
|
${baseInternalSpacing}
|
|
@@ -10313,17 +10320,26 @@ const StyledGrid = styled.div`
|
|
|
10313
10320
|
return $divider ? css`
|
|
10314
10321
|
overflow: hidden;
|
|
10315
10322
|
.redsift-grid-item {
|
|
10316
|
-
|
|
10317
|
-
|
|
10318
|
-
|
|
10323
|
+
position: relative;
|
|
10324
|
+
|
|
10325
|
+
::before {
|
|
10326
|
+
content: '';
|
|
10327
|
+
position: absolute;
|
|
10328
|
+
background-color: var(--redsift-color-neutral-lightgrey);
|
|
10329
|
+
inline-size: 1px;
|
|
10330
|
+
block-size: 100%;
|
|
10331
|
+
inset-inline-start: calc(${$divider.colGap / 2}px * -1);
|
|
10332
|
+
}
|
|
10319
10333
|
|
|
10320
10334
|
::after {
|
|
10321
10335
|
content: '';
|
|
10336
|
+
position: absolute;
|
|
10322
10337
|
background-color: var(--redsift-color-neutral-lightgrey);
|
|
10323
|
-
|
|
10324
|
-
|
|
10325
|
-
|
|
10326
|
-
|
|
10338
|
+
inline-size: 100vw;
|
|
10339
|
+
block-size: 1px;
|
|
10340
|
+
inset-inline-start: 0;
|
|
10341
|
+
inset-block-start: calc(${$divider.rowGap / 2}px * -1);
|
|
10342
|
+
z-index: 0;
|
|
10327
10343
|
}
|
|
10328
10344
|
}
|
|
10329
10345
|
` : '';
|
|
@@ -10380,7 +10396,7 @@ const BaseGrid = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
10380
10396
|
} = props,
|
|
10381
10397
|
forwardedProps = _objectWithoutProperties(props, _excluded$c);
|
|
10382
10398
|
return /*#__PURE__*/React__default.createElement(StyledGrid, _extends$1({}, forwardedProps, {
|
|
10383
|
-
gap: divider ?
|
|
10399
|
+
gap: divider ? `${divider.rowGap}px ${divider.colGap}px` : gap,
|
|
10384
10400
|
className: classNames(BaseGrid.className, className),
|
|
10385
10401
|
ref: ref,
|
|
10386
10402
|
$divider: divider
|
|
@@ -12199,7 +12215,7 @@ const StyledTextField = styled.div`
|
|
|
12199
12215
|
}}
|
|
12200
12216
|
`;
|
|
12201
12217
|
|
|
12202
|
-
const _excluded = ["aria-label", "aria-labelledby", "autoFocus", "className", "defaultValue", "hasClearButton", "after", "internal", "inputProps", "inputRef", "isColored", "isDisabled", "isInvalid", "isReadOnly", "isRequired", "label", "leftIcon", "name", "onBlur", "onChange", "onClear", "onFocus", "placeholder", "value", "variant"];
|
|
12218
|
+
const _excluded = ["aria-label", "aria-labelledby", "autoFocus", "className", "defaultValue", "hasClearButton", "after", "internal", "inputProps", "inputRef", "isColored", "isDisabled", "isInvalid", "isReadOnly", "isRequired", "label", "leftIcon", "name", "onBlur", "onChange", "onClear", "onFocus", "placeholder", "type", "value", "variant"];
|
|
12203
12219
|
const COMPONENT_NAME = 'TextField';
|
|
12204
12220
|
const CLASSNAME = 'redsift-text-field';
|
|
12205
12221
|
const DEFAULT_PROPS = {
|
|
@@ -12237,6 +12253,7 @@ const TextField = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12237
12253
|
onClear,
|
|
12238
12254
|
onFocus: onFocusProps,
|
|
12239
12255
|
placeholder,
|
|
12256
|
+
type,
|
|
12240
12257
|
value: propsValue,
|
|
12241
12258
|
variant
|
|
12242
12259
|
} = props,
|
|
@@ -12268,8 +12285,9 @@ const TextField = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12268
12285
|
}
|
|
12269
12286
|
if (onChange) {
|
|
12270
12287
|
onChange(event.target.value, name, event);
|
|
12288
|
+
} else {
|
|
12289
|
+
setValue(event.target.value);
|
|
12271
12290
|
}
|
|
12272
|
-
setValue(event.target.value);
|
|
12273
12291
|
}, [onChange]);
|
|
12274
12292
|
const handleClear = useCallback(() => {
|
|
12275
12293
|
if (isDisabled || isReadOnly) {
|
|
@@ -12327,7 +12345,7 @@ const TextField = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
12327
12345
|
onChange: handleChange,
|
|
12328
12346
|
placeholder: placeholder,
|
|
12329
12347
|
ref: inputRef,
|
|
12330
|
-
type:
|
|
12348
|
+
type: type,
|
|
12331
12349
|
value: value
|
|
12332
12350
|
})), hasClearButton || internal || after ? /*#__PURE__*/React__default.createElement(Flexbox, {
|
|
12333
12351
|
className: `${TextField.className}-input-wrapper__toolbar`,
|