@edsis/ui 0.0.2
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 +40 -0
- package/accordion/README.md +195 -0
- package/alert/README.md +177 -0
- package/alert-dialog/README.md +239 -0
- package/aspect-ratio/README.md +112 -0
- package/avatar/README.md +176 -0
- package/badge/README.md +133 -0
- package/breadcrumb/README.md +216 -0
- package/button/README.md +139 -0
- package/button-group/README.md +204 -0
- package/calendar/README.md +132 -0
- package/card/README.md +220 -0
- package/carousel/README.md +276 -0
- package/chart/README.md +249 -0
- package/checkbox/README.md +149 -0
- package/collapsible/README.md +191 -0
- package/combobox/README.md +198 -0
- package/command/README.md +275 -0
- package/composer/README.md +235 -0
- package/context-menu/README.md +267 -0
- package/date-picker/README.md +177 -0
- package/dialog/README.md +237 -0
- package/drawer/README.md +145 -0
- package/dropdown-menu/README.md +311 -0
- package/editor/README.md +136 -0
- package/empty/README.md +183 -0
- package/fesm2022/edsis-ui-accordion.mjs +174 -0
- package/fesm2022/edsis-ui-accordion.mjs.map +1 -0
- package/fesm2022/edsis-ui-alert-dialog.mjs +242 -0
- package/fesm2022/edsis-ui-alert-dialog.mjs.map +1 -0
- package/fesm2022/edsis-ui-alert.mjs +90 -0
- package/fesm2022/edsis-ui-alert.mjs.map +1 -0
- package/fesm2022/edsis-ui-aspect-ratio.mjs +33 -0
- package/fesm2022/edsis-ui-aspect-ratio.mjs.map +1 -0
- package/fesm2022/edsis-ui-avatar.mjs +123 -0
- package/fesm2022/edsis-ui-avatar.mjs.map +1 -0
- package/fesm2022/edsis-ui-badge.mjs +47 -0
- package/fesm2022/edsis-ui-badge.mjs.map +1 -0
- package/fesm2022/edsis-ui-breadcrumb.mjs +186 -0
- package/fesm2022/edsis-ui-breadcrumb.mjs.map +1 -0
- package/fesm2022/edsis-ui-button-group.mjs +95 -0
- package/fesm2022/edsis-ui-button-group.mjs.map +1 -0
- package/fesm2022/edsis-ui-button.mjs +64 -0
- package/fesm2022/edsis-ui-button.mjs.map +1 -0
- package/fesm2022/edsis-ui-calendar.mjs +78 -0
- package/fesm2022/edsis-ui-calendar.mjs.map +1 -0
- package/fesm2022/edsis-ui-card.mjs +137 -0
- package/fesm2022/edsis-ui-card.mjs.map +1 -0
- package/fesm2022/edsis-ui-carousel.mjs +310 -0
- package/fesm2022/edsis-ui-carousel.mjs.map +1 -0
- package/fesm2022/edsis-ui-chart-area.mjs +6 -0
- package/fesm2022/edsis-ui-chart-area.mjs.map +1 -0
- package/fesm2022/edsis-ui-chart-bar.mjs +6 -0
- package/fesm2022/edsis-ui-chart-bar.mjs.map +1 -0
- package/fesm2022/edsis-ui-chart-line.mjs +6 -0
- package/fesm2022/edsis-ui-chart-line.mjs.map +1 -0
- package/fesm2022/edsis-ui-chart-pie.mjs +6 -0
- package/fesm2022/edsis-ui-chart-pie.mjs.map +1 -0
- package/fesm2022/edsis-ui-chart-radar.mjs +6 -0
- package/fesm2022/edsis-ui-chart-radar.mjs.map +1 -0
- package/fesm2022/edsis-ui-chart-radial.mjs +6 -0
- package/fesm2022/edsis-ui-chart-radial.mjs.map +1 -0
- package/fesm2022/edsis-ui-chart-scatter.mjs +6 -0
- package/fesm2022/edsis-ui-chart-scatter.mjs.map +1 -0
- package/fesm2022/edsis-ui-chart.mjs +3714 -0
- package/fesm2022/edsis-ui-chart.mjs.map +1 -0
- package/fesm2022/edsis-ui-checkbox.mjs +104 -0
- package/fesm2022/edsis-ui-checkbox.mjs.map +1 -0
- package/fesm2022/edsis-ui-collapsible.mjs +116 -0
- package/fesm2022/edsis-ui-collapsible.mjs.map +1 -0
- package/fesm2022/edsis-ui-combobox.mjs +263 -0
- package/fesm2022/edsis-ui-combobox.mjs.map +1 -0
- package/fesm2022/edsis-ui-command.mjs +268 -0
- package/fesm2022/edsis-ui-command.mjs.map +1 -0
- package/fesm2022/edsis-ui-composer.mjs +329 -0
- package/fesm2022/edsis-ui-composer.mjs.map +1 -0
- package/fesm2022/edsis-ui-context-menu.mjs +100 -0
- package/fesm2022/edsis-ui-context-menu.mjs.map +1 -0
- package/fesm2022/edsis-ui-date-picker.mjs +155 -0
- package/fesm2022/edsis-ui-date-picker.mjs.map +1 -0
- package/fesm2022/edsis-ui-dialog.mjs +262 -0
- package/fesm2022/edsis-ui-dialog.mjs.map +1 -0
- package/fesm2022/edsis-ui-drawer.mjs +6 -0
- package/fesm2022/edsis-ui-drawer.mjs.map +1 -0
- package/fesm2022/edsis-ui-dropdown-menu.mjs +466 -0
- package/fesm2022/edsis-ui-dropdown-menu.mjs.map +1 -0
- package/fesm2022/edsis-ui-editor.mjs +692 -0
- package/fesm2022/edsis-ui-editor.mjs.map +1 -0
- package/fesm2022/edsis-ui-empty.mjs +132 -0
- package/fesm2022/edsis-ui-empty.mjs.map +1 -0
- package/fesm2022/edsis-ui-form.mjs +334 -0
- package/fesm2022/edsis-ui-form.mjs.map +1 -0
- package/fesm2022/edsis-ui-hover-card.mjs +284 -0
- package/fesm2022/edsis-ui-hover-card.mjs.map +1 -0
- package/fesm2022/edsis-ui-input-group.mjs +164 -0
- package/fesm2022/edsis-ui-input-group.mjs.map +1 -0
- package/fesm2022/edsis-ui-input-otp.mjs +485 -0
- package/fesm2022/edsis-ui-input-otp.mjs.map +1 -0
- package/fesm2022/edsis-ui-input.mjs +43 -0
- package/fesm2022/edsis-ui-input.mjs.map +1 -0
- package/fesm2022/edsis-ui-item.mjs +241 -0
- package/fesm2022/edsis-ui-item.mjs.map +1 -0
- package/fesm2022/edsis-ui-kanban.mjs +289 -0
- package/fesm2022/edsis-ui-kanban.mjs.map +1 -0
- package/fesm2022/edsis-ui-kbd.mjs +51 -0
- package/fesm2022/edsis-ui-kbd.mjs.map +1 -0
- package/fesm2022/edsis-ui-label.mjs +30 -0
- package/fesm2022/edsis-ui-label.mjs.map +1 -0
- package/fesm2022/edsis-ui-menubar.mjs +302 -0
- package/fesm2022/edsis-ui-menubar.mjs.map +1 -0
- package/fesm2022/edsis-ui-native-select.mjs +61 -0
- package/fesm2022/edsis-ui-native-select.mjs.map +1 -0
- package/fesm2022/edsis-ui-navigation-menu.mjs +399 -0
- package/fesm2022/edsis-ui-navigation-menu.mjs.map +1 -0
- package/fesm2022/edsis-ui-pagination.mjs +216 -0
- package/fesm2022/edsis-ui-pagination.mjs.map +1 -0
- package/fesm2022/edsis-ui-pillbox.mjs +777 -0
- package/fesm2022/edsis-ui-pillbox.mjs.map +1 -0
- package/fesm2022/edsis-ui-popover.mjs +163 -0
- package/fesm2022/edsis-ui-popover.mjs.map +1 -0
- package/fesm2022/edsis-ui-progress.mjs +53 -0
- package/fesm2022/edsis-ui-progress.mjs.map +1 -0
- package/fesm2022/edsis-ui-radio.mjs +111 -0
- package/fesm2022/edsis-ui-radio.mjs.map +1 -0
- package/fesm2022/edsis-ui-resizable.mjs +454 -0
- package/fesm2022/edsis-ui-resizable.mjs.map +1 -0
- package/fesm2022/edsis-ui-scroll-area.mjs +48 -0
- package/fesm2022/edsis-ui-scroll-area.mjs.map +1 -0
- package/fesm2022/edsis-ui-select.mjs +164 -0
- package/fesm2022/edsis-ui-select.mjs.map +1 -0
- package/fesm2022/edsis-ui-separator.mjs +33 -0
- package/fesm2022/edsis-ui-separator.mjs.map +1 -0
- package/fesm2022/edsis-ui-sheet.mjs +264 -0
- package/fesm2022/edsis-ui-sheet.mjs.map +1 -0
- package/fesm2022/edsis-ui-skeleton.mjs +29 -0
- package/fesm2022/edsis-ui-skeleton.mjs.map +1 -0
- package/fesm2022/edsis-ui-slider.mjs +405 -0
- package/fesm2022/edsis-ui-slider.mjs.map +1 -0
- package/fesm2022/edsis-ui-spinner.mjs +58 -0
- package/fesm2022/edsis-ui-spinner.mjs.map +1 -0
- package/fesm2022/edsis-ui-switch.mjs +107 -0
- package/fesm2022/edsis-ui-switch.mjs.map +1 -0
- package/fesm2022/edsis-ui-table.mjs +139 -0
- package/fesm2022/edsis-ui-table.mjs.map +1 -0
- package/fesm2022/edsis-ui-tabs.mjs +252 -0
- package/fesm2022/edsis-ui-tabs.mjs.map +1 -0
- package/fesm2022/edsis-ui-textarea.mjs +37 -0
- package/fesm2022/edsis-ui-textarea.mjs.map +1 -0
- package/fesm2022/edsis-ui-timeline.mjs +213 -0
- package/fesm2022/edsis-ui-timeline.mjs.map +1 -0
- package/fesm2022/edsis-ui-toast.mjs +71 -0
- package/fesm2022/edsis-ui-toast.mjs.map +1 -0
- package/fesm2022/edsis-ui-toggle-group.mjs +269 -0
- package/fesm2022/edsis-ui-toggle-group.mjs.map +1 -0
- package/fesm2022/edsis-ui-toggle.mjs +76 -0
- package/fesm2022/edsis-ui-toggle.mjs.map +1 -0
- package/fesm2022/edsis-ui-tooltip.mjs +339 -0
- package/fesm2022/edsis-ui-tooltip.mjs.map +1 -0
- package/fesm2022/edsis-ui-utils.mjs +13 -0
- package/fesm2022/edsis-ui-utils.mjs.map +1 -0
- package/fesm2022/edsis-ui.mjs +11 -0
- package/fesm2022/edsis-ui.mjs.map +1 -0
- package/form/README.md +210 -0
- package/hover-card/README.md +146 -0
- package/input/README.md +159 -0
- package/input-group/README.md +234 -0
- package/input-otp/README.md +273 -0
- package/item/README.md +247 -0
- package/kanban/README.md +81 -0
- package/kbd/README.md +139 -0
- package/label/README.md +136 -0
- package/menubar/README.md +269 -0
- package/native-select/README.md +176 -0
- package/navigation-menu/README.md +160 -0
- package/package.json +310 -0
- package/pagination/README.md +144 -0
- package/pillbox/README.md +67 -0
- package/popover/README.md +43 -0
- package/progress/README.md +160 -0
- package/radio/README.md +209 -0
- package/resizable/README.md +164 -0
- package/scroll-area/README.md +143 -0
- package/select/README.md +174 -0
- package/separator/README.md +170 -0
- package/sheet/README.md +183 -0
- package/skeleton/README.md +158 -0
- package/slider/README.md +207 -0
- package/spinner/README.md +160 -0
- package/switch/README.md +166 -0
- package/table/README.md +291 -0
- package/tabs/README.md +214 -0
- package/textarea/README.md +154 -0
- package/timeline/README.md +94 -0
- package/toast/README.md +321 -0
- package/toggle/README.md +131 -0
- package/toggle-group/README.md +206 -0
- package/tooltip/README.md +211 -0
- package/types/edsis-ui-accordion.d.ts +51 -0
- package/types/edsis-ui-alert-dialog.d.ts +93 -0
- package/types/edsis-ui-alert.d.ts +37 -0
- package/types/edsis-ui-aspect-ratio.d.ts +12 -0
- package/types/edsis-ui-avatar.d.ts +51 -0
- package/types/edsis-ui-badge.d.ts +19 -0
- package/types/edsis-ui-breadcrumb.d.ts +46 -0
- package/types/edsis-ui-button-group.d.ts +26 -0
- package/types/edsis-ui-button.d.ts +22 -0
- package/types/edsis-ui-calendar.d.ts +33 -0
- package/types/edsis-ui-card.d.ts +60 -0
- package/types/edsis-ui-carousel.d.ts +86 -0
- package/types/edsis-ui-chart-area.d.ts +1 -0
- package/types/edsis-ui-chart-bar.d.ts +1 -0
- package/types/edsis-ui-chart-line.d.ts +1 -0
- package/types/edsis-ui-chart-pie.d.ts +1 -0
- package/types/edsis-ui-chart-radar.d.ts +1 -0
- package/types/edsis-ui-chart-radial.d.ts +1 -0
- package/types/edsis-ui-chart-scatter.d.ts +1 -0
- package/types/edsis-ui-chart.d.ts +1094 -0
- package/types/edsis-ui-checkbox.d.ts +35 -0
- package/types/edsis-ui-collapsible.d.ts +42 -0
- package/types/edsis-ui-combobox.d.ts +51 -0
- package/types/edsis-ui-command.d.ts +99 -0
- package/types/edsis-ui-composer.d.ts +90 -0
- package/types/edsis-ui-context-menu.d.ts +35 -0
- package/types/edsis-ui-date-picker.d.ts +41 -0
- package/types/edsis-ui-dialog.d.ts +87 -0
- package/types/edsis-ui-drawer.d.ts +1 -0
- package/types/edsis-ui-dropdown-menu.d.ts +136 -0
- package/types/edsis-ui-editor.d.ts +123 -0
- package/types/edsis-ui-empty.d.ts +50 -0
- package/types/edsis-ui-form.d.ts +141 -0
- package/types/edsis-ui-hover-card.d.ts +74 -0
- package/types/edsis-ui-input-group.d.ts +51 -0
- package/types/edsis-ui-input-otp.d.ts +136 -0
- package/types/edsis-ui-input.d.ts +16 -0
- package/types/edsis-ui-item.d.ts +88 -0
- package/types/edsis-ui-kanban.d.ts +70 -0
- package/types/edsis-ui-kbd.d.ts +16 -0
- package/types/edsis-ui-label.d.ts +11 -0
- package/types/edsis-ui-menubar.d.ts +67 -0
- package/types/edsis-ui-native-select.d.ts +26 -0
- package/types/edsis-ui-navigation-menu.d.ts +96 -0
- package/types/edsis-ui-pagination.d.ts +34 -0
- package/types/edsis-ui-pillbox.d.ts +157 -0
- package/types/edsis-ui-popover.d.ts +43 -0
- package/types/edsis-ui-progress.d.ts +17 -0
- package/types/edsis-ui-radio.d.ts +40 -0
- package/types/edsis-ui-resizable.d.ts +99 -0
- package/types/edsis-ui-scroll-area.d.ts +19 -0
- package/types/edsis-ui-select.d.ts +57 -0
- package/types/edsis-ui-separator.d.ts +14 -0
- package/types/edsis-ui-sheet.d.ts +76 -0
- package/types/edsis-ui-skeleton.d.ts +10 -0
- package/types/edsis-ui-slider.d.ts +74 -0
- package/types/edsis-ui-spinner.d.ts +13 -0
- package/types/edsis-ui-switch.d.ts +40 -0
- package/types/edsis-ui-table.d.ts +52 -0
- package/types/edsis-ui-tabs.d.ts +92 -0
- package/types/edsis-ui-textarea.d.ts +12 -0
- package/types/edsis-ui-timeline.d.ts +63 -0
- package/types/edsis-ui-toast.d.ts +38 -0
- package/types/edsis-ui-toggle-group.d.ts +89 -0
- package/types/edsis-ui-toggle.d.ts +25 -0
- package/types/edsis-ui-tooltip.d.ts +89 -0
- package/types/edsis-ui-utils.d.ts +5 -0
- package/types/edsis-ui.d.ts +2 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { cn } from '@edsis/ui/utils';
|
|
4
|
+
import { cva } from 'class-variance-authority';
|
|
5
|
+
|
|
6
|
+
const badgeVariants = cva([
|
|
7
|
+
'inline-flex items-center gap-1 rounded-full border border-border px-2.5 py-0.5',
|
|
8
|
+
'text-xs font-semibold transition-colors',
|
|
9
|
+
'[&>svg]:size-3 [&>svg]:shrink-0',
|
|
10
|
+
'focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2',
|
|
11
|
+
].join(' '), {
|
|
12
|
+
variants: {
|
|
13
|
+
variant: {
|
|
14
|
+
default: 'border-transparent bg-primary text-primary-foreground hover:bg-primary/80',
|
|
15
|
+
secondary: 'border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80',
|
|
16
|
+
destructive: 'border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80',
|
|
17
|
+
outline: 'bg-transparent text-foreground',
|
|
18
|
+
ghost: 'border-transparent bg-transparent text-foreground hover:bg-accent hover:text-accent-foreground',
|
|
19
|
+
link: 'border-transparent bg-transparent text-foreground underline-offset-4 hover:underline',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
defaultVariants: { variant: 'default' },
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
class BadgeComponent {
|
|
26
|
+
variant = input('default', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
27
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
28
|
+
classes = computed(() => cn(badgeVariants({ variant: this.variant() }), this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
29
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: BadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
30
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.14", type: BadgeComponent, isStandalone: true, selector: "ui-badge, [ui-badge]", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
31
|
+
}
|
|
32
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: BadgeComponent, decorators: [{
|
|
33
|
+
type: Component,
|
|
34
|
+
args: [{
|
|
35
|
+
selector: 'ui-badge, [ui-badge]',
|
|
36
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
37
|
+
host: { '[class]': 'classes()' },
|
|
38
|
+
template: `<ng-content />`,
|
|
39
|
+
}]
|
|
40
|
+
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Generated bundle index. Do not edit.
|
|
44
|
+
*/
|
|
45
|
+
|
|
46
|
+
export { BadgeComponent, badgeVariants };
|
|
47
|
+
//# sourceMappingURL=edsis-ui-badge.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edsis-ui-badge.mjs","sources":["../../../library/ui/badge/badge.variants.ts","../../../library/ui/badge/badge.component.ts","../../../library/ui/badge/edsis-ui-badge.ts"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\n\nexport const badgeVariants = cva(\n [\n 'inline-flex items-center gap-1 rounded-full border border-border px-2.5 py-0.5',\n 'text-xs font-semibold transition-colors',\n '[&>svg]:size-3 [&>svg]:shrink-0',\n 'focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2',\n ].join(' '),\n {\n variants: {\n variant: {\n default: 'border-transparent bg-primary text-primary-foreground hover:bg-primary/80',\n secondary: 'border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80',\n destructive: 'border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80',\n outline: 'bg-transparent text-foreground',\n ghost: 'border-transparent bg-transparent text-foreground hover:bg-accent hover:text-accent-foreground',\n link: 'border-transparent bg-transparent text-foreground underline-offset-4 hover:underline',\n },\n },\n defaultVariants: { variant: 'default' },\n },\n);\n\nexport type BadgeVariant = NonNullable<VariantProps<typeof badgeVariants>['variant']>;\n","import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { cn } from '@edsis/ui/utils';\nimport { badgeVariants, type BadgeVariant } from './badge.variants';\n\n@Component({\n selector: 'ui-badge, [ui-badge]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { '[class]': 'classes()' },\n template: `<ng-content />`,\n})\nexport class BadgeComponent {\n readonly variant = input<BadgeVariant>('default');\n readonly class = input<string>('');\n\n protected readonly classes = computed(() => cn(badgeVariants({ variant: this.variant() }), this.class()));\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAEO,MAAM,aAAa,GAAG,GAAG,CAC9B;IACE,gFAAgF;IAChF,yCAAyC;IACzC,iCAAiC;IACjC,qEAAqE;AACtE,CAAA,CAAC,IAAI,CAAC,GAAG,CAAC,EACX;AACE,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAE,2EAA2E;AACpF,YAAA,SAAS,EAAE,iFAAiF;AAC5F,YAAA,WAAW,EAAE,uFAAuF;AACpG,YAAA,OAAO,EAAE,gCAAgC;AACzC,YAAA,KAAK,EAAE,gGAAgG;AACvG,YAAA,IAAI,EAAE,sFAAsF;AAC7F,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;AACxC,CAAA;;MCXU,cAAc,CAAA;AAChB,IAAA,OAAO,GAAG,KAAK,CAAe,SAAS,8EAAC;AACxC,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,4EAAC;IAEf,OAAO,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,SAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAC;wGAJ9F,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAd,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,cAAc,kYAFf,CAAA,cAAA,CAAgB,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAEf,cAAc,EAAA,UAAA,EAAA,CAAA;kBAN1B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,sBAAsB;oBAChC,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,IAAI,EAAE,EAAE,SAAS,EAAE,WAAW,EAAE;AAChC,oBAAA,QAAQ,EAAE,CAAA,cAAA,CAAgB;AAC3B,iBAAA;;;ACTD;;AAEG;;;;"}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { cn } from '@edsis/ui/utils';
|
|
4
|
+
|
|
5
|
+
class BreadcrumbComponent {
|
|
6
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
7
|
+
classes = computed(() => cn('block', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
8
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: BreadcrumbComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.14", type: BreadcrumbComponent, isStandalone: true, selector: "ui-breadcrumb, nav[ui-breadcrumb]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.aria-label": "\"breadcrumb\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
10
|
+
}
|
|
11
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: BreadcrumbComponent, decorators: [{
|
|
12
|
+
type: Component,
|
|
13
|
+
args: [{
|
|
14
|
+
selector: 'ui-breadcrumb, nav[ui-breadcrumb]',
|
|
15
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
16
|
+
host: {
|
|
17
|
+
'[class]': 'classes()',
|
|
18
|
+
'[attr.aria-label]': '"breadcrumb"',
|
|
19
|
+
},
|
|
20
|
+
template: `<ng-content />`,
|
|
21
|
+
}]
|
|
22
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
23
|
+
class BreadcrumbListComponent {
|
|
24
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
25
|
+
classes = computed(() => cn('flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
26
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: BreadcrumbListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
27
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.14", type: BreadcrumbListComponent, isStandalone: true, selector: "ol[ui-breadcrumb-list]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
28
|
+
}
|
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: BreadcrumbListComponent, decorators: [{
|
|
30
|
+
type: Component,
|
|
31
|
+
args: [{
|
|
32
|
+
selector: 'ol[ui-breadcrumb-list]',
|
|
33
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
34
|
+
host: { '[class]': 'classes()' },
|
|
35
|
+
template: `<ng-content />`,
|
|
36
|
+
}]
|
|
37
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
38
|
+
class BreadcrumbItemComponent {
|
|
39
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
40
|
+
classes = computed(() => cn('inline-flex items-center gap-1.5', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
41
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: BreadcrumbItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
42
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.14", type: BreadcrumbItemComponent, isStandalone: true, selector: "li[ui-breadcrumb-item]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
43
|
+
}
|
|
44
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: BreadcrumbItemComponent, decorators: [{
|
|
45
|
+
type: Component,
|
|
46
|
+
args: [{
|
|
47
|
+
selector: 'li[ui-breadcrumb-item]',
|
|
48
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
49
|
+
host: { '[class]': 'classes()' },
|
|
50
|
+
template: `<ng-content />`,
|
|
51
|
+
}]
|
|
52
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
53
|
+
class BreadcrumbLinkComponent {
|
|
54
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
55
|
+
classes = computed(() => cn('transition-colors hover:text-foreground', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
56
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: BreadcrumbLinkComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
57
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.14", type: BreadcrumbLinkComponent, isStandalone: true, selector: "a[ui-breadcrumb-link]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
58
|
+
}
|
|
59
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: BreadcrumbLinkComponent, decorators: [{
|
|
60
|
+
type: Component,
|
|
61
|
+
args: [{
|
|
62
|
+
selector: 'a[ui-breadcrumb-link]',
|
|
63
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
64
|
+
host: { '[class]': 'classes()' },
|
|
65
|
+
template: `<ng-content />`,
|
|
66
|
+
}]
|
|
67
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
68
|
+
class BreadcrumbPageComponent {
|
|
69
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
70
|
+
classes = computed(() => cn('font-normal text-foreground', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
71
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: BreadcrumbPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
72
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.14", type: BreadcrumbPageComponent, isStandalone: true, selector: "span[ui-breadcrumb-page]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "link", "aria-disabled": "true", "aria-current": "page" }, properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
73
|
+
}
|
|
74
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: BreadcrumbPageComponent, decorators: [{
|
|
75
|
+
type: Component,
|
|
76
|
+
args: [{
|
|
77
|
+
selector: 'span[ui-breadcrumb-page]',
|
|
78
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
79
|
+
host: {
|
|
80
|
+
'[class]': 'classes()',
|
|
81
|
+
role: 'link',
|
|
82
|
+
'aria-disabled': 'true',
|
|
83
|
+
'aria-current': 'page',
|
|
84
|
+
},
|
|
85
|
+
template: `<ng-content />`,
|
|
86
|
+
}]
|
|
87
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
88
|
+
class BreadcrumbSeparatorComponent {
|
|
89
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
90
|
+
classes = computed(() => cn('[&>svg]:size-3.5', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
91
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: BreadcrumbSeparatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
92
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.14", type: BreadcrumbSeparatorComponent, isStandalone: true, selector: "li[ui-breadcrumb-separator]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "presentation", "aria-hidden": "true" }, properties: { "class": "classes()" } }, ngImport: i0, template: `
|
|
93
|
+
<ng-content>
|
|
94
|
+
<svg
|
|
95
|
+
class="h-3.5 w-3.5"
|
|
96
|
+
viewBox="0 0 24 24"
|
|
97
|
+
fill="none"
|
|
98
|
+
stroke="currentColor"
|
|
99
|
+
stroke-width="2"
|
|
100
|
+
stroke-linecap="round"
|
|
101
|
+
stroke-linejoin="round">
|
|
102
|
+
<polyline points="9 18 15 12 9 6" />
|
|
103
|
+
</svg>
|
|
104
|
+
</ng-content>
|
|
105
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
106
|
+
}
|
|
107
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: BreadcrumbSeparatorComponent, decorators: [{
|
|
108
|
+
type: Component,
|
|
109
|
+
args: [{
|
|
110
|
+
selector: 'li[ui-breadcrumb-separator]',
|
|
111
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
112
|
+
host: {
|
|
113
|
+
'[class]': 'classes()',
|
|
114
|
+
role: 'presentation',
|
|
115
|
+
'aria-hidden': 'true',
|
|
116
|
+
},
|
|
117
|
+
template: `
|
|
118
|
+
<ng-content>
|
|
119
|
+
<svg
|
|
120
|
+
class="h-3.5 w-3.5"
|
|
121
|
+
viewBox="0 0 24 24"
|
|
122
|
+
fill="none"
|
|
123
|
+
stroke="currentColor"
|
|
124
|
+
stroke-width="2"
|
|
125
|
+
stroke-linecap="round"
|
|
126
|
+
stroke-linejoin="round">
|
|
127
|
+
<polyline points="9 18 15 12 9 6" />
|
|
128
|
+
</svg>
|
|
129
|
+
</ng-content>
|
|
130
|
+
`,
|
|
131
|
+
}]
|
|
132
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
133
|
+
class BreadcrumbEllipsisComponent {
|
|
134
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
135
|
+
classes = computed(() => cn('relative flex h-9 w-9 items-center justify-center', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
136
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: BreadcrumbEllipsisComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
137
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.14", type: BreadcrumbEllipsisComponent, isStandalone: true, selector: "span[ui-breadcrumb-ellipsis]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "presentation", "aria-hidden": "true" }, properties: { "class": "classes()" } }, ngImport: i0, template: `
|
|
138
|
+
<svg
|
|
139
|
+
class="h-4 w-4"
|
|
140
|
+
viewBox="0 0 24 24"
|
|
141
|
+
fill="none"
|
|
142
|
+
stroke="currentColor"
|
|
143
|
+
stroke-width="2"
|
|
144
|
+
stroke-linecap="round"
|
|
145
|
+
stroke-linejoin="round">
|
|
146
|
+
<circle cx="12" cy="12" r="1" />
|
|
147
|
+
<circle cx="19" cy="12" r="1" />
|
|
148
|
+
<circle cx="5" cy="12" r="1" />
|
|
149
|
+
</svg>
|
|
150
|
+
<span class="sr-only">More</span>
|
|
151
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
152
|
+
}
|
|
153
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: BreadcrumbEllipsisComponent, decorators: [{
|
|
154
|
+
type: Component,
|
|
155
|
+
args: [{
|
|
156
|
+
selector: 'span[ui-breadcrumb-ellipsis]',
|
|
157
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
158
|
+
host: {
|
|
159
|
+
'[class]': 'classes()',
|
|
160
|
+
role: 'presentation',
|
|
161
|
+
'aria-hidden': 'true',
|
|
162
|
+
},
|
|
163
|
+
template: `
|
|
164
|
+
<svg
|
|
165
|
+
class="h-4 w-4"
|
|
166
|
+
viewBox="0 0 24 24"
|
|
167
|
+
fill="none"
|
|
168
|
+
stroke="currentColor"
|
|
169
|
+
stroke-width="2"
|
|
170
|
+
stroke-linecap="round"
|
|
171
|
+
stroke-linejoin="round">
|
|
172
|
+
<circle cx="12" cy="12" r="1" />
|
|
173
|
+
<circle cx="19" cy="12" r="1" />
|
|
174
|
+
<circle cx="5" cy="12" r="1" />
|
|
175
|
+
</svg>
|
|
176
|
+
<span class="sr-only">More</span>
|
|
177
|
+
`,
|
|
178
|
+
}]
|
|
179
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Generated bundle index. Do not edit.
|
|
183
|
+
*/
|
|
184
|
+
|
|
185
|
+
export { BreadcrumbComponent, BreadcrumbEllipsisComponent, BreadcrumbItemComponent, BreadcrumbLinkComponent, BreadcrumbListComponent, BreadcrumbPageComponent, BreadcrumbSeparatorComponent };
|
|
186
|
+
//# sourceMappingURL=edsis-ui-breadcrumb.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edsis-ui-breadcrumb.mjs","sources":["../../../library/ui/breadcrumb/breadcrumb.component.ts","../../../library/ui/breadcrumb/edsis-ui-breadcrumb.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { cn } from '@edsis/ui/utils';\n\n@Component({\n selector: 'ui-breadcrumb, nav[ui-breadcrumb]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n '[attr.aria-label]': '\"breadcrumb\"',\n },\n template: `<ng-content />`,\n})\nexport class BreadcrumbComponent {\n readonly class = input<string>('');\n protected readonly classes = computed(() => cn('block', this.class()));\n}\n\n@Component({\n selector: 'ol[ui-breadcrumb-list]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { '[class]': 'classes()' },\n template: `<ng-content />`,\n})\nexport class BreadcrumbListComponent {\n readonly class = input<string>('');\n protected readonly classes = computed(() =>\n cn('flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5', this.class()),\n );\n}\n\n@Component({\n selector: 'li[ui-breadcrumb-item]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { '[class]': 'classes()' },\n template: `<ng-content />`,\n})\nexport class BreadcrumbItemComponent {\n readonly class = input<string>('');\n protected readonly classes = computed(() => cn('inline-flex items-center gap-1.5', this.class()));\n}\n\n@Component({\n selector: 'a[ui-breadcrumb-link]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { '[class]': 'classes()' },\n template: `<ng-content />`,\n})\nexport class BreadcrumbLinkComponent {\n readonly class = input<string>('');\n protected readonly classes = computed(() => cn('transition-colors hover:text-foreground', this.class()));\n}\n\n@Component({\n selector: 'span[ui-breadcrumb-page]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n role: 'link',\n 'aria-disabled': 'true',\n 'aria-current': 'page',\n },\n template: `<ng-content />`,\n})\nexport class BreadcrumbPageComponent {\n readonly class = input<string>('');\n protected readonly classes = computed(() => cn('font-normal text-foreground', this.class()));\n}\n\n@Component({\n selector: 'li[ui-breadcrumb-separator]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n role: 'presentation',\n 'aria-hidden': 'true',\n },\n template: `\n <ng-content>\n <svg\n class=\"h-3.5 w-3.5\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\">\n <polyline points=\"9 18 15 12 9 6\" />\n </svg>\n </ng-content>\n `,\n})\nexport class BreadcrumbSeparatorComponent {\n readonly class = input<string>('');\n protected readonly classes = computed(() => cn('[&>svg]:size-3.5', this.class()));\n}\n\n@Component({\n selector: 'span[ui-breadcrumb-ellipsis]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n role: 'presentation',\n 'aria-hidden': 'true',\n },\n template: `\n <svg\n class=\"h-4 w-4\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\">\n <circle cx=\"12\" cy=\"12\" r=\"1\" />\n <circle cx=\"19\" cy=\"12\" r=\"1\" />\n <circle cx=\"5\" cy=\"12\" r=\"1\" />\n </svg>\n <span class=\"sr-only\">More</span>\n `,\n})\nexport class BreadcrumbEllipsisComponent {\n readonly class = input<string>('');\n protected readonly classes = computed(() => cn('relative flex h-9 w-9 items-center justify-center', this.class()));\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAYa,mBAAmB,CAAA;AACrB,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,4EAAC;AACf,IAAA,OAAO,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,8EAAC;wGAF3D,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAnB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA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,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,WAAW;AACtB,wBAAA,IAAI,EAAE,cAAc;AACpB,wBAAA,aAAa,EAAE,MAAM;AACtB,qBAAA;AACD,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;AAcT,EAAA,CAAA;AACF,iBAAA;;;ACvHD;;AAEG;;;;"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { cn } from '@edsis/ui/utils';
|
|
4
|
+
|
|
5
|
+
const BUTTON_GROUP_BASE = [
|
|
6
|
+
'inline-flex w-fit items-stretch',
|
|
7
|
+
'has-[>[data-slot=button-group]]:gap-2',
|
|
8
|
+
'[&>*]:focus-visible:relative [&>*]:focus-visible:z-10',
|
|
9
|
+
'[&>input]:flex-1 [&>textarea]:flex-1',
|
|
10
|
+
'[&>ui-input-group]:min-w-0 [&>ui-input-group]:flex-1',
|
|
11
|
+
].join(' ');
|
|
12
|
+
const buttonGroupOrientationClasses = {
|
|
13
|
+
horizontal: [
|
|
14
|
+
'[&>*:not(:first-child)]:rounded-s-none',
|
|
15
|
+
'[&>*:not(:first-child)]:[border-inline-start-width:0]',
|
|
16
|
+
'[&>*:not(:last-child)]:rounded-e-none',
|
|
17
|
+
].join(' '),
|
|
18
|
+
vertical: [
|
|
19
|
+
'flex-col',
|
|
20
|
+
'[&>*:not(:first-child)]:rounded-t-none',
|
|
21
|
+
'[&>*:not(:first-child)]:border-t-0',
|
|
22
|
+
'[&>*:not(:last-child)]:rounded-b-none',
|
|
23
|
+
].join(' '),
|
|
24
|
+
};
|
|
25
|
+
class ButtonGroupComponent {
|
|
26
|
+
orientation = input('horizontal', ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
27
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
28
|
+
classes = computed(() => cn(BUTTON_GROUP_BASE, buttonGroupOrientationClasses[this.orientation()], this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
29
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ButtonGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
30
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.14", type: ButtonGroupComponent, isStandalone: true, selector: "ui-button-group", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "group" }, properties: { "class": "classes()", "attr.data-orientation": "orientation()", "attr.data-slot": "\"button-group\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
31
|
+
}
|
|
32
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ButtonGroupComponent, decorators: [{
|
|
33
|
+
type: Component,
|
|
34
|
+
args: [{
|
|
35
|
+
selector: 'ui-button-group',
|
|
36
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
37
|
+
host: {
|
|
38
|
+
'[class]': 'classes()',
|
|
39
|
+
'[attr.data-orientation]': 'orientation()',
|
|
40
|
+
'[attr.data-slot]': '"button-group"',
|
|
41
|
+
role: 'group',
|
|
42
|
+
},
|
|
43
|
+
template: `<ng-content />`,
|
|
44
|
+
}]
|
|
45
|
+
}], propDecorators: { orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
46
|
+
class ButtonGroupTextComponent {
|
|
47
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
48
|
+
classes = computed(() => cn([
|
|
49
|
+
'flex items-center gap-2 whitespace-nowrap rounded-md border border-border bg-muted px-4 text-sm font-medium shadow-sm',
|
|
50
|
+
'[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4',
|
|
51
|
+
].join(' '), this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
52
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ButtonGroupTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
53
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.14", type: ButtonGroupTextComponent, isStandalone: true, selector: "ui-button-group-text", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-slot": "\"button-group-text\"" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
54
|
+
}
|
|
55
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ButtonGroupTextComponent, decorators: [{
|
|
56
|
+
type: Component,
|
|
57
|
+
args: [{
|
|
58
|
+
selector: 'ui-button-group-text',
|
|
59
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
60
|
+
host: {
|
|
61
|
+
'[class]': 'classes()',
|
|
62
|
+
'[attr.data-slot]': '"button-group-text"',
|
|
63
|
+
},
|
|
64
|
+
template: `<ng-content />`,
|
|
65
|
+
}]
|
|
66
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
67
|
+
class ButtonGroupSeparatorComponent {
|
|
68
|
+
orientation = input('vertical', ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
69
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
70
|
+
classes = computed(() => cn('relative shrink-0 bg-border', this.orientation() === 'horizontal' ? 'h-px w-full self-auto' : 'h-auto w-px self-stretch', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
71
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ButtonGroupSeparatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
72
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.14", type: ButtonGroupSeparatorComponent, isStandalone: true, selector: "ui-button-group-separator", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "separator" }, properties: { "class": "classes()", "attr.aria-orientation": "orientation()", "attr.data-orientation": "orientation()", "attr.data-slot": "\"button-group-separator\"" } }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
73
|
+
}
|
|
74
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ButtonGroupSeparatorComponent, decorators: [{
|
|
75
|
+
type: Component,
|
|
76
|
+
args: [{
|
|
77
|
+
selector: 'ui-button-group-separator',
|
|
78
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
79
|
+
host: {
|
|
80
|
+
'[class]': 'classes()',
|
|
81
|
+
'[attr.aria-orientation]': 'orientation()',
|
|
82
|
+
'[attr.data-orientation]': 'orientation()',
|
|
83
|
+
'[attr.data-slot]': '"button-group-separator"',
|
|
84
|
+
role: 'separator',
|
|
85
|
+
},
|
|
86
|
+
template: '',
|
|
87
|
+
}]
|
|
88
|
+
}], propDecorators: { orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Generated bundle index. Do not edit.
|
|
92
|
+
*/
|
|
93
|
+
|
|
94
|
+
export { ButtonGroupComponent, ButtonGroupSeparatorComponent, ButtonGroupTextComponent };
|
|
95
|
+
//# sourceMappingURL=edsis-ui-button-group.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edsis-ui-button-group.mjs","sources":["../../../library/ui/button-group/button-group.component.ts","../../../library/ui/button-group/edsis-ui-button-group.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { cn } from '@edsis/ui/utils';\n\nexport type ButtonGroupOrientation = 'horizontal' | 'vertical';\n\nconst BUTTON_GROUP_BASE = [\n 'inline-flex w-fit items-stretch',\n 'has-[>[data-slot=button-group]]:gap-2',\n '[&>*]:focus-visible:relative [&>*]:focus-visible:z-10',\n '[&>input]:flex-1 [&>textarea]:flex-1',\n '[&>ui-input-group]:min-w-0 [&>ui-input-group]:flex-1',\n].join(' ');\n\nconst buttonGroupOrientationClasses: Record<ButtonGroupOrientation, string> = {\n horizontal: [\n '[&>*:not(:first-child)]:rounded-s-none',\n '[&>*:not(:first-child)]:[border-inline-start-width:0]',\n '[&>*:not(:last-child)]:rounded-e-none',\n ].join(' '),\n vertical: [\n 'flex-col',\n '[&>*:not(:first-child)]:rounded-t-none',\n '[&>*:not(:first-child)]:border-t-0',\n '[&>*:not(:last-child)]:rounded-b-none',\n ].join(' '),\n};\n\n@Component({\n selector: 'ui-button-group',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n '[attr.data-orientation]': 'orientation()',\n '[attr.data-slot]': '\"button-group\"',\n role: 'group',\n },\n template: `<ng-content />`,\n})\nexport class ButtonGroupComponent {\n readonly orientation = input<ButtonGroupOrientation>('horizontal');\n readonly class = input<string>('');\n\n protected readonly classes = computed(() =>\n cn(BUTTON_GROUP_BASE, buttonGroupOrientationClasses[this.orientation()], this.class()),\n );\n}\n\n@Component({\n selector: 'ui-button-group-text',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n '[attr.data-slot]': '\"button-group-text\"',\n },\n template: `<ng-content />`,\n})\nexport class ButtonGroupTextComponent {\n readonly class = input<string>('');\n\n protected readonly classes = computed(() =>\n cn(\n [\n 'flex items-center gap-2 whitespace-nowrap rounded-md border border-border bg-muted px-4 text-sm font-medium shadow-sm',\n '[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4',\n ].join(' '),\n this.class(),\n ),\n );\n}\n\n@Component({\n selector: 'ui-button-group-separator',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n '[attr.aria-orientation]': 'orientation()',\n '[attr.data-orientation]': 'orientation()',\n '[attr.data-slot]': '\"button-group-separator\"',\n role: 'separator',\n },\n template: '',\n})\nexport class ButtonGroupSeparatorComponent {\n readonly orientation = input<ButtonGroupOrientation>('vertical');\n readonly class = input<string>('');\n\n protected readonly classes = computed(() =>\n cn(\n 'relative shrink-0 bg-border',\n this.orientation() === 'horizontal' ? 'h-px w-full self-auto' : 'h-auto w-px self-stretch',\n this.class(),\n ),\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAKA,MAAM,iBAAiB,GAAG;IACxB,iCAAiC;IACjC,uCAAuC;IACvC,uDAAuD;IACvD,sCAAsC;IACtC,sDAAsD;AACvD,CAAA,CAAC,IAAI,CAAC,GAAG,CAAC;AAEX,MAAM,6BAA6B,GAA2C;AAC5E,IAAA,UAAU,EAAE;QACV,wCAAwC;QACxC,uDAAuD;QACvD,uCAAuC;KACxC,CAAC,IAAI,CAAC,GAAG,CAAC;AACX,IAAA,QAAQ,EAAE;QACR,UAAU;QACV,wCAAwC;QACxC,oCAAoC;QACpC,uCAAuC;KACxC,CAAC,IAAI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AAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAA7B,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,6BAA6B,4jBAF9B,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAED,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBAZzC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,2BAA2B;oBACrC,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,WAAW;AACtB,wBAAA,yBAAyB,EAAE,eAAe;AAC1C,wBAAA,yBAAyB,EAAE,eAAe;AAC1C,wBAAA,kBAAkB,EAAE,0BAA0B;AAC9C,wBAAA,IAAI,EAAE,WAAW;AAClB,qBAAA;AACD,oBAAA,QAAQ,EAAE,EAAE;AACb,iBAAA;;;ACjFD;;AAEG;;;;"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { cn } from '@edsis/ui/utils';
|
|
4
|
+
import { cva } from 'class-variance-authority';
|
|
5
|
+
|
|
6
|
+
const buttonVariants = cva([
|
|
7
|
+
'inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap',
|
|
8
|
+
'rounded-md text-sm font-medium',
|
|
9
|
+
'transition-colors',
|
|
10
|
+
'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring',
|
|
11
|
+
'disabled:pointer-events-none disabled:opacity-50',
|
|
12
|
+
'[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',
|
|
13
|
+
].join(' '), {
|
|
14
|
+
variants: {
|
|
15
|
+
variant: {
|
|
16
|
+
default: 'bg-primary text-primary-foreground hover:bg-primary/90',
|
|
17
|
+
destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive/90',
|
|
18
|
+
outline: 'border border-input bg-background hover:bg-accent hover:text-accent-foreground',
|
|
19
|
+
secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80',
|
|
20
|
+
ghost: 'hover:bg-accent hover:text-accent-foreground',
|
|
21
|
+
link: 'text-primary underline-offset-4 hover:underline',
|
|
22
|
+
},
|
|
23
|
+
size: {
|
|
24
|
+
xs: 'h-7 rounded-md px-2.5 text-xs',
|
|
25
|
+
default: 'h-9 px-4 py-2',
|
|
26
|
+
sm: 'h-8 rounded-md px-3 text-xs',
|
|
27
|
+
lg: 'h-10 rounded-md px-8',
|
|
28
|
+
'icon-xs': 'h-7 w-7 p-0',
|
|
29
|
+
'icon-sm': 'h-8 w-8 p-0',
|
|
30
|
+
icon: 'h-9 w-9 p-0',
|
|
31
|
+
'icon-lg': 'h-10 w-10 p-0',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
defaultVariants: { variant: 'default', size: 'default' },
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
class ButtonComponent {
|
|
38
|
+
variant = input('default', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
39
|
+
size = input('default', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
40
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
41
|
+
classes = computed(() => cn(buttonVariants({ variant: this.variant(), size: this.size() }), this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
42
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
43
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.14", type: ButtonComponent, isStandalone: true, selector: "button[ui-button], a[ui-button]", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-variant": "variant()", "attr.data-size": "size()" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
44
|
+
}
|
|
45
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
46
|
+
type: Component,
|
|
47
|
+
args: [{
|
|
48
|
+
selector: 'button[ui-button], a[ui-button]',
|
|
49
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
50
|
+
host: {
|
|
51
|
+
'[class]': 'classes()',
|
|
52
|
+
'[attr.data-variant]': 'variant()',
|
|
53
|
+
'[attr.data-size]': 'size()',
|
|
54
|
+
},
|
|
55
|
+
template: `<ng-content />`,
|
|
56
|
+
}]
|
|
57
|
+
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Generated bundle index. Do not edit.
|
|
61
|
+
*/
|
|
62
|
+
|
|
63
|
+
export { ButtonComponent, buttonVariants };
|
|
64
|
+
//# sourceMappingURL=edsis-ui-button.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edsis-ui-button.mjs","sources":["../../../library/ui/button/button.variants.ts","../../../library/ui/button/button.component.ts","../../../library/ui/button/edsis-ui-button.ts"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\n\nexport const buttonVariants = cva(\n [\n 'inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap',\n 'rounded-md text-sm font-medium',\n 'transition-colors',\n 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring',\n 'disabled:pointer-events-none disabled:opacity-50',\n '[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',\n ].join(' '),\n {\n variants: {\n variant: {\n default: 'bg-primary text-primary-foreground hover:bg-primary/90',\n destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive/90',\n outline: 'border border-input bg-background hover:bg-accent hover:text-accent-foreground',\n secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80',\n ghost: 'hover:bg-accent hover:text-accent-foreground',\n link: 'text-primary underline-offset-4 hover:underline',\n },\n size: {\n xs: 'h-7 rounded-md px-2.5 text-xs',\n default: 'h-9 px-4 py-2',\n sm: 'h-8 rounded-md px-3 text-xs',\n lg: 'h-10 rounded-md px-8',\n 'icon-xs': 'h-7 w-7 p-0',\n 'icon-sm': 'h-8 w-8 p-0',\n icon: 'h-9 w-9 p-0',\n 'icon-lg': 'h-10 w-10 p-0',\n },\n },\n defaultVariants: { variant: 'default', size: 'default' },\n },\n);\n\nexport type ButtonVariant = NonNullable<VariantProps<typeof buttonVariants>['variant']>;\nexport type ButtonSize = NonNullable<VariantProps<typeof buttonVariants>['size']>;\n","import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { cn } from '@edsis/ui/utils';\nimport { buttonVariants, type ButtonSize, type ButtonVariant } from './button.variants';\n\n@Component({\n selector: 'button[ui-button], a[ui-button]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n '[attr.data-variant]': 'variant()',\n '[attr.data-size]': 'size()',\n },\n template: `<ng-content />`,\n})\nexport class ButtonComponent {\n readonly variant = input<ButtonVariant>('default');\n readonly size = input<ButtonSize>('default');\n readonly class = input<string>('');\n\n protected readonly classes = computed(() =>\n cn(buttonVariants({ variant: this.variant(), size: this.size() }), this.class()),\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAEO,MAAM,cAAc,GAAG,GAAG,CAC/B;IACE,gFAAgF;IAChF,gCAAgC;IAChC,mBAAmB;IACnB,yEAAyE;IACzE,kDAAkD;IAClD,6DAA6D;AAC9D,CAAA,CAAC,IAAI,CAAC,GAAG,CAAC,EACX;AACE,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAE,wDAAwD;AACjE,YAAA,WAAW,EAAE,oEAAoE;AACjF,YAAA,OAAO,EAAE,gFAAgF;AACzF,YAAA,SAAS,EAAE,8DAA8D;AACzE,YAAA,KAAK,EAAE,8CAA8C;AACrD,YAAA,IAAI,EAAE,iDAAiD;AACxD,SAAA;AACD,QAAA,IAAI,EAAE;AACJ,YAAA,EAAE,EAAE,+BAA+B;AACnC,YAAA,OAAO,EAAE,eAAe;AACxB,YAAA,EAAE,EAAE,6BAA6B;AACjC,YAAA,EAAE,EAAE,sBAAsB;AAC1B,YAAA,SAAS,EAAE,aAAa;AACxB,YAAA,SAAS,EAAE,aAAa;AACxB,YAAA,IAAI,EAAE,aAAa;AACnB,YAAA,SAAS,EAAE,eAAe;AAC3B,SAAA;AACF,KAAA;IACD,eAAe,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;AACzD,CAAA;;MCnBU,eAAe,CAAA;AACjB,IAAA,OAAO,GAAG,KAAK,CAAgB,SAAS,8EAAC;AACzC,IAAA,IAAI,GAAG,KAAK,CAAa,SAAS,2EAAC;AACnC,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,4EAAC;AAEf,IAAA,OAAO,GAAG,QAAQ,CAAC,MACpC,EAAE,CAAC,cAAc,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,8EACjF;wGAPU,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAf,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,eAAe,gkBAFhB,CAAA,cAAA,CAAgB,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAEf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAV3B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,iCAAiC;oBAC3C,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,WAAW;AACtB,wBAAA,qBAAqB,EAAE,WAAW;AAClC,wBAAA,kBAAkB,EAAE,QAAQ;AAC7B,qBAAA;AACD,oBAAA,QAAQ,EAAE,CAAA,cAAA,CAAgB;AAC3B,iBAAA;;;ACbD;;AAEG;;;;"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { model, input, computed, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { MatCalendar } from '@angular/material/datepicker';
|
|
4
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
5
|
+
import { cn } from '@edsis/ui/utils';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Inline calendar built on MatCalendar. Requires a date adapter provider in the
|
|
9
|
+
* consumer app (e.g. `provideNativeDateAdapter()` from `@angular/material/core`).
|
|
10
|
+
*/
|
|
11
|
+
class CalendarComponent {
|
|
12
|
+
value = model(null, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
13
|
+
min = input(null, ...(ngDevMode ? [{ debugName: "min" }] : /* istanbul ignore next */ []));
|
|
14
|
+
max = input(null, ...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
|
|
15
|
+
startAt = input(null, ...(ngDevMode ? [{ debugName: "startAt" }] : /* istanbul ignore next */ []));
|
|
16
|
+
startView = input('month', ...(ngDevMode ? [{ debugName: "startView" }] : /* istanbul ignore next */ []));
|
|
17
|
+
dateFilter = input(null, ...(ngDevMode ? [{ debugName: "dateFilter" }] : /* istanbul ignore next */ []));
|
|
18
|
+
disabled = model(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
19
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
20
|
+
classes = computed(() => cn('block w-fit', this.disabled() ? 'pointer-events-none opacity-50' : '', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
21
|
+
resolvedDateFilter = computed(() => this.dateFilter() ?? undefined, ...(ngDevMode ? [{ debugName: "resolvedDateFilter" }] : /* istanbul ignore next */ []));
|
|
22
|
+
onChangeFn = () => { };
|
|
23
|
+
onTouchedFn = () => { };
|
|
24
|
+
onSelect(d) {
|
|
25
|
+
this.value.set(d);
|
|
26
|
+
this.onChangeFn(d);
|
|
27
|
+
this.onTouchedFn();
|
|
28
|
+
}
|
|
29
|
+
writeValue(v) {
|
|
30
|
+
this.value.set(v);
|
|
31
|
+
}
|
|
32
|
+
registerOnChange(fn) {
|
|
33
|
+
this.onChangeFn = fn;
|
|
34
|
+
}
|
|
35
|
+
registerOnTouched(fn) {
|
|
36
|
+
this.onTouchedFn = fn;
|
|
37
|
+
}
|
|
38
|
+
setDisabledState(state) {
|
|
39
|
+
this.disabled.set(state);
|
|
40
|
+
}
|
|
41
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: CalendarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
42
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.14", type: CalendarComponent, isStandalone: true, selector: "ui-calendar", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, startAt: { classPropertyName: "startAt", publicName: "startAt", isSignal: true, isRequired: false, transformFunction: null }, startView: { classPropertyName: "startView", publicName: "startView", isSignal: true, isRequired: false, transformFunction: null }, dateFilter: { classPropertyName: "dateFilter", publicName: "dateFilter", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", disabled: "disabledChange" }, host: { properties: { "class": "classes()", "attr.aria-disabled": "disabled() ? \"true\" : null", "attr.inert": "disabled() ? \"\" : null" } }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => CalendarComponent), multi: true }], ngImport: i0, template: `
|
|
43
|
+
<mat-calendar
|
|
44
|
+
class="ui-calendar"
|
|
45
|
+
[selected]="value()"
|
|
46
|
+
[minDate]="min()"
|
|
47
|
+
[maxDate]="max()"
|
|
48
|
+
[startAt]="startAt()"
|
|
49
|
+
[startView]="startView()"
|
|
50
|
+
[dateFilter]="resolvedDateFilter()"
|
|
51
|
+
(selectedChange)="onSelect($event)" />
|
|
52
|
+
`, isInline: true, styles: [":host{display:block;width:fit-content;padding:.75rem;border-radius:var(--radius);border:1px solid hsl(var(--border));background:hsl(var(--background));color:hsl(var(--foreground))}.ui-calendar{display:block;width:var(--ui-calendar-width, 17.5rem)}\n"], dependencies: [{ kind: "component", type: MatCalendar, selector: "mat-calendar", inputs: ["headerComponent", "startAt", "startView", "selected", "minDate", "maxDate", "dateFilter", "dateClass", "comparisonStart", "comparisonEnd", "startDateAccessibleName", "endDateAccessibleName"], outputs: ["selectedChange", "yearSelected", "monthSelected", "viewChanged", "_userSelection", "_userDragDrop"], exportAs: ["matCalendar"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
53
|
+
}
|
|
54
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: CalendarComponent, decorators: [{
|
|
55
|
+
type: Component,
|
|
56
|
+
args: [{ selector: 'ui-calendar', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatCalendar], host: {
|
|
57
|
+
'[class]': 'classes()',
|
|
58
|
+
'[attr.aria-disabled]': 'disabled() ? "true" : null',
|
|
59
|
+
'[attr.inert]': 'disabled() ? "" : null',
|
|
60
|
+
}, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => CalendarComponent), multi: true }], template: `
|
|
61
|
+
<mat-calendar
|
|
62
|
+
class="ui-calendar"
|
|
63
|
+
[selected]="value()"
|
|
64
|
+
[minDate]="min()"
|
|
65
|
+
[maxDate]="max()"
|
|
66
|
+
[startAt]="startAt()"
|
|
67
|
+
[startView]="startView()"
|
|
68
|
+
[dateFilter]="resolvedDateFilter()"
|
|
69
|
+
(selectedChange)="onSelect($event)" />
|
|
70
|
+
`, styles: [":host{display:block;width:fit-content;padding:.75rem;border-radius:var(--radius);border:1px solid hsl(var(--border));background:hsl(var(--background));color:hsl(var(--foreground))}.ui-calendar{display:block;width:var(--ui-calendar-width, 17.5rem)}\n"] }]
|
|
71
|
+
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], startAt: [{ type: i0.Input, args: [{ isSignal: true, alias: "startAt", required: false }] }], startView: [{ type: i0.Input, args: [{ isSignal: true, alias: "startView", required: false }] }], dateFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "dateFilter", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }, { type: i0.Output, args: ["disabledChange"] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Generated bundle index. Do not edit.
|
|
75
|
+
*/
|
|
76
|
+
|
|
77
|
+
export { CalendarComponent };
|
|
78
|
+
//# sourceMappingURL=edsis-ui-calendar.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edsis-ui-calendar.mjs","sources":["../../../library/ui/calendar/calendar.component.ts","../../../library/ui/calendar/edsis-ui-calendar.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, forwardRef, input, model } from '@angular/core';\nimport { MatCalendar } from '@angular/material/datepicker';\nimport { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';\nimport { cn } from '@edsis/ui/utils';\n\nexport type CalendarStartView = 'month' | 'year' | 'multi-year';\nexport type CalendarDateFilter = (date: Date | null) => boolean;\n\n/**\n * Inline calendar built on MatCalendar. Requires a date adapter provider in the\n * consumer app (e.g. `provideNativeDateAdapter()` from `@angular/material/core`).\n */\n@Component({\n selector: 'ui-calendar',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [MatCalendar],\n host: {\n '[class]': 'classes()',\n '[attr.aria-disabled]': 'disabled() ? \"true\" : null',\n '[attr.inert]': 'disabled() ? \"\" : null',\n },\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => CalendarComponent), multi: true }],\n template: `\n <mat-calendar\n class=\"ui-calendar\"\n [selected]=\"value()\"\n [minDate]=\"min()\"\n [maxDate]=\"max()\"\n [startAt]=\"startAt()\"\n [startView]=\"startView()\"\n [dateFilter]=\"resolvedDateFilter()\"\n (selectedChange)=\"onSelect($event)\" />\n `,\n styles: [\n `\n :host {\n display: block;\n width: fit-content;\n padding: 0.75rem;\n border-radius: var(--radius);\n border: 1px solid hsl(var(--border));\n background: hsl(var(--background));\n color: hsl(var(--foreground));\n }\n .ui-calendar {\n display: block;\n width: var(--ui-calendar-width, 17.5rem);\n }\n `,\n ],\n})\nexport class CalendarComponent implements ControlValueAccessor {\n readonly value = model<Date | null>(null);\n readonly min = input<Date | null>(null);\n readonly max = input<Date | null>(null);\n readonly startAt = input<Date | null>(null);\n readonly startView = input<CalendarStartView>('month');\n readonly dateFilter = input<CalendarDateFilter | null>(null);\n readonly disabled = model<boolean>(false);\n readonly class = input<string>('');\n\n protected readonly classes = computed(() =>\n cn('block w-fit', this.disabled() ? 'pointer-events-none opacity-50' : '', this.class()),\n );\n protected readonly resolvedDateFilter = computed(() => this.dateFilter() ?? undefined);\n\n private onChangeFn: (v: Date | null) => void = () => {};\n private onTouchedFn: () => void = () => {};\n\n protected onSelect(d: Date | null): void {\n this.value.set(d);\n this.onChangeFn(d);\n this.onTouchedFn();\n }\n\n writeValue(v: Date | null): void {\n this.value.set(v);\n }\n\n registerOnChange(fn: (v: Date | null) => void): void {\n this.onChangeFn = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouchedFn = fn;\n }\n\n setDisabledState(state: boolean): void {\n this.disabled.set(state);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAQA;;;AAGG;MAwCU,iBAAiB,CAAA;AACnB,IAAA,KAAK,GAAG,KAAK,CAAc,IAAI,4EAAC;AAChC,IAAA,GAAG,GAAG,KAAK,CAAc,IAAI,0EAAC;AAC9B,IAAA,GAAG,GAAG,KAAK,CAAc,IAAI,0EAAC;AAC9B,IAAA,OAAO,GAAG,KAAK,CAAc,IAAI,8EAAC;AAClC,IAAA,SAAS,GAAG,KAAK,CAAoB,OAAO,gFAAC;AAC7C,IAAA,UAAU,GAAG,KAAK,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