@konce-pt/react 0.12.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +122 -64
- package/dist/accordion/accordion.d.ts +14 -6
- package/dist/accordion/accordion.js +14 -7
- package/dist/accordion/llms.txt +22 -10
- package/dist/alert/alert.d.ts +2 -2
- package/dist/alert/alert.js +2 -2
- package/dist/alert/llms.txt +10 -10
- package/dist/app-shell/app-shell.d.ts +14 -14
- package/dist/app-shell/app-shell.js +11 -11
- package/dist/app-shell/llms.txt +13 -13
- package/dist/auth/auth-types.d.ts +6 -6
- package/dist/auth/auth.d.ts +2 -2
- package/dist/auth/auth.js +7 -7
- package/dist/auth/llms.txt +9 -9
- package/dist/autocomplete/autocomplete.d.ts +19 -6
- package/dist/autocomplete/autocomplete.js +23 -10
- package/dist/autocomplete/llms.txt +16 -5
- package/dist/avatar/avatar.d.ts +6 -6
- package/dist/avatar/avatar.js +5 -5
- package/dist/avatar/llms.txt +10 -10
- package/dist/avatar-group/avatar-group.d.ts +4 -4
- package/dist/avatar-group/avatar-group.js +3 -3
- package/dist/avatar-group/llms.txt +8 -8
- package/dist/backdrop/backdrop.d.ts +7 -7
- package/dist/backdrop/backdrop.js +16 -16
- package/dist/backdrop/llms.txt +27 -27
- package/dist/badge/badge.d.ts +3 -3
- package/dist/badge/badge.js +1 -1
- package/dist/badge/llms.txt +11 -11
- package/dist/bottom-sheet/bottom-sheet.d.ts +4 -4
- package/dist/bottom-sheet/bottom-sheet.js +2 -2
- package/dist/bottom-sheet/llms.txt +9 -9
- package/dist/breadcrumb/breadcrumb.d.ts +2 -2
- package/dist/breadcrumb/breadcrumb.js +3 -3
- package/dist/breadcrumb/llms.txt +3 -3
- package/dist/button/button.d.ts +3 -3
- package/dist/button/button.js +8 -8
- package/dist/button/llms.txt +27 -19
- package/dist/button-group/button-group.d.ts +9 -9
- package/dist/button-group/button-group.js +30 -8
- package/dist/button-group/llms.txt +20 -14
- package/dist/card/card.d.ts +8 -8
- package/dist/card/card.js +6 -6
- package/dist/card/llms.txt +20 -20
- package/dist/carousel/carousel.d.ts +6 -6
- package/dist/carousel/carousel.js +4 -4
- package/dist/carousel/llms.txt +10 -10
- package/dist/charts/chart-legend.d.ts +3 -3
- package/dist/charts/chart-legend.js +1 -1
- package/dist/charts/chart-tooltip.d.ts +3 -3
- package/dist/charts/chart-tooltip.js +1 -1
- package/dist/charts/chart.d.ts +1 -1
- package/dist/charts/chart.js +8 -8
- package/dist/charts/llms.txt +6 -6
- package/dist/charts-entry/public-api.js +2 -2
- package/dist/chat/chat.d.ts +17 -10
- package/dist/chat/chat.js +42 -18
- package/dist/chat/llms.txt +32 -17
- package/dist/chat-composer/chat-composer.d.ts +17 -7
- package/dist/chat-composer/chat-composer.js +21 -8
- package/dist/chat-composer/llms.txt +20 -11
- package/dist/chat-dock/chat-dock.d.ts +11 -4
- package/dist/chat-dock/chat-dock.js +9 -6
- package/dist/chat-dock/llms.txt +15 -14
- package/dist/chat-entry/public-api.js +1 -1
- package/dist/chat-message/chat-message.d.ts +12 -5
- package/dist/chat-message/chat-message.js +17 -7
- package/dist/chat-message/llms.txt +16 -15
- package/dist/chat-typing/chat-typing.d.ts +2 -2
- package/dist/chat-typing/chat-typing.js +3 -3
- package/dist/chat-typing/llms.txt +6 -6
- package/dist/checkbox/checkbox.d.ts +13 -6
- package/dist/checkbox/checkbox.js +26 -7
- package/dist/checkbox/llms.txt +24 -12
- package/dist/chip/chip.d.ts +4 -4
- package/dist/chip/chip.js +2 -2
- package/dist/chip/llms.txt +11 -11
- package/dist/chips-input/chips-input.d.ts +4 -4
- package/dist/chips-input/chips-input.js +35 -9
- package/dist/chips-input/llms.txt +15 -8
- package/dist/clock/clock.d.ts +4 -4
- package/dist/clock/clock.js +7 -7
- package/dist/clock/llms.txt +8 -8
- package/dist/color-picker/color-picker.d.ts +6 -6
- package/dist/color-picker/color-picker.js +3 -3
- package/dist/color-picker/llms.txt +5 -5
- package/dist/confirm/confirm-container.d.ts +3 -3
- package/dist/confirm/confirm-container.js +5 -5
- package/dist/confirm/confirm-store.d.ts +4 -4
- package/dist/confirm/confirm-store.js +7 -7
- package/dist/confirm/llms.txt +6 -6
- package/dist/context-menu/context-menu.d.ts +1 -1
- package/dist/context-menu/context-menu.js +5 -5
- package/dist/context-menu/llms.txt +7 -7
- package/dist/data-table/data-table-types.d.ts +5 -5
- package/dist/data-table/data-table.d.ts +29 -8
- package/dist/data-table/data-table.js +340 -95
- package/dist/data-table/export-csv.d.ts +3 -3
- package/dist/data-table/export-csv.js +4 -4
- package/dist/data-table/llms.txt +127 -94
- package/dist/data-view/data-view.d.ts +13 -5
- package/dist/data-view/data-view.js +67 -6
- package/dist/data-view/llms.txt +29 -10
- package/dist/date-range/date-range.d.ts +9 -9
- package/dist/date-range/date-range.js +24 -24
- package/dist/date-range/llms.txt +20 -20
- package/dist/datepicker/datepicker.d.ts +10 -10
- package/dist/datepicker/datepicker.js +29 -29
- package/dist/datepicker/llms.txt +24 -24
- package/dist/dialog/dialog.d.ts +4 -4
- package/dist/dialog/dialog.js +4 -4
- package/dist/dialog/llms.txt +11 -11
- package/dist/divider/divider.d.ts +1 -1
- package/dist/divider/llms.txt +4 -4
- package/dist/drawer/drawer.d.ts +5 -5
- package/dist/drawer/drawer.js +2 -2
- package/dist/drawer/llms.txt +11 -11
- package/dist/empty/empty.d.ts +2 -2
- package/dist/empty/empty.js +1 -1
- package/dist/empty/llms.txt +9 -9
- package/dist/fab/fab.d.ts +1 -1
- package/dist/fab/fab.js +1 -1
- package/dist/fab/llms.txt +10 -6
- package/dist/fieldset/fieldset.d.ts +18 -4
- package/dist/fieldset/fieldset.js +9 -6
- package/dist/fieldset/llms.txt +26 -9
- package/dist/file-upload/file-upload.d.ts +3 -3
- package/dist/file-upload/file-upload.js +7 -7
- package/dist/file-upload/llms.txt +7 -7
- package/dist/form-field/form-field-context.d.ts +4 -4
- package/dist/form-field/form-field.d.ts +12 -4
- package/dist/form-field/form-field.js +26 -6
- package/dist/form-field/llms.txt +25 -11
- package/dist/galleria/galleria.d.ts +3 -3
- package/dist/galleria/galleria.js +5 -5
- package/dist/galleria/llms.txt +7 -7
- package/dist/grid/col.d.ts +4 -4
- package/dist/grid/col.js +2 -2
- package/dist/grid/flex.d.ts +3 -3
- package/dist/grid/flex.js +1 -1
- package/dist/grid/grid.d.ts +7 -7
- package/dist/grid/grid.js +3 -3
- package/dist/grid/layout.d.ts +2 -2
- package/dist/grid/layout.js +2 -2
- package/dist/grid/llms.txt +15 -15
- package/dist/grid-entry/public-api.js +1 -1
- package/dist/i18n/i18n-context.d.ts +3 -3
- package/dist/i18n/i18n-context.js +7 -7
- package/dist/icon/icon-registry.d.ts +3 -3
- package/dist/icon/icon-registry.js +3 -3
- package/dist/icon/icon.d.ts +4 -4
- package/dist/icon/icon.js +6 -6
- package/dist/icon/llms.txt +13 -13
- package/dist/icon-button/icon-button.d.ts +2 -2
- package/dist/icon-button/icon-button.js +1 -1
- package/dist/icon-button/llms.txt +9 -5
- package/dist/icons-entry/public-api.d.ts +2 -2
- package/dist/icons-entry/public-api.js +3 -3
- package/dist/image/image.js +1 -1
- package/dist/image/llms.txt +13 -13
- package/dist/input/input.d.ts +18 -5
- package/dist/input/input.js +21 -6
- package/dist/input/llms.txt +25 -11
- package/dist/input-mask/input-mask.d.ts +1 -1
- package/dist/input-mask/input-mask.js +2 -2
- package/dist/input-mask/llms.txt +5 -5
- package/dist/input-number/input-number.d.ts +9 -9
- package/dist/input-number/input-number.js +11 -11
- package/dist/input-number/llms.txt +14 -14
- package/dist/input-otp/input-otp.d.ts +6 -6
- package/dist/input-otp/input-otp.js +10 -10
- package/dist/input-otp/llms.txt +9 -9
- package/dist/internal/calendar-focus.d.ts +1 -1
- package/dist/internal/calendar-focus.js +3 -3
- package/dist/internal/cn.d.ts +1 -1
- package/dist/internal/mask.d.ts +2 -2
- package/dist/internal/mask.js +4 -4
- package/dist/internal/option-key.d.ts +2 -2
- package/dist/internal/option-key.js +2 -2
- package/dist/internal/option-nav.d.ts +4 -4
- package/dist/internal/option-nav.js +5 -5
- package/dist/internal/overlay-container.js +1 -1
- package/dist/internal/overlay.d.ts +3 -3
- package/dist/internal/overlay.js +8 -8
- package/dist/internal/password-strength.d.ts +2 -2
- package/dist/internal/password-strength.js +6 -6
- package/dist/internal/roving.d.ts +2 -2
- package/dist/internal/roving.js +3 -3
- package/dist/internal/scroll-lock.d.ts +1 -1
- package/dist/internal/scroll-lock.js +2 -2
- package/dist/internal/slot-children.d.ts +3 -3
- package/dist/internal/slot-children.js +4 -4
- package/dist/internal/slot.d.ts +3 -3
- package/dist/internal/slot.js +2 -2
- package/dist/internal/step.d.ts +3 -3
- package/dist/internal/step.js +4 -4
- package/dist/internal/tween.d.ts +5 -5
- package/dist/internal/tween.js +5 -5
- package/dist/internal/types.d.ts +2 -2
- package/dist/internal/use-breakpoint.d.ts +2 -2
- package/dist/internal/use-breakpoint.js +4 -4
- package/dist/internal/use-controllable-state.d.ts +1 -1
- package/dist/internal/use-controllable-state.js +3 -3
- package/dist/internal/use-id.d.ts +2 -2
- package/dist/internal/use-id.js +2 -2
- package/dist/internal/use-modal-focus.d.ts +1 -1
- package/dist/internal/use-modal-focus.js +3 -3
- package/dist/knob/knob.d.ts +4 -4
- package/dist/knob/knob.js +14 -10
- package/dist/knob/llms.txt +17 -12
- package/dist/listbox/listbox.d.ts +6 -6
- package/dist/listbox/listbox.js +9 -9
- package/dist/listbox/llms.txt +10 -10
- package/dist/loader/llms.txt +56 -0
- package/dist/loader/loader.d.ts +49 -0
- package/dist/loader/loader.js +68 -0
- package/dist/map/llms.txt +25 -22
- package/dist/map/map-create-dialog.d.ts +4 -4
- package/dist/map/map-create-dialog.js +10 -10
- package/dist/map/map-hours-field.d.ts +4 -4
- package/dist/map/map-hours-field.js +7 -7
- package/dist/map/map-image-field.d.ts +2 -2
- package/dist/map/map-image-field.js +4 -4
- package/dist/map/map-legend.d.ts +4 -4
- package/dist/map/map-legend.js +2 -2
- package/dist/map/map-poi-card.d.ts +3 -3
- package/dist/map/map-poi-card.js +9 -9
- package/dist/map/map-search.d.ts +17 -6
- package/dist/map/map-search.js +21 -18
- package/dist/map/map.d.ts +21 -14
- package/dist/map/map.js +30 -29
- package/dist/map/ports.d.ts +9 -9
- package/dist/map/ports.js +6 -6
- package/dist/map-entry/public-api.js +2 -2
- package/dist/megamenu/llms.txt +9 -9
- package/dist/megamenu/megamenu.d.ts +6 -6
- package/dist/megamenu/megamenu.js +10 -10
- package/dist/mention/llms.txt +15 -15
- package/dist/mention/mention.d.ts +5 -5
- package/dist/mention/mention.js +2 -2
- package/dist/mention/mentions.d.ts +1 -1
- package/dist/mention/mentions.js +1 -1
- package/dist/menu/llms.txt +12 -12
- package/dist/menu/menu-item.d.ts +4 -4
- package/dist/menu/menu-keys.d.ts +2 -2
- package/dist/menu/menu-keys.js +5 -5
- package/dist/menu/menu.d.ts +2 -2
- package/dist/menu/menu.js +6 -6
- package/dist/menubar/llms.txt +10 -10
- package/dist/menubar/menubar.d.ts +5 -5
- package/dist/menubar/menubar.js +10 -10
- package/dist/meter-group/llms.txt +12 -12
- package/dist/meter-group/meter-group.d.ts +2 -2
- package/dist/meter-group/meter-group.js +1 -1
- package/dist/motion/motion-context.d.ts +22 -0
- package/dist/motion/motion-context.js +28 -0
- package/dist/order-list/llms.txt +22 -10
- package/dist/order-list/order-list.d.ts +12 -4
- package/dist/order-list/order-list.js +104 -21
- package/dist/paginator/llms.txt +8 -8
- package/dist/paginator/paginator.js +1 -1
- package/dist/panel/llms.txt +25 -13
- package/dist/panel/panel.d.ts +11 -3
- package/dist/panel/panel.js +7 -4
- package/dist/password/llms.txt +16 -8
- package/dist/password/password.d.ts +2 -2
- package/dist/password/password.js +24 -3
- package/dist/peek/llms.txt +10 -10
- package/dist/peek/peek.d.ts +6 -6
- package/dist/peek/peek.js +7 -7
- package/dist/pick-list/llms.txt +33 -13
- package/dist/pick-list/pick-list.d.ts +12 -4
- package/dist/pick-list/pick-list.js +111 -23
- package/dist/popover/llms.txt +11 -11
- package/dist/popover/popover.d.ts +4 -4
- package/dist/popover/popover.js +5 -5
- package/dist/progress/llms.txt +17 -17
- package/dist/progress/progress.d.ts +7 -7
- package/dist/progress/progress.js +6 -6
- package/dist/public-api.d.ts +15 -3
- package/dist/public-api.js +13 -7
- package/dist/radio-group/llms.txt +13 -6
- package/dist/radio-group/radio-group.d.ts +11 -4
- package/dist/radio-group/radio-group.js +15 -7
- package/dist/rating/llms.txt +20 -13
- package/dist/rating/rating-pointer.d.ts +16 -0
- package/dist/rating/rating-pointer.js +26 -0
- package/dist/rating/rating.d.ts +6 -6
- package/dist/rating/rating.js +76 -12
- package/dist/rich-text/lists.d.ts +2 -2
- package/dist/rich-text/lists.js +7 -7
- package/dist/rich-text/llms.txt +26 -17
- package/dist/rich-text/rich-text.d.ts +12 -7
- package/dist/rich-text/rich-text.js +78 -54
- package/dist/rich-text/sanitize.d.ts +3 -3
- package/dist/rich-text/sanitize.js +12 -12
- package/dist/rich-text/tables.d.ts +3 -3
- package/dist/rich-text/tables.js +3 -3
- package/dist/roadmap/llms.txt +15 -15
- package/dist/roadmap/roadmap.d.ts +6 -6
- package/dist/roadmap/roadmap.js +19 -19
- package/dist/roadmap-entry/public-api.js +2 -2
- package/dist/scroll-top/llms.txt +6 -6
- package/dist/scroll-top/scroll-top.d.ts +1 -1
- package/dist/scroll-top/scroll-top.js +1 -1
- package/dist/select/llms.txt +19 -12
- package/dist/select/select.d.ts +8 -8
- package/dist/select/select.js +47 -21
- package/dist/shared/types.d.ts +5 -5
- package/dist/shared/types.js +1 -1
- package/dist/sidenav/llms.txt +9 -9
- package/dist/sidenav/sidenav.d.ts +1 -1
- package/dist/sidenav/sidenav.js +1 -1
- package/dist/skeleton/llms.txt +3 -3
- package/dist/skeleton/skeleton.d.ts +1 -1
- package/dist/skeleton/skeleton.js +1 -1
- package/dist/slider/llms.txt +32 -13
- package/dist/slider/slider-drag.d.ts +26 -0
- package/dist/slider/slider-drag.js +79 -0
- package/dist/slider/slider.d.ts +6 -5
- package/dist/slider/slider.js +27 -8
- package/dist/speech/llms.txt +97 -0
- package/dist/speech/speech-button.d.ts +44 -0
- package/dist/speech/speech-button.js +86 -0
- package/dist/speech/speech-wave.d.ts +19 -0
- package/dist/speech/speech-wave.js +16 -0
- package/dist/speech/use-speech-recognition.d.ts +81 -0
- package/dist/speech/use-speech-recognition.js +179 -0
- package/dist/speed-dial/llms.txt +14 -8
- package/dist/speed-dial/speed-dial.d.ts +1 -1
- package/dist/speed-dial/speed-dial.js +1 -1
- package/dist/spinner/llms.txt +7 -7
- package/dist/spinner/spinner.d.ts +1 -1
- package/dist/spinner/spinner.js +1 -1
- package/dist/split-button/llms.txt +21 -15
- package/dist/split-button/split-button.d.ts +2 -2
- package/dist/split-button/split-button.js +4 -4
- package/dist/splitter/llms.txt +11 -11
- package/dist/splitter/splitter.d.ts +3 -3
- package/dist/splitter/splitter.js +5 -5
- package/dist/stepper/llms.txt +33 -14
- package/dist/stepper/stepper.d.ts +6 -6
- package/dist/stepper/stepper.js +53 -10
- package/dist/switch/llms.txt +12 -5
- package/dist/switch/switch.d.ts +10 -3
- package/dist/switch/switch.js +12 -5
- package/dist/switch-group/llms.txt +9 -9
- package/dist/switch-group/switch-group.d.ts +4 -4
- package/dist/switch-group/switch-group.js +4 -4
- package/dist/tabs/llms.txt +10 -10
- package/dist/tabs/tabs.d.ts +5 -5
- package/dist/tabs/tabs.js +8 -8
- package/dist/textarea/llms.txt +23 -12
- package/dist/textarea/textarea.d.ts +19 -6
- package/dist/textarea/textarea.js +21 -7
- package/dist/timeline/llms.txt +4 -4
- package/dist/timeline/timeline.d.ts +1 -1
- package/dist/timeline/timeline.js +1 -1
- package/dist/toast/llms.txt +47 -17
- package/dist/toast/toast-container.d.ts +9 -3
- package/dist/toast/toast-container.js +17 -9
- package/dist/toast/toast-store.d.ts +40 -4
- package/dist/toast/toast-store.js +36 -1
- package/dist/toolbar/llms.txt +7 -7
- package/dist/toolbar/toolbar.d.ts +3 -3
- package/dist/toolbar/toolbar.js +2 -2
- package/dist/tooltip/llms.txt +10 -10
- package/dist/tooltip/tooltip.d.ts +3 -3
- package/dist/tooltip/tooltip.js +18 -18
- package/dist/tree/llms.txt +25 -12
- package/dist/tree/tree-keys.d.ts +5 -5
- package/dist/tree/tree-keys.js +7 -7
- package/dist/tree/tree.d.ts +14 -7
- package/dist/tree/tree.js +53 -18
- package/dist/update/llms.txt +54 -0
- package/dist/update/update.d.ts +49 -0
- package/dist/update/update.js +82 -0
- package/package.json +15 -13
package/dist/password/llms.txt
CHANGED
|
@@ -7,20 +7,20 @@ Import: `import { KptPassword } from '@konce-pt/react';`
|
|
|
7
7
|
<div class="kpt-password-host">
|
|
8
8
|
<div class="kpt-password">
|
|
9
9
|
<input class="kpt-password__input" type="password" autocomplete="current-password">
|
|
10
|
-
<button class="kpt-password__toggle" type="button" aria-label="Show password"
|
|
10
|
+
<button class="kpt-password__toggle" type="button" aria-label="Show password">...</button>
|
|
11
11
|
</div>
|
|
12
12
|
<div class="kpt-password__meter" data-score="3">
|
|
13
|
-
<div class="kpt-password__bars"><span class="kpt-password__bar is-on"></span
|
|
13
|
+
<div class="kpt-password__bars"><span class="kpt-password__bar is-on"></span>...</div>
|
|
14
14
|
<span class="kpt-password__hint">Good</span>
|
|
15
15
|
</div>
|
|
16
16
|
</div>
|
|
17
17
|
|
|
18
18
|
## Props
|
|
19
19
|
- `value` / `defaultValue` / `onValueChange`
|
|
20
|
-
- `feedback`: boolean
|
|
20
|
+
- `feedback`: boolean - shows the strength meter once something is typed
|
|
21
21
|
- `autoComplete`: string | null (default 'current-password')
|
|
22
22
|
- `placeholder`, `id`, `disabled`, `invalid`, `touched`, `onTouch()`
|
|
23
|
-
- `locale`, `dictionary`
|
|
23
|
+
- `locale`, `dictionary` - i18n overrides for this component only
|
|
24
24
|
|
|
25
25
|
## autoComplete is not a detail
|
|
26
26
|
Sign-up and password reset need `autoComplete="new-password"`. With the default, a password manager
|
|
@@ -28,13 +28,13 @@ fills in the OLD password instead of offering a new one, and the user ends up sa
|
|
|
28
28
|
thing.
|
|
29
29
|
|
|
30
30
|
## How the score is computed
|
|
31
|
-
A 0
|
|
31
|
+
A 0-4 score. The score follows length first, not composition rules (NIST SP 800-63B advises against them): an
|
|
32
32
|
approximate entropy over the character classes actually used, cut for repeats (`aaaa`), sequences
|
|
33
33
|
(`abcd`, `1234`, `qwerty`) and the "Word + digits + symbol" shape. `Password1!` is weak, thirty
|
|
34
34
|
lowercase letters are strong, and `ą`/`ż` are letters, not special characters. There is no
|
|
35
|
-
dictionary
|
|
36
|
-
The label comes from `password.strength`
|
|
37
|
-
the dictionary
|
|
35
|
+
dictionary - it is a hint, not a security control.
|
|
36
|
+
The label comes from `password.strength` - the only array-valued key in
|
|
37
|
+
the dictionary - indexed by the score, so a translation controls the wording without touching code.
|
|
38
38
|
|
|
39
39
|
## Examples
|
|
40
40
|
<KptPassword value={pass} onValueChange={setPass} feedback />
|
|
@@ -48,6 +48,14 @@ host no longer carries the `id` (it used to, so `label[for]` pointed at `kpt-pas
|
|
|
48
48
|
id existed twice). New: `ariaLabel`, `required`, `readonly`/`readOnly`, `aria-invalid` after touch;
|
|
49
49
|
with `feedback` the strength label is added to `aria-describedby`.
|
|
50
50
|
|
|
51
|
+
## Motion
|
|
52
|
+
The strength meter fades in when the first character appears; lit segments fill from the start in
|
|
53
|
+
a wave and empty from the end when the score drops, in the colour of the current score; the score label
|
|
54
|
+
enters anew on every change. Turning invalid (after touch) flashes an error ring and shakes the field -
|
|
55
|
+
inside an invalid `kpt-form-field` only the ring, because the wrapper shakes. Follows `enter` from `KptMotionProvider`
|
|
56
|
+
(`spring` / `fade` / `none`); nothing moves on first render; `enabled: false` and the system
|
|
57
|
+
"reduce motion" setting always win.
|
|
58
|
+
|
|
51
59
|
## Tokens
|
|
52
60
|
`--kpt-form-field-*` for the field, `--kpt-color-danger` / `-warning` / `-success` for the meter
|
|
53
61
|
bars by score.
|
|
@@ -5,10 +5,10 @@ export interface KptPasswordProps extends Omit<ComponentPropsWithRef<'div'>, 'on
|
|
|
5
5
|
defaultValue?: string;
|
|
6
6
|
onValueChange?: (value: string) => void;
|
|
7
7
|
placeholder?: string;
|
|
8
|
-
/** Id natywnego pola
|
|
8
|
+
/** Id natywnego pola - pozwala związać etykietę `KptFormField`. */
|
|
9
9
|
id?: string;
|
|
10
10
|
/**
|
|
11
|
-
* Podpowiedź autouzupełniania. Rejestracja i reset hasła wymagają `new-password`
|
|
11
|
+
* Podpowiedź autouzupełniania. Rejestracja i reset hasła wymagają `new-password` - inaczej
|
|
12
12
|
* menedżer haseł podstawia stare hasło zamiast zaproponować nowe.
|
|
13
13
|
*/
|
|
14
14
|
autoComplete?: string | null;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useState } from 'react';
|
|
3
|
+
import { useEffect, useRef, useState } from 'react';
|
|
4
|
+
import { playInvalidMotion, resolveEnterMotion } from '@konce-pt/motion';
|
|
5
|
+
import { useKptMotion } from "../motion/motion-context.js";
|
|
4
6
|
import { cn } from "../internal/cn.js";
|
|
5
7
|
import { useControllableState } from "../internal/use-controllable-state.js";
|
|
6
8
|
import { useKptId } from "../internal/use-id.js";
|
|
@@ -22,7 +24,26 @@ export function KptPassword({ value, defaultValue = '', onValueChange, placehold
|
|
|
22
24
|
const [current, setCurrent] = useControllableState({ value, defaultValue, onChange: onValueChange });
|
|
23
25
|
const [visible, setVisible] = useState(false);
|
|
24
26
|
const showInvalid = invalid && (touched ?? true);
|
|
25
|
-
// Długość i różnorodność zamiast reguł składu
|
|
27
|
+
// Długość i różnorodność zamiast reguł składu - szczegóły w `internal/password-strength.ts`.
|
|
26
28
|
const score = kptPasswordScore(current);
|
|
27
|
-
|
|
29
|
+
/** Ruch miernika i błędu idzie za `enter` z `KptMotionProvider` (domyślnie `spring`). */
|
|
30
|
+
const motion = resolveEnterMotion(undefined, useKptMotion());
|
|
31
|
+
const boxRef = useRef(null);
|
|
32
|
+
// Po pierwszym renderze - dopiero wtedy wejścia z `@starting-style` mają prawo zagrać. Atrybut idzie
|
|
33
|
+
// prosto do DOM-u: host niesie `className` z propsów, a React nadpisałby klasę dopisaną z boku.
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
boxRef.current?.parentElement?.setAttribute('data-live', '');
|
|
36
|
+
}, []);
|
|
37
|
+
const wasInvalid = useRef(null);
|
|
38
|
+
// Sygnał błędu przy przejściu "poprawne -> błędne" (nie przy błędzie obecnym od startu): pierścień
|
|
39
|
+
// w kolorze błędu i krótkie potrząśnięcie. W błędnym `KptFormField` potrząsa już on - tu sam pierścień.
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
const before = wasInvalid.current;
|
|
42
|
+
wasInvalid.current = showInvalid;
|
|
43
|
+
const el = boxRef.current;
|
|
44
|
+
if (!showInvalid || before !== false || motion !== 'spring' || !el)
|
|
45
|
+
return;
|
|
46
|
+
playInvalidMotion(el, { shake: !el.closest('.kpt-form-field--invalid') });
|
|
47
|
+
}, [showInvalid, motion]);
|
|
48
|
+
return (_jsxs("div", { className: cn('kpt-password-host', className), "data-motion": motion, ...rest, children: [_jsxs("div", { ref: boxRef, className: cn('kpt-password', disabled && 'kpt-password--disabled', showInvalid && 'kpt-password--invalid'), children: [_jsx("input", { className: "kpt-password__input", id: inputId, type: visible ? 'text' : 'password', value: current, disabled: disabled, readOnly: readOnly, "aria-invalid": showInvalid || undefined, "aria-required": required || undefined, "aria-label": ariaLabel ?? undefined, "aria-describedby": joinIds(field.describedBy, feedback && current && meterId), placeholder: placeholder, autoComplete: autoComplete ?? undefined, onChange: (event) => setCurrent(event.target.value), onBlur: () => onTouch?.() }), _jsx("button", { type: "button", className: "kpt-password__toggle", disabled: disabled, onClick: () => setVisible(!visible), "aria-label": visible ? t('password.hide') : t('password.show'), children: _jsx(KptIcon, { name: visible ? 'eye-off' : 'eye' }) })] }), feedback && current ? (_jsxs("div", { className: "kpt-password__meter", id: meterId, "data-score": score, children: [_jsx("div", { className: "kpt-password__bars", "aria-hidden": "true", children: [0, 1, 2, 3].map((index) => (_jsx("span", { className: cn('kpt-password__bar', index < score && 'is-on'), style: { ['--_i']: index } }, index))) }), _jsx("span", { className: "kpt-password__hint", children: messages.password.strength[score] }, score)] })) : null] }));
|
|
28
49
|
}
|
package/dist/peek/llms.txt
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
# KptPeek (@konce-pt/react)
|
|
2
2
|
|
|
3
|
-
A peek card
|
|
3
|
+
A peek card - content tied to what you are looking at, shown without leaving the text. Hover opens
|
|
4
4
|
it, the card itself is interactive, and a click pins it.
|
|
5
5
|
Import: `import { KptPeek } from '@konce-pt/react';`
|
|
6
6
|
|
|
7
7
|
## DOM
|
|
8
8
|
<span class="kpt-peek-host">
|
|
9
|
-
<a class="kpt-peek__trigger" aria-expanded="true" aria-controls="
|
|
9
|
+
<a class="kpt-peek__trigger" aria-expanded="true" aria-controls="...">...trigger...</a>
|
|
10
10
|
</span>
|
|
11
11
|
<!-- while open, in a portal on document.body: -->
|
|
12
|
-
<div class="kpt-peek__panel" role="dialog" tabindex="-1" data-pinned
|
|
12
|
+
<div class="kpt-peek__panel" role="dialog" tabindex="-1" data-pinned>...children...</div>
|
|
13
13
|
|
|
14
14
|
## Props
|
|
15
|
-
- `trigger`: ReactNode
|
|
16
|
-
- `children`: ReactNode
|
|
15
|
+
- `trigger`: ReactNode - the element the card hangs on; a mention, an avatar, a chip, a link
|
|
16
|
+
- `children`: ReactNode - the card content
|
|
17
17
|
- `placement`: 'top' | 'bottom' (default 'bottom')
|
|
18
18
|
- `openDelay`: number (default 300), `closeDelay`: number (default 200)
|
|
19
|
-
- `disabled`: boolean
|
|
20
|
-
- `label`: string
|
|
21
|
-
- `onOpenChange`: `(open: boolean) => void`
|
|
19
|
+
- `disabled`: boolean - the card never opens; the trigger stays a plain link or button
|
|
20
|
+
- `label`: string - the card's accessible name; without it the trigger's text is used
|
|
21
|
+
- `onOpenChange`: `(open: boolean) => void` - the moment to fetch the card's data
|
|
22
22
|
- `className`, `ref` and every other `<span>` prop go to the host
|
|
23
23
|
|
|
24
24
|
## The props land on the trigger itself
|
|
25
25
|
A valid element passed as `trigger` is cloned with the handlers and `aria-expanded` merged in, so
|
|
26
|
-
the state sits on the element a screen reader actually reads
|
|
26
|
+
the state sits on the element a screen reader actually reads - not on some `<span>` next to it.
|
|
27
27
|
Anything else (a bare string) gets wrapped in a `<span>`.
|
|
28
28
|
|
|
29
29
|
## Hover is not the only way in
|
|
30
|
-
Hover opens after `openDelay` and leaving closes after `closeDelay`
|
|
30
|
+
Hover opens after `openDelay` and leaving closes after `closeDelay` - the pointer needs time to
|
|
31
31
|
travel from the trigger to the card, so entering the card cancels the close. Focus opens it with no
|
|
32
32
|
delay. A click, Enter or a tap **pins** the card: it stays after the pointer leaves and focus moves
|
|
33
33
|
inside it. That is the only route to the card's content where there is no hover at all. Escape
|
package/dist/peek/peek.d.ts
CHANGED
|
@@ -2,14 +2,14 @@ import { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
|
2
2
|
/** Z której strony wyzwalacza wychodzi karta. */
|
|
3
3
|
export type KptPeekPlacement = 'top' | 'bottom';
|
|
4
4
|
export interface KptPeekProps extends Omit<ComponentPropsWithRef<'span'>, 'content'> {
|
|
5
|
-
/** Element, na którym wisi karta
|
|
5
|
+
/** Element, na którym wisi karta - wzmianka, awatar, chip albo zwykły link. */
|
|
6
6
|
trigger: ReactNode;
|
|
7
7
|
/** Treść karty. */
|
|
8
8
|
children?: ReactNode;
|
|
9
9
|
placement?: KptPeekPlacement;
|
|
10
|
-
/** Zwłoka otwarcia po najechaniu (ms)
|
|
10
|
+
/** Zwłoka otwarcia po najechaniu (ms) - bez niej karty mrugają przy przejeżdżaniu przez tekst. */
|
|
11
11
|
openDelay?: number;
|
|
12
|
-
/** Zwłoka zamknięcia po zjeździe kursora (ms)
|
|
12
|
+
/** Zwłoka zamknięcia po zjeździe kursora (ms) - tyle jest na przejazd z wyzwalacza na kartę. */
|
|
13
13
|
closeDelay?: number;
|
|
14
14
|
/** Wyłączona karta nie otwiera się wcale; wyzwalacz zostaje zwykłym linkiem czy przyciskiem. */
|
|
15
15
|
disabled?: boolean;
|
|
@@ -18,18 +18,18 @@ export interface KptPeekProps extends Omit<ComponentPropsWithRef<'span'>, 'conte
|
|
|
18
18
|
onOpenChange?: (open: boolean) => void;
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
|
-
* Karta podglądu pod kursorem
|
|
21
|
+
* Karta podglądu pod kursorem - treść powiązana z tym, na co się patrzy, bez opuszczania tekstu.
|
|
22
22
|
* Tym różni się od sąsiadów: `KptTooltip` niesie sam tekst i nie da się w nim kliknąć,
|
|
23
23
|
* a `KptPopover` otwiera dopiero klik i zasłania stronę backdropem.
|
|
24
24
|
*
|
|
25
|
-
* Hover pokazuje kartę po `openDelay`, zjazd kursora chowa ją po `closeDelay`
|
|
25
|
+
* Hover pokazuje kartę po `openDelay`, zjazd kursora chowa ją po `closeDelay` - kursor musi mieć
|
|
26
26
|
* czas przejechać z wyzwalacza na kartę, więc najazd na kartę anuluje zamknięcie. Fokus otwiera
|
|
27
27
|
* kartę od razu, a klik, Enter albo dotyk **przypina** ją: karta zostaje mimo zjazdu kursora,
|
|
28
28
|
* a fokus wchodzi do środka. To jedyna droga do treści karty tam, gdzie hovera nie ma w ogóle.
|
|
29
29
|
*
|
|
30
30
|
* @example
|
|
31
31
|
* <KptPeek trigger={<a href="/ludzie/anna">@Anna Kowalska</a>}>
|
|
32
|
-
* <KptCard>Profil, projekty, kontakt
|
|
32
|
+
* <KptCard>Profil, projekty, kontakt...</KptCard>
|
|
33
33
|
* </KptPeek>
|
|
34
34
|
*/
|
|
35
35
|
export declare function KptPeek({ trigger, children, placement, openDelay, closeDelay, disabled, label, onOpenChange, className, ...rest }: Readonly<KptPeekProps>): import("react").JSX.Element;
|
package/dist/peek/peek.js
CHANGED
|
@@ -5,18 +5,18 @@ import { cn } from "../internal/cn.js";
|
|
|
5
5
|
import { KptOverlay } from "../internal/overlay.js";
|
|
6
6
|
import { mergeSlotProps } from "../internal/slot.js";
|
|
7
7
|
/**
|
|
8
|
-
* Karta podglądu pod kursorem
|
|
8
|
+
* Karta podglądu pod kursorem - treść powiązana z tym, na co się patrzy, bez opuszczania tekstu.
|
|
9
9
|
* Tym różni się od sąsiadów: `KptTooltip` niesie sam tekst i nie da się w nim kliknąć,
|
|
10
10
|
* a `KptPopover` otwiera dopiero klik i zasłania stronę backdropem.
|
|
11
11
|
*
|
|
12
|
-
* Hover pokazuje kartę po `openDelay`, zjazd kursora chowa ją po `closeDelay`
|
|
12
|
+
* Hover pokazuje kartę po `openDelay`, zjazd kursora chowa ją po `closeDelay` - kursor musi mieć
|
|
13
13
|
* czas przejechać z wyzwalacza na kartę, więc najazd na kartę anuluje zamknięcie. Fokus otwiera
|
|
14
14
|
* kartę od razu, a klik, Enter albo dotyk **przypina** ją: karta zostaje mimo zjazdu kursora,
|
|
15
15
|
* a fokus wchodzi do środka. To jedyna droga do treści karty tam, gdzie hovera nie ma w ogóle.
|
|
16
16
|
*
|
|
17
17
|
* @example
|
|
18
18
|
* <KptPeek trigger={<a href="/ludzie/anna">@Anna Kowalska</a>}>
|
|
19
|
-
* <KptCard>Profil, projekty, kontakt
|
|
19
|
+
* <KptCard>Profil, projekty, kontakt...</KptCard>
|
|
20
20
|
* </KptPeek>
|
|
21
21
|
*/
|
|
22
22
|
export function KptPeek({ trigger, children, placement = 'bottom', openDelay = 300, closeDelay = 200, disabled = false, label, onOpenChange, className, ...rest }) {
|
|
@@ -31,9 +31,9 @@ export function KptPeek({ trigger, children, placement = 'bottom', openDelay = 3
|
|
|
31
31
|
triggerRef.current = el;
|
|
32
32
|
setAnchor(el);
|
|
33
33
|
}, []);
|
|
34
|
-
/** Tekst wyzwalacza jako nazwa karty
|
|
34
|
+
/** Tekst wyzwalacza jako nazwa karty - odczytany przy otwarciu, nie w renderze. */
|
|
35
35
|
const [triggerName, setTriggerName] = useState('');
|
|
36
|
-
/** Przypięta karta zostaje po zjeździe kursora
|
|
36
|
+
/** Przypięta karta zostaje po zjeździe kursora - przypina ją klik, Enter albo dotyk. */
|
|
37
37
|
const [pinned, setPinned] = useState(false);
|
|
38
38
|
const panelId = useId();
|
|
39
39
|
const stop = useCallback(() => {
|
|
@@ -52,7 +52,7 @@ export function KptPeek({ trigger, children, placement = 'bottom', openDelay = 3
|
|
|
52
52
|
setTriggerName(triggerRef.current?.textContent?.trim() ?? '');
|
|
53
53
|
setOpen(true);
|
|
54
54
|
}, []);
|
|
55
|
-
// `onOpenChange` po zmianie stanu, a nie wewnątrz funkcji aktualizującej `setOpen`
|
|
55
|
+
// `onOpenChange` po zmianie stanu, a nie wewnątrz funkcji aktualizującej `setOpen` - ta musi być
|
|
56
56
|
// czysta (StrictMode woła ją dwa razy, a React może ją powtórzyć przy przerwanym renderze).
|
|
57
57
|
const notifyOpen = useEffectEvent((value) => onOpenChange?.(value));
|
|
58
58
|
const reportedOpen = useRef(false);
|
|
@@ -125,7 +125,7 @@ export function KptPeek({ trigger, children, placement = 'bottom', openDelay = 3
|
|
|
125
125
|
onBlur: focusOut,
|
|
126
126
|
onClick: pin,
|
|
127
127
|
// Escape na wyzwalaczu odprawia kartę bez przenoszenia fokusu (WCAG 1.4.13). Zamknięta karta
|
|
128
|
-
// przepuszcza klawisz dalej
|
|
128
|
+
// przepuszcza klawisz dalej - Escape nadal zamyka otaczające okno.
|
|
129
129
|
onKeyDown: (event) => {
|
|
130
130
|
if (event.key !== 'Escape' || !open)
|
|
131
131
|
return;
|
package/dist/pick-list/llms.txt
CHANGED
|
@@ -10,20 +10,21 @@ Import: `import { KptPickList } from '@konce-pt/react';`
|
|
|
10
10
|
<div class="kpt-pick-list__col">
|
|
11
11
|
<div class="kpt-pick-list__header">Available</div>
|
|
12
12
|
<ul class="kpt-pick-list__items">
|
|
13
|
-
<li class="kpt-pick-list__item is-selected"
|
|
13
|
+
<li class="kpt-pick-list__item is-selected">...</li>...
|
|
14
14
|
</ul>
|
|
15
15
|
</div>
|
|
16
|
-
<div class="kpt-pick-list__controls"
|
|
17
|
-
<div class="kpt-pick-list__col"
|
|
16
|
+
<div class="kpt-pick-list__controls">...four buttons...</div>
|
|
17
|
+
<div class="kpt-pick-list__col">...</div>
|
|
18
18
|
</div>
|
|
19
19
|
</div>
|
|
20
20
|
|
|
21
21
|
## Props
|
|
22
|
-
- `source` / `defaultSource` / `onSourceChange`
|
|
23
|
-
- `target` / `defaultTarget` / `onTargetChange`
|
|
24
|
-
- `sourceHeader`, `targetHeader`
|
|
25
|
-
- `dragdrop`
|
|
26
|
-
- `
|
|
22
|
+
- `source` / `defaultSource` / `onSourceChange` - the left list
|
|
23
|
+
- `target` / `defaultTarget` / `onTargetChange` - the right list
|
|
24
|
+
- `sourceHeader`, `targetHeader` - without them `pickList.available` / `pickList.selected`
|
|
25
|
+
- `dragdrop` - `false` by default; enables dragging (opt-in, nothing changes without it)
|
|
26
|
+
- `layoutMotion` - `'spring' | 'arc' | 'morph' | 'none'` (default from `KptMotionProvider`, else `spring`) - see below
|
|
27
|
+
- `renderItem(item, index)` - required; the equivalent of `<ng-template let-item>`
|
|
27
28
|
- `className`, `ref` and every other `<div>` prop go to the host
|
|
28
29
|
|
|
29
30
|
## The selection is kept by reference
|
|
@@ -33,7 +34,7 @@ they empty; a double-click or a drag only drops the one item that left.
|
|
|
33
34
|
|
|
34
35
|
## A double-click moves one item
|
|
35
36
|
It sends exactly the row you clicked to the other panel and appends it at the end, whatever else is
|
|
36
|
-
selected. It does not need `dragdrop`
|
|
37
|
+
selected. It does not need `dragdrop` - the two clicks underneath cancel each other out, so the rest
|
|
37
38
|
of the selection is left alone.
|
|
38
39
|
|
|
39
40
|
## Where a dragged item lands
|
|
@@ -57,22 +58,41 @@ half-controlled, or fully controlled by the form.
|
|
|
57
58
|
The headers and the four move buttons come from the `pickList` namespace. Dragging and the
|
|
58
59
|
double-click carry no visible label, so they add no dictionary keys.
|
|
59
60
|
|
|
61
|
+
## Move motion
|
|
62
|
+
`layoutMotion` animates moves and reorders made by the user (buttons, double-click, `Enter`,
|
|
63
|
+
dragging):
|
|
64
|
+
- `spring` - the row glides to its new place on a spring;
|
|
65
|
+
- `arc` - the row lifts (shadow) and flies along an arc, tilted toward the move;
|
|
66
|
+
- `morph` - the browser's own morph (View Transitions); without browser support the move is
|
|
67
|
+
instant, and the transition blocks clicks on the page for ~0.5 s;
|
|
68
|
+
- `none` - no motion.
|
|
69
|
+
|
|
70
|
+
A row crossing to the other list flies as a ghost - a copy above both panels, because the panel's
|
|
71
|
+
`overflow` would clip the real row; the real row waits invisible where it lands. Neighbours close
|
|
72
|
+
the gap or make room with a calm spring. The receiving list scrolls to the last moved row, so the
|
|
73
|
+
landing is visible; rows scrolled out of view do not fly. A click in the middle of a flight starts
|
|
74
|
+
the next one from where the rows are on screen.
|
|
75
|
+
|
|
76
|
+
With no value it takes `layout` from `KptMotionProvider` (default `spring`); `enabled: false` there and
|
|
77
|
+
the system "reduce motion" setting always win. Lists replaced from outside (`source`, `target`) switch
|
|
78
|
+
instantly - the old state has to be measured before the DOM changes.
|
|
79
|
+
|
|
60
80
|
## Tokens
|
|
61
81
|
The selection `--kpt-color-primary`, the headers `--kpt-color-surface-variant`.
|
|
62
82
|
|
|
63
83
|
## Keyboard
|
|
64
84
|
Each list is a `listbox` with `aria-multiselectable` and a single Tab stop (roving tabindex):
|
|
65
|
-
-
|
|
85
|
+
- `ArrowDown` / `ArrowUp` move between items (wrapping), `Home` / `End` jump to the ends;
|
|
66
86
|
- `Space` toggles the focused item's selection (`aria-selected`), the same as a click;
|
|
67
|
-
- `Enter` moves the focused item to the other list, the same as a double-click
|
|
87
|
+
- `Enter` moves the focused item to the other list, the same as a double-click - focus stays at
|
|
68
88
|
that position in the list, on the next item.
|
|
69
89
|
The move buttons act on the same selection, so the whole control works without a mouse.
|
|
70
90
|
|
|
71
91
|
## Accessibility
|
|
72
92
|
Each list is named after its header (`aria-label`). The four move buttons are labelled from the
|
|
73
93
|
dictionary, so "move all right" is distinguishable from "move right" without seeing the double
|
|
74
|
-
chevron. Native HTML5 drag and drop has no keyboard equivalent
|
|
94
|
+
chevron. Native HTML5 drag and drop has no keyboard equivalent - `Enter` and the buttons cover
|
|
75
95
|
everything it does, and `dragdrop` adds to them, it never replaces them.
|
|
76
96
|
|
|
77
97
|
## Announcements and buttons
|
|
78
|
-
A transfer between the lists is announced in a polite live region: `pickList.moved` with `{count}` and `{list}` (the target header). The move buttons carry `aria-disabled` when there is nothing to move (no selection, empty list)
|
|
98
|
+
A transfer between the lists is announced in a polite live region: `pickList.moved` with `{count}` and `{list}` (the target header). The move buttons carry `aria-disabled` when there is nothing to move (no selection, empty list) - they stay focusable, so focus does not drop to `<body>` when the selection clears after a move.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
|
+
import { type KptLayoutMotion } from '@konce-pt/motion';
|
|
2
3
|
import { type KptI18nOverrides } from '../i18n/i18n-context.tsx';
|
|
3
4
|
export interface KptPickListProps<T> extends Omit<ComponentPropsWithRef<'div'>, 'onChange' | 'children'>, KptI18nOverrides {
|
|
4
5
|
source?: T[];
|
|
@@ -13,13 +14,20 @@ export interface KptPickListProps<T> extends Omit<ComponentPropsWithRef<'div'>,
|
|
|
13
14
|
targetHeader?: string;
|
|
14
15
|
/** Włącza porządkowanie i przenoszenie elementów metodą przeciągnij-i-upuść. */
|
|
15
16
|
dragdrop?: boolean;
|
|
16
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* Ruch przy przenoszeniu i przestawianiu elementów: `spring` - element płynie na sprężynie,
|
|
19
|
+
* `arc` - unosi się i leci po łuku, `morph` - natywny morf przeglądarki (View Transitions),
|
|
20
|
+
* `none` - bez ruchu. Bez wartości bierze `layout` z `KptMotionProvider` (domyślnie `spring`);
|
|
21
|
+
* `<KptMotionProvider enabled={false}>` i systemowe "ogranicz ruch" wyłączają go zawsze.
|
|
22
|
+
*/
|
|
23
|
+
layoutMotion?: KptLayoutMotion;
|
|
24
|
+
/** Szablon elementu - odpowiednik `<ng-template let-item>` z Angulara. */
|
|
17
25
|
renderItem: (item: T, index: number) => ReactNode;
|
|
18
26
|
}
|
|
19
27
|
/**
|
|
20
|
-
* PickList
|
|
28
|
+
* PickList - transfer elementów między dwiema listami. Klik zaznacza, przyciski pośrodku
|
|
21
29
|
* przenoszą zaznaczone albo wszystko, dwuklik przerzuca pojedynczy element na drugą stronę.
|
|
22
|
-
* Z `dragdrop` dochodzi przeciąganie
|
|
30
|
+
* Z `dragdrop` dochodzi przeciąganie - porządkowanie wewnątrz panelu i przenoszenie na
|
|
23
31
|
* konkretną pozycję drugiego panelu.
|
|
24
32
|
*
|
|
25
33
|
* Każda lista to `listbox` z wielokrotnym wyborem i jednym przystankiem Tab (roving tabindex):
|
|
@@ -34,4 +42,4 @@ export interface KptPickListProps<T> extends Omit<ComponentPropsWithRef<'div'>,
|
|
|
34
42
|
* renderItem={(item) => item.name}
|
|
35
43
|
* />
|
|
36
44
|
*/
|
|
37
|
-
export declare function KptPickList<T>({ source, defaultSource, onSourceChange, target, defaultTarget, onTargetChange, sourceHeader, targetHeader, dragdrop, renderItem, locale, dictionary, className, ref, ...rest }: Readonly<KptPickListProps<T>>): import("react").JSX.Element;
|
|
45
|
+
export declare function KptPickList<T>({ source, defaultSource, onSourceChange, target, defaultTarget, onTargetChange, sourceHeader, targetHeader, dragdrop, layoutMotion, renderItem, locale, dictionary, className, ref, ...rest }: Readonly<KptPickListProps<T>>): import("react").JSX.Element;
|