onekijs-ui 0.20.7 → 0.20.8

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.
@@ -80,11 +80,11 @@ export declare const getIconDivProps: (props: IconProps) => {
80
80
  results?: number | undefined;
81
81
  security?: string | undefined;
82
82
  unselectable?: "on" | "off" | undefined;
83
- inputMode?: "search" | "text" | "none" | "email" | "tel" | "url" | "numeric" | "decimal" | undefined;
83
+ inputMode?: "search" | "text" | "email" | "tel" | "url" | "none" | "numeric" | "decimal" | undefined;
84
84
  is?: string | undefined;
85
85
  'aria-activedescendant'?: string | undefined;
86
86
  'aria-atomic'?: (boolean | "true" | "false") | undefined;
87
- 'aria-autocomplete'?: "none" | "inline" | "both" | "list" | undefined;
87
+ 'aria-autocomplete'?: "list" | "none" | "inline" | "both" | undefined;
88
88
  'aria-braillelabel'?: string | undefined;
89
89
  'aria-brailleroledescription'?: string | undefined;
90
90
  'aria-busy'?: (boolean | "true" | "false") | undefined;
@@ -104,7 +104,7 @@ export declare const getIconDivProps: (props: IconProps) => {
104
104
  'aria-expanded'?: (boolean | "true" | "false") | undefined;
105
105
  'aria-flowto'?: string | undefined;
106
106
  'aria-grabbed'?: (boolean | "true" | "false") | undefined;
107
- 'aria-haspopup'?: boolean | "dialog" | "menu" | "listbox" | "grid" | "true" | "false" | "tree" | undefined;
107
+ 'aria-haspopup'?: boolean | "dialog" | "menu" | "true" | "false" | "grid" | "listbox" | "tree" | undefined;
108
108
  'aria-hidden'?: (boolean | "true" | "false") | undefined;
109
109
  'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
110
110
  'aria-keyshortcuts'?: string | undefined;
@@ -5,15 +5,15 @@ declare class SelectService<T = any, I extends SelectItem<T> = SelectItem<T>, S
5
5
  protected lastCheckQuery: Query | undefined;
6
6
  get defaultValue(): T | T[] | null | undefined;
7
7
  get defaultValueLoading(): boolean | undefined;
8
- check(): Generator<void | import("redux-saga/effects").AllEffect<import("redux-saga/effects").CallEffect<Generator<I[] | Generator<void | import("redux-saga/effects").CancelEffect | import("redux-saga/effects").ForkEffect<Generator<void | import("redux-saga/effects").CallEffect<true>, void, unknown>> | CollectionFetcherResult<T> | Promise<CollectionFetcherResult<T> | undefined>, CollectionFetcherResult<T>, (import("redux-saga").Task<any> | null) & CollectionFetcherResult<T> & (CollectionFetcherResult<T> | undefined)>, I | undefined, I[] & CollectionFetcherResult<T>>>> | import("redux-saga/effects").AllEffect<Generator<I[] | Generator<void | import("redux-saga/effects").CancelEffect | import("redux-saga/effects").ForkEffect<Generator<void | import("redux-saga/effects").CallEffect<true>, void, unknown>> | CollectionFetcherResult<T> | Promise<CollectionFetcherResult<T> | undefined>, CollectionFetcherResult<T>, (import("redux-saga").Task<any> | null) & CollectionFetcherResult<T> & (CollectionFetcherResult<T> | undefined)>, I | undefined, I[] & CollectionFetcherResult<T>>> | import("redux-saga/effects").CallEffect<void>, void, (I | undefined)[]>;
8
+ check(): Generator<void | import("redux-saga/effects").AllEffect<import("redux-saga/effects").CallEffect<Generator<I[] | Generator<void | import("redux-saga/effects").ForkEffect<Generator<void | import("redux-saga/effects").CallEffect<true>, void, unknown>> | import("redux-saga/effects").CancelEffect | CollectionFetcherResult<T> | Promise<CollectionFetcherResult<T> | undefined>, CollectionFetcherResult<T>, (import("redux-saga").Task<any> | null) & CollectionFetcherResult<T> & (CollectionFetcherResult<T> | undefined)>, I | undefined, I[] & CollectionFetcherResult<T>>>> | import("redux-saga/effects").AllEffect<Generator<I[] | Generator<void | import("redux-saga/effects").ForkEffect<Generator<void | import("redux-saga/effects").CallEffect<true>, void, unknown>> | import("redux-saga/effects").CancelEffect | CollectionFetcherResult<T> | Promise<CollectionFetcherResult<T> | undefined>, CollectionFetcherResult<T>, (import("redux-saga").Task<any> | null) & CollectionFetcherResult<T> & (CollectionFetcherResult<T> | undefined)>, I | undefined, I[] & CollectionFetcherResult<T>>> | import("redux-saga/effects").CallEffect<void>, void, (I | undefined)[]>;
9
9
  setData(data: T[], query?: Query): void;
10
- setDefaultValue(value: T | T[] | null | undefined): Generator<void | Generator<void | import("redux-saga/effects").AllEffect<import("redux-saga/effects").CallEffect<Generator<I[] | Generator<void | import("redux-saga/effects").CancelEffect | import("redux-saga/effects").ForkEffect<Generator<void | import("redux-saga/effects").CallEffect<true>, void, unknown>> | CollectionFetcherResult<T> | Promise<CollectionFetcherResult<T> | undefined>, CollectionFetcherResult<T>, (import("redux-saga").Task<any> | null) & CollectionFetcherResult<T> & (CollectionFetcherResult<T> | undefined)>, I | undefined, I[] & CollectionFetcherResult<T>>>> | import("redux-saga/effects").AllEffect<Generator<I[] | Generator<void | import("redux-saga/effects").CancelEffect | import("redux-saga/effects").ForkEffect<Generator<void | import("redux-saga/effects").CallEffect<true>, void, unknown>> | CollectionFetcherResult<T> | Promise<CollectionFetcherResult<T> | undefined>, CollectionFetcherResult<T>, (import("redux-saga").Task<any> | null) & CollectionFetcherResult<T> & (CollectionFetcherResult<T> | undefined)>, I | undefined, I[] & CollectionFetcherResult<T>>> | import("redux-saga/effects").CallEffect<void>, void, (I | undefined)[]>, void, unknown>;
10
+ setDefaultValue(value: T | T[] | null | undefined): Generator<void | Generator<void | import("redux-saga/effects").AllEffect<import("redux-saga/effects").CallEffect<Generator<I[] | Generator<void | import("redux-saga/effects").ForkEffect<Generator<void | import("redux-saga/effects").CallEffect<true>, void, unknown>> | import("redux-saga/effects").CancelEffect | CollectionFetcherResult<T> | Promise<CollectionFetcherResult<T> | undefined>, CollectionFetcherResult<T>, (import("redux-saga").Task<any> | null) & CollectionFetcherResult<T> & (CollectionFetcherResult<T> | undefined)>, I | undefined, I[] & CollectionFetcherResult<T>>>> | import("redux-saga/effects").AllEffect<Generator<I[] | Generator<void | import("redux-saga/effects").ForkEffect<Generator<void | import("redux-saga/effects").CallEffect<true>, void, unknown>> | import("redux-saga/effects").CancelEffect | CollectionFetcherResult<T> | Promise<CollectionFetcherResult<T> | undefined>, CollectionFetcherResult<T>, (import("redux-saga").Task<any> | null) & CollectionFetcherResult<T> & (CollectionFetcherResult<T> | undefined)>, I | undefined, I[] & CollectionFetcherResult<T>>> | import("redux-saga/effects").CallEffect<void>, void, (I | undefined)[]>, void, unknown>;
11
11
  setDefaultValueLoading(loading: boolean): void;
12
12
  setItemWidth(_item: I, value: number): void;
13
13
  setValue(value: null | T | T[]): void;
14
14
  setUrl(url: string, query?: Query): void;
15
15
  _buildItem(data: T | null | undefined, adaptee: unknown, context?: AnonymousObject): I;
16
- _filterItem(item: I | undefined, query: Query, valid: boolean): Generator<I[] | Generator<void | import("redux-saga/effects").CancelEffect | import("redux-saga/effects").ForkEffect<Generator<void | import("redux-saga/effects").CallEffect<true>, void, unknown>> | CollectionFetcherResult<T> | Promise<CollectionFetcherResult<T> | undefined>, CollectionFetcherResult<T>, (import("redux-saga").Task<any> | null) & CollectionFetcherResult<T> & (CollectionFetcherResult<T> | undefined)>, I | undefined, I[] & CollectionFetcherResult<T>>;
16
+ _filterItem(item: I | undefined, query: Query, valid: boolean): Generator<I[] | Generator<void | import("redux-saga/effects").ForkEffect<Generator<void | import("redux-saga/effects").CallEffect<true>, void, unknown>> | import("redux-saga/effects").CancelEffect | CollectionFetcherResult<T> | Promise<CollectionFetcherResult<T> | undefined>, CollectionFetcherResult<T>, (import("redux-saga").Task<any> | null) & CollectionFetcherResult<T> & (CollectionFetcherResult<T> | undefined)>, I | undefined, I[] & CollectionFetcherResult<T>>;
17
17
  _compareItem(a: I | undefined, b: I | undefined): boolean;
18
18
  _setDefaultValue(value: T | T[] | null | undefined): void;
19
19
  _setValidDefaultValue(value: T | T[] | null): void;
package/dist/index.js CHANGED
@@ -937,6 +937,7 @@ const AccordionPanel = ({ title, initialActive, initialExpand, children, Compone
937
937
 
938
938
  const ButtonComponent = React.forwardRef((props, ref) => {
939
939
  const { kind, pattern, className, loading, IconComponent, onClick, type = 'button', ...buttonProps } = props;
940
+ const buttonRef = React.useRef(null);
940
941
  let classNames = addClassname('o-button', className);
941
942
  if (loading) {
942
943
  classNames = addClassname('o-button-loading', classNames);
@@ -944,10 +945,20 @@ const ButtonComponent = React.forwardRef((props, ref) => {
944
945
  if (props.disabled) {
945
946
  classNames = addClassname('o-button-disabled', classNames);
946
947
  }
947
- return (React.createElement("span", { className: classNames, onClick: onClick, ref: ref },
948
+ const handleClick = (e) => {
949
+ if (!onClick) {
950
+ if (buttonRef.current) {
951
+ buttonRef.current.click();
952
+ }
953
+ }
954
+ else {
955
+ onClick(e);
956
+ }
957
+ };
958
+ return (React.createElement("span", { className: classNames, onClick: handleClick, ref: ref },
948
959
  loading && React.createElement(LoadingIcon, { onClick: undefined, color: "currentColor" }),
949
960
  !loading && IconComponent && React.createElement(IconComponent, { ...props, onClick: undefined, className: "o-button-icon" }),
950
- React.createElement("button", { ...buttonProps, type: type, className: "o-button-content" })));
961
+ React.createElement("button", { ref: buttonRef, ...buttonProps, type: type, className: "o-button-content" })));
951
962
  });
952
963
  ButtonComponent.displayName = 'Button';
953
964
 
@@ -12166,7 +12177,7 @@ const baseTheme = (customTheme = {}) => {
12166
12177
  '4xl': '2.25rem',
12167
12178
  '5xl': '3rem',
12168
12179
  '6xl': '4rem',
12169
- default: '.0875rem',
12180
+ default: '.875rem',
12170
12181
  },
12171
12182
  spacings: {
12172
12183
  xs: '-0.05em',