@linzjs/lui 21.34.1-2 → 21.35.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.
@@ -51,7 +51,6 @@
51
51
  @forward './Components/MenuV2/menu-v2.scss';
52
52
  @forward './Components/Messaging/messaging.scss';
53
53
  @forward './Components/Modal/modal.scss';
54
- @forward './Components/Modal/modal-v2.scss';
55
54
  @forward './Components/LuiUpdateSplashModal/splashModal.scss';
56
55
  @forward './Components/NavDrawer/nav-drawer.scss';
57
56
  @forward './Components/Notifications/notifications.scss';
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "21.34.1-2",
2
+ "version": "21.35.0",
3
3
  "license": "MIT",
4
4
  "repository": {
5
5
  "type": "git",
@@ -1,7 +0,0 @@
1
- import { FC, PropsWithChildren } from 'react';
2
- import { LuiModalV2Props } from './LuiModalV2';
3
- export declare type LuiAlertModalLevel = 'success' | 'info' | 'warning' | 'error';
4
- export declare type LuiAlertModalV2Props = Omit<LuiModalV2Props, 'headingIcon'> & {
5
- level: LuiAlertModalLevel;
6
- };
7
- export declare const LuiAlertModalV2: FC<PropsWithChildren<LuiAlertModalV2Props>>;
@@ -1,30 +0,0 @@
1
- import { FC, PropsWithChildren, ReactNode } from 'react';
2
- import { LuiIconProps } from '../LuiIcon/LuiIcon';
3
- export declare type LuiModalV2Props = {
4
- key?: string;
5
- /** Default `true` */
6
- shouldCloseOnOverlayClick?: boolean;
7
- /** Default `true` */
8
- shouldCloseOnEsc?: boolean | 'use-keyup';
9
- onClose?: () => void | Promise<void>;
10
- showCloseButton?: boolean;
11
- className?: string;
12
- /** If set to true, the modal will take the full screen width. Default `false` */
13
- maxWidth?: boolean;
14
- headingText?: ReactNode;
15
- headingIcon?: LuiIconProps;
16
- helpLink?: string | (() => void | Promise<void>);
17
- isLoading?: boolean;
18
- /** Sets the overlay to white. This is only to be used for situations when the user is working in a component and there is benefit to hiding the surrounding page. An example is editing types of instruments in the Dealings flow in LOL. */
19
- lowContrast?: boolean;
20
- /** By default, the modal autofocuses the first `input` or `button` inside it. Set this prop to `true` to disable that behaviour. Default `false`. */
21
- preventAutoFocus?: boolean;
22
- /** By default, the modal portal will be appended to the document's body, but we might need to append it to another element. This is passed the React Modal `parentSelector` prop. */
23
- appendToElement?: () => HTMLElement;
24
- };
25
- export declare const LuiModalV2: FC<PropsWithChildren<LuiModalV2Props>>;
26
- export declare const LuiModalV2Buttons: FC<PropsWithChildren<unknown>>;
27
- /** Allows injecting the modal header text */
28
- export declare const LuiModalV2HeadingText: FC<{
29
- children?: ReactNode;
30
- }>;
@@ -1,122 +0,0 @@
1
- @use '../../Foundation/Variables/ColorVars.scss' as colors;
2
- @use '../../Foundation/Variables/FontVars.scss' as fonts;
3
- @use '../../Foundation/Variables/SpacingVars.scss' as spacing;
4
- @use '../../Foundation/Utilities' as *;
5
-
6
- .lui-modal-v2 {
7
- position: relative;
8
- max-height: 90vh;
9
- min-width: 288px;
10
- overflow: auto;
11
-
12
- border-left: 0px solid transparent;
13
- @include border-radius();
14
- padding: spacing.$unit-md;
15
-
16
- background: colors.$white;
17
-
18
- display: grid;
19
- grid-template-columns: min-content 1fr min-content min-content;
20
- grid-template-rows: min-content 1fr;
21
-
22
- &:not(.lui-max-width) {
23
- width: 480px;
24
- }
25
-
26
- &-success,
27
- &-info,
28
- &-warning,
29
- &-error {
30
- border-width: spacing.$unit-xs;
31
- padding-left: spacing.$unit-rg;
32
- }
33
-
34
- &-success {
35
- border-color: colors.$success;
36
- }
37
-
38
- &-info {
39
- border-color: colors.$info;
40
- }
41
-
42
- &-warning {
43
- border-color: colors.$warning;
44
- }
45
-
46
- &-error {
47
- border-color: colors.$error;
48
- }
49
-
50
- .lui-modal-v2-btn-row {
51
- margin-top: spacing.$unit-md;
52
- display: flex;
53
- > button {
54
- flex-grow: 1;
55
- flex-basis: 0;
56
- }
57
- }
58
-
59
- &-header {
60
- grid-column: 1 / -1;
61
- grid-row: 1;
62
- display: grid;
63
- grid-template-columns: subgrid;
64
- grid-auto-flow: column;
65
- align-items: start;
66
- padding-bottom: spacing.$unit-rg;
67
-
68
- &:not(:has(:first-child)) {
69
- display: none;
70
- }
71
-
72
- &-spinner,
73
- &-icon {
74
- grid-column: 1;
75
- margin-right: spacing.$unit-xs;
76
- margin-top: spacing.$unit-xxs;
77
- display: inline-flex;
78
- fill: colors.$gray;
79
- }
80
-
81
- &-title {
82
- color: inherit;
83
- grid-column: 2;
84
- font-size: 1.25rem;
85
- font-weight: 400;
86
- margin: 0;
87
- padding: 0;
88
- }
89
-
90
- &-buttons {
91
- display: contents;
92
- margin-left: spacing.$unit-xs;
93
-
94
- > button {
95
- fill: colors.$gray;
96
- background-color: transparent;
97
- padding: spacing.$unit-xs;
98
- margin-top: -1 * spacing.$unit-xxs;
99
- margin-bottom: -1 * spacing.$unit-xs;
100
- display: inline-flex;
101
- align-items: center;
102
- }
103
- }
104
-
105
- &-help-btn {
106
- grid-column: 3;
107
- }
108
-
109
- &-close-btn {
110
- grid-column: 4;
111
- }
112
- }
113
-
114
- &-contents {
115
- grid-column: 1 / -1;
116
-
117
- > p {
118
- // this is a bit of a hacky "reset" due to 1) our <p>s having a very opinionated margin-top and 2) <p> being a very common first child of <LuiModalV2>... ideally we'd fix 1 or the consumers would do this reset themselves but I reckong having this reset in the modal css is the least painful option at the moment
119
- margin-top: 0;
120
- }
121
- }
122
- }