@egose/shadcn-theme-ng 0.0.27 → 0.1.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 +130 -13
- package/accordion/README.md +3 -0
- package/accordion/fesm2022/accordion.mjs +148 -0
- package/accordion/package.json +25 -0
- package/accordion/types/accordion.d.ts +49 -0
- package/alert/README.md +2 -63
- package/alert/fesm2022/alert.mjs +58 -53
- package/alert/package.json +25 -0
- package/alert-dialog/README.md +11 -0
- package/alert-dialog/fesm2022/alert-dialog.mjs +287 -0
- package/alert-dialog/package.json +25 -0
- package/alert-dialog/types/alert-dialog.d.ts +90 -0
- package/aspect-ratio/README.md +11 -0
- package/aspect-ratio/fesm2022/aspect-ratio.mjs +62 -0
- package/aspect-ratio/package.json +25 -0
- package/aspect-ratio/types/aspect-ratio.d.ts +21 -0
- package/autocomplete/README.md +3 -0
- package/autocomplete/fesm2022/autocomplete.mjs +391 -0
- package/autocomplete/package.json +24 -0
- package/autocomplete/types/autocomplete.d.ts +96 -0
- package/avatar/README.md +11 -0
- package/avatar/fesm2022/avatar.mjs +178 -0
- package/avatar/package.json +25 -0
- package/avatar/types/avatar.d.ts +50 -0
- package/badge/README.md +2 -63
- package/badge/fesm2022/badge.mjs +69 -63
- package/badge/package.json +25 -0
- package/basic-alert/README.md +2 -63
- package/basic-alert/fesm2022/basic-alert.mjs +14 -22
- package/basic-alert/package.json +24 -0
- package/breadcrumb/README.md +11 -0
- package/breadcrumb/fesm2022/breadcrumb.mjs +218 -0
- package/breadcrumb/package.json +25 -0
- package/breadcrumb/types/breadcrumb.d.ts +57 -0
- package/button/README.md +2 -63
- package/button/fesm2022/button.mjs +201 -177
- package/button/package.json +25 -0
- package/button/{index.d.ts → types/button.d.ts} +31 -10
- package/button-group/README.md +11 -0
- package/button-group/fesm2022/button-group.mjs +102 -0
- package/button-group/package.json +25 -0
- package/button-group/types/button-group.d.ts +30 -0
- package/calendar/README.md +2 -63
- package/calendar/fesm2022/calendar.mjs +178 -570
- package/calendar/package.json +24 -0
- package/calendar/types/calendar.d.ts +94 -0
- package/card/README.md +11 -0
- package/card/fesm2022/card.mjs +169 -0
- package/card/package.json +25 -0
- package/card/types/card.d.ts +54 -0
- package/carousel/README.md +11 -0
- package/carousel/fesm2022/carousel.mjs +267 -0
- package/carousel/package.json +25 -0
- package/carousel/types/carousel.d.ts +84 -0
- package/checkbox/README.md +3 -0
- package/checkbox/fesm2022/checkbox.mjs +113 -0
- package/checkbox/package.json +24 -0
- package/checkbox/types/checkbox.d.ts +56 -0
- package/collapsible/README.md +11 -0
- package/collapsible/fesm2022/collapsible.mjs +77 -0
- package/collapsible/package.json +25 -0
- package/collapsible/types/collapsible.d.ts +27 -0
- package/combobox/README.md +11 -0
- package/combobox/fesm2022/combobox.mjs +547 -0
- package/combobox/package.json +25 -0
- package/combobox/types/combobox.d.ts +151 -0
- package/command/README.md +11 -0
- package/command/fesm2022/command.mjs +301 -0
- package/command/package.json +25 -0
- package/command/types/command.d.ts +89 -0
- package/confirmation-dialog/README.md +3 -0
- package/confirmation-dialog/fesm2022/confirmation-dialog.mjs +79 -0
- package/confirmation-dialog/package.json +24 -0
- package/confirmation-dialog/types/confirmation-dialog.d.ts +28 -0
- package/context-menu/README.md +11 -0
- package/context-menu/fesm2022/context-menu.mjs +89 -0
- package/context-menu/package.json +25 -0
- package/context-menu/types/context-menu.d.ts +34 -0
- package/date-picker/README.md +2 -63
- package/date-picker/fesm2022/date-picker.mjs +1104 -352
- package/date-picker/package.json +24 -0
- package/date-picker/types/date-picker.d.ts +555 -0
- package/dialog/README.md +3 -0
- package/dialog/fesm2022/dialog.mjs +281 -0
- package/dialog/package.json +24 -0
- package/dialog/types/dialog.d.ts +95 -0
- package/drawer/README.md +11 -0
- package/drawer/fesm2022/drawer.mjs +261 -0
- package/drawer/package.json +25 -0
- package/drawer/types/drawer.d.ts +76 -0
- package/dropdown-menu/README.md +11 -0
- package/dropdown-menu/fesm2022/dropdown-menu.mjs +554 -0
- package/dropdown-menu/package.json +25 -0
- package/dropdown-menu/types/dropdown-menu.d.ts +180 -0
- package/empty/README.md +11 -0
- package/empty/fesm2022/empty.mjs +151 -0
- package/empty/package.json +25 -0
- package/empty/types/empty.d.ts +54 -0
- package/field/README.md +11 -0
- package/field/fesm2022/field.mjs +351 -0
- package/field/package.json +25 -0
- package/field/types/field.d.ts +107 -0
- package/form-checkbox/README.md +3 -0
- package/form-checkbox/fesm2022/form-checkbox.mjs +94 -0
- package/form-checkbox/package.json +24 -0
- package/form-checkbox/types/form-checkbox.d.ts +33 -0
- package/form-date-picker/README.md +2 -63
- package/form-date-picker/fesm2022/form-date-picker.mjs +74 -120
- package/form-date-picker/package.json +24 -0
- package/form-date-picker/{index.d.ts → types/form-date-picker.d.ts} +7 -1
- package/form-field/README.md +2 -63
- package/form-field/fesm2022/form-field.mjs +54 -28
- package/form-field/package.json +25 -0
- package/form-field/types/form-field.d.ts +46 -0
- package/form-field-simple/README.md +2 -63
- package/form-field-simple/fesm2022/form-field-simple.mjs +15 -10
- package/form-field-simple/package.json +24 -0
- package/form-searchable-multiselect/README.md +3 -0
- package/form-searchable-multiselect/fesm2022/form-searchable-multiselect.mjs +98 -0
- package/form-searchable-multiselect/package.json +24 -0
- package/form-searchable-multiselect/types/form-searchable-multiselect.d.ts +36 -0
- package/form-select/README.md +2 -63
- package/form-select/fesm2022/form-select.mjs +85 -141
- package/form-select/package.json +24 -0
- package/form-select/{index.d.ts → types/form-select.d.ts} +7 -1
- package/form-text-input/README.md +2 -63
- package/form-text-input/fesm2022/form-text-input.mjs +86 -171
- package/form-text-input/package.json +24 -0
- package/form-text-input/{index.d.ts → types/form-text-input.d.ts} +9 -12
- package/form-textarea/README.md +2 -63
- package/form-textarea/fesm2022/form-textarea.mjs +77 -128
- package/form-textarea/package.json +24 -0
- package/form-textarea/{index.d.ts → types/form-textarea.d.ts} +8 -1
- package/hover-card/README.md +11 -0
- package/hover-card/fesm2022/hover-card.mjs +123 -0
- package/hover-card/package.json +25 -0
- package/hover-card/types/hover-card.d.ts +36 -0
- package/icon/README.md +2 -63
- package/icon/fesm2022/icon.mjs +12 -10
- package/icon/package.json +25 -0
- package/input/README.md +2 -63
- package/input/fesm2022/input.mjs +25 -70
- package/input/package.json +25 -0
- package/input/types/input.d.ts +19 -0
- package/input-group/README.md +11 -0
- package/input-group/fesm2022/input-group.mjs +199 -0
- package/input-group/package.json +25 -0
- package/input-group/types/input-group.d.ts +52 -0
- package/input-otp/README.md +11 -0
- package/input-otp/fesm2022/input-otp.mjs +141 -0
- package/input-otp/package.json +25 -0
- package/input-otp/types/input-otp.d.ts +43 -0
- package/item/README.md +11 -0
- package/item/fesm2022/item.mjs +278 -0
- package/item/package.json +25 -0
- package/item/types/item.d.ts +101 -0
- package/kbd/README.md +11 -0
- package/kbd/fesm2022/kbd.mjs +61 -0
- package/kbd/package.json +25 -0
- package/kbd/types/kbd.d.ts +22 -0
- package/label/README.md +2 -63
- package/label/fesm2022/label.mjs +12 -11
- package/label/package.json +25 -0
- package/label/{index.d.ts → types/label.d.ts} +1 -1
- package/layout-simple/README.md +3 -0
- package/layout-simple/fesm2022/layout-simple.mjs +388 -0
- package/layout-simple/package.json +24 -0
- package/layout-simple/types/layout-simple.d.ts +167 -0
- package/menu/README.md +3 -0
- package/menu/fesm2022/menu.mjs +455 -0
- package/menu/package.json +24 -0
- package/menu/types/menu.d.ts +137 -0
- package/menubar/README.md +11 -0
- package/menubar/fesm2022/menubar.mjs +108 -0
- package/menubar/package.json +25 -0
- package/menubar/types/menubar.d.ts +40 -0
- package/native-select/README.md +11 -0
- package/native-select/fesm2022/native-select.mjs +207 -0
- package/native-select/package.json +25 -0
- package/native-select/types/native-select.d.ts +70 -0
- package/navigation-menu/README.md +11 -0
- package/navigation-menu/fesm2022/navigation-menu.mjs +194 -0
- package/navigation-menu/package.json +25 -0
- package/navigation-menu/types/navigation-menu.d.ts +54 -0
- package/package.json +284 -63
- package/pagination/README.md +11 -0
- package/pagination/fesm2022/pagination.mjs +522 -0
- package/pagination/package.json +25 -0
- package/pagination/types/pagination.d.ts +192 -0
- package/popover/README.md +2 -63
- package/popover/fesm2022/popover.mjs +124 -30
- package/popover/package.json +24 -0
- package/popover/types/popover.d.ts +54 -0
- package/progress/README.md +11 -0
- package/progress/fesm2022/progress.mjs +77 -0
- package/progress/package.json +25 -0
- package/progress/types/progress.d.ts +27 -0
- package/radio-group/README.md +3 -0
- package/radio-group/fesm2022/radio-group.mjs +207 -0
- package/radio-group/package.json +25 -0
- package/radio-group/types/radio-group.d.ts +71 -0
- package/resizable/README.md +11 -0
- package/resizable/fesm2022/resizable.mjs +103 -0
- package/resizable/package.json +25 -0
- package/resizable/types/resizable.d.ts +32 -0
- package/scroll-area/README.md +11 -0
- package/scroll-area/fesm2022/scroll-area.mjs +51 -0
- package/scroll-area/package.json +25 -0
- package/scroll-area/types/scroll-area.d.ts +16 -0
- package/searchable-multiselect/README.md +3 -0
- package/searchable-multiselect/fesm2022/searchable-multiselect.mjs +136 -0
- package/searchable-multiselect/package.json +24 -0
- package/searchable-multiselect/types/searchable-multiselect.d.ts +45 -0
- package/select/README.md +2 -63
- package/select/fesm2022/select.mjs +340 -198
- package/select/package.json +25 -0
- package/select/types/select.d.ts +121 -0
- package/separator/README.md +2 -63
- package/separator/fesm2022/separator.mjs +17 -15
- package/separator/package.json +24 -0
- package/separator/{index.d.ts → types/separator.d.ts} +4 -5
- package/sheet/README.md +2 -63
- package/sheet/fesm2022/sheet.mjs +56 -61
- package/sheet/package.json +24 -0
- package/sidebar/README.md +11 -0
- package/sidebar/fesm2022/sidebar.mjs +846 -0
- package/sidebar/package.json +25 -0
- package/sidebar/types/sidebar.d.ts +237 -0
- package/skeleton/README.md +11 -0
- package/skeleton/fesm2022/skeleton.mjs +44 -0
- package/skeleton/package.json +25 -0
- package/skeleton/types/skeleton.d.ts +16 -0
- package/slider/README.md +11 -0
- package/slider/fesm2022/slider.mjs +74 -0
- package/slider/package.json +25 -0
- package/slider/types/slider.d.ts +19 -0
- package/sonner/README.md +2 -63
- package/sonner/fesm2022/sonner.mjs +34 -39
- package/sonner/package.json +25 -0
- package/spinner/README.md +2 -63
- package/spinner/fesm2022/spinner.mjs +20 -16
- package/spinner/package.json +25 -0
- package/switch/README.md +2 -63
- package/switch/fesm2022/switch.mjs +28 -27
- package/switch/package.json +25 -0
- package/table/README.md +11 -0
- package/table/fesm2022/table.mjs +211 -0
- package/table/package.json +25 -0
- package/table/types/table.d.ts +87 -0
- package/tabs/README.md +3 -0
- package/tabs/fesm2022/tabs.mjs +210 -0
- package/tabs/package.json +25 -0
- package/tabs/types/tabs.d.ts +71 -0
- package/textarea/README.md +11 -0
- package/textarea/fesm2022/textarea.mjs +47 -0
- package/textarea/package.json +25 -0
- package/textarea/types/textarea.d.ts +18 -0
- package/toggle/README.md +11 -0
- package/toggle/fesm2022/toggle.mjs +78 -0
- package/toggle/package.json +25 -0
- package/toggle/types/toggle.d.ts +27 -0
- package/toggle-group/README.md +11 -0
- package/toggle-group/fesm2022/toggle-group.mjs +117 -0
- package/toggle-group/package.json +25 -0
- package/toggle-group/types/toggle-group.d.ts +45 -0
- package/tooltip/README.md +3 -0
- package/tooltip/fesm2022/tooltip.mjs +72 -0
- package/tooltip/package.json +25 -0
- package/tooltip/types/tooltip.d.ts +22 -0
- package/typography/README.md +11 -0
- package/typography/fesm2022/typography.mjs +242 -0
- package/typography/package.json +25 -0
- package/typography/types/typography.d.ts +94 -0
- package/utils/README.md +2 -63
- package/utils/fesm2022/utils.mjs +209 -2
- package/utils/package.json +25 -0
- package/utils/types/utils.d.ts +13 -0
- package/alert/fesm2022/alert.mjs.map +0 -1
- package/badge/fesm2022/badge.mjs.map +0 -1
- package/basic-alert/fesm2022/basic-alert.mjs.map +0 -1
- package/button/fesm2022/button.mjs.map +0 -1
- package/calendar/fesm2022/calendar.mjs.map +0 -1
- package/calendar/index.d.ts +0 -111
- package/date-picker/fesm2022/date-picker.mjs.map +0 -1
- package/date-picker/index.d.ts +0 -227
- package/form-date-picker/fesm2022/form-date-picker.mjs.map +0 -1
- package/form-field/fesm2022/form-field.mjs.map +0 -1
- package/form-field/index.d.ts +0 -37
- package/form-field-simple/fesm2022/form-field-simple.mjs.map +0 -1
- package/form-select/fesm2022/form-select.mjs.map +0 -1
- package/form-text-input/fesm2022/form-text-input.mjs.map +0 -1
- package/form-textarea/fesm2022/form-textarea.mjs.map +0 -1
- package/icon/fesm2022/icon.mjs.map +0 -1
- package/input/fesm2022/input.mjs.map +0 -1
- package/input/index.d.ts +0 -41
- package/label/fesm2022/label.mjs.map +0 -1
- package/popover/fesm2022/popover.mjs.map +0 -1
- package/popover/index.d.ts +0 -30
- package/select/fesm2022/select.mjs.map +0 -1
- package/select/index.d.ts +0 -92
- package/separator/fesm2022/separator.mjs.map +0 -1
- package/sheet/fesm2022/sheet.mjs.map +0 -1
- package/sonner/fesm2022/sonner.mjs.map +0 -1
- package/spinner/fesm2022/spinner.mjs.map +0 -1
- package/switch/fesm2022/switch.mjs.map +0 -1
- package/utils/fesm2022/utils.mjs.map +0 -1
- package/utils/index.d.ts +0 -5
- /package/alert/{index.d.ts → types/alert.d.ts} +0 -0
- /package/badge/{index.d.ts → types/badge.d.ts} +0 -0
- /package/basic-alert/{index.d.ts → types/basic-alert.d.ts} +0 -0
- /package/form-field-simple/{index.d.ts → types/form-field-simple.d.ts} +0 -0
- /package/icon/{index.d.ts → types/icon.d.ts} +0 -0
- /package/sheet/{index.d.ts → types/sheet.d.ts} +0 -0
- /package/sonner/{index.d.ts → types/sonner.d.ts} +0 -0
- /package/spinner/{index.d.ts → types/spinner.d.ts} +0 -0
- /package/switch/{index.d.ts → types/switch.d.ts} +0 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, Component, Injectable } from '@angular/core';
|
|
3
|
+
import { HlmButton } from '@egose/shadcn-theme-ng/button';
|
|
4
|
+
import { HlmAlertIcon } from '@egose/shadcn-theme-ng/alert';
|
|
5
|
+
import * as i1 from '@egose/shadcn-theme-ng/dialog';
|
|
6
|
+
import { HlmDialogDescription, HlmDialogHeader, HlmDialogFooter, HlmDialogTitle } from '@egose/shadcn-theme-ng/dialog';
|
|
7
|
+
import { BrnDialogRef, injectBrnDialogContext } from '@spartan-ng/brain/dialog';
|
|
8
|
+
import { HlmIcon } from '@egose/shadcn-theme-ng/icon';
|
|
9
|
+
import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
10
|
+
import { lucideTriangleAlert } from '@ng-icons/lucide';
|
|
11
|
+
|
|
12
|
+
class EgConfirmationDialog {
|
|
13
|
+
_dialogRef = inject(BrnDialogRef);
|
|
14
|
+
_dialogContext = injectBrnDialogContext();
|
|
15
|
+
_title = this._dialogContext.title || 'Are you absolutely sure?';
|
|
16
|
+
_description = this._dialogContext.description || 'This action cannot be undone.';
|
|
17
|
+
close(confirm) {
|
|
18
|
+
this._dialogRef.close(confirm);
|
|
19
|
+
}
|
|
20
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EgConfirmationDialog, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
21
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.3", type: EgConfirmationDialog, isStandalone: true, selector: "ng-component", host: { classAttribute: "w-full p-1" }, providers: [provideIcons({ lucideTriangleAlert })], ngImport: i0, template: "\n <hlm-dialog-header>\n <div class=\"flex items-center gap-1\">\n <ng-icon hlm hlmAlertIcon name=\"lucideTriangleAlert\" size=\"base\" />\n <h3 hlmDialogTitle class=\"text-xl\">{{ _title }}</h3>\n </div>\n <p hlmDialogDescription class=\"text-base text-gray-700\">{{ _description }}</p>\n </hlm-dialog-header>\n\n <hlm-dialog-footer class=\"mt-4\">\n <button hlmButton variant=\"secondary\" appearance=\"outline\" (click)=\"close(false)\">Cancel</button>\n <button hlmButton variant=\"danger\" (click)=\"close(true)\">Confirm</button>\n </hlm-dialog-footer>\n ", isInline: true, dependencies: [{ kind: "component", type: HlmButton, selector: "button[hlmButton], a[hlmButton]", inputs: ["variant", "size", "appearance", "loading", "icon", "iconPosition", "class", "spinnerUserClass", "disabled", "type"] }, { kind: "directive", type: HlmAlertIcon, selector: "[hlmAlertIcon]" }, { kind: "directive", type: HlmDialogDescription, selector: "[hlmDialogDescription]" }, { kind: "directive", type: HlmDialogHeader, selector: "[hlmDialogHeader],hlm-dialog-header" }, { kind: "directive", type: HlmDialogFooter, selector: "[hlmDialogFooter],hlm-dialog-footer" }, { kind: "directive", type: HlmDialogTitle, selector: "[hlmDialogTitle]" }, { kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "directive", type: HlmIcon, selector: "ng-icon[hlm]", inputs: ["size"] }] });
|
|
22
|
+
}
|
|
23
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EgConfirmationDialog, decorators: [{
|
|
24
|
+
type: Component,
|
|
25
|
+
args: [{
|
|
26
|
+
imports: [
|
|
27
|
+
HlmButton,
|
|
28
|
+
HlmAlertIcon,
|
|
29
|
+
HlmDialogDescription,
|
|
30
|
+
HlmDialogHeader,
|
|
31
|
+
HlmDialogFooter,
|
|
32
|
+
HlmDialogTitle,
|
|
33
|
+
NgIcon,
|
|
34
|
+
HlmIcon,
|
|
35
|
+
],
|
|
36
|
+
standalone: true,
|
|
37
|
+
providers: [provideIcons({ lucideTriangleAlert })],
|
|
38
|
+
template: "\n <hlm-dialog-header>\n <div class=\"flex items-center gap-1\">\n <ng-icon hlm hlmAlertIcon name=\"lucideTriangleAlert\" size=\"base\" />\n <h3 hlmDialogTitle class=\"text-xl\">{{ _title }}</h3>\n </div>\n <p hlmDialogDescription class=\"text-base text-gray-700\">{{ _description }}</p>\n </hlm-dialog-header>\n\n <hlm-dialog-footer class=\"mt-4\">\n <button hlmButton variant=\"secondary\" appearance=\"outline\" (click)=\"close(false)\">Cancel</button>\n <button hlmButton variant=\"danger\" (click)=\"close(true)\">Confirm</button>\n </hlm-dialog-footer>\n ",
|
|
39
|
+
host: {
|
|
40
|
+
class: "w-full p-1",
|
|
41
|
+
},
|
|
42
|
+
}]
|
|
43
|
+
}] });
|
|
44
|
+
/** @deprecated Use `EgConfirmationDialog`. The misspelled name will be removed in the next major release. */
|
|
45
|
+
const EgConfirmationDiaglog = EgConfirmationDialog;
|
|
46
|
+
class EgConfirmationDialogService {
|
|
47
|
+
hlmDialogService;
|
|
48
|
+
constructor(hlmDialogService) {
|
|
49
|
+
this.hlmDialogService = hlmDialogService;
|
|
50
|
+
}
|
|
51
|
+
showConfirmationDialog({ title, description }) {
|
|
52
|
+
return new Promise((resolve) => {
|
|
53
|
+
const dialogRef = this.hlmDialogService.open(EgConfirmationDialog, {
|
|
54
|
+
context: { title, description },
|
|
55
|
+
contentClass: '',
|
|
56
|
+
});
|
|
57
|
+
dialogRef.closed$.subscribe((confirm) => {
|
|
58
|
+
resolve(confirm ?? false);
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EgConfirmationDialogService, deps: [{ token: i1.HlmDialogService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
63
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EgConfirmationDialogService, providedIn: 'root' });
|
|
64
|
+
}
|
|
65
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EgConfirmationDialogService, decorators: [{
|
|
66
|
+
type: Injectable,
|
|
67
|
+
args: [{ providedIn: 'root' }]
|
|
68
|
+
}], ctorParameters: () => [{ type: i1.HlmDialogService }] });
|
|
69
|
+
|
|
70
|
+
/*
|
|
71
|
+
* Public API Surface of confirmation-dialog
|
|
72
|
+
*/
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Generated bundle index. Do not edit.
|
|
76
|
+
*/
|
|
77
|
+
|
|
78
|
+
export { EgConfirmationDiaglog, EgConfirmationDialog, EgConfirmationDialogService };
|
|
79
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "confirmation-dialog",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "^20.3.0 || ^22.0.0",
|
|
6
|
+
"@angular/core": "^20.3.0 || ^22.0.0"
|
|
7
|
+
},
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"tslib": "^2.3.0"
|
|
10
|
+
},
|
|
11
|
+
"sideEffects": false,
|
|
12
|
+
"module": "fesm2022/confirmation-dialog.mjs",
|
|
13
|
+
"typings": "types/confirmation-dialog.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
"./package.json": {
|
|
16
|
+
"default": "./package.json"
|
|
17
|
+
},
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./types/confirmation-dialog.d.ts",
|
|
20
|
+
"default": "./fesm2022/confirmation-dialog.mjs"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"type": "module"
|
|
24
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { HlmDialogService } from '@egose/shadcn-theme-ng/dialog';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
|
|
4
|
+
declare class EgConfirmationDialog {
|
|
5
|
+
private readonly _dialogRef;
|
|
6
|
+
private readonly _dialogContext;
|
|
7
|
+
protected readonly _title: string;
|
|
8
|
+
protected readonly _description: string;
|
|
9
|
+
close(confirm: boolean): void;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EgConfirmationDialog, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EgConfirmationDialog, "ng-component", never, {}, {}, never, never, true, never>;
|
|
12
|
+
}
|
|
13
|
+
/** @deprecated Use `EgConfirmationDialog`. The misspelled name will be removed in the next major release. */
|
|
14
|
+
type EgConfirmationDiaglog = EgConfirmationDialog;
|
|
15
|
+
/** @deprecated Use `EgConfirmationDialog`. The misspelled name will be removed in the next major release. */
|
|
16
|
+
declare const EgConfirmationDiaglog: typeof EgConfirmationDialog;
|
|
17
|
+
declare class EgConfirmationDialogService {
|
|
18
|
+
private hlmDialogService;
|
|
19
|
+
constructor(hlmDialogService: HlmDialogService);
|
|
20
|
+
showConfirmationDialog({ title, description }: {
|
|
21
|
+
title: string;
|
|
22
|
+
description: string;
|
|
23
|
+
}): Promise<boolean>;
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EgConfirmationDialogService, never>;
|
|
25
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<EgConfirmationDialogService>;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export { EgConfirmationDiaglog, EgConfirmationDialog, EgConfirmationDialogService };
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, inject, input, booleanAttribute, computed, effect, forwardRef, Directive, NgModule } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/cdk/menu';
|
|
4
|
+
import { CdkContextMenuTrigger } from '@angular/cdk/menu';
|
|
5
|
+
import { createMenuPosition, MENU_SIDE } from '@spartan-ng/brain/core';
|
|
6
|
+
import { classes } from '@egose/shadcn-theme-ng/utils';
|
|
7
|
+
|
|
8
|
+
const defaultConfig = {
|
|
9
|
+
align: 'start',
|
|
10
|
+
side: 'bottom',
|
|
11
|
+
};
|
|
12
|
+
const HlmContextMenuConfigToken = new InjectionToken('HlmContextMenuConfig');
|
|
13
|
+
function provideHlmContextMenuConfig(config) {
|
|
14
|
+
return { provide: HlmContextMenuConfigToken, useValue: { ...defaultConfig, ...config } };
|
|
15
|
+
}
|
|
16
|
+
function injectHlmContextMenuConfig() {
|
|
17
|
+
return inject(HlmContextMenuConfigToken, { optional: true }) ?? defaultConfig;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
class HlmContextMenuTrigger {
|
|
21
|
+
_cdkTrigger = inject(CdkContextMenuTrigger, { host: true });
|
|
22
|
+
_config = injectHlmContextMenuConfig();
|
|
23
|
+
disabled = input(this._cdkTrigger.disabled, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
24
|
+
align = input(this._config.align, /* @ts-ignore */
|
|
25
|
+
...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
|
|
26
|
+
side = input(this._config.side, /* @ts-ignore */
|
|
27
|
+
...(ngDevMode ? [{ debugName: "side" }] : /* istanbul ignore next */ []));
|
|
28
|
+
_menuPosition = computed(() => createMenuPosition(this.align(), this.side()), /* @ts-ignore */
|
|
29
|
+
...(ngDevMode ? [{ debugName: "_menuPosition" }] : /* istanbul ignore next */ []));
|
|
30
|
+
constructor() {
|
|
31
|
+
// CDK sets transform-origin on the menu content (a shared hlm-dropdown-menu) from the resolved
|
|
32
|
+
// position; the content reads it to animate from the anchored corner and to derive its data-side.
|
|
33
|
+
// Cast tolerates @angular/cdk < 21.2 (we still support >=21.0), where the property is absent and
|
|
34
|
+
// the assignment is a harmless no-op.
|
|
35
|
+
this._cdkTrigger.transformOriginSelector = '[data-slot="dropdown-menu"]';
|
|
36
|
+
effect(() => {
|
|
37
|
+
this._cdkTrigger.menuPosition = this._menuPosition();
|
|
38
|
+
});
|
|
39
|
+
classes(() => "select-none");
|
|
40
|
+
}
|
|
41
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmContextMenuTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
42
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: HlmContextMenuTrigger, isStandalone: true, selector: "[hlmContextMenuTrigger]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, side: { classPropertyName: "side", publicName: "side", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "context-menu-trigger" }, properties: { "attr.data-disabled": "disabled() ? \"\" : null" } }, providers: [{ provide: MENU_SIDE, useExisting: forwardRef(() => HlmContextMenuTrigger) }], hostDirectives: [{ directive: i1.CdkContextMenuTrigger, inputs: ["cdkContextMenuTriggerFor", "hlmContextMenuTrigger", "cdkContextMenuTriggerData", "hlmContextMenuTriggerData", "cdkContextMenuDisabled", "disabled"], outputs: ["cdkContextMenuOpened", "hlmContextMenuOpened", "cdkContextMenuClosed", "hlmContextMenuClosed"] }], ngImport: i0 });
|
|
43
|
+
}
|
|
44
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmContextMenuTrigger, decorators: [{
|
|
45
|
+
type: Directive,
|
|
46
|
+
args: [{
|
|
47
|
+
selector: '[hlmContextMenuTrigger]',
|
|
48
|
+
providers: [{ provide: MENU_SIDE, useExisting: forwardRef(() => HlmContextMenuTrigger) }],
|
|
49
|
+
hostDirectives: [
|
|
50
|
+
{
|
|
51
|
+
directive: CdkContextMenuTrigger,
|
|
52
|
+
inputs: [
|
|
53
|
+
'cdkContextMenuTriggerFor: hlmContextMenuTrigger',
|
|
54
|
+
'cdkContextMenuTriggerData: hlmContextMenuTriggerData',
|
|
55
|
+
'cdkContextMenuDisabled: disabled',
|
|
56
|
+
],
|
|
57
|
+
outputs: ['cdkContextMenuOpened: hlmContextMenuOpened', 'cdkContextMenuClosed: hlmContextMenuClosed'],
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
host: {
|
|
61
|
+
'data-slot': 'context-menu-trigger',
|
|
62
|
+
'[attr.data-disabled]': 'disabled() ? "" : null',
|
|
63
|
+
},
|
|
64
|
+
}]
|
|
65
|
+
}], ctorParameters: () => [], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], side: [{ type: i0.Input, args: [{ isSignal: true, alias: "side", required: false }] }] } });
|
|
66
|
+
|
|
67
|
+
/*
|
|
68
|
+
* Public API Surface of context-menu
|
|
69
|
+
*/
|
|
70
|
+
const HlmContextMenuImports = [HlmContextMenuTrigger];
|
|
71
|
+
class HlmContextMenuModule {
|
|
72
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmContextMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
73
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.1.3", ngImport: i0, type: HlmContextMenuModule, imports: [HlmContextMenuTrigger], exports: [HlmContextMenuTrigger] });
|
|
74
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmContextMenuModule });
|
|
75
|
+
}
|
|
76
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmContextMenuModule, decorators: [{
|
|
77
|
+
type: NgModule,
|
|
78
|
+
args: [{
|
|
79
|
+
imports: [...HlmContextMenuImports],
|
|
80
|
+
exports: [...HlmContextMenuImports],
|
|
81
|
+
}]
|
|
82
|
+
}] });
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Generated bundle index. Do not edit.
|
|
86
|
+
*/
|
|
87
|
+
|
|
88
|
+
export { HlmContextMenuImports, HlmContextMenuModule, HlmContextMenuTrigger, injectHlmContextMenuConfig, provideHlmContextMenuConfig };
|
|
89
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "context-menu",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "^22.0.0",
|
|
6
|
+
"@angular/core": "^22.0.0",
|
|
7
|
+
"@spartan-ng/brain": "^1.1.1"
|
|
8
|
+
},
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"tslib": "^2.3.0"
|
|
11
|
+
},
|
|
12
|
+
"sideEffects": false,
|
|
13
|
+
"module": "fesm2022/context-menu.mjs",
|
|
14
|
+
"typings": "types/context-menu.d.ts",
|
|
15
|
+
"exports": {
|
|
16
|
+
"./package.json": {
|
|
17
|
+
"default": "./package.json"
|
|
18
|
+
},
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./types/context-menu.d.ts",
|
|
21
|
+
"default": "./fesm2022/context-menu.mjs"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"type": "module"
|
|
25
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { ValueProvider } from '@angular/core';
|
|
3
|
+
import { BooleanInput } from '@angular/cdk/coercion';
|
|
4
|
+
import { MenuAlign, MenuSide } from '@spartan-ng/brain/core';
|
|
5
|
+
import * as i1 from '@angular/cdk/menu';
|
|
6
|
+
|
|
7
|
+
declare class HlmContextMenuTrigger {
|
|
8
|
+
private readonly _cdkTrigger;
|
|
9
|
+
private readonly _config;
|
|
10
|
+
readonly disabled: i0.InputSignalWithTransform<boolean, BooleanInput>;
|
|
11
|
+
readonly align: i0.InputSignal<MenuAlign>;
|
|
12
|
+
readonly side: i0.InputSignal<MenuSide>;
|
|
13
|
+
private readonly _menuPosition;
|
|
14
|
+
constructor();
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HlmContextMenuTrigger, never>;
|
|
16
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<HlmContextMenuTrigger, "[hlmContextMenuTrigger]", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "align": { "alias": "align"; "required": false; "isSignal": true; }; "side": { "alias": "side"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.CdkContextMenuTrigger; inputs: { "cdkContextMenuTriggerFor": "hlmContextMenuTrigger"; "cdkContextMenuTriggerData": "hlmContextMenuTriggerData"; "cdkContextMenuDisabled": "disabled"; }; outputs: { "cdkContextMenuOpened": "hlmContextMenuOpened"; "cdkContextMenuClosed": "hlmContextMenuClosed"; }; }]>;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
interface HlmContextMenuConfig {
|
|
20
|
+
align: MenuAlign;
|
|
21
|
+
side: MenuSide;
|
|
22
|
+
}
|
|
23
|
+
declare function provideHlmContextMenuConfig(config: Partial<HlmContextMenuConfig>): ValueProvider;
|
|
24
|
+
declare function injectHlmContextMenuConfig(): HlmContextMenuConfig;
|
|
25
|
+
|
|
26
|
+
declare const HlmContextMenuImports: readonly [typeof HlmContextMenuTrigger];
|
|
27
|
+
declare class HlmContextMenuModule {
|
|
28
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HlmContextMenuModule, never>;
|
|
29
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<HlmContextMenuModule, never, [typeof HlmContextMenuTrigger], [typeof HlmContextMenuTrigger]>;
|
|
30
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<HlmContextMenuModule>;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export { HlmContextMenuImports, HlmContextMenuModule, HlmContextMenuTrigger, injectHlmContextMenuConfig, provideHlmContextMenuConfig };
|
|
34
|
+
export type { HlmContextMenuConfig };
|
package/date-picker/README.md
CHANGED
|
@@ -1,64 +1,3 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Date Picker Subpath
|
|
2
2
|
|
|
3
|
-
This project
|
|
4
|
-
|
|
5
|
-
## Code scaffolding
|
|
6
|
-
|
|
7
|
-
Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
ng generate component component-name
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
ng generate --help
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## Building
|
|
20
|
-
|
|
21
|
-
To build the library, run:
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
ng build date-picker
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
This command will compile your project, and the build artifacts will be placed in the `dist/` directory.
|
|
28
|
-
|
|
29
|
-
### Publishing the Library
|
|
30
|
-
|
|
31
|
-
Once the project is built, you can publish your library by following these steps:
|
|
32
|
-
|
|
33
|
-
1. Navigate to the `dist` directory:
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
cd dist/date-picker
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
2. Run the `npm publish` command to publish your library to the npm registry:
|
|
40
|
-
```bash
|
|
41
|
-
npm publish
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
## Running unit tests
|
|
45
|
-
|
|
46
|
-
To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
ng test
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
## Running end-to-end tests
|
|
53
|
-
|
|
54
|
-
For end-to-end (e2e) testing, run:
|
|
55
|
-
|
|
56
|
-
```bash
|
|
57
|
-
ng e2e
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
|
|
61
|
-
|
|
62
|
-
## Additional Resources
|
|
63
|
-
|
|
64
|
-
For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
|
|
3
|
+
This project ships only as `@egose/shadcn-theme-ng/date-picker` or `@egose/shadcn-theme-ng-tw/date-picker`. See the [package README](../../README.md) for installation, compatibility, Tailwind variant, test, and release guidance. Do not publish this project directory independently.
|