@npm-questionpro/wick-ui-lib 2.0.0-next.16 → 2.0.0-next.18

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.
@@ -14,11 +14,13 @@ export type IWuButtonProps = Button.Props & {
14
14
  /** @deprecated use shape="rounded" instead */
15
15
  | 'rounded';
16
16
  /** Touch target and density. @default 'md' */
17
- size?: 'sm' | 'md' | 'mobile' | 'icon';
17
+ size?: 'sm' | 'md' | 'mobile';
18
+ /** Icon-only button. @default 'false' */
19
+ iconOnly?: boolean;
18
20
  /** Semantic color palette. @default 'primary' */
19
- color?: 'primary' | 'error' | 'upgrade';
21
+ color?: 'primary' | 'error' | 'upgrade' | 'neutral';
20
22
  /** Border-radius style. */
21
- shape?: 'rounded' | 'square';
23
+ shape?: 'rounded' | 'sharp' | 'default';
22
24
  /** Shows spinner and blocks interaction. Sets `aria-busy`. */
23
25
  loading?: boolean;
24
26
  /** Adds elevation shadow. Use for FAB-style buttons. */
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { IWuSegmentOption } from './types/IWuSegmentOption';
3
+ export interface IWuSegmentProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'> {
4
+ options: IWuSegmentOption[];
5
+ value?: string;
6
+ defaultValue?: string;
7
+ onChange?: (value: string) => void;
8
+ size?: 'sm' | 'md' | 'lg';
9
+ variant?: 'text' | 'icon';
10
+ disabled?: boolean;
11
+ dir?: 'ltr' | 'rtl';
12
+ }
13
+ export declare const WuSegment: React.ForwardRefExoticComponent<IWuSegmentProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,3 @@
1
+ export type { IWuSegmentOption } from './types/IWuSegmentOption';
2
+ export { WuSegment } from './WuSegment';
3
+ export type { IWuSegmentProps } from './WuSegment';
@@ -0,0 +1,8 @@
1
+ import { ReactNode } from 'react';
2
+ export interface IWuSegmentOption {
3
+ value: string;
4
+ label?: string;
5
+ icon?: ReactNode;
6
+ children?: ReactNode;
7
+ disabled?: boolean;
8
+ }
package/dist/index.d.ts CHANGED
@@ -33,6 +33,7 @@ export * from './components/pagination';
33
33
  export * from './components/popover';
34
34
  export * from './components/radio';
35
35
  export * from './components/scrollArea';
36
+ export * from './components/segment';
36
37
  export * from './components/select';
37
38
  export * from './components/sidebar';
38
39
  export * from './components/spotlight';