@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 @@
|
|
|
1
|
+
{"version":3,"file":"edsis-ui-editor.mjs","sources":["../../../library/ui/editor/editor.component.ts","../../../library/ui/editor/edsis-ui-editor.ts"],"sourcesContent":["import { DOCUMENT } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n OnDestroy,\n booleanAttribute,\n computed,\n forwardRef,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { cn } from '@edsis/ui/utils';\n\nexport type EditorCommand =\n | 'paragraph'\n | 'heading-1'\n | 'heading-2'\n | 'heading-3'\n | 'bold'\n | 'italic'\n | 'underline'\n | 'strike'\n | 'bullet'\n | 'ordered'\n | 'blockquote'\n | 'subscript'\n | 'superscript'\n | 'highlight'\n | 'link'\n | 'code'\n | 'align-left'\n | 'align-center'\n | 'align-right'\n | 'undo'\n | 'redo';\n\nexport type EditorCommandSource = 'api' | 'toolbar' | 'shortcut';\n\nexport interface EditorCommandEvent {\n readonly command: EditorCommand;\n readonly source: EditorCommandSource;\n readonly originalEvent?: Event;\n}\n\ntype EditorToolbarPart =\n | { readonly type: 'button'; readonly command: EditorCommand; readonly label: string; readonly ariaLabel: string }\n | { readonly type: 'heading'; readonly track: string }\n | { readonly type: 'align'; readonly track: string }\n | { readonly type: 'separator'; readonly track: string }\n | { readonly type: 'spacer'; readonly track: string };\n\nconst DEFAULT_EDITOR_TOOLBAR =\n 'heading | bold italic underline strike | bullet ordered blockquote link align ~ undo redo';\n\nconst EDITOR_BASE = 'block w-full min-w-0 text-sm text-foreground';\n\nconst EDITOR_SHELL_BASE = [\n 'relative min-w-0 overflow-hidden rounded-md border border-input bg-background shadow-sm',\n 'transition-[border-color,box-shadow] focus-within:border-ring focus-within:ring-1 focus-within:ring-ring',\n 'aria-[invalid=true]:border-destructive aria-[invalid=true]:focus-within:ring-destructive',\n 'data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50',\n].join(' ');\n\nconst EDITOR_TOOLBAR_BASE = [\n 'flex min-h-11 min-w-0 flex-wrap items-center gap-1 border-b border-border/70 bg-muted/30 px-2 py-1.5',\n 'data-[disabled=true]:pointer-events-none',\n].join(' ');\n\nconst EDITOR_TOOL_BUTTON_BASE = [\n 'inline-flex size-8 shrink-0 items-center justify-center rounded-md text-sm font-medium text-muted-foreground',\n 'transition-colors hover:bg-accent hover:text-accent-foreground',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',\n 'disabled:pointer-events-none disabled:opacity-50',\n 'aria-pressed:bg-accent aria-pressed:text-accent-foreground',\n].join(' ');\n\nconst EDITOR_SELECT_BASE = [\n 'h-8 rounded-md border border-transparent bg-transparent px-2 text-sm font-medium text-muted-foreground outline-none',\n 'transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:ring-2 focus-visible:ring-ring',\n 'disabled:pointer-events-none disabled:opacity-50',\n].join(' ');\n\nconst EDITOR_CONTENT_BASE = [\n 'block min-h-[200px] max-h-[500px] w-full overflow-y-auto px-4 py-3 text-sm leading-6 outline-none',\n '[&_p]:my-2 [&_h1]:mb-2 [&_h1]:mt-4 [&_h1]:text-2xl [&_h1]:font-semibold [&_h2]:mb-2 [&_h2]:mt-4 [&_h2]:text-xl [&_h2]:font-semibold [&_h3]:mb-2 [&_h3]:mt-4 [&_h3]:text-lg [&_h3]:font-semibold',\n '[&_blockquote]:my-3 [&_blockquote]:border-l-2 [&_blockquote]:border-border [&_blockquote]:pl-3 [&_blockquote]:text-muted-foreground [&_ul]:my-2 [&_ul]:list-disc [&_ul]:pl-6 [&_ol]:my-2 [&_ol]:list-decimal [&_ol]:pl-6 [&_pre]:my-3 [&_pre]:overflow-x-auto [&_pre]:rounded-md [&_pre]:bg-muted [&_pre]:p-3 [&_pre]:font-mono [&_pre]:text-xs',\n 'data-[empty=true]:before:pointer-events-none data-[empty=true]:before:text-muted-foreground data-[empty=true]:before:content-[attr(data-placeholder)]',\n 'data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50',\n].join(' ');\n\nconst toolbarButtons: Partial<Record<EditorCommand, { readonly label: string; readonly ariaLabel: string }>> = {\n bold: { label: 'B', ariaLabel: 'Bold' },\n italic: { label: 'I', ariaLabel: 'Italic' },\n underline: { label: 'U', ariaLabel: 'Underline' },\n strike: { label: 'S', ariaLabel: 'Strikethrough' },\n bullet: { label: 'UL', ariaLabel: 'Bulleted list' },\n ordered: { label: '1.', ariaLabel: 'Numbered list' },\n blockquote: { label: 'Q', ariaLabel: 'Block quote' },\n subscript: { label: 'Sub', ariaLabel: 'Subscript' },\n superscript: { label: 'Sup', ariaLabel: 'Superscript' },\n highlight: { label: 'H', ariaLabel: 'Highlight' },\n link: { label: 'Link', ariaLabel: 'Insert link' },\n code: { label: '</>', ariaLabel: 'Code block' },\n undo: { label: 'Undo', ariaLabel: 'Undo' },\n redo: { label: 'Redo', ariaLabel: 'Redo' },\n};\n\nconst toolbarItemAliases: Record<string, EditorCommand> = {\n bold: 'bold',\n italic: 'italic',\n strike: 'strike',\n underline: 'underline',\n bullet: 'bullet',\n ordered: 'ordered',\n blockquote: 'blockquote',\n subscript: 'subscript',\n superscript: 'superscript',\n highlight: 'highlight',\n link: 'link',\n code: 'code',\n undo: 'undo',\n redo: 'redo',\n};\n\nconst parseToolbarItems = (items: string): EditorToolbarPart[] => {\n const tokens = items.split(/\\s+/).filter(Boolean);\n\n return tokens.flatMap((token, index): EditorToolbarPart[] => {\n if (token === '|') {\n return [{ type: 'separator', track: `separator-${index}` }];\n }\n\n if (token === '~') {\n return [{ type: 'spacer', track: `spacer-${index}` }];\n }\n\n if (token === 'heading') {\n return [{ type: 'heading', track: `heading-${index}` }];\n }\n\n if (token === 'align') {\n return [{ type: 'align', track: `align-${index}` }];\n }\n\n const command = toolbarItemAliases[token];\n const button = command ? toolbarButtons[command] : undefined;\n if (!command || !button) {\n return [];\n }\n\n return [{ type: 'button', command, label: button.label, ariaLabel: button.ariaLabel }];\n });\n};\n\n@Component({\n selector: 'ui-editor',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n '[attr.data-slot]': '\"editor\"',\n '[attr.data-disabled]': 'disabled() ? \"true\" : null',\n '[attr.aria-disabled]': 'disabled() ? \"true\" : null',\n '[attr.aria-invalid]': 'invalid() ? \"true\" : null',\n '[attr.inert]': 'disabled() ? \"\" : null',\n },\n template: `\n <div\n data-slot=\"editor-shell\"\n [class]=\"shellClasses()\"\n [attr.data-disabled]=\"disabled() ? 'true' : null\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\">\n <ng-content select=\"ui-editor-toolbar\" />\n <ng-content select=\"ui-editor-content\" />\n </div>\n `,\n})\nexport class EditorComponent {\n readonly disabled = input(false, { transform: booleanAttribute });\n readonly invalid = input(false, { transform: booleanAttribute });\n readonly class = input<string>('');\n\n readonly commandSelected = output<EditorCommandEvent>();\n\n private content: EditorContentComponent | null = null;\n\n protected readonly classes = computed(() => cn(EDITOR_BASE, this.class()));\n protected readonly shellClasses = computed(() => cn(EDITOR_SHELL_BASE));\n\n execute(command: EditorCommand, source: EditorCommandSource = 'api', originalEvent?: Event): void {\n if (this.disabled()) {\n return;\n }\n\n this.content?.execute(command);\n this.commandSelected.emit({ command, source, originalEvent });\n }\n\n registerContent(content: EditorContentComponent): void {\n this.content = content;\n }\n\n unregisterContent(content: EditorContentComponent): void {\n if (this.content === content) {\n this.content = null;\n }\n }\n}\n\n@Component({\n selector: 'ui-editor-toolbar',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n '[attr.data-slot]': '\"editor-toolbar\"',\n role: 'toolbar',\n '[attr.aria-label]': 'ariaLabel()',\n '[attr.data-disabled]': 'disabled() ? \"true\" : null',\n },\n template: `\n @for (part of parts(); track trackPart(part, $index)) {\n @switch (part.type) {\n @case ('heading') {\n <select\n [class]=\"selectClasses\"\n [disabled]=\"disabled()\"\n aria-label=\"Text style\"\n (change)=\"handleSelect($event)\">\n <option value=\"paragraph\">Text</option>\n <option value=\"heading-1\">Heading 1</option>\n <option value=\"heading-2\">Heading 2</option>\n <option value=\"heading-3\">Heading 3</option>\n </select>\n }\n @case ('align') {\n <select\n [class]=\"selectClasses\"\n [disabled]=\"disabled()\"\n aria-label=\"Text alignment\"\n (change)=\"handleSelect($event)\">\n <option value=\"align-left\">Left</option>\n <option value=\"align-center\">Center</option>\n <option value=\"align-right\">Right</option>\n </select>\n }\n @case ('separator') {\n <span\n data-slot=\"editor-separator\"\n class=\"mx-1 h-6 w-px shrink-0 bg-border\"\n role=\"separator\"\n aria-orientation=\"vertical\"></span>\n }\n @case ('spacer') {\n <span data-slot=\"editor-spacer\" class=\"min-w-2 flex-1\"></span>\n }\n @case ('button') {\n <button\n type=\"button\"\n data-slot=\"editor-button\"\n [class]=\"buttonClasses\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"part.ariaLabel\"\n [attr.title]=\"part.ariaLabel\"\n (mousedown)=\"preserveSelection($event)\"\n (click)=\"execute(part.command, $event)\">\n @if (part.command === 'undo') {\n <svg\n aria-hidden=\"true\"\n class=\"size-4\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.75\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\">\n <path d=\"M9 14 4 9l5-5\" />\n <path d=\"M4 9h10a6 6 0 0 1 0 12h-2\" />\n </svg>\n } @else if (part.command === 'redo') {\n <svg\n aria-hidden=\"true\"\n class=\"size-4\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.75\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\">\n <path d=\"m15 14 5-5-5-5\" />\n <path d=\"M20 9H10a6 6 0 0 0 0 12h2\" />\n </svg>\n } @else {\n <span aria-hidden=\"true\">{{ part.label }}</span>\n }\n </button>\n }\n }\n }\n <ng-content />\n `,\n})\nexport class EditorToolbarComponent {\n private readonly editor = inject(EditorComponent, { optional: true });\n\n readonly items = input(DEFAULT_EDITOR_TOOLBAR);\n readonly disabledInput = input(false, { alias: 'disabled', transform: booleanAttribute });\n readonly ariaLabel = input('Formatting', { alias: 'aria-label' });\n readonly class = input<string>('');\n\n protected readonly buttonClasses = EDITOR_TOOL_BUTTON_BASE;\n protected readonly selectClasses = EDITOR_SELECT_BASE;\n protected readonly disabled = computed(() => this.disabledInput() || this.editor?.disabled() === true);\n protected readonly parts = computed(() => parseToolbarItems(this.items()));\n protected readonly classes = computed(() => cn(EDITOR_TOOLBAR_BASE, this.class()));\n\n protected execute(command: EditorCommand, event: MouseEvent): void {\n this.editor?.execute(command, 'toolbar', event);\n }\n\n protected handleSelect(event: Event): void {\n const select = event.target as HTMLSelectElement;\n this.editor?.execute(select.value as EditorCommand, 'toolbar', event);\n select.selectedIndex = 0;\n }\n\n protected preserveSelection(event: MouseEvent): void {\n event.preventDefault();\n }\n\n protected trackPart(part: EditorToolbarPart, index: number): string {\n if (part.type === 'button') {\n return `${part.command}-${index}`;\n }\n\n return part.track;\n }\n}\n\n@Component({\n selector: 'button[ui-editor-button]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n '[attr.data-slot]': '\"editor-button\"',\n '[attr.title]': 'tooltip() || null',\n '[attr.aria-pressed]': 'pressed() === null ? null : pressed()',\n '[disabled]': 'disabled() || null',\n type: 'button',\n '(mousedown)': 'preserveSelection($event)',\n '(click)': 'handleClick($event)',\n },\n template: `<ng-content />`,\n})\nexport class EditorButtonComponent {\n private readonly editor = inject(EditorComponent, { optional: true });\n\n readonly command = input<EditorCommand | null>(null);\n readonly pressed = input<boolean | null>(null);\n readonly disabledInput = input(false, { alias: 'disabled', transform: booleanAttribute });\n readonly tooltip = input<string>('');\n readonly class = input<string>('');\n\n protected readonly disabled = computed(() => this.disabledInput() || this.editor?.disabled() === true);\n protected readonly classes = computed(() => cn(EDITOR_TOOL_BUTTON_BASE, this.class()));\n\n protected handleClick(event: MouseEvent): void {\n const command = this.command();\n if (!command) {\n return;\n }\n\n this.editor?.execute(command, 'toolbar', event);\n }\n\n protected preserveSelection(event: MouseEvent): void {\n event.preventDefault();\n }\n}\n\n@Component({\n selector: 'ui-editor-separator',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n '[attr.data-slot]': '\"editor-separator\"',\n role: 'separator',\n 'aria-orientation': 'vertical',\n },\n template: '',\n})\nexport class EditorSeparatorComponent {\n readonly class = input<string>('');\n\n protected readonly classes = computed(() => cn('mx-1 h-6 w-px shrink-0 bg-border', this.class()));\n}\n\n@Component({\n selector: 'ui-editor-spacer',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n '[attr.data-slot]': '\"editor-spacer\"',\n },\n template: '',\n})\nexport class EditorSpacerComponent {\n readonly class = input<string>('');\n\n protected readonly classes = computed(() => cn('min-w-2 flex-1', this.class()));\n}\n\n@Component({\n selector: 'ui-editor-content',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => EditorContentComponent),\n multi: true,\n },\n ],\n host: {\n '[class]': 'classes()',\n '[attr.data-slot]': '\"editor-content\"',\n '[attr.contenteditable]': 'disabled() ? \"false\" : \"true\"',\n '[attr.role]': '\"textbox\"',\n '[attr.aria-multiline]': '\"true\"',\n '[attr.aria-label]': 'ariaLabel()',\n '[attr.aria-disabled]': 'disabled() ? \"true\" : null',\n '[attr.aria-invalid]': 'invalid() ? \"true\" : null',\n '[attr.data-disabled]': 'disabled() ? \"true\" : null',\n '[attr.data-empty]': 'empty() ? \"true\" : null',\n '[attr.data-placeholder]': 'placeholder()',\n '[attr.tabindex]': 'disabled() ? null : \"0\"',\n '(input)': 'handleInput()',\n '(blur)': 'handleBlur()',\n '(keydown)': 'handleKeydown($event)',\n },\n template: `<ng-content />`,\n})\nexport class EditorContentComponent implements AfterViewInit, OnDestroy, ControlValueAccessor {\n private readonly el = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly editor = inject(EditorComponent, { optional: true });\n private readonly document = inject(DOCUMENT);\n\n readonly placeholder = input('Write something...');\n readonly ariaLabel = input('Rich text editor', { alias: 'aria-label' });\n readonly disabledInput = input(false, { alias: 'disabled', transform: booleanAttribute });\n readonly invalidInput = input(false, { alias: 'aria-invalid', transform: booleanAttribute });\n readonly class = input<string>('');\n\n private readonly disabledState = signal(false);\n protected readonly empty = signal(true);\n protected readonly disabled = computed(\n () => this.disabledInput() || this.disabledState() || this.editor?.disabled() === true,\n );\n protected readonly invalid = computed(() => this.invalidInput() || this.editor?.invalid() === true);\n protected readonly classes = computed(() => cn(EDITOR_CONTENT_BASE, this.class()));\n\n private onChange: (value: string) => void = () => {};\n private onTouched: () => void = () => {};\n\n ngAfterViewInit(): void {\n this.editor?.registerContent(this);\n queueMicrotask(() => this.syncEmptyState());\n }\n\n ngOnDestroy(): void {\n this.editor?.unregisterContent(this);\n }\n\n writeValue(value: string | null): void {\n this.el.nativeElement.innerHTML = value ?? '';\n queueMicrotask(() => this.syncEmptyState());\n }\n\n registerOnChange(fn: (value: string) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabledState.set(isDisabled);\n }\n\n execute(command: EditorCommand): void {\n if (this.disabled()) {\n return;\n }\n\n this.el.nativeElement.focus();\n\n switch (command) {\n case 'paragraph':\n this.exec('formatBlock', 'p');\n break;\n case 'heading-1':\n this.exec('formatBlock', 'h1');\n break;\n case 'heading-2':\n this.exec('formatBlock', 'h2');\n break;\n case 'heading-3':\n this.exec('formatBlock', 'h3');\n break;\n case 'bold':\n this.exec('bold');\n break;\n case 'italic':\n this.exec('italic');\n break;\n case 'underline':\n this.exec('underline');\n break;\n case 'strike':\n this.exec('strikeThrough');\n break;\n case 'bullet':\n this.exec('insertUnorderedList');\n break;\n case 'ordered':\n this.exec('insertOrderedList');\n break;\n case 'blockquote':\n this.exec('formatBlock', 'blockquote');\n break;\n case 'subscript':\n this.exec('subscript');\n break;\n case 'superscript':\n this.exec('superscript');\n break;\n case 'highlight':\n this.exec('backColor', '#fef08a');\n break;\n case 'link':\n this.exec('createLink', '#');\n break;\n case 'code':\n this.exec('formatBlock', 'pre');\n break;\n case 'align-left':\n this.exec('justifyLeft');\n break;\n case 'align-center':\n this.exec('justifyCenter');\n break;\n case 'align-right':\n this.exec('justifyRight');\n break;\n case 'undo':\n this.exec('undo');\n break;\n case 'redo':\n this.exec('redo');\n break;\n }\n\n this.handleInput();\n }\n\n focus(): void {\n this.el.nativeElement.focus();\n }\n\n protected handleInput(): void {\n this.syncEmptyState();\n this.onChange(this.el.nativeElement.innerHTML);\n }\n\n protected handleBlur(): void {\n this.onTouched();\n }\n\n protected handleKeydown(event: KeyboardEvent): void {\n if (this.disabled()) {\n return;\n }\n\n const command = this.shortcutCommand(event);\n if (!command) {\n return;\n }\n\n event.preventDefault();\n if (this.editor) {\n this.editor.execute(command, 'shortcut', event);\n return;\n }\n\n this.execute(command);\n }\n\n private exec(command: string, value?: string): void {\n if (typeof this.document.execCommand !== 'function') {\n return;\n }\n\n this.document.execCommand(command, false, value);\n }\n\n private syncEmptyState(): void {\n const element = this.el.nativeElement;\n const html = element.innerHTML\n .replace(/<br\\s*\\/?\\>/gi, '')\n .replace(/ /g, '')\n .trim();\n const text = element.textContent?.replace(/\\u00a0/g, '').trim() ?? '';\n this.empty.set(html.length === 0 && text.length === 0);\n }\n\n private shortcutCommand(event: KeyboardEvent): EditorCommand | null {\n const modifier = event.metaKey || event.ctrlKey;\n if (!modifier) {\n return null;\n }\n\n const key = event.key.toLowerCase();\n\n if (event.altKey && !event.shiftKey) {\n if (key === '0') {\n return 'paragraph';\n }\n if (key === '1') {\n return 'heading-1';\n }\n if (key === '2') {\n return 'heading-2';\n }\n if (key === '3') {\n return 'heading-3';\n }\n }\n\n if (event.shiftKey && !event.altKey) {\n switch (key) {\n case 'x':\n return 'strike';\n case '7':\n return 'ordered';\n case '8':\n return 'bullet';\n case 'b':\n return 'blockquote';\n case 'h':\n return 'highlight';\n case 'l':\n return 'align-left';\n case 'e':\n return 'align-center';\n case 'r':\n return 'align-right';\n case 'z':\n return 'redo';\n }\n }\n\n if (event.altKey || event.shiftKey) {\n return null;\n }\n\n switch (key) {\n case 'b':\n return 'bold';\n case 'i':\n return 'italic';\n case 'u':\n return 'underline';\n case 'e':\n return 'code';\n case 'z':\n return 'undo';\n default:\n return null;\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAwDA,MAAM,sBAAsB,GAC1B,2FAA2F;AAE7F,MAAM,WAAW,GAAG,8CAA8C;AAElE,MAAM,iBAAiB,GAAG;IACxB,yFAAyF;IACzF,0GAA0G;IAC1G,0FAA0F;IAC1F,yEAAyE;AAC1E,CAAA,CAAC,IAAI,CAAC,GAAG,CAAC;AAEX,MAAM,mBAAmB,GAAG;IAC1B,sGAAsG;IACtG,0CAA0C;AAC3C,CAAA,CAAC,IAAI,CAAC,GAAG,CAAC;AAEX,MAAM,uBAAuB,GAAG;IAC9B,8GAA8G;IAC9G,gEAAgE;IAChE,yEAAyE;IACzE,kDAAkD;IAClD,4DAA4D;AAC7D,CAAA,CAAC,IAAI,CAAC,GAAG,CAAC;AAEX,MAAM,kBAAkB,GAAG;IACzB,qHAAqH;IACrH,6GAA6G;IAC7G,kDAAkD;AACnD,CAAA,CAAC,IAAI,CAAC,GAAG,CAAC;AAEX,MAAM,mBAAmB,GAAG;IAC1B,mGAAmG;IACnG,iMAAiM;IACjM,iVAAiV;IACjV,uJAAuJ;IACvJ,yEAAyE;AAC1E,CAAA,CAAC,IAAI,CAAC,GAAG,CAAC;AAEX,MAAM,cAAc,GAA2F;IAC7G,IAAI,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE;IACvC,MAAM,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,QAAQ,EAAE;IAC3C,SAAS,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,WAAW,EAAE;IACjD,MAAM,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,eAAe,EAAE;IAClD,MAAM,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,eAAe,EAAE;IACnD,OAAO,EAAE,EAAE,KAAK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BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,4BAA4B,CAAC;AACrD,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACF,qBAAA;AACD,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,WAAW;AACtB,wBAAA,kBAAkB,EAAE,kBAAkB;AACtC,wBAAA,wBAAwB,EAAE,+BAA+B;AACzD,wBAAA,aAAa,EAAE,WAAW;AAC1B,wBAAA,uBAAuB,EAAE,QAAQ;AACjC,wBAAA,mBAAmB,EAAE,aAAa;AAClC,wBAAA,sBAAsB,EAAE,4BAA4B;AACpD,wBAAA,qBAAqB,EAAE,2BAA2B;AAClD,wBAAA,sBAAsB,EAAE,4BAA4B;AACpD,wBAAA,mBAAmB,EAAE,yBAAyB;AAC9C,wBAAA,yBAAyB,EAAE,eAAe;AAC1C,wBAAA,iBAAiB,EAAE,yBAAyB;AAC5C,wBAAA,SAAS,EAAE,eAAe;AAC1B,wBAAA,QAAQ,EAAE,cAAc;AACxB,wBAAA,WAAW,EAAE,uBAAuB;AACrC,qBAAA;AACD,oBAAA,QAAQ,EAAE,CAAA,cAAA,CAAgB;AAC3B,iBAAA;;;AC3bD;;AAEG;;;;"}
|
|
@@ -0,0 +1,132 @@
|
|
|
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 emptyVariants = cva('flex w-full flex-col items-center justify-center gap-6 rounded-xl px-6 py-10 text-center');
|
|
7
|
+
const emptyMediaVariants = cva('flex shrink-0 items-center justify-center', {
|
|
8
|
+
variants: {
|
|
9
|
+
variant: {
|
|
10
|
+
default: '',
|
|
11
|
+
icon: [
|
|
12
|
+
'size-12 rounded-full border border-border bg-muted/40 text-muted-foreground shadow-sm',
|
|
13
|
+
'[&_svg]:size-6 [&_svg]:shrink-0',
|
|
14
|
+
].join(' '),
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
defaultVariants: {
|
|
18
|
+
variant: 'default',
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
class EmptyComponent {
|
|
23
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
24
|
+
classes = computed(() => cn(emptyVariants(), this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
25
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: EmptyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
26
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.14", type: EmptyComponent, isStandalone: true, selector: "ui-empty", 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 });
|
|
27
|
+
}
|
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: EmptyComponent, decorators: [{
|
|
29
|
+
type: Component,
|
|
30
|
+
args: [{
|
|
31
|
+
selector: 'ui-empty',
|
|
32
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
33
|
+
host: {
|
|
34
|
+
'[class]': 'classes()',
|
|
35
|
+
},
|
|
36
|
+
template: `<ng-content />`,
|
|
37
|
+
}]
|
|
38
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
39
|
+
class EmptyHeaderComponent {
|
|
40
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
41
|
+
classes = computed(() => cn('flex w-full max-w-xl flex-col items-center gap-3 text-center', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
42
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: EmptyHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
43
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.14", type: EmptyHeaderComponent, isStandalone: true, selector: "ui-empty-header", 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 });
|
|
44
|
+
}
|
|
45
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: EmptyHeaderComponent, decorators: [{
|
|
46
|
+
type: Component,
|
|
47
|
+
args: [{
|
|
48
|
+
selector: 'ui-empty-header',
|
|
49
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
50
|
+
host: {
|
|
51
|
+
'[class]': 'classes()',
|
|
52
|
+
},
|
|
53
|
+
template: `<ng-content />`,
|
|
54
|
+
}]
|
|
55
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
56
|
+
class EmptyMediaComponent {
|
|
57
|
+
variant = input('default', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
58
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
59
|
+
classes = computed(() => cn(emptyMediaVariants({ variant: this.variant() }), this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
60
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: EmptyMediaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
61
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.14", type: EmptyMediaComponent, isStandalone: true, selector: "ui-empty-media", 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()", "attr.data-variant": "variant()" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
62
|
+
}
|
|
63
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: EmptyMediaComponent, decorators: [{
|
|
64
|
+
type: Component,
|
|
65
|
+
args: [{
|
|
66
|
+
selector: 'ui-empty-media',
|
|
67
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
68
|
+
host: {
|
|
69
|
+
'[class]': 'classes()',
|
|
70
|
+
'[attr.data-variant]': 'variant()',
|
|
71
|
+
},
|
|
72
|
+
template: `<ng-content />`,
|
|
73
|
+
}]
|
|
74
|
+
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
75
|
+
class EmptyTitleComponent {
|
|
76
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
77
|
+
classes = computed(() => cn('block text-xl font-semibold tracking-tight text-foreground sm:text-2xl', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
78
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: EmptyTitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
79
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.14", type: EmptyTitleComponent, isStandalone: true, selector: "ui-empty-title", 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 });
|
|
80
|
+
}
|
|
81
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: EmptyTitleComponent, decorators: [{
|
|
82
|
+
type: Component,
|
|
83
|
+
args: [{
|
|
84
|
+
selector: 'ui-empty-title',
|
|
85
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
86
|
+
host: {
|
|
87
|
+
'[class]': 'classes()',
|
|
88
|
+
},
|
|
89
|
+
template: `<ng-content />`,
|
|
90
|
+
}]
|
|
91
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
92
|
+
class EmptyDescriptionComponent {
|
|
93
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
94
|
+
classes = computed(() => cn('block max-w-lg text-sm leading-6 text-muted-foreground', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
95
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: EmptyDescriptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
96
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.14", type: EmptyDescriptionComponent, isStandalone: true, selector: "ui-empty-description", 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 });
|
|
97
|
+
}
|
|
98
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: EmptyDescriptionComponent, decorators: [{
|
|
99
|
+
type: Component,
|
|
100
|
+
args: [{
|
|
101
|
+
selector: 'ui-empty-description',
|
|
102
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
103
|
+
host: {
|
|
104
|
+
'[class]': 'classes()',
|
|
105
|
+
},
|
|
106
|
+
template: `<ng-content />`,
|
|
107
|
+
}]
|
|
108
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
109
|
+
class EmptyContentComponent {
|
|
110
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
111
|
+
classes = computed(() => cn('flex w-full flex-col items-center justify-center gap-3', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
112
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: EmptyContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
113
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.14", type: EmptyContentComponent, isStandalone: true, selector: "ui-empty-content", 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 });
|
|
114
|
+
}
|
|
115
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: EmptyContentComponent, decorators: [{
|
|
116
|
+
type: Component,
|
|
117
|
+
args: [{
|
|
118
|
+
selector: 'ui-empty-content',
|
|
119
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
120
|
+
host: {
|
|
121
|
+
'[class]': 'classes()',
|
|
122
|
+
},
|
|
123
|
+
template: `<ng-content />`,
|
|
124
|
+
}]
|
|
125
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Generated bundle index. Do not edit.
|
|
129
|
+
*/
|
|
130
|
+
|
|
131
|
+
export { EmptyComponent, EmptyContentComponent, EmptyDescriptionComponent, EmptyHeaderComponent, EmptyMediaComponent, EmptyTitleComponent, emptyMediaVariants, emptyVariants };
|
|
132
|
+
//# sourceMappingURL=edsis-ui-empty.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edsis-ui-empty.mjs","sources":["../../../library/ui/empty/empty.variants.ts","../../../library/ui/empty/empty.component.ts","../../../library/ui/empty/edsis-ui-empty.ts"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\n\nexport const emptyVariants = cva(\n 'flex w-full flex-col items-center justify-center gap-6 rounded-xl px-6 py-10 text-center',\n);\n\nexport const emptyMediaVariants = cva('flex shrink-0 items-center justify-center', {\n variants: {\n variant: {\n default: '',\n icon: [\n 'size-12 rounded-full border border-border bg-muted/40 text-muted-foreground shadow-sm',\n '[&_svg]:size-6 [&_svg]:shrink-0',\n ].join(' '),\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n});\n\nexport type EmptyMediaVariant = NonNullable<VariantProps<typeof emptyMediaVariants>['variant']>;\n","import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { cn } from '@edsis/ui/utils';\nimport { emptyMediaVariants, emptyVariants, type EmptyMediaVariant } from './empty.variants';\n\nexport type { EmptyMediaVariant } from './empty.variants';\n\n@Component({\n selector: 'ui-empty',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n },\n template: `<ng-content />`,\n})\nexport class EmptyComponent {\n readonly class = input<string>('');\n\n protected readonly classes = computed(() => cn(emptyVariants(), this.class()));\n}\n\n@Component({\n selector: 'ui-empty-header',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n },\n template: `<ng-content />`,\n})\nexport class EmptyHeaderComponent {\n readonly class = input<string>('');\n\n protected readonly classes = computed(() =>\n cn('flex w-full max-w-xl flex-col items-center gap-3 text-center', this.class()),\n );\n}\n\n@Component({\n selector: 'ui-empty-media',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n '[attr.data-variant]': 'variant()',\n },\n template: `<ng-content />`,\n})\nexport class EmptyMediaComponent {\n readonly variant = input<EmptyMediaVariant>('default');\n readonly class = input<string>('');\n\n protected readonly classes = computed(() => cn(emptyMediaVariants({ variant: this.variant() }), this.class()));\n}\n\n@Component({\n selector: 'ui-empty-title',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n },\n template: `<ng-content />`,\n})\nexport class EmptyTitleComponent {\n readonly class = input<string>('');\n\n protected readonly classes = computed(() =>\n cn('block text-xl font-semibold tracking-tight text-foreground sm:text-2xl', this.class()),\n );\n}\n\n@Component({\n selector: 'ui-empty-description',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n },\n template: `<ng-content />`,\n})\nexport class EmptyDescriptionComponent {\n readonly class = input<string>('');\n\n protected readonly classes = computed(() =>\n cn('block max-w-lg text-sm leading-6 text-muted-foreground', this.class()),\n );\n}\n\n@Component({\n selector: 'ui-empty-content',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n },\n template: `<ng-content />`,\n})\nexport class EmptyContentComponent {\n readonly class = input<string>('');\n\n protected readonly classes = computed(() =>\n cn('flex w-full flex-col items-center justify-center gap-3', this.class()),\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAEa,aAAa,GAAG,GAAG,CAC9B,0FAA0F;AAGrF,MAAM,kBAAkB,GAAG,GAAG,CAAC,2CAA2C,EAAE;AACjF,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAE,EAAE;AACX,YAAA,IAAI,EAAE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AA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAEf,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBARjC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,kBAAkB;oBAC5B,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,WAAW;AACvB,qBAAA;AACD,oBAAA,QAAQ,EAAE,CAAA,cAAA,CAAgB;AAC3B,iBAAA;;;AC3FD;;AAEG;;;;"}
|
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { signal, computed, effect, Injectable, inject, input, booleanAttribute, ChangeDetectionStrategy, Component, Directive } from '@angular/core';
|
|
3
|
+
import { cn } from '@edsis/ui/utils';
|
|
4
|
+
import { NgControl } from '@angular/forms';
|
|
5
|
+
|
|
6
|
+
let nextId = 0;
|
|
7
|
+
/**
|
|
8
|
+
* Backing store for a single `<ui-form-field>`. Provided on the component
|
|
9
|
+
* so descendant parts (label, description, message, control) can inject it.
|
|
10
|
+
*/
|
|
11
|
+
class FormFieldContext {
|
|
12
|
+
uid = ++nextId;
|
|
13
|
+
controlId = `ui-form-field-${this.uid}`;
|
|
14
|
+
descriptionId = `${this.controlId}-description`;
|
|
15
|
+
messageId = `${this.controlId}-message`;
|
|
16
|
+
control = signal(null, ...(ngDevMode ? [{ debugName: "control" }] : /* istanbul ignore next */ []));
|
|
17
|
+
manualInvalid = signal(false, ...(ngDevMode ? [{ debugName: "manualInvalid" }] : /* istanbul ignore next */ []));
|
|
18
|
+
hasDescription = signal(false, ...(ngDevMode ? [{ debugName: "hasDescription" }] : /* istanbul ignore next */ []));
|
|
19
|
+
hasMessage = signal(false, ...(ngDevMode ? [{ debugName: "hasMessage" }] : /* istanbul ignore next */ []));
|
|
20
|
+
statusTick = signal(0, ...(ngDevMode ? [{ debugName: "statusTick" }] : /* istanbul ignore next */ []));
|
|
21
|
+
invalid = computed(() => {
|
|
22
|
+
this.statusTick();
|
|
23
|
+
const c = this.control();
|
|
24
|
+
return this.manualInvalid() || (!!c && c.invalid && (c.touched || c.dirty));
|
|
25
|
+
}, ...(ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []));
|
|
26
|
+
firstError = computed(() => {
|
|
27
|
+
this.statusTick();
|
|
28
|
+
const c = this.control();
|
|
29
|
+
if (!c?.errors)
|
|
30
|
+
return null;
|
|
31
|
+
const keys = Object.keys(c.errors);
|
|
32
|
+
return keys.length > 0 ? keys[0] : null;
|
|
33
|
+
}, ...(ngDevMode ? [{ debugName: "firstError" }] : /* istanbul ignore next */ []));
|
|
34
|
+
describedBy = computed(() => {
|
|
35
|
+
const parts = [];
|
|
36
|
+
if (this.hasDescription())
|
|
37
|
+
parts.push(this.descriptionId);
|
|
38
|
+
if (this.hasMessage() && this.invalid())
|
|
39
|
+
parts.push(this.messageId);
|
|
40
|
+
return parts.length > 0 ? parts.join(' ') : null;
|
|
41
|
+
}, ...(ngDevMode ? [{ debugName: "describedBy" }] : /* istanbul ignore next */ []));
|
|
42
|
+
constructor() {
|
|
43
|
+
// Re-run computed() above whenever the control's status changes.
|
|
44
|
+
effect((onCleanup) => {
|
|
45
|
+
const c = this.control();
|
|
46
|
+
if (!c)
|
|
47
|
+
return;
|
|
48
|
+
const sub = c.statusChanges.subscribe(() => this.statusTick.update((n) => n + 1));
|
|
49
|
+
onCleanup(() => sub.unsubscribe());
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: FormFieldContext, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
53
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: FormFieldContext });
|
|
54
|
+
}
|
|
55
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: FormFieldContext, decorators: [{
|
|
56
|
+
type: Injectable
|
|
57
|
+
}], ctorParameters: () => [] });
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Groups a label, control, description, and validation message.
|
|
61
|
+
* Provides ids + invalid state to descendants via {@link FormFieldContext}.
|
|
62
|
+
*/
|
|
63
|
+
class FormFieldComponent {
|
|
64
|
+
ctx = inject(FormFieldContext);
|
|
65
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
66
|
+
orientation = input('vertical', ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
67
|
+
invalid = input(false, { ...(ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
68
|
+
classes = computed(() => {
|
|
69
|
+
const orientation = this.orientation();
|
|
70
|
+
return cn('block min-w-0', orientation === 'vertical' && 'flex flex-col gap-2', orientation === 'horizontal' && 'flex items-start gap-3', orientation === 'responsive' &&
|
|
71
|
+
'flex flex-col gap-3 sm:grid sm:grid-cols-[minmax(0,12rem)_minmax(0,1fr)] sm:items-start', this.class());
|
|
72
|
+
}, ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
73
|
+
constructor() {
|
|
74
|
+
effect(() => this.ctx.manualInvalid.set(this.invalid()));
|
|
75
|
+
}
|
|
76
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: FormFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
77
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.14", type: FormFieldComponent, isStandalone: true, selector: "ui-form-field", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.data-orientation": "orientation()", "attr.data-invalid": "ctx.invalid() ? \"\" : null", "attr.role": "\"group\"" } }, providers: [FormFieldContext], ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
78
|
+
}
|
|
79
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: FormFieldComponent, decorators: [{
|
|
80
|
+
type: Component,
|
|
81
|
+
args: [{
|
|
82
|
+
selector: 'ui-form-field',
|
|
83
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
84
|
+
providers: [FormFieldContext],
|
|
85
|
+
host: {
|
|
86
|
+
'[class]': 'classes()',
|
|
87
|
+
'[attr.data-orientation]': 'orientation()',
|
|
88
|
+
'[attr.data-invalid]': 'ctx.invalid() ? "" : null',
|
|
89
|
+
'[attr.role]': '"group"',
|
|
90
|
+
},
|
|
91
|
+
template: `<ng-content />`,
|
|
92
|
+
}]
|
|
93
|
+
}], ctorParameters: () => [], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }] } });
|
|
94
|
+
|
|
95
|
+
class FormFieldsetComponent {
|
|
96
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
97
|
+
classes = computed(() => cn('block min-w-0 border-0 p-0 m-0', 'grid gap-4', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
98
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: FormFieldsetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
99
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.14", type: FormFieldsetComponent, isStandalone: true, selector: "ui-form-fieldset, fieldset[ui-form-fieldset]", 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 });
|
|
100
|
+
}
|
|
101
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: FormFieldsetComponent, decorators: [{
|
|
102
|
+
type: Component,
|
|
103
|
+
args: [{
|
|
104
|
+
selector: 'ui-form-fieldset, fieldset[ui-form-fieldset]',
|
|
105
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
106
|
+
host: {
|
|
107
|
+
'[class]': 'classes()',
|
|
108
|
+
},
|
|
109
|
+
template: `<ng-content />`,
|
|
110
|
+
}]
|
|
111
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
112
|
+
|
|
113
|
+
class FormLegendComponent {
|
|
114
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
115
|
+
variant = input('legend', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
116
|
+
classes = computed(() => cn('block min-w-0 text-foreground', this.variant() === 'label' ? 'text-sm font-medium leading-none' : 'text-sm font-semibold leading-none', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
117
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: FormLegendComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
118
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.14", type: FormLegendComponent, isStandalone: true, selector: "ui-form-legend, legend[ui-form-legend]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
119
|
+
}
|
|
120
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: FormLegendComponent, decorators: [{
|
|
121
|
+
type: Component,
|
|
122
|
+
args: [{
|
|
123
|
+
selector: 'ui-form-legend, legend[ui-form-legend]',
|
|
124
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
125
|
+
host: {
|
|
126
|
+
'[class]': 'classes()',
|
|
127
|
+
},
|
|
128
|
+
template: `<ng-content />`,
|
|
129
|
+
}]
|
|
130
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }] } });
|
|
131
|
+
|
|
132
|
+
class FormGroupComponent {
|
|
133
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
134
|
+
classes = computed(() => cn('block min-w-0', 'grid gap-6', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
135
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: FormGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
136
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.14", type: FormGroupComponent, isStandalone: true, selector: "ui-form-group", 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 });
|
|
137
|
+
}
|
|
138
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: FormGroupComponent, decorators: [{
|
|
139
|
+
type: Component,
|
|
140
|
+
args: [{
|
|
141
|
+
selector: 'ui-form-group',
|
|
142
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
143
|
+
host: {
|
|
144
|
+
'[class]': 'classes()',
|
|
145
|
+
},
|
|
146
|
+
template: `<ng-content />`,
|
|
147
|
+
}]
|
|
148
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
149
|
+
|
|
150
|
+
class FormSeparatorComponent {
|
|
151
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
152
|
+
classes = computed(() => cn('block min-w-0', 'flex items-center gap-3 text-xs font-medium uppercase tracking-[0.24em] text-muted-foreground', 'before:h-px before:flex-1 before:bg-border after:h-px after:flex-1 after:bg-border', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
153
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: FormSeparatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
154
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.14", type: FormSeparatorComponent, isStandalone: true, selector: "ui-form-separator", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<span class="shrink-0"><ng-content /></span>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
155
|
+
}
|
|
156
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: FormSeparatorComponent, decorators: [{
|
|
157
|
+
type: Component,
|
|
158
|
+
args: [{
|
|
159
|
+
selector: 'ui-form-separator',
|
|
160
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
161
|
+
host: {
|
|
162
|
+
'[class]': 'classes()',
|
|
163
|
+
},
|
|
164
|
+
template: `<span class="shrink-0"><ng-content /></span>`,
|
|
165
|
+
}]
|
|
166
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
167
|
+
|
|
168
|
+
class FormContentComponent {
|
|
169
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
170
|
+
classes = computed(() => cn('block min-w-0 flex-1', 'grid gap-1.5', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
171
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: FormContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
172
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.14", type: FormContentComponent, isStandalone: true, selector: "ui-form-content", 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 });
|
|
173
|
+
}
|
|
174
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: FormContentComponent, decorators: [{
|
|
175
|
+
type: Component,
|
|
176
|
+
args: [{
|
|
177
|
+
selector: 'ui-form-content',
|
|
178
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
179
|
+
host: {
|
|
180
|
+
'[class]': 'classes()',
|
|
181
|
+
},
|
|
182
|
+
template: `<ng-content />`,
|
|
183
|
+
}]
|
|
184
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
185
|
+
|
|
186
|
+
class FormTitleComponent {
|
|
187
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
188
|
+
classes = computed(() => cn('block text-sm font-medium leading-none text-foreground', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
189
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: FormTitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
190
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.14", type: FormTitleComponent, isStandalone: true, selector: "ui-form-title", 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 });
|
|
191
|
+
}
|
|
192
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: FormTitleComponent, decorators: [{
|
|
193
|
+
type: Component,
|
|
194
|
+
args: [{
|
|
195
|
+
selector: 'ui-form-title',
|
|
196
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
197
|
+
host: {
|
|
198
|
+
'[class]': 'classes()',
|
|
199
|
+
},
|
|
200
|
+
template: `<ng-content />`,
|
|
201
|
+
}]
|
|
202
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
203
|
+
|
|
204
|
+
class FormLabelComponent {
|
|
205
|
+
ctx = inject(FormFieldContext);
|
|
206
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
207
|
+
classes = computed(() => cn('text-sm font-medium leading-none', this.ctx.invalid() ? 'text-destructive' : 'text-foreground', 'peer-disabled:cursor-not-allowed peer-disabled:opacity-70', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
208
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: FormLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
209
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.14", type: FormLabelComponent, isStandalone: true, selector: "ui-form-label, label[ui-form-label]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.for": "ctx.controlId" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
210
|
+
}
|
|
211
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: FormLabelComponent, decorators: [{
|
|
212
|
+
type: Component,
|
|
213
|
+
args: [{
|
|
214
|
+
selector: 'ui-form-label, label[ui-form-label]',
|
|
215
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
216
|
+
host: {
|
|
217
|
+
'[class]': 'classes()',
|
|
218
|
+
'[attr.for]': 'ctx.controlId',
|
|
219
|
+
},
|
|
220
|
+
template: `<ng-content />`,
|
|
221
|
+
}]
|
|
222
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
223
|
+
|
|
224
|
+
class FormDescriptionComponent {
|
|
225
|
+
ctx = inject(FormFieldContext, { optional: true });
|
|
226
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
227
|
+
classes = computed(() => cn('text-sm text-muted-foreground', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
228
|
+
descriptionId = computed(() => this.ctx?.descriptionId ?? null, ...(ngDevMode ? [{ debugName: "descriptionId" }] : /* istanbul ignore next */ []));
|
|
229
|
+
ngOnInit() {
|
|
230
|
+
this.ctx?.hasDescription.set(true);
|
|
231
|
+
}
|
|
232
|
+
ngOnDestroy() {
|
|
233
|
+
this.ctx?.hasDescription.set(false);
|
|
234
|
+
}
|
|
235
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: FormDescriptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
236
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.14", type: FormDescriptionComponent, isStandalone: true, selector: "ui-form-description, p[ui-form-description]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.id": "descriptionId()" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
237
|
+
}
|
|
238
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: FormDescriptionComponent, decorators: [{
|
|
239
|
+
type: Component,
|
|
240
|
+
args: [{
|
|
241
|
+
selector: 'ui-form-description, p[ui-form-description]',
|
|
242
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
243
|
+
host: {
|
|
244
|
+
'[class]': 'classes()',
|
|
245
|
+
'[attr.id]': 'descriptionId()',
|
|
246
|
+
},
|
|
247
|
+
template: `<ng-content />`,
|
|
248
|
+
}]
|
|
249
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Renders validation errors for the field's control.
|
|
253
|
+
* By default, surfaces the first error key. Provide custom content to override.
|
|
254
|
+
*/
|
|
255
|
+
class FormMessageComponent {
|
|
256
|
+
ctx = inject(FormFieldContext);
|
|
257
|
+
class = input('', ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
258
|
+
show = computed(() => this.ctx.invalid(), ...(ngDevMode ? [{ debugName: "show" }] : /* istanbul ignore next */ []));
|
|
259
|
+
classes = computed(() => cn('text-sm font-medium text-destructive', this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
260
|
+
ngOnInit() {
|
|
261
|
+
this.ctx.hasMessage.set(true);
|
|
262
|
+
}
|
|
263
|
+
ngOnDestroy() {
|
|
264
|
+
this.ctx.hasMessage.set(false);
|
|
265
|
+
}
|
|
266
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: FormMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
267
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: FormMessageComponent, isStandalone: true, selector: "ui-form-message, p[ui-form-message]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.id": "ctx.messageId", "attr.role": "\"alert\"", "attr.aria-live": "\"polite\"" } }, ngImport: i0, template: `
|
|
268
|
+
@if (show()) {
|
|
269
|
+
<ng-content>{{ ctx.firstError() }}</ng-content>
|
|
270
|
+
}
|
|
271
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
272
|
+
}
|
|
273
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: FormMessageComponent, decorators: [{
|
|
274
|
+
type: Component,
|
|
275
|
+
args: [{
|
|
276
|
+
selector: 'ui-form-message, p[ui-form-message]',
|
|
277
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
278
|
+
host: {
|
|
279
|
+
'[class]': 'classes()',
|
|
280
|
+
'[attr.id]': 'ctx.messageId',
|
|
281
|
+
'[attr.role]': '"alert"',
|
|
282
|
+
'[attr.aria-live]': '"polite"',
|
|
283
|
+
},
|
|
284
|
+
template: `
|
|
285
|
+
@if (show()) {
|
|
286
|
+
<ng-content>{{ ctx.firstError() }}</ng-content>
|
|
287
|
+
}
|
|
288
|
+
`,
|
|
289
|
+
}]
|
|
290
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* Attach to the native form control inside a `<ui-form-field>` to auto-wire:
|
|
294
|
+
* - `id` ↔ `<ui-form-label for>`
|
|
295
|
+
* - `aria-describedby` ↔ description + error message
|
|
296
|
+
* - `aria-invalid` ↔ control validity (after touch/dirty)
|
|
297
|
+
*
|
|
298
|
+
* @example
|
|
299
|
+
* <ui-form-field>
|
|
300
|
+
* <ui-form-label>Email</ui-form-label>
|
|
301
|
+
* <input ui-input uiFormControl [formControl]="email" />
|
|
302
|
+
* <ui-form-description>We'll never share it.</ui-form-description>
|
|
303
|
+
* <ui-form-message />
|
|
304
|
+
* </ui-form-field>
|
|
305
|
+
*/
|
|
306
|
+
class FormControlDirective {
|
|
307
|
+
ctx = inject(FormFieldContext);
|
|
308
|
+
ngControl = inject(NgControl, { optional: true, self: true });
|
|
309
|
+
ngOnInit() {
|
|
310
|
+
if (this.ngControl?.control) {
|
|
311
|
+
this.ctx.control.set(this.ngControl.control);
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: FormControlDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
315
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.14", type: FormControlDirective, isStandalone: true, selector: "[uiFormControl]", host: { properties: { "attr.id": "ctx.controlId", "attr.aria-describedby": "ctx.describedBy()", "attr.aria-invalid": "ctx.invalid() ? \"true\" : null" } }, ngImport: i0 });
|
|
316
|
+
}
|
|
317
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: FormControlDirective, decorators: [{
|
|
318
|
+
type: Directive,
|
|
319
|
+
args: [{
|
|
320
|
+
selector: '[uiFormControl]',
|
|
321
|
+
host: {
|
|
322
|
+
'[attr.id]': 'ctx.controlId',
|
|
323
|
+
'[attr.aria-describedby]': 'ctx.describedBy()',
|
|
324
|
+
'[attr.aria-invalid]': 'ctx.invalid() ? "true" : null',
|
|
325
|
+
},
|
|
326
|
+
}]
|
|
327
|
+
}] });
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* Generated bundle index. Do not edit.
|
|
331
|
+
*/
|
|
332
|
+
|
|
333
|
+
export { FormContentComponent, FormControlDirective, FormDescriptionComponent, FormFieldComponent, FormFieldContext, FormFieldsetComponent, FormGroupComponent, FormLabelComponent, FormLegendComponent, FormMessageComponent, FormSeparatorComponent, FormTitleComponent };
|
|
334
|
+
//# sourceMappingURL=edsis-ui-form.mjs.map
|