@scality/core-ui 0.115.0 → 0.117.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.
Files changed (56) hide show
  1. package/.github/workflows/dependency-review.yaml +2 -0
  2. package/.storybook/preview.js +32 -18
  3. package/README.md +1 -1
  4. package/dist/components/buttonv2/Buttonv2.component.d.ts +1 -0
  5. package/dist/components/buttonv2/Buttonv2.component.d.ts.map +1 -1
  6. package/dist/components/buttonv2/Buttonv2.component.js +9 -8
  7. package/dist/components/card/Card.component.d.ts.map +1 -1
  8. package/dist/components/card/Card.component.js +11 -11
  9. package/dist/components/checkbox/Checkbox.component.d.ts.map +1 -1
  10. package/dist/components/checkbox/Checkbox.component.js +2 -2
  11. package/dist/components/dropdown/Dropdown.component.d.ts.map +1 -1
  12. package/dist/components/dropdown/Dropdown.component.js +41 -57
  13. package/dist/components/inlineinput/InlineInput.d.ts +17 -0
  14. package/dist/components/inlineinput/InlineInput.d.ts.map +1 -0
  15. package/dist/components/inlineinput/InlineInput.js +85 -0
  16. package/dist/components/inputv2/inputv2.d.ts +8 -0
  17. package/dist/components/inputv2/inputv2.d.ts.map +1 -1
  18. package/dist/components/modal/Modal.component.d.ts.map +1 -1
  19. package/dist/components/modal/Modal.component.js +18 -1
  20. package/dist/components/navbar/Navbar.component.d.ts +1 -0
  21. package/dist/components/navbar/Navbar.component.d.ts.map +1 -1
  22. package/dist/components/navbar/Navbar.component.js +23 -6
  23. package/dist/components/sidebar/Sidebar.component.d.ts.map +1 -1
  24. package/dist/components/sidebar/Sidebar.component.js +18 -1
  25. package/dist/components/tablev2/MultiSelectableContent.d.ts.map +1 -1
  26. package/dist/components/tablev2/MultiSelectableContent.js +10 -1
  27. package/dist/components/tablev2/SingleSelectableContent.d.ts.map +1 -1
  28. package/dist/components/tablev2/SingleSelectableContent.js +20 -1
  29. package/dist/components/tablev2/Tablestyle.d.ts +1 -0
  30. package/dist/components/tablev2/Tablestyle.d.ts.map +1 -1
  31. package/dist/components/tablev2/Tablestyle.js +10 -1
  32. package/dist/components/text/Text.component.d.ts.map +1 -1
  33. package/dist/components/text/Text.component.js +2 -2
  34. package/dist/index.d.ts +1 -0
  35. package/dist/index.d.ts.map +1 -1
  36. package/dist/index.js +1 -0
  37. package/dist/spacing.js +1 -1
  38. package/package.json +23 -51
  39. package/src/lib/components/buttonv2/Buttonv2.component.tsx +11 -8
  40. package/src/lib/components/card/Card.component.tsx +11 -11
  41. package/src/lib/components/checkbox/Checkbox.component.tsx +2 -2
  42. package/src/lib/components/dropdown/Dropdown.component.tsx +65 -81
  43. package/src/lib/components/inlineinput/InlineInput.test.tsx +211 -0
  44. package/src/lib/components/inlineinput/InlineInput.tsx +179 -0
  45. package/src/lib/components/inputv2/inputv2.tsx +2 -2
  46. package/src/lib/components/modal/Modal.component.tsx +19 -1
  47. package/src/lib/components/navbar/Navbar.component.tsx +27 -19
  48. package/src/lib/components/sidebar/Sidebar.component.tsx +21 -0
  49. package/src/lib/components/tablev2/MultiSelectableContent.tsx +17 -1
  50. package/src/lib/components/tablev2/SingleSelectableContent.tsx +29 -1
  51. package/src/lib/components/tablev2/Tablestyle.tsx +15 -2
  52. package/src/lib/components/text/Text.component.tsx +2 -2
  53. package/src/lib/index.ts +1 -0
  54. package/src/lib/spacing.tsx +1 -1
  55. package/stories/InlineInput/InlineInput.stories.tsx +46 -0
  56. package/stories/navbar.stories.tsx +18 -0
@@ -14,3 +14,5 @@ jobs:
14
14
 
15
15
  - name: Dependency Review
16
16
  uses: actions/dependency-review-action@v3
17
+ with:
18
+ fail-on-severity: high
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
2
  import { QueryClient, QueryClientProvider } from 'react-query';
3
3
  import { CoreUiThemeProvider } from '../src/lib/next';
4
- import { brand, coreUIAvailableThemes} from '../src/lib/style/theme';
4
+ import { brand, coreUIAvailableThemes } from '../src/lib/style/theme';
5
5
  import { Wrapper } from '../stories/common';
6
-
6
+ import { ToastProvider } from '../src/lib';
7
7
 
8
8
  export const globalTypes = {
9
9
  theme: {
@@ -14,22 +14,28 @@ export const globalTypes = {
14
14
  title: 'Preview Theme',
15
15
  dynamicTitle: false,
16
16
  // array of plain string values or MenuItem shape (see below)
17
- items: [{ value: 'darkRebrand', title: 'Dark', icon: 'moon' }, { value: 'artescaLight', title: 'Light', icon: 'sun' }, {value: 'ring9dark', title: 'Ring Dark', icon: 'moon'}],
17
+ items: [
18
+ { value: 'darkRebrand', title: 'Dark', icon: 'moon' },
19
+ { value: 'artescaLight', title: 'Light', icon: 'sun' },
20
+ { value: 'ring9dark', title: 'Ring Dark', icon: 'moon' },
21
+ ],
18
22
  },
19
23
  },
20
24
  };
21
25
 
22
26
  const withThemeProvider = (Story, context) => {
23
27
  const theme = coreUIAvailableThemes[context.globals.theme];
24
- const {viewMode} = context
28
+ const { viewMode } = context;
25
29
  return (
26
30
  <QueryClientProvider client={new QueryClient()}>
27
31
  <CoreUiThemeProvider theme={theme}>
28
32
  {/* Wrapper to make the stories take the full screen but not in docs */}
29
- <div style={viewMode === 'story' ? {height: 100 + 'vh' }: null}>
30
- <Wrapper>
31
- <Story {...context} />
32
- </Wrapper>
33
+ <div style={viewMode === 'story' ? { height: 100 + 'vh' } : null}>
34
+ <ToastProvider>
35
+ <Wrapper>
36
+ <Story {...context} />
37
+ </Wrapper>
38
+ </ToastProvider>
33
39
  </div>
34
40
  </CoreUiThemeProvider>
35
41
  </QueryClientProvider>
@@ -40,17 +46,18 @@ export const decorators = [withThemeProvider];
40
46
 
41
47
  export const parameters = {
42
48
  layout: 'fullscreen',
43
- docs:{
44
- toc : {headingSelector: 'h2,h3',
45
- title: "Table of Contents"},
49
+ docs: {
50
+ toc: { headingSelector: 'h2,h3', title: 'Table of Contents' },
46
51
  },
47
- controls:{
52
+ controls: {
48
53
  //All props with color in name will automatically have a control 'color'
49
54
  //with colors presets to theme colors, possible to have the color name from theme in control
50
- presetColors: Object.entries(brand).map(color => {return {color: color[1],title:color[0] }}),
51
- matchers:{
52
- color: /color/i
53
- }
55
+ presetColors: Object.entries(brand).map((color) => {
56
+ return { color: color[1], title: color[0] };
57
+ }),
58
+ matchers: {
59
+ color: /color/i,
60
+ },
54
61
  },
55
62
  options: {
56
63
  storySort: {
@@ -60,8 +67,15 @@ export const parameters = {
60
67
  'Guidelines',
61
68
  'Templates',
62
69
  'Components',
63
- ['Navigation', 'Data Display', 'Inputs', 'Feedback', 'Progress & loading', 'Styling', 'Deprecated']
64
-
70
+ [
71
+ 'Navigation',
72
+ 'Data Display',
73
+ 'Inputs',
74
+ 'Feedback',
75
+ 'Progress & loading',
76
+ 'Styling',
77
+ 'Deprecated',
78
+ ],
65
79
  ],
66
80
  },
67
81
  },
package/README.md CHANGED
@@ -11,7 +11,7 @@ Core-UI is a component library containing all components, layouts, icons and the
11
11
  - Add ```@scality/core-ui``` in the ```package.json```'s dependencies of your project.
12
12
 
13
13
  ```json
14
- "@scality/core-ui": "github:scality/core-ui#0.114.0",
14
+ "@scality/core-ui": "0.115.0",
15
15
  ```
16
16
 
17
17
  - ```@scality/core-ui``` requires the peerDependencies below. Make sure that you have them in the ```package.json```'s dependencies.
@@ -1,6 +1,7 @@
1
1
  import React, { ButtonHTMLAttributes } from 'react';
2
2
  import { Loader } from '../loader/Loader.component';
3
3
  import { Props as TooltipProps } from '../tooltip/Tooltip.component';
4
+ export declare const FocusVisibleStyle: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<import("styled-components").DefaultTheme>>;
4
5
  export type Props = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'size' | 'label'> & {
5
6
  variant?: 'primary' | 'secondary' | 'danger' | 'outline';
6
7
  size?: 'default' | 'inline';
@@ -1 +1 @@
1
- {"version":3,"file":"Buttonv2.component.d.ts","sourceRoot":"","sources":["../../../src/lib/components/buttonv2/Buttonv2.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAIpD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAW,KAAK,IAAI,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC9E,MAAM,MAAM,KAAK,GAAG,IAAI,CACtB,oBAAoB,CAAC,iBAAiB,CAAC,EACvC,MAAM,GAAG,OAAO,CACjB,GAAG;IACF,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;IACzD,IAAI,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAC/D,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,OAAO,CAAC,EAAE,IAAI,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;IACzC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AACF,eAAO,MAAM,YAAY;;;;uBANL,gBAAgB,CAAC,iBAAiB,CAAC,KAAK,IAAI;WACvD,MAAM,SAAS;YACd,MAAM,SAAS;;;SA6JxB,CAAC;AACF,eAAO,MAAM,WAAW,0GAIvB,CAAC;AACF,eAAO,MAAM,UAAU;WAAwB,MAAM,SAAS;SAS7D,CAAC;AAEF,eAAO,MAAM,YAAY;;;SAaxB,CAAC;AAEF,iBAAS,MAAM,CAAC,EACd,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,IAAI,EACJ,OAAO,EACP,OAAO,EACP,SAAS,EACT,GAAG,IAAI,EACR,EAAE,KAAK,eAqDP;AAED,OAAO,EAAE,MAAM,EAAE,CAAC"}
1
+ {"version":3,"file":"Buttonv2.component.d.ts","sourceRoot":"","sources":["../../../src/lib/components/buttonv2/Buttonv2.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAIpD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAW,KAAK,IAAI,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE9E,eAAO,MAAM,iBAAiB,oIAI7B,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG,IAAI,CACtB,oBAAoB,CAAC,iBAAiB,CAAC,EACvC,MAAM,GAAG,OAAO,CACjB,GAAG;IACF,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;IACzD,IAAI,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAC/D,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,OAAO,CAAC,EAAE,IAAI,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;IACzC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AACF,eAAO,MAAM,YAAY;;;;uBANL,gBAAgB,CAAC,iBAAiB,CAAC,KAAK,IAAI;WACvD,MAAM,SAAS;YACd,MAAM,SAAS;;;SAyJxB,CAAC;AACF,eAAO,MAAM,WAAW,0GAIvB,CAAC;AACF,eAAO,MAAM,UAAU;WAAwB,MAAM,SAAS;SAS7D,CAAC;AAEF,eAAO,MAAM,YAAY;;;SAaxB,CAAC;AAEF,iBAAS,MAAM,CAAC,EACd,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,IAAI,EACJ,OAAO,EACP,OAAO,EACP,SAAS,EACT,GAAG,IAAI,EACR,EAAE,KAAK,eAqDP;AAED,OAAO,EAAE,MAAM,EAAE,CAAC"}
@@ -4,6 +4,11 @@ import { spacing } from '../../spacing';
4
4
  import { fontSize, fontWeight } from '../../style/theme';
5
5
  import { Loader } from '../loader/Loader.component';
6
6
  import { Tooltip } from '../tooltip/Tooltip.component';
7
+ export const FocusVisibleStyle = css `
8
+ outline: dashed ${spacing.r2} ${(props) => props.theme.selectedActive};
9
+ outline-offset: ${spacing.r2};
10
+ z-index: 1000;
11
+ `;
7
12
  export const ButtonStyled = styled.button `
8
13
  -webkit-appearance: none;
9
14
  -moz-appearance: none;
@@ -40,8 +45,7 @@ export const ButtonStyled = styled.button `
40
45
  }
41
46
  // :focus-visible is the keyboard-only version of :focus
42
47
  &:focus-visible:enabled {
43
- outline: dashed ${spacing.r2} ${brand.selectedActive};
44
- outline-offset: ${spacing.r2};
48
+ ${FocusVisibleStyle}
45
49
  color: ${brand.textPrimary};
46
50
  }
47
51
  &:active:enabled {
@@ -61,8 +65,7 @@ export const ButtonStyled = styled.button `
61
65
  color: ${brand.textPrimary};
62
66
  }
63
67
  &:focus-visible:enabled {
64
- outline: dashed ${spacing.r2} ${brand.selectedActive};
65
- outline-offset: ${spacing.r2};
68
+ ${FocusVisibleStyle}
66
69
  color: ${brand.textPrimary};
67
70
  }
68
71
  &:active:enabled {
@@ -81,8 +84,7 @@ export const ButtonStyled = styled.button `
81
84
  border: ${spacing.r1} solid ${brand.infoPrimary};
82
85
  }
83
86
  &:focus-visible:enabled {
84
- outline: dashed ${spacing.r2} ${brand.selectedActive};
85
- outline-offset: ${spacing.r2};
87
+ ${FocusVisibleStyle}
86
88
  }
87
89
  &:active:enabled {
88
90
  cursor: pointer;
@@ -100,8 +102,7 @@ export const ButtonStyled = styled.button `
100
102
  color: ${brand.textPrimary};
101
103
  }
102
104
  &:focus-visible:enabled {
103
- outline: dashed ${spacing.r2} ${brand.selectedActive};
104
- outline-offset: ${spacing.r2};
105
+ ${FocusVisibleStyle}
105
106
  border-color: ${brand.buttonSecondary};
106
107
  }
107
108
  &:active:enabled {
@@ -1 +1 @@
1
- {"version":3,"file":"Card.component.d.ts","sourceRoot":"","sources":["../../../src/lib/components/card/Card.component.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKlC,KAAK,gBAAgB,GAAG;IACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAkDF,eAAO,MAAM,UAAU,qCA/CqB,gBAAgB,gBA+CC,CAAC;AAC9D,eAAO,MAAM,QAAQ,qCAhDuB,gBAAgB,gBAgDH,CAAC;AAC1D,eAAO,MAAM,iBAAiB,qCAjDc,gBAAgB,gBAiDe,CAAC;AA6D5E,KAAK,SAAS,GAAG;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;IAC5C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,IAAI,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,SAAS,CAAC,cAAc,CAAC,CAAC;AAC9B,iBAAS,IAAI,CAAC,EACZ,KAAc,EACd,MAAe,EACf,qBAA0C,EAC1C,mBAAwC,EACxC,MAAa,EACb,OAAc,EACd,MAAc,EACd,QAAgB,EAChB,QAAQ,EACR,SAAS,EACT,GAAG,IAAI,EACR,EAAE,SAAS,eA6CX;kBAzDQ,IAAI;;;;;AA6Db,OAAO,EAAE,IAAI,EAAE,CAAC"}
1
+ {"version":3,"file":"Card.component.d.ts","sourceRoot":"","sources":["../../../src/lib/components/card/Card.component.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMlC,KAAK,gBAAgB,GAAG;IACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAkDF,eAAO,MAAM,UAAU,qCA/CqB,gBAAgB,gBA+CC,CAAC;AAC9D,eAAO,MAAM,QAAQ,qCAhDuB,gBAAgB,gBAgDH,CAAC;AAC1D,eAAO,MAAM,iBAAiB,qCAjDc,gBAAgB,gBAiDe,CAAC;AA4D5E,KAAK,SAAS,GAAG;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;IAC5C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,IAAI,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,SAAS,CAAC,cAAc,CAAC,CAAC;AAC9B,iBAAS,IAAI,CAAC,EACZ,KAAc,EACd,MAAe,EACf,qBAA0C,EAC1C,mBAAwC,EACxC,MAAa,EACb,OAAc,EACd,MAAc,EACd,QAAgB,EAChB,QAAQ,EACR,SAAS,EACT,GAAG,IAAI,EACR,EAAE,SAAS,eA6CX;kBAzDQ,IAAI;;;;;AA6Db,OAAO,EAAE,IAAI,EAAE,CAAC"}
@@ -1,7 +1,8 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { createContext } from 'react';
3
- import styled from 'styled-components';
3
+ import styled, { css } from 'styled-components';
4
4
  import { hex2RGB } from '../../utils';
5
+ import { FocusVisibleStyle } from '../buttonv2/Buttonv2.component';
5
6
  const CardContext = createContext(null);
6
7
  function withCompoundCheck(Component) {
7
8
  return ({ children, className, ...rest }) => (_jsx(CardContext.Consumer, { children: (value) => {
@@ -62,18 +63,17 @@ const StyledCard = styled.div `
62
63
  }
63
64
 
64
65
  ${(props) => props.onClick && !props.disabled
65
- ? `
66
- cursor: pointer;
66
+ ? css `
67
+ cursor: pointer;
67
68
 
68
- &:hover {
69
- box-shadow: 0 0 0 2px ${props.theme.highlight};
70
- }
69
+ &:hover {
70
+ box-shadow: 0 0 0 2px ${props.theme.highlight};
71
+ }
71
72
 
72
- &:focus {
73
- outline: 2px solid ${props.theme.buttonSecondary};
74
- outline-offset: 2px;
75
- }
76
- `
73
+ &:focus {
74
+ ${FocusVisibleStyle}
75
+ }
76
+ `
77
77
  : ''};
78
78
 
79
79
  &.active {
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.component.d.ts","sourceRoot":"","sources":["../../../src/lib/components/checkbox/Checkbox.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAc,MAAM,OAAO,CAAC;AAcrE,QAAA,MAAM,QAAQ;;;;;oBAHG,YAAY,gBAAgB,CAAC,KAAK,IAAI;4FA0BtD,CAAC;AAEF,OAAO,EAAE,QAAQ,EAAE,CAAC"}
1
+ {"version":3,"file":"Checkbox.component.d.ts","sourceRoot":"","sources":["../../../src/lib/components/checkbox/Checkbox.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAc,MAAM,OAAO,CAAC;AAerE,QAAA,MAAM,QAAQ;;;;;oBAHG,YAAY,gBAAgB,CAAC,KAAK,IAAI;4FA0BtD,CAAC;AAEF,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -3,6 +3,7 @@ import { forwardRef } from 'react';
3
3
  import styled from 'styled-components';
4
4
  import { spacing, Stack } from '../../spacing';
5
5
  import { Text } from '../text/Text.component';
6
+ import { FocusVisibleStyle } from '../buttonv2/Buttonv2.component';
6
7
  const Checkbox = forwardRef(({ disabled, checked, label, value, onChange, ...rest }, ref) => {
7
8
  return (_jsx(StyledCheckbox, { checked: checked, disabled: disabled, className: "sc-checkbox", children: _jsxs(Stack, { children: [_jsx("input", { type: "checkbox", checked: checked, disabled: disabled, value: value, onChange: onChange, ref: ref, ...rest }), label && _jsx(Text, { children: label })] }) }));
8
9
  });
@@ -76,8 +77,7 @@ const StyledCheckbox = styled.label `
76
77
  }
77
78
 
78
79
  [type='checkbox']:focus-visible:enabled {
79
- outline: dashed ${spacing.r2} ${(props) => props.theme.selectedActive};
80
- outline-offset: ${spacing.r2};
80
+ ${FocusVisibleStyle}
81
81
  }
82
82
 
83
83
  /* Disabled */
@@ -1 +1 @@
1
- {"version":3,"file":"Dropdown.component.d.ts","sourceRoot":"","sources":["../../../src/lib/components/dropdown/Dropdown.component.tsx"],"names":[],"mappings":";AAcA,MAAM,MAAM,IAAI,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;CAC9B,CAAC;AACF,KAAK,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC;AACzB,KAAK,KAAK,GAAG;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,KAAK,CAAC;IACb,IAAI,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AA0EF,iBAAS,QAAQ,CAAC,EAChB,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,IAAa,EACb,OAA2B,EAC3B,KAAK,EACL,KAAY,EACZ,GAAG,IAAI,EACR,EAAE,KAAK,eAqEP;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
1
+ {"version":3,"file":"Dropdown.component.d.ts","sourceRoot":"","sources":["../../../src/lib/components/dropdown/Dropdown.component.tsx"],"names":[],"mappings":";AAgBA,MAAM,MAAM,IAAI,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;CAC9B,CAAC;AACF,KAAK,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC;AACzB,KAAK,KAAK,GAAG;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,KAAK,CAAC;IACb,IAAI,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AA6DF,iBAAS,QAAQ,CAAC,EAChB,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,IAAa,EACb,OAA2B,EAC3B,KAAK,EACL,KAAY,EACZ,GAAG,IAAI,EACR,EAAE,KAAK,eAgEP;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -1,13 +1,13 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- // @ts-nocheck
3
- import { useState, useCallback } from 'react';
4
- import styled, { css } from 'styled-components';
2
+ import styled from 'styled-components';
5
3
  import { ButtonStyled, ButtonIcon, ButtonText, } from '../button/Button.component';
6
4
  import { zIndex } from '../../style/theme';
7
5
  import { spacing } from '../../spacing';
8
6
  import { fontSize } from '../../style/theme';
9
7
  import { getThemePropSelector } from '../../utils';
10
8
  import { Icon } from '../icon/Icon.component';
9
+ import { useSelect } from 'downshift';
10
+ import { FocusVisibleStyle } from '../buttonv2/Buttonv2.component';
11
11
  const DropdownStyled = styled.div `
12
12
  position: relative;
13
13
  user-select: none;
@@ -21,36 +21,14 @@ const DropdownMenuStyled = styled.ul `
21
21
  position: absolute;
22
22
  margin: 0;
23
23
  padding: 0;
24
+ top: 50px;
24
25
  border: 1px solid ${getThemePropSelector('backgroundLevel1')};
25
26
  z-index: ${zIndex.dropdown};
26
27
  max-height: 200px;
27
28
  min-width: 100%;
28
29
  overflow: auto;
29
30
  border-bottom: 0.3px solid ${getThemePropSelector('border')};
30
- ${(props) => {
31
- if (props.size &&
32
- props.triggerSize &&
33
- props.triggerSize.x + props.size.width > window.innerWidth) {
34
- return css `
35
- right: 0;
36
- top: 100%;
37
- `;
38
- }
39
- else if (props.size &&
40
- props.triggerSize &&
41
- props.triggerSize.y + props.size.height > window.innerHeight) {
42
- return css `
43
- left: 0;
44
- bottom: ${props.triggerSize.height + 'px'};
45
- `;
46
- }
47
- else {
48
- return css `
49
- left: 0;
50
- top: 100%;
51
- `;
52
- }
53
- }};
31
+ display: ${(props) => (props.isOpen ? 'auto' : 'none')};
54
32
  `;
55
33
  const DropdownMenuItemStyled = styled.li `
56
34
  display: flex;
@@ -59,41 +37,47 @@ const DropdownMenuItemStyled = styled.li `
59
37
  white-space: nowrap;
60
38
  cursor: pointer;
61
39
  font-size: ${fontSize.base};
40
+ ${(props) => {
41
+ console.log(props.isSelected);
42
+ return props.isSelected
43
+ ? `background-color: ${props.theme.highlight};`
44
+ : `background-color: ${props.theme.backgroundLevel1};`;
45
+ }}
62
46
 
63
- ${css `
64
- background-color: ${getThemePropSelector('backgroundLevel1')};
65
- color: ${getThemePropSelector('textPrimary')};
66
- border-top: 0.3px solid ${getThemePropSelector('border')};
67
- border-left: 0.3px solid ${getThemePropSelector('border')};
68
- border-right: 0.3px solid ${getThemePropSelector('border')};
69
- &:hover {
70
- background-color: ${getThemePropSelector('highlight')};
71
- }
72
- &:active {
73
- background-color: ${getThemePropSelector('highlight')};
74
- }
75
- `};
47
+ color: ${getThemePropSelector('textPrimary')};
48
+ border-top: 0.3px solid ${getThemePropSelector('border')};
49
+ border-left: 0.3px solid ${getThemePropSelector('border')};
50
+ border-right: 0.3px solid ${getThemePropSelector('border')};
51
+
52
+ &:hover {
53
+ background-color: ${getThemePropSelector('highlight')};
54
+ }
55
+ &:active {
56
+ background-color: ${getThemePropSelector('highlight')};
57
+ }
76
58
  `;
77
59
  const Caret = styled.span `
78
60
  margin-left: ${spacing.r16};
79
61
  `;
80
- const TriggerStyled = ButtonStyled.withComponent('div');
62
+ const Trigger = ButtonStyled.withComponent('div');
63
+ const TriggerStyled = styled(Trigger) `
64
+ // :focus-visible is the keyboard-only version of :focus
65
+ &:focus-visible {
66
+ ${FocusVisibleStyle}
67
+ color: ${(props) => props.theme.textPrimary};
68
+ }
69
+ `;
81
70
  function Dropdown({ items, text, icon, size = 'base', variant = 'buttonSecondary', title, caret = true, ...rest }) {
82
- const [open, setOpen] = useState(false);
83
- const [menuSize, setMenuSize] = useState();
84
- const [triggerSize, setTriggerSize] = useState();
85
- const refMenuCallback = useCallback((node) => {
86
- if (node !== null) {
87
- setMenuSize(node.getBoundingClientRect());
88
- }
89
- }, []);
90
- const refTriggerCallback = useCallback((node) => {
91
- if (node !== null) {
92
- setTriggerSize(node.getBoundingClientRect());
93
- }
94
- }, []);
95
- return (_jsx(DropdownStyled, { active: open, variant: variant, className: "sc-dropdown", ...rest, children: _jsxs(TriggerStyled, { variant: variant, size: size, className: "trigger", onBlur: () => setOpen(!open), onFocus: () => setOpen(!open), onClick: (event) => event.stopPropagation(), tabIndex: "0", title: title, ref: refTriggerCallback, children: [icon && (_jsx(ButtonIcon, { text: text, size: size, children: icon })), text && _jsx(ButtonText, { className: "sc-trigger-text", children: text }), caret && (_jsx(Caret, { children: _jsx(Icon, { name: "Dropdown-down" }) })), open && (_jsx(DropdownMenuStyled, { className: "menu-item", postion: 'right', ref: refMenuCallback, size: menuSize, triggerSize: triggerSize, children: items.map(({ label, onClick, ...itemRest }) => {
96
- return (_jsx(DropdownMenuItemStyled, { className: "menu-item-label", onClick: onClick, variant: variant, ...itemRest, children: label }, label));
97
- }) }))] }) }));
71
+ const { isOpen, getToggleButtonProps, getMenuProps, getItemProps, highlightedIndex, } = useSelect({
72
+ items,
73
+ itemToString: (item) => (item === null || item === void 0 ? void 0 : item.label) || '',
74
+ });
75
+ return (_jsx(DropdownStyled, { active: open, variant: variant, className: "sc-dropdown", ...rest, children: _jsxs(TriggerStyled, { variant: variant, size: size, className: "trigger", title: title, ...getToggleButtonProps(), children: [icon && (_jsx(ButtonIcon, { text: text, size: size, children: icon })), text && _jsx(ButtonText, { className: "sc-trigger-text", children: text }), caret && (_jsx(Caret, { children: _jsx(Icon, { name: "Dropdown-down" }) })), _jsx(DropdownMenuStyled, { className: "menu-item", isOpen: isOpen, ...getMenuProps(), children: items.map((item, index) => {
76
+ return (_jsx(DropdownMenuItemStyled, { className: "menu-item-label", variant: item.variant, ...item, ...getItemProps({
77
+ item,
78
+ index,
79
+ onClick: item.onClick,
80
+ }), isSelected: index === highlightedIndex, children: item.label }, item.label));
81
+ }) })] }) }));
98
82
  }
99
83
  export { Dropdown };
@@ -0,0 +1,17 @@
1
+ /// <reference types="react" />
2
+ import { InputProps } from '../inputv2/inputv2';
3
+ import { UseMutationResult } from 'react-query';
4
+ type InlineInputForm = {
5
+ value: string;
6
+ };
7
+ type InlineInputProps = {
8
+ defaultValue?: string;
9
+ confirmationModal?: {
10
+ title: JSX.Element;
11
+ body: JSX.Element;
12
+ };
13
+ changeMutation: UseMutationResult<unknown, unknown, InlineInputForm, unknown>;
14
+ } & InputProps;
15
+ export declare const InlineInput: ({ defaultValue, confirmationModal, changeMutation, ...props }: InlineInputProps) => JSX.Element;
16
+ export {};
17
+ //# sourceMappingURL=InlineInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InlineInput.d.ts","sourceRoot":"","sources":["../../../src/lib/components/inlineinput/InlineInput.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAS,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAIvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAWhD,KAAK,eAAe,GAAG;IACrB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AACF,KAAK,gBAAgB,GAAG;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE;QAClB,KAAK,EAAE,GAAG,CAAC,OAAO,CAAC;QACnB,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC;KACnB,CAAC;IACF,cAAc,EAAE,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,OAAO,CAAC,CAAC;CAC/E,GAAG,UAAU,CAAC;AAEf,eAAO,MAAM,WAAW,kEAKrB,gBAAgB,gBA+IlB,CAAC"}
@@ -0,0 +1,85 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import styled from 'styled-components';
3
+ import { Button } from '../buttonv2/Buttonv2.component';
4
+ import { Icon } from '../icon/Icon.component';
5
+ import { Input } from '../inputv2/inputv2';
6
+ import { Modal } from '../modal/Modal.component';
7
+ import { useToast } from '../toast/ToastProvider';
8
+ import { useForm } from 'react-hook-form';
9
+ import { Text } from '../text/Text.component';
10
+ import { useState } from 'react';
11
+ import { Stack, Wrap } from '../../spacing';
12
+ const UnderlinedText = styled(Text) `
13
+ text-decoration-line: underline;
14
+ text-decoration-style: dashed;
15
+ cursor: text;
16
+ `;
17
+ export const InlineInput = ({ defaultValue, confirmationModal, changeMutation, ...props }) => {
18
+ const { register, handleSubmit, watch, reset } = useForm({
19
+ defaultValues: {
20
+ value: defaultValue,
21
+ },
22
+ });
23
+ const [isConfirmationModalOpened, setIsConfirmationModalOpened] = useState(false);
24
+ const handleSuccess = () => {
25
+ setIsConfirmationModalOpened(false);
26
+ setIsEditing(false);
27
+ setIsHover(false);
28
+ };
29
+ const onSubmit = (data) => {
30
+ if (confirmationModal) {
31
+ setIsConfirmationModalOpened(true);
32
+ }
33
+ else {
34
+ changeMutation.mutate(data, {
35
+ onSuccess: () => {
36
+ handleSuccess();
37
+ },
38
+ onError: () => {
39
+ showToast({
40
+ open: true,
41
+ status: 'error',
42
+ message: 'An error occurred while updating the value',
43
+ });
44
+ },
45
+ });
46
+ }
47
+ };
48
+ const { showToast } = useToast();
49
+ const [isHover, setIsHover] = useState(false);
50
+ const [isEditing, setIsEditing] = useState(false);
51
+ const handleReset = () => {
52
+ reset();
53
+ setIsEditing(false);
54
+ setIsHover(false);
55
+ };
56
+ //handle esc key to cancel editing
57
+ const handleKeyDown = (event) => {
58
+ if (event.key === 'Escape') {
59
+ handleReset();
60
+ }
61
+ };
62
+ if (isEditing) {
63
+ return (_jsxs(_Fragment, { children: [_jsx("form", { onSubmit: handleSubmit(onSubmit), children: _jsxs(Stack, { children: [_jsx(Input, { ...register('value'), size: "1/3", autoFocus: true, onKeyDown: handleKeyDown, ...props }), _jsx(Button, { icon: _jsx(Icon, { name: "Close" }), tooltip: {
64
+ overlay: 'Cancel',
65
+ }, type: "reset", variant: "outline", onClick: handleReset }), _jsx(Button, { icon: _jsx(Icon, { name: "Check" }), tooltip: {
66
+ overlay: 'Save',
67
+ }, variant: "primary", type: "submit", isLoading: changeMutation.isLoading })] }) }), confirmationModal && (_jsx(Modal, { isOpen: isConfirmationModalOpened, title: confirmationModal.title, footer: _jsxs(Wrap, { children: [_jsx("p", {}), _jsxs(Stack, { children: [_jsx(Button, { label: "Cancel", variant: "outline", onClick: () => setIsConfirmationModalOpened(false) }), _jsx(Button, { label: "Confirm", variant: "primary", isLoading: changeMutation.isLoading, onClick: () => {
68
+ changeMutation.mutate(watch(), {
69
+ onSuccess: () => {
70
+ handleSuccess();
71
+ },
72
+ onError: () => {
73
+ showToast({
74
+ open: true,
75
+ status: 'error',
76
+ message: 'An error occurred while updating the value',
77
+ });
78
+ },
79
+ });
80
+ } })] })] }), children: confirmationModal.body }))] }));
81
+ }
82
+ return (_jsxs(Stack, { onMouseEnter: () => setIsHover(true), onMouseLeave: () => setIsHover(false), onFocus: () => setIsHover(true), onBlur: () => setIsHover(false), children: [_jsx(UnderlinedText, { children: watch('value') }), _jsx(Button, { icon: _jsx(Icon, { name: "Pencil" }), tooltip: {
83
+ overlay: 'Edit',
84
+ }, variant: "primary", onClick: () => setIsEditing(true), style: { opacity: !isHover ? '0' : '1' } })] }));
85
+ };
@@ -1,6 +1,14 @@
1
1
  import { InputHTMLAttributes } from 'react';
2
+ import { IconName } from '../icon/Icon.component';
2
3
  export declare const convertSizeToRem: (size?: '1' | '2/3' | '1/2' | '1/3') => "14rem" | "6rem" | "10rem" | "20.5rem";
3
4
  type InputSize = '1' | '2/3' | '1/2' | '1/3';
5
+ export type InputProps = {
6
+ error?: string;
7
+ id: string;
8
+ leftIcon?: IconName;
9
+ rightIcon?: IconName;
10
+ size?: InputSize;
11
+ } & Omit<InputHTMLAttributes<HTMLInputElement>, 'size'>;
4
12
  export declare const Input: import("react").ForwardRefExoticComponent<{
5
13
  error?: string | undefined;
6
14
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"inputv2.d.ts","sourceRoot":"","sources":["../../../src/lib/components/inputv2/inputv2.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAQxD,eAAO,MAAM,gBAAgB,UAAW,GAAG,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,2CAKlE,CAAC;AA4EF,KAAK,SAAS,GAAG,GAAG,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;AAU7C,eAAO,MAAM,KAAK;;QANZ,MAAM;;;;0GA6DX,CAAC"}
1
+ {"version":3,"file":"inputv2.d.ts","sourceRoot":"","sources":["../../../src/lib/components/inputv2/inputv2.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAMxD,OAAO,EAAQ,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAExD,eAAO,MAAM,gBAAgB,UAAW,GAAG,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,2CAKlE,CAAC;AA4EF,KAAK,SAAS,GAAG,GAAG,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;AAE7C,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,SAAS,CAAC,EAAE,QAAQ,CAAC;IACrB,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB,GAAG,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC,CAAC;AAExD,eAAO,MAAM,KAAK;;QANZ,MAAM;;;;0GA6DX,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.component.d.ts","sourceRoot":"","sources":["../../../src/lib/components/modal/Modal.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA2B,MAAM,OAAO,CAAC;AAU3D,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;IACnB,KAAK,EAAE,SAAS,CAAC;IACjB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,IAAI,CAAC,EAAE,QAAQ,GAAG,aAAa,CAAC;CACjC,CAAC;AA0CF,QAAA,MAAM,KAAK,wEASR,KAAK,uCAiDP,CAAC;AAEF,OAAO,EAAE,KAAK,EAAE,CAAC"}
1
+ {"version":3,"file":"Modal.component.d.ts","sourceRoot":"","sources":["../../../src/lib/components/modal/Modal.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAsC,MAAM,OAAO,CAAC;AAUtE,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;IACnB,KAAK,EAAE,SAAS,CAAC;IACjB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,IAAI,CAAC,EAAE,QAAQ,GAAG,aAAa,CAAC;CACjC,CAAC;AA0CF,QAAA,MAAM,KAAK,wEASR,KAAK,uCAmEP,CAAC;AAEF,OAAO,EAAE,KAAK,EAAE,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useLayoutEffect, useRef } from 'react';
2
+ import { useEffect, useLayoutEffect, useRef } from 'react';
3
3
  import ReactDom from 'react-dom';
4
4
  import styled from 'styled-components';
5
5
  import { Wrap, spacing } from '../../spacing';
@@ -55,6 +55,23 @@ const Modal = ({ isOpen, close, title, children, footer, subTitle, role = 'dialo
55
55
  document.body && document.body.removeChild(modalContainer.current);
56
56
  };
57
57
  }, [modalContainer]);
58
+ useEffect(() => {
59
+ if (isOpen) {
60
+ //Auto focus the modal when it opens
61
+ modalContainer.current.setAttribute('tabindex', '0');
62
+ modalContainer.current.focus();
63
+ //Listen to esc key to close the modal
64
+ const handleEsc = (event) => {
65
+ if (event.key === 'Escape') {
66
+ close && close();
67
+ }
68
+ };
69
+ document.addEventListener('keydown', handleEsc);
70
+ return () => {
71
+ document.removeEventListener('keydown', handleEsc);
72
+ };
73
+ }
74
+ }, [isOpen]);
58
75
  return isOpen
59
76
  ? ReactDom.createPortal(_jsx(ModalContainer, { className: "sc-modal", role: role, "aria-modal": "true", "aria-labelledby": "dialog_label", "aria-describedby": "dialog_desc", ...rest, children: _jsxs(ModalContent, { className: "sc-modal-content", children: [_jsx(ModalHeader, { className: "sc-modal-header", children: _jsxs(Wrap, { style: { flex: 1 }, children: [_jsx(Text, { variant: "Larger", id: "dialog_label", children: title }), close ? (_jsx(Button, { icon: _jsx(Icon, { name: "Close" }), onClick: close, tooltip: {
60
77
  overlay: 'Close modal',
@@ -10,6 +10,7 @@ type Tab = {
10
10
  selected?: boolean;
11
11
  onClick?: (arg0: any) => void;
12
12
  link?: JSX.Element;
13
+ render?: JSX.Element;
13
14
  };
14
15
  export type Props = {
15
16
  onToggleClick?: () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"Navbar.component.d.ts","sourceRoot":"","sources":["../../../src/lib/components/navbar/Navbar.component.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAY,IAAI,EAAE,MAAM,gCAAgC,CAAC;AAEhE,KAAK,MAAM,GAAG;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;CACrB,CAAC;AACF,KAAK,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;AAC7B,KAAK,GAAG,GAAG;IACT,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IAC9B,IAAI,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;CACpB,CAAC;AACF,MAAM,MAAM,KAAK,GAAG;IAClB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,YAAY,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;CACnB,CAAC;AAoJF,iBAAS,MAAM,CAAC,EACd,aAAa,EACb,IAAI,EACJ,IAAS,EACT,YAAiB,EACjB,GAAG,IAAI,EACR,EAAE,KAAK,eAwDP;AAED,eAAO,MAAM,MAAM,eAAS,CAAC"}
1
+ {"version":3,"file":"Navbar.component.d.ts","sourceRoot":"","sources":["../../../src/lib/components/navbar/Navbar.component.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAY,IAAI,EAAE,MAAM,gCAAgC,CAAC;AAGhE,KAAK,MAAM,GAAG;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;CACrB,CAAC;AACF,KAAK,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;AAC7B,KAAK,GAAG,GAAG;IACT,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IAC9B,IAAI,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;CACtB,CAAC;AACF,MAAM,MAAM,KAAK,GAAG;IAClB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,YAAY,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;CACnB,CAAC;AA2JF,iBAAS,MAAM,CAAC,EACd,aAAa,EACb,IAAI,EACJ,IAAS,EACT,YAAiB,EACjB,GAAG,IAAI,EACR,EAAE,KAAK,eAwDP;AAED,eAAO,MAAM,MAAM,eAAS,CAAC"}