@kouji-ui/components 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/kouji-ui-components.mjs +17668 -0
- package/fesm2022/kouji-ui-components.mjs.map +1 -0
- package/package.json +17 -10
- 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
package/src/combobox/combobox.ts
DELETED
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ChangeDetectionStrategy,
|
|
3
|
-
Component,
|
|
4
|
-
ViewEncapsulation,
|
|
5
|
-
booleanAttribute,
|
|
6
|
-
inject,
|
|
7
|
-
input,
|
|
8
|
-
} from '@angular/core';
|
|
9
|
-
import {
|
|
10
|
-
KjCombobox,
|
|
11
|
-
KjComboboxInput,
|
|
12
|
-
KjComboboxListbox,
|
|
13
|
-
KjComboboxOption,
|
|
14
|
-
} from '@kouji-ui/core';
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Combobox / autocomplete root component.
|
|
18
|
-
*
|
|
19
|
-
* A typeable input bound to a filterable listbox. The default mode runs a
|
|
20
|
-
* synchronous case-insensitive substring filter against the projected
|
|
21
|
-
* `<kj-combobox-option>` children. Set `[shouldFilter]="false"` and bind
|
|
22
|
-
* `(queryChange)` for async / consumer-driven flows. Set `[freeText]="true"`
|
|
23
|
-
* to let the user commit arbitrary typed values that are not in the option
|
|
24
|
-
* set (e.g. a tags input).
|
|
25
|
-
*
|
|
26
|
-
* @doc-example Default — country picker
|
|
27
|
-
* Country picker with built-in synchronous substring filtering.
|
|
28
|
-
* @doc-file combobox.example.ts
|
|
29
|
-
* @doc-example Usage
|
|
30
|
-
* A walkthrough of the most common combobox usages — sync filtering,
|
|
31
|
-
* placeholder, value binding, and disabled.
|
|
32
|
-
* @doc-file combobox.usage.example.ts
|
|
33
|
-
* @doc-example Async search
|
|
34
|
-
* Consumer-driven filtering via `(queryChange)` for remote results.
|
|
35
|
-
* @doc-file combobox.async.example.ts
|
|
36
|
-
* @doc-example Free-text values
|
|
37
|
-
* `[freeText]="true"` accepts arbitrary typed input not in the option set.
|
|
38
|
-
* @doc-file combobox.free-text.example.ts
|
|
39
|
-
* @doc-example Empty state
|
|
40
|
-
* `<kj-combobox-empty>` slot for the "no matches" message.
|
|
41
|
-
* @doc-file combobox.empty-state.example.ts
|
|
42
|
-
* @doc-example With icons
|
|
43
|
-
* Each option projects a leading icon next to the label text.
|
|
44
|
-
* @doc-file combobox.with-icons.example.ts
|
|
45
|
-
*
|
|
46
|
-
* @doc-keyboard
|
|
47
|
-
* ArrowDown — Opens the listbox; moves to the next option when open
|
|
48
|
-
* ArrowUp — Moves to the previous option (wraps at the top)
|
|
49
|
-
* Home|End — Jumps to the first / last visible option
|
|
50
|
-
* Enter — Selects the active option (or commits the typed value when `freeText`)
|
|
51
|
-
* Escape — Closes the listbox and clears the active option
|
|
52
|
-
* Tab — Closes the listbox and continues focus
|
|
53
|
-
* Printable keys — Filter the listbox in real-time
|
|
54
|
-
*
|
|
55
|
-
* @doc-aria
|
|
56
|
-
* role="combobox" — On the input (via `[kjComboboxInput]`)
|
|
57
|
-
* aria-haspopup — "listbox" on the input
|
|
58
|
-
* aria-expanded — Reflects open / closed state
|
|
59
|
-
* aria-controls — Links the input to the listbox id
|
|
60
|
-
* aria-activedescendant — Tracks the currently-active option without moving DOM focus
|
|
61
|
-
* aria-busy — Reflected on the input when `[loading]="true"`
|
|
62
|
-
* role="option" — On each `<kj-combobox-option>`
|
|
63
|
-
* aria-selected — Mirrors which option matches the committed value
|
|
64
|
-
*
|
|
65
|
-
* @doc-css-var
|
|
66
|
-
* --kj-bg-field — Input background. Inherited from the theme.
|
|
67
|
-
* --kj-border-default — Input and listbox border color.
|
|
68
|
-
* --kj-bg-elevated — Listbox panel background.
|
|
69
|
-
* --kj-radius-field — Input and listbox corner radius.
|
|
70
|
-
*
|
|
71
|
-
* @doc-touch
|
|
72
|
-
* The input grows with its container — pair with a `lg` size from your form
|
|
73
|
-
* row for ≥ 44px touch height. Options reach 44px via padding plus the
|
|
74
|
-
* inline-text-link exception inside the listbox.
|
|
75
|
-
*
|
|
76
|
-
* @doc-a11y
|
|
77
|
-
* The combobox follows the WAI-ARIA Combobox + Listbox pattern. The input
|
|
78
|
-
* keeps focus; the active option is tracked via `aria-activedescendant`
|
|
79
|
-
* without moving DOM focus into the listbox. The listbox auto-mounts to
|
|
80
|
-
* `document.body` to escape clipping and re-anchors to the input. The
|
|
81
|
-
* `<kj-combobox-empty>` slot uses `role="status"` with `aria-live="polite"`
|
|
82
|
-
* so screen readers announce the no-results state.
|
|
83
|
-
*
|
|
84
|
-
* @doc-related select,command-palette,field
|
|
85
|
-
*
|
|
86
|
-
* @doc-category Library/Data input
|
|
87
|
-
* @doc
|
|
88
|
-
* @doc-name combobox
|
|
89
|
-
* @doc-description Themed autocomplete combobox with built-in filtering, async search support, and free-text mode.
|
|
90
|
-
* @doc-is-main
|
|
91
|
-
*/
|
|
92
|
-
@Component({
|
|
93
|
-
selector: 'kj-combobox',
|
|
94
|
-
standalone: true,
|
|
95
|
-
hostDirectives: [
|
|
96
|
-
{
|
|
97
|
-
directive: KjCombobox,
|
|
98
|
-
inputs: [
|
|
99
|
-
'kjValue: value',
|
|
100
|
-
'kjQuery: query',
|
|
101
|
-
'kjShouldFilter: shouldFilter',
|
|
102
|
-
'kjLoading: loading',
|
|
103
|
-
'kjFreeText: freeText',
|
|
104
|
-
'kjFilter: filter',
|
|
105
|
-
'kjAutoActivateFirst: autoActivateFirst',
|
|
106
|
-
],
|
|
107
|
-
outputs: [
|
|
108
|
-
'kjValueChange: valueChange',
|
|
109
|
-
'kjQueryChange: queryChange',
|
|
110
|
-
'kjCommit: commit',
|
|
111
|
-
],
|
|
112
|
-
},
|
|
113
|
-
],
|
|
114
|
-
imports: [KjComboboxInput, KjComboboxListbox],
|
|
115
|
-
template: `
|
|
116
|
-
<input
|
|
117
|
-
kjComboboxInput
|
|
118
|
-
#trig="kjComboboxInput"
|
|
119
|
-
class="kj-combobox-input"
|
|
120
|
-
[placeholder]="placeholder()"
|
|
121
|
-
[disabled]="disabled() || null" />
|
|
122
|
-
<div kjComboboxListbox [kjFor]="trig" class="kj-combobox-listbox">
|
|
123
|
-
<ng-content />
|
|
124
|
-
</div>
|
|
125
|
-
`,
|
|
126
|
-
styleUrl: './combobox.css',
|
|
127
|
-
encapsulation: ViewEncapsulation.None,
|
|
128
|
-
host: {
|
|
129
|
-
'class': 'kj-combobox',
|
|
130
|
-
'[attr.data-disabled]': "disabled() ? '' : null",
|
|
131
|
-
},
|
|
132
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
133
|
-
})
|
|
134
|
-
export class KjComboboxComponent {
|
|
135
|
-
/** Placeholder text shown in the input when empty. */
|
|
136
|
-
readonly placeholder = input<string>('');
|
|
137
|
-
/** Whether the combobox is disabled. */
|
|
138
|
-
readonly disabled = input(false, { transform: booleanAttribute });
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* Single combobox option. Project as a child of `<kj-combobox>`.
|
|
143
|
-
*
|
|
144
|
-
* @doc-category Library/Data input
|
|
145
|
-
* @doc
|
|
146
|
-
* @doc-name combobox
|
|
147
|
-
*/
|
|
148
|
-
@Component({
|
|
149
|
-
selector: 'kj-combobox-option',
|
|
150
|
-
standalone: true,
|
|
151
|
-
imports: [KjComboboxOption],
|
|
152
|
-
template: `<button type="button" kjComboboxOption [kjOptionValue]="value()" class="kj-combobox-option" [disabled]="disabled() || null"><ng-content /></button>`,
|
|
153
|
-
encapsulation: ViewEncapsulation.None,
|
|
154
|
-
host: { style: 'display: contents;' },
|
|
155
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
156
|
-
})
|
|
157
|
-
export class KjComboboxOptionComponent {
|
|
158
|
-
/** Value committed when this option is selected. */
|
|
159
|
-
readonly value = input.required<unknown>();
|
|
160
|
-
/** Whether this option is disabled. */
|
|
161
|
-
readonly disabled = input(false, { transform: booleanAttribute });
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* Empty-state slot rendered when no options match the query. Place inside
|
|
166
|
-
* `<kj-combobox>`.
|
|
167
|
-
*
|
|
168
|
-
* @doc-category Library/Data input
|
|
169
|
-
* @doc
|
|
170
|
-
* @doc-name combobox
|
|
171
|
-
*/
|
|
172
|
-
@Component({
|
|
173
|
-
selector: 'kj-combobox-empty',
|
|
174
|
-
standalone: true,
|
|
175
|
-
template: `<ng-content />`,
|
|
176
|
-
encapsulation: ViewEncapsulation.None,
|
|
177
|
-
host: {
|
|
178
|
-
'class': 'kj-combobox-empty',
|
|
179
|
-
'role': 'status',
|
|
180
|
-
'aria-live': 'polite',
|
|
181
|
-
'[attr.hidden]': 'shouldShow() ? null : ""',
|
|
182
|
-
},
|
|
183
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
184
|
-
})
|
|
185
|
-
export class KjComboboxEmptyComponent {
|
|
186
|
-
private readonly cb = inject(KjCombobox);
|
|
187
|
-
/** @internal */
|
|
188
|
-
shouldShow(): boolean {
|
|
189
|
-
return this.cb.open()
|
|
190
|
-
&& !this.cb.loading()
|
|
191
|
-
&& this.cb.visibleCount() === 0
|
|
192
|
-
&& this.cb.query().length > 0;
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
* Loading-state slot rendered while `loading=true`. Place inside `<kj-combobox>`.
|
|
198
|
-
*
|
|
199
|
-
* @doc-category Library/Data input
|
|
200
|
-
* @doc
|
|
201
|
-
* @doc-name combobox
|
|
202
|
-
*/
|
|
203
|
-
@Component({
|
|
204
|
-
selector: 'kj-combobox-loading',
|
|
205
|
-
standalone: true,
|
|
206
|
-
template: `<ng-content />`,
|
|
207
|
-
encapsulation: ViewEncapsulation.None,
|
|
208
|
-
host: {
|
|
209
|
-
'class': 'kj-combobox-loading',
|
|
210
|
-
'role': 'status',
|
|
211
|
-
'aria-live': 'polite',
|
|
212
|
-
'[attr.hidden]': 'cb.loading() ? null : ""',
|
|
213
|
-
},
|
|
214
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
215
|
-
})
|
|
216
|
-
export class KjComboboxLoadingComponent {
|
|
217
|
-
/** @internal */
|
|
218
|
-
readonly cb = inject(KjCombobox);
|
|
219
|
-
}
|
package/src/combobox/index.ts
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { Component, effect, signal, ChangeDetectionStrategy } from '@angular/core';
|
|
2
|
-
import { KjButtonComponent } from '../../button/button';
|
|
3
|
-
import {
|
|
4
|
-
KjCommandPaletteComponent,
|
|
5
|
-
KjCommandItemComponent,
|
|
6
|
-
KjCommandPaletteItemTemplate,
|
|
7
|
-
} from '../command-palette';
|
|
8
|
-
|
|
9
|
-
interface SearchResult {
|
|
10
|
-
id: string;
|
|
11
|
-
label: string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const ALL_RESULTS: SearchResult[] = [
|
|
15
|
-
{ id: 'ng-docs', label: 'Angular Documentation' },
|
|
16
|
-
{ id: 'ng-signals', label: 'Angular Signals Guide' },
|
|
17
|
-
{ id: 'ng-forms', label: 'Angular Forms' },
|
|
18
|
-
{ id: 'ng-routing', label: 'Angular Routing' },
|
|
19
|
-
{ id: 'ng-di', label: 'Angular Dependency Injection' },
|
|
20
|
-
];
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Async-search pattern using `[kjItems]` + `<ng-template kjCommandPaletteItemTemplate>`.
|
|
24
|
-
* `kjShouldFilter="false"` delegates filtering to the consumer; results
|
|
25
|
-
* update after a simulated 300ms delay.
|
|
26
|
-
*/
|
|
27
|
-
@Component({
|
|
28
|
-
selector: 'kj-command-palette-async-example',
|
|
29
|
-
standalone: true,
|
|
30
|
-
imports: [
|
|
31
|
-
KjCommandPaletteComponent,
|
|
32
|
-
KjCommandItemComponent,
|
|
33
|
-
KjCommandPaletteItemTemplate,
|
|
34
|
-
KjButtonComponent,
|
|
35
|
-
],
|
|
36
|
-
styles: [
|
|
37
|
-
`
|
|
38
|
-
:host {
|
|
39
|
-
display: flex;
|
|
40
|
-
flex-direction: column;
|
|
41
|
-
gap: var(--kj-space-md);
|
|
42
|
-
align-items: flex-start;
|
|
43
|
-
min-height: 16rem;
|
|
44
|
-
}
|
|
45
|
-
.activated {
|
|
46
|
-
font-family: var(--kj-font-mono);
|
|
47
|
-
font-size: 0.75rem;
|
|
48
|
-
color: var(--kj-fg-muted);
|
|
49
|
-
}
|
|
50
|
-
`,
|
|
51
|
-
],
|
|
52
|
-
changeDetection: ChangeDetectionStrategy.Eager,
|
|
53
|
-
template: `
|
|
54
|
-
<kj-button kjVariant="outline" (click)="open.set(true)">Search Angular docs…</kj-button>
|
|
55
|
-
|
|
56
|
-
@if (lastActivated()) {
|
|
57
|
-
<p class="activated">
|
|
58
|
-
Activated: <strong>{{ lastActivated() }}</strong>
|
|
59
|
-
</p>
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
<kj-command-palette
|
|
63
|
-
[(kjOpen)]="open"
|
|
64
|
-
[(kjQuery)]="query"
|
|
65
|
-
[kjShouldFilter]="false"
|
|
66
|
-
[kjLoading]="loading()"
|
|
67
|
-
[kjItems]="results()"
|
|
68
|
-
kjPlaceholder="Search Angular docs…"
|
|
69
|
-
(kjActivate)="lastActivated.set($any($event).value)"
|
|
70
|
-
>
|
|
71
|
-
<ng-template kjCommandPaletteItemTemplate let-result>
|
|
72
|
-
<kj-command-item [kjValue]="result.id">{{ result.label }}</kj-command-item>
|
|
73
|
-
</ng-template>
|
|
74
|
-
</kj-command-palette>
|
|
75
|
-
`,
|
|
76
|
-
})
|
|
77
|
-
export class KjCommandPaletteAsyncExample {
|
|
78
|
-
readonly open = signal(false);
|
|
79
|
-
readonly query = signal('');
|
|
80
|
-
readonly loading = signal(false);
|
|
81
|
-
readonly results = signal<SearchResult[]>(ALL_RESULTS);
|
|
82
|
-
readonly lastActivated = signal<string | null>(null);
|
|
83
|
-
|
|
84
|
-
private searchTimer: ReturnType<typeof setTimeout> | null = null;
|
|
85
|
-
|
|
86
|
-
constructor() {
|
|
87
|
-
effect(() => {
|
|
88
|
-
const q = this.query();
|
|
89
|
-
if (this.searchTimer) clearTimeout(this.searchTimer);
|
|
90
|
-
this.loading.set(true);
|
|
91
|
-
this.results.set([]);
|
|
92
|
-
this.searchTimer = setTimeout(() => {
|
|
93
|
-
const filtered = ALL_RESULTS.filter((r) => r.label.toLowerCase().includes(q.toLowerCase()));
|
|
94
|
-
this.results.set(filtered);
|
|
95
|
-
this.loading.set(false);
|
|
96
|
-
}, 300);
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { Component, signal, ChangeDetectionStrategy } from '@angular/core';
|
|
2
|
-
import { KjButtonComponent } from '../../button/button';
|
|
3
|
-
import {
|
|
4
|
-
KjCommandPaletteComponent,
|
|
5
|
-
KjCommandItemComponent,
|
|
6
|
-
KjCommandGroupComponent,
|
|
7
|
-
KjCommandSeparatorComponent,
|
|
8
|
-
} from '../command-palette';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Modal command palette with Cmd-K / Ctrl-K hotkey wired in.
|
|
12
|
-
* Click the trigger button or press the chord to toggle.
|
|
13
|
-
*/
|
|
14
|
-
@Component({
|
|
15
|
-
selector: 'kj-command-palette-dialog-example',
|
|
16
|
-
standalone: true,
|
|
17
|
-
imports: [
|
|
18
|
-
KjCommandPaletteComponent,
|
|
19
|
-
KjCommandItemComponent,
|
|
20
|
-
KjCommandGroupComponent,
|
|
21
|
-
KjCommandSeparatorComponent,
|
|
22
|
-
KjButtonComponent,
|
|
23
|
-
],
|
|
24
|
-
styles: [
|
|
25
|
-
`
|
|
26
|
-
:host {
|
|
27
|
-
display: flex;
|
|
28
|
-
flex-direction: column;
|
|
29
|
-
gap: var(--kj-space-md);
|
|
30
|
-
align-items: flex-start;
|
|
31
|
-
min-height: 16rem;
|
|
32
|
-
}
|
|
33
|
-
kbd {
|
|
34
|
-
border: 1px solid var(--kj-border-default);
|
|
35
|
-
color: var(--kj-fg-muted);
|
|
36
|
-
font-family: var(--kj-font-mono);
|
|
37
|
-
font-size: 0.7rem;
|
|
38
|
-
padding: 0.1rem 0.35rem;
|
|
39
|
-
margin-inline-start: var(--kj-space-md);
|
|
40
|
-
}
|
|
41
|
-
.activated {
|
|
42
|
-
font-family: var(--kj-font-mono);
|
|
43
|
-
font-size: 0.75rem;
|
|
44
|
-
color: var(--kj-fg-muted);
|
|
45
|
-
}
|
|
46
|
-
`,
|
|
47
|
-
],
|
|
48
|
-
changeDetection: ChangeDetectionStrategy.Eager,
|
|
49
|
-
template: `
|
|
50
|
-
<kj-button kjVariant="outline" (click)="open.set(true)">
|
|
51
|
-
Search commands… <kbd>⌘K</kbd>
|
|
52
|
-
</kj-button>
|
|
53
|
-
|
|
54
|
-
@if (lastActivated()) {
|
|
55
|
-
<p class="activated">
|
|
56
|
-
Activated: <strong>{{ lastActivated() }}</strong>
|
|
57
|
-
</p>
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
<kj-command-palette
|
|
61
|
-
[(kjOpen)]="open"
|
|
62
|
-
kjHotkey="mod+k"
|
|
63
|
-
kjPlaceholder="Search commands…"
|
|
64
|
-
(kjActivate)="onActivate($any($event))"
|
|
65
|
-
>
|
|
66
|
-
<kj-command-group kjLabel="Suggestions">
|
|
67
|
-
<kj-command-item kjValue="calendar">Calendar</kj-command-item>
|
|
68
|
-
<kj-command-item kjValue="search-emoji">Search Emoji</kj-command-item>
|
|
69
|
-
<kj-command-item kjValue="calculator">Calculator</kj-command-item>
|
|
70
|
-
</kj-command-group>
|
|
71
|
-
|
|
72
|
-
<kj-command-separator></kj-command-separator>
|
|
73
|
-
|
|
74
|
-
<kj-command-group kjLabel="Settings">
|
|
75
|
-
<kj-command-item kjValue="profile">Profile</kj-command-item>
|
|
76
|
-
<kj-command-item kjValue="billing">Billing</kj-command-item>
|
|
77
|
-
<kj-command-item kjValue="settings">Settings</kj-command-item>
|
|
78
|
-
<kj-command-item kjValue="logout">Logout</kj-command-item>
|
|
79
|
-
</kj-command-group>
|
|
80
|
-
</kj-command-palette>
|
|
81
|
-
`,
|
|
82
|
-
})
|
|
83
|
-
export class KjCommandPaletteDialogExample {
|
|
84
|
-
readonly open = signal(false);
|
|
85
|
-
readonly lastActivated = signal<string | null>(null);
|
|
86
|
-
|
|
87
|
-
onActivate(event: { value: unknown; query: string }): void {
|
|
88
|
-
this.lastActivated.set(String(event.value));
|
|
89
|
-
}
|
|
90
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { Component, signal, ChangeDetectionStrategy } from '@angular/core';
|
|
2
|
-
import { KjButtonComponent } from '../../button/button';
|
|
3
|
-
import { KjCommandPaletteComponent, KjCommandItemComponent } from '../command-palette';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Default modal command palette. Click the trigger button (or use the
|
|
7
|
-
* `[(kjOpen)]` 2-way binding) to open. Type to filter — items are projected
|
|
8
|
-
* directly via `<kj-command-item>`.
|
|
9
|
-
*/
|
|
10
|
-
@Component({
|
|
11
|
-
selector: 'kj-command-palette-example',
|
|
12
|
-
standalone: true,
|
|
13
|
-
imports: [KjCommandPaletteComponent, KjCommandItemComponent, KjButtonComponent],
|
|
14
|
-
styles: [
|
|
15
|
-
`
|
|
16
|
-
:host {
|
|
17
|
-
display: flex;
|
|
18
|
-
justify-content: center;
|
|
19
|
-
min-height: 16rem;
|
|
20
|
-
}
|
|
21
|
-
`,
|
|
22
|
-
],
|
|
23
|
-
changeDetection: ChangeDetectionStrategy.Eager,
|
|
24
|
-
template: `
|
|
25
|
-
<kj-button kjVariant="outline" (click)="open.set(true)">Open palette</kj-button>
|
|
26
|
-
|
|
27
|
-
<kj-command-palette [(kjOpen)]="open" kjPlaceholder="Search commands…">
|
|
28
|
-
<kj-command-item kjValue="new-file">New File</kj-command-item>
|
|
29
|
-
<kj-command-item kjValue="open-folder">Open Folder</kj-command-item>
|
|
30
|
-
<kj-command-item kjValue="save">Save</kj-command-item>
|
|
31
|
-
<kj-command-item kjValue="settings">Settings</kj-command-item>
|
|
32
|
-
<kj-command-item kjValue="toggle-theme">Toggle Theme</kj-command-item>
|
|
33
|
-
<kj-command-item kjValue="profile">Profile</kj-command-item>
|
|
34
|
-
<kj-command-item kjValue="logout">Logout</kj-command-item>
|
|
35
|
-
</kj-command-palette>
|
|
36
|
-
`,
|
|
37
|
-
})
|
|
38
|
-
export class KjCommandPaletteExample {
|
|
39
|
-
readonly open = signal(false);
|
|
40
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { Component, signal, ChangeDetectionStrategy } from '@angular/core';
|
|
2
|
-
import { kjFuzzyFilter } from '@kouji-ui/core';
|
|
3
|
-
import { KjButtonComponent } from '../../button/button';
|
|
4
|
-
import { KjCommandPaletteComponent, KjCommandItemComponent } from '../command-palette';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Modal command palette with a custom fuzzy filter — type abbreviations
|
|
8
|
-
* to match commands. For example, type `gth` to match "git checkout",
|
|
9
|
-
* or `tth` for "Toggle Theme".
|
|
10
|
-
*/
|
|
11
|
-
@Component({
|
|
12
|
-
selector: 'kj-command-palette-fuzzy-example',
|
|
13
|
-
standalone: true,
|
|
14
|
-
imports: [KjCommandPaletteComponent, KjCommandItemComponent, KjButtonComponent],
|
|
15
|
-
styles: [
|
|
16
|
-
`
|
|
17
|
-
:host {
|
|
18
|
-
display: flex;
|
|
19
|
-
flex-direction: column;
|
|
20
|
-
gap: var(--kj-space-md);
|
|
21
|
-
align-items: flex-start;
|
|
22
|
-
min-height: 18rem;
|
|
23
|
-
}
|
|
24
|
-
.hint {
|
|
25
|
-
margin: 0;
|
|
26
|
-
font-family: var(--kj-font-mono);
|
|
27
|
-
font-size: 0.75rem;
|
|
28
|
-
color: var(--kj-fg-muted);
|
|
29
|
-
}
|
|
30
|
-
`,
|
|
31
|
-
],
|
|
32
|
-
changeDetection: ChangeDetectionStrategy.Eager,
|
|
33
|
-
template: `
|
|
34
|
-
<kj-button kjVariant="outline" (click)="open.set(true)">Open fuzzy palette</kj-button>
|
|
35
|
-
<p class="hint">Try typing: <code>gth</code>, <code>tth</code>, <code>ofil</code></p>
|
|
36
|
-
|
|
37
|
-
<kj-command-palette
|
|
38
|
-
[(kjOpen)]="open"
|
|
39
|
-
[kjFilter]="fuzzyFilter"
|
|
40
|
-
kjPlaceholder="Fuzzy search (try gth)…"
|
|
41
|
-
>
|
|
42
|
-
<kj-command-item kjValue="git-checkout">git checkout</kj-command-item>
|
|
43
|
-
<kj-command-item kjValue="toggle-theme">Toggle Theme</kj-command-item>
|
|
44
|
-
<kj-command-item kjValue="open-file">Open File</kj-command-item>
|
|
45
|
-
<kj-command-item kjValue="new-window">New Window</kj-command-item>
|
|
46
|
-
<kj-command-item kjValue="find-replace">Find and Replace</kj-command-item>
|
|
47
|
-
<kj-command-item kjValue="format-doc">Format Document</kj-command-item>
|
|
48
|
-
</kj-command-palette>
|
|
49
|
-
`,
|
|
50
|
-
})
|
|
51
|
-
export class KjCommandPaletteFuzzyExample {
|
|
52
|
-
readonly open = signal(false);
|
|
53
|
-
readonly fuzzyFilter = kjFuzzyFilter;
|
|
54
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { Component, signal, ChangeDetectionStrategy } from '@angular/core';
|
|
2
|
-
import { KjButtonComponent } from '../../button/button';
|
|
3
|
-
import {
|
|
4
|
-
KjCommandPaletteComponent,
|
|
5
|
-
KjCommandItemComponent,
|
|
6
|
-
KjCommandGroupComponent,
|
|
7
|
-
KjCommandSeparatorComponent,
|
|
8
|
-
} from '../command-palette';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Modal command palette with grouped items. Type to filter — groups with no
|
|
12
|
-
* matching items hide automatically, including their heading.
|
|
13
|
-
*/
|
|
14
|
-
@Component({
|
|
15
|
-
selector: 'kj-command-palette-groups-example',
|
|
16
|
-
standalone: true,
|
|
17
|
-
imports: [
|
|
18
|
-
KjCommandPaletteComponent,
|
|
19
|
-
KjCommandItemComponent,
|
|
20
|
-
KjCommandGroupComponent,
|
|
21
|
-
KjCommandSeparatorComponent,
|
|
22
|
-
KjButtonComponent,
|
|
23
|
-
],
|
|
24
|
-
styles: [
|
|
25
|
-
`
|
|
26
|
-
:host {
|
|
27
|
-
display: flex;
|
|
28
|
-
justify-content: center;
|
|
29
|
-
min-height: 16rem;
|
|
30
|
-
}
|
|
31
|
-
`,
|
|
32
|
-
],
|
|
33
|
-
changeDetection: ChangeDetectionStrategy.Eager,
|
|
34
|
-
template: `
|
|
35
|
-
<kj-button kjVariant="outline" (click)="open.set(true)">Open palette</kj-button>
|
|
36
|
-
|
|
37
|
-
<kj-command-palette [(kjOpen)]="open" kjPlaceholder="Search…">
|
|
38
|
-
<kj-command-group kjLabel="Recent">
|
|
39
|
-
<kj-command-item kjValue="recent-settings">Settings</kj-command-item>
|
|
40
|
-
<kj-command-item kjValue="recent-profile">Profile</kj-command-item>
|
|
41
|
-
</kj-command-group>
|
|
42
|
-
|
|
43
|
-
<kj-command-separator></kj-command-separator>
|
|
44
|
-
|
|
45
|
-
<kj-command-group kjLabel="Settings">
|
|
46
|
-
<kj-command-item kjValue="theme">Toggle Theme</kj-command-item>
|
|
47
|
-
<kj-command-item kjValue="language">Language</kj-command-item>
|
|
48
|
-
<kj-command-item kjValue="shortcuts">Keyboard Shortcuts</kj-command-item>
|
|
49
|
-
</kj-command-group>
|
|
50
|
-
</kj-command-palette>
|
|
51
|
-
`,
|
|
52
|
-
})
|
|
53
|
-
export class KjCommandPaletteGroupsExample {
|
|
54
|
-
readonly open = signal(false);
|
|
55
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { Component, signal, ChangeDetectionStrategy } from '@angular/core';
|
|
2
|
-
import { KjButtonComponent } from '../../button/button';
|
|
3
|
-
import {
|
|
4
|
-
KjCommandPaletteComponent,
|
|
5
|
-
KjCommandItemComponent,
|
|
6
|
-
KjCommandGroupComponent,
|
|
7
|
-
} from '../command-palette';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* A walkthrough of the most common command-palette usages — a trigger button
|
|
11
|
-
* that opens the modal, a global Cmd-K hotkey, and grouped command rows.
|
|
12
|
-
*/
|
|
13
|
-
@Component({
|
|
14
|
-
selector: 'kj-command-palette-usage-example',
|
|
15
|
-
standalone: true,
|
|
16
|
-
imports: [
|
|
17
|
-
KjCommandPaletteComponent,
|
|
18
|
-
KjCommandItemComponent,
|
|
19
|
-
KjCommandGroupComponent,
|
|
20
|
-
KjButtonComponent,
|
|
21
|
-
],
|
|
22
|
-
styles: [
|
|
23
|
-
`
|
|
24
|
-
:host {
|
|
25
|
-
display: flex;
|
|
26
|
-
justify-content: center;
|
|
27
|
-
min-height: 16rem;
|
|
28
|
-
}
|
|
29
|
-
`,
|
|
30
|
-
],
|
|
31
|
-
changeDetection: ChangeDetectionStrategy.Eager,
|
|
32
|
-
template: `
|
|
33
|
-
<kj-button kjVariant="outline" (click)="open.set(true)"> Open palette (or press ⌘K) </kj-button>
|
|
34
|
-
|
|
35
|
-
<kj-command-palette [(kjOpen)]="open" kjHotkey="mod+k" kjPlaceholder="Type a command…">
|
|
36
|
-
<kj-command-group kjLabel="Actions">
|
|
37
|
-
<kj-command-item kjValue="new-file">New file</kj-command-item>
|
|
38
|
-
<kj-command-item kjValue="save">Save</kj-command-item>
|
|
39
|
-
</kj-command-group>
|
|
40
|
-
<kj-command-group kjLabel="Navigation">
|
|
41
|
-
<kj-command-item kjValue="settings">Settings</kj-command-item>
|
|
42
|
-
<kj-command-item kjValue="profile">Profile</kj-command-item>
|
|
43
|
-
</kj-command-group>
|
|
44
|
-
</kj-command-palette>
|
|
45
|
-
`,
|
|
46
|
-
})
|
|
47
|
-
export class KjCommandPaletteUsageExample {
|
|
48
|
-
readonly open = signal(false);
|
|
49
|
-
}
|
|
@@ -1,8 +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 { KjCommandPaletteAsyncExample } from './command-palette.async.example';
|
|
4
|
-
export { KjCommandPaletteDialogExample } from './command-palette.dialog.example';
|
|
5
|
-
export { KjCommandPaletteExample } from './command-palette.example';
|
|
6
|
-
export { KjCommandPaletteFuzzyExample } from './command-palette.fuzzy.example';
|
|
7
|
-
export { KjCommandPaletteGroupsExample } from './command-palette.groups.example';
|
|
8
|
-
export { KjCommandPaletteUsageExample } from './command-palette.usage.example';
|