@toptal/picasso-page 6.0.3 → 6.0.4-alpha-pf-fix-alpha-release-ea13b5aca.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 +1 @@
1
- {"version":3,"file":"Page.d.ts","sourceRoot":"","sources":["../../../src/Page/Page.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AACtD,OAAO,KAAqB,MAAM,OAAO,CAAA;AAIzC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAGvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAGlE,MAAM,WAAW,KAAM,SAAQ,SAAS,EAAE,cAAc,CAAC,cAAc,CAAC;IACtE,wFAAwF;IACxF,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,6CAA6C;IAC7C,KAAK,CAAC,EAAE,iBAAiB,CAAA;IACzB,uCAAuC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,yEAAyE;IACzE,QAAQ,EAAE,SAAS,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,eAAO,MAAM,WAAW,iCAA4C,CAAA;AAOpE,eAAO,MAAM,IAAI,8EAkCf,CAAA;AAIF,eAAe,IAAI,CAAA"}
1
+ {"version":3,"file":"Page.d.ts","sourceRoot":"","sources":["../../../src/Page/Page.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AACtD,OAAO,KAAqB,MAAM,OAAO,CAAA;AACzC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAKvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAMlE,MAAM,WAAW,KAAM,SAAQ,SAAS,EAAE,cAAc,CAAC,cAAc,CAAC;IACtE,wFAAwF;IACxF,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,6CAA6C;IAC7C,KAAK,CAAC,EAAE,iBAAiB,CAAA;IACzB,uCAAuC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,yEAAyE;IACzE,QAAQ,EAAE,SAAS,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,eAAO,MAAM,WAAW,iCAA4C,CAAA;AAEpE,eAAO,MAAM,IAAI,8EAwCf,CAAA;AAIF,eAAe,IAAI,CAAA"}
@@ -10,19 +10,22 @@ var __rest = (this && this.__rest) || function (s, e) {
10
10
  return t;
11
11
  };
12
12
  import React, { forwardRef } from 'react';
13
- import { makeStyles } from '@material-ui/core/styles';
14
- import cx from 'classnames';
13
+ import { PicassoProvider } from '@toptal/picasso-provider';
14
+ import { twMerge } from '@toptal/picasso-tailwind-merge';
15
15
  import { PageHamburgerContextProvider } from '../PageHamburger';
16
- import styles from './styles';
16
+ import { createRootClassNames, createRootVariableClassNames, } from './styles';
17
17
  export const PageContext = React.createContext({});
18
- const useStyles = makeStyles(styles, {
19
- name: 'Page',
20
- });
21
- // eslint-disable-next-line react/display-name
22
18
  export const Page = forwardRef(function Page(props, ref) {
23
- const { children, className, hamburgerId = 'hamburger', style, width, fullWidth } = props, rest = __rest(props, ["children", "className", "hamburgerId", "style", "width", "fullWidth"]);
24
- const classes = useStyles();
25
- return (React.createElement("div", Object.assign({}, rest, { ref: ref, className: cx(classes.root, className, '[--content-padding-horizontal:1em] md:[--content-padding-horizontal:2em]', '[--header-height:3.5rem] [--content-width-wide:90em] [--content-width:75em]'), style: Object.assign({}, style) }),
19
+ const { children, className, hamburgerId = 'hamburger', style, width, fullWidth } = props, rest = __rest(props
20
+ // Set only at runtime via PicassoProvider.disableResponsiveStyle()
21
+ // (<Picasso responsive={false} />) or extendTheme — not expressible as a
22
+ // static Tailwind class
23
+ , ["children", "className", "hamburgerId", "style", "width", "fullWidth"]);
24
+ // Set only at runtime via PicassoProvider.disableResponsiveStyle()
25
+ // (<Picasso responsive={false} />) or extendTheme — not expressible as a
26
+ // static Tailwind class
27
+ const { contentMinWidth } = PicassoProvider.theme.layout;
28
+ return (React.createElement("div", Object.assign({}, rest, { ref: ref, className: twMerge(...createRootClassNames(), className, ...createRootVariableClassNames()), style: Object.assign(Object.assign({}, (contentMinWidth && { minWidth: contentMinWidth })), style) }),
26
29
  React.createElement(PageContext.Provider, { value: { width, fullWidth } },
27
30
  React.createElement(PageHamburgerContextProvider, { hamburgerId: hamburgerId }, children))));
28
31
  });
@@ -1 +1 @@
1
- {"version":3,"file":"Page.js","sourceRoot":"","sources":["../../../src/Page/Page.tsx"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AACrD,OAAO,EAAE,MAAM,YAAY,CAAA;AAG3B,OAAO,EAAE,4BAA4B,EAAE,MAAM,kBAAkB,CAAA;AAE/D,OAAO,MAAM,MAAM,UAAU,CAAA;AAc7B,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,CAAC,aAAa,CAAmB,EAAE,CAAC,CAAA;AAEpE,MAAM,SAAS,GAAG,UAAU,CAAQ,MAAM,EAAE;IAC1C,IAAI,EAAE,MAAM;CACb,CAAC,CAAA;AAEF,8CAA8C;AAC9C,MAAM,CAAC,MAAM,IAAI,GAAG,UAAU,CAAwB,SAAS,IAAI,CACjE,KAAK,EACL,GAAG;IAEH,MAAM,EACJ,QAAQ,EACR,SAAS,EACT,WAAW,GAAG,WAAW,EACzB,KAAK,EACL,KAAK,EACL,SAAS,KAEP,KAAK,EADJ,IAAI,UACL,KAAK,EARH,uEAQL,CAAQ,CAAA;IACT,MAAM,OAAO,GAAG,SAAS,EAAE,CAAA;IAE3B,OAAO,CACL,6CACM,IAAI,IACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,OAAO,CAAC,IAAI,EACZ,SAAS,EACT,0EAA0E,EAC1E,6EAA6E,CAC9E,EACD,KAAK,EAAE,kBAAK,KAAK,CAAyB;QAE1C,oBAAC,WAAW,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE;YAC/C,oBAAC,4BAA4B,IAAC,WAAW,EAAE,WAAW,IACnD,QAAQ,CACoB,CACV,CACnB,CACP,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,WAAW,GAAG,MAAM,CAAA;AAEzB,eAAe,IAAI,CAAA"}
1
+ {"version":3,"file":"Page.js","sourceRoot":"","sources":["../../../src/Page/Page.tsx"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAA;AAExD,OAAO,EAAE,4BAA4B,EAAE,MAAM,kBAAkB,CAAA;AAE/D,OAAO,EACL,oBAAoB,EACpB,4BAA4B,GAC7B,MAAM,UAAU,CAAA;AAcjB,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,CAAC,aAAa,CAAmB,EAAE,CAAC,CAAA;AAEpE,MAAM,CAAC,MAAM,IAAI,GAAG,UAAU,CAAwB,SAAS,IAAI,CACjE,KAAK,EACL,GAAG;IAEH,MAAM,EACJ,QAAQ,EACR,SAAS,EACT,WAAW,GAAG,WAAW,EACzB,KAAK,EACL,KAAK,EACL,SAAS,KAEP,KAAK,EADJ,IAAI,UACL,KAAK;IAET,mEAAmE;IACnE,yEAAyE;IACzE,wBAAwB;MAZlB,uEAQL,CAAQ,CAAA;IAET,mEAAmE;IACnE,yEAAyE;IACzE,wBAAwB;IACxB,MAAM,EAAE,eAAe,EAAE,GAAG,eAAe,CAAC,KAAK,CAAC,MAAM,CAAA;IAExD,OAAO,CACL,6CACM,IAAI,IACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,OAAO,CAChB,GAAG,oBAAoB,EAAE,EACzB,SAAS,EACT,GAAG,4BAA4B,EAAE,CAClC,EACD,KAAK,kCACA,CAAC,eAAe,IAAI,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC,GAClD,KAAK;QAGV,oBAAC,WAAW,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE;YAC/C,oBAAC,4BAA4B,IAAC,WAAW,EAAE,WAAW,IACnD,QAAQ,CACoB,CACV,CACnB,CACP,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,WAAW,GAAG,MAAM,CAAA;AAEzB,eAAe,IAAI,CAAA"}
@@ -1,4 +1,3 @@
1
- import type { Theme } from '@material-ui/core/styles';
2
- declare const _default: ({ layout, palette }: Theme) => import("@material-ui/styles").StyleRules<{}, "root">;
3
- export default _default;
1
+ export declare const createRootClassNames: () => string[];
2
+ export declare const createRootVariableClassNames: () => string[];
4
3
  //# sourceMappingURL=styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/Page/styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;8CAGhB,KAAK;AAA1C,wBAgBI"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/Page/styles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,QAAO,MAAM,EAI7C,CAAA;AAED,eAAO,MAAM,4BAA4B,QAAO,MAAM,EAGrD,CAAA"}
@@ -1,9 +1,10 @@
1
- import { createStyles } from '@material-ui/core/styles';
2
- export default ({ layout, palette }) => createStyles({
3
- root: Object.assign(Object.assign({ display: 'flex', flexDirection: 'column', height: '100%', background: palette.grey.lightest }, (layout.contentMinWidth && { minWidth: layout.contentMinWidth })), { '& > footer, & > header': {
4
- flex: 0,
5
- }, '& > header + *': {
6
- marginTop: 'var(--header-height)',
7
- } }),
8
- });
1
+ export const createRootClassNames = () => [
2
+ 'flex flex-col h-full bg-gray-50',
3
+ '[&>footer]:flex-[0] [&>header]:flex-[0]',
4
+ '[&>header+*]:mt-[var(--header-height)]',
5
+ ];
6
+ export const createRootVariableClassNames = () => [
7
+ '[--content-padding-horizontal:1em] md:[--content-padding-horizontal:2em]',
8
+ '[--header-height:3.5rem] [--content-width-wide:90em] [--content-width:75em]',
9
+ ];
9
10
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/Page/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAEvD,eAAe,CAAC,EAAE,MAAM,EAAE,OAAO,EAAS,EAAE,EAAE,CAC5C,YAAY,CAAC;IACX,IAAI,gCACF,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,QAAQ,EACvB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,OAAO,CAAC,IAAI,CAAC,QAAQ,IAC9B,CAAC,MAAM,CAAC,eAAe,IAAI,EAAE,QAAQ,EAAE,MAAM,CAAC,eAAe,EAAE,CAAC,KAEnE,wBAAwB,EAAE;YACxB,IAAI,EAAE,CAAC;SACR,EACD,gBAAgB,EAAE;YAChB,SAAS,EAAE,sBAAsB;SAClC,GACF;CACF,CAAC,CAAA"}
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/Page/styles.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAa,EAAE,CAAC;IAClD,iCAAiC;IACjC,yCAAyC;IACzC,wCAAwC;CACzC,CAAA;AAED,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAa,EAAE,CAAC;IAC1D,0EAA0E;IAC1E,6EAA6E;CAC9E,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"SidebarItemAccordion.d.ts","sourceRoot":"","sources":["../../../src/SidebarItem/SidebarItemAccordion.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkC,MAAM,OAAO,CAAA;AAMtD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAIpC,eAAO,MAAM,oBAAoB,2EAoDhC,CAAA"}
1
+ {"version":3,"file":"SidebarItemAccordion.d.ts","sourceRoot":"","sources":["../../../src/SidebarItem/SidebarItemAccordion.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkC,MAAM,OAAO,CAAA;AAOtD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAIpC,eAAO,MAAM,oBAAoB,2EAsDhC,CAAA"}
@@ -1,4 +1,5 @@
1
1
  import React, { forwardRef, useCallback } from 'react';
2
+ import { twMerge } from '@toptal/picasso-tailwind-merge';
2
3
  import { Accordion } from '@toptal/picasso-accordion';
3
4
  import { ArrowDownMinor16 } from '@toptal/picasso-icons';
4
5
  import { SubMenuContextProvider } from './SubMenuContextProvider';
@@ -13,10 +14,7 @@ export const SidebarItemAccordion = forwardRef(function SidebarItemAccordion(pro
13
14
  }, [index, expand]);
14
15
  const content = (React.createElement(SubMenuContextProvider, { parentMenu: { icon, compact }, parentSidebarItemIndex: index }, menu));
15
16
  return (React.createElement(ParentItemContextProvider, { isOpened: isExpanded || false },
16
- React.createElement(Accordion, { onChange: handleAccordionChange, classes: {
17
- summary: 'p-0 pl-4 mx-4',
18
- content: 'max-w-full',
19
- }, content: content, borders: 'none', disabled: disabled, expanded: isExpanded, expandIcon: React.createElement(ArrowDownMinor16, { className: styles.icon(variant, disabled) }) },
17
+ React.createElement(Accordion, { onChange: handleAccordionChange, className: twMerge('[&_[data-component-type="accordion-summary"]]:p-0', '[&_[data-component-type="accordion-summary"]]:pl-4', '[&_[data-component-type="accordion-summary"]]:mx-4', '[&_[data-component-type="accordion-summary-content"]]:max-w-full'), content: content, borders: 'none', disabled: disabled, expanded: isExpanded, expandIcon: React.createElement(ArrowDownMinor16, { className: styles.icon(variant, disabled) }) },
20
18
  React.createElement(SidebarItemHeader, Object.assign({}, props, { ref: ref })))));
21
19
  });
22
20
  //# sourceMappingURL=SidebarItemAccordion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SidebarItemAccordion.js","sourceRoot":"","sources":["../../../src/SidebarItem/SidebarItemAccordion.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAExD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAEvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjC,MAAM,CAAC,MAAM,oBAAoB,GAAG,UAAU,CAC5C,SAAS,oBAAoB,CAAC,KAAY,EAAE,GAAG;IAC7C,MAAM,EACJ,MAAM,EACN,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,UAAU,EACV,IAAI,EACJ,OAAO,GACR,GAAG,KAAK,CAAA;IAET,MAAM,qBAAqB,GAAG,WAAW,CACvC,CAAC,KAAsB,EAAE,mBAA4B,EAAE,EAAE;QACvD,KAAK,CAAC,eAAe,EAAE,CAAA;QAEvB,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAG,CAAC,mBAAmB,IAAI,KAAK,CAAC,IAAI,IAAI,CAAC,CAAA;IAClD,CAAC,EACD,CAAC,KAAK,EAAE,MAAM,CAAC,CAChB,CAAA;IAED,MAAM,OAAO,GAAG,CACd,oBAAC,sBAAsB,IACrB,UAAU,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAC7B,sBAAsB,EAAE,KAAK,IAE5B,IAAI,CACkB,CAC1B,CAAA;IAED,OAAO,CACL,oBAAC,yBAAyB,IAAC,QAAQ,EAAE,UAAU,IAAI,KAAK;QACtD,oBAAC,SAAS,IACR,QAAQ,EAAE,qBAAqB,EAC/B,OAAO,EAAE;gBACP,OAAO,EAAE,eAAe;gBACxB,OAAO,EAAE,YAAY;aACtB,EACD,OAAO,EAAE,OAAO,EAChB,OAAO,EAAC,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,UAAU,EACpB,UAAU,EACR,oBAAC,gBAAgB,IAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,GAAI;YAGjE,oBAAC,iBAAiB,oBAAK,KAAK,IAAE,GAAG,EAAE,GAAG,IAAI,CAChC,CACc,CAC7B,CAAA;AACH,CAAC,CACF,CAAA"}
1
+ {"version":3,"file":"SidebarItemAccordion.js","sourceRoot":"","sources":["../../../src/SidebarItem/SidebarItemAccordion.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAA;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAExD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAEvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjC,MAAM,CAAC,MAAM,oBAAoB,GAAG,UAAU,CAC5C,SAAS,oBAAoB,CAAC,KAAY,EAAE,GAAG;IAC7C,MAAM,EACJ,MAAM,EACN,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,UAAU,EACV,IAAI,EACJ,OAAO,GACR,GAAG,KAAK,CAAA;IAET,MAAM,qBAAqB,GAAG,WAAW,CACvC,CAAC,KAAsB,EAAE,mBAA4B,EAAE,EAAE;QACvD,KAAK,CAAC,eAAe,EAAE,CAAA;QAEvB,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAG,CAAC,mBAAmB,IAAI,KAAK,CAAC,IAAI,IAAI,CAAC,CAAA;IAClD,CAAC,EACD,CAAC,KAAK,EAAE,MAAM,CAAC,CAChB,CAAA;IAED,MAAM,OAAO,GAAG,CACd,oBAAC,sBAAsB,IACrB,UAAU,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAC7B,sBAAsB,EAAE,KAAK,IAE5B,IAAI,CACkB,CAC1B,CAAA;IAED,OAAO,CACL,oBAAC,yBAAyB,IAAC,QAAQ,EAAE,UAAU,IAAI,KAAK;QACtD,oBAAC,SAAS,IACR,QAAQ,EAAE,qBAAqB,EAC/B,SAAS,EAAE,OAAO,CAChB,mDAAmD,EACnD,oDAAoD,EACpD,oDAAoD,EACpD,kEAAkE,CACnE,EACD,OAAO,EAAE,OAAO,EAChB,OAAO,EAAC,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,UAAU,EACpB,UAAU,EACR,oBAAC,gBAAgB,IAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,GAAI;YAGjE,oBAAC,iBAAiB,oBAAK,KAAK,IAAE,GAAG,EAAE,GAAG,IAAI,CAChC,CACc,CAC7B,CAAA;AACH,CAAC,CACF,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toptal/picasso-page",
3
- "version": "6.0.3",
3
+ "version": "6.0.4-alpha-pf-fix-alpha-release-ea13b5aca.0",
4
4
  "description": "Toptal UI components library - Page",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -18,44 +18,42 @@
18
18
  },
19
19
  "homepage": "https://github.com/toptal/picasso/tree/master/packages/picasso#readme",
20
20
  "dependencies": {
21
- "classnames": "^2.5.1",
22
- "@toptal/picasso-accordion": "4.0.2",
23
- "@toptal/picasso-autocomplete": "6.0.3",
24
- "@toptal/picasso-avatar": "7.0.2",
25
- "@toptal/picasso-badge": "4.0.1",
26
- "@toptal/picasso-button": "5.0.2",
27
- "@toptal/picasso-container": "3.1.5",
28
- "@toptal/picasso-dropdown": "5.0.1",
29
- "@toptal/picasso-icons": "1.15.3",
30
- "@toptal/picasso-logo": "2.0.19",
31
- "@toptal/picasso-menu": "4.0.2",
32
- "@toptal/picasso-notification": "5.0.2",
33
- "@toptal/picasso-shared": "16.0.0",
34
- "@toptal/picasso-tag": "5.0.2",
35
- "@toptal/picasso-tooltip": "2.0.7",
36
- "@toptal/picasso-typography": "5.1.0",
37
- "@toptal/picasso-user-badge": "5.1.24",
38
- "@toptal/picasso-utils": "4.0.1"
21
+ "@toptal/picasso-accordion": "4.0.3-alpha-pf-fix-alpha-release-ea13b5aca.0",
22
+ "@toptal/picasso-autocomplete": "6.0.4-alpha-pf-fix-alpha-release-ea13b5aca.0",
23
+ "@toptal/picasso-avatar": "7.0.3-alpha-pf-fix-alpha-release-ea13b5aca.0",
24
+ "@toptal/picasso-badge": "4.0.2-alpha-pf-fix-alpha-release-ea13b5aca.0",
25
+ "@toptal/picasso-button": "5.0.3-alpha-pf-fix-alpha-release-ea13b5aca.0",
26
+ "@toptal/picasso-dropdown": "5.0.2-alpha-pf-fix-alpha-release-ea13b5aca.0",
27
+ "@toptal/picasso-container": "3.1.6-alpha-pf-fix-alpha-release-ea13b5aca.0",
28
+ "@toptal/picasso-logo": "2.0.20-alpha-pf-fix-alpha-release-ea13b5aca.0",
29
+ "@toptal/picasso-notification": "5.0.3-alpha-pf-fix-alpha-release-ea13b5aca.0",
30
+ "@toptal/picasso-shared": "16.0.1-alpha-pf-fix-alpha-release-ea13b5aca.0",
31
+ "@toptal/picasso-tag": "5.0.3-alpha-pf-fix-alpha-release-ea13b5aca.0",
32
+ "@toptal/picasso-tooltip": "2.0.8-alpha-pf-fix-alpha-release-ea13b5aca.0",
33
+ "@toptal/picasso-menu": "4.0.3-alpha-pf-fix-alpha-release-ea13b5aca.0",
34
+ "@toptal/picasso-icons": "1.15.4-alpha-pf-fix-alpha-release-ea13b5aca.0",
35
+ "@toptal/picasso-user-badge": "5.1.25-alpha-pf-fix-alpha-release-ea13b5aca.0",
36
+ "@toptal/picasso-utils": "4.0.2-alpha-pf-fix-alpha-release-ea13b5aca.0",
37
+ "@toptal/picasso-typography": "5.1.1-alpha-pf-fix-alpha-release-ea13b5aca.0"
39
38
  },
40
39
  "sideEffects": [
41
40
  "**/styles.ts",
42
41
  "**/styles.js"
43
42
  ],
44
43
  "peerDependencies": {
45
- "@toptal/picasso-tailwind-merge": "^2.0.0",
46
- "@material-ui/core": "4.12.4",
47
- "@toptal/picasso-provider": "*",
44
+ "@toptal/picasso-tailwind-merge": "2.0.6-alpha-pf-fix-alpha-release-ea13b5aca.0",
45
+ "@toptal/picasso-provider": "6.0.1-alpha-pf-fix-alpha-release-ea13b5aca.0",
48
46
  "react-dom": "^18.2.0",
49
- "@toptal/picasso-tailwind": ">=2.7",
50
- "@toptal/picasso-skeleton-loader": "^1.0.37",
51
- "react": ">=16.12.0 < 19.0.0"
47
+ "@toptal/picasso-tailwind": "4.0.1-alpha-pf-fix-alpha-release-ea13b5aca.0",
48
+ "@toptal/picasso-skeleton-loader": "^1.0.72-alpha-pf-fix-alpha-release-ea13b5aca.0",
49
+ "react": ">=16.12.0"
52
50
  },
53
51
  "devDependencies": {
54
52
  "react-dom": "^18.2.0",
55
53
  "styled-components": "^6.1.1",
56
- "@toptal/picasso-tailwind-merge": "2.0.5",
57
- "@toptal/picasso-provider": "6.0.0",
58
- "@toptal/picasso-test-utils": "2.0.1"
54
+ "@toptal/picasso-tailwind-merge": "2.0.6-alpha-pf-fix-alpha-release-ea13b5aca.0",
55
+ "@toptal/picasso-provider": "6.0.1-alpha-pf-fix-alpha-release-ea13b5aca.0",
56
+ "@toptal/picasso-test-utils": "2.0.2-alpha-pf-fix-alpha-release-ea13b5aca.0"
59
57
  },
60
58
  "exports": {
61
59
  ".": "./dist-package/src/index.js"
package/src/Page/Page.tsx CHANGED
@@ -1,13 +1,15 @@
1
1
  import type { ReactNode, HTMLAttributes } from 'react'
2
2
  import React, { forwardRef } from 'react'
3
- import type { Theme } from '@material-ui/core/styles'
4
- import { makeStyles } from '@material-ui/core/styles'
5
- import cx from 'classnames'
6
3
  import type { BaseProps } from '@toptal/picasso-shared'
4
+ import { PicassoProvider } from '@toptal/picasso-provider'
5
+ import { twMerge } from '@toptal/picasso-tailwind-merge'
7
6
 
8
7
  import { PageHamburgerContextProvider } from '../PageHamburger'
9
8
  import type { PageContextProps, ViewportWidthType } from './types'
10
- import styles from './styles'
9
+ import {
10
+ createRootClassNames,
11
+ createRootVariableClassNames,
12
+ } from './styles'
11
13
 
12
14
  export interface Props extends BaseProps, HTMLAttributes<HTMLDivElement> {
13
15
  /** DEPRECATED! Component becomes responsive with width 100% and overrides width prop */
@@ -23,11 +25,6 @@ export interface Props extends BaseProps, HTMLAttributes<HTMLDivElement> {
23
25
 
24
26
  export const PageContext = React.createContext<PageContextProps>({})
25
27
 
26
- const useStyles = makeStyles<Theme>(styles, {
27
- name: 'Page',
28
- })
29
-
30
- // eslint-disable-next-line react/display-name
31
28
  export const Page = forwardRef<HTMLDivElement, Props>(function Page(
32
29
  props,
33
30
  ref
@@ -41,19 +38,25 @@ export const Page = forwardRef<HTMLDivElement, Props>(function Page(
41
38
  fullWidth,
42
39
  ...rest
43
40
  } = props
44
- const classes = useStyles()
41
+
42
+ // Set only at runtime via PicassoProvider.disableResponsiveStyle()
43
+ // (<Picasso responsive={false} />) or extendTheme — not expressible as a
44
+ // static Tailwind class
45
+ const { contentMinWidth } = PicassoProvider.theme.layout
45
46
 
46
47
  return (
47
48
  <div
48
49
  {...rest}
49
50
  ref={ref}
50
- className={cx(
51
- classes.root,
51
+ className={twMerge(
52
+ ...createRootClassNames(),
52
53
  className,
53
- '[--content-padding-horizontal:1em] md:[--content-padding-horizontal:2em]',
54
- '[--header-height:3.5rem] [--content-width-wide:90em] [--content-width:75em]'
54
+ ...createRootVariableClassNames()
55
55
  )}
56
- style={{ ...style } as React.CSSProperties}
56
+ style={{
57
+ ...(contentMinWidth && { minWidth: contentMinWidth }),
58
+ ...style,
59
+ }}
57
60
  >
58
61
  <PageContext.Provider value={{ width, fullWidth }}>
59
62
  <PageHamburgerContextProvider hamburgerId={hamburgerId}>
@@ -6,7 +6,7 @@ exports[`Page renders 1`] = `
6
6
  class="Picasso-root"
7
7
  >
8
8
  <div
9
- class="Page-root [--content-padding md:[--content-padding [--header [--content-width [--content"
9
+ class="flex flex-col h-full bg-gray [&>footer]:flex-[0] [&>header]:flex-[0] [&>header+*]:mt-[var(--header [--content-padding md:[--content-padding [--header [--content-width [--content"
10
10
  >
11
11
  <div>
12
12
  Test
@@ -1,20 +1,10 @@
1
- import type { Theme } from '@material-ui/core/styles'
2
- import { createStyles } from '@material-ui/core/styles'
1
+ export const createRootClassNames = (): string[] => [
2
+ 'flex flex-col h-full bg-gray-50',
3
+ '[&>footer]:flex-[0] [&>header]:flex-[0]',
4
+ '[&>header+*]:mt-[var(--header-height)]',
5
+ ]
3
6
 
4
- export default ({ layout, palette }: Theme) =>
5
- createStyles({
6
- root: {
7
- display: 'flex',
8
- flexDirection: 'column',
9
- height: '100%',
10
- background: palette.grey.lightest,
11
- ...(layout.contentMinWidth && { minWidth: layout.contentMinWidth }),
12
-
13
- '& > footer, & > header': {
14
- flex: 0,
15
- },
16
- '& > header + *': {
17
- marginTop: 'var(--header-height)',
18
- },
19
- },
20
- })
7
+ export const createRootVariableClassNames = (): string[] => [
8
+ '[--content-padding-horizontal:1em] md:[--content-padding-horizontal:2em]',
9
+ '[--header-height:3.5rem] [--content-width-wide:90em] [--content-width:75em]',
10
+ ]
@@ -15,13 +15,13 @@ exports[`PageAutocomplete renders 1`] = `
15
15
  class="flex"
16
16
  >
17
17
  <div
18
- class="base-Input base-Input base-Input relative inline-flex gap-y gap-x items-center rounded-sm [font-size:_unset] group text-nowrap p-2 h-8 w-[18.75rem] bg-[#081237] after:content-[""] after:inline-block after:absolute after:top-0 after:bottom-0 after:right-0 after:left-0 after:pointer-events after:rounded-sm after:border-gray [&:has(:focus)]:after:border-blue after:border-none [&:has(:focus)]:after:shadow-0 hover:[&:not(:has(:focus))]:after:border-gray text-black cursor-[inherit]"
18
+ class="relative inline-flex gap-y gap-x items-center rounded-sm [font-size:_unset] group text-nowrap p-2 h-8 w-[18.75rem] bg-[#081237] after:content-[""] after:inline-block after:absolute after:top-0 after:bottom-0 after:right-0 after:left-0 after:pointer-events after:rounded-sm after:border-gray [&:has(:focus)]:after:border-blue after:border-none [&:has(:focus)]:after:shadow-0 hover:[&:not(:has(:focus))]:after:border-gray text-black cursor-[inherit]"
19
19
  >
20
20
  <input
21
21
  aria-autocomplete="list"
22
22
  aria-invalid="false"
23
23
  autocomplete="off"
24
- class="base-Input [&::-webkit-calendar-picker-indicator]:bg bg-transparent border-none box-border cursor-[inherit] h-full outline-hidden p-0 peer resize-none w-full text-md leading-4 text-white [&::placeholder]:text-white [&::placeholder]:opacity-[0.64]"
24
+ class="[&::-webkit-calendar-picker-indicator]:bg bg-transparent border-none box-border cursor-[inherit] h-full outline-hidden p-0 peer resize-none w-full text-md leading-4 text-white [&::placeholder]:text-white [&::placeholder]:opacity-[0.64]"
25
25
  data-testid="autocomplete"
26
26
  type="text"
27
27
  value=""
@@ -1,5 +1,6 @@
1
1
  import type { ChangeEvent } from 'react'
2
2
  import React, { forwardRef, useCallback } from 'react'
3
+ import { twMerge } from '@toptal/picasso-tailwind-merge'
3
4
  import { Accordion } from '@toptal/picasso-accordion'
4
5
  import { ArrowDownMinor16 } from '@toptal/picasso-icons'
5
6
 
@@ -44,10 +45,12 @@ export const SidebarItemAccordion = forwardRef<HTMLElement, Props>(
44
45
  <ParentItemContextProvider isOpened={isExpanded || false}>
45
46
  <Accordion
46
47
  onChange={handleAccordionChange}
47
- classes={{
48
- summary: 'p-0 pl-4 mx-4',
49
- content: 'max-w-full',
50
- }}
48
+ className={twMerge(
49
+ '[&_[data-component-type="accordion-summary"]]:p-0',
50
+ '[&_[data-component-type="accordion-summary"]]:pl-4',
51
+ '[&_[data-component-type="accordion-summary"]]:mx-4',
52
+ '[&_[data-component-type="accordion-summary-content"]]:max-w-full'
53
+ )}
51
54
  content={content}
52
55
  borders='none'
53
56
  disabled={disabled}
@@ -23,130 +23,147 @@ exports[`SidebarItem collapsible menu is expanded when one of the children is se
23
23
  tabindex="-1"
24
24
  >
25
25
  <div
26
- class="MuiPaper-root MuiAccordion-root PicassoAccordion-root PicassoAccordion-bordersNone Mui-expanded MuiAccordion-rounded MuiPaper-elevation0 MuiPaper-rounded"
26
+ class="relative bg-transparent text-[1rem] text-graphite [&_[data-component-type="accordion-summary"]]:p [&_[data-component-type="accordion-summary"]]:pl [&_[data-component-type="accordion-summary"]]:mx [&_[data-component-type="accordion-summary-content"]]:max-w"
27
+ data-component-type="accordion"
28
+ data-orientation="vertical"
29
+ dir="ltr"
30
+ role="region"
27
31
  >
28
32
  <div
29
- aria-disabled="false"
30
- aria-expanded="true"
31
- class="MuiButtonBase-root MuiAccordionSummary-root WithStyles(ForwardRef(AccordionSummary))-root PicassoAccordion-summary p-0 pl-4 mx-4 Mui-expanded"
32
- role="button"
33
- tabindex="0"
33
+ data-index="0"
34
+ data-open=""
35
+ data-orientation="vertical"
34
36
  >
35
37
  <div
36
- class="MuiAccordionSummary-content WithStyles(ForwardRef(AccordionSummary))-content PicassoAccordion-content max-w Mui-expanded"
38
+ data-index="0"
39
+ data-open=""
40
+ data-orientation="vertical"
37
41
  >
38
- <li
39
- aria-disabled="false"
40
- class="bg-transparent px-4 py-[0.375rem] w-auto min-h sm:min-h md:min-h relative cursor-pointer transition-colors duration-150 ease-in overflow-hidden text-left no-underline flex items-center justify-start outline-hidden appearance-none leading-4 h-[2.75rem] whitespace-nowrap rounded-sm flex-1 min-w text-graphite hover:text-blue focus:text-blue pl-0 pr-0 pt-0 pb-0 mt-0 mb-0 mr-0 ml-0"
41
- role="menuitem"
42
+ <div
43
+ aria-controls="base-ui-:r4:"
44
+ aria-expanded="true"
45
+ class="relative flex items-center select-none cursor-pointer outline-none py-[0.5625em] px-0 font-semibold text-black data-disabled:pointer-events"
46
+ data-component-type="accordion-summary"
47
+ data-orientation="vertical"
48
+ data-panel-open=""
49
+ data-value="item"
50
+ id="base-ui-:r5:"
51
+ role="button"
42
52
  tabindex="0"
43
53
  >
44
54
  <div
45
- class="flex flex-1 max-w"
55
+ class="flex grow flex-row items-center justify-between m-0 text-[0.875em] leading-[1.5em]"
56
+ data-component-type="accordion-summary-content"
46
57
  >
47
- <div
48
- class="flex flex-col flex-1 min-w"
58
+ <li
59
+ aria-disabled="false"
60
+ class="bg-transparent px-4 py-[0.375rem] w-auto min-h sm:min-h md:min-h relative cursor-pointer transition-colors duration-150 ease-in overflow-hidden text-left no-underline flex items-center justify-start outline-hidden appearance-none leading-4 h-[2.75rem] whitespace-nowrap rounded-sm flex-1 min-w text-graphite hover:text-blue focus:text-blue pl-0 pr-0 pt-0 pb-0 mt-0 mb-0 mr-0 ml-0"
61
+ role="menuitem"
62
+ tabindex="0"
49
63
  >
50
64
  <div
51
- class="flex items-center"
65
+ class="flex flex-1 max-w"
52
66
  >
53
- <span
54
- class="gap-2 items-center inline-flex flex-1 min-w"
67
+ <div
68
+ class="flex flex-col flex-1 min-w"
55
69
  >
56
70
  <div
57
- class="items-center flex flex-1 min-w"
71
+ class="flex items-center"
58
72
  >
59
- <p
60
- class="m-0 text-md text-inherit font-regular whitespace-nowrap text-ellipsis overflow-hidden"
73
+ <span
74
+ class="gap-2 items-center inline-flex flex-1 min-w"
61
75
  >
62
- Test item
63
- </p>
76
+ <div
77
+ class="items-center flex flex-1 min-w"
78
+ >
79
+ <p
80
+ class="m-0 text-md text-inherit font-regular whitespace-nowrap text-ellipsis overflow-hidden"
81
+ >
82
+ Test item
83
+ </p>
84
+ </div>
85
+ </span>
64
86
  </div>
65
- </span>
87
+ </div>
66
88
  </div>
67
- </div>
68
- </div>
69
- </li>
70
- <button
71
- aria-disabled="false"
72
- class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-hidden [[data-component-type="button"]+&]:ml cursor-pointer border-none px-0 bg-transparent h-[1.5em] hover:text-blue hover:underline active:text-blue active:underline focus-visible:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] focus-visible:rounded-sm"
73
- data-component-type="button"
74
- role="button"
75
- tabindex="0"
76
- type="button"
77
- >
78
- <span
79
- class="items-center inline-flex font-semibold text-blue text-md"
80
- >
81
- <svg
82
- class="fill-current inline-block align-[-.125em] flex-1 w-4 h-4 text-base text-graphite PicassoAccordion-expandIcon PicassoAccordion-expandIconExpanded"
83
- style="min-width: 16px; min-height: 16px;"
84
- viewBox="0 0 16 16"
89
+ </li>
90
+ <button
91
+ aria-disabled="false"
92
+ class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-hidden [[data-component-type="button"]+&]:ml cursor-pointer border-none px-0 bg-transparent h-[1.5em] hover:text-blue hover:underline active:text-blue active:underline focus-visible:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] focus-visible:rounded-sm"
93
+ data-component-type="button"
94
+ role="button"
95
+ tabindex="0"
96
+ type="button"
85
97
  >
86
- <path
87
- d="m11.997 5.29.707.707-4 4-.707.707-.707-.707-4-4 .707-.707 4 4 4-4Z"
88
- />
89
- </svg>
90
- </span>
91
- </button>
98
+ <span
99
+ class="items-center inline-flex font-semibold text-blue text-md"
100
+ >
101
+ <svg
102
+ class="fill-current inline-block align-[-.125em] flex-1 w-4 h-4 transition-transform duration-150 ease-in rotate-180 text-base text-graphite"
103
+ style="min-width: 16px; min-height: 16px;"
104
+ viewBox="0 0 16 16"
105
+ >
106
+ <path
107
+ d="m11.997 5.29.707.707-4 4-.707.707-.707-.707-4-4 .707-.707 4 4 4-4Z"
108
+ />
109
+ </svg>
110
+ </span>
111
+ </button>
112
+ </div>
113
+ </div>
92
114
  </div>
93
- </div>
94
- <div
95
- class="MuiCollapse-root"
96
- style="min-height: 0px; height: 0px; transition-duration: 0ms;"
97
- >
98
115
  <div
99
- class="MuiCollapse-wrapper"
116
+ aria-labelledby="base-ui-:r5:"
117
+ class="overflow-hidden h-[var(--accordion-panel transition-[height] duration-[var(--accordion ease-in data-starting-style:h data-ending-style:h [&[hidden]]:block [&[hidden]]:h-0 [&[hidden]]:invisible"
118
+ data-index="0"
119
+ data-open=""
120
+ data-orientation="vertical"
121
+ data-starting-style=""
122
+ id="base-ui-:r4:"
123
+ role="region"
124
+ style="--accordion-panel-height: auto; --accordion-panel-width: auto; --accordion-duration: 300ms;"
100
125
  >
101
126
  <div
102
- class="MuiCollapse-wrapperInner"
127
+ class="flex p-0"
103
128
  >
104
- <div
105
- role="region"
129
+ <ul
130
+ class="relative list-none outline-hidden py-2 px-0 m-0 rounded-sm shadow-0 order-1 [&_&]:flex-1 grow-0 shrink-1 max-w"
131
+ role="menu"
132
+ tabindex="-1"
106
133
  >
107
- <div
108
- class="flex p-0"
134
+ <li
135
+ aria-disabled="false"
136
+ class="px-4 py-[0.375rem] w-auto min-h sm:min-h md:min-h relative cursor-pointer transition-colors duration-150 ease-in overflow-hidden text-left no-underline flex items-center justify-start outline-hidden appearance-none leading-4 h-[2.75rem] whitespace-nowrap rounded-sm flex-1 min-w text-blue hover:text-blue focus:text-blue bg-gray hover:bg-gray focus:bg-gray pl-8 pr-4 pt-0 pb-0 mt-0 mb-0 mr-4 ml-4"
137
+ role="menuitem"
138
+ tabindex="0"
109
139
  >
110
- <ul
111
- class="relative list-none outline-hidden py-2 px-0 m-0 rounded-sm shadow-0 order-1 [&_&]:flex-1 grow-0 shrink-1 max-w"
112
- role="menu"
113
- tabindex="-1"
140
+ <div
141
+ class="flex flex-1 max-w"
114
142
  >
115
- <li
116
- aria-disabled="false"
117
- class="px-4 py-[0.375rem] w-auto min-h sm:min-h md:min-h relative cursor-pointer transition-colors duration-150 ease-in overflow-hidden text-left no-underline flex items-center justify-start outline-hidden appearance-none leading-4 h-[2.75rem] whitespace-nowrap rounded-sm flex-1 min-w text-blue hover:text-blue focus:text-blue bg-gray hover:bg-gray focus:bg-gray pl-8 pr-4 pt-0 pb-0 mt-0 mb-0 mr-4 ml-4"
118
- role="menuitem"
119
- tabindex="0"
143
+ <div
144
+ class="flex flex-col flex-1 min-w"
120
145
  >
121
146
  <div
122
- class="flex flex-1 max-w"
147
+ class="flex items-center"
123
148
  >
124
- <div
125
- class="flex flex-col flex-1 min-w"
149
+ <span
150
+ class="gap-2 items-center inline-flex flex-1 min-w"
126
151
  >
127
152
  <div
128
- class="flex items-center"
153
+ class="items-center flex flex-1 min-w"
129
154
  >
130
- <span
131
- class="gap-2 items-center inline-flex flex-1 min-w"
155
+ <p
156
+ class="m-0 text-md text-inherit font-regular whitespace-nowrap text-ellipsis overflow-hidden"
132
157
  >
133
- <div
134
- class="items-center flex flex-1 min-w"
135
- >
136
- <p
137
- class="m-0 text-md text-inherit font-regular whitespace-nowrap text-ellipsis overflow-hidden"
138
- >
139
- Menu item
140
- </p>
141
- </div>
142
- </span>
158
+ Menu item
159
+ </p>
143
160
  </div>
144
- </div>
161
+ </span>
145
162
  </div>
146
- </li>
147
- </ul>
148
- </div>
149
- </div>
163
+ </div>
164
+ </div>
165
+ </li>
166
+ </ul>
150
167
  </div>
151
168
  </div>
152
169
  </div>
@@ -182,130 +199,147 @@ exports[`SidebarItem collapsible menu is expanded when one of the children is se
182
199
  tabindex="-1"
183
200
  >
184
201
  <div
185
- class="MuiPaper-root MuiAccordion-root PicassoAccordion-root PicassoAccordion-bordersNone Mui-expanded MuiAccordion-rounded MuiPaper-elevation0 MuiPaper-rounded"
202
+ class="relative bg-transparent text-[1rem] text-graphite [&_[data-component-type="accordion-summary"]]:p [&_[data-component-type="accordion-summary"]]:pl [&_[data-component-type="accordion-summary"]]:mx [&_[data-component-type="accordion-summary-content"]]:max-w"
203
+ data-component-type="accordion"
204
+ data-orientation="vertical"
205
+ dir="ltr"
206
+ role="region"
186
207
  >
187
208
  <div
188
- aria-disabled="false"
189
- aria-expanded="true"
190
- class="MuiButtonBase-root MuiAccordionSummary-root WithStyles(ForwardRef(AccordionSummary))-root PicassoAccordion-summary p-0 pl-4 mx-4 Mui-expanded"
191
- role="button"
192
- tabindex="0"
209
+ data-index="0"
210
+ data-open=""
211
+ data-orientation="vertical"
193
212
  >
194
213
  <div
195
- class="MuiAccordionSummary-content WithStyles(ForwardRef(AccordionSummary))-content PicassoAccordion-content max-w Mui-expanded"
214
+ data-index="0"
215
+ data-open=""
216
+ data-orientation="vertical"
196
217
  >
197
- <li
198
- aria-disabled="false"
199
- class="bg-transparent px-4 py-[0.375rem] w-auto min-h sm:min-h md:min-h relative cursor-pointer transition-colors duration-150 ease-in overflow-hidden text-left no-underline flex items-center justify-start outline-hidden appearance-none leading-4 h-[2.75rem] whitespace-nowrap rounded-sm flex-1 min-w text-graphite hover:text-blue focus:text-blue pl-0 pr-0 pt-0 pb-0 mt-0 mb-0 mr-0 ml-0"
200
- role="menuitem"
218
+ <div
219
+ aria-controls="base-ui-:r7:"
220
+ aria-expanded="true"
221
+ class="relative flex items-center select-none cursor-pointer outline-none py-[0.5625em] px-0 font-semibold text-black data-disabled:pointer-events"
222
+ data-component-type="accordion-summary"
223
+ data-orientation="vertical"
224
+ data-panel-open=""
225
+ data-value="item"
226
+ id="base-ui-:r8:"
227
+ role="button"
201
228
  tabindex="0"
202
229
  >
203
230
  <div
204
- class="flex flex-1 max-w"
231
+ class="flex grow flex-row items-center justify-between m-0 text-[0.875em] leading-[1.5em]"
232
+ data-component-type="accordion-summary-content"
205
233
  >
206
- <div
207
- class="flex flex-col flex-1 min-w"
234
+ <li
235
+ aria-disabled="false"
236
+ class="bg-transparent px-4 py-[0.375rem] w-auto min-h sm:min-h md:min-h relative cursor-pointer transition-colors duration-150 ease-in overflow-hidden text-left no-underline flex items-center justify-start outline-hidden appearance-none leading-4 h-[2.75rem] whitespace-nowrap rounded-sm flex-1 min-w text-graphite hover:text-blue focus:text-blue pl-0 pr-0 pt-0 pb-0 mt-0 mb-0 mr-0 ml-0"
237
+ role="menuitem"
238
+ tabindex="0"
208
239
  >
209
240
  <div
210
- class="flex items-center"
241
+ class="flex flex-1 max-w"
211
242
  >
212
- <span
213
- class="gap-2 items-center inline-flex flex-1 min-w"
243
+ <div
244
+ class="flex flex-col flex-1 min-w"
214
245
  >
215
246
  <div
216
- class="items-center flex flex-1 min-w"
247
+ class="flex items-center"
217
248
  >
218
- <p
219
- class="m-0 text-md text-inherit font-regular whitespace-nowrap text-ellipsis overflow-hidden"
249
+ <span
250
+ class="gap-2 items-center inline-flex flex-1 min-w"
220
251
  >
221
- Test item
222
- </p>
252
+ <div
253
+ class="items-center flex flex-1 min-w"
254
+ >
255
+ <p
256
+ class="m-0 text-md text-inherit font-regular whitespace-nowrap text-ellipsis overflow-hidden"
257
+ >
258
+ Test item
259
+ </p>
260
+ </div>
261
+ </span>
223
262
  </div>
224
- </span>
263
+ </div>
225
264
  </div>
226
- </div>
227
- </div>
228
- </li>
229
- <button
230
- aria-disabled="false"
231
- class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-hidden [[data-component-type="button"]+&]:ml cursor-pointer border-none px-0 bg-transparent h-[1.5em] hover:text-blue hover:underline active:text-blue active:underline focus-visible:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] focus-visible:rounded-sm"
232
- data-component-type="button"
233
- role="button"
234
- tabindex="0"
235
- type="button"
236
- >
237
- <span
238
- class="items-center inline-flex font-semibold text-blue text-md"
239
- >
240
- <svg
241
- class="fill-current inline-block align-[-.125em] flex-1 w-4 h-4 text-base text-graphite PicassoAccordion-expandIcon PicassoAccordion-expandIconExpanded"
242
- style="min-width: 16px; min-height: 16px;"
243
- viewBox="0 0 16 16"
265
+ </li>
266
+ <button
267
+ aria-disabled="false"
268
+ class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-hidden [[data-component-type="button"]+&]:ml cursor-pointer border-none px-0 bg-transparent h-[1.5em] hover:text-blue hover:underline active:text-blue active:underline focus-visible:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] focus-visible:rounded-sm"
269
+ data-component-type="button"
270
+ role="button"
271
+ tabindex="0"
272
+ type="button"
244
273
  >
245
- <path
246
- d="m11.997 5.29.707.707-4 4-.707.707-.707-.707-4-4 .707-.707 4 4 4-4Z"
247
- />
248
- </svg>
249
- </span>
250
- </button>
274
+ <span
275
+ class="items-center inline-flex font-semibold text-blue text-md"
276
+ >
277
+ <svg
278
+ class="fill-current inline-block align-[-.125em] flex-1 w-4 h-4 transition-transform duration-150 ease-in rotate-180 text-base text-graphite"
279
+ style="min-width: 16px; min-height: 16px;"
280
+ viewBox="0 0 16 16"
281
+ >
282
+ <path
283
+ d="m11.997 5.29.707.707-4 4-.707.707-.707-.707-4-4 .707-.707 4 4 4-4Z"
284
+ />
285
+ </svg>
286
+ </span>
287
+ </button>
288
+ </div>
289
+ </div>
251
290
  </div>
252
- </div>
253
- <div
254
- class="MuiCollapse-root"
255
- style="min-height: 0px; height: 0px; transition-duration: 0ms;"
256
- >
257
291
  <div
258
- class="MuiCollapse-wrapper"
292
+ aria-labelledby="base-ui-:r8:"
293
+ class="overflow-hidden h-[var(--accordion-panel transition-[height] duration-[var(--accordion ease-in data-starting-style:h data-ending-style:h [&[hidden]]:block [&[hidden]]:h-0 [&[hidden]]:invisible"
294
+ data-index="0"
295
+ data-open=""
296
+ data-orientation="vertical"
297
+ data-starting-style=""
298
+ id="base-ui-:r7:"
299
+ role="region"
300
+ style="--accordion-panel-height: auto; --accordion-panel-width: auto; --accordion-duration: 300ms;"
259
301
  >
260
302
  <div
261
- class="MuiCollapse-wrapperInner"
303
+ class="flex p-0"
262
304
  >
263
- <div
264
- role="region"
305
+ <ul
306
+ class="relative list-none outline-hidden py-2 px-0 m-0 rounded-sm shadow-0 order-1 [&_&]:flex-1 grow-0 shrink-1 max-w"
307
+ role="menu"
308
+ tabindex="-1"
265
309
  >
266
- <div
267
- class="flex p-0"
310
+ <li
311
+ aria-disabled="false"
312
+ class="px-4 py-[0.375rem] w-auto min-h sm:min-h md:min-h relative cursor-pointer transition-colors duration-150 ease-in overflow-hidden text-left no-underline flex items-center justify-start outline-hidden appearance-none leading-4 h-[2.75rem] whitespace-nowrap rounded-sm flex-1 min-w text-blue hover:text-blue focus:text-blue bg-gray hover:bg-gray focus:bg-gray pl-8 pr-4 pt-0 pb-0 mt-0 mb-0 mr-4 ml-4"
313
+ role="menuitem"
314
+ tabindex="0"
268
315
  >
269
- <ul
270
- class="relative list-none outline-hidden py-2 px-0 m-0 rounded-sm shadow-0 order-1 [&_&]:flex-1 grow-0 shrink-1 max-w"
271
- role="menu"
272
- tabindex="-1"
316
+ <div
317
+ class="flex flex-1 max-w"
273
318
  >
274
- <li
275
- aria-disabled="false"
276
- class="px-4 py-[0.375rem] w-auto min-h sm:min-h md:min-h relative cursor-pointer transition-colors duration-150 ease-in overflow-hidden text-left no-underline flex items-center justify-start outline-hidden appearance-none leading-4 h-[2.75rem] whitespace-nowrap rounded-sm flex-1 min-w text-blue hover:text-blue focus:text-blue bg-gray hover:bg-gray focus:bg-gray pl-8 pr-4 pt-0 pb-0 mt-0 mb-0 mr-4 ml-4"
277
- role="menuitem"
278
- tabindex="0"
319
+ <div
320
+ class="flex flex-col flex-1 min-w"
279
321
  >
280
322
  <div
281
- class="flex flex-1 max-w"
323
+ class="flex items-center"
282
324
  >
283
- <div
284
- class="flex flex-col flex-1 min-w"
325
+ <span
326
+ class="gap-2 items-center inline-flex flex-1 min-w"
285
327
  >
286
328
  <div
287
- class="flex items-center"
329
+ class="items-center flex flex-1 min-w"
288
330
  >
289
- <span
290
- class="gap-2 items-center inline-flex flex-1 min-w"
331
+ <p
332
+ class="m-0 text-md text-inherit font-regular whitespace-nowrap text-ellipsis overflow-hidden"
291
333
  >
292
- <div
293
- class="items-center flex flex-1 min-w"
294
- >
295
- <p
296
- class="m-0 text-md text-inherit font-regular whitespace-nowrap text-ellipsis overflow-hidden"
297
- >
298
- Menu item
299
- </p>
300
- </div>
301
- </span>
334
+ Menu item
335
+ </p>
302
336
  </div>
303
- </div>
337
+ </span>
304
338
  </div>
305
- </li>
306
- </ul>
307
- </div>
308
- </div>
339
+ </div>
340
+ </div>
341
+ </li>
342
+ </ul>
309
343
  </div>
310
344
  </div>
311
345
  </div>
@@ -505,139 +539,154 @@ exports[`SidebarItem use accordion for collapsible with menu 1`] = `
505
539
  class="Picasso-root"
506
540
  >
507
541
  <div
508
- class="MuiPaper-root MuiAccordion-root PicassoAccordion-root PicassoAccordion-bordersNone MuiAccordion-rounded MuiPaper-elevation0 MuiPaper-rounded"
542
+ class="relative bg-transparent text-[1rem] text-graphite [&_[data-component-type="accordion-summary"]]:p [&_[data-component-type="accordion-summary"]]:pl [&_[data-component-type="accordion-summary"]]:mx [&_[data-component-type="accordion-summary-content"]]:max-w"
543
+ data-component-type="accordion"
544
+ data-orientation="vertical"
545
+ dir="ltr"
546
+ role="region"
509
547
  >
510
548
  <div
511
- aria-disabled="false"
512
- aria-expanded="false"
513
- class="MuiButtonBase-root MuiAccordionSummary-root WithStyles(ForwardRef(AccordionSummary))-root PicassoAccordion-summary p-0 pl-4 mx-4"
514
- role="button"
515
- tabindex="0"
549
+ data-closed=""
550
+ data-index="0"
551
+ data-orientation="vertical"
516
552
  >
517
553
  <div
518
- class="MuiAccordionSummary-content WithStyles(ForwardRef(AccordionSummary))-content PicassoAccordion-content max-w"
554
+ data-closed=""
555
+ data-index="0"
556
+ data-orientation="vertical"
519
557
  >
520
- <li
521
- aria-disabled="false"
522
- class="bg-transparent px-4 py-[0.375rem] w-auto min-h sm:min-h md:min-h relative cursor-pointer transition-colors duration-150 ease-in overflow-hidden text-left no-underline flex items-center justify-start outline-hidden appearance-none leading-4 h-[2.75rem] whitespace-nowrap rounded-sm flex-1 min-w text-graphite hover:text-blue focus:text-blue pl-0 pr-0 pt-0 pb-0 mt-0 mb-0 mr-0 ml-0"
523
- role="menuitem"
524
- tabindex="-1"
558
+ <div
559
+ aria-expanded="false"
560
+ class="relative flex items-center select-none cursor-pointer outline-none py-[0.5625em] px-0 font-semibold text-black data-disabled:pointer-events"
561
+ data-component-type="accordion-summary"
562
+ data-orientation="vertical"
563
+ data-value=""
564
+ id="base-ui-:r2:"
565
+ role="button"
566
+ tabindex="0"
525
567
  >
526
568
  <div
527
- class="flex flex-1 max-w"
569
+ class="flex grow flex-row items-center justify-between m-0 text-[0.875em] leading-[1.5em]"
570
+ data-component-type="accordion-summary-content"
528
571
  >
529
- <div
530
- class="flex flex-col flex-1 min-w"
572
+ <li
573
+ aria-disabled="false"
574
+ class="bg-transparent px-4 py-[0.375rem] w-auto min-h sm:min-h md:min-h relative cursor-pointer transition-colors duration-150 ease-in overflow-hidden text-left no-underline flex items-center justify-start outline-hidden appearance-none leading-4 h-[2.75rem] whitespace-nowrap rounded-sm flex-1 min-w text-graphite hover:text-blue focus:text-blue pl-0 pr-0 pt-0 pb-0 mt-0 mb-0 mr-0 ml-0"
575
+ role="menuitem"
576
+ tabindex="-1"
531
577
  >
532
578
  <div
533
- class="flex items-center"
579
+ class="flex flex-1 max-w"
534
580
  >
535
- <span
536
- class="gap-2 items-center inline-flex flex-1 min-w"
581
+ <div
582
+ class="flex flex-col flex-1 min-w"
537
583
  >
538
- <svg
539
- class="fill-current inline-block text-inherit h-[1em] align-[-.125em]"
540
- style="min-width: 16px; min-height: 16px;"
541
- viewBox="0 0 16 16"
542
- >
543
- <path
544
- d="M16 11H7v4l-7-4V1h16v10Zm-1-9H1v8.42l5 2.857V10h9V2Z"
545
- />
546
- </svg>
547
584
  <div
548
- class="items-center flex flex-1 min-w ml-[.375rem]"
585
+ class="flex items-center"
549
586
  >
550
- <p
551
- class="m-0 text-md text-inherit font-regular whitespace-nowrap text-ellipsis overflow-hidden"
587
+ <span
588
+ class="gap-2 items-center inline-flex flex-1 min-w"
552
589
  >
553
- Test item
554
- </p>
590
+ <svg
591
+ class="fill-current inline-block text-inherit h-[1em] align-[-.125em]"
592
+ style="min-width: 16px; min-height: 16px;"
593
+ viewBox="0 0 16 16"
594
+ >
595
+ <path
596
+ d="M16 11H7v4l-7-4V1h16v10Zm-1-9H1v8.42l5 2.857V10h9V2Z"
597
+ />
598
+ </svg>
599
+ <div
600
+ class="items-center flex flex-1 min-w ml-[.375rem]"
601
+ >
602
+ <p
603
+ class="m-0 text-md text-inherit font-regular whitespace-nowrap text-ellipsis overflow-hidden"
604
+ >
605
+ Test item
606
+ </p>
607
+ </div>
608
+ </span>
555
609
  </div>
556
- </span>
610
+ </div>
557
611
  </div>
558
- </div>
559
- </div>
560
- </li>
561
- <button
562
- aria-disabled="false"
563
- class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-hidden [[data-component-type="button"]+&]:ml cursor-pointer border-none px-0 bg-transparent h-[1.5em] hover:text-blue hover:underline active:text-blue active:underline focus-visible:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] focus-visible:rounded-sm"
564
- data-component-type="button"
565
- role="button"
566
- tabindex="0"
567
- type="button"
568
- >
569
- <span
570
- class="items-center inline-flex font-semibold text-blue text-md"
571
- >
572
- <svg
573
- class="fill-current inline-block align-[-.125em] flex-1 w-4 h-4 text-base text-graphite PicassoAccordion-expandIcon"
574
- style="min-width: 16px; min-height: 16px;"
575
- viewBox="0 0 16 16"
612
+ </li>
613
+ <button
614
+ aria-disabled="false"
615
+ class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-hidden [[data-component-type="button"]+&]:ml cursor-pointer border-none px-0 bg-transparent h-[1.5em] hover:text-blue hover:underline active:text-blue active:underline focus-visible:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] focus-visible:rounded-sm"
616
+ data-component-type="button"
617
+ role="button"
618
+ tabindex="0"
619
+ type="button"
576
620
  >
577
- <path
578
- d="m11.997 5.29.707.707-4 4-.707.707-.707-.707-4-4 .707-.707 4 4 4-4Z"
579
- />
580
- </svg>
581
- </span>
582
- </button>
621
+ <span
622
+ class="items-center inline-flex font-semibold text-blue text-md"
623
+ >
624
+ <svg
625
+ class="fill-current inline-block align-[-.125em] flex-1 w-4 h-4 transition-transform duration-150 ease-in text-base text-graphite"
626
+ style="min-width: 16px; min-height: 16px;"
627
+ viewBox="0 0 16 16"
628
+ >
629
+ <path
630
+ d="m11.997 5.29.707.707-4 4-.707.707-.707-.707-4-4 .707-.707 4 4 4-4Z"
631
+ />
632
+ </svg>
633
+ </span>
634
+ </button>
635
+ </div>
636
+ </div>
583
637
  </div>
584
- </div>
585
- <div
586
- class="MuiCollapse-root MuiCollapse-hidden"
587
- style="min-height: 0px;"
588
- >
589
638
  <div
590
- class="MuiCollapse-wrapper"
639
+ aria-labelledby="base-ui-:r2:"
640
+ class="overflow-hidden h-[var(--accordion-panel transition-[height] duration-[var(--accordion ease-in data-starting-style:h data-ending-style:h [&[hidden]]:block [&[hidden]]:h-0 [&[hidden]]:invisible"
641
+ data-closed=""
642
+ data-index="0"
643
+ data-orientation="vertical"
644
+ hidden=""
645
+ id="base-ui-:r1:"
646
+ role="region"
647
+ style="--accordion-panel-height: auto; --accordion-panel-width: auto; --accordion-duration: 300ms;"
591
648
  >
592
649
  <div
593
- class="MuiCollapse-wrapperInner"
650
+ class="flex p-0"
594
651
  >
595
- <div
596
- role="region"
652
+ <ul
653
+ class="relative list-none outline-hidden py-2 px-0 m-0 rounded-sm shadow-0 order-1 [&_&]:flex-1 grow-0 shrink-1 max-w"
654
+ role="menu"
655
+ tabindex="-1"
597
656
  >
598
- <div
599
- class="flex p-0"
657
+ <li
658
+ aria-disabled="false"
659
+ class="bg-transparent px-4 py-[0.375rem] w-auto min-h sm:min-h md:min-h relative cursor-pointer transition-colors duration-150 ease-in overflow-hidden text-left no-underline flex items-center justify-start outline-hidden appearance-none leading-4 h-[2.75rem] whitespace-nowrap rounded-sm flex-1 min-w text-graphite hover:text-blue focus:text-blue pl-[2.875rem] pr-4 pt-0 pb-0 mt-0 mb-0 mr-4 ml-4"
660
+ role="menuitem"
661
+ tabindex="0"
600
662
  >
601
- <ul
602
- class="relative list-none outline-hidden py-2 px-0 m-0 rounded-sm shadow-0 order-1 [&_&]:flex-1 grow-0 shrink-1 max-w"
603
- role="menu"
604
- tabindex="-1"
663
+ <div
664
+ class="flex flex-1 max-w"
605
665
  >
606
- <li
607
- aria-disabled="false"
608
- class="bg-transparent px-4 py-[0.375rem] w-auto min-h sm:min-h md:min-h relative cursor-pointer transition-colors duration-150 ease-in overflow-hidden text-left no-underline flex items-center justify-start outline-hidden appearance-none leading-4 h-[2.75rem] whitespace-nowrap rounded-sm flex-1 min-w text-graphite hover:text-blue focus:text-blue pl-[2.875rem] pr-4 pt-0 pb-0 mt-0 mb-0 mr-4 ml-4"
609
- role="menuitem"
610
- tabindex="0"
666
+ <div
667
+ class="flex flex-col flex-1 min-w"
611
668
  >
612
669
  <div
613
- class="flex flex-1 max-w"
670
+ class="flex items-center"
614
671
  >
615
- <div
616
- class="flex flex-col flex-1 min-w"
672
+ <span
673
+ class="gap-2 items-center inline-flex flex-1 min-w"
617
674
  >
618
675
  <div
619
- class="flex items-center"
676
+ class="items-center flex flex-1 min-w"
620
677
  >
621
- <span
622
- class="gap-2 items-center inline-flex flex-1 min-w"
678
+ <p
679
+ class="m-0 text-md text-inherit font-regular whitespace-nowrap text-ellipsis overflow-hidden"
623
680
  >
624
- <div
625
- class="items-center flex flex-1 min-w"
626
- >
627
- <p
628
- class="m-0 text-md text-inherit font-regular whitespace-nowrap text-ellipsis overflow-hidden"
629
- >
630
- Menu item
631
- </p>
632
- </div>
633
- </span>
681
+ Menu item
682
+ </p>
634
683
  </div>
635
- </div>
684
+ </span>
636
685
  </div>
637
- </li>
638
- </ul>
639
- </div>
640
- </div>
686
+ </div>
687
+ </div>
688
+ </li>
689
+ </ul>
641
690
  </div>
642
691
  </div>
643
692
  </div>