@ojiepermana/angular 22.0.1 → 22.0.27
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 +16 -302
- package/fesm2022/ojiepermana-angular-chart.mjs +11 -0
- package/fesm2022/ojiepermana-angular-chart.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-component.mjs +11 -0
- package/fesm2022/ojiepermana-angular-component.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-navigation.mjs +11 -0
- package/fesm2022/ojiepermana-angular-navigation.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-sdk.mjs +11 -0
- package/fesm2022/ojiepermana-angular-sdk.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-theme.mjs +3 -382
- package/fesm2022/ojiepermana-angular-theme.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular.mjs +14 -14
- package/fesm2022/ojiepermana-angular.mjs.map +1 -1
- package/package.json +25 -425
- package/types/ojiepermana-angular-chart.d.ts +1 -0
- package/types/ojiepermana-angular-component.d.ts +1 -0
- package/types/ojiepermana-angular-navigation.d.ts +1 -0
- package/types/ojiepermana-angular-sdk.d.ts +1 -0
- package/types/ojiepermana-angular-theme.d.ts +1 -116
- package/types/ojiepermana-angular.d.ts +5 -3
- package/.npmignore +0 -2
- package/collection.json +0 -30
- package/component/accordion/README.md +0 -195
- package/component/accordion/package.json +0 -4
- package/component/alert/README.md +0 -182
- package/component/alert/package.json +0 -4
- package/component/alert-dialog/README.md +0 -239
- package/component/alert-dialog/package.json +0 -4
- package/component/aspect-ratio/README.md +0 -112
- package/component/aspect-ratio/package.json +0 -4
- package/component/avatar/README.md +0 -176
- package/component/avatar/package.json +0 -4
- package/component/badge/README.md +0 -133
- package/component/badge/package.json +0 -4
- package/component/breadcrumb/README.md +0 -216
- package/component/breadcrumb/package.json +0 -4
- package/component/button/README.md +0 -139
- package/component/button/package.json +0 -4
- package/component/button-group/README.md +0 -208
- package/component/button-group/package.json +0 -4
- package/component/calendar/README.md +0 -132
- package/component/calendar/package.json +0 -4
- package/component/card/README.md +0 -220
- package/component/card/package.json +0 -4
- package/component/carousel/README.md +0 -276
- package/component/carousel/package.json +0 -4
- package/component/chart/README.md +0 -249
- package/component/chart/area/package.json +0 -4
- package/component/chart/bar/package.json +0 -4
- package/component/chart/line/package.json +0 -4
- package/component/chart/package.json +0 -4
- package/component/chart/pie/package.json +0 -4
- package/component/chart/radar/package.json +0 -4
- package/component/chart/radial/package.json +0 -4
- package/component/chart/scatter/package.json +0 -4
- package/component/checkbox/README.md +0 -149
- package/component/checkbox/package.json +0 -4
- package/component/collapsible/README.md +0 -195
- package/component/collapsible/package.json +0 -4
- package/component/combobox/README.md +0 -198
- package/component/combobox/package.json +0 -4
- package/component/command/README.md +0 -275
- package/component/command/package.json +0 -4
- package/component/composer/README.md +0 -235
- package/component/composer/package.json +0 -4
- package/component/context-menu/README.md +0 -267
- package/component/context-menu/package.json +0 -4
- package/component/date-picker/README.md +0 -177
- package/component/date-picker/package.json +0 -4
- package/component/dialog/README.md +0 -237
- package/component/dialog/package.json +0 -4
- package/component/drawer/README.md +0 -145
- package/component/drawer/package.json +0 -4
- package/component/dropdown-menu/README.md +0 -311
- package/component/dropdown-menu/package.json +0 -4
- package/component/editor/README.md +0 -136
- package/component/editor/package.json +0 -4
- package/component/empty/README.md +0 -183
- package/component/empty/package.json +0 -4
- package/component/form/README.md +0 -210
- package/component/form/package.json +0 -4
- package/component/hover-card/README.md +0 -146
- package/component/hover-card/package.json +0 -4
- package/component/input/README.md +0 -159
- package/component/input/package.json +0 -4
- package/component/input-group/README.md +0 -239
- package/component/input-group/package.json +0 -4
- package/component/input-otp/README.md +0 -278
- package/component/input-otp/package.json +0 -4
- package/component/item/README.md +0 -247
- package/component/item/package.json +0 -4
- package/component/kanban/README.md +0 -81
- package/component/kanban/package.json +0 -4
- package/component/kbd/README.md +0 -139
- package/component/kbd/package.json +0 -4
- package/component/label/README.md +0 -136
- package/component/label/package.json +0 -4
- package/component/menubar/README.md +0 -269
- package/component/menubar/package.json +0 -4
- package/component/native-select/README.md +0 -176
- package/component/native-select/package.json +0 -4
- package/component/navigation-menu/README.md +0 -160
- package/component/navigation-menu/package.json +0 -4
- package/component/pagination/README.md +0 -144
- package/component/pagination/package.json +0 -4
- package/component/pillbox/README.md +0 -67
- package/component/pillbox/package.json +0 -4
- package/component/popover/README.md +0 -43
- package/component/popover/package.json +0 -4
- package/component/progress/README.md +0 -160
- package/component/progress/package.json +0 -4
- package/component/radio/README.md +0 -209
- package/component/radio/package.json +0 -4
- package/component/resizable/README.md +0 -168
- package/component/resizable/package.json +0 -4
- package/component/scroll-area/README.md +0 -143
- package/component/scroll-area/package.json +0 -4
- package/component/select/README.md +0 -174
- package/component/select/package.json +0 -4
- package/component/separator/README.md +0 -170
- package/component/separator/package.json +0 -4
- package/component/sheet/README.md +0 -183
- package/component/sheet/package.json +0 -4
- package/component/skeleton/README.md +0 -158
- package/component/skeleton/package.json +0 -4
- package/component/slider/README.md +0 -207
- package/component/slider/package.json +0 -4
- package/component/spinner/README.md +0 -160
- package/component/spinner/package.json +0 -4
- package/component/switch/README.md +0 -166
- package/component/switch/package.json +0 -4
- package/component/table/README.md +0 -291
- package/component/table/package.json +0 -4
- package/component/tabs/README.md +0 -219
- package/component/tabs/package.json +0 -4
- package/component/textarea/README.md +0 -154
- package/component/textarea/package.json +0 -4
- package/component/timeline/README.md +0 -94
- package/component/timeline/package.json +0 -4
- package/component/toast/README.md +0 -321
- package/component/toast/package.json +0 -4
- package/component/toggle/README.md +0 -131
- package/component/toggle/package.json +0 -4
- package/component/toggle-group/README.md +0 -206
- package/component/toggle-group/package.json +0 -4
- package/component/tooltip/README.md +0 -211
- package/component/tooltip/package.json +0 -4
- package/component/utils/package.json +0 -4
- package/fesm2022/ojiepermana-angular-component-accordion.mjs +0 -189
- package/fesm2022/ojiepermana-angular-component-accordion.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs +0 -276
- package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-alert.mjs +0 -99
- package/fesm2022/ojiepermana-angular-component-alert.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs +0 -37
- package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-avatar.mjs +0 -139
- package/fesm2022/ojiepermana-angular-component-avatar.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-badge.mjs +0 -50
- package/fesm2022/ojiepermana-angular-component-badge.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs +0 -200
- package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-button-group.mjs +0 -103
- package/fesm2022/ojiepermana-angular-component-button-group.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-button.mjs +0 -68
- package/fesm2022/ojiepermana-angular-component-button.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-calendar.mjs +0 -88
- package/fesm2022/ojiepermana-angular-component-calendar.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-card.mjs +0 -152
- package/fesm2022/ojiepermana-angular-component-card.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-carousel.mjs +0 -334
- package/fesm2022/ojiepermana-angular-component-carousel.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-chart-area.mjs +0 -6
- package/fesm2022/ojiepermana-angular-component-chart-area.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-chart-bar.mjs +0 -6
- package/fesm2022/ojiepermana-angular-component-chart-bar.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-chart-line.mjs +0 -6
- package/fesm2022/ojiepermana-angular-component-chart-line.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-chart-pie.mjs +0 -6
- package/fesm2022/ojiepermana-angular-component-chart-pie.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-chart-radar.mjs +0 -6
- package/fesm2022/ojiepermana-angular-component-chart-radar.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-chart-radial.mjs +0 -6
- package/fesm2022/ojiepermana-angular-component-chart-radial.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-chart-scatter.mjs +0 -6
- package/fesm2022/ojiepermana-angular-component-chart-scatter.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-chart.mjs +0 -3925
- package/fesm2022/ojiepermana-angular-component-chart.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-checkbox.mjs +0 -114
- package/fesm2022/ojiepermana-angular-component-checkbox.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-collapsible.mjs +0 -124
- package/fesm2022/ojiepermana-angular-component-collapsible.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-combobox.mjs +0 -272
- package/fesm2022/ojiepermana-angular-component-combobox.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-command.mjs +0 -293
- package/fesm2022/ojiepermana-angular-component-command.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-composer.mjs +0 -352
- package/fesm2022/ojiepermana-angular-component-composer.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-context-menu.mjs +0 -103
- package/fesm2022/ojiepermana-angular-component-context-menu.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-date-picker.mjs +0 -170
- package/fesm2022/ojiepermana-angular-component-date-picker.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-dialog.mjs +0 -279
- package/fesm2022/ojiepermana-angular-component-dialog.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-drawer.mjs +0 -6
- package/fesm2022/ojiepermana-angular-component-drawer.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs +0 -492
- package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-editor.mjs +0 -717
- package/fesm2022/ojiepermana-angular-component-editor.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-empty.mjs +0 -145
- package/fesm2022/ojiepermana-angular-component-empty.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-form.mjs +0 -366
- package/fesm2022/ojiepermana-angular-component-form.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-hover-card.mjs +0 -297
- package/fesm2022/ojiepermana-angular-component-hover-card.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-input-group.mjs +0 -179
- package/fesm2022/ojiepermana-angular-component-input-group.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-input-otp.mjs +0 -514
- package/fesm2022/ojiepermana-angular-component-input-otp.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-input.mjs +0 -45
- package/fesm2022/ojiepermana-angular-component-input.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-item.mjs +0 -264
- package/fesm2022/ojiepermana-angular-component-item.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-kanban.mjs +0 -314
- package/fesm2022/ojiepermana-angular-component-kanban.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-kbd.mjs +0 -55
- package/fesm2022/ojiepermana-angular-component-kbd.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-label.mjs +0 -33
- package/fesm2022/ojiepermana-angular-component-label.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-menubar.mjs +0 -308
- package/fesm2022/ojiepermana-angular-component-menubar.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-native-select.mjs +0 -67
- package/fesm2022/ojiepermana-angular-component-native-select.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs +0 -413
- package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-pagination.mjs +0 -226
- package/fesm2022/ojiepermana-angular-component-pagination.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-pillbox.mjs +0 -812
- package/fesm2022/ojiepermana-angular-component-pillbox.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-popover.mjs +0 -169
- package/fesm2022/ojiepermana-angular-component-popover.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-progress.mjs +0 -60
- package/fesm2022/ojiepermana-angular-component-progress.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-radio.mjs +0 -122
- package/fesm2022/ojiepermana-angular-component-radio.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-resizable.mjs +0 -481
- package/fesm2022/ojiepermana-angular-component-resizable.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-scroll-area.mjs +0 -54
- package/fesm2022/ojiepermana-angular-component-scroll-area.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-select.mjs +0 -176
- package/fesm2022/ojiepermana-angular-component-select.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-separator.mjs +0 -37
- package/fesm2022/ojiepermana-angular-component-separator.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-sheet.mjs +0 -284
- package/fesm2022/ojiepermana-angular-component-sheet.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-skeleton.mjs +0 -31
- package/fesm2022/ojiepermana-angular-component-skeleton.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-slider.mjs +0 -423
- package/fesm2022/ojiepermana-angular-component-slider.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-spinner.mjs +0 -60
- package/fesm2022/ojiepermana-angular-component-spinner.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-switch.mjs +0 -116
- package/fesm2022/ojiepermana-angular-component-switch.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-table.mjs +0 -155
- package/fesm2022/ojiepermana-angular-component-table.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-tabs.mjs +0 -272
- package/fesm2022/ojiepermana-angular-component-tabs.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-textarea.mjs +0 -39
- package/fesm2022/ojiepermana-angular-component-textarea.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-timeline.mjs +0 -237
- package/fesm2022/ojiepermana-angular-component-timeline.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-toast.mjs +0 -71
- package/fesm2022/ojiepermana-angular-component-toast.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-toggle-group.mjs +0 -289
- package/fesm2022/ojiepermana-angular-component-toggle-group.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-toggle.mjs +0 -82
- package/fesm2022/ojiepermana-angular-component-toggle.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-tooltip.mjs +0 -354
- package/fesm2022/ojiepermana-angular-component-tooltip.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-component-utils.mjs +0 -13
- package/fesm2022/ojiepermana-angular-component-utils.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-generator-api.mjs +0 -68
- package/fesm2022/ojiepermana-angular-generator-api.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-layout-component.mjs +0 -602
- package/fesm2022/ojiepermana-angular-layout-component.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-layout-provider.mjs +0 -21
- package/fesm2022/ojiepermana-angular-layout-provider.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-layout-services.mjs +0 -116
- package/fesm2022/ojiepermana-angular-layout-services.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-layout-shell.mjs +0 -48
- package/fesm2022/ojiepermana-angular-layout-shell.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-layout-token-directive.mjs +0 -30
- package/fesm2022/ojiepermana-angular-layout-token-directive.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-layout-token.mjs +0 -33
- package/fesm2022/ojiepermana-angular-layout-token.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-layout-type-empty.mjs +0 -49
- package/fesm2022/ojiepermana-angular-layout-type-empty.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-layout-type-horizontal.mjs +0 -128
- package/fesm2022/ojiepermana-angular-layout-type-horizontal.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-layout-type-vertical.mjs +0 -123
- package/fesm2022/ojiepermana-angular-layout-type-vertical.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-layout.mjs +0 -485
- package/fesm2022/ojiepermana-angular-layout.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-navigation-demo-data.mjs +0 -334
- package/fesm2022/ojiepermana-angular-navigation-demo-data.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-navigation-icon.mjs +0 -63
- package/fesm2022/ojiepermana-angular-navigation-icon.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-navigation-item.mjs +0 -559
- package/fesm2022/ojiepermana-angular-navigation-item.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-navigation-service.mjs +0 -213
- package/fesm2022/ojiepermana-angular-navigation-service.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-navigation-sidebar.mjs +0 -401
- package/fesm2022/ojiepermana-angular-navigation-sidebar.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-navigation-topbar.mjs +0 -670
- package/fesm2022/ojiepermana-angular-navigation-topbar.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-navigation-types.mjs +0 -4
- package/fesm2022/ojiepermana-angular-navigation-types.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-theme-provider.mjs +0 -35
- package/fesm2022/ojiepermana-angular-theme-provider.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-theme-services.mjs +0 -294
- package/fesm2022/ojiepermana-angular-theme-services.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-theme-token.mjs +0 -56
- package/fesm2022/ojiepermana-angular-theme-token.mjs.map +0 -1
- package/generator/api/README.md +0 -252
- package/generator/api/bin/package.json +0 -3
- package/generator/api/bin/schematics/init/index.js +0 -90
- package/generator/api/bin/schematics/ng-add/index.js +0 -131
- package/generator/api/bin/schematics/sdk/index.js +0 -76
- package/generator/api/bin/src/config/loader.js +0 -41
- package/generator/api/bin/src/config/schema.js +0 -57
- package/generator/api/bin/src/emit/client.js +0 -248
- package/generator/api/bin/src/emit/metadata.js +0 -295
- package/generator/api/bin/src/emit/models.js +0 -106
- package/generator/api/bin/src/emit/navigation.js +0 -56
- package/generator/api/bin/src/emit/operations.js +0 -122
- package/generator/api/bin/src/emit/public-api.js +0 -54
- package/generator/api/bin/src/emit/services.js +0 -87
- package/generator/api/bin/src/engine.js +0 -65
- package/generator/api/bin/src/layout/per-domain.js +0 -359
- package/generator/api/bin/src/parser/bundle.js +0 -25
- package/generator/api/bin/src/parser/ir.js +0 -320
- package/generator/api/bin/src/parser/types.js +0 -7
- package/generator/api/bin/src/render/template.js +0 -58
- package/generator/api/bin/src/writer/index.js +0 -278
- package/generator/api/package.json +0 -4
- package/generator/api/schematics/init/schema.json +0 -19
- package/generator/api/schematics/ng-add/schema.json +0 -14
- package/generator/api/schematics/sdk/schema.json +0 -19
- package/generator/api/sdk.config.example.json +0 -24
- package/generator/guide/README.md +0 -84
- package/generator/guide/bin/package.json +0 -3
- package/generator/guide/bin/schematics/build/index.js +0 -36
- package/generator/guide/bin/schematics/init/index.js +0 -70
- package/generator/guide/bin/src/config/loader.js +0 -50
- package/generator/guide/bin/src/config/schema.js +0 -12
- package/generator/guide/bin/src/engine/component.js +0 -74
- package/generator/guide/bin/src/engine/frontmatter.js +0 -42
- package/generator/guide/bin/src/engine/index.js +0 -42
- package/generator/guide/bin/src/engine/naming.js +0 -39
- package/generator/guide/bin/src/engine/render.js +0 -36
- package/generator/guide/bin/src/engine/routes.js +0 -106
- package/generator/guide/bin/src/engine/walk.js +0 -35
- package/generator/guide/guide.config.example.json +0 -9
- package/generator/guide/schematics/build/schema.json +0 -14
- package/generator/guide/schematics/init/schema.json +0 -19
- package/layout/component/package.json +0 -4
- package/layout/package.json +0 -4
- package/layout/provider/package.json +0 -4
- package/layout/services/package.json +0 -4
- package/layout/shell/package.json +0 -4
- package/layout/token/directive/package.json +0 -4
- package/layout/token/package.json +0 -4
- package/layout/type/empty/package.json +0 -4
- package/layout/type/horizontal/package.json +0 -4
- package/layout/type/vertical/package.json +0 -4
- package/navigation/demo-data/package.json +0 -4
- package/navigation/icon/package.json +0 -4
- package/navigation/item/package.json +0 -4
- package/navigation/service/package.json +0 -4
- package/navigation/sidebar/package.json +0 -4
- package/navigation/topbar/README.md +0 -196
- package/navigation/topbar/package.json +0 -4
- package/navigation/types/package.json +0 -4
- package/theme/README.md +0 -174
- package/theme/package.json +0 -4
- package/theme/provider/package.json +0 -4
- package/theme/services/package.json +0 -4
- package/theme/styles/foundation/components.css +0 -81
- package/theme/styles/foundation/layers.css +0 -15
- package/theme/styles/foundation/tokens.css +0 -55
- package/theme/styles/index.css +0 -37
- package/theme/styles/integrations/material/autocomplete.css +0 -178
- package/theme/styles/integrations/material/button.css +0 -468
- package/theme/styles/integrations/material/dialog.css +0 -152
- package/theme/styles/integrations/material/select.css +0 -175
- package/theme/styles/integrations/material/slide-toggle.css +0 -234
- package/theme/styles/integrations/material/slider.css +0 -194
- package/theme/styles/integrations/material/tabs.css +0 -229
- package/theme/styles/integrations/material.css +0 -264
- package/theme/styles/integrations/tailwind.css +0 -114
- package/theme/styles/variants/color/amber.css +0 -31
- package/theme/styles/variants/color/base.css +0 -36
- package/theme/styles/variants/color/blue.css +0 -31
- package/theme/styles/variants/color/cyan.css +0 -31
- package/theme/styles/variants/color/emerald.css +0 -31
- package/theme/styles/variants/color/fuchsia.css +0 -31
- package/theme/styles/variants/color/green.css +0 -31
- package/theme/styles/variants/color/index.css +0 -22
- package/theme/styles/variants/color/indigo.css +0 -31
- package/theme/styles/variants/color/lime.css +0 -31
- package/theme/styles/variants/color/orange.css +0 -31
- package/theme/styles/variants/color/pink.css +0 -31
- package/theme/styles/variants/color/purple.css +0 -31
- package/theme/styles/variants/color/red.css +0 -31
- package/theme/styles/variants/color/rose.css +0 -31
- package/theme/styles/variants/color/sky.css +0 -31
- package/theme/styles/variants/color/teal.css +0 -31
- package/theme/styles/variants/color/violet.css +0 -31
- package/theme/styles/variants/color/yellow.css +0 -31
- package/theme/styles/variants/mode/dark.css +0 -20
- package/theme/styles/variants/mode/index.css +0 -6
- package/theme/styles/variants/mode/light.css +0 -24
- package/theme/styles/variants/style/brutal.css +0 -50
- package/theme/styles/variants/style/default.css +0 -54
- package/theme/styles/variants/style/index.css +0 -8
- package/theme/styles/variants/style/sharp.css +0 -50
- package/theme/styles/variants/style/soft.css +0 -50
- package/theme/token/package.json +0 -4
- package/types/ojiepermana-angular-component-accordion.d.ts +0 -51
- package/types/ojiepermana-angular-component-alert-dialog.d.ts +0 -93
- package/types/ojiepermana-angular-component-alert.d.ts +0 -37
- package/types/ojiepermana-angular-component-aspect-ratio.d.ts +0 -12
- package/types/ojiepermana-angular-component-avatar.d.ts +0 -51
- package/types/ojiepermana-angular-component-badge.d.ts +0 -19
- package/types/ojiepermana-angular-component-breadcrumb.d.ts +0 -46
- package/types/ojiepermana-angular-component-button-group.d.ts +0 -26
- package/types/ojiepermana-angular-component-button.d.ts +0 -22
- package/types/ojiepermana-angular-component-calendar.d.ts +0 -33
- package/types/ojiepermana-angular-component-card.d.ts +0 -60
- package/types/ojiepermana-angular-component-carousel.d.ts +0 -86
- package/types/ojiepermana-angular-component-chart-area.d.ts +0 -1
- package/types/ojiepermana-angular-component-chart-bar.d.ts +0 -1
- package/types/ojiepermana-angular-component-chart-line.d.ts +0 -1
- package/types/ojiepermana-angular-component-chart-pie.d.ts +0 -1
- package/types/ojiepermana-angular-component-chart-radar.d.ts +0 -1
- package/types/ojiepermana-angular-component-chart-radial.d.ts +0 -1
- package/types/ojiepermana-angular-component-chart-scatter.d.ts +0 -1
- package/types/ojiepermana-angular-component-chart.d.ts +0 -1094
- package/types/ojiepermana-angular-component-checkbox.d.ts +0 -35
- package/types/ojiepermana-angular-component-collapsible.d.ts +0 -42
- package/types/ojiepermana-angular-component-combobox.d.ts +0 -50
- package/types/ojiepermana-angular-component-command.d.ts +0 -99
- package/types/ojiepermana-angular-component-composer.d.ts +0 -90
- package/types/ojiepermana-angular-component-context-menu.d.ts +0 -35
- package/types/ojiepermana-angular-component-date-picker.d.ts +0 -41
- package/types/ojiepermana-angular-component-dialog.d.ts +0 -87
- package/types/ojiepermana-angular-component-drawer.d.ts +0 -1
- package/types/ojiepermana-angular-component-dropdown-menu.d.ts +0 -137
- package/types/ojiepermana-angular-component-editor.d.ts +0 -123
- package/types/ojiepermana-angular-component-empty.d.ts +0 -50
- package/types/ojiepermana-angular-component-form.d.ts +0 -141
- package/types/ojiepermana-angular-component-hover-card.d.ts +0 -74
- package/types/ojiepermana-angular-component-input-group.d.ts +0 -51
- package/types/ojiepermana-angular-component-input-otp.d.ts +0 -136
- package/types/ojiepermana-angular-component-input.d.ts +0 -16
- package/types/ojiepermana-angular-component-item.d.ts +0 -88
- package/types/ojiepermana-angular-component-kanban.d.ts +0 -70
- package/types/ojiepermana-angular-component-kbd.d.ts +0 -16
- package/types/ojiepermana-angular-component-label.d.ts +0 -11
- package/types/ojiepermana-angular-component-menubar.d.ts +0 -67
- package/types/ojiepermana-angular-component-native-select.d.ts +0 -26
- package/types/ojiepermana-angular-component-navigation-menu.d.ts +0 -96
- package/types/ojiepermana-angular-component-pagination.d.ts +0 -33
- package/types/ojiepermana-angular-component-pillbox.d.ts +0 -157
- package/types/ojiepermana-angular-component-popover.d.ts +0 -43
- package/types/ojiepermana-angular-component-progress.d.ts +0 -17
- package/types/ojiepermana-angular-component-radio.d.ts +0 -40
- package/types/ojiepermana-angular-component-resizable.d.ts +0 -99
- package/types/ojiepermana-angular-component-scroll-area.d.ts +0 -19
- package/types/ojiepermana-angular-component-select.d.ts +0 -57
- package/types/ojiepermana-angular-component-separator.d.ts +0 -14
- package/types/ojiepermana-angular-component-sheet.d.ts +0 -76
- package/types/ojiepermana-angular-component-skeleton.d.ts +0 -10
- package/types/ojiepermana-angular-component-slider.d.ts +0 -74
- package/types/ojiepermana-angular-component-spinner.d.ts +0 -13
- package/types/ojiepermana-angular-component-switch.d.ts +0 -40
- package/types/ojiepermana-angular-component-table.d.ts +0 -52
- package/types/ojiepermana-angular-component-tabs.d.ts +0 -92
- package/types/ojiepermana-angular-component-textarea.d.ts +0 -12
- package/types/ojiepermana-angular-component-timeline.d.ts +0 -63
- package/types/ojiepermana-angular-component-toast.d.ts +0 -38
- package/types/ojiepermana-angular-component-toggle-group.d.ts +0 -89
- package/types/ojiepermana-angular-component-toggle.d.ts +0 -25
- package/types/ojiepermana-angular-component-tooltip.d.ts +0 -89
- package/types/ojiepermana-angular-component-utils.d.ts +0 -5
- package/types/ojiepermana-angular-generator-api.d.ts +0 -86
- package/types/ojiepermana-angular-layout-component.d.ts +0 -205
- package/types/ojiepermana-angular-layout-provider.d.ts +0 -6
- package/types/ojiepermana-angular-layout-services.d.ts +0 -25
- package/types/ojiepermana-angular-layout-shell.d.ts +0 -8
- package/types/ojiepermana-angular-layout-token-directive.d.ts +0 -13
- package/types/ojiepermana-angular-layout-token.d.ts +0 -36
- package/types/ojiepermana-angular-layout-type-empty.d.ts +0 -22
- package/types/ojiepermana-angular-layout-type-horizontal.d.ts +0 -36
- package/types/ojiepermana-angular-layout-type-vertical.d.ts +0 -38
- package/types/ojiepermana-angular-layout.d.ts +0 -164
- package/types/ojiepermana-angular-navigation-demo-data.d.ts +0 -5
- package/types/ojiepermana-angular-navigation-icon.d.ts +0 -17
- package/types/ojiepermana-angular-navigation-item.d.ts +0 -54
- package/types/ojiepermana-angular-navigation-service.d.ts +0 -77
- package/types/ojiepermana-angular-navigation-sidebar.d.ts +0 -75
- package/types/ojiepermana-angular-navigation-topbar.d.ts +0 -74
- package/types/ojiepermana-angular-navigation-types.d.ts +0 -135
- package/types/ojiepermana-angular-theme-provider.d.ts +0 -11
- package/types/ojiepermana-angular-theme-services.d.ts +0 -55
- package/types/ojiepermana-angular-theme-token.d.ts +0 -57
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, booleanAttribute, output, viewChild, signal, computed, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
-
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
4
|
-
import { MatSlideToggle } from '@angular/material/slide-toggle';
|
|
5
|
-
import { cn } from '@ojiepermana/angular/component/utils';
|
|
6
|
-
|
|
7
|
-
let nextSwitchId = 0;
|
|
8
|
-
/**
|
|
9
|
-
* Switch — shadcn-styled wrapper around `mat-slide-toggle`.
|
|
10
|
-
*/
|
|
11
|
-
class SwitchComponent {
|
|
12
|
-
id = input(`ui-switch-${nextSwitchId++}`, /* @ts-ignore */
|
|
13
|
-
...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
14
|
-
name = input(null, /* @ts-ignore */
|
|
15
|
-
...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
|
|
16
|
-
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
17
|
-
required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
18
|
-
ariaLabel = input(null, { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: 'aria-label' });
|
|
19
|
-
ariaDescribedby = input(null, { ...(ngDevMode ? { debugName: "ariaDescribedby" } : /* istanbul ignore next */ {}), alias: 'aria-describedby' });
|
|
20
|
-
ariaLabelledby = input(null, { ...(ngDevMode ? { debugName: "ariaLabelledby" } : /* istanbul ignore next */ {}), alias: 'aria-labelledby' });
|
|
21
|
-
ariaInvalid = input(null, { ...(ngDevMode ? { debugName: "ariaInvalid" } : /* istanbul ignore next */ {}), alias: 'aria-invalid' });
|
|
22
|
-
size = input('default', /* @ts-ignore */
|
|
23
|
-
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
24
|
-
class = input('', /* @ts-ignore */
|
|
25
|
-
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
26
|
-
checkedChange = output();
|
|
27
|
-
ref = viewChild.required('ref');
|
|
28
|
-
checked = signal(false, /* @ts-ignore */
|
|
29
|
-
...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
|
|
30
|
-
disabledState = signal(false, /* @ts-ignore */
|
|
31
|
-
...(ngDevMode ? [{ debugName: "disabledState" }] : /* istanbul ignore next */ []));
|
|
32
|
-
ariaInvalidAttr = computed(() => {
|
|
33
|
-
const value = this.ariaInvalid();
|
|
34
|
-
if (value === false || value === 'false' || value == null) {
|
|
35
|
-
return null;
|
|
36
|
-
}
|
|
37
|
-
return value === true || value === '' ? 'true' : `${value}`;
|
|
38
|
-
}, /* @ts-ignore */
|
|
39
|
-
...(ngDevMode ? [{ debugName: "ariaInvalidAttr" }] : /* istanbul ignore next */ []));
|
|
40
|
-
isDisabled = computed(() => this.disabled() || this.disabledState(), /* @ts-ignore */
|
|
41
|
-
...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
|
|
42
|
-
classes = computed(() => cn('ui-switch', this.size() === 'sm' ? 'ui-switch-sm' : 'ui-switch-default', this.class()), /* @ts-ignore */
|
|
43
|
-
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
44
|
-
onChange = () => { };
|
|
45
|
-
onTouched = () => { };
|
|
46
|
-
handleChange(e) {
|
|
47
|
-
this.checked.set(e.checked);
|
|
48
|
-
this.onChange(e.checked);
|
|
49
|
-
this.onTouched();
|
|
50
|
-
this.checkedChange.emit(e.checked);
|
|
51
|
-
}
|
|
52
|
-
focus() {
|
|
53
|
-
this.ref().focus();
|
|
54
|
-
}
|
|
55
|
-
writeValue(v) {
|
|
56
|
-
this.checked.set(!!v);
|
|
57
|
-
}
|
|
58
|
-
registerOnChange(fn) {
|
|
59
|
-
this.onChange = fn;
|
|
60
|
-
}
|
|
61
|
-
registerOnTouched(fn) {
|
|
62
|
-
this.onTouched = fn;
|
|
63
|
-
}
|
|
64
|
-
setDisabledState(d) {
|
|
65
|
-
this.disabledState.set(d);
|
|
66
|
-
}
|
|
67
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: SwitchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
68
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.0", type: SwitchComponent, isStandalone: true, selector: "ui-switch", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedby: { classPropertyName: "ariaDescribedby", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaInvalid: { classPropertyName: "ariaInvalid", publicName: "aria-invalid", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checkedChange: "checkedChange" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SwitchComponent), multi: true }], viewQueries: [{ propertyName: "ref", first: true, predicate: ["ref"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
69
|
-
<mat-slide-toggle
|
|
70
|
-
#ref
|
|
71
|
-
hideIcon
|
|
72
|
-
disableRipple
|
|
73
|
-
[id]="id()"
|
|
74
|
-
[name]="name()"
|
|
75
|
-
[class]="classes()"
|
|
76
|
-
[checked]="checked()"
|
|
77
|
-
[disabled]="isDisabled()"
|
|
78
|
-
[required]="required()"
|
|
79
|
-
[attr.aria-label]="ariaLabel()"
|
|
80
|
-
[attr.aria-describedby]="ariaDescribedby()"
|
|
81
|
-
[attr.aria-labelledby]="ariaLabelledby()"
|
|
82
|
-
[attr.aria-invalid]="ariaInvalidAttr()"
|
|
83
|
-
(change)="handleChange($event)">
|
|
84
|
-
<ng-content />
|
|
85
|
-
</mat-slide-toggle>
|
|
86
|
-
`, isInline: true, styles: [":host{display:inline-flex}:host ::ng-deep .mat-mdc-slide-toggle.ui-switch{--mdc-switch-track-width: 2rem;--mdc-switch-track-height: 1.15rem;--mdc-switch-track-shape: 9999px;--mdc-switch-handle-shape: 9999px;--mdc-switch-handle-width: .875rem;--mdc-switch-handle-height: .875rem;--mdc-switch-state-layer-size: 0;--mdc-switch-selected-track-color: hsl(var(--primary));--mdc-switch-selected-focus-track-color: hsl(var(--primary));--mdc-switch-selected-hover-track-color: hsl(var(--primary));--mdc-switch-selected-pressed-track-color: hsl(var(--primary));--mdc-switch-unselected-track-color: hsl(var(--input));--mdc-switch-unselected-focus-track-color: hsl(var(--input));--mdc-switch-unselected-hover-track-color: hsl(var(--input));--mdc-switch-unselected-pressed-track-color: hsl(var(--input));--mdc-switch-selected-handle-color: hsl(var(--primary-foreground));--mdc-switch-selected-focus-handle-color: hsl(var(--primary-foreground));--mdc-switch-selected-hover-handle-color: hsl(var(--primary-foreground));--mdc-switch-selected-pressed-handle-color: hsl(var(--primary-foreground));--mdc-switch-unselected-handle-color: hsl(var(--background));--mdc-switch-unselected-focus-handle-color: hsl(var(--background));--mdc-switch-unselected-hover-handle-color: hsl(var(--background));--mdc-switch-unselected-pressed-handle-color: hsl(var(--background));--mdc-switch-selected-icon-color: transparent;--mdc-switch-unselected-icon-color: transparent}:host ::ng-deep .mat-mdc-slide-toggle.ui-switch.ui-switch-sm{--mdc-switch-track-width: 1.75rem;--mdc-switch-track-height: 1rem;--mdc-switch-handle-width: .75rem;--mdc-switch-handle-height: .75rem}:host ::ng-deep .mat-mdc-slide-toggle.ui-switch[aria-invalid=true]{--mdc-switch-selected-track-color: hsl(var(--destructive));--mdc-switch-selected-focus-track-color: hsl(var(--destructive));--mdc-switch-selected-hover-track-color: hsl(var(--destructive));--mdc-switch-selected-pressed-track-color: hsl(var(--destructive));--mdc-switch-unselected-track-color: hsl(var(--destructive) / .25);--mdc-switch-unselected-focus-track-color: hsl(var(--destructive) / .25);--mdc-switch-unselected-hover-track-color: hsl(var(--destructive) / .25);--mdc-switch-unselected-pressed-track-color: hsl(var(--destructive) / .25);--mdc-switch-selected-handle-color: hsl(var(--destructive-foreground));--mdc-switch-selected-focus-handle-color: hsl(var(--destructive-foreground));--mdc-switch-selected-hover-handle-color: hsl(var(--destructive-foreground));--mdc-switch-selected-pressed-handle-color: hsl(var(--destructive-foreground));--mdc-switch-unselected-handle-color: hsl(var(--destructive));--mdc-switch-unselected-focus-handle-color: hsl(var(--destructive));--mdc-switch-unselected-hover-handle-color: hsl(var(--destructive));--mdc-switch-unselected-pressed-handle-color: hsl(var(--destructive))}:host ::ng-deep .mat-mdc-slide-toggle .mdc-switch__ripple,:host ::ng-deep .mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple,:host ::ng-deep .mat-mdc-slide-toggle .mat-mdc-focus-indicator{display:none}:host ::ng-deep .mat-mdc-slide-toggle .mdc-switch__icons{display:none}:host ::ng-deep .mat-mdc-slide-toggle .mdc-form-field{gap:.5rem;color:hsl(var(--foreground));font-family:var(--font-sans);font-size:var(--text-sm);line-height:var(--text-sm--line-height)}:host ::ng-deep .mat-mdc-slide-toggle .mdc-label{padding:0;cursor:pointer}\n"], dependencies: [{ kind: "component", type: MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
87
|
-
}
|
|
88
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: SwitchComponent, decorators: [{
|
|
89
|
-
type: Component,
|
|
90
|
-
args: [{ selector: 'ui-switch', imports: [MatSlideToggle], changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SwitchComponent), multi: true }], template: `
|
|
91
|
-
<mat-slide-toggle
|
|
92
|
-
#ref
|
|
93
|
-
hideIcon
|
|
94
|
-
disableRipple
|
|
95
|
-
[id]="id()"
|
|
96
|
-
[name]="name()"
|
|
97
|
-
[class]="classes()"
|
|
98
|
-
[checked]="checked()"
|
|
99
|
-
[disabled]="isDisabled()"
|
|
100
|
-
[required]="required()"
|
|
101
|
-
[attr.aria-label]="ariaLabel()"
|
|
102
|
-
[attr.aria-describedby]="ariaDescribedby()"
|
|
103
|
-
[attr.aria-labelledby]="ariaLabelledby()"
|
|
104
|
-
[attr.aria-invalid]="ariaInvalidAttr()"
|
|
105
|
-
(change)="handleChange($event)">
|
|
106
|
-
<ng-content />
|
|
107
|
-
</mat-slide-toggle>
|
|
108
|
-
`, styles: [":host{display:inline-flex}:host ::ng-deep .mat-mdc-slide-toggle.ui-switch{--mdc-switch-track-width: 2rem;--mdc-switch-track-height: 1.15rem;--mdc-switch-track-shape: 9999px;--mdc-switch-handle-shape: 9999px;--mdc-switch-handle-width: .875rem;--mdc-switch-handle-height: .875rem;--mdc-switch-state-layer-size: 0;--mdc-switch-selected-track-color: hsl(var(--primary));--mdc-switch-selected-focus-track-color: hsl(var(--primary));--mdc-switch-selected-hover-track-color: hsl(var(--primary));--mdc-switch-selected-pressed-track-color: hsl(var(--primary));--mdc-switch-unselected-track-color: hsl(var(--input));--mdc-switch-unselected-focus-track-color: hsl(var(--input));--mdc-switch-unselected-hover-track-color: hsl(var(--input));--mdc-switch-unselected-pressed-track-color: hsl(var(--input));--mdc-switch-selected-handle-color: hsl(var(--primary-foreground));--mdc-switch-selected-focus-handle-color: hsl(var(--primary-foreground));--mdc-switch-selected-hover-handle-color: hsl(var(--primary-foreground));--mdc-switch-selected-pressed-handle-color: hsl(var(--primary-foreground));--mdc-switch-unselected-handle-color: hsl(var(--background));--mdc-switch-unselected-focus-handle-color: hsl(var(--background));--mdc-switch-unselected-hover-handle-color: hsl(var(--background));--mdc-switch-unselected-pressed-handle-color: hsl(var(--background));--mdc-switch-selected-icon-color: transparent;--mdc-switch-unselected-icon-color: transparent}:host ::ng-deep .mat-mdc-slide-toggle.ui-switch.ui-switch-sm{--mdc-switch-track-width: 1.75rem;--mdc-switch-track-height: 1rem;--mdc-switch-handle-width: .75rem;--mdc-switch-handle-height: .75rem}:host ::ng-deep .mat-mdc-slide-toggle.ui-switch[aria-invalid=true]{--mdc-switch-selected-track-color: hsl(var(--destructive));--mdc-switch-selected-focus-track-color: hsl(var(--destructive));--mdc-switch-selected-hover-track-color: hsl(var(--destructive));--mdc-switch-selected-pressed-track-color: hsl(var(--destructive));--mdc-switch-unselected-track-color: hsl(var(--destructive) / .25);--mdc-switch-unselected-focus-track-color: hsl(var(--destructive) / .25);--mdc-switch-unselected-hover-track-color: hsl(var(--destructive) / .25);--mdc-switch-unselected-pressed-track-color: hsl(var(--destructive) / .25);--mdc-switch-selected-handle-color: hsl(var(--destructive-foreground));--mdc-switch-selected-focus-handle-color: hsl(var(--destructive-foreground));--mdc-switch-selected-hover-handle-color: hsl(var(--destructive-foreground));--mdc-switch-selected-pressed-handle-color: hsl(var(--destructive-foreground));--mdc-switch-unselected-handle-color: hsl(var(--destructive));--mdc-switch-unselected-focus-handle-color: hsl(var(--destructive));--mdc-switch-unselected-hover-handle-color: hsl(var(--destructive));--mdc-switch-unselected-pressed-handle-color: hsl(var(--destructive))}:host ::ng-deep .mat-mdc-slide-toggle .mdc-switch__ripple,:host ::ng-deep .mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple,:host ::ng-deep .mat-mdc-slide-toggle .mat-mdc-focus-indicator{display:none}:host ::ng-deep .mat-mdc-slide-toggle .mdc-switch__icons{display:none}:host ::ng-deep .mat-mdc-slide-toggle .mdc-form-field{gap:.5rem;color:hsl(var(--foreground));font-family:var(--font-sans);font-size:var(--text-sm);line-height:var(--text-sm--line-height)}:host ::ng-deep .mat-mdc-slide-toggle .mdc-label{padding:0;cursor:pointer}\n"] }]
|
|
109
|
-
}], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaDescribedby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-describedby", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], ariaInvalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-invalid", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], checkedChange: [{ type: i0.Output, args: ["checkedChange"] }], ref: [{ type: i0.ViewChild, args: ['ref', { isSignal: true }] }] } });
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* Generated bundle index. Do not edit.
|
|
113
|
-
*/
|
|
114
|
-
|
|
115
|
-
export { SwitchComponent };
|
|
116
|
-
//# sourceMappingURL=ojiepermana-angular-component-switch.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ojiepermana-angular-component-switch.mjs","sources":["../../../projects/angular/component/switch/switch.component.ts","../../../projects/angular/component/switch/ojiepermana-angular-component-switch.ts"],"sourcesContent":["import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n forwardRef,\n input,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { MatSlideToggle, MatSlideToggleChange } from '@angular/material/slide-toggle';\nimport { cn } from '@ojiepermana/angular/component/utils';\n\nlet nextSwitchId = 0;\n\nexport type SwitchSize = 'default' | 'sm';\n\n/**\n * Switch — shadcn-styled wrapper around `mat-slide-toggle`.\n */\n@Component({\n selector: 'ui-switch',\n imports: [MatSlideToggle],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SwitchComponent), multi: true }],\n template: `\n <mat-slide-toggle\n #ref\n hideIcon\n disableRipple\n [id]=\"id()\"\n [name]=\"name()\"\n [class]=\"classes()\"\n [checked]=\"checked()\"\n [disabled]=\"isDisabled()\"\n [required]=\"required()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.aria-invalid]=\"ariaInvalidAttr()\"\n (change)=\"handleChange($event)\">\n <ng-content />\n </mat-slide-toggle>\n `,\n styleUrl: './switch.component.css',\n})\nexport class SwitchComponent implements ControlValueAccessor {\n readonly id = input<string>(`ui-switch-${nextSwitchId++}`);\n readonly name = input<string | null>(null);\n readonly disabled = input(false, { transform: booleanAttribute });\n readonly required = input(false, { transform: booleanAttribute });\n readonly ariaLabel = input<string | null>(null, { alias: 'aria-label' });\n readonly ariaDescribedby = input<string | null>(null, { alias: 'aria-describedby' });\n readonly ariaLabelledby = input<string | null>(null, { alias: 'aria-labelledby' });\n readonly ariaInvalid = input<boolean | string | null>(null, { alias: 'aria-invalid' });\n readonly size = input<SwitchSize>('default');\n readonly class = input<string>('');\n\n readonly checkedChange = output<boolean>();\n\n private readonly ref = viewChild.required<MatSlideToggle>('ref');\n\n protected readonly checked = signal<boolean>(false);\n protected readonly disabledState = signal(false);\n protected readonly ariaInvalidAttr = computed(() => {\n const value = this.ariaInvalid();\n\n if (value === false || value === 'false' || value == null) {\n return null;\n }\n\n return value === true || value === '' ? 'true' : `${value}`;\n });\n protected readonly isDisabled = computed(() => this.disabled() || this.disabledState());\n protected readonly classes = computed(() =>\n cn('ui-switch', this.size() === 'sm' ? 'ui-switch-sm' : 'ui-switch-default', this.class()),\n );\n\n private onChange: (v: boolean) => void = () => {};\n private onTouched: () => void = () => {};\n\n protected handleChange(e: MatSlideToggleChange): void {\n this.checked.set(e.checked);\n this.onChange(e.checked);\n this.onTouched();\n this.checkedChange.emit(e.checked);\n }\n\n focus(): void {\n this.ref().focus();\n }\n\n writeValue(v: boolean): void {\n this.checked.set(!!v);\n }\n registerOnChange(fn: (v: boolean) => void): void {\n this.onChange = fn;\n }\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n setDisabledState(d: boolean): void {\n this.disabledState.set(d);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAeA,IAAI,YAAY,GAAG,CAAC;AAIpB;;AAEG;MA2BU,eAAe,CAAA;AACjB,IAAA,EAAE,GAAG,KAAK,CAAS,CAAA,UAAA,EAAa,YAAY,EAAE,CAAA,CAAE;2EAAC;IACjD,IAAI,GAAG,KAAK,CAAgB,IAAI;6EAAC;IACjC,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;IACxD,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;IACxD,SAAS,GAAG,KAAK,CAAgB,IAAI,iFAAI,KAAK,EAAE,YAAY,EAAA,CAAG;IAC/D,eAAe,GAAG,KAAK,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wxGAAA,CAAA,EAAA;okCAiByD,KAAK,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AC9DjE;;AAEG;;;;"}
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
-
import { cn } from '@ojiepermana/angular/component/utils';
|
|
4
|
-
|
|
5
|
-
class TableComponent {
|
|
6
|
-
class = input('', /* @ts-ignore */
|
|
7
|
-
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
8
|
-
classes = computed(() => cn('w-full caption-bottom text-sm', this.class()), /* @ts-ignore */
|
|
9
|
-
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
10
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.0", type: TableComponent, isStandalone: true, selector: "ui-table", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "relative block w-full overflow-x-auto" }, ngImport: i0, template: `
|
|
12
|
-
<table [class]="classes()">
|
|
13
|
-
<ng-content />
|
|
14
|
-
</table>
|
|
15
|
-
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
16
|
-
}
|
|
17
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: TableComponent, decorators: [{
|
|
18
|
-
type: Component,
|
|
19
|
-
args: [{
|
|
20
|
-
selector: 'ui-table',
|
|
21
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
22
|
-
host: { class: 'relative block w-full overflow-x-auto' },
|
|
23
|
-
template: `
|
|
24
|
-
<table [class]="classes()">
|
|
25
|
-
<ng-content />
|
|
26
|
-
</table>
|
|
27
|
-
`,
|
|
28
|
-
}]
|
|
29
|
-
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
30
|
-
class TableHeaderComponent {
|
|
31
|
-
class = input('', /* @ts-ignore */
|
|
32
|
-
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
33
|
-
classes = computed(() => cn('[&_tr]:border-b [&_tr]:border-border', this.class()), /* @ts-ignore */
|
|
34
|
-
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
35
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: TableHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
36
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.0", type: TableHeaderComponent, isStandalone: true, selector: "thead[ui-table-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 });
|
|
37
|
-
}
|
|
38
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: TableHeaderComponent, decorators: [{
|
|
39
|
-
type: Component,
|
|
40
|
-
args: [{
|
|
41
|
-
selector: 'thead[ui-table-header]',
|
|
42
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
43
|
-
host: { '[class]': 'classes()' },
|
|
44
|
-
template: `<ng-content />`,
|
|
45
|
-
}]
|
|
46
|
-
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
47
|
-
class TableBodyComponent {
|
|
48
|
-
class = input('', /* @ts-ignore */
|
|
49
|
-
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
50
|
-
classes = computed(() => cn('[&_tr:last-child]:border-0', this.class()), /* @ts-ignore */
|
|
51
|
-
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
52
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: TableBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
53
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.0", type: TableBodyComponent, isStandalone: true, selector: "tbody[ui-table-body]", 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 });
|
|
54
|
-
}
|
|
55
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: TableBodyComponent, decorators: [{
|
|
56
|
-
type: Component,
|
|
57
|
-
args: [{
|
|
58
|
-
selector: 'tbody[ui-table-body]',
|
|
59
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
60
|
-
host: { '[class]': 'classes()' },
|
|
61
|
-
template: `<ng-content />`,
|
|
62
|
-
}]
|
|
63
|
-
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
64
|
-
class TableFooterComponent {
|
|
65
|
-
class = input('', /* @ts-ignore */
|
|
66
|
-
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
67
|
-
classes = computed(() => cn('border-t border-border bg-muted/50 font-medium [&>tr]:last:border-b-0', this.class()), /* @ts-ignore */
|
|
68
|
-
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
69
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: TableFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
70
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.0", type: TableFooterComponent, isStandalone: true, selector: "tfoot[ui-table-footer]", 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 });
|
|
71
|
-
}
|
|
72
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: TableFooterComponent, decorators: [{
|
|
73
|
-
type: Component,
|
|
74
|
-
args: [{
|
|
75
|
-
selector: 'tfoot[ui-table-footer]',
|
|
76
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
77
|
-
host: { '[class]': 'classes()' },
|
|
78
|
-
template: `<ng-content />`,
|
|
79
|
-
}]
|
|
80
|
-
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
81
|
-
class TableRowComponent {
|
|
82
|
-
class = input('', /* @ts-ignore */
|
|
83
|
-
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
84
|
-
classes = computed(() => cn('border-b border-border transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted', this.class()), /* @ts-ignore */
|
|
85
|
-
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
86
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: TableRowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
87
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.0", type: TableRowComponent, isStandalone: true, selector: "tr[ui-table-row]", 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 });
|
|
88
|
-
}
|
|
89
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: TableRowComponent, decorators: [{
|
|
90
|
-
type: Component,
|
|
91
|
-
args: [{
|
|
92
|
-
selector: 'tr[ui-table-row]',
|
|
93
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
94
|
-
host: { '[class]': 'classes()' },
|
|
95
|
-
template: `<ng-content />`,
|
|
96
|
-
}]
|
|
97
|
-
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
98
|
-
class TableHeadComponent {
|
|
99
|
-
class = input('', /* @ts-ignore */
|
|
100
|
-
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
101
|
-
classes = computed(() => cn('h-10 whitespace-nowrap px-2 text-left align-middle font-medium text-muted-foreground', '[&:has([role=checkbox])]:pr-0', '[&>[role=checkbox]]:translate-y-[2px]', this.class()), /* @ts-ignore */
|
|
102
|
-
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
103
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: TableHeadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
104
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.0", type: TableHeadComponent, isStandalone: true, selector: "th[ui-table-head]", 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 });
|
|
105
|
-
}
|
|
106
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: TableHeadComponent, decorators: [{
|
|
107
|
-
type: Component,
|
|
108
|
-
args: [{
|
|
109
|
-
selector: 'th[ui-table-head]',
|
|
110
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
111
|
-
host: { '[class]': 'classes()' },
|
|
112
|
-
template: `<ng-content />`,
|
|
113
|
-
}]
|
|
114
|
-
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
115
|
-
class TableCellComponent {
|
|
116
|
-
class = input('', /* @ts-ignore */
|
|
117
|
-
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
118
|
-
classes = computed(() => cn('whitespace-nowrap p-2 align-middle', '[&:has([role=checkbox])]:pr-0', '[&>[role=checkbox]]:translate-y-[2px]', this.class()), /* @ts-ignore */
|
|
119
|
-
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
120
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: TableCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
121
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.0", type: TableCellComponent, isStandalone: true, selector: "td[ui-table-cell]", 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 });
|
|
122
|
-
}
|
|
123
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: TableCellComponent, decorators: [{
|
|
124
|
-
type: Component,
|
|
125
|
-
args: [{
|
|
126
|
-
selector: 'td[ui-table-cell]',
|
|
127
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
128
|
-
host: { '[class]': 'classes()' },
|
|
129
|
-
template: `<ng-content />`,
|
|
130
|
-
}]
|
|
131
|
-
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
132
|
-
class TableCaptionComponent {
|
|
133
|
-
class = input('', /* @ts-ignore */
|
|
134
|
-
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
135
|
-
classes = computed(() => cn('mt-4 text-sm text-muted-foreground', this.class()), /* @ts-ignore */
|
|
136
|
-
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
137
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: TableCaptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
138
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.0", type: TableCaptionComponent, isStandalone: true, selector: "caption[ui-table-caption]", 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 });
|
|
139
|
-
}
|
|
140
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: TableCaptionComponent, decorators: [{
|
|
141
|
-
type: Component,
|
|
142
|
-
args: [{
|
|
143
|
-
selector: 'caption[ui-table-caption]',
|
|
144
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
145
|
-
host: { '[class]': 'classes()' },
|
|
146
|
-
template: `<ng-content />`,
|
|
147
|
-
}]
|
|
148
|
-
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* Generated bundle index. Do not edit.
|
|
152
|
-
*/
|
|
153
|
-
|
|
154
|
-
export { TableBodyComponent, TableCaptionComponent, TableCellComponent, TableComponent, TableFooterComponent, TableHeadComponent, TableHeaderComponent, TableRowComponent };
|
|
155
|
-
//# sourceMappingURL=ojiepermana-angular-component-table.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ojiepermana-angular-component-table.mjs","sources":["../../../projects/angular/component/table/table.component.ts","../../../projects/angular/component/table/ojiepermana-angular-component-table.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { cn } from '@ojiepermana/angular/component/utils';\n\n@Component({\n selector: 'ui-table',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'relative block w-full overflow-x-auto' },\n template: `\n <table [class]=\"classes()\">\n <ng-content />\n </table>\n `,\n})\nexport class TableComponent {\n readonly class = input<string>('');\n protected readonly classes = computed(() => cn('w-full caption-bottom text-sm', this.class()));\n}\n\n@Component({\n selector: 'thead[ui-table-header]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { '[class]': 'classes()' },\n template: `<ng-content />`,\n})\nexport class TableHeaderComponent {\n readonly class = input<string>('');\n protected readonly classes = computed(() => cn('[&_tr]:border-b [&_tr]:border-border', this.class()));\n}\n\n@Component({\n selector: 'tbody[ui-table-body]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { '[class]': 'classes()' },\n template: `<ng-content />`,\n})\nexport class TableBodyComponent {\n readonly class = input<string>('');\n protected readonly classes = computed(() => cn('[&_tr:last-child]:border-0', this.class()));\n}\n\n@Component({\n selector: 'tfoot[ui-table-footer]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { '[class]': 'classes()' },\n template: `<ng-content />`,\n})\nexport class TableFooterComponent {\n readonly class = input<string>('');\n protected readonly classes = computed(() =>\n cn('border-t border-border bg-muted/50 font-medium [&>tr]:last:border-b-0', this.class()),\n );\n}\n\n@Component({\n selector: 'tr[ui-table-row]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { '[class]': 'classes()' },\n template: `<ng-content />`,\n})\nexport class TableRowComponent {\n readonly class = input<string>('');\n protected readonly classes = computed(() =>\n cn('border-b border-border transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted', this.class()),\n );\n}\n\n@Component({\n selector: 'th[ui-table-head]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { '[class]': 'classes()' },\n template: `<ng-content />`,\n})\nexport class TableHeadComponent {\n readonly class = input<string>('');\n protected readonly classes = computed(() =>\n cn(\n 'h-10 whitespace-nowrap px-2 text-left align-middle font-medium text-muted-foreground',\n '[&:has([role=checkbox])]:pr-0',\n '[&>[role=checkbox]]:translate-y-[2px]',\n this.class(),\n ),\n );\n}\n\n@Component({\n selector: 'td[ui-table-cell]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { '[class]': 'classes()' },\n template: `<ng-content />`,\n})\nexport class TableCellComponent {\n readonly class = input<string>('');\n protected readonly classes = computed(() =>\n cn(\n 'whitespace-nowrap p-2 align-middle',\n '[&:has([role=checkbox])]:pr-0',\n '[&>[role=checkbox]]:translate-y-[2px]',\n this.class(),\n ),\n );\n}\n\n@Component({\n selector: 'caption[ui-table-caption]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { '[class]': 'classes()' },\n template: `<ng-content />`,\n})\nexport class TableCaptionComponent {\n readonly class = input<string>('');\n protected readonly classes = computed(() => cn('mt-4 text-sm text-muted-foreground', this.class()));\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAaa,cAAc,CAAA;IAChB,KAAK,GAAG,KAAK,CAAS,EAAE;8EAAC;AACf,IAAA,OAAO,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,+BAA+B,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC;gFAAC;uGAFnF,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAd,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,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AAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,IAAI,EAAE,EAAE,SAAS,EAAE,WAAW,EAAE;AAChC,oBAAA,QAAQ,EAAE,CAAA,cAAA,CAAgB;AAC3B,iBAAA;;;AC3GD;;AAEG;;;;"}
|
|
@@ -1,272 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { Directive, model, input, computed, forwardRef, ChangeDetectionStrategy, Component, inject, ElementRef } from '@angular/core';
|
|
3
|
-
import { cn } from '@ojiepermana/angular/component/utils';
|
|
4
|
-
|
|
5
|
-
let nextTabsId = 0;
|
|
6
|
-
/**
|
|
7
|
-
* Shared state for a tabs group. Children read the active value and register
|
|
8
|
-
* themselves so the group can drive roving-tabindex keyboard navigation.
|
|
9
|
-
*/
|
|
10
|
-
class TabsContextBase {
|
|
11
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: TabsContextBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
12
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.0", type: TabsContextBase, isStandalone: true, ngImport: i0 });
|
|
13
|
-
}
|
|
14
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: TabsContextBase, decorators: [{
|
|
15
|
-
type: Directive
|
|
16
|
-
}] });
|
|
17
|
-
class TabsListContextBase {
|
|
18
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: TabsListContextBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
19
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.0", type: TabsListContextBase, isStandalone: true, ngImport: i0 });
|
|
20
|
-
}
|
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: TabsListContextBase, decorators: [{
|
|
22
|
-
type: Directive
|
|
23
|
-
}] });
|
|
24
|
-
class TabsComponent extends TabsContextBase {
|
|
25
|
-
value = model(null, /* @ts-ignore */
|
|
26
|
-
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
27
|
-
orientation = input('horizontal', /* @ts-ignore */
|
|
28
|
-
...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
29
|
-
class = input('', /* @ts-ignore */
|
|
30
|
-
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
31
|
-
idPrefix = `ui-tabs-${nextTabsId++}`;
|
|
32
|
-
triggers = new Map();
|
|
33
|
-
classes = computed(() => cn(this.orientation() === 'vertical' ? 'flex items-start gap-4' : 'block', this.class()), /* @ts-ignore */
|
|
34
|
-
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
35
|
-
register(element, value, disabled) {
|
|
36
|
-
this.triggers.set(element, { element, value, disabled });
|
|
37
|
-
if (this.value() == null && !disabled()) {
|
|
38
|
-
this.value.set(value());
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
unregister(element) {
|
|
42
|
-
this.triggers.delete(element);
|
|
43
|
-
}
|
|
44
|
-
activate(value, focus = false) {
|
|
45
|
-
const trigger = this.triggerForValue(value);
|
|
46
|
-
if (!trigger || trigger.disabled())
|
|
47
|
-
return;
|
|
48
|
-
this.value.set(value);
|
|
49
|
-
if (focus) {
|
|
50
|
-
trigger.element.focus();
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
focusNext(from, offset) {
|
|
54
|
-
const enabledTriggers = this.enabledTriggers();
|
|
55
|
-
const currentIndex = enabledTriggers.findIndex((trigger) => trigger.element === from);
|
|
56
|
-
if (currentIndex < 0 || enabledTriggers.length === 0)
|
|
57
|
-
return;
|
|
58
|
-
const nextTrigger = enabledTriggers[(currentIndex + offset + enabledTriggers.length) % enabledTriggers.length];
|
|
59
|
-
this.activate(nextTrigger.value(), true);
|
|
60
|
-
}
|
|
61
|
-
focusFirst() {
|
|
62
|
-
const firstTrigger = this.enabledTriggers()[0];
|
|
63
|
-
if (firstTrigger)
|
|
64
|
-
this.activate(firstTrigger.value(), true);
|
|
65
|
-
}
|
|
66
|
-
focusLast() {
|
|
67
|
-
const enabledTriggers = this.enabledTriggers();
|
|
68
|
-
const lastTrigger = enabledTriggers[enabledTriggers.length - 1];
|
|
69
|
-
if (lastTrigger)
|
|
70
|
-
this.activate(lastTrigger.value(), true);
|
|
71
|
-
}
|
|
72
|
-
triggerId(value) {
|
|
73
|
-
return `${this.idPrefix}-trigger-${this.normalizeValue(value)}`;
|
|
74
|
-
}
|
|
75
|
-
contentId(value) {
|
|
76
|
-
return `${this.idPrefix}-content-${this.normalizeValue(value)}`;
|
|
77
|
-
}
|
|
78
|
-
enabledTriggers() {
|
|
79
|
-
return [...this.triggers.values()].filter((trigger) => !trigger.disabled());
|
|
80
|
-
}
|
|
81
|
-
triggerForValue(value) {
|
|
82
|
-
return [...this.triggers.values()].find((trigger) => trigger.value() === value);
|
|
83
|
-
}
|
|
84
|
-
normalizeValue(value) {
|
|
85
|
-
const normalized = value
|
|
86
|
-
.toLowerCase()
|
|
87
|
-
.replace(/[^a-z0-9_-]+/g, '-')
|
|
88
|
-
.replace(/^-+|-+$/g, '');
|
|
89
|
-
return normalized || 'tab';
|
|
90
|
-
}
|
|
91
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: TabsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
92
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.0", type: TabsComponent, isStandalone: true, selector: "ui-tabs", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { properties: { "class": "classes()", "attr.data-orientation": "orientation()" } }, providers: [{ provide: TabsContextBase, useExisting: forwardRef(() => TabsComponent) }], usesInheritance: true, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
93
|
-
}
|
|
94
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: TabsComponent, decorators: [{
|
|
95
|
-
type: Component,
|
|
96
|
-
args: [{
|
|
97
|
-
selector: 'ui-tabs',
|
|
98
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
99
|
-
providers: [{ provide: TabsContextBase, useExisting: forwardRef(() => TabsComponent) }],
|
|
100
|
-
host: {
|
|
101
|
-
'[class]': 'classes()',
|
|
102
|
-
'[attr.data-orientation]': 'orientation()',
|
|
103
|
-
},
|
|
104
|
-
template: `<ng-content />`,
|
|
105
|
-
}]
|
|
106
|
-
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
107
|
-
class TabsListComponent extends TabsListContextBase {
|
|
108
|
-
ctx = inject(TabsComponent);
|
|
109
|
-
variant = input('default', /* @ts-ignore */
|
|
110
|
-
...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
111
|
-
class = input('', /* @ts-ignore */
|
|
112
|
-
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
113
|
-
classes = computed(() => cn(this.variantClasses(), this.class()), /* @ts-ignore */
|
|
114
|
-
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
115
|
-
listVariant() {
|
|
116
|
-
return this.variant();
|
|
117
|
-
}
|
|
118
|
-
variantClasses() {
|
|
119
|
-
if (this.variant() === 'line') {
|
|
120
|
-
return this.ctx.orientation() === 'vertical'
|
|
121
|
-
? 'inline-flex flex-col items-stretch justify-start gap-1 border-e border-border bg-transparent p-0 pe-3 text-muted-foreground'
|
|
122
|
-
: 'inline-flex h-9 items-center justify-start gap-4 border-b border-border bg-transparent p-0 text-muted-foreground';
|
|
123
|
-
}
|
|
124
|
-
return this.ctx.orientation() === 'vertical'
|
|
125
|
-
? 'inline-flex flex-col items-stretch justify-start rounded-md bg-muted p-1 text-muted-foreground'
|
|
126
|
-
: 'inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground';
|
|
127
|
-
}
|
|
128
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: TabsListComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
129
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.0", type: TabsListComponent, isStandalone: true, selector: "ui-tabs-list", 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.role": "\"tablist\"", "attr.aria-orientation": "ctx.orientation()", "attr.data-variant": "variant()" } }, providers: [{ provide: TabsListContextBase, useExisting: forwardRef(() => TabsListComponent) }], usesInheritance: true, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
130
|
-
}
|
|
131
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: TabsListComponent, decorators: [{
|
|
132
|
-
type: Component,
|
|
133
|
-
args: [{
|
|
134
|
-
selector: 'ui-tabs-list',
|
|
135
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
136
|
-
providers: [{ provide: TabsListContextBase, useExisting: forwardRef(() => TabsListComponent) }],
|
|
137
|
-
host: {
|
|
138
|
-
'[class]': 'classes()',
|
|
139
|
-
'[attr.role]': '"tablist"',
|
|
140
|
-
'[attr.aria-orientation]': 'ctx.orientation()',
|
|
141
|
-
'[attr.data-variant]': 'variant()',
|
|
142
|
-
},
|
|
143
|
-
template: `<ng-content />`,
|
|
144
|
-
}]
|
|
145
|
-
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
146
|
-
class TabsTriggerComponent {
|
|
147
|
-
ctx = inject(TabsComponent);
|
|
148
|
-
list = inject(TabsListContextBase, { optional: true });
|
|
149
|
-
el = inject(ElementRef);
|
|
150
|
-
value = input.required(/* @ts-ignore */
|
|
151
|
-
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
152
|
-
disabled = input(false, /* @ts-ignore */
|
|
153
|
-
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
154
|
-
class = input('', /* @ts-ignore */
|
|
155
|
-
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
156
|
-
selected = computed(() => this.ctx.value() === this.value(), /* @ts-ignore */
|
|
157
|
-
...(ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []));
|
|
158
|
-
triggerId = computed(() => this.ctx.triggerId(this.value()), /* @ts-ignore */
|
|
159
|
-
...(ngDevMode ? [{ debugName: "triggerId" }] : /* istanbul ignore next */ []));
|
|
160
|
-
contentId = computed(() => this.ctx.contentId(this.value()), /* @ts-ignore */
|
|
161
|
-
...(ngDevMode ? [{ debugName: "contentId" }] : /* istanbul ignore next */ []));
|
|
162
|
-
classes = computed(() => cn('inline-flex items-center justify-center gap-1.5 whitespace-nowrap text-sm font-medium', 'ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2', 'disabled:pointer-events-none disabled:opacity-50', this.variantClasses(), this.class()), /* @ts-ignore */
|
|
163
|
-
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
164
|
-
ngOnInit() {
|
|
165
|
-
this.ctx.register(this.el.nativeElement, this.value, this.disabled);
|
|
166
|
-
}
|
|
167
|
-
ngOnDestroy() {
|
|
168
|
-
this.ctx.unregister(this.el.nativeElement);
|
|
169
|
-
}
|
|
170
|
-
onClick() {
|
|
171
|
-
if (this.disabled())
|
|
172
|
-
return;
|
|
173
|
-
this.ctx.activate(this.value());
|
|
174
|
-
}
|
|
175
|
-
onArrow(e, delta, axis) {
|
|
176
|
-
if (this.ctx.orientation() !== axis)
|
|
177
|
-
return;
|
|
178
|
-
e.preventDefault();
|
|
179
|
-
this.ctx.focusNext(this.el.nativeElement, delta);
|
|
180
|
-
}
|
|
181
|
-
onHome(e) {
|
|
182
|
-
e.preventDefault();
|
|
183
|
-
this.ctx.focusFirst();
|
|
184
|
-
}
|
|
185
|
-
onEnd(e) {
|
|
186
|
-
e.preventDefault();
|
|
187
|
-
this.ctx.focusLast();
|
|
188
|
-
}
|
|
189
|
-
variantClasses() {
|
|
190
|
-
const variant = this.list?.listVariant() ?? 'default';
|
|
191
|
-
if (variant === 'line') {
|
|
192
|
-
return this.ctx.orientation() === 'vertical'
|
|
193
|
-
? 'w-full justify-start rounded-none border-e-2 border-transparent px-3 py-2 data-[state=active]:border-foreground data-[state=active]:bg-transparent data-[state=active]:text-foreground data-[state=active]:shadow-none'
|
|
194
|
-
: 'rounded-none border-b-2 border-transparent px-2 py-2 data-[state=active]:border-foreground data-[state=active]:bg-transparent data-[state=active]:text-foreground data-[state=active]:shadow-none';
|
|
195
|
-
}
|
|
196
|
-
return cn('rounded-sm px-3 py-1.5 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm', this.ctx.orientation() === 'vertical' && 'w-full justify-start');
|
|
197
|
-
}
|
|
198
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: TabsTriggerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
199
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.0", type: TabsTriggerComponent, isStandalone: true, selector: "button[ui-tabs-trigger]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "button" }, listeners: { "click": "onClick()", "keydown.arrowRight": "onArrow($any($event), 1, \"horizontal\")", "keydown.arrowLeft": "onArrow($any($event), -1, \"horizontal\")", "keydown.arrowDown": "onArrow($any($event), 1, \"vertical\")", "keydown.arrowUp": "onArrow($any($event), -1, \"vertical\")", "keydown.home": "onHome($any($event))", "keydown.end": "onEnd($any($event))" }, properties: { "class": "classes()", "id": "triggerId()", "attr.role": "\"tab\"", "attr.aria-selected": "selected()", "attr.aria-controls": "contentId()", "attr.aria-disabled": "disabled() ? \"true\" : null", "attr.tabindex": "selected() ? 0 : -1", "attr.data-state": "selected() ? \"active\" : \"inactive\"", "disabled": "disabled() || null" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
200
|
-
}
|
|
201
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: TabsTriggerComponent, decorators: [{
|
|
202
|
-
type: Component,
|
|
203
|
-
args: [{
|
|
204
|
-
selector: 'button[ui-tabs-trigger]',
|
|
205
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
206
|
-
host: {
|
|
207
|
-
'[class]': 'classes()',
|
|
208
|
-
'[id]': 'triggerId()',
|
|
209
|
-
type: 'button',
|
|
210
|
-
'[attr.role]': '"tab"',
|
|
211
|
-
'[attr.aria-selected]': 'selected()',
|
|
212
|
-
'[attr.aria-controls]': 'contentId()',
|
|
213
|
-
'[attr.aria-disabled]': 'disabled() ? "true" : null',
|
|
214
|
-
'[attr.tabindex]': 'selected() ? 0 : -1',
|
|
215
|
-
'[attr.data-state]': 'selected() ? "active" : "inactive"',
|
|
216
|
-
'[disabled]': 'disabled() || null',
|
|
217
|
-
'(click)': 'onClick()',
|
|
218
|
-
'(keydown.arrowRight)': 'onArrow($any($event), 1, "horizontal")',
|
|
219
|
-
'(keydown.arrowLeft)': 'onArrow($any($event), -1, "horizontal")',
|
|
220
|
-
'(keydown.arrowDown)': 'onArrow($any($event), 1, "vertical")',
|
|
221
|
-
'(keydown.arrowUp)': 'onArrow($any($event), -1, "vertical")',
|
|
222
|
-
'(keydown.home)': 'onHome($any($event))',
|
|
223
|
-
'(keydown.end)': 'onEnd($any($event))',
|
|
224
|
-
},
|
|
225
|
-
template: `<ng-content />`,
|
|
226
|
-
}]
|
|
227
|
-
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
228
|
-
class TabsContentComponent {
|
|
229
|
-
ctx = inject(TabsComponent);
|
|
230
|
-
value = input.required(/* @ts-ignore */
|
|
231
|
-
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
232
|
-
class = input('', /* @ts-ignore */
|
|
233
|
-
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
234
|
-
active = computed(() => this.ctx.value() === this.value(), /* @ts-ignore */
|
|
235
|
-
...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
|
|
236
|
-
triggerId = computed(() => this.ctx.triggerId(this.value()), /* @ts-ignore */
|
|
237
|
-
...(ngDevMode ? [{ debugName: "triggerId" }] : /* istanbul ignore next */ []));
|
|
238
|
-
contentId = computed(() => this.ctx.contentId(this.value()), /* @ts-ignore */
|
|
239
|
-
...(ngDevMode ? [{ debugName: "contentId" }] : /* istanbul ignore next */ []));
|
|
240
|
-
classes = computed(() => cn('mt-2 block ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring', this.class()), /* @ts-ignore */
|
|
241
|
-
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
242
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: TabsContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
243
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.0", type: TabsContentComponent, isStandalone: true, selector: "ui-tabs-content", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "tabindex": "0" }, properties: { "class": "classes()", "id": "contentId()", "attr.role": "\"tabpanel\"", "attr.aria-labelledby": "triggerId()", "attr.data-state": "active() ? \"active\" : \"inactive\"", "hidden": "!active()" } }, ngImport: i0, template: `@if (active()) {
|
|
244
|
-
<ng-content />
|
|
245
|
-
}`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
246
|
-
}
|
|
247
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: TabsContentComponent, decorators: [{
|
|
248
|
-
type: Component,
|
|
249
|
-
args: [{
|
|
250
|
-
selector: 'ui-tabs-content',
|
|
251
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
252
|
-
host: {
|
|
253
|
-
'[class]': 'classes()',
|
|
254
|
-
'[id]': 'contentId()',
|
|
255
|
-
'[attr.role]': '"tabpanel"',
|
|
256
|
-
'[attr.aria-labelledby]': 'triggerId()',
|
|
257
|
-
'[attr.data-state]': 'active() ? "active" : "inactive"',
|
|
258
|
-
'[hidden]': '!active()',
|
|
259
|
-
tabindex: '0',
|
|
260
|
-
},
|
|
261
|
-
template: `@if (active()) {
|
|
262
|
-
<ng-content />
|
|
263
|
-
}`,
|
|
264
|
-
}]
|
|
265
|
-
}], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
266
|
-
|
|
267
|
-
/**
|
|
268
|
-
* Generated bundle index. Do not edit.
|
|
269
|
-
*/
|
|
270
|
-
|
|
271
|
-
export { TabsComponent, TabsContentComponent, TabsContextBase, TabsListComponent, TabsListContextBase, TabsTriggerComponent };
|
|
272
|
-
//# sourceMappingURL=ojiepermana-angular-component-tabs.mjs.map
|