@kouji-ui/components 0.1.1 → 0.1.3
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/fesm2022/kouji-ui-components.mjs +17668 -0
- package/fesm2022/kouji-ui-components.mjs.map +1 -0
- package/package.json +21 -11
- package/types/kouji-ui-components.d.ts +8032 -0
- package/.turbo/turbo-build.log +0 -29
- package/CHANGELOG.md +0 -192
- package/ng-package.json +0 -7
- package/src/accordion/_examples/accordion.default.example.ts +0 -31
- package/src/accordion/_examples/accordion.disabled.example.ts +0 -38
- package/src/accordion/_examples/accordion.multiple.example.ts +0 -31
- package/src/accordion/_examples/accordion.rich-content.example.ts +0 -49
- package/src/accordion/_examples/index.ts +0 -6
- package/src/accordion/accordion.arrow-nav.example.ts +0 -39
- package/src/accordion/accordion.css +0 -68
- package/src/accordion/accordion.playground.ts +0 -119
- package/src/accordion/accordion.spec.ts +0 -117
- package/src/accordion/accordion.ts +0 -153
- package/src/accordion/accordion.usage.example.ts +0 -38
- package/src/accordion/accordion.value.example.ts +0 -60
- package/src/accordion/index.ts +0 -1
- package/src/alert/_examples/alert.banner.example.ts +0 -56
- package/src/alert/_examples/alert.dismissible.example.ts +0 -53
- package/src/alert/_examples/alert.example.ts +0 -40
- package/src/alert/_examples/alert.variants.example.ts +0 -66
- package/src/alert/_examples/alert.with-actions.example.ts +0 -57
- package/src/alert/_examples/index.ts +0 -7
- package/src/alert/alert.css +0 -133
- package/src/alert/alert.playground.ts +0 -111
- package/src/alert/alert.spec.ts +0 -167
- package/src/alert/alert.ts +0 -250
- package/src/alert/alert.usage.example.ts +0 -58
- package/src/alert/index.ts +0 -8
- package/src/avatar/_examples/avatar-group.example.ts +0 -31
- package/src/avatar/_examples/avatar-group.list.example.ts +0 -45
- package/src/avatar/_examples/avatar-group.overflow.example.ts +0 -33
- package/src/avatar/_examples/avatar-group.shapes.example.ts +0 -39
- package/src/avatar/_examples/avatar-group.sizes.example.ts +0 -44
- package/src/avatar/_examples/avatar.default.example.ts +0 -18
- package/src/avatar/_examples/avatar.initials.example.ts +0 -20
- package/src/avatar/_examples/avatar.shapes.example.ts +0 -22
- package/src/avatar/_examples/avatar.sizes.example.ts +0 -26
- package/src/avatar/_examples/avatar.with-image.example.ts +0 -20
- package/src/avatar/_examples/index.ts +0 -12
- package/src/avatar/avatar-group.spec.ts +0 -138
- package/src/avatar/avatar-group.ts +0 -127
- package/src/avatar/avatar-group.usage.example.ts +0 -30
- package/src/avatar/avatar.css +0 -58
- package/src/avatar/avatar.playground.ts +0 -95
- package/src/avatar/avatar.ts +0 -123
- package/src/avatar/index.ts +0 -2
- package/src/badge/_examples/badge.default.example.ts +0 -18
- package/src/badge/_examples/badge.sizes.example.ts +0 -25
- package/src/badge/_examples/badge.variants.example.ts +0 -24
- package/src/badge/_examples/badge.with-dot.example.ts +0 -31
- package/src/badge/_examples/badge.with-icon.example.ts +0 -23
- package/src/badge/_examples/index.ts +0 -7
- package/src/badge/badge.css +0 -59
- package/src/badge/badge.playground.ts +0 -49
- package/src/badge/badge.ts +0 -86
- package/src/badge/badge.usage.example.ts +0 -22
- package/src/badge/index.ts +0 -1
- package/src/breadcrumb/_examples/breadcrumb.custom-separator.example.ts +0 -53
- package/src/breadcrumb/_examples/breadcrumb.example.ts +0 -48
- package/src/breadcrumb/_examples/breadcrumb.long-path.example.ts +0 -58
- package/src/breadcrumb/_examples/breadcrumb.truncated.example.ts +0 -59
- package/src/breadcrumb/_examples/breadcrumb.with-icons.example.ts +0 -66
- package/src/breadcrumb/_examples/index.ts +0 -7
- package/src/breadcrumb/breadcrumb.css +0 -121
- package/src/breadcrumb/breadcrumb.playground.ts +0 -93
- package/src/breadcrumb/breadcrumb.spec.ts +0 -230
- package/src/breadcrumb/breadcrumb.ts +0 -272
- package/src/breadcrumb/breadcrumb.usage.example.ts +0 -45
- package/src/breadcrumb/index.ts +0 -1
- package/src/button/_examples/button.anchor.example.ts +0 -18
- package/src/button/_examples/button.configured.example.ts +0 -43
- package/src/button/_examples/button.disabled.example.ts +0 -25
- package/src/button/_examples/button.example.ts +0 -22
- package/src/button/_examples/button.icon.example.ts +0 -27
- package/src/button/_examples/button.loading.example.ts +0 -31
- package/src/button/_examples/button.pressed.example.ts +0 -24
- package/src/button/_examples/button.sizes.example.ts +0 -26
- package/src/button/_examples/button.usage.example.ts +0 -66
- package/src/button/_examples/button.variants.example.ts +0 -26
- package/src/button/_examples/index.ts +0 -12
- package/src/button/button.css +0 -263
- package/src/button/button.playground.ts +0 -79
- package/src/button/button.spec.ts +0 -100
- package/src/button/button.ts +0 -150
- package/src/button/index.ts +0 -1
- package/src/button-group/_examples/button-group.example.ts +0 -30
- package/src/button-group/_examples/button-group.icon-only.example.ts +0 -30
- package/src/button-group/_examples/button-group.toggle.example.ts +0 -36
- package/src/button-group/_examples/button-group.variants.example.ts +0 -40
- package/src/button-group/_examples/button-group.vertical.example.ts +0 -29
- package/src/button-group/_examples/index.ts +0 -7
- package/src/button-group/button-group.css +0 -80
- package/src/button-group/button-group.playground.ts +0 -94
- package/src/button-group/button-group.spec.ts +0 -119
- package/src/button-group/button-group.ts +0 -130
- package/src/button-group/button-group.usage.example.ts +0 -35
- package/src/button-group/index.ts +0 -1
- package/src/calendar/_examples/calendar.example.ts +0 -33
- package/src/calendar/_examples/index.ts +0 -3
- package/src/calendar/calendar.css +0 -129
- package/src/calendar/calendar.playground.ts +0 -84
- package/src/calendar/calendar.spec.ts +0 -50
- package/src/calendar/calendar.ts +0 -171
- package/src/calendar/calendar.usage.example.ts +0 -33
- package/src/calendar/index.ts +0 -1
- package/src/card/_examples/card.cover.example.ts +0 -53
- package/src/card/_examples/card.example.ts +0 -27
- package/src/card/_examples/card.full.example.ts +0 -51
- package/src/card/_examples/index.ts +0 -5
- package/src/card/card.css +0 -120
- package/src/card/card.playground.ts +0 -116
- package/src/card/card.spec.ts +0 -50
- package/src/card/card.ts +0 -194
- package/src/card/card.usage.example.ts +0 -46
- package/src/card/index.ts +0 -1
- package/src/carousel/_examples/carousel.autoplay.example.ts +0 -69
- package/src/carousel/_examples/carousel.example.ts +0 -60
- package/src/carousel/_examples/carousel.indicators.example.ts +0 -64
- package/src/carousel/_examples/carousel.lazy-load.example.ts +0 -85
- package/src/carousel/_examples/carousel.tabs-pattern.example.ts +0 -61
- package/src/carousel/_examples/index.ts +0 -7
- package/src/carousel/carousel.css +0 -181
- package/src/carousel/carousel.playground.ts +0 -135
- package/src/carousel/carousel.spec.ts +0 -211
- package/src/carousel/carousel.ts +0 -399
- package/src/carousel/carousel.usage.example.ts +0 -46
- package/src/carousel/index.ts +0 -1
- package/src/cascade-select/_examples/cascade-select.data-driven.example.ts +0 -119
- package/src/cascade-select/_examples/cascade-select.disabled.example.ts +0 -74
- package/src/cascade-select/_examples/cascade-select.example.ts +0 -80
- package/src/cascade-select/_examples/cascade-select.field.example.ts +0 -73
- package/src/cascade-select/_examples/cascade-select.path.example.ts +0 -85
- package/src/cascade-select/_examples/index.ts +0 -7
- package/src/cascade-select/cascade-select.css +0 -120
- package/src/cascade-select/cascade-select.playground.ts +0 -133
- package/src/cascade-select/cascade-select.ts +0 -201
- package/src/cascade-select/cascade-select.usage.example.ts +0 -44
- package/src/cascade-select/index.ts +0 -5
- package/src/chat/_examples/chat-bubble.example.ts +0 -71
- package/src/chat/_examples/chat-bubble.grouped.example.ts +0 -69
- package/src/chat/_examples/chat-bubble.sides.example.ts +0 -41
- package/src/chat/_examples/chat-bubble.variants.example.ts +0 -58
- package/src/chat/_examples/chat-bubble.with-state.example.ts +0 -57
- package/src/chat/_examples/index.ts +0 -7
- package/src/chat/chat.css +0 -231
- package/src/chat/chat.playground.ts +0 -171
- package/src/chat/chat.spec.ts +0 -343
- package/src/chat/chat.ts +0 -269
- package/src/chat/chat.usage.example.ts +0 -49
- package/src/chat/index.ts +0 -13
- package/src/checkbox/_examples/checkbox.checked.example.ts +0 -20
- package/src/checkbox/_examples/checkbox.default.example.ts +0 -20
- package/src/checkbox/_examples/checkbox.disabled.example.ts +0 -26
- package/src/checkbox/_examples/checkbox.indeterminate.example.ts +0 -20
- package/src/checkbox/_examples/checkbox.usage.example.ts +0 -62
- package/src/checkbox/_examples/index.ts +0 -7
- package/src/checkbox/checkbox.css +0 -74
- package/src/checkbox/checkbox.playground.ts +0 -68
- package/src/checkbox/checkbox.ts +0 -122
- package/src/checkbox/index.ts +0 -1
- package/src/color-picker/_examples/color-picker.alpha.example.ts +0 -36
- package/src/color-picker/_examples/color-picker.example.ts +0 -34
- package/src/color-picker/_examples/color-picker.hex-input.example.ts +0 -53
- package/src/color-picker/_examples/color-picker.in-form.example.ts +0 -60
- package/src/color-picker/_examples/color-picker.usage.example.ts +0 -58
- package/src/color-picker/_examples/color-picker.with-presets.example.ts +0 -45
- package/src/color-picker/_examples/index.ts +0 -8
- package/src/color-picker/color-picker.css +0 -183
- package/src/color-picker/color-picker.playground.ts +0 -83
- package/src/color-picker/color-picker.spec.ts +0 -94
- package/src/color-picker/color-picker.ts +0 -234
- package/src/color-picker/index.ts +0 -1
- package/src/combobox/_examples/combobox.async.example.ts +0 -85
- package/src/combobox/_examples/combobox.empty-state.example.ts +0 -36
- package/src/combobox/_examples/combobox.example.ts +0 -36
- package/src/combobox/_examples/combobox.free-text.example.ts +0 -42
- package/src/combobox/_examples/combobox.usage.example.ts +0 -51
- package/src/combobox/_examples/combobox.with-icons.example.ts +0 -49
- package/src/combobox/_examples/index.ts +0 -8
- package/src/combobox/combobox.css +0 -101
- package/src/combobox/combobox.playground.ts +0 -90
- package/src/combobox/combobox.spec.ts +0 -111
- package/src/combobox/combobox.ts +0 -219
- package/src/combobox/index.ts +0 -6
- package/src/command-palette/_examples/command-palette.async.example.ts +0 -99
- package/src/command-palette/_examples/command-palette.dialog.example.ts +0 -90
- package/src/command-palette/_examples/command-palette.example.ts +0 -40
- package/src/command-palette/_examples/command-palette.fuzzy.example.ts +0 -54
- package/src/command-palette/_examples/command-palette.groups.example.ts +0 -55
- package/src/command-palette/_examples/command-palette.usage.example.ts +0 -49
- package/src/command-palette/_examples/index.ts +0 -8
- package/src/command-palette/command-palette.css +0 -234
- package/src/command-palette/command-palette.playground.ts +0 -119
- package/src/command-palette/command-palette.ts +0 -448
- package/src/command-palette/index.ts +0 -10
- package/src/confirm-popup/_examples/confirm-popup.destructive.example.ts +0 -72
- package/src/confirm-popup/_examples/confirm-popup.example.ts +0 -82
- package/src/confirm-popup/_examples/confirm-popup.placement.example.ts +0 -97
- package/src/confirm-popup/_examples/confirm-popup.usage.example.ts +0 -94
- package/src/confirm-popup/_examples/confirm-popup.with-message.example.ts +0 -76
- package/src/confirm-popup/_examples/index.ts +0 -7
- package/src/confirm-popup/confirm-popup.css +0 -47
- package/src/confirm-popup/confirm-popup.playground.ts +0 -109
- package/src/confirm-popup/confirm-popup.spec.ts +0 -209
- package/src/confirm-popup/confirm-popup.ts +0 -279
- package/src/confirm-popup/index.ts +0 -1
- package/src/date-picker/_examples/date-picker.disabled-dates.example.ts +0 -44
- package/src/date-picker/_examples/date-picker.example.ts +0 -38
- package/src/date-picker/_examples/date-picker.locale.example.ts +0 -50
- package/src/date-picker/_examples/date-picker.readonly.example.ts +0 -32
- package/src/date-picker/_examples/date-picker.usage.example.ts +0 -60
- package/src/date-picker/_examples/date-picker.with-min-max.example.ts +0 -47
- package/src/date-picker/_examples/index.ts +0 -8
- package/src/date-picker/date-picker.css +0 -61
- package/src/date-picker/date-picker.playground.ts +0 -79
- package/src/date-picker/date-picker.spec.ts +0 -71
- package/src/date-picker/date-picker.ts +0 -185
- package/src/date-picker/index.ts +0 -1
- package/src/dialog/_examples/dialog.confirmation.example.ts +0 -30
- package/src/dialog/_examples/dialog.default.example.ts +0 -30
- package/src/dialog/_examples/dialog.nested.example.ts +0 -86
- package/src/dialog/_examples/dialog.scrollable.example.ts +0 -30
- package/src/dialog/_examples/dialog.usage.example.ts +0 -57
- package/src/dialog/_examples/dialog.with-form.example.ts +0 -48
- package/src/dialog/_examples/index.ts +0 -8
- package/src/dialog/dialog.css +0 -56
- package/src/dialog/dialog.playground.ts +0 -136
- package/src/dialog/dialog.ts +0 -82
- package/src/dialog/index.ts +0 -1
- package/src/divider/_examples/divider.example.ts +0 -27
- package/src/divider/_examples/divider.sizes.example.ts +0 -33
- package/src/divider/_examples/divider.structural.example.ts +0 -55
- package/src/divider/_examples/divider.usage.example.ts +0 -48
- package/src/divider/_examples/divider.variants.example.ts +0 -33
- package/src/divider/_examples/divider.vertical.example.ts +0 -38
- package/src/divider/_examples/divider.with-content.example.ts +0 -38
- package/src/divider/_examples/index.ts +0 -9
- package/src/divider/divider.css +0 -93
- package/src/divider/divider.playground.ts +0 -97
- package/src/divider/divider.spec.ts +0 -207
- package/src/divider/divider.ts +0 -220
- package/src/divider/index.ts +0 -1
- package/src/drawer/_examples/drawer.example.ts +0 -30
- package/src/drawer/_examples/drawer.modal-vs-non-modal.example.ts +0 -27
- package/src/drawer/_examples/drawer.scrollable.example.ts +0 -30
- package/src/drawer/_examples/drawer.sides.example.ts +0 -32
- package/src/drawer/_examples/drawer.usage.example.ts +0 -56
- package/src/drawer/_examples/drawer.with-form.example.ts +0 -48
- package/src/drawer/_examples/index.ts +0 -8
- package/src/drawer/drawer.css +0 -130
- package/src/drawer/drawer.playground.ts +0 -107
- package/src/drawer/drawer.spec.ts +0 -216
- package/src/drawer/drawer.ts +0 -85
- package/src/drawer/index.ts +0 -1
- package/src/dropdown-menu/_examples/dropdown-menu.disabled.example.ts +0 -19
- package/src/dropdown-menu/_examples/dropdown-menu.example.ts +0 -20
- package/src/dropdown-menu/_examples/dropdown-menu.shortcuts.example.ts +0 -31
- package/src/dropdown-menu/_examples/dropdown-menu.sides.example.ts +0 -18
- package/src/dropdown-menu/_examples/dropdown-menu.usage.example.ts +0 -56
- package/src/dropdown-menu/_examples/dropdown-menu.with-icons.example.ts +0 -31
- package/src/dropdown-menu/_examples/dropdown-menu.with-separator.example.ts +0 -41
- package/src/dropdown-menu/_examples/index.ts +0 -9
- package/src/dropdown-menu/dropdown-menu.css +0 -108
- package/src/dropdown-menu/dropdown-menu.playground.ts +0 -109
- package/src/dropdown-menu/dropdown-menu.spec.ts +0 -5
- package/src/dropdown-menu/dropdown-menu.ts +0 -128
- package/src/dropdown-menu/index.ts +0 -1
- package/src/empty-state/_examples/empty-state.error.example.ts +0 -63
- package/src/empty-state/_examples/empty-state.example.ts +0 -59
- package/src/empty-state/_examples/empty-state.search.example.ts +0 -82
- package/src/empty-state/_examples/empty-state.sizes.example.ts +0 -76
- package/src/empty-state/_examples/empty-state.usage.example.ts +0 -66
- package/src/empty-state/_examples/empty-state.with-actions.example.ts +0 -68
- package/src/empty-state/_examples/index.ts +0 -8
- package/src/empty-state/empty-state.css +0 -114
- package/src/empty-state/empty-state.playground.ts +0 -87
- package/src/empty-state/empty-state.spec.ts +0 -211
- package/src/empty-state/empty-state.ts +0 -276
- package/src/empty-state/index.ts +0 -1
- package/src/example-components.ts +0 -396
- package/src/field/_examples/field.disabled.example.ts +0 -49
- package/src/field/_examples/field.example.ts +0 -51
- package/src/field/_examples/field.required.example.ts +0 -46
- package/src/field/_examples/field.with-error.example.ts +0 -73
- package/src/field/_examples/field.with-prefix-suffix.example.ts +0 -63
- package/src/field/_examples/index.ts +0 -7
- package/src/field/field.css +0 -138
- package/src/field/field.playground.ts +0 -108
- package/src/field/field.spec.ts +0 -132
- package/src/field/field.ts +0 -232
- package/src/field/field.usage.example.ts +0 -63
- package/src/field/index.ts +0 -7
- package/src/file-upload/_examples/file-upload.dropzone.example.ts +0 -32
- package/src/file-upload/_examples/file-upload.example.ts +0 -29
- package/src/file-upload/_examples/file-upload.image-preview.example.ts +0 -31
- package/src/file-upload/_examples/file-upload.multiple.example.ts +0 -23
- package/src/file-upload/_examples/file-upload.with-progress.example.ts +0 -59
- package/src/file-upload/_examples/index.ts +0 -7
- package/src/file-upload/file-upload.css +0 -207
- package/src/file-upload/file-upload.playground.ts +0 -84
- package/src/file-upload/file-upload.spec.ts +0 -94
- package/src/file-upload/file-upload.ts +0 -301
- package/src/file-upload/file-upload.usage.example.ts +0 -45
- package/src/file-upload/index.ts +0 -1
- package/src/form/_examples/form.async-submit.example.ts +0 -72
- package/src/form/_examples/form.compound.example.ts +0 -93
- package/src/form/_examples/form.example.ts +0 -70
- package/src/form/_examples/form.validation.example.ts +0 -67
- package/src/form/_examples/index.ts +0 -6
- package/src/form/form.css +0 -63
- package/src/form/form.playground.ts +0 -145
- package/src/form/form.spec.ts +0 -96
- package/src/form/form.ts +0 -216
- package/src/form/form.usage.example.ts +0 -63
- package/src/form/index.ts +0 -5
- package/src/icon/_examples/icon.gallery.example.ts +0 -199
- package/src/icon/_examples/icon.usage.example.ts +0 -46
- package/src/icon/_examples/index.ts +0 -4
- package/src/icon/icon.playground.ts +0 -63
- package/src/icon/index.ts +0 -5
- package/src/icon/lucide/icon-names.generated.ts +0 -1708
- package/src/icon/lucide/icon-names.ts +0 -18
- package/src/icon/lucide/index.ts +0 -2
- package/src/icon/lucide/provide-lucide-icons.ts +0 -96
- package/src/input/_examples/index.ts +0 -4
- package/src/input/_examples/input.color.example.ts +0 -33
- package/src/input/_examples/input.example.ts +0 -22
- package/src/input/index.ts +0 -1
- package/src/input/input.css +0 -70
- package/src/input/input.playground.ts +0 -79
- package/src/input/input.spec.ts +0 -98
- package/src/input/input.ts +0 -158
- package/src/input/input.usage.example.ts +0 -40
- package/src/input-group/_examples/index.ts +0 -7
- package/src/input-group/_examples/input-group.button.example.ts +0 -43
- package/src/input-group/_examples/input-group.example.ts +0 -39
- package/src/input-group/_examples/input-group.icon.example.ts +0 -49
- package/src/input-group/_examples/input-group.url.example.ts +0 -36
- package/src/input-group/_examples/input-group.variants.example.ts +0 -39
- package/src/input-group/index.ts +0 -1
- package/src/input-group/input-group.css +0 -125
- package/src/input-group/input-group.playground.ts +0 -90
- package/src/input-group/input-group.ts +0 -142
- package/src/input-group/input-group.usage.example.ts +0 -47
- package/src/input-mask/_examples/index.ts +0 -8
- package/src/input-mask/_examples/input-mask.credit-card.example.ts +0 -90
- package/src/input-mask/_examples/input-mask.custom-tokens.example.ts +0 -87
- package/src/input-mask/_examples/input-mask.date.example.ts +0 -61
- package/src/input-mask/_examples/input-mask.example.ts +0 -61
- package/src/input-mask/_examples/input-mask.usage.example.ts +0 -44
- package/src/input-mask/_examples/input-mask.validation.example.ts +0 -80
- package/src/input-mask/index.ts +0 -9
- package/src/input-mask/input-mask.css +0 -39
- package/src/input-mask/input-mask.playground.ts +0 -79
- package/src/input-mask/input-mask.ts +0 -130
- package/src/input-otp/_examples/index.ts +0 -8
- package/src/input-otp/_examples/input-otp.autosubmit.example.ts +0 -71
- package/src/input-otp/_examples/input-otp.example.ts +0 -47
- package/src/input-otp/_examples/input-otp.lengths.example.ts +0 -67
- package/src/input-otp/_examples/input-otp.masked.example.ts +0 -46
- package/src/input-otp/_examples/input-otp.reactive.example.ts +0 -58
- package/src/input-otp/_examples/input-otp.separator.example.ts +0 -49
- package/src/input-otp/index.ts +0 -1
- package/src/input-otp/input-otp.css +0 -87
- package/src/input-otp/input-otp.playground.ts +0 -107
- package/src/input-otp/input-otp.ts +0 -244
- package/src/input-otp/input-otp.usage.example.ts +0 -45
- package/src/kbd/_examples/index.ts +0 -6
- package/src/kbd/_examples/kbd.combo.example.ts +0 -24
- package/src/kbd/_examples/kbd.example.ts +0 -22
- package/src/kbd/_examples/kbd.in-tooltip.example.ts +0 -43
- package/src/kbd/_examples/kbd.sizes.example.ts +0 -31
- package/src/kbd/index.ts +0 -1
- package/src/kbd/kbd.css +0 -67
- package/src/kbd/kbd.playground.ts +0 -51
- package/src/kbd/kbd.spec.ts +0 -123
- package/src/kbd/kbd.ts +0 -123
- package/src/kbd/kbd.usage.example.ts +0 -38
- package/src/link/_examples/index.ts +0 -8
- package/src/link/_examples/link.disabled.example.ts +0 -23
- package/src/link/_examples/link.example.ts +0 -26
- package/src/link/_examples/link.external.example.ts +0 -33
- package/src/link/_examples/link.in-prose.example.ts +0 -36
- package/src/link/_examples/link.sizes.example.ts +0 -28
- package/src/link/_examples/link.variants.example.ts +0 -25
- package/src/link/index.ts +0 -1
- package/src/link/link.css +0 -104
- package/src/link/link.playground.ts +0 -98
- package/src/link/link.spec.ts +0 -146
- package/src/link/link.ts +0 -133
- package/src/link/link.usage.example.ts +0 -37
- package/src/list/_examples/index.ts +0 -7
- package/src/list/_examples/list.divided.example.ts +0 -32
- package/src/list/_examples/list.example.ts +0 -31
- package/src/list/_examples/list.interactive.example.ts +0 -51
- package/src/list/_examples/list.nav.example.ts +0 -44
- package/src/list/_examples/list.with-icons.example.ts +0 -97
- package/src/list/index.ts +0 -1
- package/src/list/list.css +0 -166
- package/src/list/list.playground.ts +0 -90
- package/src/list/list.spec.ts +0 -121
- package/src/list/list.ts +0 -227
- package/src/list/list.usage.example.ts +0 -45
- package/src/menubar/_examples/index.ts +0 -6
- package/src/menubar/_examples/menubar.disabled-item.example.ts +0 -23
- package/src/menubar/_examples/menubar.example.ts +0 -22
- package/src/menubar/_examples/menubar.with-shortcuts.example.ts +0 -33
- package/src/menubar/_examples/menubar.with-submenu.example.ts +0 -76
- package/src/menubar/index.ts +0 -1
- package/src/menubar/menubar.css +0 -62
- package/src/menubar/menubar.playground.ts +0 -96
- package/src/menubar/menubar.ts +0 -160
- package/src/menubar/menubar.usage.example.ts +0 -33
- package/src/number-input/_examples/index.ts +0 -7
- package/src/number-input/_examples/number-input.currency.example.ts +0 -35
- package/src/number-input/_examples/number-input.decimal.example.ts +0 -34
- package/src/number-input/_examples/number-input.example.ts +0 -24
- package/src/number-input/_examples/number-input.min-max.example.ts +0 -33
- package/src/number-input/_examples/number-input.with-stepper.example.ts +0 -45
- package/src/number-input/index.ts +0 -1
- package/src/number-input/number-input.css +0 -115
- package/src/number-input/number-input.playground.ts +0 -92
- package/src/number-input/number-input.spec.ts +0 -102
- package/src/number-input/number-input.ts +0 -212
- package/src/number-input/number-input.usage.example.ts +0 -73
- package/src/overlay/overlay.css +0 -32
- package/src/overlay-badge/_examples/index.ts +0 -7
- package/src/overlay-badge/_examples/overlay-badge.described.example.ts +0 -36
- package/src/overlay-badge/_examples/overlay-badge.dot.example.ts +0 -28
- package/src/overlay-badge/_examples/overlay-badge.example.ts +0 -34
- package/src/overlay-badge/_examples/overlay-badge.on-avatar.example.ts +0 -38
- package/src/overlay-badge/_examples/overlay-badge.positions.example.ts +0 -39
- package/src/overlay-badge/index.ts +0 -1
- package/src/overlay-badge/overlay-badge.css +0 -118
- package/src/overlay-badge/overlay-badge.playground.ts +0 -92
- package/src/overlay-badge/overlay-badge.spec.ts +0 -174
- package/src/overlay-badge/overlay-badge.ts +0 -232
- package/src/overlay-badge/overlay-badge.usage.example.ts +0 -44
- package/src/pagination/_examples/index.ts +0 -7
- package/src/pagination/_examples/pagination.boundaries.example.ts +0 -56
- package/src/pagination/_examples/pagination.compact.example.ts +0 -42
- package/src/pagination/_examples/pagination.example.ts +0 -55
- package/src/pagination/_examples/pagination.large.example.ts +0 -54
- package/src/pagination/_examples/pagination.with-info.example.ts +0 -49
- package/src/pagination/index.ts +0 -1
- package/src/pagination/pagination.css +0 -146
- package/src/pagination/pagination.playground.ts +0 -107
- package/src/pagination/pagination.spec.ts +0 -202
- package/src/pagination/pagination.ts +0 -432
- package/src/pagination/pagination.usage.example.ts +0 -50
- package/src/password-input/_examples/index.ts +0 -6
- package/src/password-input/_examples/password-input.example.ts +0 -24
- package/src/password-input/_examples/password-input.strength.example.ts +0 -45
- package/src/password-input/_examples/password-input.toggle.example.ts +0 -43
- package/src/password-input/_examples/password-input.with-rules.example.ts +0 -78
- package/src/password-input/index.ts +0 -1
- package/src/password-input/password-input.css +0 -155
- package/src/password-input/password-input.playground.ts +0 -81
- package/src/password-input/password-input.spec.ts +0 -129
- package/src/password-input/password-input.ts +0 -254
- package/src/password-input/password-input.usage.example.ts +0 -55
- package/src/playground-types.ts +0 -47
- package/src/popover/_examples/index.ts +0 -7
- package/src/popover/_examples/popover.cancellable.example.ts +0 -20
- package/src/popover/_examples/popover.example.ts +0 -20
- package/src/popover/_examples/popover.modal.example.ts +0 -22
- package/src/popover/_examples/popover.sides.example.ts +0 -37
- package/src/popover/_examples/popover.with-form.example.ts +0 -38
- package/src/popover/index.ts +0 -1
- package/src/popover/popover.css +0 -71
- package/src/popover/popover.playground.ts +0 -86
- package/src/popover/popover.spec.ts +0 -5
- package/src/popover/popover.ts +0 -94
- package/src/popover/popover.usage.example.ts +0 -48
- package/src/progress-bar/_examples/index.ts +0 -7
- package/src/progress-bar/_examples/progress-bar.example.ts +0 -22
- package/src/progress-bar/_examples/progress-bar.indeterminate.example.ts +0 -23
- package/src/progress-bar/_examples/progress-bar.sizes.example.ts +0 -29
- package/src/progress-bar/_examples/progress-bar.variants.example.ts +0 -30
- package/src/progress-bar/_examples/progress-bar.with-label.example.ts +0 -30
- package/src/progress-bar/index.ts +0 -1
- package/src/progress-bar/progress-bar.css +0 -113
- package/src/progress-bar/progress-bar.playground.ts +0 -87
- package/src/progress-bar/progress-bar.spec.ts +0 -233
- package/src/progress-bar/progress-bar.ts +0 -155
- package/src/progress-bar/progress-bar.usage.example.ts +0 -52
- package/src/public-api.ts +0 -61
- package/src/radio/_examples/index.ts +0 -6
- package/src/radio/_examples/radio.default.example.ts +0 -26
- package/src/radio/_examples/radio.disabled.example.ts +0 -26
- package/src/radio/_examples/radio.group.example.ts +0 -27
- package/src/radio/_examples/radio.inline.example.ts +0 -26
- package/src/radio/index.ts +0 -1
- package/src/radio/radio.css +0 -58
- package/src/radio/radio.playground.ts +0 -90
- package/src/radio/radio.ts +0 -143
- package/src/radio/radio.usage.example.ts +0 -54
- package/src/select/_examples/index.ts +0 -6
- package/src/select/_examples/select.default.example.ts +0 -26
- package/src/select/_examples/select.disabled.example.ts +0 -24
- package/src/select/_examples/select.grouped.example.ts +0 -37
- package/src/select/_examples/select.placeholder.example.ts +0 -26
- package/src/select/index.ts +0 -1
- package/src/select/select.css +0 -65
- package/src/select/select.playground.ts +0 -81
- package/src/select/select.ts +0 -176
- package/src/select/select.usage.example.ts +0 -64
- package/src/skeleton/_examples/index.ts +0 -6
- package/src/skeleton/_examples/skeleton.animations.example.ts +0 -52
- package/src/skeleton/_examples/skeleton.card.example.ts +0 -68
- package/src/skeleton/_examples/skeleton.example.ts +0 -24
- package/src/skeleton/_examples/skeleton.shapes.example.ts +0 -55
- package/src/skeleton/index.ts +0 -1
- package/src/skeleton/skeleton.css +0 -111
- package/src/skeleton/skeleton.playground.ts +0 -80
- package/src/skeleton/skeleton.spec.ts +0 -126
- package/src/skeleton/skeleton.ts +0 -155
- package/src/skeleton/skeleton.usage.example.ts +0 -49
- package/src/slider/_examples/index.ts +0 -7
- package/src/slider/_examples/slider.example.ts +0 -41
- package/src/slider/_examples/slider.formatted.example.ts +0 -53
- package/src/slider/_examples/slider.range.example.ts +0 -48
- package/src/slider/_examples/slider.vertical.example.ts +0 -48
- package/src/slider/_examples/slider.with-marks.example.ts +0 -46
- package/src/slider/index.ts +0 -1
- package/src/slider/slider.css +0 -172
- package/src/slider/slider.playground.ts +0 -88
- package/src/slider/slider.spec.ts +0 -139
- package/src/slider/slider.ts +0 -246
- package/src/slider/slider.usage.example.ts +0 -68
- package/src/speed-dial/_examples/index.ts +0 -7
- package/src/speed-dial/_examples/speed-dial.directions.example.ts +0 -85
- package/src/speed-dial/_examples/speed-dial.disabled.example.ts +0 -71
- package/src/speed-dial/_examples/speed-dial.example.ts +0 -48
- package/src/speed-dial/_examples/speed-dial.usage.example.ts +0 -59
- package/src/speed-dial/_examples/speed-dial.with-tooltips.example.ts +0 -65
- package/src/speed-dial/index.ts +0 -1
- package/src/speed-dial/speed-dial.css +0 -137
- package/src/speed-dial/speed-dial.playground.ts +0 -137
- package/src/speed-dial/speed-dial.spec.ts +0 -191
- package/src/speed-dial/speed-dial.ts +0 -257
- package/src/spinner/_examples/index.ts +0 -8
- package/src/spinner/_examples/spinner.animations.example.ts +0 -54
- package/src/spinner/_examples/spinner.example.ts +0 -26
- package/src/spinner/_examples/spinner.in-button.example.ts +0 -51
- package/src/spinner/_examples/spinner.sizes.example.ts +0 -31
- package/src/spinner/_examples/spinner.usage.example.ts +0 -45
- package/src/spinner/_examples/spinner.variants.example.ts +0 -34
- package/src/spinner/index.ts +0 -1
- package/src/spinner/spinner.css +0 -161
- package/src/spinner/spinner.playground.ts +0 -68
- package/src/spinner/spinner.spec.ts +0 -184
- package/src/spinner/spinner.ts +0 -185
- package/src/stepper/_examples/index.ts +0 -8
- package/src/stepper/_examples/stepper.example.ts +0 -62
- package/src/stepper/_examples/stepper.non-linear.example.ts +0 -63
- package/src/stepper/_examples/stepper.optional-step.example.ts +0 -62
- package/src/stepper/_examples/stepper.usage.example.ts +0 -73
- package/src/stepper/_examples/stepper.vertical.example.ts +0 -66
- package/src/stepper/_examples/stepper.with-error.example.ts +0 -63
- package/src/stepper/index.ts +0 -1
- package/src/stepper/stepper.css +0 -147
- package/src/stepper/stepper.playground.ts +0 -88
- package/src/stepper/stepper.spec.ts +0 -200
- package/src/stepper/stepper.ts +0 -242
- package/src/table/_examples/index.ts +0 -23
- package/src/table/_examples/table.column-pinning.example.ts +0 -55
- package/src/table/_examples/table.column-resize.example.ts +0 -49
- package/src/table/_examples/table.column-visibility.example.ts +0 -52
- package/src/table/_examples/table.density.example.ts +0 -71
- package/src/table/_examples/table.editable.example.ts +0 -85
- package/src/table/_examples/table.empty-and-error.example.ts +0 -112
- package/src/table/_examples/table.example.ts +0 -45
- package/src/table/_examples/table.export.example.ts +0 -82
- package/src/table/_examples/table.filterable.example.ts +0 -67
- package/src/table/_examples/table.grouping.example.ts +0 -63
- package/src/table/_examples/table.keyboard.example.ts +0 -115
- package/src/table/_examples/table.master-detail.example.ts +0 -102
- package/src/table/_examples/table.persistence.example.ts +0 -85
- package/src/table/_examples/table.playground.ts +0 -154
- package/src/table/_examples/table.row-pinning.example.ts +0 -71
- package/src/table/_examples/table.selection.example.ts +0 -67
- package/src/table/_examples/table.server-mode.example.ts +0 -120
- package/src/table/_examples/table.sortable.example.ts +0 -49
- package/src/table/_examples/table.theming.example.ts +0 -64
- package/src/table/_examples/table.usage.example.ts +0 -90
- package/src/table/_examples/table.virtualized.example.ts +0 -122
- package/src/table/index.ts +0 -11
- package/src/table/table-cell-editor-outlet.ts +0 -111
- package/src/table/table-editors/boolean-editor.ts +0 -71
- package/src/table/table-editors/date-editor.ts +0 -117
- package/src/table/table-editors/editors.spec.ts +0 -147
- package/src/table/table-editors/index.ts +0 -41
- package/src/table/table-editors/number-editor.ts +0 -89
- package/src/table/table-editors/select-editor.ts +0 -107
- package/src/table/table-editors/text-editor.ts +0 -82
- package/src/table/table-export.spec.ts +0 -33
- package/src/table/table-export.ts +0 -53
- package/src/table/table-filter-outlet.ts +0 -137
- package/src/table/table-filters/date-filter.ts +0 -122
- package/src/table/table-filters/filters.css +0 -53
- package/src/table/table-filters/filters.spec.ts +0 -277
- package/src/table/table-filters/index.ts +0 -11
- package/src/table/table-filters/number-filter.ts +0 -232
- package/src/table/table-filters/select-filter.ts +0 -129
- package/src/table/table-filters/text-filter.ts +0 -110
- package/src/table/table-pagination.spec.ts +0 -118
- package/src/table/table-pagination.ts +0 -191
- package/src/table/table-side-panel.spec.ts +0 -170
- package/src/table/table-side-panel.ts +0 -263
- package/src/table/table-status-bar.spec.ts +0 -78
- package/src/table/table-status-bar.ts +0 -70
- package/src/table/table-toolbar.spec.ts +0 -180
- package/src/table/table-toolbar.ts +0 -244
- package/src/table/table-virtual.spec.ts +0 -103
- package/src/table/table-virtual.ts +0 -180
- package/src/table/table.css +0 -468
- package/src/table/table.spec.ts +0 -175
- package/src/table/table.ts +0 -1009
- package/src/tabs/_examples/index.ts +0 -8
- package/src/tabs/_examples/tabs.controlled.example.ts +0 -59
- package/src/tabs/_examples/tabs.disabled.example.ts +0 -34
- package/src/tabs/_examples/tabs.example.ts +0 -34
- package/src/tabs/_examples/tabs.manual-activation.example.ts +0 -34
- package/src/tabs/_examples/tabs.usage.example.ts +0 -43
- package/src/tabs/_examples/tabs.vertical.example.ts +0 -33
- package/src/tabs/index.ts +0 -1
- package/src/tabs/tabs.css +0 -80
- package/src/tabs/tabs.playground.ts +0 -88
- package/src/tabs/tabs.spec.ts +0 -135
- package/src/tabs/tabs.ts +0 -204
- package/src/tag/_examples/index.ts +0 -9
- package/src/tag/_examples/tag.example.ts +0 -22
- package/src/tag/_examples/tag.list.example.ts +0 -38
- package/src/tag/_examples/tag.removable.example.ts +0 -39
- package/src/tag/_examples/tag.selectable.example.ts +0 -33
- package/src/tag/_examples/tag.sizes.example.ts +0 -25
- package/src/tag/_examples/tag.usage.example.ts +0 -62
- package/src/tag/_examples/tag.variants.example.ts +0 -29
- package/src/tag/index.ts +0 -1
- package/src/tag/tag.css +0 -167
- package/src/tag/tag.playground.ts +0 -63
- package/src/tag/tag.spec.ts +0 -153
- package/src/tag/tag.ts +0 -186
- package/src/test-setup.ts +0 -5
- package/src/textarea/_examples/index.ts +0 -8
- package/src/textarea/_examples/textarea.autoresize.example.ts +0 -37
- package/src/textarea/_examples/textarea.character-count.example.ts +0 -34
- package/src/textarea/_examples/textarea.example.ts +0 -22
- package/src/textarea/_examples/textarea.no-resize.example.ts +0 -28
- package/src/textarea/_examples/textarea.usage.example.ts +0 -50
- package/src/textarea/_examples/textarea.with-field.example.ts +0 -66
- package/src/textarea/index.ts +0 -1
- package/src/textarea/textarea.css +0 -117
- package/src/textarea/textarea.playground.ts +0 -70
- package/src/textarea/textarea.spec.ts +0 -161
- package/src/textarea/textarea.ts +0 -339
- package/src/time-picker/_examples/index.ts +0 -8
- package/src/time-picker/_examples/time-picker.12-hour.example.ts +0 -24
- package/src/time-picker/_examples/time-picker.example.ts +0 -24
- package/src/time-picker/_examples/time-picker.formatted.example.ts +0 -32
- package/src/time-picker/_examples/time-picker.range.example.ts +0 -54
- package/src/time-picker/_examples/time-picker.usage.example.ts +0 -53
- package/src/time-picker/_examples/time-picker.with-seconds.example.ts +0 -24
- package/src/time-picker/index.ts +0 -1
- package/src/time-picker/time-picker.css +0 -126
- package/src/time-picker/time-picker.playground.ts +0 -72
- package/src/time-picker/time-picker.spec.ts +0 -77
- package/src/time-picker/time-picker.ts +0 -207
- package/src/toast/_examples/index.ts +0 -7
- package/src/toast/_examples/toast.default.example.ts +0 -37
- package/src/toast/_examples/toast.dismissible.example.ts +0 -38
- package/src/toast/_examples/toast.usage.example.ts +0 -57
- package/src/toast/_examples/toast.variants.example.ts +0 -43
- package/src/toast/_examples/toast.with-action.example.ts +0 -46
- package/src/toast/index.ts +0 -1
- package/src/toast/toast.css +0 -115
- package/src/toast/toast.playground.ts +0 -61
- package/src/toast/toast.ts +0 -168
- package/src/toggle/_examples/index.ts +0 -7
- package/src/toggle/_examples/toggle.checked.example.ts +0 -20
- package/src/toggle/_examples/toggle.default.example.ts +0 -20
- package/src/toggle/_examples/toggle.disabled.example.ts +0 -26
- package/src/toggle/_examples/toggle.usage.example.ts +0 -51
- package/src/toggle/_examples/toggle.with-label.example.ts +0 -30
- package/src/toggle/index.ts +0 -1
- package/src/toggle/toggle.css +0 -123
- package/src/toggle/toggle.playground.ts +0 -65
- package/src/toggle/toggle.ts +0 -113
- package/src/tooltip/_examples/index.ts +0 -9
- package/src/tooltip/_examples/tooltip.delays.example.ts +0 -16
- package/src/tooltip/_examples/tooltip.disabled.example.ts +0 -16
- package/src/tooltip/_examples/tooltip.example.ts +0 -16
- package/src/tooltip/_examples/tooltip.group.example.ts +0 -20
- package/src/tooltip/_examples/tooltip.rich.example.ts +0 -19
- package/src/tooltip/_examples/tooltip.sides.example.ts +0 -18
- package/src/tooltip/_examples/tooltip.usage.example.ts +0 -50
- package/src/tooltip/index.ts +0 -1
- package/src/tooltip/tooltip.css +0 -61
- package/src/tooltip/tooltip.playground.ts +0 -79
- package/src/tooltip/tooltip.spec.ts +0 -5
- package/src/tooltip/tooltip.ts +0 -102
- package/src/tree-select/_examples/index.ts +0 -8
- package/src/tree-select/_examples/tree-select.disabled.example.ts +0 -106
- package/src/tree-select/_examples/tree-select.example.ts +0 -65
- package/src/tree-select/_examples/tree-select.expanded.example.ts +0 -72
- package/src/tree-select/_examples/tree-select.field.example.ts +0 -77
- package/src/tree-select/_examples/tree-select.multi.example.ts +0 -73
- package/src/tree-select/_examples/tree-select.usage.example.ts +0 -85
- package/src/tree-select/index.ts +0 -1
- package/src/tree-select/tree-select.css +0 -220
- package/src/tree-select/tree-select.playground.ts +0 -83
- package/src/tree-select/tree-select.ts +0 -348
- package/src/typography/_examples/index.ts +0 -9
- package/src/typography/_examples/typography.blockquote.example.ts +0 -34
- package/src/typography/_examples/typography.code.example.ts +0 -32
- package/src/typography/_examples/typography.example.ts +0 -42
- package/src/typography/_examples/typography.lead.example.ts +0 -37
- package/src/typography/_examples/typography.muted.example.ts +0 -27
- package/src/typography/_examples/typography.truncate.example.ts +0 -41
- package/src/typography/_examples/typography.usage.example.ts +0 -44
- package/src/typography/index.ts +0 -8
- package/src/typography/typography.playground.ts +0 -101
- package/src/typography/typography.spec.ts +0 -70
- package/src/typography/typography.ts +0 -105
- package/tsconfig.lib.json +0 -25
- package/tsconfig.lib.prod.json +0 -17
- package/tsconfig.spec.json +0 -16
- package/vite.config.ts +0 -33
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { Component, ChangeDetectionStrategy } from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
KjCarouselComponent,
|
|
4
|
-
KjCarouselViewportComponent,
|
|
5
|
-
KjCarouselSlideComponent,
|
|
6
|
-
KjCarouselPreviousComponent,
|
|
7
|
-
KjCarouselNextComponent,
|
|
8
|
-
KjCarouselIndicatorsComponent,
|
|
9
|
-
KjCarouselAutoplayComponent,
|
|
10
|
-
KjCarouselPauseComponent,
|
|
11
|
-
} from '../carousel';
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Autoplay with the WCAG 2.2.2-required pause control. Delay is set to 6000 ms
|
|
15
|
-
* (over the 5-second threshold), so the pause button is mandatory. Hover and
|
|
16
|
-
* focus auto-pause are on by default; under
|
|
17
|
-
* `prefers-reduced-motion: reduce` autoplay never starts and the pause button
|
|
18
|
-
* is rendered disabled.
|
|
19
|
-
*/
|
|
20
|
-
@Component({
|
|
21
|
-
selector: 'kj-carousel-autoplay-example',
|
|
22
|
-
standalone: true,
|
|
23
|
-
imports: [
|
|
24
|
-
KjCarouselComponent,
|
|
25
|
-
KjCarouselViewportComponent,
|
|
26
|
-
KjCarouselSlideComponent,
|
|
27
|
-
KjCarouselPreviousComponent,
|
|
28
|
-
KjCarouselNextComponent,
|
|
29
|
-
KjCarouselIndicatorsComponent,
|
|
30
|
-
KjCarouselAutoplayComponent,
|
|
31
|
-
KjCarouselPauseComponent,
|
|
32
|
-
],
|
|
33
|
-
styles: [
|
|
34
|
-
`
|
|
35
|
-
:host {
|
|
36
|
-
display: block;
|
|
37
|
-
}
|
|
38
|
-
.slide {
|
|
39
|
-
display: grid;
|
|
40
|
-
place-items: center;
|
|
41
|
-
min-height: 12rem;
|
|
42
|
-
font-weight: 600;
|
|
43
|
-
font-size: 1.125rem;
|
|
44
|
-
}
|
|
45
|
-
`,
|
|
46
|
-
],
|
|
47
|
-
changeDetection: ChangeDetectionStrategy.Eager,
|
|
48
|
-
template: `
|
|
49
|
-
<kj-carousel label="Latest news">
|
|
50
|
-
<kj-carousel-autoplay [delay]="6000" />
|
|
51
|
-
<kj-carousel-previous aria-label="Previous slide" />
|
|
52
|
-
<kj-carousel-viewport>
|
|
53
|
-
<kj-carousel-slide value="release" label="0.1 release"
|
|
54
|
-
><div class="slide">0.1 release</div></kj-carousel-slide
|
|
55
|
-
>
|
|
56
|
-
<kj-carousel-slide value="roadmap" label="Roadmap update"
|
|
57
|
-
><div class="slide">Roadmap update</div></kj-carousel-slide
|
|
58
|
-
>
|
|
59
|
-
<kj-carousel-slide value="hiring" label="We are hiring"
|
|
60
|
-
><div class="slide">We are hiring</div></kj-carousel-slide
|
|
61
|
-
>
|
|
62
|
-
</kj-carousel-viewport>
|
|
63
|
-
<kj-carousel-next aria-label="Next slide" />
|
|
64
|
-
<kj-carousel-indicators />
|
|
65
|
-
<kj-carousel-pause aria-label="Pause carousel" />
|
|
66
|
-
</kj-carousel>
|
|
67
|
-
`,
|
|
68
|
-
})
|
|
69
|
-
export class KjCarouselAutoplayExample {}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { Component, ChangeDetectionStrategy } from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
KjCarouselComponent,
|
|
4
|
-
KjCarouselViewportComponent,
|
|
5
|
-
KjCarouselSlideComponent,
|
|
6
|
-
KjCarouselPreviousComponent,
|
|
7
|
-
KjCarouselNextComponent,
|
|
8
|
-
} from '../carousel';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Default carousel example — four slides, manual previous / next controls,
|
|
12
|
-
* no autoplay. Anchors the simplest correct usage and the API for screenshots.
|
|
13
|
-
*/
|
|
14
|
-
@Component({
|
|
15
|
-
selector: 'kj-carousel-example',
|
|
16
|
-
standalone: true,
|
|
17
|
-
imports: [
|
|
18
|
-
KjCarouselComponent,
|
|
19
|
-
KjCarouselViewportComponent,
|
|
20
|
-
KjCarouselSlideComponent,
|
|
21
|
-
KjCarouselPreviousComponent,
|
|
22
|
-
KjCarouselNextComponent,
|
|
23
|
-
],
|
|
24
|
-
styles: [
|
|
25
|
-
`
|
|
26
|
-
:host {
|
|
27
|
-
display: block;
|
|
28
|
-
}
|
|
29
|
-
.slide {
|
|
30
|
-
display: grid;
|
|
31
|
-
place-items: center;
|
|
32
|
-
min-height: 12rem;
|
|
33
|
-
font-weight: 600;
|
|
34
|
-
font-size: 1.125rem;
|
|
35
|
-
}
|
|
36
|
-
`,
|
|
37
|
-
],
|
|
38
|
-
changeDetection: ChangeDetectionStrategy.Eager,
|
|
39
|
-
template: `
|
|
40
|
-
<kj-carousel label="Featured destinations">
|
|
41
|
-
<kj-carousel-previous aria-label="Previous slide" />
|
|
42
|
-
<kj-carousel-viewport>
|
|
43
|
-
<kj-carousel-slide value="alps" label="The Alps">
|
|
44
|
-
<div class="slide">The Alps</div>
|
|
45
|
-
</kj-carousel-slide>
|
|
46
|
-
<kj-carousel-slide value="andes" label="The Andes">
|
|
47
|
-
<div class="slide">The Andes</div>
|
|
48
|
-
</kj-carousel-slide>
|
|
49
|
-
<kj-carousel-slide value="atlas" label="The Atlas">
|
|
50
|
-
<div class="slide">The Atlas</div>
|
|
51
|
-
</kj-carousel-slide>
|
|
52
|
-
<kj-carousel-slide value="dolomites" label="The Dolomites">
|
|
53
|
-
<div class="slide">The Dolomites</div>
|
|
54
|
-
</kj-carousel-slide>
|
|
55
|
-
</kj-carousel-viewport>
|
|
56
|
-
<kj-carousel-next aria-label="Next slide" />
|
|
57
|
-
</kj-carousel>
|
|
58
|
-
`,
|
|
59
|
-
})
|
|
60
|
-
export class KjCarouselExample {}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { Component, ChangeDetectionStrategy } from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
KjCarouselComponent,
|
|
4
|
-
KjCarouselViewportComponent,
|
|
5
|
-
KjCarouselSlideComponent,
|
|
6
|
-
KjCarouselPreviousComponent,
|
|
7
|
-
KjCarouselNextComponent,
|
|
8
|
-
KjCarouselIndicatorsComponent,
|
|
9
|
-
} from '../carousel';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Carousel with auto-projected dot indicators in `buttons` control mode —
|
|
13
|
-
* `aria-current="true"` marks the active dot. Tab focuses the indicator
|
|
14
|
-
* group as a single tab stop; arrow keys move between dots.
|
|
15
|
-
*/
|
|
16
|
-
@Component({
|
|
17
|
-
selector: 'kj-carousel-indicators-example',
|
|
18
|
-
standalone: true,
|
|
19
|
-
imports: [
|
|
20
|
-
KjCarouselComponent,
|
|
21
|
-
KjCarouselViewportComponent,
|
|
22
|
-
KjCarouselSlideComponent,
|
|
23
|
-
KjCarouselPreviousComponent,
|
|
24
|
-
KjCarouselNextComponent,
|
|
25
|
-
KjCarouselIndicatorsComponent,
|
|
26
|
-
],
|
|
27
|
-
styles: [
|
|
28
|
-
`
|
|
29
|
-
:host {
|
|
30
|
-
display: block;
|
|
31
|
-
}
|
|
32
|
-
.slide {
|
|
33
|
-
display: grid;
|
|
34
|
-
place-items: center;
|
|
35
|
-
min-height: 12rem;
|
|
36
|
-
font-weight: 600;
|
|
37
|
-
font-size: 1.125rem;
|
|
38
|
-
}
|
|
39
|
-
`,
|
|
40
|
-
],
|
|
41
|
-
changeDetection: ChangeDetectionStrategy.Eager,
|
|
42
|
-
template: `
|
|
43
|
-
<kj-carousel label="Trip ideas">
|
|
44
|
-
<kj-carousel-previous aria-label="Previous slide" />
|
|
45
|
-
<kj-carousel-viewport>
|
|
46
|
-
<kj-carousel-slide value="city" label="City breaks"
|
|
47
|
-
><div class="slide">City breaks</div></kj-carousel-slide
|
|
48
|
-
>
|
|
49
|
-
<kj-carousel-slide value="beach" label="Beach weeks"
|
|
50
|
-
><div class="slide">Beach weeks</div></kj-carousel-slide
|
|
51
|
-
>
|
|
52
|
-
<kj-carousel-slide value="mountain" label="Mountain hikes"
|
|
53
|
-
><div class="slide">Mountain hikes</div></kj-carousel-slide
|
|
54
|
-
>
|
|
55
|
-
<kj-carousel-slide value="culture" label="Culture trails"
|
|
56
|
-
><div class="slide">Culture trails</div></kj-carousel-slide
|
|
57
|
-
>
|
|
58
|
-
</kj-carousel-viewport>
|
|
59
|
-
<kj-carousel-next aria-label="Next slide" />
|
|
60
|
-
<kj-carousel-indicators ariaLabel="Trip slide controls" />
|
|
61
|
-
</kj-carousel>
|
|
62
|
-
`,
|
|
63
|
-
})
|
|
64
|
-
export class KjCarouselIndicatorsExample {}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { Component, ChangeDetectionStrategy } from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
KjCarouselComponent,
|
|
4
|
-
KjCarouselViewportComponent,
|
|
5
|
-
KjCarouselSlideComponent,
|
|
6
|
-
KjCarouselPreviousComponent,
|
|
7
|
-
KjCarouselNextComponent,
|
|
8
|
-
KjCarouselIndicatorsComponent,
|
|
9
|
-
} from '../carousel';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Carousel of images with native `loading="lazy"` for each non-current slide.
|
|
13
|
-
* The first slide loads eagerly so the initial paint sees a real image; the
|
|
14
|
-
* rest defer until they enter the viewport, keeping the initial payload small
|
|
15
|
-
* for hero rotators with many slides.
|
|
16
|
-
*/
|
|
17
|
-
@Component({
|
|
18
|
-
selector: 'kj-carousel-lazy-load-example',
|
|
19
|
-
standalone: true,
|
|
20
|
-
imports: [
|
|
21
|
-
KjCarouselComponent,
|
|
22
|
-
KjCarouselViewportComponent,
|
|
23
|
-
KjCarouselSlideComponent,
|
|
24
|
-
KjCarouselPreviousComponent,
|
|
25
|
-
KjCarouselNextComponent,
|
|
26
|
-
KjCarouselIndicatorsComponent,
|
|
27
|
-
],
|
|
28
|
-
styles: [
|
|
29
|
-
`
|
|
30
|
-
:host {
|
|
31
|
-
display: block;
|
|
32
|
-
}
|
|
33
|
-
img {
|
|
34
|
-
width: 100%;
|
|
35
|
-
height: 16rem;
|
|
36
|
-
object-fit: cover;
|
|
37
|
-
border-radius: var(--kj-radius-box);
|
|
38
|
-
}
|
|
39
|
-
`,
|
|
40
|
-
],
|
|
41
|
-
changeDetection: ChangeDetectionStrategy.Eager,
|
|
42
|
-
template: `
|
|
43
|
-
<kj-carousel label="Image gallery">
|
|
44
|
-
<kj-carousel-previous aria-label="Previous slide" />
|
|
45
|
-
<kj-carousel-viewport>
|
|
46
|
-
@for (item of items; track item.id; let first = $first) {
|
|
47
|
-
<kj-carousel-slide [value]="item.id" [label]="item.alt">
|
|
48
|
-
<img
|
|
49
|
-
[src]="item.src"
|
|
50
|
-
[alt]="item.alt"
|
|
51
|
-
[attr.loading]="first ? 'eager' : 'lazy'"
|
|
52
|
-
decoding="async"
|
|
53
|
-
/>
|
|
54
|
-
</kj-carousel-slide>
|
|
55
|
-
}
|
|
56
|
-
</kj-carousel-viewport>
|
|
57
|
-
<kj-carousel-next aria-label="Next slide" />
|
|
58
|
-
<kj-carousel-indicators />
|
|
59
|
-
</kj-carousel>
|
|
60
|
-
`,
|
|
61
|
-
})
|
|
62
|
-
export class KjCarouselLazyLoadExample {
|
|
63
|
-
readonly items = [
|
|
64
|
-
{
|
|
65
|
-
id: 'meadow',
|
|
66
|
-
src: 'https://placehold.co/800x400/png?text=Meadow',
|
|
67
|
-
alt: 'Mountain meadow at dusk',
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
id: 'lake',
|
|
71
|
-
src: 'https://placehold.co/800x400/png?text=Lake',
|
|
72
|
-
alt: 'Alpine lake under cloud',
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
id: 'glacier',
|
|
76
|
-
src: 'https://placehold.co/800x400/png?text=Glacier',
|
|
77
|
-
alt: 'Glacier ridge at dawn',
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
id: 'forest',
|
|
81
|
-
src: 'https://placehold.co/800x400/png?text=Forest',
|
|
82
|
-
alt: 'Pine forest in winter',
|
|
83
|
-
},
|
|
84
|
-
];
|
|
85
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { Component, ChangeDetectionStrategy } from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
KjCarouselComponent,
|
|
4
|
-
KjCarouselViewportComponent,
|
|
5
|
-
KjCarouselSlideComponent,
|
|
6
|
-
KjCarouselPreviousComponent,
|
|
7
|
-
KjCarouselNextComponent,
|
|
8
|
-
KjCarouselIndicatorsComponent,
|
|
9
|
-
} from '../carousel';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Tabbed carousel — `<kj-carousel-indicators controlPattern="tabs">` flips
|
|
13
|
-
* the indicator group into a `role="tablist"` and the slides into
|
|
14
|
-
* `role="tabpanel"`s; the dots become `role="tab"` with `aria-selected` on
|
|
15
|
-
* the active one and `aria-controls` wired to the slide id. Arrow keys on a
|
|
16
|
-
* focused tab activate (per APG tabs pattern).
|
|
17
|
-
*/
|
|
18
|
-
@Component({
|
|
19
|
-
selector: 'kj-carousel-tabs-pattern-example',
|
|
20
|
-
standalone: true,
|
|
21
|
-
imports: [
|
|
22
|
-
KjCarouselComponent,
|
|
23
|
-
KjCarouselViewportComponent,
|
|
24
|
-
KjCarouselSlideComponent,
|
|
25
|
-
KjCarouselPreviousComponent,
|
|
26
|
-
KjCarouselNextComponent,
|
|
27
|
-
KjCarouselIndicatorsComponent,
|
|
28
|
-
],
|
|
29
|
-
styles: [
|
|
30
|
-
`
|
|
31
|
-
:host {
|
|
32
|
-
display: block;
|
|
33
|
-
}
|
|
34
|
-
.slide {
|
|
35
|
-
display: grid;
|
|
36
|
-
place-items: center;
|
|
37
|
-
min-height: 12rem;
|
|
38
|
-
font-weight: 600;
|
|
39
|
-
font-size: 1.125rem;
|
|
40
|
-
}
|
|
41
|
-
`,
|
|
42
|
-
],
|
|
43
|
-
changeDetection: ChangeDetectionStrategy.Eager,
|
|
44
|
-
template: `
|
|
45
|
-
<kj-carousel label="Product overview">
|
|
46
|
-
<kj-carousel-previous aria-label="Previous slide" />
|
|
47
|
-
<kj-carousel-viewport>
|
|
48
|
-
<kj-carousel-slide value="overview" label="Overview"
|
|
49
|
-
><div class="slide">Overview</div></kj-carousel-slide
|
|
50
|
-
>
|
|
51
|
-
<kj-carousel-slide value="pricing" label="Pricing"
|
|
52
|
-
><div class="slide">Pricing</div></kj-carousel-slide
|
|
53
|
-
>
|
|
54
|
-
<kj-carousel-slide value="faq" label="FAQ"><div class="slide">FAQ</div></kj-carousel-slide>
|
|
55
|
-
</kj-carousel-viewport>
|
|
56
|
-
<kj-carousel-next aria-label="Next slide" />
|
|
57
|
-
<kj-carousel-indicators controlPattern="tabs" ariaLabel="Sections" />
|
|
58
|
-
</kj-carousel>
|
|
59
|
-
`,
|
|
60
|
-
})
|
|
61
|
-
export class KjCarouselTabsPatternExample {}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
// AUTO-GENERATED by scripts/migrate-examples.mjs
|
|
2
|
-
// One barrel per component folder — used by the docs app as a lazy chunk.
|
|
3
|
-
export { KjCarouselAutoplayExample } from './carousel.autoplay.example';
|
|
4
|
-
export { KjCarouselExample } from './carousel.example';
|
|
5
|
-
export { KjCarouselIndicatorsExample } from './carousel.indicators.example';
|
|
6
|
-
export { KjCarouselLazyLoadExample } from './carousel.lazy-load.example';
|
|
7
|
-
export { KjCarouselTabsPatternExample } from './carousel.tabs-pattern.example';
|
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
@layer kj.component {
|
|
2
|
-
.kj-carousel {
|
|
3
|
-
--kj-carousel-gap: var(--kj-space-md);
|
|
4
|
-
--kj-carousel-radius: var(--kj-radius-box);
|
|
5
|
-
--kj-carousel-control-size: 44px;
|
|
6
|
-
--kj-carousel-control-bg: var(--kj-bg-body);
|
|
7
|
-
--kj-carousel-control-fg: var(--kj-fg-default);
|
|
8
|
-
--kj-carousel-indicator-size: 10px;
|
|
9
|
-
--kj-carousel-indicator-active: var(--kj-bg-primary);
|
|
10
|
-
--kj-carousel-indicator-idle: var(--kj-bg-field);
|
|
11
|
-
|
|
12
|
-
position: relative;
|
|
13
|
-
display: grid;
|
|
14
|
-
grid-template-columns: auto 1fr auto;
|
|
15
|
-
grid-template-rows: 1fr auto;
|
|
16
|
-
gap: var(--kj-carousel-gap);
|
|
17
|
-
align-items: center;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.kj-carousel[data-orientation="vertical"] {
|
|
21
|
-
grid-template-columns: 1fr auto;
|
|
22
|
-
grid-template-rows: auto 1fr auto auto;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.kj-carousel-viewport {
|
|
26
|
-
grid-column: 2;
|
|
27
|
-
grid-row: 1;
|
|
28
|
-
display: flex;
|
|
29
|
-
flex-direction: row;
|
|
30
|
-
overflow-x: auto;
|
|
31
|
-
overflow-y: hidden;
|
|
32
|
-
scroll-snap-type: x mandatory;
|
|
33
|
-
scrollbar-width: none;
|
|
34
|
-
border-radius: var(--kj-carousel-radius);
|
|
35
|
-
gap: var(--kj-carousel-gap);
|
|
36
|
-
scroll-behavior: smooth;
|
|
37
|
-
}
|
|
38
|
-
.kj-carousel-viewport::-webkit-scrollbar { display: none; }
|
|
39
|
-
|
|
40
|
-
.kj-carousel[data-orientation="vertical"] .kj-carousel-viewport {
|
|
41
|
-
flex-direction: column;
|
|
42
|
-
overflow-x: hidden;
|
|
43
|
-
overflow-y: auto;
|
|
44
|
-
scroll-snap-type: y mandatory;
|
|
45
|
-
grid-column: 1;
|
|
46
|
-
grid-row: 2;
|
|
47
|
-
/* Grid items default to `min-height: auto`, which lets the viewport
|
|
48
|
-
grow past its `1fr` row when slides are taller than the share —
|
|
49
|
-
defeating the scroll-snap container. Pin to 0 so the row's
|
|
50
|
-
fraction actually constrains the viewport height. */
|
|
51
|
-
min-height: 0;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.kj-carousel-slide {
|
|
55
|
-
flex: 0 0 calc(100% / var(--kj-carousel-slides-per-view, 1));
|
|
56
|
-
scroll-snap-align: start;
|
|
57
|
-
scroll-snap-stop: always;
|
|
58
|
-
border-radius: var(--kj-carousel-radius);
|
|
59
|
-
background: var(--kj-bg-body);
|
|
60
|
-
color: var(--kj-fg-default);
|
|
61
|
-
padding: var(--kj-space-lg);
|
|
62
|
-
min-height: 0;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.kj-carousel-slide[data-align="center"] { scroll-snap-align: center; }
|
|
66
|
-
.kj-carousel-slide[data-align="end"] { scroll-snap-align: end; }
|
|
67
|
-
|
|
68
|
-
.kj-carousel-control {
|
|
69
|
-
grid-row: 1;
|
|
70
|
-
width: var(--kj-carousel-control-size);
|
|
71
|
-
height: var(--kj-carousel-control-size);
|
|
72
|
-
min-width: var(--kj-carousel-control-size);
|
|
73
|
-
min-height: var(--kj-carousel-control-size);
|
|
74
|
-
border-radius: 50%;
|
|
75
|
-
border: var(--kj-border) solid var(--kj-border-default);
|
|
76
|
-
background: var(--kj-carousel-control-bg);
|
|
77
|
-
color: var(--kj-carousel-control-fg);
|
|
78
|
-
cursor: pointer;
|
|
79
|
-
display: inline-flex;
|
|
80
|
-
align-items: center;
|
|
81
|
-
justify-content: center;
|
|
82
|
-
font: 1rem var(--kj-font-sans);
|
|
83
|
-
transition: var(--kj-transition);
|
|
84
|
-
}
|
|
85
|
-
.kj-carousel-control:hover { background: var(--kj-bg-surface); }
|
|
86
|
-
.kj-carousel-control:focus-visible {
|
|
87
|
-
outline: 2px solid var(--kj-border-focus);
|
|
88
|
-
outline-offset: 2px;
|
|
89
|
-
}
|
|
90
|
-
.kj-carousel-control[aria-disabled="true"] {
|
|
91
|
-
opacity: 0.4;
|
|
92
|
-
cursor: not-allowed;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.kj-carousel-previous { grid-column: 1; }
|
|
96
|
-
.kj-carousel-next { grid-column: 3; }
|
|
97
|
-
|
|
98
|
-
.kj-carousel[data-orientation="vertical"] .kj-carousel-previous { grid-column: 1; grid-row: 1; }
|
|
99
|
-
.kj-carousel[data-orientation="vertical"] .kj-carousel-next { grid-column: 1; grid-row: 3; }
|
|
100
|
-
|
|
101
|
-
.kj-carousel-indicators {
|
|
102
|
-
grid-column: 2;
|
|
103
|
-
grid-row: 2;
|
|
104
|
-
display: inline-flex;
|
|
105
|
-
gap: var(--kj-space-sm);
|
|
106
|
-
align-items: center;
|
|
107
|
-
justify-content: center;
|
|
108
|
-
padding: var(--kj-space-sm) 0;
|
|
109
|
-
}
|
|
110
|
-
.kj-carousel[data-orientation="vertical"] .kj-carousel-indicators {
|
|
111
|
-
grid-column: 1;
|
|
112
|
-
grid-row: 4;
|
|
113
|
-
flex-direction: row;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.kj-carousel-indicator {
|
|
117
|
-
width: var(--kj-carousel-indicator-size);
|
|
118
|
-
height: var(--kj-carousel-indicator-size);
|
|
119
|
-
min-width: 44px;
|
|
120
|
-
min-height: 44px;
|
|
121
|
-
padding: 0;
|
|
122
|
-
border: 0;
|
|
123
|
-
background: transparent;
|
|
124
|
-
cursor: pointer;
|
|
125
|
-
position: relative;
|
|
126
|
-
display: inline-flex;
|
|
127
|
-
align-items: center;
|
|
128
|
-
justify-content: center;
|
|
129
|
-
}
|
|
130
|
-
.kj-carousel-indicator::before {
|
|
131
|
-
content: '';
|
|
132
|
-
width: var(--kj-carousel-indicator-size);
|
|
133
|
-
height: var(--kj-carousel-indicator-size);
|
|
134
|
-
border-radius: 50%;
|
|
135
|
-
background: var(--kj-carousel-indicator-idle);
|
|
136
|
-
transition: var(--kj-transition);
|
|
137
|
-
}
|
|
138
|
-
.kj-carousel-indicator[aria-current="true"]::before,
|
|
139
|
-
.kj-carousel-indicator[aria-selected="true"]::before {
|
|
140
|
-
background: var(--kj-carousel-indicator-active);
|
|
141
|
-
transform: scale(1.25);
|
|
142
|
-
}
|
|
143
|
-
.kj-carousel-indicator:focus-visible {
|
|
144
|
-
outline: 2px solid var(--kj-border-focus);
|
|
145
|
-
outline-offset: 2px;
|
|
146
|
-
border-radius: 50%;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.kj-carousel-pause {
|
|
150
|
-
grid-column: 3;
|
|
151
|
-
grid-row: 2;
|
|
152
|
-
width: var(--kj-carousel-control-size);
|
|
153
|
-
height: var(--kj-carousel-control-size);
|
|
154
|
-
border-radius: 50%;
|
|
155
|
-
border: var(--kj-border) solid var(--kj-border-default);
|
|
156
|
-
background: var(--kj-carousel-control-bg);
|
|
157
|
-
color: var(--kj-carousel-control-fg);
|
|
158
|
-
cursor: pointer;
|
|
159
|
-
display: inline-flex;
|
|
160
|
-
align-items: center;
|
|
161
|
-
justify-content: center;
|
|
162
|
-
font: 1rem var(--kj-font-sans);
|
|
163
|
-
}
|
|
164
|
-
.kj-carousel-pause:focus-visible {
|
|
165
|
-
outline: 2px solid var(--kj-border-focus);
|
|
166
|
-
outline-offset: 2px;
|
|
167
|
-
}
|
|
168
|
-
.kj-carousel-pause[aria-pressed="true"] {
|
|
169
|
-
background: var(--kj-bg-primary);
|
|
170
|
-
color: var(--kj-fg-on-primary);
|
|
171
|
-
}
|
|
172
|
-
.kj-carousel-pause[disabled] {
|
|
173
|
-
opacity: 0.4;
|
|
174
|
-
cursor: not-allowed;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
@media (prefers-reduced-motion: reduce) {
|
|
178
|
-
.kj-carousel-viewport { scroll-behavior: auto; }
|
|
179
|
-
.kj-carousel-indicator::before { transition: none; }
|
|
180
|
-
}
|
|
181
|
-
}
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, signal } from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
KjCarouselComponent,
|
|
4
|
-
KjCarouselIndicatorsComponent,
|
|
5
|
-
KjCarouselNextComponent,
|
|
6
|
-
KjCarouselPreviousComponent,
|
|
7
|
-
KjCarouselSlideComponent,
|
|
8
|
-
KjCarouselViewportComponent,
|
|
9
|
-
} from './carousel';
|
|
10
|
-
import type { PlaygroundFile } from '@kouji-ui/components/playground-types';
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Playground state — module-scope signals. Tunes the active slide, slide
|
|
14
|
-
* count, loop behaviour, orientation, and the indicator track so the
|
|
15
|
-
* navigation surface area is fully covered.
|
|
16
|
-
*/
|
|
17
|
-
const active = signal<'alps' | 'andes' | 'atlas' | 'rockies'>('alps');
|
|
18
|
-
const slideCount = signal<3 | 4>(3);
|
|
19
|
-
const loop = signal(false);
|
|
20
|
-
const orientation = signal<'horizontal' | 'vertical'>('horizontal');
|
|
21
|
-
const showIndicators = signal(true);
|
|
22
|
-
|
|
23
|
-
const SLIDES: ReadonlyArray<{ value: string; label: string }> = [
|
|
24
|
-
{ value: 'alps', label: 'The Alps' },
|
|
25
|
-
{ value: 'andes', label: 'The Andes' },
|
|
26
|
-
{ value: 'atlas', label: 'The Atlas' },
|
|
27
|
-
{ value: 'rockies', label: 'The Rockies' },
|
|
28
|
-
];
|
|
29
|
-
|
|
30
|
-
@Component({
|
|
31
|
-
selector: 'kj-carousel-playground',
|
|
32
|
-
standalone: true,
|
|
33
|
-
imports: [
|
|
34
|
-
KjCarouselComponent,
|
|
35
|
-
KjCarouselViewportComponent,
|
|
36
|
-
KjCarouselSlideComponent,
|
|
37
|
-
KjCarouselPreviousComponent,
|
|
38
|
-
KjCarouselNextComponent,
|
|
39
|
-
KjCarouselIndicatorsComponent,
|
|
40
|
-
],
|
|
41
|
-
styles: [`
|
|
42
|
-
:host { display: block; }
|
|
43
|
-
.slide { display: grid; place-items: center; min-height: 10rem; font-weight: 600; font-size: 1.125rem; }
|
|
44
|
-
/* Vertical orientation: the host carousel CSS uses
|
|
45
|
-
grid-template-rows: auto 1fr auto auto with the viewport in the
|
|
46
|
-
1fr row, so the parent needs an explicit height — otherwise 1fr
|
|
47
|
-
collapses to 0 and the viewport disappears. */
|
|
48
|
-
kj-carousel[data-orientation="vertical"] { height: 22rem; }
|
|
49
|
-
kj-carousel[data-orientation="vertical"] .slide { min-height: 8rem; }
|
|
50
|
-
`],
|
|
51
|
-
template: `
|
|
52
|
-
<kj-carousel
|
|
53
|
-
label="Featured destinations"
|
|
54
|
-
[(value)]="active"
|
|
55
|
-
[loop]="loop()"
|
|
56
|
-
[orientation]="orientation()"
|
|
57
|
-
>
|
|
58
|
-
<kj-carousel-previous aria-label="Previous slide" />
|
|
59
|
-
<kj-carousel-viewport>
|
|
60
|
-
@for (slide of visibleSlides(); track slide.value) {
|
|
61
|
-
<kj-carousel-slide [value]="slide.value" [label]="slide.label">
|
|
62
|
-
<div class="slide">{{ slide.label }}</div>
|
|
63
|
-
</kj-carousel-slide>
|
|
64
|
-
}
|
|
65
|
-
</kj-carousel-viewport>
|
|
66
|
-
<kj-carousel-next aria-label="Next slide" />
|
|
67
|
-
@if (showIndicators()) {
|
|
68
|
-
<kj-carousel-indicators />
|
|
69
|
-
}
|
|
70
|
-
</kj-carousel>
|
|
71
|
-
`,
|
|
72
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
73
|
-
})
|
|
74
|
-
export class KjCarouselPlaygroundDemo {
|
|
75
|
-
protected readonly active = active;
|
|
76
|
-
protected readonly slideCount = slideCount;
|
|
77
|
-
protected readonly loop = loop;
|
|
78
|
-
protected readonly orientation = orientation;
|
|
79
|
-
protected readonly showIndicators = showIndicators;
|
|
80
|
-
|
|
81
|
-
protected visibleSlides(): typeof SLIDES {
|
|
82
|
-
return SLIDES.slice(0, slideCount());
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
export const PLAYGROUND: PlaygroundFile = {
|
|
87
|
-
component: KjCarouselPlaygroundDemo,
|
|
88
|
-
state: {
|
|
89
|
-
active: active as unknown as ReturnType<typeof signal>,
|
|
90
|
-
slideCount: slideCount as unknown as ReturnType<typeof signal>,
|
|
91
|
-
loop: loop as unknown as ReturnType<typeof signal>,
|
|
92
|
-
orientation: orientation as unknown as ReturnType<typeof signal>,
|
|
93
|
-
showIndicators: showIndicators as unknown as ReturnType<typeof signal>,
|
|
94
|
-
},
|
|
95
|
-
controls: [
|
|
96
|
-
{
|
|
97
|
-
kind: 'chips',
|
|
98
|
-
name: 'active',
|
|
99
|
-
label: 'active',
|
|
100
|
-
options: ['alps', 'andes', 'atlas', 'rockies'],
|
|
101
|
-
},
|
|
102
|
-
{ kind: 'chips', name: 'slideCount', label: 'slides', options: [3, 4] },
|
|
103
|
-
{
|
|
104
|
-
kind: 'chips',
|
|
105
|
-
name: 'orientation',
|
|
106
|
-
label: 'orientation',
|
|
107
|
-
options: ['horizontal', 'vertical'],
|
|
108
|
-
},
|
|
109
|
-
{ kind: 'toggle', name: 'loop', label: 'loop' },
|
|
110
|
-
{ kind: 'toggle', name: 'showIndicators', label: 'indicators' },
|
|
111
|
-
],
|
|
112
|
-
snippet: (values) => {
|
|
113
|
-
const s = values as {
|
|
114
|
-
active: string;
|
|
115
|
-
slideCount: number;
|
|
116
|
-
loop: boolean;
|
|
117
|
-
orientation: string;
|
|
118
|
-
showIndicators: boolean;
|
|
119
|
-
};
|
|
120
|
-
const attrs: string[] = [
|
|
121
|
-
'label="Featured destinations"',
|
|
122
|
-
`value="${s.active}"`,
|
|
123
|
-
`orientation="${s.orientation}"`,
|
|
124
|
-
];
|
|
125
|
-
if (s.loop) attrs.push('[loop]="true"');
|
|
126
|
-
const slides = SLIDES.slice(0, s.slideCount)
|
|
127
|
-
.map(
|
|
128
|
-
(slide) =>
|
|
129
|
-
` <kj-carousel-slide value="${slide.value}" label="${slide.label}">\n <div class="slide">${slide.label}</div>\n </kj-carousel-slide>`,
|
|
130
|
-
)
|
|
131
|
-
.join('\n');
|
|
132
|
-
const indicators = s.showIndicators ? '\n <kj-carousel-indicators />' : '';
|
|
133
|
-
return `<kj-carousel\n ${attrs.join('\n ')}\n>\n <kj-carousel-previous aria-label="Previous slide" />\n <kj-carousel-viewport>\n${slides}\n </kj-carousel-viewport>\n <kj-carousel-next aria-label="Next slide" />${indicators}\n</kj-carousel>`;
|
|
134
|
-
},
|
|
135
|
-
};
|