@3dsource/source-ui 2.0.1 → 3.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/LICENSE +0 -0
- package/README.md +0 -0
- package/fesm2022/3dsource-source-ui.mjs +115 -59
- package/fesm2022/3dsource-source-ui.mjs.map +1 -1
- package/index.d.ts +36 -14
- package/package.json +1 -1
- package/styles/material/autocomplete.scss +0 -0
- package/styles/material/checkbox.scss +0 -0
- package/styles/material/form-field.scss +36 -16
- package/styles/material/radio.scss +0 -0
- package/styles/material/select.scss +25 -3
- package/styles/material/theme.scss +0 -0
- package/styles/material/toggle.scss +0 -0
- package/styles/source.ui.scss +0 -0
- package/styles/toastr/toastr.scss +0 -0
package/index.d.ts
CHANGED
|
@@ -1,24 +1,33 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { TemplateRef, ViewContainerRef, ElementRef, OnInit, OnDestroy, InjectionToken } from '@angular/core';
|
|
3
|
+
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
|
|
3
4
|
import { SourceButton } from '@3dsource/source-ui-native';
|
|
5
|
+
import { HttpClient } from '@angular/common/http';
|
|
4
6
|
import * as _3dsource_source_ui from '@3dsource/source-ui';
|
|
5
7
|
import { CdkOverlayOrigin, ConnectedPosition, OverlayRef, HorizontalConnectionPos, VerticalConnectionPos } from '@angular/cdk/overlay';
|
|
6
8
|
import { SwiperOptions } from 'swiper/types';
|
|
7
9
|
|
|
8
|
-
declare const
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
declare const sourceModalIcon: {
|
|
11
|
+
name: string;
|
|
12
|
+
svg: string;
|
|
13
|
+
}[];
|
|
14
|
+
|
|
15
|
+
declare const SourceModalContext: {
|
|
16
|
+
readonly DEFAULT: "default";
|
|
17
|
+
readonly INFO: "info";
|
|
18
|
+
readonly SUCCESS: "success";
|
|
19
|
+
readonly WARNING: "warning";
|
|
20
|
+
readonly ERROR: "error";
|
|
11
21
|
};
|
|
12
|
-
type
|
|
22
|
+
type SourceModalContextKeys = (typeof SourceModalContext)[keyof typeof SourceModalContext];
|
|
13
23
|
|
|
14
24
|
interface SourceModalData {
|
|
15
25
|
headerTitle?: string;
|
|
16
|
-
|
|
17
|
-
backButton?: boolean;
|
|
26
|
+
context?: SourceModalContextKeys;
|
|
18
27
|
closeButton?: boolean;
|
|
19
28
|
content?: string;
|
|
20
29
|
componentData?: unknown;
|
|
21
|
-
footerButtons?: DialogButtonsData;
|
|
30
|
+
footerButtons?: DialogButtonsData | DialogButtonsData[];
|
|
22
31
|
testID?: string;
|
|
23
32
|
[key: string]: unknown;
|
|
24
33
|
}
|
|
@@ -32,12 +41,18 @@ type DialogButtonsData = DialogButtonData[];
|
|
|
32
41
|
declare class SourceModalComponent {
|
|
33
42
|
#private;
|
|
34
43
|
readonly data: SourceModalData;
|
|
35
|
-
|
|
44
|
+
http: HttpClient;
|
|
45
|
+
sanitizer: DomSanitizer;
|
|
46
|
+
context: _angular_core.WritableSignal<SourceModalContextKeys>;
|
|
36
47
|
testID: _angular_core.WritableSignal<string>;
|
|
37
48
|
stringContent: _angular_core.WritableSignal<string | null>;
|
|
38
49
|
close(result?: any): void;
|
|
39
50
|
goBack(): void;
|
|
51
|
+
isArrayOfArrays(footerButtons: DialogButtonsData | DialogButtonsData[]): footerButtons is DialogButtonsData[];
|
|
40
52
|
getButtonConfig(externalConfig: Partial<SourceButton> | undefined): SourceButton;
|
|
53
|
+
getSingleButtonArray(footerButtons: DialogButtonsData | DialogButtonsData[]): DialogButtonsData;
|
|
54
|
+
getIconSvg(iconName: string): SafeHtml;
|
|
55
|
+
hasIcon(): boolean;
|
|
41
56
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SourceModalComponent, never>;
|
|
42
57
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SourceModalComponent, "src-modal", never, {}, {}, never, never, true, never>;
|
|
43
58
|
}
|
|
@@ -120,10 +135,11 @@ declare class SourceTabLineComponent {
|
|
|
120
135
|
tabs: _angular_core.InputSignal<any[]>;
|
|
121
136
|
label: _angular_core.InputSignal<string>;
|
|
122
137
|
selectedIndex: _angular_core.InputSignal<number>;
|
|
138
|
+
appearance: _angular_core.InputSignal<string>;
|
|
123
139
|
isCompact: _angular_core.InputSignal<boolean>;
|
|
124
|
-
offsetBefore: _angular_core.InputSignal<number>;
|
|
125
|
-
offsetAfter: _angular_core.InputSignal<number>;
|
|
126
|
-
spaceBetween: _angular_core.InputSignal<number>;
|
|
140
|
+
offsetBefore: _angular_core.InputSignal<number | undefined>;
|
|
141
|
+
offsetAfter: _angular_core.InputSignal<number | undefined>;
|
|
142
|
+
spaceBetween: _angular_core.InputSignal<number | undefined>;
|
|
127
143
|
isFullWidth: _angular_core.InputSignal<boolean>;
|
|
128
144
|
isSwiper: _angular_core.InputSignal<boolean>;
|
|
129
145
|
testID: _angular_core.InputSignal<string>;
|
|
@@ -137,9 +153,15 @@ declare class SourceTabLineComponent {
|
|
|
137
153
|
_: _angular_core.EffectRef;
|
|
138
154
|
selectTab(tabIndex: number): void;
|
|
139
155
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SourceTabLineComponent, never>;
|
|
140
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SourceTabLineComponent, "src-tab-line", never, { "tabs": { "alias": "tabs"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": true; "isSignal": true; }; "selectedIndex": { "alias": "selectedIndex"; "required": false; "isSignal": true; }; "isCompact": { "alias": "isCompact"; "required": false; "isSignal": true; }; "offsetBefore": { "alias": "offsetBefore"; "required": false; "isSignal": true; }; "offsetAfter": { "alias": "offsetAfter"; "required": false; "isSignal": true; }; "spaceBetween": { "alias": "spaceBetween"; "required": false; "isSignal": true; }; "isFullWidth": { "alias": "isFullWidth"; "required": false; "isSignal": true; }; "isSwiper": { "alias": "isSwiper"; "required": false; "isSignal": true; }; "testID": { "alias": "data-testid"; "required": false; "isSignal": true; }; }, { "onSelectTab": "onSelectTab"; }, never, never, true, never>;
|
|
156
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SourceTabLineComponent, "src-tab-line", never, { "tabs": { "alias": "tabs"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": true; "isSignal": true; }; "selectedIndex": { "alias": "selectedIndex"; "required": false; "isSignal": true; }; "appearance": { "alias": "appearance"; "required": false; "isSignal": true; }; "isCompact": { "alias": "isCompact"; "required": false; "isSignal": true; }; "offsetBefore": { "alias": "offsetBefore"; "required": false; "isSignal": true; }; "offsetAfter": { "alias": "offsetAfter"; "required": false; "isSignal": true; }; "spaceBetween": { "alias": "spaceBetween"; "required": false; "isSignal": true; }; "isFullWidth": { "alias": "isFullWidth"; "required": false; "isSignal": true; }; "isSwiper": { "alias": "isSwiper"; "required": false; "isSignal": true; }; "testID": { "alias": "data-testid"; "required": false; "isSignal": true; }; }, { "onSelectTab": "onSelectTab"; }, never, never, true, never>;
|
|
141
157
|
}
|
|
142
158
|
|
|
159
|
+
declare const SourceTabAppearance: {
|
|
160
|
+
DEFAULT: string;
|
|
161
|
+
BUTTON: string;
|
|
162
|
+
};
|
|
163
|
+
type SourceTabAppearanceKeys = (typeof SourceTabAppearance)[keyof typeof SourceTabAppearance];
|
|
164
|
+
|
|
143
165
|
interface SourceTabData {
|
|
144
166
|
title: string;
|
|
145
167
|
data: any;
|
|
@@ -333,5 +355,5 @@ declare class SourceSliderGroupComponent implements OnInit {
|
|
|
333
355
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SourceSliderGroupComponent, "src-slider-group", never, { "min": { "alias": "min"; "required": true; "isSignal": true; }; "max": { "alias": "max"; "required": true; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "units": { "alias": "units"; "required": false; "isSignal": true; }; "showTicks": { "alias": "showTicks"; "required": false; "isSignal": true; }; "showRange": { "alias": "showRange"; "required": false; "isSignal": true; }; "isDisabled": { "alias": "isDisabled"; "required": false; "isSignal": true; }; "testID": { "alias": "data-testid"; "required": false; "isSignal": true; }; }, { "groupValueChange": "groupValueChange"; }, never, never, true, never>;
|
|
334
356
|
}
|
|
335
357
|
|
|
336
|
-
export { ColorPaletteComponent, ColorSliderComponent, SOURCE_TOOLTIP_DATA, SourceColorPickerComponent, SourceColorPickerOrientation, SourceModalComponent,
|
|
337
|
-
export type { DialogButtonData, DialogButtonsData, SourceColorPickerOrientationKeys,
|
|
358
|
+
export { ColorPaletteComponent, ColorSliderComponent, SOURCE_TOOLTIP_DATA, SourceColorPickerComponent, SourceColorPickerOrientation, SourceModalComponent, SourceModalContext, SourcePopoverComponent, SourcePopoverService, SourcePopoverTriggerComponent, SourceSliderGroupComponent, SourceTabAppearance, SourceTabComponent, SourceTabLineComponent, SourceTabsComponent, SourceTooltipComponent, SourceTooltipDirective, SourceTooltipPosition, defaultSourcePopoverConfig, sourceModalIcon };
|
|
359
|
+
export type { DialogButtonData, DialogButtonsData, SourceColorPickerOrientationKeys, SourceModalContextKeys, SourceModalData, SourcePopoverData, SourceTabAppearanceKeys, SourceTabData, SourceTooltipData, SourceTooltipPositionKeys };
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
// - General outline overrides
|
|
5
5
|
// - mat-form-field-appearance-outline background overrides
|
|
6
6
|
// - mat-form-field-appearance-outline text and outline overrides
|
|
7
|
-
// - overrides for secondary
|
|
8
|
-
// - overrides for ghost
|
|
7
|
+
// - overrides for weight=secondary
|
|
8
|
+
// - overrides for weight=ghost
|
|
9
9
|
// - mat hint - disabled, use SourceHint instead
|
|
10
10
|
// - slots inside input field
|
|
11
11
|
// -----NOTE-----
|
|
@@ -178,9 +178,15 @@
|
|
|
178
178
|
font-weight: 500;
|
|
179
179
|
line-height: var(--src-text-lineHeight, var(--src-font-line-sm));
|
|
180
180
|
letter-spacing: 0;
|
|
181
|
+
|
|
182
|
+
.mdc-text-field__input {
|
|
183
|
+
white-space: nowrap;
|
|
184
|
+
text-overflow: ellipsis;
|
|
185
|
+
}
|
|
181
186
|
}
|
|
182
187
|
|
|
183
188
|
.mat-mdc-form-field-infix {
|
|
189
|
+
width: auto;
|
|
184
190
|
--mat-form-field-container-vertical-padding: var(
|
|
185
191
|
--src-padding-xs,
|
|
186
192
|
var(--src-space-2)
|
|
@@ -191,7 +197,7 @@
|
|
|
191
197
|
);
|
|
192
198
|
}
|
|
193
199
|
}
|
|
194
|
-
//
|
|
200
|
+
// weight=secondary
|
|
195
201
|
.src-input--secondary {
|
|
196
202
|
@include mat.form-field-overrides(
|
|
197
203
|
(
|
|
@@ -204,7 +210,7 @@
|
|
|
204
210
|
)
|
|
205
211
|
);
|
|
206
212
|
}
|
|
207
|
-
//
|
|
213
|
+
// weight=ghost
|
|
208
214
|
.src-input--ghost {
|
|
209
215
|
@include mat.form-field-overrides(
|
|
210
216
|
(
|
|
@@ -239,17 +245,31 @@
|
|
|
239
245
|
|
|
240
246
|
// Slot for label inside form field
|
|
241
247
|
.mat-mdc-form-field-text-prefix {
|
|
248
|
+
display: flex;
|
|
249
|
+
align-items: center;
|
|
242
250
|
label {
|
|
243
251
|
padding-right: var(--src-gap-md, 6px);
|
|
244
252
|
white-space: nowrap;
|
|
253
|
+
display: flex;
|
|
254
|
+
color: var(--src-text-body-lable, #6b7280);
|
|
255
|
+
|
|
256
|
+
/* label/basic/base */
|
|
257
|
+
font-family: var(--src-font-family-header, Inter);
|
|
258
|
+
font-size: var(--src-text-fontSize, 12px);
|
|
259
|
+
font-style: normal;
|
|
260
|
+
font-weight: 500;
|
|
261
|
+
line-height: var(--src-text-lineHeight, 16px); /* 133.333% */
|
|
245
262
|
}
|
|
246
263
|
}
|
|
247
264
|
// Slots for icons and buttons
|
|
248
|
-
|
|
265
|
+
.mat-mdc-form-field-flex {
|
|
266
|
+
align-items: center;
|
|
267
|
+
}
|
|
249
268
|
.mat-mdc-form-field-has-icon-prefix,
|
|
250
269
|
.mat-mdc-form-field-has-icon-suffix {
|
|
251
270
|
.mat-mdc-form-field-flex {
|
|
252
271
|
display: grid;
|
|
272
|
+
align-items: center;
|
|
253
273
|
grid-template-columns: var(--formFieldWithIconsGrid);
|
|
254
274
|
gap: 0;
|
|
255
275
|
color: var(--src-icon-grey);
|
|
@@ -271,15 +291,15 @@
|
|
|
271
291
|
justify-content: center;
|
|
272
292
|
}
|
|
273
293
|
}
|
|
274
|
-
|
|
275
|
-
.mat-mdc-form-field-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
294
|
+
// Align both prefix and suffix for textPrefix and icon slots
|
|
295
|
+
.mat-mdc-form-field-flex {
|
|
296
|
+
&:has([class*='-prefix']) {
|
|
297
|
+
--formFieldWithIconsGrid: auto minmax(0, 1fr);
|
|
298
|
+
}
|
|
299
|
+
&:has([class*='-suffix']) {
|
|
300
|
+
--formFieldWithIconsGrid: minmax(0, 1fr) auto;
|
|
301
|
+
}
|
|
302
|
+
&:has([class*='-prefix']):has([class*='-suffix']) {
|
|
303
|
+
--formFieldWithIconsGrid: auto minmax(0, 1fr) auto;
|
|
304
|
+
}
|
|
285
305
|
}
|
|
File without changes
|
|
@@ -53,18 +53,39 @@
|
|
|
53
53
|
#c5280c
|
|
54
54
|
);
|
|
55
55
|
}
|
|
56
|
-
}
|
|
57
56
|
|
|
58
|
-
.mat-mdc-select-trigger
|
|
59
|
-
|
|
57
|
+
.mat-mdc-select-trigger {
|
|
58
|
+
display: grid;
|
|
59
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
60
|
+
.mat-mdc-select-arrow-wrapper {
|
|
61
|
+
height: initial;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
60
64
|
}
|
|
61
65
|
|
|
62
66
|
// Custom additional styling for select panel
|
|
67
|
+
|
|
63
68
|
.src-select-panel {
|
|
64
69
|
height: 100%;
|
|
65
70
|
display: flex;
|
|
66
71
|
flex-direction: column;
|
|
67
72
|
align-items: flex-start;
|
|
73
|
+
|
|
74
|
+
scrollbar-color: rgba(148, 163, 184, 0.16) transparent;
|
|
75
|
+
scrollbar-width: thin;
|
|
76
|
+
|
|
77
|
+
&::-webkit-scrollbar {
|
|
78
|
+
width: 4px;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&::-webkit-scrollbar-track {
|
|
82
|
+
background-color: transparent;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&::-webkit-scrollbar-thumb {
|
|
86
|
+
background-color: rgba(148, 163, 184, 0.16);
|
|
87
|
+
outline: none;
|
|
88
|
+
}
|
|
68
89
|
}
|
|
69
90
|
.src-select-panel__header,
|
|
70
91
|
.src-panel__footer {
|
|
@@ -76,6 +97,7 @@
|
|
|
76
97
|
max-height: 100%;
|
|
77
98
|
width: 100%;
|
|
78
99
|
overflow-y: auto;
|
|
100
|
+
scrollbar-gutter: stable;
|
|
79
101
|
scrollbar-color: var(--src-color-border-strong)
|
|
80
102
|
var(--src-color-border-default);
|
|
81
103
|
scrollbar-width: thin;
|
|
File without changes
|
|
File without changes
|
package/styles/source.ui.scss
CHANGED
|
File without changes
|
|
File without changes
|