@konce-pt/react 0.8.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/LICENSE +21 -0
- package/README.md +58 -0
- package/dist/accordion/accordion.d.ts +45 -0
- package/dist/accordion/accordion.js +69 -0
- package/dist/alert/alert.d.ts +25 -0
- package/dist/alert/alert.js +31 -0
- package/dist/app-shell/app-shell.d.ts +94 -0
- package/dist/app-shell/app-shell.js +105 -0
- package/dist/auth/auth-types.d.ts +44 -0
- package/dist/auth/auth-types.js +2 -0
- package/dist/auth/auth.d.ts +76 -0
- package/dist/auth/auth.js +184 -0
- package/dist/autocomplete/autocomplete.d.ts +18 -0
- package/dist/autocomplete/autocomplete.js +72 -0
- package/dist/avatar/avatar.d.ts +33 -0
- package/dist/avatar/avatar.js +30 -0
- package/dist/avatar-group/avatar-group.d.ts +21 -0
- package/dist/avatar-group/avatar-group.js +15 -0
- package/dist/badge/badge.d.ts +25 -0
- package/dist/badge/badge.js +14 -0
- package/dist/bottom-sheet/bottom-sheet.d.ts +21 -0
- package/dist/bottom-sheet/bottom-sheet.js +22 -0
- package/dist/breadcrumb/breadcrumb.d.ts +19 -0
- package/dist/breadcrumb/breadcrumb.js +20 -0
- package/dist/button/button.d.ts +27 -0
- package/dist/button/button.js +49 -0
- package/dist/button-group/button-group.d.ts +25 -0
- package/dist/button-group/button-group.js +30 -0
- package/dist/card/card.d.ts +66 -0
- package/dist/card/card.js +96 -0
- package/dist/carousel/carousel.d.ts +20 -0
- package/dist/carousel/carousel.js +24 -0
- package/dist/charts/chart-legend.d.ts +23 -0
- package/dist/charts/chart-legend.js +9 -0
- package/dist/charts/chart-tooltip.d.ts +21 -0
- package/dist/charts/chart-tooltip.js +13 -0
- package/dist/charts/chart.d.ts +18 -0
- package/dist/charts/chart.js +231 -0
- package/dist/charts-entry/public-api.d.ts +4 -0
- package/dist/charts-entry/public-api.js +7 -0
- package/dist/checkbox/checkbox.d.ts +33 -0
- package/dist/checkbox/checkbox.js +29 -0
- package/dist/chip/chip.d.ts +22 -0
- package/dist/chip/chip.js +16 -0
- package/dist/chips-input/chips-input.d.ts +25 -0
- package/dist/chips-input/chips-input.js +54 -0
- package/dist/clock/clock.d.ts +17 -0
- package/dist/clock/clock.js +57 -0
- package/dist/color-picker/color-picker.d.ts +23 -0
- package/dist/color-picker/color-picker.js +28 -0
- package/dist/confirm/confirm-container.d.ts +13 -0
- package/dist/confirm/confirm-container.js +26 -0
- package/dist/confirm/confirm-store.d.ts +29 -0
- package/dist/confirm/confirm-store.js +52 -0
- package/dist/context-menu/context-menu.d.ts +21 -0
- package/dist/context-menu/context-menu.js +36 -0
- package/dist/data-table/data-table-types.d.ts +67 -0
- package/dist/data-table/data-table-types.js +1 -0
- package/dist/data-table/data-table.d.ts +62 -0
- package/dist/data-table/data-table.js +453 -0
- package/dist/data-table/export-csv.d.ts +7 -0
- package/dist/data-table/export-csv.js +19 -0
- package/dist/data-view/data-view.d.ts +21 -0
- package/dist/data-view/data-view.js +25 -0
- package/dist/date-range/date-range.d.ts +30 -0
- package/dist/date-range/date-range.js +155 -0
- package/dist/datepicker/datepicker.d.ts +39 -0
- package/dist/datepicker/datepicker.js +202 -0
- package/dist/dialog/dialog.d.ts +35 -0
- package/dist/dialog/dialog.js +59 -0
- package/dist/divider/divider.d.ts +16 -0
- package/dist/divider/divider.js +13 -0
- package/dist/drawer/drawer.d.ts +25 -0
- package/dist/drawer/drawer.js +25 -0
- package/dist/empty/empty.d.ts +18 -0
- package/dist/empty/empty.js +14 -0
- package/dist/fab/fab.d.ts +22 -0
- package/dist/fab/fab.js +17 -0
- package/dist/fieldset/fieldset.d.ts +22 -0
- package/dist/fieldset/fieldset.js +24 -0
- package/dist/file-upload/file-upload.d.ts +22 -0
- package/dist/file-upload/file-upload.js +50 -0
- package/dist/form-field/form-field-context.d.ts +23 -0
- package/dist/form-field/form-field-context.js +17 -0
- package/dist/form-field/form-field.d.ts +39 -0
- package/dist/form-field/form-field.js +41 -0
- package/dist/galleria/galleria.d.ts +22 -0
- package/dist/galleria/galleria.js +21 -0
- package/dist/grid/col.d.ts +39 -0
- package/dist/grid/col.js +32 -0
- package/dist/grid/flex.d.ts +45 -0
- package/dist/grid/flex.js +35 -0
- package/dist/grid/grid.d.ts +47 -0
- package/dist/grid/grid.js +38 -0
- package/dist/grid/layout.d.ts +18 -0
- package/dist/grid/layout.js +32 -0
- package/dist/grid-entry/public-api.d.ts +6 -0
- package/dist/grid-entry/public-api.js +8 -0
- package/dist/i18n/i18n-context.d.ts +45 -0
- package/dist/i18n/i18n-context.js +65 -0
- package/dist/icon/icon-registry.d.ts +16 -0
- package/dist/icon/icon-registry.js +43 -0
- package/dist/icon/icon.d.ts +17 -0
- package/dist/icon/icon.js +23 -0
- package/dist/icon-button/icon-button.d.ts +23 -0
- package/dist/icon-button/icon-button.js +14 -0
- package/dist/icons-entry/public-api.d.ts +12 -0
- package/dist/icons-entry/public-api.js +20 -0
- package/dist/image/image.d.ts +17 -0
- package/dist/image/image.js +16 -0
- package/dist/input/input.d.ts +41 -0
- package/dist/input/input.js +36 -0
- package/dist/input-mask/input-mask.d.ts +19 -0
- package/dist/input-mask/input-mask.js +65 -0
- package/dist/input-number/input-number.d.ts +28 -0
- package/dist/input-number/input-number.js +52 -0
- package/dist/input-otp/input-otp.d.ts +21 -0
- package/dist/input-otp/input-otp.js +59 -0
- package/dist/internal/cn.d.ts +9 -0
- package/dist/internal/cn.js +19 -0
- package/dist/internal/compose-refs.d.ts +6 -0
- package/dist/internal/compose-refs.js +16 -0
- package/dist/internal/overlay-container.d.ts +3 -0
- package/dist/internal/overlay-container.js +19 -0
- package/dist/internal/overlay.d.ts +26 -0
- package/dist/internal/overlay.js +64 -0
- package/dist/internal/slot.d.ts +23 -0
- package/dist/internal/slot.js +49 -0
- package/dist/internal/types.d.ts +25 -0
- package/dist/internal/types.js +1 -0
- package/dist/internal/use-breakpoint.d.ts +18 -0
- package/dist/internal/use-breakpoint.js +52 -0
- package/dist/internal/use-controllable-state.d.ts +11 -0
- package/dist/internal/use-controllable-state.js +18 -0
- package/dist/internal/use-id.d.ts +9 -0
- package/dist/internal/use-id.js +13 -0
- package/dist/knob/knob.d.ts +27 -0
- package/dist/knob/knob.js +86 -0
- package/dist/listbox/listbox.d.ts +28 -0
- package/dist/listbox/listbox.js +43 -0
- package/dist/map/map-create-dialog.d.ts +21 -0
- package/dist/map/map-create-dialog.js +196 -0
- package/dist/map/map-hours-field.d.ts +22 -0
- package/dist/map/map-hours-field.js +90 -0
- package/dist/map/map-image-field.d.ts +24 -0
- package/dist/map/map-image-field.js +61 -0
- package/dist/map/map-legend.d.ts +29 -0
- package/dist/map/map-legend.js +41 -0
- package/dist/map/map-poi-card.d.ts +42 -0
- package/dist/map/map-poi-card.js +152 -0
- package/dist/map/map-search.d.ts +37 -0
- package/dist/map/map-search.js +201 -0
- package/dist/map/map.d.ts +113 -0
- package/dist/map/map.js +425 -0
- package/dist/map/ports.d.ts +76 -0
- package/dist/map/ports.js +174 -0
- package/dist/map-entry/public-api.d.ts +20 -0
- package/dist/map-entry/public-api.js +19 -0
- package/dist/megamenu/megamenu.d.ts +17 -0
- package/dist/megamenu/megamenu.js +28 -0
- package/dist/menu/menu-item.d.ts +33 -0
- package/dist/menu/menu-item.js +1 -0
- package/dist/menu/menu-rows.d.ts +9 -0
- package/dist/menu/menu-rows.js +15 -0
- package/dist/menu/menu.d.ts +22 -0
- package/dist/menu/menu.js +31 -0
- package/dist/menubar/menubar.d.ts +16 -0
- package/dist/menubar/menubar.js +39 -0
- package/dist/meter-group/meter-group.d.ts +20 -0
- package/dist/meter-group/meter-group.js +24 -0
- package/dist/order-list/order-list.d.ts +18 -0
- package/dist/order-list/order-list.js +37 -0
- package/dist/paginator/paginator.d.ts +29 -0
- package/dist/paginator/paginator.js +45 -0
- package/dist/panel/panel.d.ts +31 -0
- package/dist/panel/panel.js +36 -0
- package/dist/password/password.d.ts +28 -0
- package/dist/password/password.js +37 -0
- package/dist/pick-list/pick-list.d.ts +28 -0
- package/dist/pick-list/pick-list.js +65 -0
- package/dist/popover/popover.d.ts +23 -0
- package/dist/popover/popover.js +27 -0
- package/dist/progress/progress.d.ts +19 -0
- package/dist/progress/progress.js +21 -0
- package/dist/public-api.d.ts +181 -0
- package/dist/public-api.js +105 -0
- package/dist/radio-group/radio-group.d.ts +24 -0
- package/dist/radio-group/radio-group.js +23 -0
- package/dist/rating/rating.d.ts +22 -0
- package/dist/rating/rating.js +30 -0
- package/dist/rich-text/lists.d.ts +17 -0
- package/dist/rich-text/lists.js +144 -0
- package/dist/rich-text/rich-text.d.ts +28 -0
- package/dist/rich-text/rich-text.js +654 -0
- package/dist/rich-text/sanitize.d.ts +10 -0
- package/dist/rich-text/sanitize.js +85 -0
- package/dist/rich-text/tables.d.ts +44 -0
- package/dist/rich-text/tables.js +268 -0
- package/dist/roadmap/roadmap.d.ts +37 -0
- package/dist/roadmap/roadmap.js +271 -0
- package/dist/roadmap-entry/public-api.d.ts +4 -0
- package/dist/roadmap-entry/public-api.js +7 -0
- package/dist/scroll-top/scroll-top.d.ts +16 -0
- package/dist/scroll-top/scroll-top.js +38 -0
- package/dist/select/select.d.ts +37 -0
- package/dist/select/select.js +117 -0
- package/dist/shared/types.d.ts +8 -0
- package/dist/shared/types.js +1 -0
- package/dist/sidenav/sidenav.d.ts +26 -0
- package/dist/sidenav/sidenav.js +41 -0
- package/dist/skeleton/skeleton.d.ts +20 -0
- package/dist/skeleton/skeleton.js +15 -0
- package/dist/slider/slider.d.ts +28 -0
- package/dist/slider/slider.js +30 -0
- package/dist/speed-dial/speed-dial.d.ts +20 -0
- package/dist/speed-dial/speed-dial.js +23 -0
- package/dist/spinner/spinner.d.ts +15 -0
- package/dist/spinner/spinner.js +14 -0
- package/dist/split-button/split-button.d.ts +28 -0
- package/dist/split-button/split-button.js +34 -0
- package/dist/splitter/splitter.d.ts +39 -0
- package/dist/splitter/splitter.js +80 -0
- package/dist/stepper/stepper.d.ts +51 -0
- package/dist/stepper/stepper.js +71 -0
- package/dist/switch/switch.d.ts +39 -0
- package/dist/switch/switch.js +30 -0
- package/dist/switch-group/switch-group.d.ts +29 -0
- package/dist/switch-group/switch-group.js +47 -0
- package/dist/tabs/tabs.d.ts +38 -0
- package/dist/tabs/tabs.js +74 -0
- package/dist/textarea/textarea.d.ts +28 -0
- package/dist/textarea/textarea.js +44 -0
- package/dist/timeline/timeline.d.ts +19 -0
- package/dist/timeline/timeline.js +12 -0
- package/dist/toast/toast-container.d.ts +12 -0
- package/dist/toast/toast-container.js +23 -0
- package/dist/toast/toast-store.d.ts +26 -0
- package/dist/toast/toast-store.js +51 -0
- package/dist/toolbar/toolbar.d.ts +29 -0
- package/dist/toolbar/toolbar.js +24 -0
- package/dist/tooltip/tooltip.d.ts +26 -0
- package/dist/tooltip/tooltip.js +113 -0
- package/dist/tree/tree.d.ts +31 -0
- package/dist/tree/tree.js +62 -0
- package/package.json +91 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
|
+
import { type KptI18nOverrides } from '../i18n/i18n-context.tsx';
|
|
3
|
+
export interface KptPanelProps extends ComponentPropsWithRef<'div'>, KptI18nOverrides {
|
|
4
|
+
header?: string;
|
|
5
|
+
/** Dokłada przycisk zwijania w nagłówku. */
|
|
6
|
+
toggleable?: boolean;
|
|
7
|
+
collapsed?: boolean;
|
|
8
|
+
defaultCollapsed?: boolean;
|
|
9
|
+
onCollapsedChange?: (collapsed: boolean) => void;
|
|
10
|
+
animated?: boolean;
|
|
11
|
+
animationDuration?: number;
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Panel z nagłówkiem i opcjonalnym zwijaniem. Akcje nagłówka wstaw przez `<KptPanel.Actions>`.
|
|
16
|
+
*
|
|
17
|
+
* Zwinięta treść zostaje w DOM, ale dostaje `inert` i `aria-hidden` — dzięki temu wysokość da się
|
|
18
|
+
* animować, a mimo to nic z jej wnętrza nie łapie fokusu ani nie trafia do czytnika ekranu.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* <KptPanel header="Ustawienia" toggleable>Treść…</KptPanel>
|
|
22
|
+
*/
|
|
23
|
+
export declare function KptPanel({ header, toggleable, collapsed, defaultCollapsed, onCollapsedChange, animated, animationDuration, locale, dictionary, className, style, children, ...rest }: Readonly<KptPanelProps>): import("react").JSX.Element;
|
|
24
|
+
export declare namespace KptPanel {
|
|
25
|
+
var Actions: typeof KptPanelActions;
|
|
26
|
+
}
|
|
27
|
+
/** Akcje w nagłówku panelu, obok tytułu. */
|
|
28
|
+
export declare function KptPanelActions({ className, ...rest }: Readonly<ComponentPropsWithRef<'span'>>): import("react").JSX.Element;
|
|
29
|
+
export declare namespace KptPanelActions {
|
|
30
|
+
var kptPanelSlot: "actions";
|
|
31
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Children, isValidElement } from 'react';
|
|
3
|
+
import { cn } from "../internal/cn.js";
|
|
4
|
+
import { useControllableState } from "../internal/use-controllable-state.js";
|
|
5
|
+
import { useKptMessages } from "../i18n/i18n-context.js";
|
|
6
|
+
import { KptIcon } from "../icon/icon.js";
|
|
7
|
+
/**
|
|
8
|
+
* Panel z nagłówkiem i opcjonalnym zwijaniem. Akcje nagłówka wstaw przez `<KptPanel.Actions>`.
|
|
9
|
+
*
|
|
10
|
+
* Zwinięta treść zostaje w DOM, ale dostaje `inert` i `aria-hidden` — dzięki temu wysokość da się
|
|
11
|
+
* animować, a mimo to nic z jej wnętrza nie łapie fokusu ani nie trafia do czytnika ekranu.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* <KptPanel header="Ustawienia" toggleable>Treść…</KptPanel>
|
|
15
|
+
*/
|
|
16
|
+
export function KptPanel({ header = '', toggleable = false, collapsed, defaultCollapsed = false, onCollapsedChange, animated = true, animationDuration = 500, locale, dictionary, className, style, children, ...rest }) {
|
|
17
|
+
const { t } = useKptMessages({ locale, dictionary });
|
|
18
|
+
const [isCollapsed, setCollapsed] = useControllableState({
|
|
19
|
+
value: collapsed,
|
|
20
|
+
defaultValue: defaultCollapsed,
|
|
21
|
+
onChange: onCollapsedChange,
|
|
22
|
+
});
|
|
23
|
+
const actions = [];
|
|
24
|
+
const body = [];
|
|
25
|
+
Children.forEach(children, (child) => {
|
|
26
|
+
const isActions = isValidElement(child) && child.type?.kptPanelSlot === 'actions';
|
|
27
|
+
(isActions ? actions : body).push(child);
|
|
28
|
+
});
|
|
29
|
+
return (_jsx("div", { className: cn('kpt-panel-host', className), style: { ['--kpt-anim-duration']: `${animated ? animationDuration : 0}ms`, ...style }, ...rest, children: _jsxs("div", { className: "kpt-panel", children: [_jsxs("div", { className: "kpt-panel__header", children: [_jsx("span", { className: "kpt-panel__title", children: header }), _jsx("span", { className: "kpt-panel__actions", children: actions }), toggleable ? (_jsx("button", { type: "button", className: "kpt-panel__toggle", onClick: () => setCollapsed(!isCollapsed), "aria-expanded": !isCollapsed, "aria-label": t('panel.toggle'), children: _jsx(KptIcon, { name: isCollapsed ? 'chevron-down' : 'chevron-up' }) })) : null] }), _jsx("div", { className: cn('kpt-panel__collapse', !isCollapsed && 'is-open'), inert: isCollapsed, "aria-hidden": isCollapsed, children: _jsx("div", { className: "kpt-panel__collapse-inner", children: _jsx("div", { className: "kpt-panel__body", children: body }) }) })] }) }));
|
|
30
|
+
}
|
|
31
|
+
/** Akcje w nagłówku panelu, obok tytułu. */
|
|
32
|
+
export function KptPanelActions({ className, ...rest }) {
|
|
33
|
+
return _jsx("span", { className: className, ...rest });
|
|
34
|
+
}
|
|
35
|
+
KptPanelActions.kptPanelSlot = 'actions';
|
|
36
|
+
KptPanel.Actions = KptPanelActions;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef } from 'react';
|
|
2
|
+
import { type KptI18nOverrides } from '../i18n/i18n-context.tsx';
|
|
3
|
+
export interface KptPasswordProps extends Omit<ComponentPropsWithRef<'div'>, 'onChange' | 'defaultValue'>, KptI18nOverrides {
|
|
4
|
+
value?: string;
|
|
5
|
+
defaultValue?: string;
|
|
6
|
+
onValueChange?: (value: string) => void;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
/** Id natywnego pola — pozwala związać etykietę `KptFormField`. */
|
|
9
|
+
id?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Podpowiedź autouzupełniania. Rejestracja i reset hasła wymagają `new-password` — inaczej
|
|
12
|
+
* menedżer haseł podstawia stare hasło zamiast zaproponować nowe.
|
|
13
|
+
*/
|
|
14
|
+
autoComplete?: string | null;
|
|
15
|
+
/** Miernik siły pod polem. */
|
|
16
|
+
feedback?: boolean;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
invalid?: boolean;
|
|
19
|
+
touched?: boolean;
|
|
20
|
+
onTouch?: () => void;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Pole hasła z przełącznikiem widoczności i opcjonalnym miernikiem siły.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* <KptPassword value={password} onValueChange={setPassword} feedback autoComplete="new-password" />
|
|
27
|
+
*/
|
|
28
|
+
export declare function KptPassword({ value, defaultValue, onValueChange, placeholder, id, autoComplete, feedback, disabled, invalid, touched, onTouch, locale, dictionary, className, ...rest }: Readonly<KptPasswordProps>): import("react").JSX.Element;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { cn } from "../internal/cn.js";
|
|
4
|
+
import { useControllableState } from "../internal/use-controllable-state.js";
|
|
5
|
+
import { useKptId } from "../internal/use-id.js";
|
|
6
|
+
import { useKptMessages } from "../i18n/i18n-context.js";
|
|
7
|
+
import { useKptFormFieldContext } from "../form-field/form-field-context.js";
|
|
8
|
+
import { KptIcon } from "../icon/icon.js";
|
|
9
|
+
/** Cztery niezależne kryteria; każde spełnione podnosi wynik o jeden. */
|
|
10
|
+
function scoreOf(password) {
|
|
11
|
+
let score = 0;
|
|
12
|
+
if (password.length >= 8)
|
|
13
|
+
score++;
|
|
14
|
+
if (/[A-Z]/.test(password) && /[a-z]/.test(password))
|
|
15
|
+
score++;
|
|
16
|
+
if (/\d/.test(password))
|
|
17
|
+
score++;
|
|
18
|
+
if (/[^A-Za-z0-9]/.test(password))
|
|
19
|
+
score++;
|
|
20
|
+
return Math.min(score, 4);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Pole hasła z przełącznikiem widoczności i opcjonalnym miernikiem siły.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* <KptPassword value={password} onValueChange={setPassword} feedback autoComplete="new-password" />
|
|
27
|
+
*/
|
|
28
|
+
export function KptPassword({ value, defaultValue = '', onValueChange, placeholder = '', id, autoComplete = 'current-password', feedback = false, disabled = false, invalid = false, touched, onTouch, locale, dictionary, className, ...rest }) {
|
|
29
|
+
const { t, messages } = useKptMessages({ locale, dictionary });
|
|
30
|
+
const field = useKptFormFieldContext();
|
|
31
|
+
const inputId = useKptId(id ?? field?.controlId, 'kpt-password');
|
|
32
|
+
const [current, setCurrent] = useControllableState({ value, defaultValue, onChange: onValueChange });
|
|
33
|
+
const [visible, setVisible] = useState(false);
|
|
34
|
+
const showInvalid = invalid && (touched ?? true);
|
|
35
|
+
const score = scoreOf(current);
|
|
36
|
+
return (_jsxs("div", { className: cn('kpt-password-host', className), ...rest, children: [_jsxs("div", { 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, 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", "data-score": score, children: [_jsx("div", { className: "kpt-password__bars", children: [0, 1, 2, 3].map((index) => (_jsx("span", { className: cn('kpt-password__bar', index < score && 'is-on') }, index))) }), _jsx("span", { className: "kpt-password__hint", children: messages.password.strength[score] })] })) : null] }));
|
|
37
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
|
+
import { type KptI18nOverrides } from '../i18n/i18n-context.tsx';
|
|
3
|
+
export interface KptPickListProps<T> extends Omit<ComponentPropsWithRef<'div'>, 'onChange' | 'children'>, KptI18nOverrides {
|
|
4
|
+
source?: T[];
|
|
5
|
+
defaultSource?: T[];
|
|
6
|
+
onSourceChange?: (items: T[]) => void;
|
|
7
|
+
target?: T[];
|
|
8
|
+
defaultTarget?: T[];
|
|
9
|
+
onTargetChange?: (items: T[]) => void;
|
|
10
|
+
/** Nagłówek listy źródłowej; bez niego `pickList.available`. */
|
|
11
|
+
sourceHeader?: string;
|
|
12
|
+
/** Nagłówek listy docelowej; bez niego `pickList.selected`. */
|
|
13
|
+
targetHeader?: string;
|
|
14
|
+
/** Szablon elementu — odpowiednik `<ng-template let-item>` z Angulara. */
|
|
15
|
+
renderItem: (item: T, index: number) => ReactNode;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* PickList — transfer elementów między dwiema listami. Klik zaznacza, przyciski pośrodku
|
|
19
|
+
* przenoszą zaznaczone albo wszystko.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* <KptPickList
|
|
23
|
+
* source={available} onSourceChange={setAvailable}
|
|
24
|
+
* target={selected} onTargetChange={setSelected}
|
|
25
|
+
* renderItem={(item) => item.name}
|
|
26
|
+
* />
|
|
27
|
+
*/
|
|
28
|
+
export declare function KptPickList<T>({ source, defaultSource, onSourceChange, target, defaultTarget, onTargetChange, sourceHeader, targetHeader, renderItem, locale, dictionary, className, ...rest }: Readonly<KptPickListProps<T>>): import("react").JSX.Element;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { cn } from "../internal/cn.js";
|
|
4
|
+
import { useControllableState } from "../internal/use-controllable-state.js";
|
|
5
|
+
import { useKptMessages } from "../i18n/i18n-context.js";
|
|
6
|
+
import { KptIcon } from "../icon/icon.js";
|
|
7
|
+
const EMPTY = [];
|
|
8
|
+
/**
|
|
9
|
+
* PickList — transfer elementów między dwiema listami. Klik zaznacza, przyciski pośrodku
|
|
10
|
+
* przenoszą zaznaczone albo wszystko.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* <KptPickList
|
|
14
|
+
* source={available} onSourceChange={setAvailable}
|
|
15
|
+
* target={selected} onTargetChange={setSelected}
|
|
16
|
+
* renderItem={(item) => item.name}
|
|
17
|
+
* />
|
|
18
|
+
*/
|
|
19
|
+
export function KptPickList({ source, defaultSource = EMPTY, onSourceChange, target, defaultTarget = EMPTY, onTargetChange, sourceHeader, targetHeader, renderItem, locale, dictionary, className, ...rest }) {
|
|
20
|
+
const { t } = useKptMessages({ locale, dictionary });
|
|
21
|
+
const [left, setLeft] = useControllableState({
|
|
22
|
+
value: source,
|
|
23
|
+
defaultValue: defaultSource,
|
|
24
|
+
onChange: onSourceChange,
|
|
25
|
+
});
|
|
26
|
+
const [right, setRight] = useControllableState({
|
|
27
|
+
value: target,
|
|
28
|
+
defaultValue: defaultTarget,
|
|
29
|
+
onChange: onTargetChange,
|
|
30
|
+
});
|
|
31
|
+
// Zaznaczenie trzymamy jako zbiory referencji, nie indeksów: po przeniesieniu elementu indeksy
|
|
32
|
+
// po obu stronach się przesuwają, a referencja zostaje ta sama.
|
|
33
|
+
const [selLeft, setSelLeft] = useState(new Set());
|
|
34
|
+
const [selRight, setSelRight] = useState(new Set());
|
|
35
|
+
const toggle = (side, item) => {
|
|
36
|
+
const [selection, setSelection] = side === 'source' ? [selLeft, setSelLeft] : [selRight, setSelRight];
|
|
37
|
+
const next = new Set(selection);
|
|
38
|
+
if (next.has(item))
|
|
39
|
+
next.delete(item);
|
|
40
|
+
else
|
|
41
|
+
next.add(item);
|
|
42
|
+
setSelection(next);
|
|
43
|
+
};
|
|
44
|
+
const move = (from, all) => {
|
|
45
|
+
const fromItems = from === 'source' ? left : right;
|
|
46
|
+
const toItems = from === 'source' ? right : left;
|
|
47
|
+
const setFrom = from === 'source' ? setLeft : setRight;
|
|
48
|
+
const setTo = from === 'source' ? setRight : setLeft;
|
|
49
|
+
const selection = from === 'source' ? selLeft : selRight;
|
|
50
|
+
const setSelection = from === 'source' ? setSelLeft : setSelRight;
|
|
51
|
+
const moving = all ? fromItems : fromItems.filter((item) => selection.has(item));
|
|
52
|
+
if (!moving.length)
|
|
53
|
+
return;
|
|
54
|
+
setFrom(fromItems.filter((item) => !moving.includes(item)));
|
|
55
|
+
setTo([...toItems, ...moving]);
|
|
56
|
+
setSelection(new Set());
|
|
57
|
+
};
|
|
58
|
+
const column = (side) => {
|
|
59
|
+
const items = side === 'source' ? left : right;
|
|
60
|
+
const selection = side === 'source' ? selLeft : selRight;
|
|
61
|
+
const header = side === 'source' ? (sourceHeader ?? t('pickList.available')) : (targetHeader ?? t('pickList.selected'));
|
|
62
|
+
return (_jsxs("div", { className: "kpt-pick-list__col", children: [_jsx("div", { className: "kpt-pick-list__header", children: header }), _jsx("ul", { className: "kpt-pick-list__items", children: items.map((item, index) => (_jsx("li", { className: cn('kpt-pick-list__item', selection.has(item) && 'is-selected'), onClick: () => toggle(side, item), children: renderItem(item, index) }, index))) })] }));
|
|
63
|
+
};
|
|
64
|
+
return (_jsx("div", { className: cn('kpt-pick-list-host', className), ...rest, children: _jsxs("div", { className: "kpt-pick-list", children: [column('source'), _jsxs("div", { className: "kpt-pick-list__controls", children: [_jsxs("button", { type: "button", "aria-label": t('pickList.moveAllRight'), onClick: () => move('source', true), children: [_jsx(KptIcon, { name: "chevron-right" }), _jsx(KptIcon, { name: "chevron-right" })] }), _jsx("button", { type: "button", "aria-label": t('pickList.moveRight'), onClick: () => move('source', false), children: _jsx(KptIcon, { name: "chevron-right" }) }), _jsx("button", { type: "button", "aria-label": t('pickList.moveLeft'), onClick: () => move('target', false), children: _jsx(KptIcon, { name: "chevron-left" }) }), _jsxs("button", { type: "button", "aria-label": t('pickList.moveAllLeft'), onClick: () => move('target', true), children: [_jsx(KptIcon, { name: "chevron-left" }), _jsx(KptIcon, { name: "chevron-left" })] })] }), column('target')] }) }));
|
|
65
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
|
+
export interface KptPopoverProps extends Omit<ComponentPropsWithRef<'span'>, 'content'> {
|
|
3
|
+
/** Element otwierający dymek — renderowany w miejscu popovera. */
|
|
4
|
+
trigger: ReactNode;
|
|
5
|
+
/** Treść panelu. */
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
open?: boolean;
|
|
8
|
+
defaultOpen?: boolean;
|
|
9
|
+
onOpenChange?: (open: boolean) => void;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Popover — dowolna treść w dymku przypiętym do wyzwalacza (bogatszy niż tooltip).
|
|
13
|
+
*
|
|
14
|
+
* Port Angulara stoi na CDK Overlay; tutaj panel renderuje się w portalu do `document.body`,
|
|
15
|
+
* z tym samym zachowaniem: pozycja pod wyzwalaczem z odbiciem w górę przy braku miejsca,
|
|
16
|
+
* zamykanie kliknięciem poza panelem i klawiszem Escape.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* <KptPopover trigger={<KptButton variant="outline">Szczegóły</KptButton>}>
|
|
20
|
+
* <div>Bogata treść popovera…</div>
|
|
21
|
+
* </KptPopover>
|
|
22
|
+
*/
|
|
23
|
+
export declare function KptPopover({ trigger, children, open, defaultOpen, onOpenChange, className, ...rest }: Readonly<KptPopoverProps>): import("react").JSX.Element;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useRef } from 'react';
|
|
3
|
+
import { cn } from "../internal/cn.js";
|
|
4
|
+
import { KptOverlay } from "../internal/overlay.js";
|
|
5
|
+
import { useControllableState } from "../internal/use-controllable-state.js";
|
|
6
|
+
/**
|
|
7
|
+
* Popover — dowolna treść w dymku przypiętym do wyzwalacza (bogatszy niż tooltip).
|
|
8
|
+
*
|
|
9
|
+
* Port Angulara stoi na CDK Overlay; tutaj panel renderuje się w portalu do `document.body`,
|
|
10
|
+
* z tym samym zachowaniem: pozycja pod wyzwalaczem z odbiciem w górę przy braku miejsca,
|
|
11
|
+
* zamykanie kliknięciem poza panelem i klawiszem Escape.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* <KptPopover trigger={<KptButton variant="outline">Szczegóły</KptButton>}>
|
|
15
|
+
* <div>Bogata treść popovera…</div>
|
|
16
|
+
* </KptPopover>
|
|
17
|
+
*/
|
|
18
|
+
export function KptPopover({ trigger, children, open, defaultOpen = false, onOpenChange, className, ...rest }) {
|
|
19
|
+
const triggerRef = useRef(null);
|
|
20
|
+
const [isOpen, setOpen] = useControllableState({
|
|
21
|
+
value: open,
|
|
22
|
+
defaultValue: defaultOpen,
|
|
23
|
+
onChange: onOpenChange,
|
|
24
|
+
});
|
|
25
|
+
const close = useCallback(() => setOpen(false), [setOpen]);
|
|
26
|
+
return (_jsxs("span", { className: cn('kpt-popover-host', className), ...rest, children: [_jsx("span", { className: "kpt-popover__trigger", ref: triggerRef, onClick: () => setOpen(!isOpen), children: trigger }), _jsx(KptOverlay, { open: isOpen, anchor: triggerRef.current, onClose: close, offset: 6, children: _jsx("div", { className: "kpt-popover__panel", role: "dialog", children: children }) })] }));
|
|
27
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef } from 'react';
|
|
2
|
+
export type KptProgressVariant = 'primary' | 'success' | 'danger' | 'warning' | 'info';
|
|
3
|
+
export interface KptProgressProps extends Omit<ComponentPropsWithRef<'div'>, 'children'> {
|
|
4
|
+
/** 0–100 albo `null` = postęp nieokreślony. */
|
|
5
|
+
value?: number | null;
|
|
6
|
+
variant?: KptProgressVariant;
|
|
7
|
+
type?: 'linear' | 'circular';
|
|
8
|
+
/** Średnica wariantu kołowego w pikselach. */
|
|
9
|
+
diameter?: number;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Wskaźnik postępu — liniowy lub kołowy, określony (0–100) albo nieokreślony (`value` = null).
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* <KptProgress value={60} />
|
|
16
|
+
* <KptProgress type="circular" value={75} variant="success" />
|
|
17
|
+
* <KptProgress value={null} />
|
|
18
|
+
*/
|
|
19
|
+
export declare function KptProgress({ value, variant, type, diameter, className, ...rest }: Readonly<KptProgressProps>): import("react").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../internal/cn.js";
|
|
3
|
+
/** Promień okręgu w viewBox 0 0 40 40 — obwód liczymy z niego, nie ze średnicy w pikselach. */
|
|
4
|
+
const RADIUS = 16;
|
|
5
|
+
const CIRCUMFERENCE = 2 * Math.PI * RADIUS;
|
|
6
|
+
/**
|
|
7
|
+
* Wskaźnik postępu — liniowy lub kołowy, określony (0–100) albo nieokreślony (`value` = null).
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* <KptProgress value={60} />
|
|
11
|
+
* <KptProgress type="circular" value={75} variant="success" />
|
|
12
|
+
* <KptProgress value={null} />
|
|
13
|
+
*/
|
|
14
|
+
export function KptProgress({ value = null, variant = 'primary', type = 'linear', diameter = 40, className, ...rest }) {
|
|
15
|
+
const indeterminate = value == null;
|
|
16
|
+
// Nieokreślony postęp pokazuje wycinek 25% obwodu, który obraca CSS — stąd stały offset.
|
|
17
|
+
const offset = indeterminate
|
|
18
|
+
? CIRCUMFERENCE * 0.75
|
|
19
|
+
: CIRCUMFERENCE * (1 - Math.min(100, Math.max(0, value)) / 100);
|
|
20
|
+
return (_jsx("div", { className: cn('kpt-progress-host', className), ...rest, children: type === 'circular' ? (_jsxs("svg", { className: cn('kpt-progress__circular', indeterminate && 'kpt-progress--indeterminate'), "data-variant": variant, width: diameter, height: diameter, viewBox: "0 0 40 40", role: "progressbar", "aria-valuenow": value ?? undefined, children: [_jsx("circle", { className: "kpt-progress__track", cx: "20", cy: "20", r: RADIUS }), _jsx("circle", { className: "kpt-progress__bar", cx: "20", cy: "20", r: RADIUS, style: { strokeDasharray: CIRCUMFERENCE, strokeDashoffset: offset } })] })) : (_jsx("div", { className: "kpt-progress__linear", "data-variant": variant, role: "progressbar", "aria-valuenow": value ?? undefined, children: _jsx("div", { className: cn('kpt-progress__bar', indeterminate && 'kpt-progress--indeterminate'), style: { width: `${value ?? 0}%` } }) })) }));
|
|
21
|
+
}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
export { KptAppShell, useKptAppShell, useKptShellNavToggle } from './app-shell/app-shell.tsx';
|
|
2
|
+
export type { KptAppShellContextValue, KptAppShellProps, KptSidenavMode } from './app-shell/app-shell.tsx';
|
|
3
|
+
export { KptToolbar, KptToolbarSpacer } from './toolbar/toolbar.tsx';
|
|
4
|
+
export type { KptToolbarProps } from './toolbar/toolbar.tsx';
|
|
5
|
+
export { KptSidenav, KptSidenavFooter } from './sidenav/sidenav.tsx';
|
|
6
|
+
export type { KptSidenavProps } from './sidenav/sidenav.tsx';
|
|
7
|
+
export { KptTabs, KptTab } from './tabs/tabs.tsx';
|
|
8
|
+
export type { KptTabProps, KptTabsProps } from './tabs/tabs.tsx';
|
|
9
|
+
export { KptAccordion, KptAccordionPanel } from './accordion/accordion.tsx';
|
|
10
|
+
export type { KptAccordionPanelProps, KptAccordionProps } from './accordion/accordion.tsx';
|
|
11
|
+
export { KptPanel, KptPanelActions } from './panel/panel.tsx';
|
|
12
|
+
export type { KptPanelProps } from './panel/panel.tsx';
|
|
13
|
+
export { KptStepper, KptStep, useKptStepper } from './stepper/stepper.tsx';
|
|
14
|
+
export type { KptStepProps, KptStepperContextValue, KptStepperProps } from './stepper/stepper.tsx';
|
|
15
|
+
export { KptFieldset } from './fieldset/fieldset.tsx';
|
|
16
|
+
export type { KptFieldsetProps } from './fieldset/fieldset.tsx';
|
|
17
|
+
export { KptTimeline } from './timeline/timeline.tsx';
|
|
18
|
+
export type { KptTimelineItem, KptTimelineProps } from './timeline/timeline.tsx';
|
|
19
|
+
export { KptAlert } from './alert/alert.tsx';
|
|
20
|
+
export type { KptAlertProps } from './alert/alert.tsx';
|
|
21
|
+
export { KptDivider } from './divider/divider.tsx';
|
|
22
|
+
export type { KptDividerOrientation, KptDividerProps } from './divider/divider.tsx';
|
|
23
|
+
export { KptEmpty } from './empty/empty.tsx';
|
|
24
|
+
export type { KptEmptyProps } from './empty/empty.tsx';
|
|
25
|
+
export { KptProgress } from './progress/progress.tsx';
|
|
26
|
+
export type { KptProgressProps, KptProgressVariant } from './progress/progress.tsx';
|
|
27
|
+
export { KptSpinner } from './spinner/spinner.tsx';
|
|
28
|
+
export type { KptSpinnerProps } from './spinner/spinner.tsx';
|
|
29
|
+
export { KptSkeleton } from './skeleton/skeleton.tsx';
|
|
30
|
+
export type { KptSkeletonProps, KptSkeletonVariant } from './skeleton/skeleton.tsx';
|
|
31
|
+
export { KptIcon } from './icon/icon.tsx';
|
|
32
|
+
export type { KptIconProps } from './icon/icon.tsx';
|
|
33
|
+
export { getKptIcon, hasKptIcon, registerKptIcons } from './icon/icon-registry.ts';
|
|
34
|
+
export { KptAvatar } from './avatar/avatar.tsx';
|
|
35
|
+
export type { KptAvatarProps, KptAvatarShape, KptAvatarSize } from './avatar/avatar.tsx';
|
|
36
|
+
export { KptBadge } from './badge/badge.tsx';
|
|
37
|
+
export type { KptBadgeProps, KptBadgeSize, KptBadgeVariant } from './badge/badge.tsx';
|
|
38
|
+
export { KptChip } from './chip/chip.tsx';
|
|
39
|
+
export type { KptChipProps, KptChipVariant } from './chip/chip.tsx';
|
|
40
|
+
export { KptDialog, KptDialogFooter } from './dialog/dialog.tsx';
|
|
41
|
+
export type { KptDialogProps } from './dialog/dialog.tsx';
|
|
42
|
+
export { KptDrawer } from './drawer/drawer.tsx';
|
|
43
|
+
export type { KptDrawerPosition, KptDrawerProps } from './drawer/drawer.tsx';
|
|
44
|
+
export { KptBottomSheet } from './bottom-sheet/bottom-sheet.tsx';
|
|
45
|
+
export type { KptBottomSheetProps } from './bottom-sheet/bottom-sheet.tsx';
|
|
46
|
+
export { KptSplitter, KptSplitterStart, KptSplitterEnd } from './splitter/splitter.tsx';
|
|
47
|
+
export type { KptSplitterOrientation, KptSplitterPaneProps, KptSplitterProps } from './splitter/splitter.tsx';
|
|
48
|
+
export { KptScrollTop } from './scroll-top/scroll-top.tsx';
|
|
49
|
+
export type { KptScrollTopProps } from './scroll-top/scroll-top.tsx';
|
|
50
|
+
export { KptImage } from './image/image.tsx';
|
|
51
|
+
export type { KptImageProps } from './image/image.tsx';
|
|
52
|
+
export { KptMeterGroup } from './meter-group/meter-group.tsx';
|
|
53
|
+
export type { KptMeterGroupProps, KptMeterItem } from './meter-group/meter-group.tsx';
|
|
54
|
+
export { KptAvatarGroup } from './avatar-group/avatar-group.tsx';
|
|
55
|
+
export type { KptAvatarGroupProps, KptAvatarItem } from './avatar-group/avatar-group.tsx';
|
|
56
|
+
export { KptSpeedDial } from './speed-dial/speed-dial.tsx';
|
|
57
|
+
export type { KptSpeedDialDirection, KptSpeedDialProps } from './speed-dial/speed-dial.tsx';
|
|
58
|
+
export { KptCarousel } from './carousel/carousel.tsx';
|
|
59
|
+
export type { KptCarouselProps } from './carousel/carousel.tsx';
|
|
60
|
+
export { KptGalleria } from './galleria/galleria.tsx';
|
|
61
|
+
export type { KptGalleriaItem, KptGalleriaProps } from './galleria/galleria.tsx';
|
|
62
|
+
export { KptPickList } from './pick-list/pick-list.tsx';
|
|
63
|
+
export type { KptPickListProps } from './pick-list/pick-list.tsx';
|
|
64
|
+
export { KptDataTable } from './data-table/data-table.tsx';
|
|
65
|
+
export type { KptDataTableProps } from './data-table/data-table.tsx';
|
|
66
|
+
export { exportTableCsv } from './data-table/export-csv.ts';
|
|
67
|
+
export type { KptCellEditContext, KptCellEditEvent, KptCellEditRenderers, KptCellRenderers, KptColumn, KptColumnEdit, KptColumnEditType, KptSortDir, KptTableLazyState, } from './data-table/data-table-types.ts';
|
|
68
|
+
export type { KptColumnFilter, KptColumnFilterType, KptColumnSummary, KptSummaryFn } from '@konce-pt/table';
|
|
69
|
+
export { KptDataView } from './data-view/data-view.tsx';
|
|
70
|
+
export type { KptDataViewLayout, KptDataViewProps } from './data-view/data-view.tsx';
|
|
71
|
+
export { KptTree } from './tree/tree.tsx';
|
|
72
|
+
export type { KptTreeNode, KptTreeProps } from './tree/tree.tsx';
|
|
73
|
+
export { KptOrderList } from './order-list/order-list.tsx';
|
|
74
|
+
export type { KptOrderListProps } from './order-list/order-list.tsx';
|
|
75
|
+
export { KptRichText } from './rich-text/rich-text.tsx';
|
|
76
|
+
export type { KptRichTextProps, KptRichTool, KptRichToolbar } from './rich-text/rich-text.tsx';
|
|
77
|
+
export { KptAuth } from './auth/auth.tsx';
|
|
78
|
+
export type { KptAuthProps } from './auth/auth.tsx';
|
|
79
|
+
export { KPT_AUTH_MIN_PASSWORD } from './auth/auth-types.ts';
|
|
80
|
+
export type { KptAuthErrorKind, KptAuthLayout, KptAuthMode, KptAuthProvider, KptAuthProviderLayout, KptAuthResetValue, KptAuthSignInValue, KptAuthSignUpValue, } from './auth/auth-types.ts';
|
|
81
|
+
export { KptConfirmContainer } from './confirm/confirm-container.tsx';
|
|
82
|
+
export type { KptConfirmContainerProps } from './confirm/confirm-container.tsx';
|
|
83
|
+
export { kptConfirm, useKptConfirmRequest } from './confirm/confirm-store.ts';
|
|
84
|
+
export type { KptConfirmOptions, KptConfirmRequest } from './confirm/confirm-store.ts';
|
|
85
|
+
export { KptToastContainer } from './toast/toast-container.tsx';
|
|
86
|
+
export type { KptToastContainerProps } from './toast/toast-container.tsx';
|
|
87
|
+
export { kptToast, useKptToasts } from './toast/toast-store.ts';
|
|
88
|
+
export type { KptToast, KptToastOptions } from './toast/toast-store.ts';
|
|
89
|
+
export { KptMenu } from './menu/menu.tsx';
|
|
90
|
+
export { KptMenubar } from './menubar/menubar.tsx';
|
|
91
|
+
export type { KptMenubarProps } from './menubar/menubar.tsx';
|
|
92
|
+
export { KptMegamenu } from './megamenu/megamenu.tsx';
|
|
93
|
+
export type { KptMegamenuProps } from './megamenu/megamenu.tsx';
|
|
94
|
+
export { KptBreadcrumb } from './breadcrumb/breadcrumb.tsx';
|
|
95
|
+
export type { KptBreadcrumbItem, KptBreadcrumbProps } from './breadcrumb/breadcrumb.tsx';
|
|
96
|
+
export type { KptMenuProps } from './menu/menu.tsx';
|
|
97
|
+
export type { KptMenuItem, KptMenuItemAvatar } from './menu/menu-item.ts';
|
|
98
|
+
export { KptContextMenu } from './context-menu/context-menu.tsx';
|
|
99
|
+
export type { KptContextMenuProps } from './context-menu/context-menu.tsx';
|
|
100
|
+
export { KptTooltip } from './tooltip/tooltip.tsx';
|
|
101
|
+
export type { KptTooltipPosition, KptTooltipProps } from './tooltip/tooltip.tsx';
|
|
102
|
+
export { KptPopover } from './popover/popover.tsx';
|
|
103
|
+
export type { KptPopoverProps } from './popover/popover.tsx';
|
|
104
|
+
export { KptOverlay } from './internal/overlay.tsx';
|
|
105
|
+
export type { KptOverlayProps } from './internal/overlay.tsx';
|
|
106
|
+
export { KptButtonGroup } from './button-group/button-group.tsx';
|
|
107
|
+
export type { KptButtonGroupProps } from './button-group/button-group.tsx';
|
|
108
|
+
export { KptSelect } from './select/select.tsx';
|
|
109
|
+
export type { KptSelectProps } from './select/select.tsx';
|
|
110
|
+
export type { KptAlertVariant, KptOption } from './shared/types.ts';
|
|
111
|
+
export { KptFormField } from './form-field/form-field.tsx';
|
|
112
|
+
export type { KptFormFieldLabelType, KptFormFieldProps } from './form-field/form-field.tsx';
|
|
113
|
+
export { useKptFormFieldContext, useKptFormFieldFilled } from './form-field/form-field-context.ts';
|
|
114
|
+
export type { KptFormFieldContextValue } from './form-field/form-field-context.ts';
|
|
115
|
+
export { KptCheckbox } from './checkbox/checkbox.tsx';
|
|
116
|
+
export type { KptCheckboxProps } from './checkbox/checkbox.tsx';
|
|
117
|
+
export { KptAutocomplete } from './autocomplete/autocomplete.tsx';
|
|
118
|
+
export type { KptAutocompleteProps } from './autocomplete/autocomplete.tsx';
|
|
119
|
+
export { KptListbox } from './listbox/listbox.tsx';
|
|
120
|
+
export type { KptListboxProps } from './listbox/listbox.tsx';
|
|
121
|
+
export { KptChipsInput } from './chips-input/chips-input.tsx';
|
|
122
|
+
export type { KptChipsInputProps } from './chips-input/chips-input.tsx';
|
|
123
|
+
export { KptInput } from './input/input.tsx';
|
|
124
|
+
export { KptInputNumber } from './input-number/input-number.tsx';
|
|
125
|
+
export { KptPassword } from './password/password.tsx';
|
|
126
|
+
export type { KptPasswordProps } from './password/password.tsx';
|
|
127
|
+
export { KptInputOtp } from './input-otp/input-otp.tsx';
|
|
128
|
+
export type { KptInputOtpProps } from './input-otp/input-otp.tsx';
|
|
129
|
+
export { KptInputMask } from './input-mask/input-mask.tsx';
|
|
130
|
+
export type { KptInputMaskProps } from './input-mask/input-mask.tsx';
|
|
131
|
+
export type { KptInputNumberProps } from './input-number/input-number.tsx';
|
|
132
|
+
export { KptRadioGroup } from './radio-group/radio-group.tsx';
|
|
133
|
+
export type { KptRadioGroupProps } from './radio-group/radio-group.tsx';
|
|
134
|
+
export { KptSlider } from './slider/slider.tsx';
|
|
135
|
+
export type { KptSliderProps, KptSliderValue } from './slider/slider.tsx';
|
|
136
|
+
export type { KptInputProps, KptInputType } from './input/input.tsx';
|
|
137
|
+
export { KptSwitch } from './switch/switch.tsx';
|
|
138
|
+
export type { KptSwitchProps } from './switch/switch.tsx';
|
|
139
|
+
export { KptDatepicker } from './datepicker/datepicker.tsx';
|
|
140
|
+
export type { KptDatepickerMode, KptDatepickerProps, KptDatepickerView } from './datepicker/datepicker.tsx';
|
|
141
|
+
export { KptDateRange } from './date-range/date-range.tsx';
|
|
142
|
+
export type { KptDateRangeMode, KptDateRangeProps, KptDateRangeValue } from './date-range/date-range.tsx';
|
|
143
|
+
export { KptClock } from './clock/clock.tsx';
|
|
144
|
+
export type { KptClockProps } from './clock/clock.tsx';
|
|
145
|
+
export { KptColorPicker } from './color-picker/color-picker.tsx';
|
|
146
|
+
export type { KptColorPickerProps } from './color-picker/color-picker.tsx';
|
|
147
|
+
export { KptFileUpload } from './file-upload/file-upload.tsx';
|
|
148
|
+
export type { KptFileUploadProps } from './file-upload/file-upload.tsx';
|
|
149
|
+
export { KptSwitchGroup } from './switch-group/switch-group.tsx';
|
|
150
|
+
export type { KptSwitchGroupProps } from './switch-group/switch-group.tsx';
|
|
151
|
+
export { KptRating } from './rating/rating.tsx';
|
|
152
|
+
export type { KptRatingProps } from './rating/rating.tsx';
|
|
153
|
+
export { KptKnob } from './knob/knob.tsx';
|
|
154
|
+
export type { KptKnobProps } from './knob/knob.tsx';
|
|
155
|
+
export { KptTextarea } from './textarea/textarea.tsx';
|
|
156
|
+
export type { KptTextareaProps } from './textarea/textarea.tsx';
|
|
157
|
+
export { KptPaginator } from './paginator/paginator.tsx';
|
|
158
|
+
export type { KptPaginatorProps } from './paginator/paginator.tsx';
|
|
159
|
+
export { KptButton } from './button/button.tsx';
|
|
160
|
+
export { KptIconButton } from './icon-button/icon-button.tsx';
|
|
161
|
+
export type { KptIconButtonProps } from './icon-button/icon-button.tsx';
|
|
162
|
+
export { KptFab } from './fab/fab.tsx';
|
|
163
|
+
export type { KptFabProps } from './fab/fab.tsx';
|
|
164
|
+
export { KptSplitButton } from './split-button/split-button.tsx';
|
|
165
|
+
export type { KptSplitButtonProps } from './split-button/split-button.tsx';
|
|
166
|
+
export type { KptButtonProps, KptButtonSize, KptButtonVariant } from './button/button.tsx';
|
|
167
|
+
export { KptCard, KptCardActions, KptCardFooter, KptCardHeader, KptCardLead, KptCardMedia, KptCardMeta, KptCardSection, KptCardSubtitle, KptCardTags, KptCardTitle, } from './card/card.tsx';
|
|
168
|
+
export type { KptCardProps, KptCardVariant } from './card/card.tsx';
|
|
169
|
+
export { KptI18nProvider, useKptI18n, useKptMessages } from './i18n/i18n-context.tsx';
|
|
170
|
+
export type { KptI18nContextValue, KptI18nOverrides, KptI18nProviderProps } from './i18n/i18n-context.tsx';
|
|
171
|
+
export { KPT_MESSAGES_EN, KPT_MESSAGES_PL } from '@konce-pt/i18n';
|
|
172
|
+
export type { DeepPartial, KptLocale, KptMessages } from '@konce-pt/i18n';
|
|
173
|
+
export { cn } from './internal/cn.ts';
|
|
174
|
+
export type { ClassValue } from './internal/cn.ts';
|
|
175
|
+
export { composeRefs } from './internal/compose-refs.ts';
|
|
176
|
+
export { Slot } from './internal/slot.tsx';
|
|
177
|
+
export type { SlotProps } from './internal/slot.tsx';
|
|
178
|
+
export type { AsChildProps, KptHostProps } from './internal/types.ts';
|
|
179
|
+
export { KPT_BREAKPOINTS, useKptBreakpointUp, useKptMediaQuery } from './internal/use-breakpoint.ts';
|
|
180
|
+
export type { KptBreakpoint } from './internal/use-breakpoint.ts';
|
|
181
|
+
export { useControllableState } from './internal/use-controllable-state.ts';
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @konce-pt/react — publiczne API.
|
|
3
|
+
*
|
|
4
|
+
* Komponenty renderują te same klasy `kpt-*` i te same tokeny `--kpt-*`, co port
|
|
5
|
+
* Angulara; warstwa CSS (`@konce-pt/styles`, `@konce-pt/grid`, `@konce-pt/tokens`)
|
|
6
|
+
* jest wspólna i nie ma tu własnych stylów.
|
|
7
|
+
*/
|
|
8
|
+
// Komponenty — układ
|
|
9
|
+
export { KptAppShell, useKptAppShell, useKptShellNavToggle } from "./app-shell/app-shell.js";
|
|
10
|
+
export { KptToolbar, KptToolbarSpacer } from "./toolbar/toolbar.js";
|
|
11
|
+
export { KptSidenav, KptSidenavFooter } from "./sidenav/sidenav.js";
|
|
12
|
+
// Komponenty — panele
|
|
13
|
+
export { KptTabs, KptTab } from "./tabs/tabs.js";
|
|
14
|
+
export { KptAccordion, KptAccordionPanel } from "./accordion/accordion.js";
|
|
15
|
+
export { KptPanel, KptPanelActions } from "./panel/panel.js";
|
|
16
|
+
export { KptStepper, KptStep, useKptStepper } from "./stepper/stepper.js";
|
|
17
|
+
export { KptFieldset } from "./fieldset/fieldset.js";
|
|
18
|
+
export { KptTimeline } from "./timeline/timeline.js";
|
|
19
|
+
// Komponenty — prezentacja
|
|
20
|
+
export { KptAlert } from "./alert/alert.js";
|
|
21
|
+
export { KptDivider } from "./divider/divider.js";
|
|
22
|
+
export { KptEmpty } from "./empty/empty.js";
|
|
23
|
+
export { KptProgress } from "./progress/progress.js";
|
|
24
|
+
export { KptSpinner } from "./spinner/spinner.js";
|
|
25
|
+
export { KptSkeleton } from "./skeleton/skeleton.js";
|
|
26
|
+
export { KptIcon } from "./icon/icon.js";
|
|
27
|
+
export { getKptIcon, hasKptIcon, registerKptIcons } from "./icon/icon-registry.js";
|
|
28
|
+
export { KptAvatar } from "./avatar/avatar.js";
|
|
29
|
+
export { KptBadge } from "./badge/badge.js";
|
|
30
|
+
export { KptChip } from "./chip/chip.js";
|
|
31
|
+
// Komponenty — nakładki
|
|
32
|
+
export { KptDialog, KptDialogFooter } from "./dialog/dialog.js";
|
|
33
|
+
export { KptDrawer } from "./drawer/drawer.js";
|
|
34
|
+
export { KptBottomSheet } from "./bottom-sheet/bottom-sheet.js";
|
|
35
|
+
export { KptSplitter, KptSplitterStart, KptSplitterEnd } from "./splitter/splitter.js";
|
|
36
|
+
export { KptScrollTop } from "./scroll-top/scroll-top.js";
|
|
37
|
+
export { KptImage } from "./image/image.js";
|
|
38
|
+
export { KptMeterGroup } from "./meter-group/meter-group.js";
|
|
39
|
+
export { KptAvatarGroup } from "./avatar-group/avatar-group.js";
|
|
40
|
+
export { KptSpeedDial } from "./speed-dial/speed-dial.js";
|
|
41
|
+
export { KptCarousel } from "./carousel/carousel.js";
|
|
42
|
+
export { KptGalleria } from "./galleria/galleria.js";
|
|
43
|
+
export { KptPickList } from "./pick-list/pick-list.js";
|
|
44
|
+
export { KptDataTable } from "./data-table/data-table.js";
|
|
45
|
+
export { exportTableCsv } from "./data-table/export-csv.js";
|
|
46
|
+
export { KptDataView } from "./data-view/data-view.js";
|
|
47
|
+
export { KptTree } from "./tree/tree.js";
|
|
48
|
+
export { KptOrderList } from "./order-list/order-list.js";
|
|
49
|
+
export { KptRichText } from "./rich-text/rich-text.js";
|
|
50
|
+
export { KptAuth } from "./auth/auth.js";
|
|
51
|
+
export { KPT_AUTH_MIN_PASSWORD } from "./auth/auth-types.js";
|
|
52
|
+
export { KptConfirmContainer } from "./confirm/confirm-container.js";
|
|
53
|
+
export { kptConfirm, useKptConfirmRequest } from "./confirm/confirm-store.js";
|
|
54
|
+
export { KptToastContainer } from "./toast/toast-container.js";
|
|
55
|
+
export { kptToast, useKptToasts } from "./toast/toast-store.js";
|
|
56
|
+
export { KptMenu } from "./menu/menu.js";
|
|
57
|
+
export { KptMenubar } from "./menubar/menubar.js";
|
|
58
|
+
export { KptMegamenu } from "./megamenu/megamenu.js";
|
|
59
|
+
export { KptBreadcrumb } from "./breadcrumb/breadcrumb.js";
|
|
60
|
+
export { KptContextMenu } from "./context-menu/context-menu.js";
|
|
61
|
+
export { KptTooltip } from "./tooltip/tooltip.js";
|
|
62
|
+
export { KptPopover } from "./popover/popover.js";
|
|
63
|
+
export { KptOverlay } from "./internal/overlay.js";
|
|
64
|
+
// Komponenty — formularze
|
|
65
|
+
export { KptButtonGroup } from "./button-group/button-group.js";
|
|
66
|
+
export { KptSelect } from "./select/select.js";
|
|
67
|
+
export { KptFormField } from "./form-field/form-field.js";
|
|
68
|
+
export { useKptFormFieldContext, useKptFormFieldFilled } from "./form-field/form-field-context.js";
|
|
69
|
+
export { KptCheckbox } from "./checkbox/checkbox.js";
|
|
70
|
+
export { KptAutocomplete } from "./autocomplete/autocomplete.js";
|
|
71
|
+
export { KptListbox } from "./listbox/listbox.js";
|
|
72
|
+
export { KptChipsInput } from "./chips-input/chips-input.js";
|
|
73
|
+
export { KptInput } from "./input/input.js";
|
|
74
|
+
export { KptInputNumber } from "./input-number/input-number.js";
|
|
75
|
+
export { KptPassword } from "./password/password.js";
|
|
76
|
+
export { KptInputOtp } from "./input-otp/input-otp.js";
|
|
77
|
+
export { KptInputMask } from "./input-mask/input-mask.js";
|
|
78
|
+
export { KptRadioGroup } from "./radio-group/radio-group.js";
|
|
79
|
+
export { KptSlider } from "./slider/slider.js";
|
|
80
|
+
export { KptSwitch } from "./switch/switch.js";
|
|
81
|
+
export { KptDatepicker } from "./datepicker/datepicker.js";
|
|
82
|
+
export { KptDateRange } from "./date-range/date-range.js";
|
|
83
|
+
export { KptClock } from "./clock/clock.js";
|
|
84
|
+
export { KptColorPicker } from "./color-picker/color-picker.js";
|
|
85
|
+
export { KptFileUpload } from "./file-upload/file-upload.js";
|
|
86
|
+
export { KptSwitchGroup } from "./switch-group/switch-group.js";
|
|
87
|
+
export { KptRating } from "./rating/rating.js";
|
|
88
|
+
export { KptKnob } from "./knob/knob.js";
|
|
89
|
+
export { KptTextarea } from "./textarea/textarea.js";
|
|
90
|
+
export { KptPaginator } from "./paginator/paginator.js";
|
|
91
|
+
// Komponenty
|
|
92
|
+
export { KptButton } from "./button/button.js";
|
|
93
|
+
export { KptIconButton } from "./icon-button/icon-button.js";
|
|
94
|
+
export { KptFab } from "./fab/fab.js";
|
|
95
|
+
export { KptSplitButton } from "./split-button/split-button.js";
|
|
96
|
+
export { KptCard, KptCardActions, KptCardFooter, KptCardHeader, KptCardLead, KptCardMedia, KptCardMeta, KptCardSection, KptCardSubtitle, KptCardTags, KptCardTitle, } from "./card/card.js";
|
|
97
|
+
// i18n
|
|
98
|
+
export { KptI18nProvider, useKptI18n, useKptMessages } from "./i18n/i18n-context.js";
|
|
99
|
+
export { KPT_MESSAGES_EN, KPT_MESSAGES_PL } from '@konce-pt/i18n';
|
|
100
|
+
// Prymitywy pomocnicze
|
|
101
|
+
export { cn } from "./internal/cn.js";
|
|
102
|
+
export { composeRefs } from "./internal/compose-refs.js";
|
|
103
|
+
export { Slot } from "./internal/slot.js";
|
|
104
|
+
export { KPT_BREAKPOINTS, useKptBreakpointUp, useKptMediaQuery } from "./internal/use-breakpoint.js";
|
|
105
|
+
export { useControllableState } from "./internal/use-controllable-state.js";
|