@superdispatch/ui-lab 0.36.1 → 0.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ButtonBase } from '@material-ui/core';
|
|
1
|
+
import { alpha, ButtonBase } from '@material-ui/core';
|
|
2
2
|
import { OpenInNew } from '@material-ui/icons';
|
|
3
|
-
import { ColorDynamic, Column, Columns, Inline, mergeRefs } from '@superdispatch/ui';
|
|
3
|
+
import { Color, ColorDynamic, Column, Columns, Inline, mergeRefs } from '@superdispatch/ui';
|
|
4
4
|
import { forwardRef, useLayoutEffect, useRef, useState } from 'react';
|
|
5
5
|
import styled, { css } from 'styled-components';
|
|
6
6
|
import { TextBox } from "../text-box/TextBox.js";
|
|
@@ -12,10 +12,13 @@ var SidebarMenuItemRoot = /*#__PURE__*/styled.div.withConfig({
|
|
|
12
12
|
componentId: "SD__sc-1sb5zqa-0"
|
|
13
13
|
})(_ref => {
|
|
14
14
|
var {
|
|
15
|
-
hasAvatar
|
|
15
|
+
hasAvatar,
|
|
16
|
+
theme
|
|
16
17
|
} = _ref;
|
|
17
18
|
var height = hasAvatar ? 48 : 40;
|
|
18
|
-
|
|
19
|
+
var mode = theme.palette.type;
|
|
20
|
+
var color = mode === 'dark' ? alpha(Color.White, 0.08) : ColorDynamic.Silver200;
|
|
21
|
+
return css(["position:relative;& > .MuiButtonBase-root{width:100%;display:flex;justify-content:flex-start;padding-left:24px;padding-right:24px;height:", "px;max-height:", "px;&[aria-current='true']{background-color:", ";box-shadow:inset 4px 0 0 ", ";}&:hover{background-color:", ";}}"], height, height, color, ColorDynamic.Blue300, color);
|
|
19
22
|
});
|
|
20
23
|
var SidebarMenuItemBadge = /*#__PURE__*/styled.div.withConfig({
|
|
21
24
|
displayName: "SidebarMenuItem__SidebarMenuItemBadge",
|
|
@@ -12,6 +12,8 @@ var normalizeTextColor = /*#__PURE__*/createRuleNormalizer({
|
|
|
12
12
|
primary: ColorDynamic.Dark500,
|
|
13
13
|
secondary: ColorDynamic.Dark300,
|
|
14
14
|
'light-gray': ColorDynamic.Dark100,
|
|
15
|
+
//*deprecated use disabled instead
|
|
16
|
+
disabled: ColorDynamic.Dark100,
|
|
15
17
|
white: ColorDynamic.White,
|
|
16
18
|
blue: ColorDynamic.Blue500,
|
|
17
19
|
green: ColorDynamic.Green500,
|
package/dist-types/index.d.ts
CHANGED
|
@@ -382,7 +382,7 @@ interface SidebarSubheaderProps {
|
|
|
382
382
|
declare const SidebarSubheader: ForwardRefExoticComponent<SidebarSubheaderProps & RefAttributes<HTMLDivElement>>;
|
|
383
383
|
|
|
384
384
|
declare type TextAlignProp = 'left' | 'right' | 'center';
|
|
385
|
-
declare type TextColorProp = 'inherit' | 'primary' | 'secondary' | 'light-gray' | 'white' | 'blue' | 'green' | 'purple' | 'red' | 'teal' | 'yellow';
|
|
385
|
+
declare type TextColorProp = 'inherit' | 'primary' | 'secondary' | 'light-gray' | 'disabled' | 'white' | 'blue' | 'green' | 'purple' | 'red' | 'teal' | 'yellow';
|
|
386
386
|
declare type TextDisplayProp = 'none' | 'block' | 'inline' | 'initial' | 'inherit';
|
|
387
387
|
declare type TextVariantProp = 'heading-1' | 'heading-2' | 'heading-3' | 'heading-4' | 'heading-5' | 'heading-6' | 'body' | 'body-block' | 'body-semibold' | 'caption' | 'hint';
|
|
388
388
|
interface TextBoxProps {
|
package/dist-web/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
|
7
7
|
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
8
8
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
9
9
|
import { CSSTransition } from 'react-transition-group';
|
|
10
|
-
import { ButtonBase, Typography, CircularProgress, SvgIcon, Link, Tooltip, IconButton, BottomNavigation, BottomNavigationAction, Accordion, AccordionSummary, useTheme, useMediaQuery, Drawer, Avatar, MenuItem, Menu as Menu$1, Toolbar, AppBar, Divider as Divider$1, Checkbox } from '@material-ui/core';
|
|
10
|
+
import { ButtonBase, Typography, CircularProgress, SvgIcon, Link, Tooltip, IconButton, BottomNavigation, BottomNavigationAction, Accordion, AccordionSummary, useTheme, useMediaQuery, Drawer, Avatar, MenuItem, Menu as Menu$1, Toolbar, AppBar, Divider as Divider$1, alpha, Checkbox } from '@material-ui/core';
|
|
11
11
|
import { formatDate } from '@superdispatch/dates';
|
|
12
12
|
import { Box as Box$1 } from '@superdispatch/ui-lab';
|
|
13
13
|
import { mdiUpload, mdiFilePdfBox, mdiTextBox } from '@mdi/js';
|
|
@@ -661,6 +661,8 @@ var normalizeTextColor = /*#__PURE__*/createRuleNormalizer({
|
|
|
661
661
|
primary: ColorDynamic.Dark500,
|
|
662
662
|
secondary: ColorDynamic.Dark300,
|
|
663
663
|
'light-gray': ColorDynamic.Dark100,
|
|
664
|
+
//*deprecated use disabled instead
|
|
665
|
+
disabled: ColorDynamic.Dark100,
|
|
664
666
|
white: ColorDynamic.White,
|
|
665
667
|
blue: ColorDynamic.Blue500,
|
|
666
668
|
green: ColorDynamic.Green500,
|
|
@@ -1931,10 +1933,13 @@ var SidebarMenuItemRoot = /*#__PURE__*/styled.div.withConfig({
|
|
|
1931
1933
|
componentId: "SD__sc-1sb5zqa-0"
|
|
1932
1934
|
})(_ref => {
|
|
1933
1935
|
var {
|
|
1934
|
-
hasAvatar
|
|
1936
|
+
hasAvatar,
|
|
1937
|
+
theme
|
|
1935
1938
|
} = _ref;
|
|
1936
1939
|
var height = hasAvatar ? 48 : 40;
|
|
1937
|
-
|
|
1940
|
+
var mode = theme.palette.type;
|
|
1941
|
+
var color = mode === 'dark' ? alpha(Color.White, 0.08) : ColorDynamic.Silver200;
|
|
1942
|
+
return css(["position:relative;& > .MuiButtonBase-root{width:100%;display:flex;justify-content:flex-start;padding-left:24px;padding-right:24px;height:", "px;max-height:", "px;&[aria-current='true']{background-color:", ";box-shadow:inset 4px 0 0 ", ";}&:hover{background-color:", ";}}"], height, height, color, ColorDynamic.Blue300, color);
|
|
1938
1943
|
});
|
|
1939
1944
|
var SidebarMenuItemBadge = /*#__PURE__*/styled.div.withConfig({
|
|
1940
1945
|
displayName: "SidebarMenuItem__SidebarMenuItemBadge",
|