@simplysm/angular 14.2.2 → 14.2.4
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/dist/controls/button/sd-anchor.d.ts +1 -1
- package/dist/controls/button/sd-anchor.d.ts.map +1 -1
- package/dist/controls/button/sd-anchor.js +2 -2
- package/dist/controls/button/sd-button.d.ts +1 -1
- package/dist/controls/button/sd-button.d.ts.map +1 -1
- package/dist/controls/button/sd-button.js +2 -2
- package/dist/controls/checkbox/sd-checkbox.d.ts +1 -1
- package/dist/controls/checkbox/sd-checkbox.d.ts.map +1 -1
- package/dist/controls/checkbox/sd-checkbox.js +2 -2
- package/dist/controls/checkbox/sd-switch.d.ts +1 -1
- package/dist/controls/checkbox/sd-switch.d.ts.map +1 -1
- package/dist/controls/checkbox/sd-switch.js +2 -2
- package/dist/controls/dropdown/sd-dropdown.d.ts +3 -0
- package/dist/controls/dropdown/sd-dropdown.d.ts.map +1 -1
- package/dist/controls/dropdown/sd-dropdown.js +29 -9
- package/dist/controls/input/sd-textarea.d.ts +1 -1
- package/dist/controls/input/sd-textarea.d.ts.map +1 -1
- package/dist/controls/input/sd-textarea.js +2 -2
- package/dist/controls/input/sd-textfield-type-handlers.js +1 -1
- package/dist/controls/input/sd-textfield.d.ts +1 -1
- package/dist/controls/input/sd-textfield.d.ts.map +1 -1
- package/dist/controls/input/sd-textfield.js +9 -10
- package/dist/controls/list/sd-list.d.ts.map +1 -1
- package/dist/controls/list/sd-list.js +4 -6
- package/dist/controls/select/sd-select-button.d.ts.map +1 -1
- package/dist/controls/select/sd-select-button.js +3 -5
- package/dist/controls/select/sd-select.js +2 -2
- package/dist/core/error-handler/sd-global-error-handler.plugin.js +1 -1
- package/dist/core/modal/sd-modal.provider.js +1 -1
- package/dist/core/provideSdAngular.d.ts.map +1 -1
- package/dist/core/provideSdAngular.js +37 -13
- package/dist/core/setupBgTheme.d.ts +1 -1
- package/dist/core/setupBgTheme.d.ts.map +1 -1
- package/dist/core/toast/sd-toast.js +2 -2
- package/dist/core/toast/sd-toast.provider.d.ts +1 -1
- package/dist/core/toast/sd-toast.provider.d.ts.map +1 -1
- package/dist/core/toast/sd-toast.provider.js +1 -1
- package/dist/data/crud/sd-base-container.js +2 -2
- package/dist/data/sheet/injectSheetDomAccessor.d.ts +1 -0
- package/dist/data/sheet/injectSheetDomAccessor.d.ts.map +1 -1
- package/dist/data/sheet/injectSheetDomAccessor.js +7 -0
- package/dist/data/sheet/injectSheetDragSelection.d.ts +18 -0
- package/dist/data/sheet/injectSheetDragSelection.d.ts.map +1 -0
- package/dist/data/sheet/injectSheetDragSelection.js +193 -0
- package/dist/data/sheet/sd-sheet.d.ts +3 -0
- package/dist/data/sheet/sd-sheet.d.ts.map +1 -1
- package/dist/data/sheet/sd-sheet.js +17 -6
- package/dist/features/editor/sd-tiptap-editor.js +2 -2
- package/dist/features/theme/sd-theme-provider.d.ts +0 -2
- package/dist/features/theme/sd-theme-provider.d.ts.map +1 -1
- package/dist/features/theme/sd-theme-provider.js +0 -5
- package/dist/features/theme/sd-theme-selector.d.ts.map +1 -1
- package/dist/features/theme/sd-theme-selector.js +5 -22
- package/dist/features/visual/sd-label.d.ts +1 -1
- package/dist/features/visual/sd-label.d.ts.map +1 -1
- package/dist/features/visual/sd-label.js +2 -2
- package/dist/features/visual/sd-note.d.ts +1 -1
- package/dist/features/visual/sd-note.d.ts.map +1 -1
- package/dist/features/visual/sd-note.js +2 -2
- package/dist/features/visual/sd-progress.d.ts +1 -1
- package/dist/features/visual/sd-progress.d.ts.map +1 -1
- package/dist/features/visual/sd-progress.js +2 -2
- package/dist/layout/sidebar/sd-sidebar.d.ts.map +1 -1
- package/dist/layout/sidebar/sd-sidebar.js +3 -5
- package/dist/layout/topbar/sd-topbar.d.ts.map +1 -1
- package/dist/layout/topbar/sd-topbar.js +3 -3
- package/package.json +5 -5
- package/scss/commons/_mixins.scss +1 -1
- package/scss/commons/_theme-variables.scss +0 -8
- package/scss/commons/_variables.scss +114 -121
- package/scss/themes/_variables-blueprint.scss +65 -63
- package/scss/themes/_variables-ide-dark.scss +166 -144
- package/src/controls/button/sd-anchor.ts +3 -3
- package/src/controls/button/sd-button.ts +1 -3
- package/src/controls/checkbox/sd-checkbox.ts +2 -10
- package/src/controls/checkbox/sd-switch.ts +2 -4
- package/src/controls/dropdown/sd-dropdown.ts +33 -9
- package/src/controls/input/sd-textarea.ts +2 -4
- package/src/controls/input/sd-textfield-type-handlers.ts +1 -1
- package/src/controls/input/sd-textfield.ts +9 -12
- package/src/controls/list/sd-list.ts +3 -5
- package/src/controls/select/sd-select-button.ts +2 -4
- package/src/controls/select/sd-select.ts +1 -1
- package/src/core/error-handler/sd-global-error-handler.plugin.ts +1 -1
- package/src/core/modal/sd-modal.provider.ts +1 -1
- package/src/core/provideSdAngular.ts +49 -15
- package/src/core/setupBgTheme.ts +1 -2
- package/src/core/toast/sd-toast.provider.ts +5 -3
- package/src/data/crud/sd-base-container.ts +1 -1
- package/src/data/sheet/injectSheetDomAccessor.ts +7 -0
- package/src/data/sheet/injectSheetDragSelection.ts +226 -0
- package/src/data/sheet/sd-sheet.ts +16 -3
- package/src/features/editor/sd-tiptap-editor.ts +1 -1
- package/src/features/theme/sd-theme-provider.ts +0 -9
- package/src/features/theme/sd-theme-selector.ts +1 -10
- package/src/features/visual/sd-label.ts +1 -3
- package/src/features/visual/sd-note.ts +1 -3
- package/src/features/visual/sd-progress.ts +2 -2
- package/src/layout/sidebar/sd-sidebar.ts +2 -3
- package/src/layout/topbar/sd-topbar.ts +1 -0
- package/styles.css +278 -567
- package/scss/commons/_colors.scss +0 -301
- package/scss/commons/_density.scss +0 -23
- package/scss/sd-tokens.md +0 -132
|
@@ -46,6 +46,7 @@ import { useSheetDisplayPipeline } from "./useSheetDisplayPipeline";
|
|
|
46
46
|
import { useSheetCellStyling } from "./useSheetCellStyling";
|
|
47
47
|
import { useSheetFocusIndicator } from "./useSheetFocusIndicator";
|
|
48
48
|
import { injectSheetSelectRowIndicator } from "./injectSheetSelectRowIndicator";
|
|
49
|
+
import { injectSheetDragSelection } from "./injectSheetDragSelection";
|
|
49
50
|
import { SdModalProvider } from "../../core/modal/sd-modal.provider";
|
|
50
51
|
import { SdSheetConfigModal } from "./sd-sheet-config.modal";
|
|
51
52
|
import { SdEvents } from "../../core/events/sd-events";
|
|
@@ -68,7 +69,7 @@ import { SdEvents } from "../../core/events/sd-events";
|
|
|
68
69
|
{ directive: SdEvents, outputs: ["keydown.capture", "focus.capture", "blur.capture"] },
|
|
69
70
|
],
|
|
70
71
|
host: {
|
|
71
|
-
|
|
72
|
+
class: "flex-column fill",
|
|
72
73
|
"[attr.data-sd-inset]": "inset()",
|
|
73
74
|
"[attr.data-sd-focus-mode]": "focusMode()",
|
|
74
75
|
"(keydown.capture)": "onKeydownCapture($event)",
|
|
@@ -262,6 +263,7 @@ import { SdEvents } from "../../core/events/sd-events";
|
|
|
262
263
|
[canChangeFn]="selection.getCanChangeFn(item)"
|
|
263
264
|
(valueChange)="selection.toggle(item)"
|
|
264
265
|
(mousedown)="onSelectorMouseDown($event, rowIdx)"
|
|
266
|
+
(pointerdown)="onSelectorPointerDown($event, rowIdx)"
|
|
265
267
|
[inline]="true"
|
|
266
268
|
[theme]="'white'"
|
|
267
269
|
[disabled]="_selectable !== true"
|
|
@@ -370,7 +372,7 @@ import { SdEvents } from "../../core/events/sd-events";
|
|
|
370
372
|
border-radius: $border-radius;
|
|
371
373
|
|
|
372
374
|
> ._tool {
|
|
373
|
-
background-color: var(--sd-bg-
|
|
375
|
+
background-color: var(--sd-bg-canvas);
|
|
374
376
|
border-top-left-radius: $border-radius;
|
|
375
377
|
border-top-right-radius: $border-radius;
|
|
376
378
|
border-bottom: 1px solid $border-color-dark;
|
|
@@ -501,7 +503,7 @@ import { SdEvents } from "../../core/events/sd-events";
|
|
|
501
503
|
|
|
502
504
|
> tbody > tr > td {
|
|
503
505
|
font-family: var(--sd-font-family-field);
|
|
504
|
-
background-color: var(--sd-bg-
|
|
506
|
+
background-color: var(--sd-bg-content);
|
|
505
507
|
vertical-align: top;
|
|
506
508
|
|
|
507
509
|
&._fixed {
|
|
@@ -717,6 +719,13 @@ export class SdSheet<TItem> {
|
|
|
717
719
|
trackByFn: this.trackByFn,
|
|
718
720
|
});
|
|
719
721
|
|
|
722
|
+
// Drag(paint) selection
|
|
723
|
+
private readonly _dragSelection = injectSheetDragSelection<TItem>({
|
|
724
|
+
domAccessor: this.domAccessor,
|
|
725
|
+
displayItems: this.displayItems,
|
|
726
|
+
selection: this.selection,
|
|
727
|
+
});
|
|
728
|
+
|
|
720
729
|
// Icons
|
|
721
730
|
icons = {
|
|
722
731
|
tablerSettings,
|
|
@@ -853,6 +862,10 @@ export class SdSheet<TItem> {
|
|
|
853
862
|
});
|
|
854
863
|
}
|
|
855
864
|
|
|
865
|
+
onSelectorPointerDown(event: PointerEvent, r: number): void {
|
|
866
|
+
this._dragSelection.onSelectorPointerDown(event, r);
|
|
867
|
+
}
|
|
868
|
+
|
|
856
869
|
onSelectorMouseDown(event: MouseEvent, r: number): void {
|
|
857
870
|
if (!event.shiftKey) return;
|
|
858
871
|
event.preventDefault();
|
|
@@ -12,9 +12,6 @@ export const SD_THEMES = [
|
|
|
12
12
|
|
|
13
13
|
export type SdThemeName = (typeof SD_THEMES)[number]["value"];
|
|
14
14
|
|
|
15
|
-
// 밀도 축 — 테마와 직교(DEC-007). compact 는 치수 토큰 그룹(sd-density-compact)만 덮는다.
|
|
16
|
-
export type SdDensity = "normal" | "compact";
|
|
17
|
-
|
|
18
15
|
@Injectable({ providedIn: "root" })
|
|
19
16
|
export class SdThemeProvider {
|
|
20
17
|
readonly themes: readonly { value: SdThemeName; label: string }[] = SD_THEMES;
|
|
@@ -22,8 +19,6 @@ export class SdThemeProvider {
|
|
|
22
19
|
// 라이트(기본) / 블루프린트(도면) / IDE 다크
|
|
23
20
|
theme = signal<SdThemeName>("light");
|
|
24
21
|
|
|
25
|
-
density = signal<SdDensity>("normal");
|
|
26
|
-
|
|
27
22
|
readonly fontSizePresets: readonly number[] = [12, 14, 16, 20, 24, 28];
|
|
28
23
|
|
|
29
24
|
fontSize = signal<number>(12);
|
|
@@ -39,10 +34,6 @@ export class SdThemeProvider {
|
|
|
39
34
|
}
|
|
40
35
|
});
|
|
41
36
|
|
|
42
|
-
effect(() => {
|
|
43
|
-
document.body.classList.toggle("sd-density-compact", this.density() === "compact");
|
|
44
|
-
});
|
|
45
|
-
|
|
46
37
|
effect(() => {
|
|
47
38
|
document.documentElement.style.fontSize = `${this.fontSize()}px`;
|
|
48
39
|
});
|
|
@@ -8,7 +8,6 @@ import {
|
|
|
8
8
|
import { SdDropdown } from "../../controls/dropdown/sd-dropdown";
|
|
9
9
|
import { SdDropdownPopup } from "../../controls/dropdown/sd-dropdown-popup";
|
|
10
10
|
import { SdButton } from "../../controls/button/sd-button";
|
|
11
|
-
import { SdSwitch } from "../../controls/checkbox/sd-switch";
|
|
12
11
|
import { NgIcon } from "@ng-icons/core";
|
|
13
12
|
import { SdThemeProvider } from "./sd-theme-provider";
|
|
14
13
|
import { tablerMinus, tablerPalette, tablerPlus } from "@ng-icons/tabler-icons";
|
|
@@ -18,7 +17,7 @@ import { tablerMinus, tablerPalette, tablerPlus } from "@ng-icons/tabler-icons";
|
|
|
18
17
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
19
18
|
encapsulation: ViewEncapsulation.None,
|
|
20
19
|
standalone: true,
|
|
21
|
-
imports: [SdDropdown, SdDropdownPopup, SdButton,
|
|
20
|
+
imports: [SdDropdown, SdDropdownPopup, SdButton, NgIcon],
|
|
22
21
|
template: `
|
|
23
22
|
<sd-dropdown>
|
|
24
23
|
<sd-button [inline]="true" [theme]="'link-gray'">
|
|
@@ -65,14 +64,6 @@ import { tablerMinus, tablerPalette, tablerPlus } from "@ng-icons/tabler-icons";
|
|
|
65
64
|
}
|
|
66
65
|
</div>
|
|
67
66
|
</div>
|
|
68
|
-
<div class="flex-row gap-sm cross-align-center">
|
|
69
|
-
<span>compact</span>
|
|
70
|
-
<sd-switch
|
|
71
|
-
[inline]="true"
|
|
72
|
-
[value]="_sdTheme.density() === 'compact'"
|
|
73
|
-
(valueChange)="_sdTheme.density.set($event ? 'compact' : 'normal')"
|
|
74
|
-
/>
|
|
75
|
-
</div>
|
|
76
67
|
</div>
|
|
77
68
|
</sd-dropdown-popup>
|
|
78
69
|
</sd-dropdown>
|
|
@@ -57,9 +57,7 @@ import {
|
|
|
57
57
|
],
|
|
58
58
|
})
|
|
59
59
|
export class SdLabel {
|
|
60
|
-
theme = input<
|
|
61
|
-
"primary" | "secondary" | "info" | "success" | "warning" | "danger" | "gray" | "blue-gray"
|
|
62
|
-
>();
|
|
60
|
+
theme = input<"primary" | "info" | "success" | "warning" | "danger" | "gray" | "blue-gray">();
|
|
63
61
|
color = input<string>();
|
|
64
62
|
clickable = input(false, { transform: booleanAttribute });
|
|
65
63
|
}
|
|
@@ -57,9 +57,7 @@ import {
|
|
|
57
57
|
],
|
|
58
58
|
})
|
|
59
59
|
export class SdNote {
|
|
60
|
-
theme = input<
|
|
61
|
-
"primary" | "secondary" | "info" | "success" | "warning" | "danger" | "gray" | "blue-gray"
|
|
62
|
-
>();
|
|
60
|
+
theme = input<"primary" | "info" | "success" | "warning" | "danger" | "gray" | "blue-gray">();
|
|
63
61
|
size = input<"sm" | "lg">();
|
|
64
62
|
inset = input(false, { transform: booleanAttribute });
|
|
65
63
|
}
|
|
@@ -70,7 +70,7 @@ import { PercentPipe } from "@angular/common";
|
|
|
70
70
|
&[data-sd-inset="true"] {
|
|
71
71
|
border-radius: 0;
|
|
72
72
|
border: none;
|
|
73
|
-
background-color: var(--sd-bg-
|
|
73
|
+
background-color: var(--sd-bg-track);
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
`,
|
|
@@ -80,7 +80,7 @@ export class SdProgress {
|
|
|
80
80
|
inset = input(false, { transform: booleanAttribute });
|
|
81
81
|
size = input<"sm" | "lg">();
|
|
82
82
|
theme = input.required<
|
|
83
|
-
"primary" | "
|
|
83
|
+
"primary" | "info" | "success" | "warning" | "danger" | "gray" | "blue-gray"
|
|
84
84
|
>();
|
|
85
85
|
|
|
86
86
|
value = input.required<number>();
|
|
@@ -17,9 +17,7 @@ import { SdSidebarContainer } from "./sd-sidebar-container";
|
|
|
17
17
|
host: {
|
|
18
18
|
"[attr.data-sd-toggle]": "toggle()",
|
|
19
19
|
},
|
|
20
|
-
template: `
|
|
21
|
-
<ng-content />
|
|
22
|
-
`,
|
|
20
|
+
template: ` <ng-content /> `,
|
|
23
21
|
styles: [
|
|
24
22
|
/* language=SCSS */ `
|
|
25
23
|
@use "../../../scss/commons/mixins";
|
|
@@ -32,6 +30,7 @@ import { SdSidebarContainer } from "./sd-sidebar-container";
|
|
|
32
30
|
left: 0;
|
|
33
31
|
width: var(--sd-sidebar-width);
|
|
34
32
|
height: 100%;
|
|
33
|
+
background-color: var(--sd-bg-canvas);
|
|
35
34
|
border-right: 1px solid var(--sd-bd-soft);
|
|
36
35
|
|
|
37
36
|
@media not all and (max-width: variables.$breakpoint-mobile) {
|