@knkcs/anker 0.0.2 → 0.0.4

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.
Files changed (44) hide show
  1. package/dist/atoms/index.d.ts +16 -3
  2. package/dist/atoms/index.js +89 -6
  3. package/dist/atoms/index.js.map +1 -1
  4. package/dist/chunk-5YDCDC4B.js +12 -0
  5. package/dist/chunk-5YDCDC4B.js.map +1 -0
  6. package/dist/{chunk-C4JI3JNA.js → chunk-6H4LQUMM.js} +4 -33
  7. package/dist/chunk-6H4LQUMM.js.map +1 -0
  8. package/dist/{chunk-PZCL4M6I.js → chunk-E7KRPPCQ.js} +5 -18
  9. package/dist/chunk-E7KRPPCQ.js.map +1 -0
  10. package/dist/{chunk-GJTQLZ4O.js → chunk-KVPN6T6J.js} +6 -28
  11. package/dist/chunk-KVPN6T6J.js.map +1 -0
  12. package/dist/chunk-OU6H3KU4.js +21 -0
  13. package/dist/chunk-OU6H3KU4.js.map +1 -0
  14. package/dist/chunk-SJ6YXNZW.js +30 -0
  15. package/dist/chunk-SJ6YXNZW.js.map +1 -0
  16. package/dist/chunk-SJIYWHIV.js +51 -0
  17. package/dist/chunk-SJIYWHIV.js.map +1 -0
  18. package/dist/chunk-WEP2AIQ5.js +37 -0
  19. package/dist/chunk-WEP2AIQ5.js.map +1 -0
  20. package/dist/chunk-WQIEF5N3.js +52 -0
  21. package/dist/chunk-WQIEF5N3.js.map +1 -0
  22. package/dist/{chunk-QU3FF5WI.js → chunk-ZFBDVERP.js} +4 -8
  23. package/dist/chunk-ZFBDVERP.js.map +1 -0
  24. package/dist/components/index.d.ts +171 -2
  25. package/dist/components/index.js +686 -11
  26. package/dist/components/index.js.map +1 -1
  27. package/dist/feedback/index.d.ts +20 -1
  28. package/dist/feedback/index.js +121 -4
  29. package/dist/feedback/index.js.map +1 -1
  30. package/dist/forms/index.d.ts +23 -15
  31. package/dist/forms/index.js +71 -47
  32. package/dist/forms/index.js.map +1 -1
  33. package/dist/primitives/index.d.ts +1 -1
  34. package/dist/primitives/index.js +9 -50
  35. package/dist/primitives/index.js.map +1 -1
  36. package/package.json +1 -1
  37. package/dist/chunk-7UJ4QEUW.js +0 -37
  38. package/dist/chunk-7UJ4QEUW.js.map +0 -1
  39. package/dist/chunk-C4JI3JNA.js.map +0 -1
  40. package/dist/chunk-GJTQLZ4O.js.map +0 -1
  41. package/dist/chunk-PZCL4M6I.js.map +0 -1
  42. package/dist/chunk-QU3FF5WI.js.map +0 -1
  43. package/dist/chunk-RJPEVNMJ.js +0 -23
  44. package/dist/chunk-RJPEVNMJ.js.map +0 -1
@@ -1,10 +1,62 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { CardRootProps, TextProps, IconButtonProps, DrawerRootProps, DialogRootProps, HTMLChakraProps, Timeline, TreeView } from '@chakra-ui/react';
3
2
  import * as React$1 from 'react';
4
3
  import React__default, { MouseEventHandler } from 'react';
4
+ import { CardRootProps, TextProps, IconButtonProps, DrawerRootProps, DialogRootProps, HTMLChakraProps, Timeline, TreeView } from '@chakra-ui/react';
5
+ export { TreeCollection, createTreeCollection } from '@chakra-ui/react';
5
6
  import { ColumnDef, RowSelectionState, OnChangeFn, SortingState, Row } from '@tanstack/react-table';
6
7
  import { a as SwitchProps } from '../switch-B0o6G2XE.js';
7
8
 
9
+ interface BulkActionBarProps {
10
+ /** Number of currently selected items. */
11
+ selectedCount: number;
12
+ /** Called when the user clicks the clear-selection button. */
13
+ onClear: () => void;
14
+ /** Explicitly control visibility. Defaults to `selectedCount > 0`. */
15
+ visible?: boolean;
16
+ /** CSS position for the bar. @default "fixed" */
17
+ position?: "fixed" | "sticky";
18
+ /** Action buttons / popover actions to display. */
19
+ children: React__default.ReactNode;
20
+ /** Custom label renderer. Defaults to `"{n} items selected"`. */
21
+ countLabel?: (count: number) => string;
22
+ }
23
+ interface BulkActionProps {
24
+ /** Visible button label. */
25
+ label: string;
26
+ /** Optional icon rendered before the label. */
27
+ icon?: React__default.ReactNode;
28
+ /** Called when the button is clicked. */
29
+ onClick: () => void;
30
+ /** Chakra color palette for the button. */
31
+ colorPalette?: string;
32
+ /** Whether the button is disabled. */
33
+ disabled?: boolean;
34
+ /** Whether the button shows a loading spinner. */
35
+ loading?: boolean;
36
+ }
37
+ interface BulkPopoverActionProps {
38
+ /** Visible trigger label. */
39
+ label: string;
40
+ /** Optional icon rendered before the label. */
41
+ icon?: React__default.ReactNode;
42
+ /** Content rendered inside the popover. */
43
+ children: React__default.ReactNode;
44
+ /** Whether the trigger button is disabled. */
45
+ disabled?: boolean;
46
+ }
47
+ declare const BulkActionBar: {
48
+ ({ selectedCount, onClear, visible, position, children, countLabel, }: BulkActionBarProps): react_jsx_runtime.JSX.Element;
49
+ displayName: string;
50
+ Action: {
51
+ ({ label, icon, onClick, colorPalette, disabled, loading, }: BulkActionProps): react_jsx_runtime.JSX.Element;
52
+ displayName: string;
53
+ };
54
+ PopoverAction: {
55
+ ({ label, icon, children, disabled, }: BulkPopoverActionProps): react_jsx_runtime.JSX.Element;
56
+ displayName: string;
57
+ };
58
+ };
59
+
8
60
  interface CardProps extends Omit<CardRootProps, "title"> {
9
61
  maxW?: CardRootProps["maxW"];
10
62
  /** Card title rendered in Card.Header. */
@@ -74,6 +126,25 @@ interface CardListItemProps<T = string> {
74
126
  }
75
127
  declare const CardListItem: <T extends string = string>({ isActive, handleItemClick, handleItemDoubleClick, menuItems, componentLeft, children, columnCount, }: CardListItemProps<T>) => react_jsx_runtime.JSX.Element;
76
128
 
129
+ interface ChipPickerProps<T> {
130
+ assigned: T[];
131
+ available: T[];
132
+ onAdd: (item: T) => void;
133
+ onRemove: (item: T) => void;
134
+ getItemId: (item: T) => string;
135
+ getItemLabel: (item: T) => string;
136
+ getItemColor?: (item: T) => string | undefined;
137
+ /** Label for the add button. @default "Add" */
138
+ addLabel?: string;
139
+ /** Label shown when nothing is assigned. @default "None" */
140
+ emptyLabel?: string;
141
+ /** Whether to show a search input inside the popover. @default false */
142
+ searchable?: boolean;
143
+ disabled?: boolean;
144
+ loading?: boolean;
145
+ }
146
+ declare const ChipPicker: <T>(props: ChipPickerProps<T>) => React$1.ReactElement;
147
+
77
148
  interface ActionCellAction {
78
149
  icon: React__default.ElementType;
79
150
  label: string;
@@ -264,6 +335,28 @@ interface FactBoxProps extends CardRootProps {
264
335
  }
265
336
  declare const FactBox: React__default.FC<FactBoxProps>;
266
337
 
338
+ interface InlineCreatableListProps<T> {
339
+ items: T[];
340
+ activeIds?: string[];
341
+ onToggle?: (id: string) => void;
342
+ onCreate?: (name: string) => Promise<void>;
343
+ getItemId: (item: T) => string;
344
+ getItemLabel: (item: T) => string;
345
+ getItemColor?: (item: T) => string | undefined;
346
+ /** @default "wrap" */
347
+ variant?: "wrap" | "list";
348
+ /** @default "New item..." */
349
+ createPlaceholder?: string;
350
+ /** @default "New item" */
351
+ createLabel?: string;
352
+ /** @default <Plus size={14} /> */
353
+ createIcon?: React$1.ReactNode;
354
+ /** @default "No items" */
355
+ emptyText?: string;
356
+ disabled?: boolean;
357
+ }
358
+ declare const InlineCreatableList: <T>(props: InlineCreatableListProps<T>) => React$1.ReactElement;
359
+
267
360
  interface LabeledSwitchProps extends SwitchProps {
268
361
  name: string;
269
362
  label: string;
@@ -321,6 +414,61 @@ interface PaginationProps {
321
414
  }
322
415
  declare const Pagination: React__default.FC<PaginationProps>;
323
416
 
417
+ interface SelectableCardProps {
418
+ /** Whether the card is currently selected. */
419
+ selected?: boolean;
420
+ /** Whether the checkbox is always visible (e.g. when any card in the grid is selected). */
421
+ selectionVisible?: boolean;
422
+ /** Called when the checkbox is toggled. When provided, a checkbox is rendered. */
423
+ onSelect?: () => void;
424
+ /** Called when the card body area is clicked (for navigation). */
425
+ onClick?: () => void;
426
+ /** Disables interaction. */
427
+ disabled?: boolean;
428
+ children: React__default.ReactNode;
429
+ }
430
+ interface SelectableCardThumbnailProps {
431
+ /** Height of the thumbnail area. Defaults to "160px". */
432
+ height?: string;
433
+ children: React__default.ReactNode;
434
+ }
435
+ interface SelectableCardBodyProps {
436
+ children: React__default.ReactNode;
437
+ }
438
+ interface SelectableCardFooterProps {
439
+ children: React__default.ReactNode;
440
+ }
441
+ declare const SelectableCard: {
442
+ ({ selected, selectionVisible, onSelect, onClick, disabled, children, }: SelectableCardProps): react_jsx_runtime.JSX.Element;
443
+ displayName: string;
444
+ Thumbnail: {
445
+ ({ height, children, }: SelectableCardThumbnailProps): react_jsx_runtime.JSX.Element;
446
+ displayName: string;
447
+ };
448
+ Body: {
449
+ ({ children }: SelectableCardBodyProps): react_jsx_runtime.JSX.Element;
450
+ displayName: string;
451
+ };
452
+ Footer: {
453
+ ({ children }: SelectableCardFooterProps): react_jsx_runtime.JSX.Element;
454
+ displayName: string;
455
+ };
456
+ };
457
+
458
+ interface SidebarSectionProps {
459
+ label: string;
460
+ children: React__default.ReactNode | ((state: {
461
+ isEditing: boolean;
462
+ setEditing: (v: boolean) => void;
463
+ }) => React__default.ReactNode);
464
+ actionIcon?: React__default.ReactNode;
465
+ onAction?: () => void;
466
+ editContent?: React__default.ReactNode;
467
+ emptyText?: string;
468
+ defaultEditing?: boolean;
469
+ }
470
+ declare const SidebarSection: React__default.FC<SidebarSectionProps>;
471
+
324
472
  declare const StepperProvider: React__default.Provider<{
325
473
  stepsRef: React__default.RefObject<string[]>;
326
474
  activeStep: string;
@@ -513,6 +661,27 @@ type TreeViewRootProps = TreeView.RootProps;
513
661
  type TreeViewBranchProps = TreeView.BranchProps;
514
662
  type TreeViewItemProps = TreeView.ItemProps;
515
663
 
664
+ interface UploadDropZoneProps {
665
+ onFiles: (files: File[]) => void;
666
+ onError?: (error: {
667
+ file: File;
668
+ reason: "size" | "type";
669
+ }) => void;
670
+ accept?: string;
671
+ multiple?: boolean;
672
+ compact?: boolean;
673
+ disabled?: boolean;
674
+ children?: React__default.ReactNode;
675
+ maxSize?: number;
676
+ dragActiveText?: string;
677
+ dropHintText?: string;
678
+ buttonLabel?: string;
679
+ }
680
+ declare const UploadDropZone: {
681
+ ({ onFiles, onError, accept, multiple, compact, disabled, children, maxSize, dragActiveText, dropHintText, buttonLabel, }: UploadDropZoneProps): react_jsx_runtime.JSX.Element;
682
+ displayName: string;
683
+ };
684
+
516
685
  interface WidgetProps {
517
686
  heading: string;
518
687
  subHeading?: string;
@@ -522,4 +691,4 @@ interface WidgetProps {
522
691
  }
523
692
  declare const Widget: React__default.FC<WidgetProps>;
524
693
 
525
- export { ActionCell, type ActionCellAction, type ActionCellProps, BooleanCell, type BooleanCellProps, Card, CardList, CardListData, type CardListDataProps, CardListItem, type CardListItemProps, type CardListMenuItem, type CardListProps, type CardProps, CodeCell, type CodeCellProps, ColorSwatchCell, type ColorSwatchCellProps, CountCell, type CountCellProps, DataTable, type DataTableProps, DateCell, type DateCellProps, type DrawerProps, DrawerRoot, FactBox, type FactBoxAction, type FactBoxProps, LabeledSwitch, type LabeledSwitchProps, Modal, type ModalProps, NumberCell, type NumberCellProps, Pagination, type PaginationProps, SlugCell, type SlugCellProps, StatusBadgeCell, type StatusBadgeCellProps, Stepper, StepperCompleted, StepperContainer, StepperContent, type StepperContentProps, StepperIcon, type StepperIconProps, type StepperProps, StepperProvider, StepperSeparator, type StepperSeparatorProps, StepperStep, type StepperStepProps, StepperStepTitle, StepperSteps, type StepperStepsProps, SwitchCell, type SwitchCellProps, CardList as Table, CardListData as TableData, type CardListDataProps as TableDataProps, CardListItem as TableItem, type CardListItemProps as TableItemProps, type CardListMenuItem as TableMenuItem, type CardListProps as TableProps, TimelineConnector, TimelineContent, TimelineDescription, TimelineIndicator, TimelineItem, type TimelineItemProps, TimelineRoot, type TimelineRootProps, TimelineSeparator, TimelineTitle, TreeViewBranch, TreeViewBranchContent, TreeViewBranchControl, TreeViewBranchIndicator, type TreeViewBranchProps, TreeViewBranchText, TreeViewBranchTrigger, TreeViewItem, TreeViewItemIndicator, type TreeViewItemProps, TreeViewItemText, TreeViewLabel, TreeViewNode, TreeViewRoot, type TreeViewRootProps, TreeViewTree, TruncatedTextCell, type TruncatedTextCellProps, UrlCell, type UrlCellProps, type UseStepProps, type UseStepperProps, type UseStepperReturn, Widget, type WidgetProps, emptyCellValue, pluralize, truncateText, useStep, useStepper, useStepperContext, useStepperNextButton, useStepperPrevButton };
694
+ export { ActionCell, type ActionCellAction, type ActionCellProps, BooleanCell, type BooleanCellProps, BulkActionBar, type BulkActionBarProps, type BulkActionProps, type BulkPopoverActionProps, Card, CardList, CardListData, type CardListDataProps, CardListItem, type CardListItemProps, type CardListMenuItem, type CardListProps, type CardProps, ChipPicker, type ChipPickerProps, CodeCell, type CodeCellProps, ColorSwatchCell, type ColorSwatchCellProps, CountCell, type CountCellProps, DataTable, type DataTableProps, DateCell, type DateCellProps, type DrawerProps, DrawerRoot, FactBox, type FactBoxAction, type FactBoxProps, InlineCreatableList, type InlineCreatableListProps, LabeledSwitch, type LabeledSwitchProps, Modal, type ModalProps, NumberCell, type NumberCellProps, Pagination, type PaginationProps, SelectableCard, type SelectableCardBodyProps, type SelectableCardFooterProps, type SelectableCardProps, type SelectableCardThumbnailProps, SidebarSection, type SidebarSectionProps, SlugCell, type SlugCellProps, StatusBadgeCell, type StatusBadgeCellProps, Stepper, StepperCompleted, StepperContainer, StepperContent, type StepperContentProps, StepperIcon, type StepperIconProps, type StepperProps, StepperProvider, StepperSeparator, type StepperSeparatorProps, StepperStep, type StepperStepProps, StepperStepTitle, StepperSteps, type StepperStepsProps, SwitchCell, type SwitchCellProps, CardList as Table, CardListData as TableData, type CardListDataProps as TableDataProps, CardListItem as TableItem, type CardListItemProps as TableItemProps, type CardListMenuItem as TableMenuItem, type CardListProps as TableProps, TimelineConnector, TimelineContent, TimelineDescription, TimelineIndicator, TimelineItem, type TimelineItemProps, TimelineRoot, type TimelineRootProps, TimelineSeparator, TimelineTitle, TreeViewBranch, TreeViewBranchContent, TreeViewBranchControl, TreeViewBranchIndicator, type TreeViewBranchProps, TreeViewBranchText, TreeViewBranchTrigger, TreeViewItem, TreeViewItemIndicator, type TreeViewItemProps, TreeViewItemText, TreeViewLabel, TreeViewNode, TreeViewRoot, type TreeViewRootProps, TreeViewTree, TruncatedTextCell, type TruncatedTextCellProps, UploadDropZone, type UploadDropZoneProps, UrlCell, type UrlCellProps, type UseStepProps, type UseStepperProps, type UseStepperReturn, Widget, type WidgetProps, emptyCellValue, pluralize, truncateText, useStep, useStepper, useStepperContext, useStepperNextButton, useStepperPrevButton };