@ojiepermana/angular 22.1.10 → 22.1.12
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 +32 -26
- package/chart/README.md +272 -0
- package/component/README.md +89 -0
- package/component/accordion/README.md +195 -0
- package/component/alert/README.md +184 -0
- package/component/alert-dialog/README.md +255 -0
- package/component/aspect-ratio/README.md +116 -0
- package/component/avatar/README.md +182 -0
- package/component/badge/README.md +143 -0
- package/component/breadcrumb/README.md +223 -0
- package/component/button/README.md +141 -0
- package/component/button-group/README.md +214 -0
- package/component/calendar/README.md +137 -0
- package/component/card/README.md +232 -0
- package/component/carousel/README.md +276 -0
- package/component/checkbox/README.md +153 -0
- package/component/collapsible/README.md +216 -0
- package/component/combobox/README.md +202 -0
- package/component/command/README.md +287 -0
- package/component/composer/README.md +241 -0
- package/component/context-menu/README.md +268 -0
- package/component/date-picker/README.md +202 -0
- package/component/dialog/README.md +276 -0
- package/component/drawer/README.md +147 -0
- package/component/dropdown-menu/README.md +336 -0
- package/component/editor/README.md +152 -0
- package/component/empty/README.md +193 -0
- package/component/form/README.md +216 -0
- package/component/hover-card/README.md +150 -0
- package/component/icon/README.md +25 -0
- package/component/input/README.md +160 -0
- package/component/input-group/README.md +245 -0
- package/component/input-otp/README.md +331 -0
- package/component/item/README.md +254 -0
- package/component/kanban/README.md +81 -0
- package/component/kbd/README.md +141 -0
- package/component/label/README.md +137 -0
- package/component/menubar/README.md +270 -0
- package/component/native-select/README.md +176 -0
- package/component/navigation-menu/README.md +165 -0
- package/component/pagination/README.md +151 -0
- package/component/pillbox/README.md +68 -0
- package/component/popover/README.md +54 -0
- package/component/progress/README.md +160 -0
- package/component/radio/README.md +212 -0
- package/component/resizable/README.md +178 -0
- package/component/scroll-area/README.md +150 -0
- package/component/select/README.md +228 -0
- package/component/separator/README.md +175 -0
- package/component/sheet/README.md +190 -0
- package/component/skeleton/README.md +158 -0
- package/component/slider/README.md +207 -0
- package/component/spinner/README.md +160 -0
- package/component/switch/README.md +170 -0
- package/component/table/README.md +292 -0
- package/component/tabs/README.md +220 -0
- package/component/textarea/README.md +169 -0
- package/component/timeline/README.md +94 -0
- package/component/toast/README.md +173 -0
- package/component/toggle/README.md +133 -0
- package/component/toggle-group/README.md +234 -0
- package/component/tooltip/README.md +230 -0
- package/fesm2022/ojiepermana-angular-chart-area.mjs +289 -3
- package/fesm2022/ojiepermana-angular-chart-bar.mjs +722 -3
- package/fesm2022/ojiepermana-angular-chart-core.mjs +1482 -3
- package/fesm2022/ojiepermana-angular-chart-line.mjs +294 -3
- package/fesm2022/ojiepermana-angular-chart-pie.mjs +291 -3
- package/fesm2022/ojiepermana-angular-chart-primitives.mjs +1301 -3
- package/fesm2022/ojiepermana-angular-chart-radar.mjs +421 -3
- package/fesm2022/ojiepermana-angular-chart-radial.mjs +295 -3
- package/fesm2022/ojiepermana-angular-chart-scatter.mjs +306 -3
- package/fesm2022/ojiepermana-angular-chart.mjs +12 -3
- package/fesm2022/ojiepermana-angular-component-accordion.mjs +267 -3
- package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs +359 -3
- package/fesm2022/ojiepermana-angular-component-alert.mjs +101 -3
- package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs +31 -3
- package/fesm2022/ojiepermana-angular-component-avatar.mjs +139 -3
- package/fesm2022/ojiepermana-angular-component-badge.mjs +57 -3
- package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs +192 -3
- package/fesm2022/ojiepermana-angular-component-button-group.mjs +95 -3
- package/fesm2022/ojiepermana-angular-component-button.mjs +73 -3
- package/fesm2022/ojiepermana-angular-component-calendar.mjs +718 -3
- package/fesm2022/ojiepermana-angular-component-card.mjs +167 -3
- package/fesm2022/ojiepermana-angular-component-carousel.mjs +326 -3
- package/fesm2022/ojiepermana-angular-component-checkbox.mjs +190 -3
- package/fesm2022/ojiepermana-angular-component-collapsible.mjs +117 -3
- package/fesm2022/ojiepermana-angular-component-combobox.mjs +327 -3
- package/fesm2022/ojiepermana-angular-component-command.mjs +351 -3
- package/fesm2022/ojiepermana-angular-component-composer.mjs +359 -3
- package/fesm2022/ojiepermana-angular-component-context-menu.mjs +158 -3
- package/fesm2022/ojiepermana-angular-component-date-picker.mjs +482 -3
- package/fesm2022/ojiepermana-angular-component-dialog.mjs +400 -3
- package/fesm2022/ojiepermana-angular-component-drawer.mjs +1 -3
- package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs +689 -3
- package/fesm2022/ojiepermana-angular-component-editor.mjs +511 -3
- package/fesm2022/ojiepermana-angular-component-empty.mjs +134 -3
- package/fesm2022/ojiepermana-angular-component-form.mjs +438 -3
- package/fesm2022/ojiepermana-angular-component-hover-card.mjs +273 -3
- package/fesm2022/ojiepermana-angular-component-icon.mjs +139 -3
- package/fesm2022/ojiepermana-angular-component-input-group.mjs +176 -3
- package/fesm2022/ojiepermana-angular-component-input-otp.mjs +550 -3
- package/fesm2022/ojiepermana-angular-component-input.mjs +52 -3
- package/fesm2022/ojiepermana-angular-component-item.mjs +264 -3
- package/fesm2022/ojiepermana-angular-component-kanban.mjs +310 -3
- package/fesm2022/ojiepermana-angular-component-kbd.mjs +48 -3
- package/fesm2022/ojiepermana-angular-component-label.mjs +27 -3
- package/fesm2022/ojiepermana-angular-component-menubar.mjs +327 -3
- package/fesm2022/ojiepermana-angular-component-native-select.mjs +62 -3
- package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs +378 -3
- package/fesm2022/ojiepermana-angular-component-pagination.mjs +238 -3
- package/fesm2022/ojiepermana-angular-component-pillbox.mjs +999 -3
- package/fesm2022/ojiepermana-angular-component-popover.mjs +201 -3
- package/fesm2022/ojiepermana-angular-component-progress.mjs +57 -3
- package/fesm2022/ojiepermana-angular-component-radio.mjs +180 -3
- package/fesm2022/ojiepermana-angular-component-resizable.mjs +493 -3
- package/fesm2022/ojiepermana-angular-component-scroll-area.mjs +51 -3
- package/fesm2022/ojiepermana-angular-component-segmented-control.mjs +227 -3
- package/fesm2022/ojiepermana-angular-component-select.mjs +609 -3
- package/fesm2022/ojiepermana-angular-component-separator.mjs +31 -3
- package/fesm2022/ojiepermana-angular-component-sheet.mjs +407 -3
- package/fesm2022/ojiepermana-angular-component-skeleton.mjs +25 -3
- package/fesm2022/ojiepermana-angular-component-slider.mjs +456 -3
- package/fesm2022/ojiepermana-angular-component-spinner.mjs +56 -3
- package/fesm2022/ojiepermana-angular-component-switch.mjs +145 -3
- package/fesm2022/ojiepermana-angular-component-table.mjs +155 -3
- package/fesm2022/ojiepermana-angular-component-tabs.mjs +315 -3
- package/fesm2022/ojiepermana-angular-component-textarea.mjs +46 -3
- package/fesm2022/ojiepermana-angular-component-timeline.mjs +237 -3
- package/fesm2022/ojiepermana-angular-component-toast.mjs +241 -3
- package/fesm2022/ojiepermana-angular-component-toggle-group.mjs +290 -3
- package/fesm2022/ojiepermana-angular-component-toggle.mjs +76 -3
- package/fesm2022/ojiepermana-angular-component-tooltip.mjs +519 -3
- package/fesm2022/ojiepermana-angular-component-utils-core.mjs +310 -3
- package/fesm2022/ojiepermana-angular-component-utils-overlay.mjs +62 -3
- package/fesm2022/ojiepermana-angular-component-utils-scale.mjs +34 -3
- package/fesm2022/ojiepermana-angular-component-utils.mjs +3 -2
- package/fesm2022/ojiepermana-angular-component.mjs +4 -4
- package/fesm2022/ojiepermana-angular-navigation-core.mjs +21 -3
- package/fesm2022/ojiepermana-angular-navigation-icon.mjs +20 -3
- package/fesm2022/ojiepermana-angular-navigation-navigation-badge-count.component-CDBxQ8rk.mjs +91 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-dockbar-menu.component-DBQHdvGa.mjs +512 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-entry-grid.component-Cd-jh6tg.mjs +623 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-flyout-menu.component-BCGvhoYj.mjs +404 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-horizontal.component-Dk_03e-6.mjs +466 -0
- package/fesm2022/ojiepermana-angular-navigation-ojiepermana-angular-navigation-DNKU6viC.mjs +2642 -0
- package/fesm2022/ojiepermana-angular-navigation-service.mjs +725 -3
- package/fesm2022/ojiepermana-angular-navigation-types.mjs +65 -4
- package/fesm2022/ojiepermana-angular-navigation.mjs +4 -10
- package/fesm2022/ojiepermana-angular-sdk.mjs +204 -4
- package/fesm2022/ojiepermana-angular-theme-component-settings.mjs +1387 -3
- package/fesm2022/ojiepermana-angular-theme-layout-services.mjs +331 -3
- package/fesm2022/ojiepermana-angular-theme-layout-types.mjs +45 -4
- package/fesm2022/ojiepermana-angular-theme-layout-wrapper.mjs +1044 -3
- package/fesm2022/ojiepermana-angular-theme-layout.mjs +729 -3
- package/fesm2022/ojiepermana-angular-theme-page-core.mjs +381 -3
- package/fesm2022/ojiepermana-angular-theme-page-filter.mjs +267 -3
- package/fesm2022/ojiepermana-angular-theme-page-root.mjs +361 -3
- package/fesm2022/ojiepermana-angular-theme-page-side.mjs +198 -3
- package/fesm2022/ojiepermana-angular-theme-page-slots.mjs +110 -3
- package/fesm2022/ojiepermana-angular-theme-page.mjs +7 -2
- package/fesm2022/ojiepermana-angular-theme-shell-services.mjs +338 -3
- package/fesm2022/ojiepermana-angular-theme-shell-types.mjs +160 -4
- package/fesm2022/ojiepermana-angular-theme-shell.mjs +811 -3
- package/fesm2022/ojiepermana-angular-theme-styles.mjs +783 -3
- package/fesm2022/ojiepermana-angular-theme.mjs +4 -4
- package/fesm2022/ojiepermana-angular.mjs +6 -11
- package/navigation/README.md +374 -0
- package/package.json +81 -20
- package/sdk/README.md +212 -0
- package/sdk/schematics/collection.json +20 -0
- package/sdk/schematics/init/index.js +83 -0
- package/sdk/schematics/init/schema.json +19 -0
- package/sdk/schematics/ng-add/index.js +147 -0
- package/sdk/schematics/ng-add/schema.json +14 -0
- package/sdk/schematics/package.json +3 -0
- package/sdk/schematics/sdk/index.js +175 -0
- package/sdk/schematics/sdk/schema.json +19 -0
- package/sdk/sdk.config.example.json +24 -0
- package/sdk/src/config/loader.js +43 -0
- package/sdk/src/config/schema.js +59 -0
- package/sdk/src/emit/client.js +251 -0
- package/sdk/src/emit/metadata.js +310 -0
- package/sdk/src/emit/models.js +104 -0
- package/sdk/src/emit/navigation.js +56 -0
- package/sdk/src/emit/operations.js +118 -0
- package/sdk/src/emit/public-api.js +54 -0
- package/sdk/src/emit/services.js +110 -0
- package/sdk/src/engine.js +67 -0
- package/sdk/src/layout/per-domain.js +360 -0
- package/sdk/src/package.json +3 -0
- package/sdk/src/parser/bundle.js +25 -0
- package/sdk/src/parser/ir.js +429 -0
- package/sdk/src/parser/types.js +7 -0
- package/sdk/src/render/template.js +152 -0
- package/sdk/src/writer/index.js +286 -0
- package/theme/README.md +126 -0
- package/theme/component/settings/README.md +135 -0
- package/theme/layout/README.md +539 -0
- package/theme/page/README.md +453 -0
- package/theme/shell/README.md +340 -0
- package/theme/styles/README.md +178 -0
- package/theme/styles/css/base/components.css +553 -0
- package/theme/styles/css/base/index.css +14 -0
- package/theme/styles/css/base/package.css +9 -0
- package/theme/styles/css/base/prefers-dark.css +86 -0
- package/theme/styles/css/base/print.css +62 -0
- package/theme/styles/css/base/status.css +38 -0
- package/theme/styles/css/base/tailwind.css +165 -0
- package/theme/styles/css/base/theme.css +373 -0
- package/theme/styles/css/base/tokens.css +361 -0
- package/theme/styles/css/color/amber.css +72 -0
- package/theme/styles/css/color/blue.css +72 -0
- package/theme/styles/css/color/brand.css +38 -0
- package/theme/styles/css/color/cyan.css +72 -0
- package/theme/styles/css/color/emerald.css +72 -0
- package/theme/styles/css/color/fuchsia.css +72 -0
- package/theme/styles/css/color/green.css +72 -0
- package/theme/styles/css/color/index.css +19 -0
- package/theme/styles/css/color/indigo.css +72 -0
- package/theme/styles/css/color/lime.css +72 -0
- package/theme/styles/css/color/orange.css +72 -0
- package/theme/styles/css/color/pink.css +72 -0
- package/theme/styles/css/color/purple.css +72 -0
- package/theme/styles/css/color/red.css +72 -0
- package/theme/styles/css/color/rose.css +72 -0
- package/theme/styles/css/color/sky.css +72 -0
- package/theme/styles/css/color/teal.css +72 -0
- package/theme/styles/css/color/violet.css +72 -0
- package/theme/styles/css/color/yellow.css +72 -0
- package/theme/styles/css/index.css +18 -0
- package/theme/styles/css/neutral/gray.css +63 -0
- package/theme/styles/css/neutral/index.css +11 -0
- package/theme/styles/css/neutral/mauve.css +63 -0
- package/theme/styles/css/neutral/mist.css +63 -0
- package/theme/styles/css/neutral/neutral.css +63 -0
- package/theme/styles/css/neutral/olive.css +63 -0
- package/theme/styles/css/neutral/slate.css +63 -0
- package/theme/styles/css/neutral/stone.css +63 -0
- package/theme/styles/css/neutral/taupe.css +63 -0
- package/theme/styles/css/neutral/zinc.css +63 -0
- package/theme/styles/css/radius/index.css +30 -0
- package/theme/styles/css/space/index.css +20 -0
- package/types/ojiepermana-angular-chart-area.d.ts +76 -1
- package/types/ojiepermana-angular-chart-bar.d.ts +201 -1
- package/types/ojiepermana-angular-chart-core.d.ts +811 -1
- package/types/ojiepermana-angular-chart-line.d.ts +75 -1
- package/types/ojiepermana-angular-chart-pie.d.ts +131 -1
- package/types/ojiepermana-angular-chart-primitives.d.ts +291 -1
- package/types/ojiepermana-angular-chart-radar.d.ts +116 -1
- package/types/ojiepermana-angular-chart-radial.d.ts +116 -1
- package/types/ojiepermana-angular-chart-scatter.d.ts +125 -1
- package/types/ojiepermana-angular-chart.d.ts +2 -1
- package/types/ojiepermana-angular-component-accordion.d.ts +85 -1
- package/types/ojiepermana-angular-component-alert-dialog.d.ts +140 -1
- package/types/ojiepermana-angular-component-alert.d.ts +42 -1
- package/types/ojiepermana-angular-component-aspect-ratio.d.ts +12 -1
- package/types/ojiepermana-angular-component-avatar.d.ts +56 -1
- package/types/ojiepermana-angular-component-badge.d.ts +24 -1
- package/types/ojiepermana-angular-component-breadcrumb.d.ts +46 -1
- package/types/ojiepermana-angular-component-button-group.d.ts +26 -1
- package/types/ojiepermana-angular-component-button.d.ts +27 -1
- package/types/ojiepermana-angular-component-calendar.d.ts +111 -1
- package/types/ojiepermana-angular-component-card.d.ts +69 -1
- package/types/ojiepermana-angular-component-carousel.d.ts +86 -1
- package/types/ojiepermana-angular-component-checkbox.d.ts +42 -1
- package/types/ojiepermana-angular-component-collapsible.d.ts +42 -1
- package/types/ojiepermana-angular-component-combobox.d.ts +60 -1
- package/types/ojiepermana-angular-component-command.d.ts +130 -1
- package/types/ojiepermana-angular-component-composer.d.ts +90 -1
- package/types/ojiepermana-angular-component-context-menu.d.ts +54 -1
- package/types/ojiepermana-angular-component-date-picker.d.ts +109 -1
- package/types/ojiepermana-angular-component-dialog.d.ts +136 -1
- package/types/ojiepermana-angular-component-drawer.d.ts +1 -1
- package/types/ojiepermana-angular-component-dropdown-menu.d.ts +248 -1
- package/types/ojiepermana-angular-component-editor.d.ts +135 -1
- package/types/ojiepermana-angular-component-empty.d.ts +50 -1
- package/types/ojiepermana-angular-component-form.d.ts +159 -1
- package/types/ojiepermana-angular-component-hover-card.d.ts +75 -1
- package/types/ojiepermana-angular-component-icon.d.ts +89 -1
- package/types/ojiepermana-angular-component-input-group.d.ts +51 -1
- package/types/ojiepermana-angular-component-input-otp.d.ts +155 -1
- package/types/ojiepermana-angular-component-input.d.ts +21 -1
- package/types/ojiepermana-angular-component-item.d.ts +93 -1
- package/types/ojiepermana-angular-component-kanban.d.ts +70 -1
- package/types/ojiepermana-angular-component-kbd.d.ts +16 -1
- package/types/ojiepermana-angular-component-label.d.ts +11 -1
- package/types/ojiepermana-angular-component-menubar.d.ts +93 -1
- package/types/ojiepermana-angular-component-native-select.d.ts +26 -1
- package/types/ojiepermana-angular-component-navigation-menu.d.ts +104 -1
- package/types/ojiepermana-angular-component-pagination.d.ts +33 -1
- package/types/ojiepermana-angular-component-pillbox.d.ts +222 -1
- package/types/ojiepermana-angular-component-popover.d.ts +66 -1
- package/types/ojiepermana-angular-component-progress.d.ts +17 -1
- package/types/ojiepermana-angular-component-radio.d.ts +60 -1
- package/types/ojiepermana-angular-component-resizable.d.ts +117 -1
- package/types/ojiepermana-angular-component-scroll-area.d.ts +19 -1
- package/types/ojiepermana-angular-component-segmented-control.d.ts +58 -1
- package/types/ojiepermana-angular-component-select.d.ts +122 -1
- package/types/ojiepermana-angular-component-separator.d.ts +14 -1
- package/types/ojiepermana-angular-component-sheet.d.ts +130 -1
- package/types/ojiepermana-angular-component-skeleton.d.ts +10 -1
- package/types/ojiepermana-angular-component-slider.d.ts +83 -1
- package/types/ojiepermana-angular-component-spinner.d.ts +13 -1
- package/types/ojiepermana-angular-component-switch.d.ts +44 -1
- package/types/ojiepermana-angular-component-table.d.ts +57 -1
- package/types/ojiepermana-angular-component-tabs.d.ts +124 -1
- package/types/ojiepermana-angular-component-textarea.d.ts +17 -1
- package/types/ojiepermana-angular-component-timeline.d.ts +64 -1
- package/types/ojiepermana-angular-component-toast.d.ts +64 -1
- package/types/ojiepermana-angular-component-toggle-group.d.ts +90 -1
- package/types/ojiepermana-angular-component-toggle.d.ts +25 -1
- package/types/ojiepermana-angular-component-tooltip.d.ts +143 -1
- package/types/ojiepermana-angular-component-utils-core.d.ts +184 -1
- package/types/ojiepermana-angular-component-utils-overlay.d.ts +21 -1
- package/types/ojiepermana-angular-component-utils-scale.d.ts +19 -1
- package/types/ojiepermana-angular-component-utils.d.ts +2 -1
- package/types/ojiepermana-angular-component.d.ts +2 -1
- package/types/ojiepermana-angular-navigation-core.d.ts +59 -1
- package/types/ojiepermana-angular-navigation-icon.d.ts +12 -1
- package/types/ojiepermana-angular-navigation-service.d.ts +116 -1
- package/types/ojiepermana-angular-navigation-types.d.ts +144 -1
- package/types/ojiepermana-angular-navigation.d.ts +507 -1
- package/types/ojiepermana-angular-sdk.d.ts +89 -1
- package/types/ojiepermana-angular-theme-component-settings.d.ts +154 -1
- package/types/ojiepermana-angular-theme-layout-services.d.ts +147 -1
- package/types/ojiepermana-angular-theme-layout-types.d.ts +40 -1
- package/types/ojiepermana-angular-theme-layout-wrapper.d.ts +299 -1
- package/types/ojiepermana-angular-theme-layout.d.ts +129 -1
- package/types/ojiepermana-angular-theme-page-core.d.ts +157 -1
- package/types/ojiepermana-angular-theme-page-filter.d.ts +77 -1
- package/types/ojiepermana-angular-theme-page-root.d.ts +88 -1
- package/types/ojiepermana-angular-theme-page-side.d.ts +50 -1
- package/types/ojiepermana-angular-theme-page-slots.d.ts +40 -1
- package/types/ojiepermana-angular-theme-page.d.ts +5 -1
- package/types/ojiepermana-angular-theme-shell-services.d.ts +193 -1
- package/types/ojiepermana-angular-theme-shell-types.d.ts +105 -1
- package/types/ojiepermana-angular-theme-shell.d.ts +100 -1
- package/types/ojiepermana-angular-theme-styles.d.ts +319 -1
- package/types/ojiepermana-angular-theme.d.ts +2 -1
- package/types/ojiepermana-angular.d.ts +5 -5
|
@@ -1,7 +1,171 @@
|
|
|
1
|
-
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, input, computed, Component, ElementRef, numberAttribute } from '@angular/core';
|
|
3
|
+
import { cn } from '@ojiepermana/angular/component/utils/core';
|
|
4
|
+
import * as i1 from '@ojiepermana/angular/component/utils/scale';
|
|
5
|
+
import { ComponentScaleDirective } from '@ojiepermana/angular/component/utils/scale';
|
|
2
6
|
|
|
3
|
-
|
|
7
|
+
class CardComponent {
|
|
8
|
+
componentScale = inject(ComponentScaleDirective);
|
|
9
|
+
radius = this.componentScale.radius;
|
|
10
|
+
density = this.componentScale.density;
|
|
11
|
+
size = input('default', /* @ts-ignore */
|
|
12
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
13
|
+
class = input('', /* @ts-ignore */
|
|
14
|
+
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
15
|
+
classes = computed(() => cn('block rounded-lg border border-border bg-card text-card-foreground shadow-sm', this.class()), /* @ts-ignore */
|
|
16
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
17
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
18
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: CardComponent, isStandalone: true, selector: "Card", inputs: { 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-size": "size()" } }, hostDirectives: [{ directive: i1.ComponentScaleDirective, inputs: ["radius", "radius", "density", "density"] }], ngImport: i0, template: `<ng-content />`, isInline: true });
|
|
19
|
+
}
|
|
20
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CardComponent, decorators: [{
|
|
21
|
+
type: Component,
|
|
22
|
+
args: [{
|
|
23
|
+
selector: 'Card',
|
|
24
|
+
hostDirectives: [
|
|
25
|
+
{
|
|
26
|
+
directive: ComponentScaleDirective,
|
|
27
|
+
inputs: ['radius', 'density'],
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
host: {
|
|
31
|
+
'[class]': 'classes()',
|
|
32
|
+
'[attr.data-size]': 'size()',
|
|
33
|
+
},
|
|
34
|
+
template: `<ng-content />`,
|
|
35
|
+
}]
|
|
36
|
+
}], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
37
|
+
|
|
38
|
+
class CardHeaderComponent {
|
|
39
|
+
card = inject(CardComponent, { optional: true });
|
|
40
|
+
class = input('', /* @ts-ignore */
|
|
41
|
+
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
42
|
+
classes = computed(() => cn(this.card?.size() === 'sm'
|
|
43
|
+
? 'grid auto-rows-min grid-cols-[1fr_auto] items-start gap-1 p-4'
|
|
44
|
+
: 'grid auto-rows-min grid-cols-[1fr_auto] items-start gap-1.5 p-6', this.class()), /* @ts-ignore */
|
|
45
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
46
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CardHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
47
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: CardHeaderComponent, isStandalone: true, selector: "CardHeader", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true });
|
|
48
|
+
}
|
|
49
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CardHeaderComponent, decorators: [{
|
|
50
|
+
type: Component,
|
|
51
|
+
args: [{
|
|
52
|
+
selector: 'CardHeader',
|
|
53
|
+
host: { '[class]': 'classes()' },
|
|
54
|
+
template: `<ng-content />`,
|
|
55
|
+
}]
|
|
56
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
57
|
+
|
|
58
|
+
class CardTitleComponent {
|
|
59
|
+
card = inject(CardComponent, { optional: true });
|
|
60
|
+
element = inject(ElementRef);
|
|
61
|
+
class = input('', /* @ts-ignore */
|
|
62
|
+
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
63
|
+
/** Heading level for custom `<CardTitle>` hosts; native h1-h6 infer their own level. */
|
|
64
|
+
level = input(null, { ...(ngDevMode ? { debugName: "level" } : /* istanbul ignore next */ {}), transform: (value) => (value == null ? null : numberAttribute(value)) });
|
|
65
|
+
resolvedLevel = computed(() => {
|
|
66
|
+
const explicit = this.level();
|
|
67
|
+
if (explicit !== null) {
|
|
68
|
+
return Math.min(6, Math.max(1, Math.round(explicit)));
|
|
69
|
+
}
|
|
70
|
+
const nativeLevel = /^H([1-6])$/.exec(this.element.nativeElement.tagName)?.[1];
|
|
71
|
+
return nativeLevel ? Number(nativeLevel) : 3;
|
|
72
|
+
}, /* @ts-ignore */
|
|
73
|
+
...(ngDevMode ? [{ debugName: "resolvedLevel" }] : /* istanbul ignore next */ []));
|
|
74
|
+
classes = computed(() => cn(this.card?.size() === 'sm'
|
|
75
|
+
? 'block col-start-1 text-base font-semibold leading-none tracking-tight'
|
|
76
|
+
: 'block col-start-1 text-lg font-semibold leading-none tracking-tight', this.class()), /* @ts-ignore */
|
|
77
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
78
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CardTitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
79
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: CardTitleComponent, isStandalone: true, selector: "CardTitle, [CardTitle]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, level: { classPropertyName: "level", publicName: "level", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "heading" }, properties: { "class": "classes()", "attr.aria-level": "resolvedLevel()" } }, ngImport: i0, template: `<ng-content />`, isInline: true });
|
|
80
|
+
}
|
|
81
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CardTitleComponent, decorators: [{
|
|
82
|
+
type: Component,
|
|
83
|
+
args: [{
|
|
84
|
+
selector: 'CardTitle, [CardTitle]',
|
|
85
|
+
host: {
|
|
86
|
+
'[class]': 'classes()',
|
|
87
|
+
role: 'heading',
|
|
88
|
+
'[attr.aria-level]': 'resolvedLevel()',
|
|
89
|
+
},
|
|
90
|
+
template: `<ng-content />`,
|
|
91
|
+
}]
|
|
92
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], level: [{ type: i0.Input, args: [{ isSignal: true, alias: "level", required: false }] }] } });
|
|
93
|
+
|
|
94
|
+
class CardDescriptionComponent {
|
|
95
|
+
card = inject(CardComponent, { optional: true });
|
|
96
|
+
class = input('', /* @ts-ignore */
|
|
97
|
+
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
98
|
+
classes = computed(() => cn(this.card?.size() === 'sm'
|
|
99
|
+
? 'block col-start-1 text-xs text-muted-foreground'
|
|
100
|
+
: 'block col-start-1 text-sm text-muted-foreground', this.class()), /* @ts-ignore */
|
|
101
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
102
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CardDescriptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
103
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: CardDescriptionComponent, isStandalone: true, selector: "CardDescription, p[CardDescription]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true });
|
|
104
|
+
}
|
|
105
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CardDescriptionComponent, decorators: [{
|
|
106
|
+
type: Component,
|
|
107
|
+
args: [{
|
|
108
|
+
selector: 'CardDescription, p[CardDescription]',
|
|
109
|
+
host: { '[class]': 'classes()' },
|
|
110
|
+
template: `<ng-content />`,
|
|
111
|
+
}]
|
|
112
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
113
|
+
|
|
114
|
+
class CardActionComponent {
|
|
115
|
+
class = input('', /* @ts-ignore */
|
|
116
|
+
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
117
|
+
classes = computed(() => cn('col-start-2 row-span-2 row-start-1 flex items-center self-start justify-self-end', this.class()), /* @ts-ignore */
|
|
118
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
119
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CardActionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
120
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: CardActionComponent, isStandalone: true, selector: "CardAction", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true });
|
|
121
|
+
}
|
|
122
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CardActionComponent, decorators: [{
|
|
123
|
+
type: Component,
|
|
124
|
+
args: [{
|
|
125
|
+
selector: 'CardAction',
|
|
126
|
+
host: { '[class]': 'classes()' },
|
|
127
|
+
template: `<ng-content />`,
|
|
128
|
+
}]
|
|
129
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
130
|
+
|
|
131
|
+
class CardContentComponent {
|
|
132
|
+
card = inject(CardComponent, { optional: true });
|
|
133
|
+
class = input('', /* @ts-ignore */
|
|
134
|
+
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
135
|
+
classes = computed(() => cn(this.card?.size() === 'sm' ? 'block p-4 pt-0' : 'block p-6 pt-0', this.class()), /* @ts-ignore */
|
|
136
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
137
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CardContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
138
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: CardContentComponent, isStandalone: true, selector: "CardContent", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true });
|
|
139
|
+
}
|
|
140
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CardContentComponent, decorators: [{
|
|
141
|
+
type: Component,
|
|
142
|
+
args: [{
|
|
143
|
+
selector: 'CardContent',
|
|
144
|
+
host: { '[class]': 'classes()' },
|
|
145
|
+
template: `<ng-content />`,
|
|
146
|
+
}]
|
|
147
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
148
|
+
|
|
149
|
+
class CardFooterComponent {
|
|
150
|
+
card = inject(CardComponent, { optional: true });
|
|
151
|
+
class = input('', /* @ts-ignore */
|
|
152
|
+
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
153
|
+
classes = computed(() => cn(this.card?.size() === 'sm' ? 'flex items-center p-4 pt-0' : 'flex items-center p-6 pt-0', this.class()), /* @ts-ignore */
|
|
154
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
155
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CardFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
156
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: CardFooterComponent, isStandalone: true, selector: "CardFooter", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true });
|
|
157
|
+
}
|
|
158
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CardFooterComponent, decorators: [{
|
|
159
|
+
type: Component,
|
|
160
|
+
args: [{
|
|
161
|
+
selector: 'CardFooter',
|
|
162
|
+
host: { '[class]': 'classes()' },
|
|
163
|
+
template: `<ng-content />`,
|
|
164
|
+
}]
|
|
165
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
4
166
|
|
|
5
167
|
/**
|
|
6
168
|
* Generated bundle index. Do not edit.
|
|
7
|
-
*/
|
|
169
|
+
*/
|
|
170
|
+
|
|
171
|
+
export { CardActionComponent, CardComponent, CardContentComponent, CardDescriptionComponent, CardFooterComponent, CardHeaderComponent, CardTitleComponent };
|
|
@@ -1,7 +1,330 @@
|
|
|
1
|
-
|
|
1
|
+
import { isPlatformBrowser } from '@angular/common';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { Directive, input, output, signal, inject, PLATFORM_ID, computed, effect, forwardRef, Component, viewChild } from '@angular/core';
|
|
4
|
+
import EmblaCarousel from 'embla-carousel';
|
|
5
|
+
import { cn } from '@ojiepermana/angular/component/utils/core';
|
|
2
6
|
|
|
3
|
-
|
|
7
|
+
class CarouselContextBase {
|
|
8
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CarouselContextBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
9
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.4", type: CarouselContextBase, isStandalone: true, ngImport: i0 });
|
|
10
|
+
}
|
|
11
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CarouselContextBase, decorators: [{
|
|
12
|
+
type: Directive
|
|
13
|
+
}] });
|
|
14
|
+
class CarouselComponent extends CarouselContextBase {
|
|
15
|
+
orientation = input('horizontal', /* @ts-ignore */
|
|
16
|
+
...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
17
|
+
opts = input({}, /* @ts-ignore */
|
|
18
|
+
...(ngDevMode ? [{ debugName: "opts" }] : /* istanbul ignore next */ []));
|
|
19
|
+
plugins = input([], /* @ts-ignore */
|
|
20
|
+
...(ngDevMode ? [{ debugName: "plugins" }] : /* istanbul ignore next */ []));
|
|
21
|
+
keyboard = input(true, /* @ts-ignore */
|
|
22
|
+
...(ngDevMode ? [{ debugName: "keyboard" }] : /* istanbul ignore next */ []));
|
|
23
|
+
label = input('Carousel', /* @ts-ignore */
|
|
24
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
25
|
+
class = input('', /* @ts-ignore */
|
|
26
|
+
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
27
|
+
apiReady = output();
|
|
28
|
+
apiChange = output();
|
|
29
|
+
selectedIndex = signal(0, /* @ts-ignore */
|
|
30
|
+
...(ngDevMode ? [{ debugName: "selectedIndex" }] : /* istanbul ignore next */ []));
|
|
31
|
+
slideCount = signal(0, /* @ts-ignore */
|
|
32
|
+
...(ngDevMode ? [{ debugName: "slideCount" }] : /* istanbul ignore next */ []));
|
|
33
|
+
canScrollPrev = signal(false, /* @ts-ignore */
|
|
34
|
+
...(ngDevMode ? [{ debugName: "canScrollPrev" }] : /* istanbul ignore next */ []));
|
|
35
|
+
canScrollNext = signal(false, /* @ts-ignore */
|
|
36
|
+
...(ngDevMode ? [{ debugName: "canScrollNext" }] : /* istanbul ignore next */ []));
|
|
37
|
+
isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
|
|
38
|
+
viewport = signal(null, /* @ts-ignore */
|
|
39
|
+
...(ngDevMode ? [{ debugName: "viewport" }] : /* istanbul ignore next */ []));
|
|
40
|
+
api = null;
|
|
41
|
+
classes = computed(() => cn('relative block', this.class()), /* @ts-ignore */
|
|
42
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
43
|
+
constructor() {
|
|
44
|
+
super();
|
|
45
|
+
effect((onCleanup) => {
|
|
46
|
+
const viewport = this.viewport();
|
|
47
|
+
const orientation = this.orientation();
|
|
48
|
+
const opts = this.opts();
|
|
49
|
+
const plugins = this.plugins();
|
|
50
|
+
if (!this.isBrowser || !viewport) {
|
|
51
|
+
this.api = null;
|
|
52
|
+
this.resetState();
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
const carousel = EmblaCarousel(viewport, { ...opts, axis: orientation === 'horizontal' ? 'x' : 'y' }, [...plugins]);
|
|
56
|
+
const updateState = () => this.updateState(carousel);
|
|
57
|
+
this.api = carousel;
|
|
58
|
+
this.apiChange.emit(carousel);
|
|
59
|
+
this.apiReady.emit(carousel);
|
|
60
|
+
updateState();
|
|
61
|
+
carousel.on('select', updateState);
|
|
62
|
+
carousel.on('reInit', updateState);
|
|
63
|
+
carousel.on('resize', updateState);
|
|
64
|
+
onCleanup(() => {
|
|
65
|
+
carousel.destroy();
|
|
66
|
+
if (this.api === carousel) {
|
|
67
|
+
this.api = null;
|
|
68
|
+
this.apiChange.emit(null);
|
|
69
|
+
this.resetState();
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
registerViewport(viewport) {
|
|
75
|
+
this.viewport.set(viewport);
|
|
76
|
+
}
|
|
77
|
+
unregisterViewport(viewport) {
|
|
78
|
+
if (this.viewport() === viewport) {
|
|
79
|
+
this.viewport.set(null);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
scrollPrev() {
|
|
83
|
+
this.api?.scrollPrev();
|
|
84
|
+
}
|
|
85
|
+
scrollNext() {
|
|
86
|
+
this.api?.scrollNext();
|
|
87
|
+
}
|
|
88
|
+
scrollTo(index) {
|
|
89
|
+
this.api?.scrollTo(index);
|
|
90
|
+
}
|
|
91
|
+
onKeydown(event) {
|
|
92
|
+
if (!this.keyboard())
|
|
93
|
+
return;
|
|
94
|
+
const horizontal = this.orientation() === 'horizontal';
|
|
95
|
+
const previousKey = horizontal ? 'ArrowLeft' : 'ArrowUp';
|
|
96
|
+
const nextKey = horizontal ? 'ArrowRight' : 'ArrowDown';
|
|
97
|
+
if (event.key === previousKey) {
|
|
98
|
+
event.preventDefault();
|
|
99
|
+
this.scrollPrev();
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
if (event.key === nextKey) {
|
|
103
|
+
event.preventDefault();
|
|
104
|
+
this.scrollNext();
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
if (event.key === 'Home') {
|
|
108
|
+
event.preventDefault();
|
|
109
|
+
this.scrollTo(0);
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
if (event.key === 'End') {
|
|
113
|
+
event.preventDefault();
|
|
114
|
+
this.scrollTo(Math.max(0, this.slideCount() - 1));
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
updateState(carousel) {
|
|
118
|
+
this.slideCount.set(carousel.scrollSnapList().length);
|
|
119
|
+
this.selectedIndex.set(carousel.selectedScrollSnap());
|
|
120
|
+
this.canScrollPrev.set(carousel.canScrollPrev());
|
|
121
|
+
this.canScrollNext.set(carousel.canScrollNext());
|
|
122
|
+
}
|
|
123
|
+
resetState() {
|
|
124
|
+
this.selectedIndex.set(0);
|
|
125
|
+
this.slideCount.set(0);
|
|
126
|
+
this.canScrollPrev.set(false);
|
|
127
|
+
this.canScrollNext.set(false);
|
|
128
|
+
}
|
|
129
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CarouselComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
130
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: CarouselComponent, isStandalone: true, selector: "Carousel", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, opts: { classPropertyName: "opts", publicName: "opts", isSignal: true, isRequired: false, transformFunction: null }, plugins: { classPropertyName: "plugins", publicName: "plugins", isSignal: true, isRequired: false, transformFunction: null }, keyboard: { classPropertyName: "keyboard", publicName: "keyboard", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { apiReady: "apiReady", apiChange: "apiChange" }, host: { listeners: { "keydown": "onKeydown($event)" }, properties: { "class": "classes()", "attr.role": "\"region\"", "attr.aria-roledescription": "\"carousel\"", "attr.aria-label": "label()", "attr.data-orientation": "orientation()", "attr.tabindex": "keyboard() ? 0 : null" } }, providers: [{ provide: CarouselContextBase, useExisting: forwardRef(() => CarouselComponent) }], usesInheritance: true, ngImport: i0, template: `<ng-content />`, isInline: true });
|
|
131
|
+
}
|
|
132
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CarouselComponent, decorators: [{
|
|
133
|
+
type: Component,
|
|
134
|
+
args: [{
|
|
135
|
+
selector: 'Carousel',
|
|
136
|
+
providers: [{ provide: CarouselContextBase, useExisting: forwardRef(() => CarouselComponent) }],
|
|
137
|
+
host: {
|
|
138
|
+
'[class]': 'classes()',
|
|
139
|
+
'[attr.role]': '"region"',
|
|
140
|
+
'[attr.aria-roledescription]': '"carousel"',
|
|
141
|
+
'[attr.aria-label]': 'label()',
|
|
142
|
+
'[attr.data-orientation]': 'orientation()',
|
|
143
|
+
'[attr.tabindex]': 'keyboard() ? 0 : null',
|
|
144
|
+
'(keydown)': 'onKeydown($event)',
|
|
145
|
+
},
|
|
146
|
+
template: `<ng-content />`,
|
|
147
|
+
}]
|
|
148
|
+
}], ctorParameters: () => [], propDecorators: { orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], opts: [{ type: i0.Input, args: [{ isSignal: true, alias: "opts", required: false }] }], plugins: [{ type: i0.Input, args: [{ isSignal: true, alias: "plugins", required: false }] }], keyboard: [{ type: i0.Input, args: [{ isSignal: true, alias: "keyboard", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], apiReady: [{ type: i0.Output, args: ["apiReady"] }], apiChange: [{ type: i0.Output, args: ["apiChange"] }] } });
|
|
149
|
+
class CarouselContentComponent {
|
|
150
|
+
ctx = inject(CarouselContextBase);
|
|
151
|
+
viewport = viewChild('viewport', /* @ts-ignore */
|
|
152
|
+
...(ngDevMode ? [{ debugName: "viewport" }] : /* istanbul ignore next */ []));
|
|
153
|
+
class = input('', /* @ts-ignore */
|
|
154
|
+
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
155
|
+
contentClasses = computed(() => cn('flex', this.ctx.orientation() === 'horizontal' ? '-ml-4' : '-mt-4 flex-col', this.class()), /* @ts-ignore */
|
|
156
|
+
...(ngDevMode ? [{ debugName: "contentClasses" }] : /* istanbul ignore next */ []));
|
|
157
|
+
ngAfterViewInit() {
|
|
158
|
+
const viewport = this.viewport()?.nativeElement;
|
|
159
|
+
if (viewport)
|
|
160
|
+
this.ctx.registerViewport(viewport);
|
|
161
|
+
}
|
|
162
|
+
ngOnDestroy() {
|
|
163
|
+
const viewport = this.viewport()?.nativeElement;
|
|
164
|
+
if (viewport)
|
|
165
|
+
this.ctx.unregisterViewport(viewport);
|
|
166
|
+
}
|
|
167
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CarouselContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
168
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.4", type: CarouselContentComponent, isStandalone: true, selector: "CarouselContent", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "\"block\"" } }, viewQueries: [{ propertyName: "viewport", first: true, predicate: ["viewport"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
169
|
+
<div #viewport class="overflow-hidden">
|
|
170
|
+
<div [class]="contentClasses()"><ng-content /></div>
|
|
171
|
+
</div>
|
|
172
|
+
`, isInline: true });
|
|
173
|
+
}
|
|
174
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CarouselContentComponent, decorators: [{
|
|
175
|
+
type: Component,
|
|
176
|
+
args: [{
|
|
177
|
+
selector: 'CarouselContent',
|
|
178
|
+
host: {
|
|
179
|
+
'[class]': '"block"',
|
|
180
|
+
},
|
|
181
|
+
template: `
|
|
182
|
+
<div #viewport class="overflow-hidden">
|
|
183
|
+
<div [class]="contentClasses()"><ng-content /></div>
|
|
184
|
+
</div>
|
|
185
|
+
`,
|
|
186
|
+
}]
|
|
187
|
+
}], propDecorators: { viewport: [{ type: i0.ViewChild, args: ['viewport', { isSignal: true }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
188
|
+
class CarouselItemComponent {
|
|
189
|
+
ctx = inject(CarouselContextBase);
|
|
190
|
+
ariaLabel = input(null, /* @ts-ignore */
|
|
191
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
192
|
+
class = input('', /* @ts-ignore */
|
|
193
|
+
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
194
|
+
classes = computed(() => cn('min-w-0 shrink-0 grow-0 basis-full', this.ctx.orientation() === 'horizontal' ? 'pl-4' : 'pt-4', this.class()), /* @ts-ignore */
|
|
195
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
196
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CarouselItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
197
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: CarouselItemComponent, isStandalone: true, selector: "CarouselItem", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.role": "\"group\"", "attr.aria-roledescription": "\"slide\"", "attr.aria-label": "ariaLabel()" } }, ngImport: i0, template: `<ng-content />`, isInline: true });
|
|
198
|
+
}
|
|
199
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CarouselItemComponent, decorators: [{
|
|
200
|
+
type: Component,
|
|
201
|
+
args: [{
|
|
202
|
+
selector: 'CarouselItem',
|
|
203
|
+
host: {
|
|
204
|
+
'[class]': 'classes()',
|
|
205
|
+
'[attr.role]': '"group"',
|
|
206
|
+
'[attr.aria-roledescription]': '"slide"',
|
|
207
|
+
'[attr.aria-label]': 'ariaLabel()',
|
|
208
|
+
},
|
|
209
|
+
template: `<ng-content />`,
|
|
210
|
+
}]
|
|
211
|
+
}], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
212
|
+
class CarouselPreviousComponent {
|
|
213
|
+
ctx = inject(CarouselContextBase);
|
|
214
|
+
label = input('Previous slide', /* @ts-ignore */
|
|
215
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
216
|
+
class = input('', /* @ts-ignore */
|
|
217
|
+
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
218
|
+
classes = computed(() => cn(carouselButtonClasses, carouselPreviousPlacement(this.ctx.orientation()), this.class()), /* @ts-ignore */
|
|
219
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
220
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CarouselPreviousComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
221
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: CarouselPreviousComponent, isStandalone: true, selector: "button[CarouselPrevious]", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "button" }, listeners: { "click": "ctx.scrollPrev()" }, properties: { "class": "classes()", "attr.aria-label": "label()", "disabled": "!ctx.canScrollPrev() || null" } }, ngImport: i0, template: `
|
|
222
|
+
<svg
|
|
223
|
+
aria-hidden="true"
|
|
224
|
+
class="h-4 w-4"
|
|
225
|
+
viewBox="0 0 24 24"
|
|
226
|
+
fill="none"
|
|
227
|
+
stroke="currentColor"
|
|
228
|
+
stroke-width="2"
|
|
229
|
+
stroke-linecap="round"
|
|
230
|
+
stroke-linejoin="round"
|
|
231
|
+
>
|
|
232
|
+
<path d="m15 18-6-6 6-6" />
|
|
233
|
+
</svg>
|
|
234
|
+
`, isInline: true });
|
|
235
|
+
}
|
|
236
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CarouselPreviousComponent, decorators: [{
|
|
237
|
+
type: Component,
|
|
238
|
+
args: [{
|
|
239
|
+
selector: 'button[CarouselPrevious]',
|
|
240
|
+
host: {
|
|
241
|
+
'[class]': 'classes()',
|
|
242
|
+
type: 'button',
|
|
243
|
+
'[attr.aria-label]': 'label()',
|
|
244
|
+
'[disabled]': '!ctx.canScrollPrev() || null',
|
|
245
|
+
'(click)': 'ctx.scrollPrev()',
|
|
246
|
+
},
|
|
247
|
+
template: `
|
|
248
|
+
<svg
|
|
249
|
+
aria-hidden="true"
|
|
250
|
+
class="h-4 w-4"
|
|
251
|
+
viewBox="0 0 24 24"
|
|
252
|
+
fill="none"
|
|
253
|
+
stroke="currentColor"
|
|
254
|
+
stroke-width="2"
|
|
255
|
+
stroke-linecap="round"
|
|
256
|
+
stroke-linejoin="round"
|
|
257
|
+
>
|
|
258
|
+
<path d="m15 18-6-6 6-6" />
|
|
259
|
+
</svg>
|
|
260
|
+
`,
|
|
261
|
+
}]
|
|
262
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
263
|
+
class CarouselNextComponent {
|
|
264
|
+
ctx = inject(CarouselContextBase);
|
|
265
|
+
label = input('Next slide', /* @ts-ignore */
|
|
266
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
267
|
+
class = input('', /* @ts-ignore */
|
|
268
|
+
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
269
|
+
classes = computed(() => cn(carouselButtonClasses, carouselNextPlacement(this.ctx.orientation()), this.class()), /* @ts-ignore */
|
|
270
|
+
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
271
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CarouselNextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
272
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: CarouselNextComponent, isStandalone: true, selector: "button[CarouselNext]", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "button" }, listeners: { "click": "ctx.scrollNext()" }, properties: { "class": "classes()", "attr.aria-label": "label()", "disabled": "!ctx.canScrollNext() || null" } }, ngImport: i0, template: `
|
|
273
|
+
<svg
|
|
274
|
+
aria-hidden="true"
|
|
275
|
+
class="h-4 w-4"
|
|
276
|
+
viewBox="0 0 24 24"
|
|
277
|
+
fill="none"
|
|
278
|
+
stroke="currentColor"
|
|
279
|
+
stroke-width="2"
|
|
280
|
+
stroke-linecap="round"
|
|
281
|
+
stroke-linejoin="round"
|
|
282
|
+
>
|
|
283
|
+
<path d="m9 18 6-6-6-6" />
|
|
284
|
+
</svg>
|
|
285
|
+
`, isInline: true });
|
|
286
|
+
}
|
|
287
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CarouselNextComponent, decorators: [{
|
|
288
|
+
type: Component,
|
|
289
|
+
args: [{
|
|
290
|
+
selector: 'button[CarouselNext]',
|
|
291
|
+
host: {
|
|
292
|
+
'[class]': 'classes()',
|
|
293
|
+
type: 'button',
|
|
294
|
+
'[attr.aria-label]': 'label()',
|
|
295
|
+
'[disabled]': '!ctx.canScrollNext() || null',
|
|
296
|
+
'(click)': 'ctx.scrollNext()',
|
|
297
|
+
},
|
|
298
|
+
template: `
|
|
299
|
+
<svg
|
|
300
|
+
aria-hidden="true"
|
|
301
|
+
class="h-4 w-4"
|
|
302
|
+
viewBox="0 0 24 24"
|
|
303
|
+
fill="none"
|
|
304
|
+
stroke="currentColor"
|
|
305
|
+
stroke-width="2"
|
|
306
|
+
stroke-linecap="round"
|
|
307
|
+
stroke-linejoin="round"
|
|
308
|
+
>
|
|
309
|
+
<path d="m9 18 6-6-6-6" />
|
|
310
|
+
</svg>
|
|
311
|
+
`,
|
|
312
|
+
}]
|
|
313
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
314
|
+
const carouselButtonClasses = 'absolute inline-flex h-8 w-8 items-center justify-center rounded-full border border-border bg-background p-0 text-foreground shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50';
|
|
315
|
+
function carouselPreviousPlacement(orientation) {
|
|
316
|
+
return orientation === 'horizontal'
|
|
317
|
+
? '-left-12 top-1/2 -translate-y-1/2'
|
|
318
|
+
: '-top-12 left-1/2 -translate-x-1/2 rotate-90';
|
|
319
|
+
}
|
|
320
|
+
function carouselNextPlacement(orientation) {
|
|
321
|
+
return orientation === 'horizontal'
|
|
322
|
+
? '-right-12 top-1/2 -translate-y-1/2'
|
|
323
|
+
: '-bottom-12 left-1/2 -translate-x-1/2 rotate-90';
|
|
324
|
+
}
|
|
4
325
|
|
|
5
326
|
/**
|
|
6
327
|
* Generated bundle index. Do not edit.
|
|
7
|
-
*/
|
|
328
|
+
*/
|
|
329
|
+
|
|
330
|
+
export { CarouselComponent, CarouselContentComponent, CarouselContextBase, CarouselItemComponent, CarouselNextComponent, CarouselPreviousComponent };
|