@geektech/one 0.3.1 → 0.3.3
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/README-zh.md +8 -7
- package/README.md +8 -7
- package/dist/cascader/OneCascader.d.ts +47 -0
- package/dist/cascader/index.d.ts +2 -0
- package/dist/categories.d.ts +5 -5
- package/dist/descriptions/OneDescriptions.d.ts +20 -0
- package/dist/descriptions/index.d.ts +2 -0
- package/dist/divider/OneDivider.d.ts +16 -0
- package/dist/divider/index.d.ts +2 -0
- package/dist/dropdown/floating.d.ts +9 -0
- package/dist/dropdown/index.d.ts +1 -0
- package/dist/index.d.ts +15 -1
- package/dist/index.js +3329 -1574
- package/dist/index.js.map +17 -8
- package/dist/overlay/types.d.ts +1 -1
- package/dist/popover/OnePopover.d.ts +42 -0
- package/dist/popover/PopoverBubble.d.ts +29 -0
- package/dist/popover/index.d.ts +4 -0
- package/dist/popover/types.d.ts +18 -0
- package/dist/select/OneSelect.d.ts +2 -0
- package/dist/space/OneSpace.d.ts +20 -0
- package/dist/space/index.d.ts +2 -0
- package/dist/steps/OneSteps.d.ts +23 -0
- package/dist/steps/index.d.ts +2 -0
- package/dist/time-picker/OneTimePicker.d.ts +1 -0
- package/dist/timeline/OneTimeline.d.ts +19 -0
- package/dist/timeline/index.d.ts +2 -0
- package/package.json +4 -4
package/README-zh.md
CHANGED
|
@@ -50,15 +50,16 @@ createApp({ root: App }).mount();
|
|
|
50
50
|
|
|
51
51
|
## 组件分类
|
|
52
52
|
|
|
53
|
-
- 基础:`OneButton`
|
|
54
|
-
- 表单:`OneForm`、`OneFormItem`、`OneInput`、`OneSelect`、`
|
|
55
|
-
`OneCheckbox`、`OneCheckboxGroup`、`OneRadio
|
|
56
|
-
`OneSlider`、`OneRate`、`OneUpload`
|
|
57
|
-
- 导航:`OneTabs`、`OneBreadcrumb`、`OnePagination`
|
|
53
|
+
- 基础:`OneButton`、`OneDivider`、`OneSpace`
|
|
54
|
+
- 表单:`OneForm`、`OneFormItem`、`OneInput`、`OneSelect`、`OneCascader`、
|
|
55
|
+
`OneTimePicker`、`OneCheckbox`、`OneCheckboxGroup`、`OneRadio`、
|
|
56
|
+
`OneRadioGroup`、`OneSwitch`、`OneSlider`、`OneRate`、`OneUpload`
|
|
57
|
+
- 导航:`OneTabs`、`OneSteps`、`OneBreadcrumb`、`OnePagination`
|
|
58
58
|
- 数据展示:`OneCard`、`OneTag`、`OneBadge`、`OneAvatar`、`OneProgress`、
|
|
59
|
-
`OneEmpty`、`OneTable`、`OneCollapse`、`OneSkeleton
|
|
59
|
+
`OneEmpty`、`OneTable`、`OneCollapse`、`OneSkeleton`、`OneDescriptions`、
|
|
60
|
+
`OneTimeline`
|
|
60
61
|
- 反馈与浮层:`OneAlert`、`OneMessage`、`OneDialog`、`OneTooltip`、
|
|
61
|
-
`OneLoading`
|
|
62
|
+
`OnePopover`、`OneLoading`
|
|
62
63
|
|
|
63
64
|
## 导航
|
|
64
65
|
|
package/README.md
CHANGED
|
@@ -50,15 +50,16 @@ createApp({ root: App }).mount();
|
|
|
50
50
|
|
|
51
51
|
## Component categories
|
|
52
52
|
|
|
53
|
-
- Basic: `OneButton`
|
|
54
|
-
- Form: `OneForm`, `OneFormItem`, `OneInput`, `OneSelect`, `
|
|
55
|
-
`OneCheckbox`, `OneCheckboxGroup`, `OneRadio`,
|
|
56
|
-
`OneSlider`, `OneRate`, `OneUpload`
|
|
57
|
-
- Navigation: `OneTabs`, `OneBreadcrumb`, `OnePagination`
|
|
53
|
+
- Basic: `OneButton`, `OneDivider`, `OneSpace`
|
|
54
|
+
- Form: `OneForm`, `OneFormItem`, `OneInput`, `OneSelect`, `OneCascader`,
|
|
55
|
+
`OneTimePicker`, `OneCheckbox`, `OneCheckboxGroup`, `OneRadio`,
|
|
56
|
+
`OneRadioGroup`, `OneSwitch`, `OneSlider`, `OneRate`, `OneUpload`
|
|
57
|
+
- Navigation: `OneTabs`, `OneSteps`, `OneBreadcrumb`, `OnePagination`
|
|
58
58
|
- Data display: `OneCard`, `OneTag`, `OneBadge`, `OneAvatar`, `OneProgress`,
|
|
59
|
-
`OneEmpty`, `OneTable`, `OneCollapse`, `OneSkeleton`
|
|
59
|
+
`OneEmpty`, `OneTable`, `OneCollapse`, `OneSkeleton`, `OneDescriptions`,
|
|
60
|
+
`OneTimeline`
|
|
60
61
|
- Feedback and overlays: `OneAlert`, `OneMessage`, `OneDialog`, `OneTooltip`,
|
|
61
|
-
`OneLoading`
|
|
62
|
+
`OnePopover`, `OneLoading`
|
|
62
63
|
|
|
63
64
|
## Navigation
|
|
64
65
|
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Component, type VNode } from '@geektech/tsone';
|
|
2
|
+
import { type OneNamedStyle } from '../styles/shared';
|
|
3
|
+
export interface OneCascaderOption {
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
children?: readonly OneCascaderOption[];
|
|
8
|
+
}
|
|
9
|
+
export interface OneCascaderProps {
|
|
10
|
+
options: readonly OneCascaderOption[];
|
|
11
|
+
value?: readonly string[];
|
|
12
|
+
defaultValue?: readonly string[];
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
required?: boolean;
|
|
16
|
+
invalid?: boolean;
|
|
17
|
+
changeOnSelect?: boolean;
|
|
18
|
+
ariaLabel?: string;
|
|
19
|
+
}
|
|
20
|
+
interface OneCascaderState {
|
|
21
|
+
open: boolean;
|
|
22
|
+
activePath: string[];
|
|
23
|
+
activeIndexes: number[];
|
|
24
|
+
internalValue: string[];
|
|
25
|
+
revision: number;
|
|
26
|
+
}
|
|
27
|
+
export declare const ONE_CASCADER_STYLES: OneNamedStyle[];
|
|
28
|
+
export declare class OneCascader extends Component<OneCascaderProps, OneCascaderState> {
|
|
29
|
+
private fieldContext;
|
|
30
|
+
private unsubscribe;
|
|
31
|
+
private floatingCleanup;
|
|
32
|
+
protected initState(): OneCascaderState;
|
|
33
|
+
protected initStyles(): void;
|
|
34
|
+
protected beforeMount(): void;
|
|
35
|
+
protected onMounted(): void;
|
|
36
|
+
protected onUpdated(): void;
|
|
37
|
+
protected onUnmounted(): void;
|
|
38
|
+
protected render(): VNode;
|
|
39
|
+
private renderPanel;
|
|
40
|
+
private resolveColumns;
|
|
41
|
+
private isOptionSelected;
|
|
42
|
+
private selectOption;
|
|
43
|
+
private handleKeydown;
|
|
44
|
+
private getValue;
|
|
45
|
+
private commit;
|
|
46
|
+
}
|
|
47
|
+
export {};
|
package/dist/categories.d.ts
CHANGED
|
@@ -2,21 +2,21 @@ export type OneComponentCategory = 'basic' | 'form' | 'navigation' | 'data-displ
|
|
|
2
2
|
export declare const ONE_COMPONENT_CATEGORIES: readonly [{
|
|
3
3
|
readonly id: "basic";
|
|
4
4
|
readonly label: "基础";
|
|
5
|
-
readonly components: readonly ["OneButton"];
|
|
5
|
+
readonly components: readonly ["OneButton", "OneDivider", "OneSpace"];
|
|
6
6
|
}, {
|
|
7
7
|
readonly id: "form";
|
|
8
8
|
readonly label: "表单";
|
|
9
|
-
readonly components: readonly ["OneForm", "OneFormItem", "OneInput", "OneSelect", "OneTimePicker", "OneCheckbox", "OneCheckboxGroup", "OneRadio", "OneRadioGroup", "OneSwitch", "OneSlider", "OneRate", "OneUpload"];
|
|
9
|
+
readonly components: readonly ["OneForm", "OneFormItem", "OneInput", "OneSelect", "OneCascader", "OneTimePicker", "OneCheckbox", "OneCheckboxGroup", "OneRadio", "OneRadioGroup", "OneSwitch", "OneSlider", "OneRate", "OneUpload"];
|
|
10
10
|
}, {
|
|
11
11
|
readonly id: "navigation";
|
|
12
12
|
readonly label: "导航";
|
|
13
|
-
readonly components: readonly ["OneTabs", "OneBreadcrumb", "OnePagination"];
|
|
13
|
+
readonly components: readonly ["OneTabs", "OneSteps", "OneBreadcrumb", "OnePagination"];
|
|
14
14
|
}, {
|
|
15
15
|
readonly id: "data-display";
|
|
16
16
|
readonly label: "数据展示";
|
|
17
|
-
readonly components: readonly ["OneCard", "OneAvatar", "OneTag", "OneBadge", "OneProgress", "OneEmpty", "OneTable", "OneCollapse", "OneSkeleton"];
|
|
17
|
+
readonly components: readonly ["OneCard", "OneAvatar", "OneTag", "OneBadge", "OneProgress", "OneEmpty", "OneTable", "OneCollapse", "OneSkeleton", "OneDescriptions", "OneTimeline"];
|
|
18
18
|
}, {
|
|
19
19
|
readonly id: "feedback";
|
|
20
20
|
readonly label: "反馈与浮层";
|
|
21
|
-
readonly components: readonly ["OneAlert", "OneMessage", "OneDialog", "OneTooltip", "OneLoading"];
|
|
21
|
+
readonly components: readonly ["OneAlert", "OneMessage", "OneDialog", "OneTooltip", "OnePopover", "OneLoading"];
|
|
22
22
|
}];
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Component, type VNode } from '@geektech/tsone';
|
|
2
|
+
import { type OneNamedStyle } from '../styles/shared';
|
|
3
|
+
export interface OneDescriptionsItem {
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
span?: number;
|
|
7
|
+
}
|
|
8
|
+
export interface OneDescriptionsProps {
|
|
9
|
+
title?: string;
|
|
10
|
+
items: OneDescriptionsItem[];
|
|
11
|
+
column?: number;
|
|
12
|
+
bordered?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare const ONE_DESCRIPTIONS_STYLES: OneNamedStyle[];
|
|
15
|
+
export declare function normalizeOneDescriptionsColumn(value: unknown): number;
|
|
16
|
+
export declare class OneDescriptions extends Component<OneDescriptionsProps, Record<string, never>> {
|
|
17
|
+
protected initState(): Record<string, never>;
|
|
18
|
+
protected initStyles(): void;
|
|
19
|
+
protected render(): VNode;
|
|
20
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Component, type VNode } from '@geektech/tsone';
|
|
2
|
+
import { type OneNamedStyle } from '../styles/shared';
|
|
3
|
+
export type OneDividerDirection = 'horizontal' | 'vertical';
|
|
4
|
+
export type OneDividerTextAlign = 'left' | 'center' | 'right';
|
|
5
|
+
export interface OneDividerProps {
|
|
6
|
+
direction?: OneDividerDirection;
|
|
7
|
+
text?: string;
|
|
8
|
+
textAlign?: OneDividerTextAlign;
|
|
9
|
+
}
|
|
10
|
+
export declare const ONE_DIVIDER_STYLES: OneNamedStyle[];
|
|
11
|
+
export declare function normalizeOneDividerDirection(value: unknown): OneDividerDirection;
|
|
12
|
+
export declare class OneDivider extends Component<OneDividerProps, Record<string, never>> {
|
|
13
|
+
protected initState(): Record<string, never>;
|
|
14
|
+
protected initStyles(): void;
|
|
15
|
+
protected render(): VNode;
|
|
16
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface OneFloatingPanelOptions {
|
|
2
|
+
trigger: HTMLElement;
|
|
3
|
+
panel: HTMLElement;
|
|
4
|
+
gap?: number;
|
|
5
|
+
minWidth?: number;
|
|
6
|
+
onOutside?: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function positionOneFloatingPanel(options: OneFloatingPanelOptions): void;
|
|
9
|
+
export declare function bindOneFloatingPanel(options: OneFloatingPanelOptions): () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { bindOneFloatingPanel, positionOneFloatingPanel, type OneFloatingPanelOptions, } from './floating';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
export type { OneComponentSize } from './types';
|
|
2
2
|
export { OneButton } from './button';
|
|
3
3
|
export type { OneButtonProps, OneButtonVariant } from './button';
|
|
4
|
+
export { OneDivider } from './divider';
|
|
5
|
+
export type { OneDividerDirection, OneDividerProps, OneDividerTextAlign, } from './divider';
|
|
6
|
+
export { OneSpace } from './space';
|
|
7
|
+
export type { OneSpaceAlign, OneSpaceDirection, OneSpaceProps, OneSpaceSize, } from './space';
|
|
4
8
|
export { OneInput } from './input';
|
|
5
9
|
export type { OneInputProps, OneInputValueEvent } from './input';
|
|
6
10
|
export { OneForm, OneFormItem, OneFormModel } from './form';
|
|
@@ -16,6 +20,8 @@ export { OneSelect } from './select';
|
|
|
16
20
|
export type { OneSelectOption, OneSelectOptionGroup, OneSelectProps, } from './select';
|
|
17
21
|
export { OneTimePicker } from './time-picker';
|
|
18
22
|
export type { OneTimePickerProps, OneTimePickerValueEvent, } from './time-picker';
|
|
23
|
+
export { OneCascader } from './cascader';
|
|
24
|
+
export type { OneCascaderOption, OneCascaderProps } from './cascader';
|
|
19
25
|
export { OneSlider } from './slider';
|
|
20
26
|
export type { OneSliderProps, OneSliderValueEvent } from './slider';
|
|
21
27
|
export { OneRate } from './rate';
|
|
@@ -24,6 +30,8 @@ export { OneUpload, formatOneFileSize } from './upload';
|
|
|
24
30
|
export type { OneUploadChangeEvent, OneUploadFile, OneUploadProps, } from './upload';
|
|
25
31
|
export { OneTabs } from './tabs';
|
|
26
32
|
export type { OneTabItem, OneTabsChangeEvent, OneTabsProps } from './tabs';
|
|
33
|
+
export { OneSteps, resolveOneStepsStatus } from './steps';
|
|
34
|
+
export type { OneStepsDirection, OneStepsItem, OneStepsProps, OneStepsStatus, } from './steps';
|
|
27
35
|
export { OneBreadcrumb } from './breadcrumb';
|
|
28
36
|
export type { OneBreadcrumbClickEvent, OneBreadcrumbItem, OneBreadcrumbProps, } from './breadcrumb';
|
|
29
37
|
export { OnePagination, createOnePaginationTokens } from './pagination';
|
|
@@ -49,6 +57,10 @@ export { OneCollapse } from './collapse';
|
|
|
49
57
|
export type { OneCollapseChangeEvent, OneCollapseItem, OneCollapseProps, } from './collapse';
|
|
50
58
|
export { OneSkeleton } from './skeleton';
|
|
51
59
|
export type { OneSkeletonProps } from './skeleton';
|
|
60
|
+
export { OneDescriptions } from './descriptions';
|
|
61
|
+
export type { OneDescriptionsItem, OneDescriptionsProps, } from './descriptions';
|
|
62
|
+
export { OneTimeline } from './timeline';
|
|
63
|
+
export type { OneTimelineColor, OneTimelineItem, OneTimelineProps, } from './timeline';
|
|
52
64
|
export { ONE_THEME_DEFAULTS } from './styles/shared';
|
|
53
65
|
export { ONE_DEFAULT_THEME, OneThemeConfigError, OneThemeEnvironmentError, OneThemeNotFoundError, oneTheme, } from './theme';
|
|
54
66
|
export type { OneResolvedTheme, OneThemeBorder, OneThemeColors, OneThemeDefinition, OneThemeInitOptions, OneThemeRadius, OneThemeService, OneThemeTypography, } from './theme';
|
|
@@ -64,5 +76,7 @@ export { OneTooltip } from './tooltip';
|
|
|
64
76
|
export type { OneTooltipProps, OneTooltipTrigger } from './tooltip';
|
|
65
77
|
export { OneLoading } from './loading';
|
|
66
78
|
export type { OneLoadingProps } from './loading';
|
|
79
|
+
export { OnePopover } from './popover';
|
|
80
|
+
export type { OnePopoverProps, OnePopoverTrigger } from './popover';
|
|
67
81
|
export declare const ONE_NAME = "@geektech/one";
|
|
68
|
-
export declare const ONE_VERSION = "0.3.
|
|
82
|
+
export declare const ONE_VERSION = "0.3.3";
|