@ioca/react 1.5.11 → 1.5.13

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 (47) hide show
  1. package/lib/cjs/components/affix/affix.js +38 -29
  2. package/lib/cjs/components/affix/affix.js.map +1 -1
  3. package/lib/cjs/components/affix/totop.js +1 -1
  4. package/lib/cjs/components/affix/totop.js.map +1 -1
  5. package/lib/cjs/components/editor/editor.js +5 -0
  6. package/lib/cjs/components/editor/editor.js.map +1 -1
  7. package/lib/cjs/components/editor/memtion.js +45 -3
  8. package/lib/cjs/components/editor/memtion.js.map +1 -1
  9. package/lib/cjs/components/list/list.js +3 -3
  10. package/lib/cjs/components/list/list.js.map +1 -1
  11. package/lib/cjs/components/picker/colors/index.js +7 -3
  12. package/lib/cjs/components/picker/colors/index.js.map +1 -1
  13. package/lib/cjs/components/progress/circle.js +3 -3
  14. package/lib/cjs/components/progress/circle.js.map +1 -1
  15. package/lib/cjs/components/tabs/navs.js.map +1 -1
  16. package/lib/cjs/components/tabs/tabs.js.map +1 -1
  17. package/lib/cjs/components/upload/upload.js +8 -2
  18. package/lib/cjs/components/upload/upload.js.map +1 -1
  19. package/lib/css/index.css +1 -1
  20. package/lib/css/index.css.map +1 -1
  21. package/lib/es/components/affix/affix.js +39 -30
  22. package/lib/es/components/affix/affix.js.map +1 -1
  23. package/lib/es/components/affix/totop.js +1 -1
  24. package/lib/es/components/affix/totop.js.map +1 -1
  25. package/lib/es/components/editor/editor.js +5 -0
  26. package/lib/es/components/editor/editor.js.map +1 -1
  27. package/lib/es/components/editor/memtion.js +46 -4
  28. package/lib/es/components/editor/memtion.js.map +1 -1
  29. package/lib/es/components/list/list.js +4 -4
  30. package/lib/es/components/list/list.js.map +1 -1
  31. package/lib/es/components/picker/colors/index.js +6 -3
  32. package/lib/es/components/picker/colors/index.js.map +1 -1
  33. package/lib/es/components/progress/circle.js +3 -3
  34. package/lib/es/components/progress/circle.js.map +1 -1
  35. package/lib/es/components/tabs/navs.js.map +1 -1
  36. package/lib/es/components/tabs/tabs.js.map +1 -1
  37. package/lib/es/components/upload/upload.js +8 -2
  38. package/lib/es/components/upload/upload.js.map +1 -1
  39. package/lib/index.js +106 -44
  40. package/lib/types/components/affix/totop.d.ts +7 -2
  41. package/lib/types/components/affix/type.d.ts +1 -1
  42. package/lib/types/components/list/item.d.ts +6 -0
  43. package/lib/types/components/list/list.d.ts +3 -5
  44. package/lib/types/components/picker/type.d.ts +4 -1
  45. package/lib/types/components/tabs/type.d.ts +1 -1
  46. package/lib/types/components/upload/type.d.ts +1 -0
  47. package/package.json +97 -97
package/lib/index.js CHANGED
@@ -494,53 +494,62 @@ const Icon = (props) => {
494
494
 
495
495
  function ToTop(props) {
496
496
  const { style, className, onClick } = props;
497
- return (jsx(Button, { square: true, className: classNames("i-affix-totop", className), style: { ...style }, onClick: onClick, children: jsx(Icon, { icon: jsx(SkipPreviousRound, {}), rotate: 90 }) }));
497
+ return (jsx(Button, { square: true, className: classNames("i-affix-totop", "i-affix-target", className), style: { ...style }, onClick: onClick, children: jsx(Icon, { icon: jsx(SkipPreviousRound, {}), rotate: 90 }) }));
498
498
  }
499
499
 
500
+ const defaultGetContainer = () => {
501
+ if (typeof window === "undefined")
502
+ return null;
503
+ return window;
504
+ };
500
505
  const Affix = (props) => {
501
- const { position = "fixed", left, top, right, bottom, offset, style, className, children, getContainer = () => {
502
- if (typeof document === "undefined")
503
- return null;
504
- return document.body;
505
- }, } = props;
506
- const [hidden, setHidden] = useState(false);
506
+ const { position = "fixed", left, top, right, bottom, offset, style, className, children, getContainer = defaultGetContainer, } = props;
507
+ const [hidden, setHidden] = useState(() => {
508
+ if (!offset)
509
+ return false;
510
+ if (typeof window === "undefined")
511
+ return false;
512
+ return (window.scrollY ?? 0) < offset;
513
+ });
514
+ const getContainerRef = useRef(getContainer);
515
+ getContainerRef.current = getContainer;
507
516
  const hijackChildren = useMemo(() => {
508
517
  return Children.map(children, (node) => {
509
- if (node.type === ToTop) {
510
- const { onClick } = node.props;
511
- return cloneElement(node, {
512
- key: node.key,
513
- ...node.props,
514
- onClick: (e) => {
515
- const container = getContainer();
516
- onClick?.(e);
517
- container?.scrollTo({
518
- top: 0,
519
- left: 0,
520
- behavior: "smooth",
521
- });
522
- },
523
- });
524
- }
525
- return node;
518
+ if (node.type !== ToTop)
519
+ return node;
520
+ const { onClick } = node.props;
521
+ return cloneElement(node, {
522
+ onClick: (e) => {
523
+ const container = getContainerRef.current();
524
+ onClick?.(e);
525
+ container?.scrollTo({
526
+ top: 0,
527
+ left: 0,
528
+ behavior: "smooth",
529
+ });
530
+ },
531
+ });
526
532
  });
527
- }, [children, getContainer]);
533
+ }, [children]);
528
534
  useEffect(() => {
529
- const container = getContainer();
535
+ const container = getContainerRef.current();
530
536
  if (!offset || !container)
531
537
  return;
538
+ const getScrollTop = () => container instanceof Window
539
+ ? container.scrollY
540
+ : container.scrollTop;
532
541
  const listener = debounce({ delay: 160 }, () => {
533
- const top = container.scrollTop;
534
- setHidden(top < offset);
542
+ setHidden(getScrollTop() < offset);
535
543
  });
536
544
  listener();
537
545
  container.addEventListener("scroll", listener);
538
546
  return () => {
547
+ listener.cancel();
539
548
  container.removeEventListener("scroll", listener);
540
549
  };
541
- }, [offset, getContainer]);
550
+ }, [offset]);
542
551
  return (jsx("div", { className: classNames("i-affix", className, {
543
- "i-affix-hidden": hidden,
552
+ "i-affix-visible": !hidden,
544
553
  }), style: {
545
554
  ...style,
546
555
  position,
@@ -1752,9 +1761,9 @@ const Item$4 = (props) => {
1752
1761
  }), style: { alignItems: align, ...style }, ...restProps, children: [label !== undefined && (jsx("span", { className: 'i-list-item-label', children: label })), children] }));
1753
1762
  };
1754
1763
 
1755
- const List$1 = (props) => {
1764
+ const List$1 = forwardRef((props, ref) => {
1756
1765
  const { label, type, border, className, children, ...restProps } = props;
1757
- return (jsx("ul", { className: classNames("i-list", className), ...restProps, children: Children.map(children, (node, i) => {
1766
+ return (jsx("ul", { ref: ref, className: classNames("i-list", className), ...restProps, children: Children.map(children, (node, i) => {
1758
1767
  const renderLabel = typeof label === "function" ? label(i) : label;
1759
1768
  const { type, props: nodeProps } = node;
1760
1769
  if (type === Item$4) {
@@ -1767,7 +1776,7 @@ const List$1 = (props) => {
1767
1776
  }
1768
1777
  return node;
1769
1778
  }) }));
1770
- };
1779
+ });
1771
1780
  List$1.Item = Item$4;
1772
1781
 
1773
1782
  const Content$2 = forwardRef((props, ref) => {
@@ -2605,15 +2614,56 @@ const removeAdjacentMemtionTag = (editor, key) => {
2605
2614
  editor.focus();
2606
2615
  return true;
2607
2616
  };
2617
+ const makeRectSource = (rect) => {
2618
+ const { left, top, width, height } = rect;
2619
+ return {
2620
+ offsetParent: null,
2621
+ offsetLeft: left,
2622
+ offsetTop: top,
2623
+ getBoundingClientRect: () => ({
2624
+ left,
2625
+ top,
2626
+ right: left + width,
2627
+ bottom: top + height,
2628
+ width,
2629
+ height,
2630
+ x: left,
2631
+ y: top,
2632
+ toJSON: () => ({}),
2633
+ }),
2634
+ };
2635
+ };
2608
2636
  const Memtion = (props) => {
2609
2637
  const { visible, rect, options, activeIndex, onActiveChange, onSelect } = props;
2638
+ const containerRef = useRef(null);
2639
+ const [pos, setPos] = useState({ left: 0, top: 0 });
2640
+ const [ready, setReady] = useState(false);
2641
+ useLayoutEffect(() => {
2642
+ if (!visible || !rect || !options?.length) {
2643
+ setReady(false);
2644
+ return;
2645
+ }
2646
+ const el = containerRef.current;
2647
+ if (!el)
2648
+ return;
2649
+ const [left, top] = getPosition(makeRectSource(rect), el, {
2650
+ position: "bottom",
2651
+ gap: 4,
2652
+ offset: 0,
2653
+ align: "start",
2654
+ refWindow: true,
2655
+ });
2656
+ setPos({ left, top });
2657
+ setReady(true);
2658
+ }, [visible, rect, options]);
2610
2659
  if (!visible || !rect || !options?.length) {
2611
2660
  return null;
2612
2661
  }
2613
- const content = (jsx(List$1, { className: "i-editor-memtion", type: "option", style: {
2662
+ const content = (jsx(List$1, { ref: containerRef, className: "i-editor-memtion", type: "option", style: {
2614
2663
  position: "fixed",
2615
- top: rect.bottom,
2616
- left: rect.left,
2664
+ left: pos.left,
2665
+ top: pos.top,
2666
+ opacity: ready ? 1 : 0,
2617
2667
  }, children: options.map((option, i) => (jsx(List$1.Item, { type: "option", active: i === activeIndex, onMouseDown: (e) => e.preventDefault(), onMouseEnter: () => onActiveChange?.(i), onClick: () => onSelect?.(option), children: option.label }, `${option.value}-${i}`))) }));
2618
2668
  if (typeof document === "undefined") {
2619
2669
  return content;
@@ -2732,6 +2782,8 @@ const Editor = (props) => {
2732
2782
  };
2733
2783
  const handleKeyDown = (e) => {
2734
2784
  onKeyDown?.(e);
2785
+ if (e.defaultPrevented)
2786
+ return;
2735
2787
  if (!isPlaintextMode &&
2736
2788
  (e.key === "Backspace" || e.key === "Delete") &&
2737
2789
  removeAdjacentMemtionTag(editorRef.current, e.key)) {
@@ -2772,6 +2824,9 @@ const Editor = (props) => {
2772
2824
  exec(isRichMode ? "insertHTML" : "insertText", false, isRichMode ? "&#09;" : "\t");
2773
2825
  break;
2774
2826
  case "Enter":
2827
+ if (e.shiftKey) {
2828
+ break;
2829
+ }
2775
2830
  if (!onEnter)
2776
2831
  break;
2777
2832
  e.preventDefault();
@@ -3392,9 +3447,9 @@ Text.HighLight = HighLight;
3392
3447
 
3393
3448
  function Circle(props) {
3394
3449
  const { value, circleSize = 40, lineWidth = 8 } = props;
3395
- return (jsxs("div", { className: 'i-progress-circle', children: [jsxs("svg", { width: circleSize, height: circleSize, children: [jsx("circle", { cx: circleSize / 2, cy: circleSize / 2, r: circleSize / 2 - lineWidth / 2, fill: 'none', stroke: 'var(--background-opacity-2)', strokeWidth: lineWidth }), jsx("circle", { cx: circleSize / 2, cy: circleSize / 2, r: circleSize / 2 - lineWidth / 2, fill: 'none', stroke: 'var(--color-main)', strokeWidth: lineWidth, strokeDasharray: 100, pathLength: 100, className: 'i-progress-circle-path', strokeLinecap: 'round', style: {
3396
- strokeDashoffset: `calc(100 - ${value})`,
3397
- } })] }), jsxs("span", { className: 'i-progress-circle-value', children: [jsx("span", { children: value }), jsx(Text, { size: '.81em', className: 'color-7', children: "%" })] })] }));
3450
+ return (jsxs("div", { className: "i-progress-circle", children: [jsxs("svg", { width: circleSize, height: circleSize, children: [jsx("circle", { cx: circleSize / 2, cy: circleSize / 2, r: circleSize / 2 - lineWidth / 2, fill: "none", stroke: "var(--color-main-0)", strokeWidth: lineWidth }), jsx("circle", { cx: circleSize / 2, cy: circleSize / 2, r: circleSize / 2 - lineWidth / 2, fill: "none", stroke: "var(--color-main)", strokeWidth: lineWidth, strokeDasharray: 100, pathLength: 100, className: "i-progress-circle-path", strokeLinecap: "round", style: {
3451
+ strokeDashoffset: 100 - (value ?? 0),
3452
+ } })] }), jsxs("span", { className: "i-progress-circle-value", children: [jsx("span", { children: value }), jsx(Text, { size: ".81em", className: "color-5", children: "%" })] })] }));
3398
3453
  }
3399
3454
 
3400
3455
  const Line = (props) => {
@@ -4615,7 +4670,7 @@ const Handle = (props) => {
4615
4670
  };
4616
4671
 
4617
4672
  function ColorPicker(props) {
4618
- const { value, type = "HEX", disabledAlpha, children, usePanel, handle = "both", placeholder = "Colors", popupProps, onChange, label, required, ...restProps } = props;
4673
+ const { value, type = "HEX", disabledAlpha, children, usePanel, handle = "both", placeholder = "Colors", popupProps, onChange, label, required, className, style, ...restProps } = props;
4619
4674
  const [colorType, setColorType] = useState(type);
4620
4675
  const [colorValue, setColorValue] = useState(value);
4621
4676
  const [syncValue, setSyncValue] = useState(value);
@@ -4659,9 +4714,11 @@ function ColorPicker(props) {
4659
4714
  if (usePanel) {
4660
4715
  return (jsx(InputContainer, { label: label, required: required, children: jsx(ColorsPanel, { ...restProps, value: value, onChange: onChange }) }));
4661
4716
  }
4662
- return (jsx(InputContainer, { label: label, required: required, children: jsx(Popup, { trigger: "click", touchable: true, position: "bottom", ...popupProps, visible: visible, content: jsx(ColorsPanel, { ...restProps, value: syncValue, disabledAlpha: disabledAlpha, panelRender: (panel) => {
4717
+ return (jsx(InputContainer, { label: label, required: required, className: classNames("i-colorpicker", className), style: style, children: jsx(Popup, { trigger: "click", touchable: true, position: "bottom", ...popupProps, visible: visible, content: jsx(ColorsPanel, { ...restProps, value: syncValue, disabledAlpha: disabledAlpha, panelRender: (panel) => {
4663
4718
  return (jsxs(Fragment, { children: [panel, jsx(Footer, { value: colorValue, type: colorType, onTypeChange: handleTypeChange, onChange: handleValueChange, onOk: handleOk })] }));
4664
- }, onChange: handleChange, onChangeComplete: handleComplete }), onVisibleChange: handleVisibleChange, children: children ?? (jsx(Handle, { color: value, handle: handle, placeholder: placeholder })) }) }));
4719
+ }, onChange: handleChange, onChangeComplete: handleComplete }), onVisibleChange: handleVisibleChange, children: typeof children === "function"
4720
+ ? children({ type: colorType, value: colorValue })
4721
+ : (children ?? (jsx(Handle, { color: value, handle: handle, placeholder: placeholder }))) }) }));
4665
4722
  }
4666
4723
 
4667
4724
  const Dates = (props) => {
@@ -6094,7 +6151,7 @@ const normalizeFiles = (files) => (files ?? []).map((item) => {
6094
6151
  };
6095
6152
  });
6096
6153
  const Upload = (props) => {
6097
- const { label, labelInline, value, files, placeholder, status = "normal", message, className, style, children, droppable, dropbox, defaultButtonProps, mode = "default", cardSize = "3.2em", disabled, sortable, limit = props.multiple ? Infinity : 1, multiple, renderItem, shouldUpload = () => true, uploader, onChange, onFilesChange, onUpload, onRemove, ...restProps } = props;
6154
+ const { label, labelInline, value, files, placeholder, status = "normal", message, className, style, children, droppable, dropbox, getDropboxContainer, defaultButtonProps, mode = "default", cardSize = "3.2em", disabled, sortable, limit = props.multiple ? Infinity : 1, multiple, renderItem, shouldUpload = () => true, uploader, onChange, onFilesChange, onUpload, onRemove, ...restProps } = props;
6098
6155
  const [internalFileList, setInternalFileList] = useState([]);
6099
6156
  const isControlled = useMemo(() => value !== undefined || files !== undefined, [value, files]);
6100
6157
  const fileList = isControlled
@@ -6204,7 +6261,12 @@ const Upload = (props) => {
6204
6261
  return node;
6205
6262
  return jsx(SortableItem, { children: node }, key);
6206
6263
  }) }), uploadMessage && (jsx("span", { className: "i-upload-message", children: uploadMessage })), fileList.length < limit &&
6207
- (droppable ? (jsx(Dropbox, { multiple: multiple, accept: restProps.accept, disabled: disabled, onChange: handleChange, onDropFiles: handleDropFiles, children: dropbox })) : (jsxs("label", { children: [jsx("input", { ...restProps, disabled: disabled, ref: inputRef, type: "file", className: "i-input-file-hidden", multiple: multiple, onChange: handleChange }), trigger] })))] }) }));
6264
+ (droppable ? ((() => {
6265
+ const node = (jsx(Dropbox, { multiple: multiple, accept: restProps.accept, disabled: disabled, onChange: handleChange, onDropFiles: handleDropFiles, children: dropbox }));
6266
+ return getDropboxContainer
6267
+ ? createPortal(node, getDropboxContainer())
6268
+ : node;
6269
+ })()) : (jsxs("label", { children: [jsx("input", { ...restProps, disabled: disabled, ref: inputRef, type: "file", className: "i-input-file-hidden", multiple: multiple, onChange: handleChange }), trigger] })))] }) }));
6208
6270
  };
6209
6271
 
6210
6272
  const stores = new Map();
@@ -1,6 +1,11 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { IAffix } from './type.js';
2
+ import { CSSProperties, MouseEventHandler } from 'react';
3
3
 
4
- declare function ToTop(props: IAffix): react_jsx_runtime.JSX.Element;
4
+ interface IToTopProps {
5
+ style?: CSSProperties;
6
+ className?: string;
7
+ onClick?: MouseEventHandler<HTMLElement>;
8
+ }
9
+ declare function ToTop(props: IToTopProps): react_jsx_runtime.JSX.Element;
5
10
 
6
11
  export { ToTop as default };
@@ -7,7 +7,7 @@ interface IAffix extends HTMLAttributes<HTMLElement> {
7
7
  right?: string | number;
8
8
  bottom?: string | number;
9
9
  offset?: number;
10
- getContainer?: () => HTMLElement | null;
10
+ getContainer?: () => HTMLElement | Window | null;
11
11
  }
12
12
 
13
13
  export type { IAffix };
@@ -0,0 +1,6 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { IListItem } from './type.js';
3
+
4
+ declare const Item: (props: IListItem) => react_jsx_runtime.JSX.Element;
5
+
6
+ export { Item as default };
@@ -1,9 +1,7 @@
1
- import { IList, IListItem } from './type.js';
2
- import * as react_jsx_runtime from 'react/jsx-runtime';
1
+ import Item from './item.js';
3
2
 
4
- declare const List: {
5
- (props: IList): react_jsx_runtime.JSX.Element;
6
- Item: (props: IListItem) => react_jsx_runtime.JSX.Element;
3
+ declare const List: typeof List & {
4
+ Item: typeof Item;
7
5
  };
8
6
 
9
7
  export { List as default };
@@ -32,7 +32,10 @@ interface IColorPicker extends Omit<ColorPickerProps, "value" | "onChange"> {
32
32
  label?: ReactNode;
33
33
  required?: boolean;
34
34
  type?: "HEX" | "RGB" | "HSB";
35
- children?: ReactNode;
35
+ children?: ReactNode | ((params: {
36
+ type: string;
37
+ value: any;
38
+ }) => ReactNode);
36
39
  popupProps?: IPopup;
37
40
  usePanel?: boolean;
38
41
  handle?: "text" | "square" | "both";
@@ -34,7 +34,7 @@ interface RefTabs {
34
34
  open: (key: string) => void;
35
35
  close: (key: string) => void;
36
36
  add: (tab: ITabItem, position?: number) => void;
37
- navs: RefObject<HTMLDivElement>;
37
+ navs: RefObject<HTMLDivElement | null>;
38
38
  }
39
39
  interface CompositionTabs extends ForwardRefExoticComponent<ITabs> {
40
40
  Item: typeof Item;
@@ -12,6 +12,7 @@ interface IUpload extends Omit<BaseInput, "ref">, Omit<InputHTMLAttributes<HTMLI
12
12
  mode?: "default" | "card";
13
13
  droppable?: boolean;
14
14
  dropbox?: (dragging?: boolean) => ReactNode;
15
+ getDropboxContainer?: () => HTMLElement;
15
16
  cardSize?: string;
16
17
  defaultButtonProps?: IButton;
17
18
  shouldUpload?: (file: IFile) => boolean;
package/package.json CHANGED
@@ -1,99 +1,99 @@
1
1
  {
2
- "name": "@ioca/react",
3
- "version": "1.5.11",
4
- "type": "module",
5
- "scripts": {
6
- "dev": "vite",
7
- "build": "tsc && vite build",
8
- "preview": "vite preview",
9
- "make": "node templates/index.js",
10
- "lib": "rimraf lib && npx rollup -c"
11
- },
12
- "dependencies": {
13
- "@rc-component/color-picker": "^2.0.1",
14
- "@ricons/material": "^0.12.0",
15
- "classnames": "^2.5.1",
16
- "dayjs": "^1.11.13",
17
- "highlight-words-core": "^1.2.3",
18
- "pubsub-js": "^1.9.5",
19
- "radash": "^12.1.0",
20
- "react": ">=16.8.0",
21
- "react-dom": ">=16.8.0",
22
- "react-easy-sort": "^1.6.0",
23
- "react-router": "^7.1.1",
24
- "react-window": "^2.2.7",
25
- "xss": "^1.0.15"
26
- },
27
- "devDependencies": {
28
- "@rollup/plugin-commonjs": "^28.0.3",
29
- "@rollup/plugin-node-resolve": "^15.3.0",
30
- "@rollup/plugin-terser": "^0.4.4",
31
- "@rollup/plugin-typescript": "^12.1.1",
32
- "@types/mockjs": "^1.0.10",
33
- "@types/node": "^22.10.1",
34
- "@types/pubsub-js": "^1.8.5",
35
- "@types/react": "^19.0.4",
36
- "@types/react-dom": "^19.2.3",
37
- "@vitejs/plugin-react": "^6.0.1",
38
- "chalk": "^5.4.1",
39
- "mockjs": "^1.1.0",
40
- "react-syntax-highlighter": "^15.6.1",
41
- "rimraf": "^6.0.1",
42
- "rollup": "^4.59.0",
43
- "rollup-plugin-dts": "^6.1.1",
44
- "rollup-plugin-peer-deps-external": "^2.2.4",
45
- "rollup-plugin-postcss": "^4.0.2",
46
- "typescript": "^5.7.2",
47
- "vite": "^8.0.0",
48
- "vite-plugin-dynamic-import": "^1.6.0"
49
- },
50
- "peerDependencies": {
51
- "react": ">=16.8.0",
52
- "react-dom": ">=16.8.0"
53
- },
54
- "main": "lib/cjs/index.js",
55
- "module": "lib/es/index.js",
56
- "types": "lib/types/index.d.ts",
57
- "exports": {
58
- ".": {
59
- "types": "./lib/types/index.d.ts",
60
- "import": "./lib/es/index.js",
61
- "require": "./lib/cjs/index.js"
62
- },
63
- "./index.css": "./lib/css/index.css",
64
- "./*": {
65
- "types": "./lib/types/*.d.ts",
66
- "import": "./lib/es/*.js",
67
- "require": "./lib/cjs/*.js"
68
- }
69
- },
70
- "files": [
71
- "lib"
72
- ],
73
- "publishConfig": {
74
- "access": "public"
75
- },
76
- "license": "MIT",
77
- "description": "ioca react ui components",
78
- "directories": {
79
- "doc": "docs"
80
- },
81
- "repository": {
82
- "type": "git",
83
- "url": "git+https://github.com/MunGaaKei/ioca-react.git"
84
- },
85
- "keywords": [
86
- "ioca",
87
- "react ui",
88
- "components"
89
- ],
90
- "author": "iannman",
91
- "bugs": {
92
- "url": "https://github.com/MunGaaKei/ioca-react/issues"
93
- },
94
- "homepage": "https://github.com/MunGaaKei/ioca-react#readme",
95
- "sideEffects": [
96
- "*.css"
97
- ],
98
- "packageManager": "pnpm@10.32.1"
2
+ "name": "@ioca/react",
3
+ "version": "1.5.13",
4
+ "type": "module",
5
+ "scripts": {
6
+ "dev": "vite",
7
+ "build": "tsc && vite build",
8
+ "preview": "vite preview",
9
+ "make": "node templates/index.js",
10
+ "lib": "rimraf lib && npx rollup -c"
11
+ },
12
+ "dependencies": {
13
+ "@rc-component/color-picker": "^2.0.1",
14
+ "@ricons/material": "^0.12.0",
15
+ "classnames": "^2.5.1",
16
+ "dayjs": "^1.11.13",
17
+ "highlight-words-core": "^1.2.3",
18
+ "pubsub-js": "^1.9.5",
19
+ "radash": "^12.1.0",
20
+ "react": ">=16.8.0",
21
+ "react-dom": ">=16.8.0",
22
+ "react-easy-sort": "^1.6.0",
23
+ "react-router": "^7.1.1",
24
+ "react-window": "^2.2.7",
25
+ "xss": "^1.0.15"
26
+ },
27
+ "devDependencies": {
28
+ "@rollup/plugin-commonjs": "^28.0.3",
29
+ "@rollup/plugin-node-resolve": "^15.3.0",
30
+ "@rollup/plugin-terser": "^0.4.4",
31
+ "@rollup/plugin-typescript": "^12.1.1",
32
+ "@types/mockjs": "^1.0.10",
33
+ "@types/node": "^22.10.1",
34
+ "@types/pubsub-js": "^1.8.5",
35
+ "@types/react": "^19.0.4",
36
+ "@types/react-dom": "^19.2.3",
37
+ "@vitejs/plugin-react": "^6.0.1",
38
+ "chalk": "^5.4.1",
39
+ "mockjs": "^1.1.0",
40
+ "react-syntax-highlighter": "^15.6.1",
41
+ "rimraf": "^6.0.1",
42
+ "rollup": "^4.59.0",
43
+ "rollup-plugin-dts": "^6.1.1",
44
+ "rollup-plugin-peer-deps-external": "^2.2.4",
45
+ "rollup-plugin-postcss": "^4.0.2",
46
+ "typescript": "^5.7.2",
47
+ "vite": "^8.0.0",
48
+ "vite-plugin-dynamic-import": "^1.6.0"
49
+ },
50
+ "peerDependencies": {
51
+ "react": ">=16.8.0",
52
+ "react-dom": ">=16.8.0"
53
+ },
54
+ "main": "lib/cjs/index.js",
55
+ "module": "lib/es/index.js",
56
+ "types": "lib/types/index.d.ts",
57
+ "exports": {
58
+ ".": {
59
+ "types": "./lib/types/index.d.ts",
60
+ "import": "./lib/es/index.js",
61
+ "require": "./lib/cjs/index.js"
62
+ },
63
+ "./index.css": "./lib/css/index.css",
64
+ "./*": {
65
+ "types": "./lib/types/*.d.ts",
66
+ "import": "./lib/es/*.js",
67
+ "require": "./lib/cjs/*.js"
68
+ }
69
+ },
70
+ "files": [
71
+ "lib"
72
+ ],
73
+ "publishConfig": {
74
+ "access": "public"
75
+ },
76
+ "license": "MIT",
77
+ "description": "ioca react ui components",
78
+ "directories": {
79
+ "doc": "docs"
80
+ },
81
+ "repository": {
82
+ "type": "git",
83
+ "url": "git+https://github.com/MunGaaKei/ioca-react.git"
84
+ },
85
+ "keywords": [
86
+ "ioca",
87
+ "react ui",
88
+ "components"
89
+ ],
90
+ "author": "iannman",
91
+ "bugs": {
92
+ "url": "https://github.com/MunGaaKei/ioca-react/issues"
93
+ },
94
+ "homepage": "https://github.com/MunGaaKei/ioca-react#readme",
95
+ "sideEffects": [
96
+ "*.css"
97
+ ],
98
+ "packageManager": "pnpm@10.32.1"
99
99
  }