@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
package/src/list/list.css
DELETED
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
/* ─────────────────────────────────────────────────────────────
|
|
2
|
-
.kj-list — component-layer tokens + structural CSS
|
|
3
|
-
The list root carries layout (flex direction, gap) and reads
|
|
4
|
-
`data-orientation` / `data-divided` / `data-hoverable` from the
|
|
5
|
-
composed `KjList` directive to flip variants. Per-row chrome is
|
|
6
|
-
driven by `data-active` / `data-disabled` on `<kj-list-item>`.
|
|
7
|
-
──────────────────────────────────────────────────────────── */
|
|
8
|
-
|
|
9
|
-
@layer kj.component {
|
|
10
|
-
.kj-list {
|
|
11
|
-
--kj-list-bg: transparent;
|
|
12
|
-
--kj-list-fg: var(--kj-fg-default);
|
|
13
|
-
--kj-list-border-color: var(--kj-border-default);
|
|
14
|
-
--kj-list-radius: var(--kj-radius-box);
|
|
15
|
-
--kj-list-row-gap: 0;
|
|
16
|
-
--kj-list-row-padding-x: var(--kj-space-md);
|
|
17
|
-
--kj-list-row-padding-y: var(--kj-space-sm);
|
|
18
|
-
--kj-list-row-radius: var(--kj-radius-field);
|
|
19
|
-
--kj-list-row-min-h: 2.75rem; /* 44px — WCAG 2.5.5 */
|
|
20
|
-
|
|
21
|
-
display: flex;
|
|
22
|
-
flex-direction: column;
|
|
23
|
-
gap: var(--kj-list-row-gap);
|
|
24
|
-
background: var(--kj-list-bg);
|
|
25
|
-
color: var(--kj-list-fg);
|
|
26
|
-
border-radius: var(--kj-list-radius);
|
|
27
|
-
margin: 0;
|
|
28
|
-
padding: 0;
|
|
29
|
-
list-style: none;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/* Horizontal axis flips flex-direction. The `data-orientation` mirror is
|
|
33
|
-
emitted by `KjList` so themes do not need the JS-level orientation. */
|
|
34
|
-
.kj-list[data-orientation='horizontal'] {
|
|
35
|
-
flex-direction: row;
|
|
36
|
-
flex-wrap: wrap;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/* Sizes — drive row density via the row-padding / min-height tokens. */
|
|
40
|
-
.kj-list[data-size='xs'] {
|
|
41
|
-
--kj-list-row-padding-y: 0.125rem;
|
|
42
|
-
--kj-list-row-padding-x: var(--kj-space-sm);
|
|
43
|
-
--kj-list-row-min-h: 1.5rem;
|
|
44
|
-
}
|
|
45
|
-
.kj-list[data-size='sm'] {
|
|
46
|
-
--kj-list-row-padding-y: 0.25rem;
|
|
47
|
-
--kj-list-row-padding-x: var(--kj-space-sm);
|
|
48
|
-
--kj-list-row-min-h: 2rem;
|
|
49
|
-
}
|
|
50
|
-
.kj-list[data-size='lg'] {
|
|
51
|
-
--kj-list-row-padding-y: var(--kj-space-md);
|
|
52
|
-
--kj-list-row-padding-x: var(--kj-space-lg);
|
|
53
|
-
--kj-list-row-min-h: 3rem;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/* Variants — chrome on the container itself. */
|
|
57
|
-
.kj-list[data-variant='bordered'] {
|
|
58
|
-
border: var(--kj-border) solid var(--kj-list-border-color);
|
|
59
|
-
overflow: hidden;
|
|
60
|
-
}
|
|
61
|
-
.kj-list[data-variant='flat'] {
|
|
62
|
-
border: 0;
|
|
63
|
-
--kj-list-bg: transparent;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/* Per-row layout. Rows are flex containers so consumers can drop in
|
|
67
|
-
leading icons / trailing badges without juggling spans. */
|
|
68
|
-
.kj-list-item {
|
|
69
|
-
display: flex;
|
|
70
|
-
align-items: center;
|
|
71
|
-
gap: var(--kj-space-sm);
|
|
72
|
-
padding: var(--kj-list-row-padding-y) var(--kj-list-row-padding-x);
|
|
73
|
-
min-height: var(--kj-list-row-min-h);
|
|
74
|
-
border-radius: var(--kj-list-row-radius);
|
|
75
|
-
color: inherit;
|
|
76
|
-
/* Transition only state-tied properties so the active / hover flip is
|
|
77
|
-
buttery without animating layout. */
|
|
78
|
-
transition: background-color var(--kj-transition),
|
|
79
|
-
color var(--kj-transition),
|
|
80
|
-
opacity var(--kj-transition);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/* One projected link/button: move row padding onto it so the clickable box
|
|
84
|
-
matches the full row (padding on the host sat outside the hit target).
|
|
85
|
-
Use `nth-child(1 of …)` / `nth-last-child(1 of …)` so whitespace text
|
|
86
|
-
nodes between the host and the control do not break `:only-child`. */
|
|
87
|
-
.kj-list-item:has(
|
|
88
|
-
> :where(a, button):nth-child(1 of :where(a, button)):nth-last-child(1 of :where(a, button))
|
|
89
|
-
) {
|
|
90
|
-
padding: 0;
|
|
91
|
-
align-items: stretch;
|
|
92
|
-
min-height: 0;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
/* Divided rows — between-row border via `:not(:last-child)` so the final
|
|
96
|
-
row stays clean. The `data-divided` mirror lives on the root. */
|
|
97
|
-
.kj-list[data-divided] .kj-list-item {
|
|
98
|
-
border-radius: 0;
|
|
99
|
-
}
|
|
100
|
-
.kj-list[data-divided][data-orientation='vertical'] .kj-list-item:not(:last-child) {
|
|
101
|
-
border-bottom: var(--kj-border) solid var(--kj-list-border-color);
|
|
102
|
-
}
|
|
103
|
-
.kj-list[data-divided][data-orientation='horizontal'] .kj-list-item:not(:last-child) {
|
|
104
|
-
border-right: var(--kj-border) solid var(--kj-list-border-color);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
/* Hoverable rows. Cascade order matters: the `:hover` rule comes BEFORE
|
|
108
|
-
the `[data-active]` rule so the active row wins when both are true. */
|
|
109
|
-
.kj-list[data-hoverable] .kj-list-item:hover {
|
|
110
|
-
background: color-mix(in oklab, var(--kj-fg-default) 6%, transparent);
|
|
111
|
-
cursor: pointer;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
/* Active row — current location in a nav. Painted via background tint plus
|
|
115
|
-
a left bar (≥3:1 against background per WCAG 1.4.11). */
|
|
116
|
-
.kj-list-item[data-active] {
|
|
117
|
-
background: color-mix(in oklab, var(--kj-bg-primary) 12%, transparent);
|
|
118
|
-
color: var(--kj-fg-primary);
|
|
119
|
-
box-shadow: inset 3px 0 0 0 var(--kj-bg-primary);
|
|
120
|
-
}
|
|
121
|
-
.kj-list[data-orientation='horizontal'] .kj-list-item[data-active] {
|
|
122
|
-
box-shadow: inset 0 -3px 0 0 var(--kj-bg-primary);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
/* Disabled row — dim the chrome and any projected interactive child.
|
|
126
|
-
Keyboard reachability is the projected child's responsibility. */
|
|
127
|
-
.kj-list-item[data-disabled] {
|
|
128
|
-
opacity: 0.45;
|
|
129
|
-
cursor: not-allowed;
|
|
130
|
-
}
|
|
131
|
-
.kj-list-item[data-disabled] :where(a, button) {
|
|
132
|
-
pointer-events: none;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
/* Shared styles for interactive children */
|
|
136
|
-
.kj-list-item > :where(a, button) {
|
|
137
|
-
display: flex;
|
|
138
|
-
align-items: center;
|
|
139
|
-
gap: var(--kj-space-sm);
|
|
140
|
-
color: inherit;
|
|
141
|
-
text-decoration: none;
|
|
142
|
-
background: none;
|
|
143
|
-
border: 0;
|
|
144
|
-
padding: 0;
|
|
145
|
-
font: inherit;
|
|
146
|
-
cursor: pointer;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.kj-list-item:has(
|
|
150
|
-
> :where(a, button):nth-child(1 of :where(a, button)):nth-last-child(1 of :where(a, button))
|
|
151
|
-
)
|
|
152
|
-
> :where(a, button) {
|
|
153
|
-
flex: 1 1 auto;
|
|
154
|
-
align-self: stretch;
|
|
155
|
-
min-width: 0;
|
|
156
|
-
min-height: var(--kj-list-row-min-h);
|
|
157
|
-
padding: var(--kj-list-row-padding-y) var(--kj-list-row-padding-x);
|
|
158
|
-
box-sizing: border-box;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
.kj-list-item > :where(a, button):focus-visible {
|
|
162
|
-
outline: 2px solid var(--kj-fg-primary);
|
|
163
|
-
outline-offset: 2px;
|
|
164
|
-
border-radius: var(--kj-list-row-radius);
|
|
165
|
-
}
|
|
166
|
-
}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, computed, signal } from '@angular/core';
|
|
2
|
-
import { KjListComponent, KjListItemComponent } from './list';
|
|
3
|
-
import type { PlaygroundFile } from '@kouji-ui/components/playground-types';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Playground state — module-scope signals. Compound knobs: item count and
|
|
7
|
-
* an active-index selector accompany the structural divided / hoverable /
|
|
8
|
-
* arrow-navigation toggles.
|
|
9
|
-
*/
|
|
10
|
-
const itemCount = signal<3 | 5 | 7>(5);
|
|
11
|
-
const divided = signal(true);
|
|
12
|
-
const hoverable = signal(true);
|
|
13
|
-
const arrowNavigation = signal(false);
|
|
14
|
-
const activeIndex = signal<0 | 1 | 2 | 3 | 4 | 5 | 6 | -1>(0);
|
|
15
|
-
|
|
16
|
-
const ITEMS = ['Profile', 'Notifications', 'Billing', 'Security', 'Connected apps', 'Plan', 'Danger zone'] as const;
|
|
17
|
-
|
|
18
|
-
@Component({
|
|
19
|
-
selector: 'kj-list-playground',
|
|
20
|
-
standalone: true,
|
|
21
|
-
imports: [KjListComponent, KjListItemComponent],
|
|
22
|
-
styles: [`:host { display: block; max-width: 360px; }`],
|
|
23
|
-
template: `
|
|
24
|
-
<kj-list
|
|
25
|
-
ariaLabel="Account settings"
|
|
26
|
-
[divided]="divided()"
|
|
27
|
-
[hoverable]="hoverable()"
|
|
28
|
-
[arrowNavigation]="arrowNavigation()"
|
|
29
|
-
>
|
|
30
|
-
@for (item of visibleItems(); track item; let i = $index) {
|
|
31
|
-
<kj-list-item [active]="i === activeIndex()">{{ item }}</kj-list-item>
|
|
32
|
-
}
|
|
33
|
-
</kj-list>
|
|
34
|
-
`,
|
|
35
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
36
|
-
})
|
|
37
|
-
export class KjListPlaygroundDemo {
|
|
38
|
-
protected readonly itemCount = itemCount;
|
|
39
|
-
protected readonly divided = divided;
|
|
40
|
-
protected readonly hoverable = hoverable;
|
|
41
|
-
protected readonly arrowNavigation = arrowNavigation;
|
|
42
|
-
protected readonly activeIndex = activeIndex;
|
|
43
|
-
|
|
44
|
-
protected readonly visibleItems = computed(() =>
|
|
45
|
-
ITEMS.slice(0, itemCount()),
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export const PLAYGROUND: PlaygroundFile = {
|
|
50
|
-
component: KjListPlaygroundDemo,
|
|
51
|
-
state: {
|
|
52
|
-
itemCount: itemCount as unknown as ReturnType<typeof signal>,
|
|
53
|
-
divided: divided as unknown as ReturnType<typeof signal>,
|
|
54
|
-
hoverable: hoverable as unknown as ReturnType<typeof signal>,
|
|
55
|
-
arrowNavigation: arrowNavigation as unknown as ReturnType<typeof signal>,
|
|
56
|
-
activeIndex: activeIndex as unknown as ReturnType<typeof signal>,
|
|
57
|
-
},
|
|
58
|
-
controls: [
|
|
59
|
-
{ kind: 'chips', name: 'itemCount', label: 'items', options: [3, 5, 7] },
|
|
60
|
-
{
|
|
61
|
-
kind: 'chips',
|
|
62
|
-
name: 'activeIndex',
|
|
63
|
-
label: 'active row',
|
|
64
|
-
options: [-1, 0, 1, 2, 3, 4],
|
|
65
|
-
},
|
|
66
|
-
{ kind: 'toggle', name: 'divided', label: 'divided' },
|
|
67
|
-
{ kind: 'toggle', name: 'hoverable', label: 'hoverable' },
|
|
68
|
-
{ kind: 'toggle', name: 'arrowNavigation', label: 'arrow navigation' },
|
|
69
|
-
],
|
|
70
|
-
snippet: (values) => {
|
|
71
|
-
const s = values as {
|
|
72
|
-
itemCount: number;
|
|
73
|
-
divided: boolean;
|
|
74
|
-
hoverable: boolean;
|
|
75
|
-
arrowNavigation: boolean;
|
|
76
|
-
activeIndex: number;
|
|
77
|
-
};
|
|
78
|
-
const attrs: string[] = ['ariaLabel="Account settings"'];
|
|
79
|
-
if (s.divided) attrs.push('[divided]="true"');
|
|
80
|
-
if (s.hoverable) attrs.push('[hoverable]="true"');
|
|
81
|
-
if (s.arrowNavigation) attrs.push('[arrowNavigation]="true"');
|
|
82
|
-
const rows = Array.from(ITEMS.slice(0, s.itemCount))
|
|
83
|
-
.map((label, i) => {
|
|
84
|
-
const active = i === s.activeIndex ? ' [active]="true"' : '';
|
|
85
|
-
return ` <kj-list-item${active}>${label}</kj-list-item>`;
|
|
86
|
-
})
|
|
87
|
-
.join('\n');
|
|
88
|
-
return `<kj-list\n ${attrs.join('\n ')}\n>\n${rows}\n</kj-list>`;
|
|
89
|
-
},
|
|
90
|
-
};
|
package/src/list/list.spec.ts
DELETED
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
import { Component } from '@angular/core';
|
|
2
|
-
import { render } from '@testing-library/angular';
|
|
3
|
-
|
|
4
|
-
import { KjListComponent, KjListItemComponent } from './list';
|
|
5
|
-
|
|
6
|
-
const imports = [KjListComponent, KjListItemComponent];
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Allow Angular's signal-driven host bindings and `effect()`s to settle
|
|
10
|
-
* before the assertions read host attributes. Mirrors the helper used by the
|
|
11
|
-
* sibling `<kj-avatar-group>` spec.
|
|
12
|
-
*/
|
|
13
|
-
async function flush(): Promise<void> {
|
|
14
|
-
await new Promise<void>((resolve) => setTimeout(resolve, 0));
|
|
15
|
-
await Promise.resolve();
|
|
16
|
-
await Promise.resolve();
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
describe('KjListComponent', () => {
|
|
20
|
-
it('renders projected <kj-list-item> children with the wrapper class', async () => {
|
|
21
|
-
@Component({
|
|
22
|
-
standalone: true,
|
|
23
|
-
imports,
|
|
24
|
-
template: `
|
|
25
|
-
<kj-list ariaLabel="Recent files">
|
|
26
|
-
<kj-list-item>One</kj-list-item>
|
|
27
|
-
<kj-list-item>Two</kj-list-item>
|
|
28
|
-
<kj-list-item>Three</kj-list-item>
|
|
29
|
-
</kj-list>`,
|
|
30
|
-
})
|
|
31
|
-
class Host {}
|
|
32
|
-
|
|
33
|
-
const { container } = await render(Host);
|
|
34
|
-
await flush();
|
|
35
|
-
|
|
36
|
-
const listEl = container.querySelector('kj-list') as HTMLElement;
|
|
37
|
-
expect(listEl).toBeTruthy();
|
|
38
|
-
expect(listEl.classList.contains('kj-list')).toBe(true);
|
|
39
|
-
|
|
40
|
-
const items = container.querySelectorAll('kj-list-item');
|
|
41
|
-
expect(items).toHaveLength(3);
|
|
42
|
-
items.forEach((item) => {
|
|
43
|
-
expect((item as HTMLElement).classList.contains('kj-list-item')).toBe(true);
|
|
44
|
-
});
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
it('forwards aliased inputs (orientation, divided, hoverable) to the underlying directive', async () => {
|
|
48
|
-
@Component({
|
|
49
|
-
standalone: true,
|
|
50
|
-
imports,
|
|
51
|
-
template: `
|
|
52
|
-
<kj-list ariaLabel="Story rail" orientation="horizontal" [divided]="true" [hoverable]="true">
|
|
53
|
-
<kj-list-item>A</kj-list-item>
|
|
54
|
-
<kj-list-item>B</kj-list-item>
|
|
55
|
-
</kj-list>`,
|
|
56
|
-
})
|
|
57
|
-
class Host {}
|
|
58
|
-
|
|
59
|
-
const { container } = await render(Host);
|
|
60
|
-
await flush();
|
|
61
|
-
|
|
62
|
-
const listEl = container.querySelector('kj-list') as HTMLElement;
|
|
63
|
-
// The directive emits the data-* mirrors that themes read for chrome.
|
|
64
|
-
expect(listEl.getAttribute('data-orientation')).toBe('horizontal');
|
|
65
|
-
expect(listEl.hasAttribute('data-divided')).toBe(true);
|
|
66
|
-
expect(listEl.hasAttribute('data-hoverable')).toBe(true);
|
|
67
|
-
// Default `as="ul"` → directive emits role="list" (defeats Safari's
|
|
68
|
-
// `list-style: none` voice-stripping heuristic).
|
|
69
|
-
expect(listEl.getAttribute('role')).toBe('list');
|
|
70
|
-
expect(listEl.getAttribute('aria-label')).toBe('Story rail');
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
it('forwards aliased item inputs (active, disabled) to the per-row directive', async () => {
|
|
74
|
-
@Component({
|
|
75
|
-
standalone: true,
|
|
76
|
-
imports,
|
|
77
|
-
template: `
|
|
78
|
-
<kj-list ariaLabel="L">
|
|
79
|
-
<kj-list-item [active]="true">A</kj-list-item>
|
|
80
|
-
<kj-list-item [disabled]="true">B</kj-list-item>
|
|
81
|
-
</kj-list>`,
|
|
82
|
-
})
|
|
83
|
-
class Host {}
|
|
84
|
-
|
|
85
|
-
const { container } = await render(Host);
|
|
86
|
-
await flush();
|
|
87
|
-
|
|
88
|
-
const items = container.querySelectorAll('kj-list-item');
|
|
89
|
-
expect(items[0].hasAttribute('data-active')).toBe(true);
|
|
90
|
-
expect(items[0].hasAttribute('data-disabled')).toBe(false);
|
|
91
|
-
expect(items[1].hasAttribute('data-active')).toBe(false);
|
|
92
|
-
expect(items[1].hasAttribute('data-disabled')).toBe(true);
|
|
93
|
-
// The list-item host is a `<kj-list-item>` (not `<li>`) — the directive
|
|
94
|
-
// must emit role="listitem" to pair with the container's role="list".
|
|
95
|
-
expect(items[0].getAttribute('role')).toBe('listitem');
|
|
96
|
-
expect(items[1].getAttribute('role')).toBe('listitem');
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
it('produces a navigation landmark when as="nav"', async () => {
|
|
100
|
-
@Component({
|
|
101
|
-
standalone: true,
|
|
102
|
-
imports,
|
|
103
|
-
template: `
|
|
104
|
-
<kj-list as="nav" ariaLabel="Primary">
|
|
105
|
-
<kj-list-item><a href="#a">A</a></kj-list-item>
|
|
106
|
-
<kj-list-item><a href="#b">B</a></kj-list-item>
|
|
107
|
-
</kj-list>`,
|
|
108
|
-
})
|
|
109
|
-
class Host {}
|
|
110
|
-
|
|
111
|
-
const { container } = await render(Host);
|
|
112
|
-
await flush();
|
|
113
|
-
|
|
114
|
-
const listEl = container.querySelector('kj-list') as HTMLElement;
|
|
115
|
-
// The wrapper layers `role="navigation"` on the host so the list doubles
|
|
116
|
-
// as a landmark; the underlying directive omits its `role="list"` in this
|
|
117
|
-
// mode (a landmark cannot also be a list).
|
|
118
|
-
expect(listEl.getAttribute('role')).toBe('navigation');
|
|
119
|
-
expect(listEl.getAttribute('aria-label')).toBe('Primary');
|
|
120
|
-
});
|
|
121
|
-
});
|
package/src/list/list.ts
DELETED
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ChangeDetectionStrategy,
|
|
3
|
-
Component,
|
|
4
|
-
ViewEncapsulation,
|
|
5
|
-
booleanAttribute,
|
|
6
|
-
computed,
|
|
7
|
-
input,
|
|
8
|
-
} from '@angular/core';
|
|
9
|
-
import { KjList, KjListRow, type KjListAs, type KjListOrientation } from '@kouji-ui/core';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Themed wrapper around the headless `KjList` directive. Re-maps the directive's
|
|
13
|
-
* `kj`-prefixed inputs to terse public names (`orientation`, `divided`,
|
|
14
|
-
* `hoverable`, `arrowNavigation`, `wrap`) and surfaces the `as` declaration so
|
|
15
|
-
* theme CSS can paint chrome (divider rules, hover highlight, orientation flex
|
|
16
|
-
* direction) off the standard `data-*` mirrors emitted by the directive.
|
|
17
|
-
*
|
|
18
|
-
* The wrapper host is the list root: composing `KjList` via `hostDirectives`
|
|
19
|
-
* means `<kj-list>` itself carries `role="list"` (or omits it when
|
|
20
|
-
* `as="nav"`, where the wrapper opts the host into the `navigation` landmark
|
|
21
|
-
* via `role="navigation"`).
|
|
22
|
-
*
|
|
23
|
-
* **Active vs. selected discipline.** The wrapper paints `data-active` on the
|
|
24
|
-
* row chrome but never infers ARIA. Consumers set `aria-current="page"` (or
|
|
25
|
-
* `step`, `date`, `true`) on the projected `<a>` / `<button>` because the
|
|
26
|
-
* right token depends on the consumer's domain — it is never a List concern.
|
|
27
|
-
*
|
|
28
|
-
* @example Settings list with leading icons
|
|
29
|
-
* ```html
|
|
30
|
-
* <kj-list ariaLabel="Account settings" divided hoverable>
|
|
31
|
-
* <kj-list-item>Profile</kj-list-item>
|
|
32
|
-
* <kj-list-item>Notifications</kj-list-item>
|
|
33
|
-
* <kj-list-item>Billing</kj-list-item>
|
|
34
|
-
* </kj-list>
|
|
35
|
-
* ```
|
|
36
|
-
*
|
|
37
|
-
* @example Sidebar nav with active row
|
|
38
|
-
* ```html
|
|
39
|
-
* <kj-list as="nav" arrowNavigation ariaLabel="Primary">
|
|
40
|
-
* <kj-list-item active="true">
|
|
41
|
-
* <a href="/home" aria-current="page">Home</a>
|
|
42
|
-
* </kj-list-item>
|
|
43
|
-
* <kj-list-item>
|
|
44
|
-
* <a href="/settings">Settings</a>
|
|
45
|
-
* </kj-list-item>
|
|
46
|
-
* </kj-list>
|
|
47
|
-
* ```
|
|
48
|
-
*
|
|
49
|
-
* @doc-example Default
|
|
50
|
-
* A settings list with five rows — anchors the chrome (no dividers, no hover).
|
|
51
|
-
* @doc-file list.example.ts
|
|
52
|
-
* @doc-example Usage
|
|
53
|
-
* Common list shapes — divided, hoverable, and a nav landmark — assembled
|
|
54
|
-
* as a copy-paste starting point.
|
|
55
|
-
* @doc-file list.usage.example.ts
|
|
56
|
-
* @doc-example Divided
|
|
57
|
-
* `[divided]="true"` paints between-row separators via theme CSS.
|
|
58
|
-
* @doc-file list.divided.example.ts
|
|
59
|
-
* @doc-example Nav landmark
|
|
60
|
-
* `as="nav"` opts the host into the `navigation` landmark with a label.
|
|
61
|
-
* @doc-file list.nav.example.ts
|
|
62
|
-
* @doc-example Interactive rows
|
|
63
|
-
* Rows project `<a>` / `<button>` children that own focus and activation.
|
|
64
|
-
* @doc-file list.interactive.example.ts
|
|
65
|
-
* @doc-example With icons and badges
|
|
66
|
-
* Icon prefix + trailing badge combo for status-rich rows.
|
|
67
|
-
* @doc-file list.with-icons.example.ts
|
|
68
|
-
*
|
|
69
|
-
* @doc-keyboard
|
|
70
|
-
* Tab — Moves focus to the next interactive child (the row itself is not focusable)
|
|
71
|
-
* Arrow up|down — Moves focus across rows when [arrowNavigation]="true" (roving tabindex)
|
|
72
|
-
* Home|End — Jump to the first / last row when [arrowNavigation]="true"
|
|
73
|
-
*
|
|
74
|
-
* @doc-aria
|
|
75
|
-
* role — "list" by default; "navigation" when as="nav"
|
|
76
|
-
* aria-label — Bound from [ariaLabel]; required when as="nav"
|
|
77
|
-
* aria-labelledby — Bound from [ariaLabelledby] when an external heading labels the list
|
|
78
|
-
* data-active — Mirrors a list-item's [active] for theme CSS; consumers wire aria-current separately
|
|
79
|
-
* data-disabled— Mirrors a list-item's [disabled] for theme CSS
|
|
80
|
-
*
|
|
81
|
-
* @doc-touch
|
|
82
|
-
* `--kj-list-row-min-h` defaults to 44 px so each row already meets WCAG
|
|
83
|
-
* 2.5.5 when the row hosts an interactive child.
|
|
84
|
-
*
|
|
85
|
-
* @doc-a11y
|
|
86
|
-
* The list never infers `aria-current` — consumers set the right token
|
|
87
|
-
* (`page` / `step` / `date` / `true`) on the projected `<a>` or
|
|
88
|
-
* `<button>` because the meaning is domain-specific. Disabled rows paint
|
|
89
|
-
* chrome via `data-disabled`; the projected child still owns its own
|
|
90
|
-
* `tabindex` / `aria-disabled` discipline.
|
|
91
|
-
*
|
|
92
|
-
* @doc-related divider,menubar,breadcrumb,card
|
|
93
|
-
*
|
|
94
|
-
* @doc-css-var
|
|
95
|
-
* --kj-list-bg — Background fill of the list container.
|
|
96
|
-
* --kj-list-fg — Foreground (text) color of the list.
|
|
97
|
-
* --kj-list-border-color — Border color for bordered + divided variants.
|
|
98
|
-
* --kj-list-radius — Outer corner radius of the list container.
|
|
99
|
-
* --kj-list-row-gap — Gap between rows. Zero by default (rows touch).
|
|
100
|
-
* --kj-list-row-padding-x — Horizontal padding inside each row. Sizes override.
|
|
101
|
-
* --kj-list-row-padding-y — Vertical padding inside each row. Sizes override.
|
|
102
|
-
* --kj-list-row-radius — Corner radius applied to each row's chrome.
|
|
103
|
-
* --kj-list-row-min-h — Minimum row height. Default 44px (WCAG 2.5.5).
|
|
104
|
-
*
|
|
105
|
-
* @doc-category Library/Data display
|
|
106
|
-
* @doc
|
|
107
|
-
* @doc-name list
|
|
108
|
-
* @doc-description Themed list surface for settings panels, sidebar navigation, and data feeds.
|
|
109
|
-
* @doc-is-main
|
|
110
|
-
*/
|
|
111
|
-
@Component({
|
|
112
|
-
selector: 'kj-list',
|
|
113
|
-
standalone: true,
|
|
114
|
-
hostDirectives: [
|
|
115
|
-
{
|
|
116
|
-
directive: KjList,
|
|
117
|
-
inputs: [
|
|
118
|
-
'kjAs: as',
|
|
119
|
-
'kjOrientation: orientation',
|
|
120
|
-
'kjDivided: divided',
|
|
121
|
-
'kjHoverable: hoverable',
|
|
122
|
-
'kjArrowNavigation: arrowNavigation',
|
|
123
|
-
'kjListWrap: wrap',
|
|
124
|
-
],
|
|
125
|
-
},
|
|
126
|
-
],
|
|
127
|
-
template: `<ng-content />`,
|
|
128
|
-
styleUrl: './list.css',
|
|
129
|
-
encapsulation: ViewEncapsulation.None,
|
|
130
|
-
host: {
|
|
131
|
-
'class': 'kj-list',
|
|
132
|
-
'[attr.role]': 'roleAttr()',
|
|
133
|
-
'[attr.aria-label]': 'ariaLabel() || null',
|
|
134
|
-
'[attr.aria-labelledby]': 'ariaLabelledby() || null',
|
|
135
|
-
},
|
|
136
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
137
|
-
})
|
|
138
|
-
export class KjListComponent {
|
|
139
|
-
/**
|
|
140
|
-
* Declares which semantic element the consumer wants the list to behave as.
|
|
141
|
-
* The wrapper does not literally swap host tags (the host stays
|
|
142
|
-
* `<kj-list>`), but the directive uses `as` to decide whether to emit
|
|
143
|
-
* `role="list"`, and the wrapper layers a `role="navigation"` on top when
|
|
144
|
-
* `as="nav"` so the host doubles as a landmark.
|
|
145
|
-
*/
|
|
146
|
-
readonly as = input<KjListAs>('ul');
|
|
147
|
-
|
|
148
|
-
/** List axis. Drives `data-orientation` on the host for theme CSS. */
|
|
149
|
-
readonly orientation = input<KjListOrientation>('vertical');
|
|
150
|
-
|
|
151
|
-
/** Whether the list draws between-row borders. CSS-only effect. */
|
|
152
|
-
readonly divided = input(false, { transform: booleanAttribute });
|
|
153
|
-
|
|
154
|
-
/** Whether rows highlight on hover. Off by default — purely informational lists should not hint at interactivity. */
|
|
155
|
-
readonly hoverable = input(false, { transform: booleanAttribute });
|
|
156
|
-
|
|
157
|
-
/** Opt-in roving-tabindex group for sidebar-nav-list use cases. Mirrors the accordion arrow-nav pattern. */
|
|
158
|
-
readonly arrowNavigation = input(false, { transform: booleanAttribute });
|
|
159
|
-
|
|
160
|
-
/** Whether arrow-key navigation wraps at the ends. Only meaningful when `arrowNavigation` is `true`. */
|
|
161
|
-
readonly wrap = input(true, { transform: booleanAttribute });
|
|
162
|
-
|
|
163
|
-
/** Accessible name for the list. Required for `as="nav"` (landmark naming rule). */
|
|
164
|
-
readonly ariaLabel = input<string | undefined>(undefined);
|
|
165
|
-
|
|
166
|
-
/** Accessible name reference for the list. Use when an existing heading labels the list. */
|
|
167
|
-
readonly ariaLabelledby = input<string | undefined>(undefined);
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* @internal Computed role for the wrapper host. When `as="nav"`, the host
|
|
171
|
-
* acts as the navigation landmark; otherwise it stays a plain `role="list"`.
|
|
172
|
-
* The wrapper owns this binding (rather than letting the composed `KjList`
|
|
173
|
-
* directive emit it) because Angular gives the component-level host binding
|
|
174
|
-
* priority over a host-directive's binding on the same attribute, so the
|
|
175
|
-
* directive's value would otherwise be silently shadowed.
|
|
176
|
-
*/
|
|
177
|
-
protected readonly roleAttr = computed<string | null>(() =>
|
|
178
|
-
this.as() === 'nav' ? 'navigation' : 'list',
|
|
179
|
-
);
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
/**
|
|
183
|
-
* Per-row wrapper around the headless `KjListItem` directive. Re-maps
|
|
184
|
-
* `kjActive` / `kjDisabled` to terse public names and ensures the row chrome
|
|
185
|
-
* (active highlight, disabled dim) reads off the same `data-*` attributes the
|
|
186
|
-
* core directive emits.
|
|
187
|
-
*
|
|
188
|
-
* The list-item host is **not** a focus stop. Keyboard reachability lives on
|
|
189
|
-
* the projected interactive child (`<a>`, `<button>`). Disabling the row is a
|
|
190
|
-
* two-layer story: `disabled` on `<kj-list-item>` paints the chrome via
|
|
191
|
-
* `data-disabled`, and the projected child wires its own `aria-disabled` /
|
|
192
|
-
* `tabindex` discipline (e.g. via `KjDisabled` on a button).
|
|
193
|
-
*
|
|
194
|
-
* @doc-category Library/Data display
|
|
195
|
-
* @doc
|
|
196
|
-
* @doc-name list
|
|
197
|
-
*/
|
|
198
|
-
@Component({
|
|
199
|
-
selector: 'kj-list-item',
|
|
200
|
-
standalone: true,
|
|
201
|
-
hostDirectives: [
|
|
202
|
-
{
|
|
203
|
-
directive: KjListRow,
|
|
204
|
-
inputs: ['kjActive: active', 'kjDisabled: disabled'],
|
|
205
|
-
},
|
|
206
|
-
],
|
|
207
|
-
template: `<ng-content />`,
|
|
208
|
-
encapsulation: ViewEncapsulation.None,
|
|
209
|
-
host: { class: 'kj-list-item' },
|
|
210
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
211
|
-
})
|
|
212
|
-
export class KjListItemComponent {
|
|
213
|
-
/**
|
|
214
|
-
* Whether the row is the current/active selection (e.g. the current page in
|
|
215
|
-
* a sidebar nav). Reflects to `data-active=""` on the host. Consumers must
|
|
216
|
-
* also set the appropriate `aria-current` token on the projected
|
|
217
|
-
* link/button.
|
|
218
|
-
*/
|
|
219
|
-
readonly active = input(false, { transform: booleanAttribute });
|
|
220
|
-
|
|
221
|
-
/**
|
|
222
|
-
* Whether the row is disabled. Reflects to `data-disabled=""` on the host so
|
|
223
|
-
* theme CSS can dim the chrome. Does not block keyboard reachability — that
|
|
224
|
-
* belongs to the projected interactive child.
|
|
225
|
-
*/
|
|
226
|
-
readonly disabled = input(false, { transform: booleanAttribute });
|
|
227
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
-
import { KjListComponent, KjListItemComponent } from './list';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Common list shapes — a divided+hoverable settings list and a sidebar-nav
|
|
6
|
-
* landmark with an active row. Copy-paste starting point.
|
|
7
|
-
*/
|
|
8
|
-
@Component({
|
|
9
|
-
selector: 'kj-list-usage-example',
|
|
10
|
-
standalone: true,
|
|
11
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
12
|
-
imports: [KjListComponent, KjListItemComponent],
|
|
13
|
-
styles: [`
|
|
14
|
-
:host { display: grid; gap: var(--kj-space-lg); grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
|
|
15
|
-
h4 { margin: 0 0 var(--kj-space-sm); font: 600 var(--kj-text-sm)/1.4 var(--kj-font-sans); color: var(--kj-fg-muted); }
|
|
16
|
-
a { color: inherit; text-decoration: none; }
|
|
17
|
-
`],
|
|
18
|
-
template: `
|
|
19
|
-
<section>
|
|
20
|
-
<h4>Settings</h4>
|
|
21
|
-
<kj-list ariaLabel="Account settings" [divided]="true" [hoverable]="true">
|
|
22
|
-
<kj-list-item>Profile</kj-list-item>
|
|
23
|
-
<kj-list-item>Notifications</kj-list-item>
|
|
24
|
-
<kj-list-item>Billing</kj-list-item>
|
|
25
|
-
<kj-list-item>Security</kj-list-item>
|
|
26
|
-
</kj-list>
|
|
27
|
-
</section>
|
|
28
|
-
|
|
29
|
-
<section>
|
|
30
|
-
<h4>Sidebar nav</h4>
|
|
31
|
-
<kj-list as="nav" [arrowNavigation]="true" ariaLabel="Primary navigation">
|
|
32
|
-
<kj-list-item [active]="true">
|
|
33
|
-
<a href="/home" aria-current="page">Home</a>
|
|
34
|
-
</kj-list-item>
|
|
35
|
-
<kj-list-item>
|
|
36
|
-
<a href="/projects">Projects</a>
|
|
37
|
-
</kj-list-item>
|
|
38
|
-
<kj-list-item>
|
|
39
|
-
<a href="/settings">Settings</a>
|
|
40
|
-
</kj-list-item>
|
|
41
|
-
</kj-list>
|
|
42
|
-
</section>
|
|
43
|
-
`,
|
|
44
|
-
})
|
|
45
|
-
export class KjListUsageExample {}
|
|
@@ -1,6 +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 { KjMenubarDisabledItemExample } from './menubar.disabled-item.example';
|
|
4
|
-
export { KjMenubarExample } from './menubar.example';
|
|
5
|
-
export { KjMenubarWithShortcutsExample } from './menubar.with-shortcuts.example';
|
|
6
|
-
export { KjMenubarWithSubmenuExample } from './menubar.with-submenu.example';
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
-
import { KjMenubarComponent, KjMenubarItemComponent } from '../menubar';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Menubar with a disabled top-level item. `[kjDisabled]="true"` drops the
|
|
6
|
-
* item from the keyboard cycle, dims it, and prevents activation.
|
|
7
|
-
*/
|
|
8
|
-
@Component({
|
|
9
|
-
selector: 'kj-menubar-disabled-item-example',
|
|
10
|
-
standalone: true,
|
|
11
|
-
imports: [KjMenubarComponent, KjMenubarItemComponent],
|
|
12
|
-
styles: [`:host { display: block; }`],
|
|
13
|
-
template: `
|
|
14
|
-
<kj-menubar kjAriaLabel="Application">
|
|
15
|
-
<kj-menubar-item>File</kj-menubar-item>
|
|
16
|
-
<kj-menubar-item>Edit</kj-menubar-item>
|
|
17
|
-
<kj-menubar-item [kjDisabled]="true">View</kj-menubar-item>
|
|
18
|
-
<kj-menubar-item>Help</kj-menubar-item>
|
|
19
|
-
</kj-menubar>
|
|
20
|
-
`,
|
|
21
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
22
|
-
})
|
|
23
|
-
export class KjMenubarDisabledItemExample {}
|