@linzjs/windows 9.5.5 → 10.0.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.
package/README.md CHANGED
@@ -579,7 +579,7 @@ export const TestShowPanelWithGlobalModal = () => (
579
579
 
580
580
  A toolbar ribbon with buttons, sliders, menus, and separators. Supports horizontal and vertical orientations.
581
581
 
582
- ![ribbon-slider.png](https://github.com/matsondawson/windows-doc-images/raw/HEAD/docimages/ribbon-slider.png)![img.png]()
582
+ ![ribbon-slider.png](https://github.com/matsondawson/windows-doc-images/raw/HEAD/docimages/ribbon-slider.png)
583
583
  ![ribbon-panel.png](https://github.com/matsondawson/windows-doc-images/raw/HEAD/docimages/ribbon-panel.png)
584
584
  ![ribbon-menu.png](https://github.com/matsondawson/windows-doc-images/raw/HEAD/docimages/ribbon-menu.png)
585
585
  **Setup** — requires both `LuiModalAsyncContextProvider` and `PanelsContextProvider`:
@@ -1,44 +1,68 @@
1
- @use "@linzjs/lui/dist/scss/Core" as lui;
1
+ @use "@linzjs/lui/dist/scss/Foundation/Variables/ColorVars" as colors;
2
+ @use "@linzjs/lui/dist/scss/Foundation/Utilities/BoxShadow" as shadow;
3
+ @use "@linzjs/lui/dist/scss/Foundation/Variables/SpacingVars" as spacing;
4
+ @use "@linzjs/lui/dist/scss/Foundation/Variables/FormVars" as form;
5
+ @use "@linzjs/lui/dist/scss/Foundation/Variables/FontVars" as fonts;
6
+ @use "@linzjs/lui/dist/scss/Foundation/Utilities/REM" as rem;
7
+
8
+ dialog.LuiModalAsync, div.LuiModalAsync {
9
+ @include fonts.font-regular();
10
+ font-size: fonts.$base-font-size;
11
+ line-height: fonts.$base-line-height;
12
+ color: colors.$base-type-color;
13
+
14
+ .LuiModalAsync-header {
15
+ h4 {
16
+ @include fonts.font-regular();
17
+ font-size: rem.toRem(22px);
18
+ line-height: 1.5;
19
+ margin-bottom: 0;
20
+ color: colors.$heading-color;
21
+ }
22
+ }
23
+ }
2
24
 
3
25
  dialog.LuiModalAsync::backdrop {
4
26
  background: rgb(0 0 0 / 10%);
5
27
  }
6
28
 
7
29
  dialog.LuiModalAsync, div.LuiModalAsync {
8
- @include lui.drop-shadow(sm);
30
+ box-sizing: border-box;
31
+
32
+ @include shadow.drop-shadow(sm);
9
33
  border: none;
10
34
  display: flex;
11
35
  flex-direction: column;
12
36
  border-radius: 9px;
13
- padding: lui.$unit-md;
37
+ padding: spacing.$unit-md;
14
38
  min-width: 400px;
15
39
  max-width: 80vw;
16
40
  max-height: 80vh;
17
- gap: lui.$unit-md;
41
+ gap: spacing.$unit-md;
18
42
 
19
43
  &:focus-visible {
20
44
  outline: none;
21
45
  }
22
46
 
23
47
  .LuiModalAsync-header-icon {
24
- fill: lui.$info;
48
+ fill: colors.$info;
25
49
  }
26
50
 
27
51
  .LuiModalAsync-help-icon * {
28
- fill: lui.$gray;
52
+ fill: colors.$gray;
29
53
  }
30
54
 
31
55
  &.LuiModalPrefab-success {
32
56
  .LuiModalAsync-header .LuiModalAsync-header-icon {
33
- fill: lui.$success;
57
+ fill: colors.$success;
34
58
  }
35
59
 
36
- border-left: lui.$unit-xs solid lui.$success;
60
+ border-left: spacing.$unit-xs solid colors.$success;
37
61
  }
38
62
 
39
63
  &.LuiModalPrefab-info {
40
64
  .LuiModalAsync-header .LuiModalAsync-header-icon {
41
- fill: lui.$info;
65
+ fill: colors.$info;
42
66
  }
43
67
 
44
68
  border-left: 0;
@@ -46,23 +70,23 @@ dialog.LuiModalAsync, div.LuiModalAsync {
46
70
 
47
71
  &.LuiModalPrefab-warning {
48
72
  .LuiModalAsync-header .LuiModalAsync-header-icon {
49
- fill: lui.$warning;
73
+ fill: colors.$warning;
50
74
  }
51
75
 
52
- border-left: lui.$unit-xs solid lui.$warning;
76
+ border-left: spacing.$unit-xs solid colors.$warning;
53
77
  }
54
78
 
55
79
  &.LuiModalPrefab-error {
56
80
  .LuiModalAsync-header .LuiModalAsync-header-icon {
57
- fill: lui.$error;
81
+ fill: colors.$error;
58
82
  }
59
83
 
60
- border-left: lui.$unit-sm solid lui.$error;
84
+ border-left: spacing.$unit-sm solid colors.$error;
61
85
  }
62
86
 
63
87
  &.LuiModalPrefab-blocked {
64
88
  .LuiModalAsync-header .LuiModalAsync-header-icon {
65
- fill: lui.$fuscous;
89
+ fill: colors.$fuscous;
66
90
  }
67
91
 
68
92
  border-left: 0;
@@ -87,14 +111,14 @@ dialog.LuiModalAsync, div.LuiModalAsync {
87
111
 
88
112
  .LuiModalAsync-header {
89
113
  display: flex;
90
- gap: lui.$unit-xs;
114
+ gap: spacing.$unit-xs;
91
115
 
92
116
  flex-direction: row;
93
117
  align-items: center;
94
118
 
95
119
  h4 {
96
120
  flex: 1;
97
- color: lui.$charcoal;
121
+ color: colors.$charcoal;
98
122
  }
99
123
  }
100
124
 
@@ -102,7 +126,7 @@ dialog.LuiModalAsync, div.LuiModalAsync {
102
126
  display: flex;
103
127
  flex-direction: column;
104
128
  flex: 1 1 auto;
105
- gap: lui.$unit-rg;
129
+ gap: spacing.$unit-rg;
106
130
  overflow: hidden;
107
131
  }
108
132
 
@@ -114,15 +138,15 @@ dialog.LuiModalAsync, div.LuiModalAsync {
114
138
 
115
139
  .lui-button:focus {
116
140
  // Button focus not showing unless window content has focus
117
- outline: lui.$input-border-width solid lui.$input-focus;
141
+ outline: form.$input-border-width-thick solid colors.$input-focus;
118
142
  }
119
143
  }
120
144
 
121
145
  dialog.LuiModalPrefab-file {
122
- gap: lui.$unit-sm;
123
- padding: lui.$unit-md;
146
+ gap: spacing.$unit-sm;
147
+ padding: spacing.$unit-md;
124
148
 
125
149
  .LuiModalAsync-content {
126
- padding-bottom: lui.$unit-xs;
150
+ padding-bottom: spacing.$unit-xs;
127
151
  }
128
152
  }
@@ -1,6 +1,4 @@
1
- import './LuiModalAsync.scss';
2
- import '@linzjs/lui/dist/scss/base.scss';
3
- import '@linzjs/lui/dist/fonts';
1
+ import '../index.scss';
4
2
 
5
3
  import clsx from 'clsx';
6
4
  import { delay } from 'lodash-es';
@@ -18,8 +18,8 @@ import {
18
18
  ShowModalProps,
19
19
  } from './LuiModalAsyncContext';
20
20
  import { LuiModalAsyncInstanceContext } from './LuiModalAsyncInstanceContext';
21
- import { v4 } from 'uuid';
22
21
  import { useInterval } from '../common/useInterval';
22
+ import { v4 } from '../common/uuid';
23
23
 
24
24
  export interface LuiModalAsyncInstance {
25
25
  uuid: string;
@@ -1,4 +1,4 @@
1
- import './LuiModalAsync.scss';
1
+ import '../index.scss';
2
2
 
3
3
  import { LuiButton, LuiIcon } from '@linzjs/lui';
4
4
  import { LuiIconName } from '@linzjs/lui/dist/assets/svg-content';
@@ -13,6 +13,7 @@ export interface LuiModalAsyncHeaderProps {
13
13
  closeButton?: true;
14
14
  helpLink?: string;
15
15
  onHelpClick?: () => void;
16
+ // @Deprecated This has no effect. Don't use it
16
17
  helpButtonLevel?: 'text' | 'plain-text' | 'primary' | 'secondary' | 'tertiary' | 'success' | 'error';
17
18
  }
18
19
 
@@ -1,10 +1,12 @@
1
- @use "@linzjs/lui/dist/scss/Core" as lui;
1
+ @use "@linzjs/lui/dist/scss/Foundation/Variables/ColorVars" as lui;
2
2
 
3
3
  .CopyToClipboard {
4
4
  cursor: pointer;
5
5
  }
6
6
 
7
7
  .windows_tooltip {
8
+ box-sizing: border-box;
9
+
8
10
  position: relative;
9
11
  cursor: pointer;
10
12
 
@@ -1,4 +1,4 @@
1
- import './CopyableText.scss';
1
+ import '../index.scss';
2
2
 
3
3
  import clsx from 'clsx';
4
4
  import { CSSProperties, ReactElement, useEffect, useRef, useState } from 'react';
@@ -0,0 +1,30 @@
1
+ @use './panel/PanelBlue';
2
+ @use './panel/Panel';
3
+ @use './ribbon/RibbonMenu';
4
+ @use './ribbon/stories/RibbonDemo';
5
+ @use './ribbon/Ribbon';
6
+ @use './components/CopyableText';
7
+ @use './LuiModalAsync/LuiModalAsync';
8
+
9
+ @use '@linzjs/lui/dist/scss/Elements/Buttons/buttons-linz';
10
+ @use '@linzjs/lui/dist/scss/Elements/Buttons/buttons';
11
+ @use '@linzjs/lui/dist/scss/Elements/Icons/icons';
12
+ @use '@linzjs/lui/dist/scss/Elements/Tooltips/tippy';
13
+ @use '@linzjs/lui/dist/scss/Components/LuiFormElements/LuiCheckboxInput/LuiCheckboxInput';
14
+ @use '@linzjs/lui/dist/scss/Components/LuiTabs/LuiTabs';
15
+ @use '@linzjs/lui/dist/scss/Components/LuiIcon/LuiIcons';
16
+ @use '@linzjs/lui/dist/scss/Components/Spinner/spinner';
17
+ @use '@linzjs/lui/dist/scss/Components/LuiLoadingSpinner/LuiLoadingSpinner';
18
+ @use '@linzjs/lui/dist/scss/Components/LuiFormElements/LuiFileInputBox';
19
+ @use '@linzjs/lui/dist/scss/Foundation/Utilities/BoxShadow';
20
+
21
+ .LuiCheckboxInput.LuiCheckboxInput--nomargin {
22
+ margin-bottom: 0;
23
+ }
24
+
25
+ // set universal box sizing, plus the declaration in the HTML above
26
+ *,
27
+ *:before,
28
+ *:after {
29
+ box-sizing: inherit;
30
+ }
@@ -1,4 +1,16 @@
1
- @use "@linzjs/lui/dist/scss/Core" as lui;
1
+ @use "@linzjs/lui/dist/scss/Foundation/Variables/ColorVars" as colors;
2
+ @use "@linzjs/lui/dist/scss/Foundation/Variables/FontVars" as fonts;
3
+
4
+ .WindowPanel, .PopoutWindowContainer {
5
+ @include fonts.font-regular();
6
+ font-size: fonts.$base-font-size;
7
+ line-height: fonts.$base-line-height;
8
+ color: colors.$base-type-color;
9
+ }
10
+
11
+ .LuiCheckboxInput--nomargin {
12
+ margin: 0;
13
+ }
2
14
 
3
15
  .panelDock > .panelDock-content:not(:empty) + .panelDock-empty {
4
16
  display: none;
@@ -15,13 +27,13 @@
15
27
  height: 48px;
16
28
  line-height: 48px;
17
29
  user-select: none;
18
- color: lui.$charcoal;
30
+ color: colors.$charcoal;
19
31
  padding: 0 16px;
20
32
  display: flex;
21
33
  white-space: nowrap;
22
34
  overflow: hidden;
23
35
  justify-content: space-between;
24
- border-bottom: 2px lui.$lily solid;
36
+ border-bottom: 2px colors.$lily solid;
25
37
  font-size: 1em;
26
38
  font-weight: 600;
27
39
  flex-direction: row;
@@ -59,6 +71,8 @@
59
71
  }
60
72
 
61
73
  .WindowPanel {
74
+ box-sizing: border-box;
75
+
62
76
  box-shadow: 0 1px 6px 0 #00000026, 0 6px 10px 0 #00000040;
63
77
  background-color: #fff;
64
78
  display: flex;
@@ -71,8 +85,8 @@
71
85
  }
72
86
 
73
87
  %WindowPanel-divider {
74
- border-left: 2px solid lui.$lily;
75
- background-color: lui.$lily;
88
+ border-left: 2px solid colors.$lily;
89
+ background-color: colors.$lily;
76
90
  width: 0;
77
91
  height: 19px;
78
92
  }
@@ -113,7 +127,7 @@
113
127
  }
114
128
 
115
129
  .WindowPanel-header-title-icon {
116
- fill: lui.$fuscous !important;
130
+ fill: colors.$fuscous !important;
117
131
  margin-right: 8px;
118
132
  }
119
133
 
@@ -1,6 +1,4 @@
1
- import './Panel.scss';
2
- import './PanelBlue.scss';
3
- import '@linzjs/lui/dist/scss/base.scss';
1
+ import '../index.scss';
4
2
 
5
3
  import clsx from 'clsx';
6
4
  import { isEqual, pick } from 'lodash-es';
@@ -1,4 +1,4 @@
1
- @use "@linzjs/lui/dist/scss/Core" as lui;
1
+ @use "@linzjs/lui/dist/scss/Foundation/Variables/ColorVars" as lui;
2
2
 
3
3
  .WindowPanel-blue.WindowPanel-header, .WindowPanel-blue .WindowPanel-header {
4
4
  background: linear-gradient(270deg,#007198,#00425b 100%);
@@ -58,7 +58,7 @@ export const openExternalWindow = ({
58
58
  }
59
59
  // Create a new HTML element to hang our rendering off
60
60
  const newMountElement = externalWindow.document.createElement('div');
61
- newMountElement.className = `PopoutWindowContainer ${className}`;
61
+ newMountElement.className = `PopoutWindowContainer ${className || ''}`;
62
62
  setContainerElement(newMountElement);
63
63
  externalWindow.document.body.appendChild(newMountElement);
64
64
 
@@ -1,6 +1,12 @@
1
- @use "@linzjs/lui/dist/scss/Core" as lui;
1
+ @use "@linzjs/lui/dist/scss/Foundation/Variables/ColorVars" as lui;
2
2
 
3
3
  .RibbonButton {
4
+ box-sizing: border-box;
5
+
6
+ img {
7
+ max-width: 100%;
8
+ }
9
+
4
10
  position: relative;
5
11
  background-color: transparent;
6
12
  padding: 4px;
@@ -1,4 +1,4 @@
1
- import './Ribbon.scss';
1
+ import '../index.scss';
2
2
 
3
3
  import { LuiIcon, LuiMiniSpinner } from '@linzjs/lui';
4
4
  import { IconName } from '@linzjs/lui/dist/components/LuiIcon/LuiIcon';
@@ -1,4 +1,4 @@
1
- import './Ribbon.scss';
1
+ import '../index.scss';
2
2
 
3
3
  import { forwardRef } from 'react';
4
4
 
@@ -1,4 +1,4 @@
1
- import './Ribbon.scss';
1
+ import '../index.scss';
2
2
 
3
3
  import clsx from 'clsx';
4
4
  import { forwardRef, useContext } from 'react';
@@ -1,4 +1,4 @@
1
- import './Ribbon.scss';
1
+ import '../index.scss';
2
2
 
3
3
  import { CSSProperties, PropsWithChildren } from 'react';
4
4
 
@@ -1,4 +1,4 @@
1
- @use "@linzjs/lui/dist/scss/Core" as lui;
1
+ @use "@linzjs/lui/dist/scss/Foundation/Variables/ColorVars" as lui;
2
2
 
3
3
  .RibbonMenuSeparator {
4
4
  height: 1px;
@@ -1,4 +1,4 @@
1
- import './RibbonMenu.scss';
1
+ import '../index.scss';
2
2
 
3
3
  import { LuiIcon } from '@linzjs/lui';
4
4
  import { IconName } from '@linzjs/lui/dist/components/LuiIcon/LuiIcon';
@@ -1,4 +1,4 @@
1
- import './Ribbon.scss';
1
+ import '../index.scss';
2
2
 
3
3
  export const RibbonMenuSeparator = () => {
4
4
  return <div className="RibbonMenuSeparator" />;
@@ -1,3 +1,3 @@
1
- import './Ribbon.scss';
1
+ import '../index.scss';
2
2
 
3
3
  export const RibbonSeparator = () => <div className="RibbonButton-separator">&nbsp;</div>;
@@ -1,4 +1,4 @@
1
- import './Ribbon.scss';
1
+ import '../index.scss';
2
2
 
3
3
  import clsx from 'clsx';
4
4
  import { PropsWithChildren, ReactElement, useState } from 'react';
@@ -0,0 +1,30 @@
1
+ @use "@linzjs/lui/dist/scss/Foundation/Variables/ColorVars" as lui;
2
+
3
+ .RibbonDemoContent {
4
+ padding: 20px 24px 24px 16px;
5
+ gap: 12px;
6
+ }
7
+
8
+ .RibbonDemoSwitch {
9
+ display: flex;
10
+ flex-direction: row;
11
+ gap: 12px;
12
+ align-items: start;
13
+ padding: 12px 0 0;
14
+
15
+ div:first-child {
16
+ display: flex;
17
+ }
18
+ }
19
+
20
+ .RibbonDemoSwitch-textHeader {
21
+ line-height: 20px;
22
+ font-weight: 600;
23
+ font-size: 16px;
24
+ }
25
+
26
+ .RibbonDemoSwitch-textDescription {
27
+ font-weight: 400;
28
+ font-size: 14px;
29
+ color: lui.$fuscous;
30
+ }
package/package.json CHANGED
@@ -13,7 +13,7 @@
13
13
  "popout"
14
14
  ],
15
15
  "main": "./dist/index.ts",
16
- "version": "9.5.5",
16
+ "version": "10.0.0",
17
17
  "peerDependencies": {
18
18
  "@linzjs/lui": ">=23",
19
19
  "react": ">=18",