@splenddev/kreativ-ui 0.3.21 → 0.3.22
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/dist/Select.types-CIRmqiVe.d.cts +264 -0
- package/dist/Select.types-CIRmqiVe.d.ts +264 -0
- package/dist/{chunk-P63AGDBG.js → chunk-CQUJK47V.js} +5265 -2561
- package/dist/chunk-CQUJK47V.js.map +1 -0
- package/dist/{chunk-C4PCJAAL.js → chunk-D4IXLW5S.js} +34 -3
- package/dist/chunk-D4IXLW5S.js.map +1 -0
- package/dist/{chunk-X7373GJO.js → chunk-HQEFPDPP.js} +421 -46
- package/dist/chunk-HQEFPDPP.js.map +1 -0
- package/dist/{chunk-JCJNV2P2.cjs → chunk-Q73HEANM.cjs} +5292 -2579
- package/dist/chunk-Q73HEANM.cjs.map +1 -0
- package/dist/{chunk-C2JEK4T5.cjs → chunk-TR5LTN5O.cjs} +423 -45
- package/dist/chunk-TR5LTN5O.cjs.map +1 -0
- package/dist/{chunk-5GGCRNXA.cjs → chunk-Z6CDH3CY.cjs} +34 -2
- package/dist/chunk-Z6CDH3CY.cjs.map +1 -0
- package/dist/components.cjs +139 -90
- package/dist/components.d.cts +626 -266
- package/dist/components.d.ts +626 -266
- package/dist/components.js +3 -2
- package/dist/core.cjs +17 -17
- package/dist/core.js +1 -1
- package/dist/index.cjs +12 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +73 -2
- package/dist/index.d.ts +73 -2
- package/dist/index.js +9 -8
- package/dist/index.js.map +1 -1
- package/dist/styles/index.css +1 -1
- package/dist/types.d.cts +4 -28
- package/dist/types.d.ts +4 -28
- package/dist/utils.cjs +39 -35
- package/dist/utils.d.cts +42 -2
- package/dist/utils.d.ts +42 -2
- package/dist/utils.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-5GGCRNXA.cjs.map +0 -1
- package/dist/chunk-C2JEK4T5.cjs.map +0 -1
- package/dist/chunk-C4PCJAAL.js.map +0 -1
- package/dist/chunk-JCJNV2P2.cjs.map +0 -1
- package/dist/chunk-P63AGDBG.js.map +0 -1
- package/dist/chunk-X7373GJO.js.map +0 -1
package/dist/components.d.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import * as _splenddev_kreativ_core from '@splenddev/kreativ-core';
|
|
2
|
-
import { MotionGatedProps,
|
|
2
|
+
import { ResponsiveValue, MotionGatedProps, BaseColor as BaseColor$2, SizeProps as SizeProps$1 } from '@splenddev/kreativ-core';
|
|
3
3
|
import * as React$1 from 'react';
|
|
4
|
-
import { ReactNode, HTMLAttributes, ButtonHTMLAttributes, CSSProperties,
|
|
5
|
-
import { FeedbackStatusProps, SingleFormControlComponent, SuppressKuiWarningProps, ValuePropConvention,
|
|
6
|
-
|
|
4
|
+
import { ReactNode, HTMLAttributes, ButtonHTMLAttributes, CSSProperties, TextareaHTMLAttributes, InputHTMLAttributes, ElementType, ComponentPropsWithoutRef, UIEvent, RefObject } from 'react';
|
|
5
|
+
import { F as FeedbackStatusProps, B as ButtonProps, S as SpaceValue, a as ButtonVariant, I as InputProps, b as SingleFormControlComponent, c as SuppressKuiWarningProps, V as ValuePropConvention, d as SelectValueProps, e as SelectGroupProps, f as SelectLabelProps, g as SelectRootProps, h as SelectTriggerProps, i as SelectContentProps, j as SelectItemProps, k as InputVariant, l as InputSize, m as BaseInputProps, O as OverscrollBehaviorProp, R as RadiusValue } from './Select.types-CIRmqiVe.js';
|
|
6
|
+
export { n as BaseInputExtraAdornmentContext, o as InputKind, p as InputKindDefaults, M as Menu, q as MenuCheckboxItemProps, r as MenuContentProps, s as MenuItemProps, t as MenuRadioGroupProps, u as MenuRadioItemProps, v as MenuRootProps, w as MenuSubProps, x as MenuSubTriggerProps, y as MenuTriggerProps, P as PasswordInputKindDefaults, z as PasswordInputProps, A as PasswordKind } from './Select.types-CIRmqiVe.js';
|
|
7
|
+
import { BaseProps, SizeProps, OrientationProps, Orientation, VariantProps, ThemeTogglerTransition, BaseColor as BaseColor$1, FormFieldStatus, ValidateOn, StateProps, ClearableProps, ValueProps, FullWidthProps, EmbeddedProps, TrimProps, ValidateProps, TypographyProps, Styleable, StatusProps, MotionGatedProps as MotionGatedProps$1, ControlledProps, DisabledProps, BaseVariant, Size, ResponsiveValue as ResponsiveValue$1, ColorProps } from '@splenddev/kreativ-core/types';
|
|
7
8
|
import { z } from 'zod';
|
|
8
9
|
import { Placement } from '@floating-ui/react';
|
|
10
|
+
import { KuiMeta } from '@splenddev/kreativ-core/utils';
|
|
11
|
+
import { BundledLanguage, BundledTheme } from 'shiki';
|
|
9
12
|
|
|
10
13
|
/**
|
|
11
14
|
* Semantic kind of a toast. Drives:
|
|
@@ -409,80 +412,6 @@ interface ConfirmDialogProps extends Omit<ConfirmOptions, "key">, Omit<React$1.H
|
|
|
409
412
|
}
|
|
410
413
|
declare const ConfirmDialog: _splenddev_kreativ_core.KuiComponent<ConfirmDialogProps, HTMLDivElement>;
|
|
411
414
|
|
|
412
|
-
interface MenuRootProps {
|
|
413
|
-
open?: boolean;
|
|
414
|
-
defaultOpen?: boolean;
|
|
415
|
-
onOpenChange?: (open: boolean) => void;
|
|
416
|
-
placement?: Placement;
|
|
417
|
-
offset?: number;
|
|
418
|
-
children?: React$1.ReactNode;
|
|
419
|
-
}
|
|
420
|
-
declare function MenuRoot(props: MenuRootProps): React$1.JSX.Element;
|
|
421
|
-
interface MenuSubProps {
|
|
422
|
-
open?: boolean;
|
|
423
|
-
defaultOpen?: boolean;
|
|
424
|
-
onOpenChange?: (open: boolean) => void;
|
|
425
|
-
children?: React$1.ReactNode;
|
|
426
|
-
}
|
|
427
|
-
declare function MenuSub({ children, ...opts }: MenuSubProps): React$1.JSX.Element;
|
|
428
|
-
/** Optional at the consumer level: Content portals itself when no Menu.Portal wraps it. */
|
|
429
|
-
declare function MenuPortal({ children }: {
|
|
430
|
-
children?: React$1.ReactNode;
|
|
431
|
-
}): React$1.JSX.Element | null;
|
|
432
|
-
interface MenuTriggerProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
433
|
-
asChild?: boolean;
|
|
434
|
-
}
|
|
435
|
-
interface MenuContentProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
436
|
-
/**
|
|
437
|
-
* Maximum height of the menu.
|
|
438
|
-
* Defaults to the available viewport height.
|
|
439
|
-
*/
|
|
440
|
-
maxHeight?: number | string;
|
|
441
|
-
}
|
|
442
|
-
interface MenuLabelProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
443
|
-
}
|
|
444
|
-
interface ItemBaseProps extends Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement>, "onSelect"> {
|
|
445
|
-
disabled?: boolean;
|
|
446
|
-
/** Typeahead label; derived from `children` when that is a plain string. */
|
|
447
|
-
textValue?: string;
|
|
448
|
-
/** Called on activation. `event.preventDefault()` keeps the menu open. */
|
|
449
|
-
onSelect?: (event: Event) => void;
|
|
450
|
-
}
|
|
451
|
-
interface MenuItemProps extends ItemBaseProps {
|
|
452
|
-
tone?: "default" | "destructive";
|
|
453
|
-
inset?: boolean;
|
|
454
|
-
}
|
|
455
|
-
interface MenuCheckboxItemProps extends ItemBaseProps {
|
|
456
|
-
checked?: boolean;
|
|
457
|
-
defaultChecked?: boolean;
|
|
458
|
-
onCheckedChange?: (checked: boolean) => void;
|
|
459
|
-
}
|
|
460
|
-
interface MenuRadioGroupProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "defaultValue" | "onChange"> {
|
|
461
|
-
value?: string;
|
|
462
|
-
defaultValue?: string;
|
|
463
|
-
onValueChange?: (value: string) => void;
|
|
464
|
-
}
|
|
465
|
-
interface MenuRadioItemProps extends ItemBaseProps {
|
|
466
|
-
value: string;
|
|
467
|
-
}
|
|
468
|
-
interface MenuSubTriggerProps extends Omit<ItemBaseProps, "onSelect"> {
|
|
469
|
-
}
|
|
470
|
-
declare const Menu: {
|
|
471
|
-
Root: typeof MenuRoot;
|
|
472
|
-
Trigger: _splenddev_kreativ_core.KuiComponent<MenuTriggerProps, HTMLButtonElement>;
|
|
473
|
-
Portal: typeof MenuPortal;
|
|
474
|
-
Label: _splenddev_kreativ_core.KuiComponent<MenuLabelProps, HTMLDivElement>;
|
|
475
|
-
Content: _splenddev_kreativ_core.KuiComponent<MenuContentProps, HTMLDivElement>;
|
|
476
|
-
Item: _splenddev_kreativ_core.KuiComponent<MenuItemProps, HTMLButtonElement>;
|
|
477
|
-
CheckboxItem: _splenddev_kreativ_core.KuiComponent<MenuCheckboxItemProps, HTMLButtonElement>;
|
|
478
|
-
RadioGroup: _splenddev_kreativ_core.KuiComponent<MenuRadioGroupProps, HTMLDivElement>;
|
|
479
|
-
RadioItem: _splenddev_kreativ_core.KuiComponent<MenuRadioItemProps, HTMLButtonElement>;
|
|
480
|
-
Separator: _splenddev_kreativ_core.KuiComponent<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
|
481
|
-
Sub: typeof MenuSub;
|
|
482
|
-
SubTrigger: _splenddev_kreativ_core.KuiComponent<MenuSubTriggerProps, HTMLButtonElement>;
|
|
483
|
-
SubContent: _splenddev_kreativ_core.KuiComponent<MenuContentProps, HTMLDivElement>;
|
|
484
|
-
};
|
|
485
|
-
|
|
486
415
|
/**
|
|
487
416
|
* Stand-in matching the locked Dialog stack model:
|
|
488
417
|
* isRegistered -> isTopmost -> isSuspended = isRegistered && !isTopmost.
|
|
@@ -568,8 +497,11 @@ interface CarouselRootProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>,
|
|
|
568
497
|
/** Pause while focus is inside the carousel. Default true. */
|
|
569
498
|
pauseOnFocus?: boolean;
|
|
570
499
|
/** Slides visible at once. Fractions peek the next slide (1.5). Default 1. */ slidesPerView?: number;
|
|
571
|
-
/**
|
|
572
|
-
|
|
500
|
+
/**
|
|
501
|
+
* `gap` on both axes. Token (`"sm"`), pixel number (`24`), or raw length (`"24px"`).
|
|
502
|
+
* Overridden per axis by `gapX` / `gapY`.
|
|
503
|
+
*/
|
|
504
|
+
gap?: ResponsiveValue<SpaceValue>;
|
|
573
505
|
/** Extra recipe variant groups (e.g. from extendRecipe). Typed props win on collision. */
|
|
574
506
|
recipeProps?: Record<string, string>;
|
|
575
507
|
/**
|
|
@@ -645,51 +577,28 @@ interface ActionGuardProps {
|
|
|
645
577
|
*/
|
|
646
578
|
declare const ActionGuard: _splenddev_kreativ_core.KuiComponent<ActionGuardProps, HTMLElement>;
|
|
647
579
|
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
*
|
|
671
|
-
* @example
|
|
672
|
-
* ```tsx
|
|
673
|
-
* <Button
|
|
674
|
-
* render={(props) => (
|
|
675
|
-
* <a {...props} href="/templates">
|
|
676
|
-
* Templates
|
|
677
|
-
* </a>
|
|
678
|
-
* )}
|
|
679
|
-
* >
|
|
680
|
-
* Templates
|
|
681
|
-
* </Button>
|
|
682
|
-
* ```
|
|
683
|
-
*
|
|
684
|
-
* @remarks
|
|
685
|
-
* The render function must be created inside a Client Component
|
|
686
|
-
* when using Next.js App Router. Functions cannot be passed from
|
|
687
|
-
* Server Components to Client Components.
|
|
688
|
-
*/
|
|
689
|
-
render?: (props: ButtonRenderProps) => ReactElement;
|
|
690
|
-
}
|
|
691
|
-
|
|
692
|
-
declare const Button: React$1.ForwardRefExoticComponent<ButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
580
|
+
/**
|
|
581
|
+
* A clickable action. Supports solid, outline and other variants, brand and
|
|
582
|
+
* status colors, theme-driven sizes, left/right icons, a loading state and an
|
|
583
|
+
* icon-only mode.
|
|
584
|
+
*
|
|
585
|
+
* @remarks
|
|
586
|
+
* Inside a `ButtonGroup`, the button inherits the group's `size` unless you pass
|
|
587
|
+
* your own. Any prop can be given a project-wide default through the provider's
|
|
588
|
+
* `defaults` (for example `{ Button: { variant: "outline" } }`); props passed
|
|
589
|
+
* here always win. Use `render` to render your own element (such as a router
|
|
590
|
+
* link) while keeping Button's styling and states.
|
|
591
|
+
*
|
|
592
|
+
* @example
|
|
593
|
+
* ```tsx
|
|
594
|
+
* <Button variant="outline" color="brand" leftIcon={<PlusIcon />}>
|
|
595
|
+
* New project
|
|
596
|
+
* </Button>
|
|
597
|
+
*
|
|
598
|
+
* <Button isLoading loadingText="Saving…">Save</Button>
|
|
599
|
+
* ```
|
|
600
|
+
*/
|
|
601
|
+
declare const Button: _splenddev_kreativ_core.KuiComponent<ButtonProps, HTMLButtonElement>;
|
|
693
602
|
|
|
694
603
|
type ButtonGroupSpacing = "none" | "sm" | "md" | "lg";
|
|
695
604
|
interface ButtonGroupProps extends Omit<HTMLAttributes<HTMLDivElement>, "color" | "size">, Omit<BaseProps, "unstyled">, SizeProps, OrientationProps {
|
|
@@ -752,7 +661,7 @@ declare function useOptionalButtonGroupItemContext(): ButtonGroupItemContextValu
|
|
|
752
661
|
|
|
753
662
|
type ThemeTogglerVariant = Exclude<ButtonVariant, "link">;
|
|
754
663
|
type ThemeTogglerDisplay = "buttons" | "cycle";
|
|
755
|
-
type ThemeTogglerColor = Exclude<BaseColor, "destructive" | "warning" | "success" | "white" | "info">;
|
|
664
|
+
type ThemeTogglerColor = Exclude<BaseColor$1, "destructive" | "warning" | "success" | "white" | "info">;
|
|
756
665
|
interface ThemeTogglerProps extends Omit<BaseProps, "style">, OrientationProps, VariantProps<ButtonVariant> {
|
|
757
666
|
variant?: ButtonVariant;
|
|
758
667
|
color?: ButtonProps["color"];
|
|
@@ -782,61 +691,6 @@ interface ThemeTogglerProps extends Omit<BaseProps, "style">, OrientationProps,
|
|
|
782
691
|
|
|
783
692
|
declare const ThemeToggler: _splenddev_kreativ_core.KuiComponent<ThemeTogglerProps & MotionGatedProps, HTMLElement>;
|
|
784
693
|
|
|
785
|
-
/**
|
|
786
|
-
* Internal. Not part of the public API — do not re-export from the package index.
|
|
787
|
-
* Callers resolve `type` themselves. This function has no password concept.
|
|
788
|
-
*/
|
|
789
|
-
type BaseInputExtraAdornmentContext = {
|
|
790
|
-
iconSize: string | number;
|
|
791
|
-
/** Motion-gated icon-button classes. Transition styles are omitted when motion is off. */
|
|
792
|
-
iconButtonClass: string;
|
|
793
|
-
};
|
|
794
|
-
type BaseInputProps = Omit<ComponentPropsWithoutRef<"input">, "size" | "type"> & BaseProps & SizeProps & VariantProps<InputVariant> & DisabledProps & LoadingProps & FullWidthProps & ClearableProps & UndoRedoProps & ValueProps<string | number> & StateProps & TrimProps & TypographyProps & {
|
|
795
|
-
type: HTMLInputTypeAttribute;
|
|
796
|
-
inputClassName?: string;
|
|
797
|
-
scrollIntoViewOnError?: boolean;
|
|
798
|
-
startIcon?: ReactNode;
|
|
799
|
-
endIcon?: ReactNode;
|
|
800
|
-
rounded?: boolean;
|
|
801
|
-
motion?: boolean;
|
|
802
|
-
validatePattern?: string | RegExp;
|
|
803
|
-
patternMessage?: string;
|
|
804
|
-
embedded?: boolean;
|
|
805
|
-
extraEndAdornment?: ReactNode | ((ctx: BaseInputExtraAdornmentContext) => ReactNode);
|
|
806
|
-
};
|
|
807
|
-
type InputVariant = "outline" | "filled" | "ghost";
|
|
808
|
-
type InputSize = "xs" | "sm" | "md" | "lg";
|
|
809
|
-
type InputKind = "text" | "email" | "tel" | "url" | "search" | "numeric" | "number" | "date" | "time" | "datetime-local" | "month" | "week";
|
|
810
|
-
type PasswordKind = "password-current" | "password-new";
|
|
811
|
-
type KindDefaultBase = {
|
|
812
|
-
type?: string;
|
|
813
|
-
autoComplete?: string;
|
|
814
|
-
placeholder?: string;
|
|
815
|
-
pattern?: string;
|
|
816
|
-
min?: number;
|
|
817
|
-
max?: number;
|
|
818
|
-
step?: number;
|
|
819
|
-
};
|
|
820
|
-
type InputKindDefaults = Record<InputKind, KindDefaultBase & {
|
|
821
|
-
inputMode?: "none" | "text" | "decimal" | "numeric" | "tel" | "search" | "email" | "url";
|
|
822
|
-
}>;
|
|
823
|
-
type PasswordInputKindDefaults = Record<PasswordKind, KindDefaultBase & {
|
|
824
|
-
inputMode?: "none" | "text";
|
|
825
|
-
}>;
|
|
826
|
-
type InputProps = Omit<BaseInputProps, "type" | "extraEndAdornment" | "motion"> & {
|
|
827
|
-
kind?: InputKind;
|
|
828
|
-
hideKindIcon?: boolean;
|
|
829
|
-
type?: HTMLInputTypeAttribute;
|
|
830
|
-
motion?: boolean;
|
|
831
|
-
};
|
|
832
|
-
type PasswordInputProps = Omit<BaseInputProps, "type" | "extraEndAdornment" | "motion"> & {
|
|
833
|
-
motion?: boolean;
|
|
834
|
-
kind?: PasswordKind;
|
|
835
|
-
visible?: boolean;
|
|
836
|
-
defaultVisible?: boolean;
|
|
837
|
-
onVisibleChange?: (visible: boolean) => void;
|
|
838
|
-
};
|
|
839
|
-
|
|
840
694
|
declare const InputBase: _splenddev_kreativ_core.KuiComponent<InputProps, HTMLInputElement>;
|
|
841
695
|
declare const Input: typeof InputBase & SingleFormControlComponent<InputProps>;
|
|
842
696
|
|
|
@@ -901,35 +755,7 @@ declare const FormFieldDescription: _splenddev_kreativ_core.KuiComponent<FormFie
|
|
|
901
755
|
|
|
902
756
|
declare const FormFieldMessage: _splenddev_kreativ_core.KuiComponent<FormFieldMessageProps, HTMLParagraphElement>;
|
|
903
757
|
|
|
904
|
-
|
|
905
|
-
rounded?: boolean;
|
|
906
|
-
placeholder?: string;
|
|
907
|
-
required?: boolean;
|
|
908
|
-
name?: string;
|
|
909
|
-
size?: InputSize;
|
|
910
|
-
children: ReactNode;
|
|
911
|
-
}
|
|
912
|
-
interface SelectTriggerProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "value" | "className">, Styleable {
|
|
913
|
-
}
|
|
914
|
-
interface SelectContentProps extends Omit<HTMLAttributes<HTMLDivElement>, "className">, Styleable {
|
|
915
|
-
}
|
|
916
|
-
interface SelectItemProps extends Omit<HTMLAttributes<HTMLDivElement>, "children" | "className">, DisabledProps$1, Styleable {
|
|
917
|
-
value: string;
|
|
918
|
-
children: ReactNode;
|
|
919
|
-
}
|
|
920
|
-
interface SelectValueProps extends Styleable {
|
|
921
|
-
placeholder?: string;
|
|
922
|
-
}
|
|
923
|
-
interface SelectGroupProps extends Styleable, Required<Pick<BaseProps$1, "children">> {
|
|
924
|
-
}
|
|
925
|
-
interface SelectLabelProps extends Styleable, Required<Pick<BaseProps$1, "children">> {
|
|
926
|
-
}
|
|
927
|
-
|
|
928
|
-
declare function SelectContent({ className, children, ...props }: SelectContentProps): React$1.JSX.Element;
|
|
929
|
-
|
|
930
|
-
declare function SelectItem({ value, disabled, children, className, ...props }: SelectItemProps): React$1.JSX.Element;
|
|
931
|
-
|
|
932
|
-
declare function SelectValue({ placeholder, className }: SelectValueProps): React$1.JSX.Element;
|
|
758
|
+
declare function SelectValue({ placeholder, className, style, }: SelectValueProps): React$1.JSX.Element;
|
|
933
759
|
|
|
934
760
|
declare function SelectGroup({ children, className }: SelectGroupProps): React$1.JSX.Element;
|
|
935
761
|
|
|
@@ -948,8 +774,8 @@ interface SelectProps extends Omit<SelectRootProps, "children"> {
|
|
|
948
774
|
declare const Select: React$1.ForwardRefExoticComponent<SelectProps & React$1.RefAttributes<HTMLDivElement>> & {
|
|
949
775
|
Root: _splenddev_kreativ_core.KuiComponent<SelectRootProps, HTMLDivElement>;
|
|
950
776
|
Trigger: React$1.ForwardRefExoticComponent<SelectTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
951
|
-
Content:
|
|
952
|
-
Item:
|
|
777
|
+
Content: _splenddev_kreativ_core.KuiComponent<SelectContentProps, HTMLDivElement>;
|
|
778
|
+
Item: _splenddev_kreativ_core.KuiComponent<SelectItemProps, HTMLButtonElement>;
|
|
953
779
|
Value: typeof SelectValue;
|
|
954
780
|
Group: typeof SelectGroup;
|
|
955
781
|
Label: typeof SelectLabel;
|
|
@@ -960,6 +786,10 @@ declare const Select: React$1.ForwardRefExoticComponent<SelectProps & React$1.Re
|
|
|
960
786
|
|
|
961
787
|
declare const SelectTrigger: React$1.ForwardRefExoticComponent<SelectTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
962
788
|
|
|
789
|
+
declare const SelectContent: _splenddev_kreativ_core.KuiComponent<SelectContentProps, HTMLDivElement>;
|
|
790
|
+
|
|
791
|
+
declare const SelectItem: _splenddev_kreativ_core.KuiComponent<SelectItemProps, HTMLButtonElement>;
|
|
792
|
+
|
|
963
793
|
declare const SelectRoot: _splenddev_kreativ_core.KuiComponent<SelectRootProps, HTMLDivElement>;
|
|
964
794
|
|
|
965
795
|
type TextareaResize = "none" | "both" | "horizontal" | "vertical";
|
|
@@ -987,7 +817,7 @@ interface MarkdownEditorProps extends Omit<TextareaCoreProps, "resize" | "autoRe
|
|
|
987
817
|
|
|
988
818
|
declare const MarkdownEditor: _splenddev_kreativ_core.KuiComponent<MarkdownEditorProps & MotionGatedProps, HTMLTextAreaElement>;
|
|
989
819
|
|
|
990
|
-
interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "checked" | "defaultChecked" | "children">, Styleable
|
|
820
|
+
interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "checked" | "defaultChecked" | "children">, Styleable, StateProps, StatusProps, MotionGatedProps$1, ControlledProps<boolean, "checked", "defaultChecked", "onCheckedChange"> {
|
|
991
821
|
indeterminate?: boolean;
|
|
992
822
|
size?: InputSize;
|
|
993
823
|
disabled?: boolean;
|
|
@@ -998,14 +828,14 @@ interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "siz
|
|
|
998
828
|
declare const Checkbox: _splenddev_kreativ_core.KuiComponent<CheckboxProps, HTMLInputElement>;
|
|
999
829
|
|
|
1000
830
|
type RadioSize = "sm" | "md" | "lg";
|
|
1001
|
-
interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "checked" | "defaultChecked" | "onChange" | "name" | "value">, Styleable
|
|
831
|
+
interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "checked" | "defaultChecked" | "onChange" | "name" | "value">, Styleable {
|
|
1002
832
|
value: string;
|
|
1003
833
|
disabled?: boolean;
|
|
1004
834
|
label?: ReactNode;
|
|
1005
835
|
description?: ReactNode;
|
|
1006
836
|
}
|
|
1007
837
|
|
|
1008
|
-
interface RadioGroupProps extends Styleable
|
|
838
|
+
interface RadioGroupProps extends Styleable {
|
|
1009
839
|
value?: string;
|
|
1010
840
|
defaultValue?: string;
|
|
1011
841
|
onValueChange?: (value: string) => void;
|
|
@@ -1024,7 +854,7 @@ declare function RadioGroup({ value: valueProp, defaultValue, onValueChange, nam
|
|
|
1024
854
|
declare function Radio({ value, disabled: itemDisabled, label, description, className, ...props }: RadioProps): React$1.JSX.Element;
|
|
1025
855
|
|
|
1026
856
|
type SwitchSize = "xs" | "sm" | "md" | "lg";
|
|
1027
|
-
interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "checked" | "defaultChecked">, Styleable
|
|
857
|
+
interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "checked" | "defaultChecked">, Styleable {
|
|
1028
858
|
checked?: boolean;
|
|
1029
859
|
defaultChecked?: boolean;
|
|
1030
860
|
onCheckedChange?: (checked: boolean) => void;
|
|
@@ -1084,7 +914,7 @@ declare namespace Combobox {
|
|
|
1084
914
|
|
|
1085
915
|
declare const ComboboxInput: React$1.ForwardRefExoticComponent<ComboboxInputProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
1086
916
|
|
|
1087
|
-
interface MultiSelectProps extends Styleable
|
|
917
|
+
interface MultiSelectProps extends Styleable {
|
|
1088
918
|
value?: string[];
|
|
1089
919
|
defaultValue?: string[];
|
|
1090
920
|
onValueChange?: (value: string[]) => void;
|
|
@@ -1609,7 +1439,7 @@ interface ContainerProps extends BaseProps {
|
|
|
1609
1439
|
/** @default "lg" */
|
|
1610
1440
|
maxWidth?: Size | (string & {});
|
|
1611
1441
|
/** Token name ("sm"), pixel number (24), or raw length ("24px"). */
|
|
1612
|
-
padding?: ResponsiveValue<SpaceValue>;
|
|
1442
|
+
padding?: ResponsiveValue$1<SpaceValue>;
|
|
1613
1443
|
/** @default true */
|
|
1614
1444
|
centered?: boolean;
|
|
1615
1445
|
as?: ElementType;
|
|
@@ -1629,57 +1459,57 @@ interface FlexProps extends BaseProps {
|
|
|
1629
1459
|
* `flex-direction`. Main axis of the items.
|
|
1630
1460
|
* @default "row"
|
|
1631
1461
|
*/
|
|
1632
|
-
direction?: ResponsiveValue<CSSProperties["flexDirection"]>;
|
|
1462
|
+
direction?: ResponsiveValue$1<CSSProperties["flexDirection"]>;
|
|
1633
1463
|
/**
|
|
1634
1464
|
* `flex-wrap`. Whether items stay on one line or wrap onto new lines.
|
|
1635
1465
|
* @default "nowrap"
|
|
1636
1466
|
*/
|
|
1637
|
-
wrap?: ResponsiveValue<CSSProperties["flexWrap"]>;
|
|
1467
|
+
wrap?: ResponsiveValue$1<CSSProperties["flexWrap"]>;
|
|
1638
1468
|
/**
|
|
1639
1469
|
* `align-items`. Alignment on the cross axis.
|
|
1640
1470
|
* `"stretch"` fills the cross size; `"center"` centers; `"start"` / `"end"` pin to an edge.
|
|
1641
1471
|
*/
|
|
1642
|
-
align?: ResponsiveValue<CSSProperties["alignItems"]>;
|
|
1472
|
+
align?: ResponsiveValue$1<CSSProperties["alignItems"]>;
|
|
1643
1473
|
/**
|
|
1644
1474
|
* `justify-content`. Distribution on the main axis.
|
|
1645
1475
|
* `"between"` pushes the first and last items to the edges; `"center"` groups them in the middle.
|
|
1646
1476
|
*/
|
|
1647
|
-
justify?: ResponsiveValue<CSSProperties["justifyContent"]>;
|
|
1477
|
+
justify?: ResponsiveValue$1<CSSProperties["justifyContent"]>;
|
|
1648
1478
|
/**
|
|
1649
1479
|
* `gap` on both axes. Token (`"sm"`), pixel number (`24`), or raw length (`"24px"`).
|
|
1650
1480
|
* Overridden per axis by `gapX` / `gapY`.
|
|
1651
1481
|
*/
|
|
1652
|
-
gap?: ResponsiveValue<SpaceValue>;
|
|
1482
|
+
gap?: ResponsiveValue$1<SpaceValue>;
|
|
1653
1483
|
/**
|
|
1654
1484
|
* `column-gap`. Space between items on the inline axis.
|
|
1655
1485
|
* Overrides `gap` for that axis only.
|
|
1656
1486
|
*/
|
|
1657
|
-
gapX?: ResponsiveValue<SpaceValue>;
|
|
1487
|
+
gapX?: ResponsiveValue$1<SpaceValue>;
|
|
1658
1488
|
/**
|
|
1659
1489
|
* `row-gap`. Space between items on the block axis.
|
|
1660
1490
|
* Overrides `gap` for that axis only.
|
|
1661
1491
|
*/
|
|
1662
|
-
gapY?: ResponsiveValue<SpaceValue>;
|
|
1492
|
+
gapY?: ResponsiveValue$1<SpaceValue>;
|
|
1663
1493
|
/**
|
|
1664
1494
|
* `flex-grow`. How much free space this item takes on the main axis.
|
|
1665
1495
|
* - `true` is `1` (share leftover space).
|
|
1666
1496
|
* - `false` is `0` (do not grow).
|
|
1667
1497
|
* - A number, or a responsive map, is passed through.
|
|
1668
1498
|
*/
|
|
1669
|
-
grow?: ResponsiveValue<CSSProperties["flexGrow"]> | boolean;
|
|
1499
|
+
grow?: ResponsiveValue$1<CSSProperties["flexGrow"]> | boolean;
|
|
1670
1500
|
/**
|
|
1671
1501
|
* `flex-shrink`. How readily this item gives up space when the line is tight.
|
|
1672
1502
|
* - `true` is `1` (may shrink; the CSS default).
|
|
1673
1503
|
* - `false` is `0` (keep its size).
|
|
1674
1504
|
* - A number, or a responsive map, is passed through.
|
|
1675
1505
|
*/
|
|
1676
|
-
shrink?: ResponsiveValue<CSSProperties["flexShrink"]> | boolean;
|
|
1506
|
+
shrink?: ResponsiveValue$1<CSSProperties["flexShrink"]> | boolean;
|
|
1677
1507
|
/**
|
|
1678
1508
|
* `flex-basis`. Starting size before free space is distributed.
|
|
1679
1509
|
* `"auto"` uses the item's width/height. `"0"` ignores content size and shares space by `grow`.
|
|
1680
1510
|
* Also accepts `"content"`, a length, or a percentage.
|
|
1681
1511
|
*/
|
|
1682
|
-
basis?: ResponsiveValue<CSSProperties["flexBasis"]>;
|
|
1512
|
+
basis?: ResponsiveValue$1<CSSProperties["flexBasis"]>;
|
|
1683
1513
|
/** `width: 100%`. */
|
|
1684
1514
|
fullWidth?: boolean;
|
|
1685
1515
|
/** `height: 100%`. */
|
|
@@ -1699,10 +1529,10 @@ interface StackProps extends BaseProps {
|
|
|
1699
1529
|
* @default "vertical"
|
|
1700
1530
|
*/
|
|
1701
1531
|
orientation?: Orientation;
|
|
1702
|
-
gap?: ResponsiveValue<Size | (string & {})>;
|
|
1703
|
-
align?: ResponsiveValue<CSSProperties["alignItems"]>;
|
|
1704
|
-
justify?: ResponsiveValue<CSSProperties["justifyContent"]>;
|
|
1705
|
-
wrap?: ResponsiveValue<CSSProperties["flexWrap"]>;
|
|
1532
|
+
gap?: ResponsiveValue$1<Size | (string & {})>;
|
|
1533
|
+
align?: ResponsiveValue$1<CSSProperties["alignItems"]>;
|
|
1534
|
+
justify?: ResponsiveValue$1<CSSProperties["justifyContent"]>;
|
|
1535
|
+
wrap?: ResponsiveValue$1<CSSProperties["flexWrap"]>;
|
|
1706
1536
|
/** Renders between each child. */
|
|
1707
1537
|
divider?: ReactNode;
|
|
1708
1538
|
as?: ElementType;
|
|
@@ -1716,19 +1546,19 @@ interface GridProps extends BaseProps {
|
|
|
1716
1546
|
* Equal columns. `columns={3}` is `repeat(3, minmax(0, 1fr))`.
|
|
1717
1547
|
* Do not combine with `minChildWidth` or `templateColumns`.
|
|
1718
1548
|
*/
|
|
1719
|
-
columns?: ResponsiveValue<number>;
|
|
1549
|
+
columns?: ResponsiveValue$1<number>;
|
|
1720
1550
|
/**
|
|
1721
1551
|
* Wrap columns to the container. `minChildWidth="200px"` is
|
|
1722
1552
|
* `repeat(auto-fit, minmax(200px, 1fr))`.
|
|
1723
1553
|
* Do not combine with `columns` or `templateColumns`.
|
|
1724
1554
|
*/
|
|
1725
|
-
minChildWidth?: ResponsiveValue<Size | (string & {})>;
|
|
1555
|
+
minChildWidth?: ResponsiveValue$1<Size | (string & {})>;
|
|
1726
1556
|
/**
|
|
1727
1557
|
* Raw `grid-template-columns`. Wins over `columns` and `minChildWidth`.
|
|
1728
1558
|
*/
|
|
1729
|
-
templateColumns?: ResponsiveValue<string>;
|
|
1559
|
+
templateColumns?: ResponsiveValue$1<string>;
|
|
1730
1560
|
/** Raw `grid-template-rows`. */
|
|
1731
|
-
templateRows?: ResponsiveValue<string>;
|
|
1561
|
+
templateRows?: ResponsiveValue$1<string>;
|
|
1732
1562
|
/**
|
|
1733
1563
|
* Raw `grid-template-areas`.
|
|
1734
1564
|
* Not responsive. Areas rarely change by breakpoint.
|
|
@@ -1737,20 +1567,20 @@ interface GridProps extends BaseProps {
|
|
|
1737
1567
|
/**
|
|
1738
1568
|
* `grid-auto-flow`. `"row dense"` packs holes.
|
|
1739
1569
|
*/
|
|
1740
|
-
autoFlow?: ResponsiveValue<CSSProperties["gridAutoFlow"]>;
|
|
1570
|
+
autoFlow?: ResponsiveValue$1<CSSProperties["gridAutoFlow"]>;
|
|
1741
1571
|
/**
|
|
1742
1572
|
* `gap` on both axes. Token, pixel number, or raw length.
|
|
1743
1573
|
* Overridden per axis by `gapX` / `gapY`.
|
|
1744
1574
|
*/
|
|
1745
|
-
gap?: ResponsiveValue<SpaceValue>;
|
|
1575
|
+
gap?: ResponsiveValue$1<SpaceValue>;
|
|
1746
1576
|
/** `column-gap`. Overrides `gap` on the inline axis. */
|
|
1747
|
-
gapX?: ResponsiveValue<SpaceValue>;
|
|
1577
|
+
gapX?: ResponsiveValue$1<SpaceValue>;
|
|
1748
1578
|
/** `row-gap`. Overrides `gap` on the block axis. */
|
|
1749
|
-
gapY?: ResponsiveValue<SpaceValue>;
|
|
1579
|
+
gapY?: ResponsiveValue$1<SpaceValue>;
|
|
1750
1580
|
/** `align-items`. Alignment inside the cell, on the block axis. */
|
|
1751
|
-
align?: ResponsiveValue<CSSProperties["alignItems"]>;
|
|
1581
|
+
align?: ResponsiveValue$1<CSSProperties["alignItems"]>;
|
|
1752
1582
|
/** `justify-items`. Alignment inside the cell, on the inline axis. */
|
|
1753
|
-
justifyItems?: ResponsiveValue<CSSProperties["justifyItems"]>;
|
|
1583
|
+
justifyItems?: ResponsiveValue$1<CSSProperties["justifyItems"]>;
|
|
1754
1584
|
/**
|
|
1755
1585
|
* `display: inline-grid` instead of `grid`.
|
|
1756
1586
|
* @default false
|
|
@@ -1766,11 +1596,11 @@ interface GridItemProps extends BaseProps {
|
|
|
1766
1596
|
/**
|
|
1767
1597
|
* `grid-column`. A number is `span <n>`. `"full"` is `1 / -1`.
|
|
1768
1598
|
*/
|
|
1769
|
-
span?: ResponsiveValue<number | "full">;
|
|
1599
|
+
span?: ResponsiveValue$1<number | "full">;
|
|
1770
1600
|
/**
|
|
1771
1601
|
* `grid-row`. A number is `span <n>`. `"full"` is `1 / -1`.
|
|
1772
1602
|
*/
|
|
1773
|
-
rowSpan?: ResponsiveValue<number | "full">;
|
|
1603
|
+
rowSpan?: ResponsiveValue$1<number | "full">;
|
|
1774
1604
|
/**
|
|
1775
1605
|
* Element to render.
|
|
1776
1606
|
* @default "div"
|
|
@@ -1964,12 +1794,12 @@ interface ScrollAreaProps extends BaseProps {
|
|
|
1964
1794
|
* `max-height`. Caps the vertical scrollport.
|
|
1965
1795
|
* Token, pixel number, or raw length. Responsive maps are resolved to breakpoint styles.
|
|
1966
1796
|
*/
|
|
1967
|
-
maxHeight?: ResponsiveValue<string | number>;
|
|
1797
|
+
maxHeight?: ResponsiveValue$1<string | number>;
|
|
1968
1798
|
/**
|
|
1969
1799
|
* `max-width`. Caps the horizontal scrollport.
|
|
1970
1800
|
* Token, pixel number, or raw length. Responsive maps are resolved to breakpoint styles.
|
|
1971
1801
|
*/
|
|
1972
|
-
maxWidth?: ResponsiveValue<string | number>;
|
|
1802
|
+
maxWidth?: ResponsiveValue$1<string | number>;
|
|
1973
1803
|
/**
|
|
1974
1804
|
* Which axis overflows.
|
|
1975
1805
|
* @default "vertical"
|
|
@@ -1998,10 +1828,10 @@ interface ScrollAreaProps extends BaseProps {
|
|
|
1998
1828
|
*/
|
|
1999
1829
|
fadeSize?: string | number;
|
|
2000
1830
|
/**
|
|
2001
|
-
*
|
|
2002
|
-
*
|
|
1831
|
+
* A single value applies to both axes. An object sets each axis independently;
|
|
1832
|
+
* an omitted axis falls back to the direction-based default.
|
|
2003
1833
|
*/
|
|
2004
|
-
overscrollBehavior?:
|
|
1834
|
+
overscrollBehavior?: OverscrollBehaviorProp;
|
|
2005
1835
|
/**
|
|
2006
1836
|
* `scroll-snap-type`. `"none"` disables snapping.
|
|
2007
1837
|
* With `"mandatory"`, drag-to-scroll settles on the nearest item on release.
|
|
@@ -2158,40 +1988,362 @@ interface BoxProps extends BaseProps {
|
|
|
2158
1988
|
*/
|
|
2159
1989
|
as?: ElementType;
|
|
2160
1990
|
/** Padding. Token, pixel number, or raw length. */
|
|
2161
|
-
p?: ResponsiveValue<SpaceValue>;
|
|
1991
|
+
p?: ResponsiveValue$1<SpaceValue>;
|
|
2162
1992
|
/** Padding on the inline axis. Overrides `p`. */
|
|
2163
|
-
px?: ResponsiveValue<SpaceValue>;
|
|
1993
|
+
px?: ResponsiveValue$1<SpaceValue>;
|
|
2164
1994
|
/** Padding on the block axis. Overrides `p`. */
|
|
2165
|
-
py?: ResponsiveValue<SpaceValue>;
|
|
1995
|
+
py?: ResponsiveValue$1<SpaceValue>;
|
|
2166
1996
|
/** Margin. `"auto"` centers on that axis. */
|
|
2167
|
-
m?: ResponsiveValue<SpaceValue | "auto">;
|
|
1997
|
+
m?: ResponsiveValue$1<SpaceValue | "auto">;
|
|
2168
1998
|
/** Margin on the inline axis. Overrides `m`. */
|
|
2169
|
-
mx?: ResponsiveValue<SpaceValue | "auto">;
|
|
1999
|
+
mx?: ResponsiveValue$1<SpaceValue | "auto">;
|
|
2170
2000
|
/** Margin on the block axis. Overrides `m`. */
|
|
2171
|
-
my?: ResponsiveValue<SpaceValue | "auto">;
|
|
2001
|
+
my?: ResponsiveValue$1<SpaceValue | "auto">;
|
|
2172
2002
|
/** Background. Token or raw CSS color. */
|
|
2173
|
-
bg?: ResponsiveValue<ColorProps<BaseColor> | string>;
|
|
2003
|
+
bg?: ResponsiveValue$1<ColorProps<BaseColor$1> | string>;
|
|
2174
2004
|
/** Foreground. Token or raw CSS color. */
|
|
2175
|
-
color?: ResponsiveValue<ColorProps<BaseColor> | string>;
|
|
2005
|
+
color?: ResponsiveValue$1<ColorProps<BaseColor$1> | string>;
|
|
2176
2006
|
/**
|
|
2177
2007
|
* Border. `true` is a 1px solid line in the default border color.
|
|
2178
2008
|
* A color paints that line in the given color.
|
|
2179
2009
|
* @default false
|
|
2180
2010
|
*/
|
|
2181
|
-
border?: boolean | ResponsiveValue<ColorProps<BaseColor> | string>;
|
|
2011
|
+
border?: boolean | ResponsiveValue$1<ColorProps<BaseColor$1> | string>;
|
|
2182
2012
|
/** Corner radius. */
|
|
2183
|
-
rounded?: ResponsiveValue<RadiusValue>;
|
|
2013
|
+
rounded?: ResponsiveValue$1<RadiusValue>;
|
|
2184
2014
|
/** Width. `"full"` is 100%, `"fit"` is max-content. */
|
|
2185
|
-
w?: ResponsiveValue<SpaceValue | "auto" | "full" | "fit">;
|
|
2015
|
+
w?: ResponsiveValue$1<SpaceValue | "auto" | "full" | "fit">;
|
|
2186
2016
|
/** Height. `"full"` is 100%, `"fit"` is max-content. */
|
|
2187
|
-
h?: ResponsiveValue<SpaceValue | "auto" | "full" | "fit">;
|
|
2017
|
+
h?: ResponsiveValue$1<SpaceValue | "auto" | "full" | "fit">;
|
|
2188
2018
|
}
|
|
2189
2019
|
|
|
2190
2020
|
declare const Box: _splenddev_kreativ_core.KuiComponent<BoxProps, HTMLDivElement>;
|
|
2191
2021
|
|
|
2022
|
+
/** Row-alternation/divider styling — Table's own union, deliberately NOT BaseVariant. */
|
|
2023
|
+
type TableVariant = "plain" | "stripe" | "border";
|
|
2024
|
+
/** Reused as-is from the shared color system. */
|
|
2025
|
+
type BaseColor = "brand" | "neutral" | "success" | "warning" | "error" | "info" | (string & {});
|
|
2026
|
+
type TableResponsive = "none" | "scroll" | "stack";
|
|
2027
|
+
type StickyEdge = "start" | "end";
|
|
2028
|
+
/**
|
|
2029
|
+
* Locked discriminated union: "plain" (default) disallows `color` entirely
|
|
2030
|
+
* (compile-time error, not a silently-ignored runtime prop); "stripe"/"border"
|
|
2031
|
+
* accept an optional BaseColor tint.
|
|
2032
|
+
*/
|
|
2033
|
+
type TableColorProps = {
|
|
2034
|
+
variant?: "plain";
|
|
2035
|
+
color?: never;
|
|
2036
|
+
} | {
|
|
2037
|
+
variant: "stripe" | "border";
|
|
2038
|
+
color?: BaseColor;
|
|
2039
|
+
};
|
|
2040
|
+
type TableRootOwnProps = TableColorProps & {
|
|
2041
|
+
children?: ReactNode;
|
|
2042
|
+
responsive?: TableResponsive;
|
|
2043
|
+
maxHeight?: ScrollAreaProps["maxHeight"];
|
|
2044
|
+
/**
|
|
2045
|
+
* A single value applies to both axes. An object sets each axis independently;
|
|
2046
|
+
* an omitted axis falls back to the direction-based default.
|
|
2047
|
+
*/
|
|
2048
|
+
overscrollBehavior?: ScrollAreaProps["overscrollBehavior"];
|
|
2049
|
+
showColumnBorder?: boolean;
|
|
2050
|
+
className?: string;
|
|
2051
|
+
style?: CSSProperties;
|
|
2052
|
+
};
|
|
2053
|
+
interface TableHeaderOwnProps {
|
|
2054
|
+
children?: ReactNode;
|
|
2055
|
+
sticky?: boolean;
|
|
2056
|
+
className?: string;
|
|
2057
|
+
style?: CSSProperties;
|
|
2058
|
+
}
|
|
2059
|
+
interface TableBodyOwnProps {
|
|
2060
|
+
children?: ReactNode;
|
|
2061
|
+
/** CSS Grid grid-template-areas-style template, inherited by child rows. */
|
|
2062
|
+
stackAreas?: string;
|
|
2063
|
+
className?: string;
|
|
2064
|
+
style?: CSSProperties;
|
|
2065
|
+
}
|
|
2066
|
+
interface TableRowOwnProps {
|
|
2067
|
+
children?: ReactNode;
|
|
2068
|
+
/** Per-row override of the inherited Body stackAreas template. */
|
|
2069
|
+
stackAreas?: string;
|
|
2070
|
+
className?: string;
|
|
2071
|
+
style?: CSSProperties;
|
|
2072
|
+
}
|
|
2073
|
+
interface TableHeaderCellOwnProps {
|
|
2074
|
+
children?: ReactNode;
|
|
2075
|
+
sticky?: StickyEdge;
|
|
2076
|
+
/** Override for stack-mode auto-label-derivation when children isn't a plain string. */
|
|
2077
|
+
stackLabel?: string;
|
|
2078
|
+
className?: string;
|
|
2079
|
+
style?: CSSProperties;
|
|
2080
|
+
colSpan?: number;
|
|
2081
|
+
scope?: "col" | "row" | "colgroup" | "rowgroup";
|
|
2082
|
+
onClick?: () => void;
|
|
2083
|
+
}
|
|
2084
|
+
interface TableCellStackConfig {
|
|
2085
|
+
area?: string;
|
|
2086
|
+
}
|
|
2087
|
+
interface TableCellOwnProps {
|
|
2088
|
+
children?: ReactNode;
|
|
2089
|
+
sticky?: StickyEdge;
|
|
2090
|
+
stack?: TableCellStackConfig;
|
|
2091
|
+
/** Flat (non-grid) stack-mode label — highest priority in the resolution chain. */
|
|
2092
|
+
label?: string;
|
|
2093
|
+
className?: string;
|
|
2094
|
+
style?: CSSProperties;
|
|
2095
|
+
colSpan?: number;
|
|
2096
|
+
/**
|
|
2097
|
+
* Column index within its row, used to pair this cell with its matching
|
|
2098
|
+
* Table.HeaderCell by position for sticky-offset and stack-label resolution.
|
|
2099
|
+
* Auto-assigned internally by Table.Row via Children walk; not consumer-set.
|
|
2100
|
+
*/
|
|
2101
|
+
columnIndex?: number;
|
|
2102
|
+
}
|
|
2103
|
+
|
|
2104
|
+
declare const Table: {
|
|
2105
|
+
Root: _splenddev_kreativ_core.KuiComponent<TableRootOwnProps, HTMLElement>;
|
|
2106
|
+
Header: _splenddev_kreativ_core.KuiComponent<TableHeaderOwnProps, HTMLTableSectionElement>;
|
|
2107
|
+
HeaderCell: _splenddev_kreativ_core.KuiComponent<TableHeaderCellOwnProps, HTMLTableCellElement>;
|
|
2108
|
+
Body: _splenddev_kreativ_core.KuiComponent<TableBodyOwnProps, HTMLElement>;
|
|
2109
|
+
Row: _splenddev_kreativ_core.KuiComponent<TableRowOwnProps, HTMLElement>;
|
|
2110
|
+
Cell: _splenddev_kreativ_core.KuiComponent<TableCellOwnProps, HTMLElement>;
|
|
2111
|
+
};
|
|
2112
|
+
|
|
2113
|
+
/** Axis along which a `Resizable.Root` lays out its panels. */
|
|
2114
|
+
type ResizableDirection = "horizontal" | "vertical";
|
|
2115
|
+
/** Props for `Resizable.Root`. */
|
|
2116
|
+
interface ResizableRootProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
2117
|
+
/**
|
|
2118
|
+
* Axis the panels are laid out along. `"horizontal"` puts panels side by side with vertical
|
|
2119
|
+
* handles; `"vertical"` stacks them with horizontal handles.
|
|
2120
|
+
* @default "horizontal"
|
|
2121
|
+
*/
|
|
2122
|
+
direction?: ResizableDirection;
|
|
2123
|
+
/**
|
|
2124
|
+
* Controlled panel sizes, as percentages in panel order. Must total 100 and respect every
|
|
2125
|
+
* panel's constraints; invalid values are repaired and reported through `onSizesChange`.
|
|
2126
|
+
*/
|
|
2127
|
+
sizes?: number[];
|
|
2128
|
+
/** Initial sizes when uncontrolled. Falls back to each panel's `defaultSize`, then an equal split. */
|
|
2129
|
+
defaultSizes?: number[];
|
|
2130
|
+
/** Called on every size change, including every pointer-move frame. */
|
|
2131
|
+
onSizesChange?: (sizes: number[]) => void;
|
|
2132
|
+
/**
|
|
2133
|
+
* Called once when a resize finishes: on pointer release, on key release, or after a
|
|
2134
|
+
* collapse toggle. Use this (not `onSizesChange`) to persist sizes.
|
|
2135
|
+
*/
|
|
2136
|
+
onSizesCommit?: (sizes: number[]) => void;
|
|
2137
|
+
/** Disables pointer and keyboard resizing for every handle in the group. */
|
|
2138
|
+
disabled?: boolean;
|
|
2139
|
+
/** `Resizable.Panel` and `Resizable.Handle` elements, as direct children (fragments are fine). */
|
|
2140
|
+
children?: React$1.ReactNode;
|
|
2141
|
+
}
|
|
2142
|
+
/** Props for `Resizable.Panel`. */
|
|
2143
|
+
interface ResizablePanelProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "id"> {
|
|
2144
|
+
/**
|
|
2145
|
+
* Stable key for this panel. Sizes are remembered by `id`, so panels can mount and unmount
|
|
2146
|
+
* conditionally without scrambling the others. The DOM `id` is derived from it.
|
|
2147
|
+
*/
|
|
2148
|
+
id: string;
|
|
2149
|
+
/** Initial size in percent when the group is uncontrolled and no `defaultSizes` is given. */
|
|
2150
|
+
defaultSize?: number;
|
|
2151
|
+
/** Smallest size in percent while expanded. @default 0 */
|
|
2152
|
+
minSize?: number;
|
|
2153
|
+
/** Largest size in percent. @default 100 */
|
|
2154
|
+
maxSize?: number;
|
|
2155
|
+
/**
|
|
2156
|
+
* Allows the panel to collapse to `collapsedSize`. Dragging past the midpoint between
|
|
2157
|
+
* `minSize` and `collapsedSize` collapses it; Enter or double-click on an adjacent handle toggles it.
|
|
2158
|
+
*/
|
|
2159
|
+
collapsible?: boolean;
|
|
2160
|
+
/**
|
|
2161
|
+
* Size in percent when collapsed. Must satisfy `0 ≤ collapsedSize ≤ minSize`.
|
|
2162
|
+
* Only used when `collapsible`. @default 0
|
|
2163
|
+
*/
|
|
2164
|
+
collapsedSize?: number;
|
|
2165
|
+
/** Called when the panel collapses (`true`) or expands (`false`). */
|
|
2166
|
+
onCollapseChange?: (collapsed: boolean) => void;
|
|
2167
|
+
}
|
|
2168
|
+
/** Props for `Resizable.Handle`. */
|
|
2169
|
+
interface ResizableHandleProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
2170
|
+
/** Disables just this handle. */
|
|
2171
|
+
disabled?: boolean;
|
|
2172
|
+
/** Percent moved per arrow-key press. @default 1 */
|
|
2173
|
+
step?: number;
|
|
2174
|
+
/** Percent moved per Shift+arrow press. @default 10 */
|
|
2175
|
+
largeStep?: number;
|
|
2176
|
+
}
|
|
2177
|
+
/** A width/height pair in pixels. */
|
|
2178
|
+
interface ResizableBoxSize {
|
|
2179
|
+
width: number;
|
|
2180
|
+
height: number;
|
|
2181
|
+
}
|
|
2182
|
+
/** Edges of a `Resizable.Box` that can be dragged. */
|
|
2183
|
+
type ResizableBoxEdge = "top" | "right" | "bottom" | "left";
|
|
2184
|
+
/** Props for `Resizable.Box`. */
|
|
2185
|
+
interface ResizableBoxProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "onResize"> {
|
|
2186
|
+
/**
|
|
2187
|
+
* Edges that get a drag handle. A corner handle is added for every vertical/horizontal pair
|
|
2188
|
+
* that is present (e.g. `["right", "bottom"]` also gets a bottom-right corner).
|
|
2189
|
+
* @default ["right", "bottom"]
|
|
2190
|
+
*/
|
|
2191
|
+
edges?: ResizableBoxEdge[];
|
|
2192
|
+
/** Controlled size in pixels. */
|
|
2193
|
+
size?: ResizableBoxSize;
|
|
2194
|
+
/** Initial size in pixels when uncontrolled. Without it, the box keeps its natural size until first resized. */
|
|
2195
|
+
defaultSize?: ResizableBoxSize;
|
|
2196
|
+
/** Called on every size change, including every pointer-move frame. */
|
|
2197
|
+
onResize?: (size: ResizableBoxSize) => void;
|
|
2198
|
+
/** Called once when a resize finishes (pointer release or key release). */
|
|
2199
|
+
onResizeCommit?: (size: ResizableBoxSize) => void;
|
|
2200
|
+
/** Minimum width in pixels. */
|
|
2201
|
+
minWidth?: number;
|
|
2202
|
+
/** Maximum width in pixels. */
|
|
2203
|
+
maxWidth?: number;
|
|
2204
|
+
/** Minimum height in pixels. */
|
|
2205
|
+
minHeight?: number;
|
|
2206
|
+
/** Maximum height in pixels. */
|
|
2207
|
+
maxHeight?: number;
|
|
2208
|
+
/** Disables pointer and keyboard resizing. */
|
|
2209
|
+
disabled?: boolean;
|
|
2210
|
+
children?: React$1.ReactNode;
|
|
2211
|
+
}
|
|
2212
|
+
|
|
2213
|
+
/**
|
|
2214
|
+
* Resizable — split layouts (panel groups) and single-element resizing.
|
|
2215
|
+
*
|
|
2216
|
+
* - `Resizable.Root` / `.Panel` / `.Handle` — panel group.
|
|
2217
|
+
* - `Resizable.Box` — drag a single element's edges or corners.
|
|
2218
|
+
*/
|
|
2219
|
+
declare const Resizable: {
|
|
2220
|
+
Root: _splenddev_kreativ_core.KuiComponent<ResizableRootProps, HTMLDivElement>;
|
|
2221
|
+
Panel: _splenddev_kreativ_core.KuiComponent<ResizablePanelProps, HTMLDivElement>;
|
|
2222
|
+
Handle: _splenddev_kreativ_core.KuiComponent<ResizableHandleProps, HTMLDivElement>;
|
|
2223
|
+
Box: _splenddev_kreativ_core.KuiComponent<ResizableBoxProps, HTMLDivElement>;
|
|
2224
|
+
};
|
|
2225
|
+
|
|
2226
|
+
/** cornerRadius: single number (uniform) or per-vertex array. Polygon/star only. */
|
|
2227
|
+
type CornerRadius = number | number[];
|
|
2228
|
+
/**
|
|
2229
|
+
* The underlying geometry description. Semantic preset names on the public
|
|
2230
|
+
* `shape` prop resolve to one of these internally — this is the real "shape
|
|
2231
|
+
* of the shape," not the friendly name.
|
|
2232
|
+
*/
|
|
2233
|
+
type ShapeGeometry = {
|
|
2234
|
+
type: "polygon";
|
|
2235
|
+
points: number;
|
|
2236
|
+
cornerRadius?: CornerRadius;
|
|
2237
|
+
} | {
|
|
2238
|
+
type: "star";
|
|
2239
|
+
points: number;
|
|
2240
|
+
innerRadius: number;
|
|
2241
|
+
outerRadius: number;
|
|
2242
|
+
cornerRadius?: CornerRadius;
|
|
2243
|
+
} | {
|
|
2244
|
+
type: "ellipse";
|
|
2245
|
+
} | {
|
|
2246
|
+
type: "path";
|
|
2247
|
+
d: string;
|
|
2248
|
+
} | {
|
|
2249
|
+
type: "custom";
|
|
2250
|
+
clipPath: string;
|
|
2251
|
+
};
|
|
2252
|
+
/** Semantic preset names — convenient defaults over the raw geometry tiers. */
|
|
2253
|
+
type GeneratedShapePreset = "triangle" | "square" | "pentagon" | "hexagon" | "heptagon" | "octagon" | "star" | "diamond" | "circle" | "ellipse";
|
|
2254
|
+
/** Authored (hand-built path) presets shipped with the library. */
|
|
2255
|
+
type AuthoredShapePreset = "blob";
|
|
2256
|
+
type ShapePreset = GeneratedShapePreset | AuthoredShapePreset;
|
|
2257
|
+
/** `shape` accepts a named preset OR a raw ShapeGeometry escape hatch. */
|
|
2258
|
+
type ShapeInput = ShapePreset | ShapeGeometry;
|
|
2259
|
+
interface ShapeProps {
|
|
2260
|
+
/** Preset name (e.g. "hexagon", "star", "blob") or a raw ShapeGeometry object. */
|
|
2261
|
+
shape: ShapeInput;
|
|
2262
|
+
/**
|
|
2263
|
+
* Override the preset's default vertex count (e.g. star → 5, hexagon → 6).
|
|
2264
|
+
* Ignored for geometry tiers with no notion of "points" (ellipse/path/custom).
|
|
2265
|
+
* Also settable directly via a raw `{ type: "polygon" | "star", points }` object.
|
|
2266
|
+
*/
|
|
2267
|
+
points?: number;
|
|
2268
|
+
/** Star only — overrides the preset's default inner radius (0–1, relative to outerRadius). */
|
|
2269
|
+
innerRadius?: number;
|
|
2270
|
+
/** Star only — overrides the preset's default outer radius. */
|
|
2271
|
+
outerRadius?: number;
|
|
2272
|
+
/**
|
|
2273
|
+
* Rounded corners for polygon/star geometry. Uniform number or per-vertex
|
|
2274
|
+
* array. Purely presentational — never flattens the shape into a `path`;
|
|
2275
|
+
* stays fully parametric.
|
|
2276
|
+
*/
|
|
2277
|
+
cornerRadius?: CornerRadius;
|
|
2278
|
+
/** Fill. Token-driven (BaseColor) or a raw CSS color string. */
|
|
2279
|
+
bg?: BaseColor$2 | (string & {});
|
|
2280
|
+
/** Border width + color — stroke the clipped edge. */
|
|
2281
|
+
border?: string;
|
|
2282
|
+
borderColor?: BaseColor$2 | (string & {});
|
|
2283
|
+
/** Explicit box size. Falls back to natural/flex sizing from parent/children if omitted. */
|
|
2284
|
+
size?: number | string;
|
|
2285
|
+
width?: number | string;
|
|
2286
|
+
height?: number | string;
|
|
2287
|
+
/** Clipped content. If omitted, Shape renders as a standalone filled/stroked graphic. */
|
|
2288
|
+
children?: ReactNode;
|
|
2289
|
+
className?: string;
|
|
2290
|
+
style?: CSSProperties;
|
|
2291
|
+
"aria-label"?: string;
|
|
2292
|
+
}
|
|
2293
|
+
|
|
2294
|
+
/**
|
|
2295
|
+
* Renders a box in a geometric shape — circle, polygon, star, or an authored path — and
|
|
2296
|
+
* clips its `children` to that shape.
|
|
2297
|
+
*
|
|
2298
|
+
* Picks the cheapest renderer that can draw the requested geometry:
|
|
2299
|
+
*
|
|
2300
|
+
* 1. **Ellipse / circle** — plain `border-radius: 50%` with a native `border`.
|
|
2301
|
+
* 2. **Polygon / star with straight corners** — CSS `clip-path: polygon()`. A border is drawn
|
|
2302
|
+
* by stacking two clipped layers, the outer one in `borderColor`.
|
|
2303
|
+
* 3. **Everything else** (authored paths, custom clip-paths, polygons/stars with
|
|
2304
|
+
* `cornerRadius`) — an SVG that draws the fill and stroke, with children hosted in a DOM
|
|
2305
|
+
* overlay clipped to the same path.
|
|
2306
|
+
*
|
|
2307
|
+
* Children are always real DOM nodes, so events, focus and text selection behave normally.
|
|
2308
|
+
*
|
|
2309
|
+
* @remarks
|
|
2310
|
+
* - **Sizing:** `size` sets both dimensions; `width`/`height` set them individually; with none
|
|
2311
|
+
* of them the shape is 120 × 120 px. The element is `position: relative; display: inline-block`.
|
|
2312
|
+
* - **Colors:** `bg` and `borderColor` accept a semantic token (`"brand"`), a scale token
|
|
2313
|
+
* (`"blue.500"`), a token reference (`"{colors.blue.500}"`) or any CSS color. They resolve to
|
|
2314
|
+
* CSS variables, so they follow light/dark mode automatically.
|
|
2315
|
+
* - **Border:** `border` is a CSS border shorthand *without* a color, e.g. `"2px solid"`; the
|
|
2316
|
+
* color comes from `borderColor`. Outside the ellipse tier only `px` widths are read — other
|
|
2317
|
+
* units are treated as `1px`.
|
|
2318
|
+
* - **Clipping:** tiers 2 and 3 use `clip-path`, which also clips anything that draws outside
|
|
2319
|
+
* the shape — `box-shadow`, `outline` and focus rings on the Shape itself. For a shadow, put
|
|
2320
|
+
* `filter: drop-shadow(...)` on a wrapper element instead.
|
|
2321
|
+
* - **Accessibility:** setting `aria-label` gives the element `role="img"`, which assistive
|
|
2322
|
+
* technology treats as an atomic image — its children are not exposed. Leave `aria-label`
|
|
2323
|
+
* off when the children are interactive or need to be read.
|
|
2324
|
+
* - **Rotation:** if the shape's geometry specifies a rotation, the whole element — children
|
|
2325
|
+
* included — is rotated.
|
|
2326
|
+
* - **Rest props:** anything not listed in {@link ShapeProps} is spread onto the outer `div`.
|
|
2327
|
+
*
|
|
2328
|
+
* @example
|
|
2329
|
+
* ```tsx
|
|
2330
|
+
* // A circular avatar frame with a themed border
|
|
2331
|
+
* <Shape shape="circle" size={64} bg="surface" border="2px solid" borderColor="brand">
|
|
2332
|
+
* <img src={avatar} alt="" />
|
|
2333
|
+
* </Shape>
|
|
2334
|
+
* ```
|
|
2335
|
+
*
|
|
2336
|
+
* @example
|
|
2337
|
+
* ```tsx
|
|
2338
|
+
* // A five-point star with softened tips
|
|
2339
|
+
* <Shape shape="star" points={5} cornerRadius={4} bg="{colors.amber.400}" aria-label="Favourite" />
|
|
2340
|
+
* ```
|
|
2341
|
+
*/
|
|
2342
|
+
declare const Shape: _splenddev_kreativ_core.KuiComponent<ShapeProps, HTMLDivElement>;
|
|
2343
|
+
|
|
2192
2344
|
interface TextProps extends TypographyProps {
|
|
2193
2345
|
as?: ElementType;
|
|
2194
|
-
color?: BaseColor | string;
|
|
2346
|
+
color?: BaseColor$1 | string;
|
|
2195
2347
|
align?: "left" | "center" | "right" | "justify";
|
|
2196
2348
|
truncate?: boolean;
|
|
2197
2349
|
clampLines?: number;
|
|
@@ -2202,12 +2354,220 @@ interface TextProps extends TypographyProps {
|
|
|
2202
2354
|
children?: ReactNode;
|
|
2203
2355
|
}
|
|
2204
2356
|
|
|
2357
|
+
declare const Text: _splenddev_kreativ_core.KuiComponent<TextProps, HTMLElement>;
|
|
2358
|
+
|
|
2205
2359
|
type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
2206
|
-
interface HeadingProps extends Omit<TextProps, "as"
|
|
2360
|
+
interface HeadingProps extends Omit<TextProps, "as"> {
|
|
2361
|
+
/** Semantic level, picks the h1-h6 tag and the default typography */
|
|
2207
2362
|
level?: HeadingLevel;
|
|
2208
|
-
|
|
2363
|
+
/** Override the rendered tag without changing the look (e.g. an h2-styled h3) */
|
|
2364
|
+
as?: TextProps["as"];
|
|
2365
|
+
/** Apply text-wrap: balance to avoid orphaned words */
|
|
2366
|
+
balance?: boolean;
|
|
2367
|
+
}
|
|
2368
|
+
|
|
2369
|
+
declare const Heading: _splenddev_kreativ_core.KuiComponent<HeadingProps, HTMLElement>;
|
|
2370
|
+
|
|
2371
|
+
type DataTableFilterType = "text" | "select" | "multi-select" | "number" | "date";
|
|
2372
|
+
interface DataTableColumnFilterConfig {
|
|
2373
|
+
type: DataTableFilterType;
|
|
2374
|
+
operator?: string;
|
|
2375
|
+
options?: {
|
|
2376
|
+
label: string;
|
|
2377
|
+
value: string;
|
|
2378
|
+
}[];
|
|
2379
|
+
}
|
|
2380
|
+
/** Maps to Table.Cell's `stack` prop when responsive="stack". */
|
|
2381
|
+
interface DataTableColumnStackConfig {
|
|
2382
|
+
area?: string;
|
|
2383
|
+
}
|
|
2384
|
+
interface DataTableColumn<T> {
|
|
2385
|
+
id: string;
|
|
2386
|
+
header: ReactNode;
|
|
2387
|
+
accessorKey?: keyof T;
|
|
2388
|
+
filter?: DataTableColumnFilterConfig;
|
|
2389
|
+
filterFn?: (row: T, value: unknown) => boolean;
|
|
2390
|
+
/** Locked resolution (Sep 2026): forwarded to Table.HeaderCell/Table.Cell — sticky is per-column, not root-level. */
|
|
2391
|
+
sticky?: StickyEdge;
|
|
2392
|
+
/** Locked resolution (Sep 2026): forwarded to Table.HeaderCell's stackLabel override. */
|
|
2393
|
+
stackLabel?: string;
|
|
2394
|
+
/** Locked resolution (Sep 2026): forwarded to Table.Cell's stack prop. */
|
|
2395
|
+
stack?: DataTableColumnStackConfig;
|
|
2396
|
+
/** Custom cell renderer — falls back to `row[accessorKey]` when omitted. */
|
|
2397
|
+
cell?: (row: T) => ReactNode;
|
|
2398
|
+
sortable?: boolean;
|
|
2399
|
+
/** Custom comparator; falls back to a default compare on accessorKey's value when omitted. */
|
|
2400
|
+
sortFn?: (a: T, b: T) => number;
|
|
2401
|
+
}
|
|
2402
|
+
type DataTableFilters = Record<string, unknown>;
|
|
2403
|
+
type DataTableSortDirection = "asc" | "desc";
|
|
2404
|
+
interface DataTableSortState {
|
|
2405
|
+
columnId: string;
|
|
2406
|
+
direction: DataTableSortDirection;
|
|
2407
|
+
}
|
|
2408
|
+
type DataTableColorProps = {
|
|
2409
|
+
variant?: "plain";
|
|
2410
|
+
color?: never;
|
|
2411
|
+
} | {
|
|
2412
|
+
variant: "stripe" | "border";
|
|
2413
|
+
color?: BaseColor$2;
|
|
2414
|
+
};
|
|
2415
|
+
type DataTableRootOwnProps<T> = DataTableColorProps & {
|
|
2416
|
+
children?: ReactNode;
|
|
2417
|
+
data: T[];
|
|
2418
|
+
columns: DataTableColumn<T>[];
|
|
2419
|
+
search?: string;
|
|
2420
|
+
defaultSearch?: string;
|
|
2421
|
+
onSearchChange?: (value: string) => void;
|
|
2422
|
+
filters?: DataTableFilters;
|
|
2423
|
+
defaultFilters?: DataTableFilters;
|
|
2424
|
+
onFiltersChange?: (filters: DataTableFilters) => void;
|
|
2425
|
+
manualFiltering?: boolean;
|
|
2426
|
+
sort?: DataTableSortState | null;
|
|
2427
|
+
defaultSort?: DataTableSortState | null;
|
|
2428
|
+
onSortChange?: (sort: DataTableSortState | null) => void;
|
|
2429
|
+
manualSorting?: boolean;
|
|
2430
|
+
/** Opt-in built-in checkbox-column selection. */
|
|
2431
|
+
selectable?: boolean;
|
|
2432
|
+
selected?: Set<string>;
|
|
2433
|
+
defaultSelected?: Set<string>;
|
|
2434
|
+
onSelectedChange?: (selected: Set<string>) => void;
|
|
2435
|
+
/** Resolves a stable row id for selection tracking — required when selectable is true. */
|
|
2436
|
+
getRowId?: (row: T) => string;
|
|
2437
|
+
/** Forwarded to the composed Table.Root — same discriminated union, same responsive modes. */
|
|
2438
|
+
responsive?: TableResponsive;
|
|
2439
|
+
showColumnBorder?: boolean;
|
|
2440
|
+
/** Forwarded to the composed Table.Body when responsive="stack". */
|
|
2441
|
+
stackAreas?: string;
|
|
2442
|
+
className?: string;
|
|
2443
|
+
};
|
|
2444
|
+
interface DataTableToolbarOwnProps {
|
|
2445
|
+
children?: ReactNode;
|
|
2446
|
+
className?: string;
|
|
2447
|
+
}
|
|
2448
|
+
interface DataTableSearchOwnProps {
|
|
2449
|
+
placeholder?: string;
|
|
2450
|
+
className?: string;
|
|
2451
|
+
}
|
|
2452
|
+
interface DataTableFilterOwnProps extends SizeProps$1 {
|
|
2453
|
+
column: string;
|
|
2454
|
+
className?: string;
|
|
2455
|
+
}
|
|
2456
|
+
type DataTableTableOwnProps = Pick<TableRootOwnProps, "className" | "style" | "maxHeight" | "overscrollBehavior"> & {
|
|
2457
|
+
/** Pins the header row while the body scrolls. Needs `maxHeight` (or a height-limited parent) to have any visible effect. */
|
|
2458
|
+
stickyHeader?: boolean;
|
|
2459
|
+
};
|
|
2460
|
+
|
|
2461
|
+
declare const DataTable: {
|
|
2462
|
+
Root: (<T>(props: DataTableRootOwnProps<T> & {
|
|
2463
|
+
ref?: React$1.Ref<HTMLDivElement>;
|
|
2464
|
+
}) => React$1.ReactElement) & {
|
|
2465
|
+
__kui: {
|
|
2466
|
+
role: "layout";
|
|
2467
|
+
skeleton: "preserve";
|
|
2468
|
+
};
|
|
2469
|
+
displayName: string;
|
|
2470
|
+
};
|
|
2471
|
+
Toolbar: _splenddev_kreativ_core.KuiComponent<DataTableToolbarOwnProps, HTMLDivElement>;
|
|
2472
|
+
Search: _splenddev_kreativ_core.KuiComponent<DataTableSearchOwnProps, HTMLInputElement>;
|
|
2473
|
+
Filter: _splenddev_kreativ_core.KuiComponent<DataTableFilterOwnProps, HTMLDivElement>;
|
|
2474
|
+
Table: _splenddev_kreativ_core.KuiComponent<DataTableTableOwnProps, HTMLDivElement>;
|
|
2475
|
+
};
|
|
2476
|
+
|
|
2477
|
+
type SyntaxLanguage = BundledLanguage | "text" | (string & {});
|
|
2478
|
+
type SyntaxThemeName = BundledTheme | (string & {});
|
|
2479
|
+
/** A single Shiki theme name, or a light/dark pair rendered via CSS variables. */
|
|
2480
|
+
type SyntaxTheme = SyntaxThemeName | {
|
|
2481
|
+
light: SyntaxThemeName;
|
|
2482
|
+
dark: SyntaxThemeName;
|
|
2483
|
+
};
|
|
2484
|
+
interface SyntaxHighlighterProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
|
|
2485
|
+
code: string;
|
|
2486
|
+
language: SyntaxLanguage;
|
|
2487
|
+
/**
|
|
2488
|
+
* Which colors to use.
|
|
2489
|
+
* - Omitted / `"kui"`: the `syntax*` semantic tokens from your theme (recommended;
|
|
2490
|
+
* light/dark follow your theme's mode automatically).
|
|
2491
|
+
* - A Shiki theme name, or `{ light, dark }`: use that Shiki theme instead.
|
|
2492
|
+
*/
|
|
2493
|
+
theme?: SyntaxTheme;
|
|
2494
|
+
/**
|
|
2495
|
+
* Hook for composing components (CodeBlock) to tag individual lines with a
|
|
2496
|
+
* class. Not UI: SyntaxHighlighter itself renders no line numbers or chrome.
|
|
2497
|
+
*/
|
|
2498
|
+
getLineClassName?: (line: number) => string | undefined;
|
|
2209
2499
|
}
|
|
2210
2500
|
|
|
2211
|
-
declare const
|
|
2501
|
+
declare const SyntaxHighlighter: _splenddev_kreativ_core.KuiComponent<SyntaxHighlighterProps, HTMLDivElement>;
|
|
2502
|
+
|
|
2503
|
+
/**
|
|
2504
|
+
* Default: colors come from the `syntax*` semantic tokens in your theme.
|
|
2505
|
+
* Pass a Shiki theme name (or `{ light, dark }`) to the `theme` prop to opt out.
|
|
2506
|
+
*/
|
|
2507
|
+
declare const DEFAULT_SYNTAX_THEME = "kui";
|
|
2508
|
+
/** Drop a single trailing newline so it doesn't render as an empty last line. */
|
|
2509
|
+
declare const normalizeCode: (code: string) => string;
|
|
2510
|
+
|
|
2511
|
+
type CodeBlockSize = "sm" | "md" | "lg";
|
|
2512
|
+
type CodeBlockVariant = "outline" | "filled";
|
|
2513
|
+
/** 1-based line numbers or inclusive ranges, e.g. `[2, "5-7"]`. */
|
|
2514
|
+
type HighlightLines = Array<number | `${number}-${number}`>;
|
|
2515
|
+
interface CodeBlockRootProps extends Omit<HTMLAttributes<HTMLDivElement>, "children" | "onCopy"> {
|
|
2516
|
+
code: string;
|
|
2517
|
+
language: SyntaxLanguage;
|
|
2518
|
+
filename?: string;
|
|
2519
|
+
theme?: SyntaxTheme;
|
|
2520
|
+
showLineNumbers?: boolean;
|
|
2521
|
+
highlightLines?: HighlightLines;
|
|
2522
|
+
onCopy?: (code: string) => void;
|
|
2523
|
+
collapsible?: boolean;
|
|
2524
|
+
collapsed?: boolean;
|
|
2525
|
+
defaultCollapsed?: boolean;
|
|
2526
|
+
onCollapsedChange?: (collapsed: boolean) => void;
|
|
2527
|
+
collapsedLines?: number;
|
|
2528
|
+
size?: CodeBlockSize;
|
|
2529
|
+
variant?: CodeBlockVariant;
|
|
2530
|
+
children?: ReactNode;
|
|
2531
|
+
}
|
|
2532
|
+
/** Flat props: Root props plus `copyable`. Passing children switches to compound mode. */
|
|
2533
|
+
interface CodeBlockProps extends CodeBlockRootProps {
|
|
2534
|
+
copyable?: boolean;
|
|
2535
|
+
}
|
|
2536
|
+
|
|
2537
|
+
declare const CodeBlock: React$1.ForwardRefExoticComponent<CodeBlockProps & React$1.RefAttributes<HTMLDivElement>> & {
|
|
2538
|
+
__kui: KuiMeta<CodeBlockProps>;
|
|
2539
|
+
providerRequired?: _splenddev_kreativ_core.KuiProviderRequirement;
|
|
2540
|
+
} & {
|
|
2541
|
+
Root: _splenddev_kreativ_core.KuiComponent<CodeBlockRootProps, HTMLDivElement>;
|
|
2542
|
+
Header: _splenddev_kreativ_core.KuiComponent<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
|
2543
|
+
Filename: _splenddev_kreativ_core.KuiComponent<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;
|
|
2544
|
+
CopyButton: _splenddev_kreativ_core.KuiComponent<Omit<HTMLAttributes<HTMLButtonElement>, "color">, HTMLButtonElement>;
|
|
2545
|
+
Content: _splenddev_kreativ_core.KuiComponent<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
|
2546
|
+
};
|
|
2547
|
+
|
|
2548
|
+
declare const codeBlockRecipe: {
|
|
2549
|
+
readonly base: "relative overflow-hidden rounded-lg bg-kui-surface-sunken text-kui-text";
|
|
2550
|
+
readonly variants: {
|
|
2551
|
+
readonly variant: {
|
|
2552
|
+
readonly outline: "border border-kui-border";
|
|
2553
|
+
readonly filled: "border border-transparent";
|
|
2554
|
+
};
|
|
2555
|
+
readonly size: {
|
|
2556
|
+
readonly sm: "[--kui-code-pad:0.625rem]";
|
|
2557
|
+
readonly md: "[--kui-code-pad:0.875rem]";
|
|
2558
|
+
readonly lg: "[--kui-code-pad:1.125rem]";
|
|
2559
|
+
};
|
|
2560
|
+
};
|
|
2561
|
+
readonly defaultVariants: {
|
|
2562
|
+
readonly variant: "outline";
|
|
2563
|
+
readonly size: "md";
|
|
2564
|
+
};
|
|
2565
|
+
};
|
|
2566
|
+
declare const codeBlockHeaderRecipe: {
|
|
2567
|
+
readonly base: "flex items-center justify-between gap-2 border-b border-kui-border px-[var(--kui-code-pad)] py-1.5 text-xs text-kui-text-muted";
|
|
2568
|
+
};
|
|
2569
|
+
declare const codeBlockContentRecipe: {
|
|
2570
|
+
readonly base: "relative overflow-hidden";
|
|
2571
|
+
};
|
|
2212
2572
|
|
|
2213
|
-
export { ActionGuard, type ActionGuardProps, type ActionGuardReaction, type
|
|
2573
|
+
export { ActionGuard, type ActionGuardProps, type ActionGuardReaction, type AuthoredShapePreset, type BaseColor, BaseInputProps, Box, type BoxProps, Button, ButtonGroup, ButtonGroupContext, type ButtonGroupContextValue, ButtonGroupItemContext, type ButtonGroupItemContextValue, type ButtonGroupItemProps, type ButtonGroupLabelProps, type ButtonGroupProps, type ButtonGroupSeparatorProps, type ButtonGroupSpacing, type ButtonGroupTextProps, ButtonProps, Card, type CardBodyProps, type CardFooterProps, type CardHeaderProps, type CardMediaBlend, type CardMediaFit, type CardMediaProps, CardOverlay, type CardOverlayGradient, type CardOverlayGradientEdge, type CardOverlayProps, type CardOverlayRadialGradient, type CardProps, type CardSize, type CardVariant, Carousel, type CarouselIndicatorsInfo, type CarouselPlayPauseProps, type CarouselProps, type CarouselRootProps, Checkbox, type CheckboxProps, CodeBlock, type CodeBlockProps, type CodeBlockRootProps, type CodeBlockSize, type CodeBlockVariant, Combobox, ComboboxContent, ComboboxInput, type ComboboxInputProps, ComboboxItem, type ComboboxItemProps, type ComboboxProps, type ComponentKey, type ComponentPropsMap, type ConfirmActionFn, ConfirmConflictError, ConfirmDialog, type ConfirmDialogProps, ConfirmHost, type ConfirmHostProps, type ConfirmOptions, ConfirmRequestManager, Container, type ContainerProps, type CornerRadius, type CustomFieldRenderer, DEFAULT_SYNTAX_THEME, DataTable, type DataTableColumn, type DataTableColumnFilterConfig, type DataTableColumnStackConfig, type DataTableFilterOwnProps, type DataTableFilterType, type DataTableFilters, type DataTableRootOwnProps, type DataTableSearchOwnProps, type DataTableSortDirection, type DataTableSortState, type DataTableTableOwnProps, type DataTableToolbarOwnProps, DialogProvider, DialogStack, type FadeEdgesConfig, Flex, type FlexProps, Form, type FormContextValue, type FormControlProps, type FormErrors, FormField, FormFieldControl, FormFieldDescription, type FormFieldDescriptionProps, FormFieldLabel, type FormFieldLabelProps, FormFieldMessage, type FormFieldMessageProps, type FormFieldProps$1 as FormFieldProps, type FormFieldRootProps, FormResetButton, type FormResetButtonProps, type FormRootProps, FormSubmitButton, type FormSubmitButtonProps, type FormValues, type GeneratedShapePreset, Grid, type GridProps, Heading, type HeadingLevel, type HeadingProps, type HighlightLines, Input, InputProps, InputSize, InputVariant, type KuiFormControlComponent, type ManualValidator, MarkdownEditor, type MarkdownEditorProps, type MarkdownEditorTabs, MultiSelect, MultiSelectContent, MultiSelectItem, type MultiSelectItemProps, type MultiSelectProps, MultiSelectTrigger, NumberStepper, type NumberStepperButtonLayout, type NumberStepperClampOn, type NumberStepperProps, type NumberStepperValidationResult, OverlayPortal, type ProgressStore, Radio, RadioGroup, type RadioGroupProps, type RadioProps, type RadioSize, Repeater, Resizable, type ResizableBoxEdge, type ResizableBoxProps, type ResizableBoxSize, type ResizableDirection, type ResizableHandleProps, type ResizablePanelProps, type ResizableRootProps, type SceneRange, type SchemaLike, ScrollArea, type ScrollAreaHandle, type ScrollAreaProps, type ScrollAreaSceneProps, type ScrollAreaStickyProps, type ScrollDirection, type ScrollEdge, type ScrollProgress, type ScrollSnap, type ScrollSnapAlign, type ScrollStepOptions, type ScrollbarVariant, type ScrollbarVisibility, Select, SelectContent, SelectContentProps, SelectGroup, SelectGroupProps, SelectItem, SelectItemProps, SelectLabel, SelectLabelProps, type SelectProps, SelectRoot, SelectRootProps, SelectTrigger, SelectTriggerProps, SelectValue, SelectValueProps, Shape, type ShapeGeometry, type ShapeInput, type ShapePreset, type ShapeProps, Stack, type StackProps, type StickyEdge, Switch, type SwitchProps, type SwitchSize, SyntaxHighlighter, type SyntaxHighlighterProps, type SyntaxLanguage, type SyntaxTheme, type SyntaxThemeName, Table, type TableBodyOwnProps, type TableCellOwnProps, type TableCellStackConfig, type TableHeaderCellOwnProps, type TableHeaderOwnProps, type TableResponsive, type TableRootOwnProps, type TableRowOwnProps, type TableVariant, Text, type TextProps, Textarea, type TextareaCoreProps, type TextareaProps, type TextareaResize, ThemeToggler, type ThemeTogglerColor, type ThemeTogglerDisplay, type ThemeTogglerProps, type ThemeTogglerVariant, Toast, ToastAction, type ToastActionOptions, type ToastActionProps, ToastClose, ToastContent, ToastDescription, type ToastEntry, ToastIcon, type ToastOptions, type ToastPlacement, type ToastPromiseMessages, ToastProvider, type ToastProviderProps, ToastRoot, type ToastRootProps, type ToastStatus, ToastTitle, type ToastUpdateOptions, ToastViewport, type ToastViewportProps, Tooltip, type TooltipArrowProps, type TooltipContentProps, type TooltipDelay, TooltipProvider, type TooltipProviderProps, type TooltipRootProps, type TooltipTriggerProps, type UIArraySchema, type UIArraySchemaFor, type UIFieldSchema, type UIFieldSchemaFor, type UIFieldSchemaRender, type UIObjectSchema, type UIObjectSchemaFor, type UIObjectSchemaForShape, type UISchema, codeBlockContentRecipe, codeBlockHeaderRecipe, codeBlockRecipe, confirmAction, createConfirmAction, createConfirmRequestManager, defaultConfirmManager, defineUIField, normalizeCode, toast, useButtonGroupContext, useButtonGroupItemContext, useCarouselSnap, useConfirmAction, useDialogStack, useDialogState, useElementScrollProgress, useFormContext, useOptionalButtonGroupContext, useOptionalButtonGroupItemContext, useOverlayRoot, useScrollProgress, useToasts };
|