@geektech/one 0.0.1 → 0.2.0

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 (86) hide show
  1. package/README-zh.md +258 -3
  2. package/README.md +265 -3
  3. package/dist/alert/OneAlert.d.ts +21 -0
  4. package/dist/alert/index.d.ts +2 -0
  5. package/dist/avatar/OneAvatar.d.ts +21 -0
  6. package/dist/avatar/index.d.ts +2 -0
  7. package/dist/badge/OneBadge.d.ts +18 -0
  8. package/dist/badge/index.d.ts +2 -0
  9. package/dist/breadcrumb/OneBreadcrumb.d.ts +38 -0
  10. package/dist/breadcrumb/index.d.ts +1 -0
  11. package/dist/categories.d.ts +9 -5
  12. package/dist/checkbox/OneCheckboxGroup.d.ts +2 -0
  13. package/dist/collapse/OneCollapse.d.ts +31 -0
  14. package/dist/collapse/index.d.ts +2 -0
  15. package/dist/data-display/index.d.ts +2 -0
  16. package/dist/data-display/types.d.ts +2 -0
  17. package/dist/dialog/DialogOverlay.d.ts +30 -0
  18. package/dist/dialog/OneDialog.d.ts +20 -0
  19. package/dist/dialog/focus-manager.d.ts +10 -0
  20. package/dist/dialog/index.d.ts +7 -0
  21. package/dist/dialog/scroll-lock.d.ts +2 -0
  22. package/dist/dialog/service.d.ts +22 -0
  23. package/dist/dialog/types.d.ts +14 -0
  24. package/dist/empty/OneEmpty.d.ts +12 -0
  25. package/dist/empty/index.d.ts +2 -0
  26. package/dist/form/OneForm.d.ts +1 -1
  27. package/dist/form/OneFormItem.d.ts +1 -1
  28. package/dist/index.d.ts +49 -2
  29. package/dist/index.js +5761 -98
  30. package/dist/index.js.map +59 -15
  31. package/dist/loading/OneLoading.d.ts +16 -0
  32. package/dist/loading/index.d.ts +2 -0
  33. package/dist/message/MessageOverlay.d.ts +25 -0
  34. package/dist/message/OneMessage.d.ts +19 -0
  35. package/dist/message/index.d.ts +6 -0
  36. package/dist/message/normalize.d.ts +8 -0
  37. package/dist/message/service.d.ts +17 -0
  38. package/dist/message/timer.d.ts +21 -0
  39. package/dist/message/types.d.ts +14 -0
  40. package/dist/navigation/index.d.ts +2 -0
  41. package/dist/navigation/normalize.d.ts +3 -0
  42. package/dist/navigation/types.d.ts +4 -0
  43. package/dist/overlay/container.d.ts +2 -0
  44. package/dist/overlay/errors.d.ts +9 -0
  45. package/dist/overlay/host.d.ts +16 -0
  46. package/dist/overlay/index.d.ts +7 -0
  47. package/dist/overlay/mount-controller.d.ts +13 -0
  48. package/dist/overlay/positioner.d.ts +36 -0
  49. package/dist/overlay/types.d.ts +32 -0
  50. package/dist/pagination/OnePagination.d.ts +42 -0
  51. package/dist/pagination/index.d.ts +2 -0
  52. package/dist/pagination/tokens.d.ts +2 -0
  53. package/dist/progress/OneProgress.d.ts +15 -0
  54. package/dist/progress/index.d.ts +2 -0
  55. package/dist/radio/OneRadio.d.ts +32 -0
  56. package/dist/radio/OneRadioGroup.d.ts +30 -0
  57. package/dist/radio/index.d.ts +4 -0
  58. package/dist/rate/OneRate.d.ts +28 -0
  59. package/dist/rate/index.d.ts +2 -0
  60. package/dist/skeleton/OneSkeleton.d.ts +16 -0
  61. package/dist/skeleton/index.d.ts +2 -0
  62. package/dist/slider/OneSlider.d.ts +29 -0
  63. package/dist/slider/index.d.ts +2 -0
  64. package/dist/styles/shared.d.ts +13 -0
  65. package/dist/table/OneTable.d.ts +26 -0
  66. package/dist/table/index.d.ts +2 -0
  67. package/dist/tabs/OneTabs.d.ts +34 -0
  68. package/dist/tabs/index.d.ts +2 -0
  69. package/dist/tag/OneTag.d.ts +21 -0
  70. package/dist/tag/index.d.ts +2 -0
  71. package/dist/theme/OneThemeService.d.ts +14 -0
  72. package/dist/theme/default-theme.d.ts +2 -0
  73. package/dist/theme/errors.d.ts +9 -0
  74. package/dist/theme/index.d.ts +4 -0
  75. package/dist/theme/normalize.d.ts +6 -0
  76. package/dist/theme/types.d.ts +57 -0
  77. package/dist/theme/variables.d.ts +6 -0
  78. package/dist/time-picker/OneTimePicker.d.ts +47 -0
  79. package/dist/time-picker/index.d.ts +2 -0
  80. package/dist/tooltip/OneTooltip.d.ts +45 -0
  81. package/dist/tooltip/TooltipBubble.d.ts +29 -0
  82. package/dist/tooltip/index.d.ts +4 -0
  83. package/dist/tooltip/types.d.ts +17 -0
  84. package/dist/upload/OneUpload.d.ts +36 -0
  85. package/dist/upload/index.d.ts +2 -0
  86. package/package.json +3 -2
@@ -0,0 +1,16 @@
1
+ import { Component, type VNode } from '@geektech/tsone';
2
+ import { type OneDataDisplayVariant } from '../data-display';
3
+ import { type OneNamedStyle } from '../styles/shared';
4
+ import type { OneComponentSize } from '../types';
5
+ export interface OneLoadingProps {
6
+ size?: OneComponentSize;
7
+ variant?: OneDataDisplayVariant;
8
+ label?: string;
9
+ children?: Array<VNode | string>;
10
+ }
11
+ export declare const ONE_LOADING_STYLES: OneNamedStyle[];
12
+ export declare class OneLoading extends Component<OneLoadingProps> {
13
+ protected initState(): object;
14
+ protected initStyles(): void;
15
+ protected render(): VNode;
16
+ }
@@ -0,0 +1,2 @@
1
+ export { OneLoading } from './OneLoading';
2
+ export type { OneLoadingProps } from './OneLoading';
@@ -0,0 +1,25 @@
1
+ import { Component, type VNode } from '@geektech/tsone';
2
+ import type { OneFeedbackVariant } from '../overlay';
3
+ import { type OneNamedStyle } from '../styles/shared';
4
+ import type { OneMessageOptions, OneMessagePlacement } from './types';
5
+ export interface MessageOverlayProps extends Omit<OneMessageOptions, 'container'> {
6
+ variant: OneFeedbackVariant;
7
+ duration: number;
8
+ placement: OneMessagePlacement;
9
+ requestClose(): void;
10
+ }
11
+ export declare const ONE_MESSAGE_STYLES: OneNamedStyle[];
12
+ interface MessageOverlayState {
13
+ }
14
+ export declare class MessageOverlay extends Component<MessageOverlayProps, MessageOverlayState> {
15
+ private timer;
16
+ mount(container: HTMLElement): void;
17
+ protected initState(): MessageOverlayState;
18
+ protected initStyles(): void;
19
+ protected onMounted(): void;
20
+ protected onUnmounted(): void;
21
+ setProps(props: Partial<MessageOverlayProps>): void;
22
+ protected render(): VNode;
23
+ private decorateGroup;
24
+ }
25
+ export {};
@@ -0,0 +1,19 @@
1
+ import { Component, type VNode } from '@geektech/tsone';
2
+ import type { OneMessageProps } from './types';
3
+ interface OneMessageState {
4
+ internalOpen: boolean;
5
+ }
6
+ export declare class OneMessage extends Component<OneMessageProps, OneMessageState> {
7
+ private controller;
8
+ private viewMounted;
9
+ protected initState(): OneMessageState;
10
+ protected initStyles(): void;
11
+ protected onMounted(): void;
12
+ protected beforeUpdate(): void;
13
+ protected beforeUnmount(): void;
14
+ protected render(): VNode;
15
+ private createOverlay;
16
+ private synchronizeOverlay;
17
+ private requestClose;
18
+ }
19
+ export {};
@@ -0,0 +1,6 @@
1
+ export { MessageOverlay, ONE_MESSAGE_STYLES } from './MessageOverlay';
2
+ export { OneMessage } from './OneMessage';
3
+ export { OneMessageService, createOneMessageService, oneMessage, } from './service';
4
+ export { OneMessageTimer } from './timer';
5
+ export type { OneTimerScheduler } from './timer';
6
+ export type { OneMessageOptions, OneMessagePlacement, OneMessageProps, } from './types';
@@ -0,0 +1,8 @@
1
+ import type { OneFeedbackVariant } from '../overlay';
2
+ import type { OneMessageOptions, OneMessagePlacement } from './types';
3
+ export interface NormalizedOneMessageOptions extends Omit<OneMessageOptions, 'variant' | 'duration' | 'placement'> {
4
+ variant: OneFeedbackVariant;
5
+ duration: number;
6
+ placement: OneMessagePlacement;
7
+ }
8
+ export declare function normalizeOneMessageOptions(options: OneMessageOptions): NormalizedOneMessageOptions;
@@ -0,0 +1,17 @@
1
+ import { type OneOverlayHandle, type OneOverlayHost } from '../overlay';
2
+ import type { OneMessageOptions } from './types';
3
+ type OneMessageShortcutOptions = Omit<OneMessageOptions, 'content' | 'variant'>;
4
+ export declare class OneMessageService {
5
+ private readonly suppliedHost?;
6
+ constructor(suppliedHost?: OneOverlayHost | undefined);
7
+ open(options: OneMessageOptions): OneOverlayHandle<OneMessageOptions>;
8
+ info(content: string, options?: OneMessageShortcutOptions): OneOverlayHandle<OneMessageOptions>;
9
+ success(content: string, options?: OneMessageShortcutOptions): OneOverlayHandle<OneMessageOptions>;
10
+ warning(content: string, options?: OneMessageShortcutOptions): OneOverlayHandle<OneMessageOptions>;
11
+ error(content: string, options?: OneMessageShortcutOptions): OneOverlayHandle<OneMessageOptions>;
12
+ close(id: string): void;
13
+ closeAll(): void;
14
+ }
15
+ export declare function createOneMessageService(host?: OneOverlayHost): OneMessageService;
16
+ export declare const oneMessage: OneMessageService;
17
+ export {};
@@ -0,0 +1,21 @@
1
+ export interface OneTimerScheduler {
2
+ now(): number;
3
+ set(callback: () => void, delay: number): unknown;
4
+ clear(handle: unknown): void;
5
+ }
6
+ export declare class OneMessageTimer {
7
+ private readonly scheduler;
8
+ private readonly onElapsed;
9
+ private handle;
10
+ private remaining;
11
+ private startedAt;
12
+ private paused;
13
+ private disposed;
14
+ constructor(duration: number, scheduler: OneTimerScheduler | undefined, onElapsed: () => void);
15
+ pause(): void;
16
+ resume(): void;
17
+ reset(duration: number): void;
18
+ dispose(): void;
19
+ private schedule;
20
+ private clear;
21
+ }
@@ -0,0 +1,14 @@
1
+ import type { OneFeedbackVariant, OneOverlayContainer } from '../overlay';
2
+ export type OneMessagePlacement = 'top-start' | 'top' | 'top-end' | 'bottom-start' | 'bottom' | 'bottom-end';
3
+ export interface OneMessageOptions {
4
+ content: string;
5
+ variant?: OneFeedbackVariant;
6
+ duration?: number;
7
+ closable?: boolean;
8
+ placement?: OneMessagePlacement;
9
+ container?: OneOverlayContainer;
10
+ }
11
+ export interface OneMessageProps extends OneMessageOptions {
12
+ open?: boolean;
13
+ defaultOpen?: boolean;
14
+ }
@@ -0,0 +1,2 @@
1
+ export { normalizeNonNegativeInteger, normalizePositiveInteger, normalizePositiveIntegerList, } from './normalize';
2
+ export type { OneNavigationChangeEvent } from './types';
@@ -0,0 +1,3 @@
1
+ export declare function normalizeNonNegativeInteger(value: unknown, fallback: number): number;
2
+ export declare function normalizePositiveInteger(value: unknown, fallback: number): number;
3
+ export declare function normalizePositiveIntegerList(values: unknown, fallback: readonly number[]): number[];
@@ -0,0 +1,4 @@
1
+ export interface OneNavigationChangeEvent<TValue> {
2
+ value: TValue;
3
+ originalEvent: Event;
4
+ }
@@ -0,0 +1,2 @@
1
+ import type { OneOverlayContainer } from './types';
2
+ export declare function resolveOneOverlayContainer(container?: OneOverlayContainer, targetDocument?: Document | null): HTMLElement;
@@ -0,0 +1,9 @@
1
+ export declare class OneOverlayEnvironmentError extends Error {
2
+ constructor(message?: string);
3
+ }
4
+ export declare class OneOverlayContainerError extends Error {
5
+ constructor(message: string);
6
+ }
7
+ export declare class OneTooltipTriggerError extends Error {
8
+ constructor(message?: string);
9
+ }
@@ -0,0 +1,16 @@
1
+ import type { OneOverlayHandle, OneOverlayHost, OneOverlayKind, OneOverlayOpenRequest } from './types';
2
+ export declare class DomOneOverlayHost implements OneOverlayHost {
3
+ private readonly targetDocument;
4
+ private readonly entries;
5
+ private readonly records;
6
+ private sequence;
7
+ constructor(targetDocument: Document);
8
+ open<TOptions extends object>(request: OneOverlayOpenRequest<TOptions>): OneOverlayHandle<TOptions>;
9
+ close(id: string): void;
10
+ closeAll(kind?: OneOverlayKind): void;
11
+ isTop(id: string): boolean;
12
+ private getOrCreateEntry;
13
+ private getOrCreateGroup;
14
+ private removeRecord;
15
+ }
16
+ export declare function getDefaultOneOverlayHost(targetDocument?: Document): OneOverlayHost;
@@ -0,0 +1,7 @@
1
+ export { resolveOneOverlayContainer } from './container';
2
+ export { OneOverlayContainerError, OneOverlayEnvironmentError, OneTooltipTriggerError, } from './errors';
3
+ export { DomOneOverlayHost, getDefaultOneOverlayHost } from './host';
4
+ export { OneOverlayMountController } from './mount-controller';
5
+ export { OneFloatingPositioner } from './positioner';
6
+ export type { OneOverlayPositionRequest, OneOverlayPositionResult, OneOverlayPositioner, OneOverlayRect, } from './positioner';
7
+ export type { OneFeedbackVariant, OneManagedOverlay, OneOverlayContainer, OneOverlayFactory, OneOverlayFactoryContext, OneOverlayHandle, OneOverlayHost, OneOverlayKind, OneOverlayOpenRequest, OneOverlayPlacement, } from './types';
@@ -0,0 +1,13 @@
1
+ import type { OneOverlayContainer, OneOverlayFactory, OneOverlayHost, OneOverlayKind } from './types';
2
+ export declare class OneOverlayMountController<TOptions extends object> {
3
+ private readonly host;
4
+ private readonly kind;
5
+ private readonly factory;
6
+ private readonly group?;
7
+ private handle;
8
+ constructor(host: OneOverlayHost, kind: OneOverlayKind, factory: OneOverlayFactory<TOptions>, group?: string | undefined);
9
+ open(container?: OneOverlayContainer): void;
10
+ update(options: Partial<TOptions>): void;
11
+ close(): void;
12
+ isOpen(): boolean;
13
+ }
@@ -0,0 +1,36 @@
1
+ import type { OneOverlayPlacement } from './types';
2
+ export interface OneOverlayRect {
3
+ x: number;
4
+ y: number;
5
+ width: number;
6
+ height: number;
7
+ top: number;
8
+ right: number;
9
+ bottom: number;
10
+ left: number;
11
+ }
12
+ export interface OneOverlayPositionRequest {
13
+ reference: OneOverlayRect;
14
+ floating: OneOverlayRect;
15
+ boundary: OneOverlayRect;
16
+ placement: OneOverlayPlacement;
17
+ offset: number;
18
+ padding: number;
19
+ }
20
+ export interface OneOverlayPositionResult {
21
+ x: number;
22
+ y: number;
23
+ placement: OneOverlayPlacement;
24
+ arrow: {
25
+ x?: number;
26
+ y?: number;
27
+ };
28
+ }
29
+ export interface OneOverlayPositioner {
30
+ compute(request: OneOverlayPositionRequest): OneOverlayPositionResult;
31
+ autoUpdate(reference: HTMLElement, floating: HTMLElement, update: () => void): () => void;
32
+ }
33
+ export declare class OneFloatingPositioner implements OneOverlayPositioner {
34
+ compute(request: OneOverlayPositionRequest): OneOverlayPositionResult;
35
+ autoUpdate(reference: HTMLElement, floating: HTMLElement, update: () => void): () => void;
36
+ }
@@ -0,0 +1,32 @@
1
+ export type OneFeedbackVariant = 'info' | 'success' | 'warning' | 'error';
2
+ export type OneOverlayContainer = HTMLElement | (() => HTMLElement | null);
3
+ export type OneOverlayPlacement = 'top-start' | 'top' | 'top-end' | 'right-start' | 'right' | 'right-end' | 'bottom-start' | 'bottom' | 'bottom-end' | 'left-start' | 'left' | 'left-end';
4
+ export type OneOverlayKind = 'message' | 'dialog' | 'tooltip';
5
+ export interface OneOverlayHandle<TOptions extends object> {
6
+ readonly id: string;
7
+ update(options: Partial<TOptions>): void;
8
+ close(): void;
9
+ }
10
+ export interface OneManagedOverlay<TOptions extends object> {
11
+ update(options: Partial<TOptions>): void;
12
+ destroy(): void;
13
+ }
14
+ export interface OneOverlayFactoryContext {
15
+ id: string;
16
+ slot: HTMLElement;
17
+ requestClose(): void;
18
+ isTop(): boolean;
19
+ }
20
+ export type OneOverlayFactory<TOptions extends object> = (context: OneOverlayFactoryContext) => OneManagedOverlay<TOptions>;
21
+ export interface OneOverlayOpenRequest<TOptions extends object> {
22
+ kind: OneOverlayKind;
23
+ group?: string;
24
+ container?: OneOverlayContainer;
25
+ factory: OneOverlayFactory<TOptions>;
26
+ }
27
+ export interface OneOverlayHost {
28
+ open<TOptions extends object>(request: OneOverlayOpenRequest<TOptions>): OneOverlayHandle<TOptions>;
29
+ close(id: string): void;
30
+ closeAll(kind?: OneOverlayKind): void;
31
+ isTop(id: string): boolean;
32
+ }
@@ -0,0 +1,42 @@
1
+ import { Component, type VNode } from '@geektech/tsone';
2
+ import { type OneNamedStyle } from '../styles/shared';
3
+ export interface OnePaginationChangeEvent {
4
+ page: number;
5
+ pageSize: number;
6
+ originalEvent: Event;
7
+ }
8
+ export interface OnePaginationProps {
9
+ total: number;
10
+ page?: number;
11
+ defaultPage?: number;
12
+ pageSize?: number;
13
+ defaultPageSize?: number;
14
+ pageSizeOptions?: readonly number[];
15
+ siblingCount?: number;
16
+ showQuickJumper?: boolean;
17
+ disabled?: boolean;
18
+ ariaLabel?: string;
19
+ }
20
+ interface OnePaginationState {
21
+ internalPage: number;
22
+ internalPageSize: number;
23
+ jumpValue: string;
24
+ }
25
+ export declare const ONE_PAGINATION_STYLES: OneNamedStyle[];
26
+ export declare class OnePagination extends Component<OnePaginationProps, OnePaginationState> {
27
+ protected initState(): OnePaginationState;
28
+ protected initStyles(): void;
29
+ protected render(): VNode;
30
+ private effectivePageSize;
31
+ private pageCount;
32
+ private effectivePage;
33
+ private sizeOptions;
34
+ private renderPageButton;
35
+ private renderEllipsis;
36
+ private handleSizeChange;
37
+ private handleJumpInput;
38
+ private handleJumpKeydown;
39
+ private requestChange;
40
+ private submitJump;
41
+ }
42
+ export {};
@@ -0,0 +1,2 @@
1
+ export { ONE_PAGINATION_STYLES, OnePagination, type OnePaginationChangeEvent, type OnePaginationProps, } from './OnePagination';
2
+ export { createOnePaginationTokens, type OnePaginationToken } from './tokens';
@@ -0,0 +1,2 @@
1
+ export type OnePaginationToken = number | 'ellipsis-start' | 'ellipsis-end';
2
+ export declare function createOnePaginationTokens(pageCount: number, page: number, siblingCount: number): OnePaginationToken[];
@@ -0,0 +1,15 @@
1
+ import { Component, type VNode } from '@geektech/tsone';
2
+ import { type OneDataDisplayVariant } from '../data-display';
3
+ import { type OneNamedStyle } from '../styles/shared';
4
+ export interface OneProgressProps {
5
+ percent?: number;
6
+ variant?: OneDataDisplayVariant;
7
+ showText?: boolean;
8
+ ariaLabel?: string;
9
+ }
10
+ export declare const ONE_PROGRESS_STYLES: OneNamedStyle[];
11
+ export declare class OneProgress extends Component<OneProgressProps> {
12
+ protected initState(): object;
13
+ protected initStyles(): void;
14
+ protected render(): VNode;
15
+ }
@@ -0,0 +1,2 @@
1
+ export { OneProgress } from './OneProgress';
2
+ export type { OneProgressProps } from './OneProgress';
@@ -0,0 +1,32 @@
1
+ import { Component, type VNode } from '@geektech/tsone';
2
+ import { type OneNamedStyle } from '../styles/shared';
3
+ export interface OneRadioProps {
4
+ value?: string;
5
+ checked?: boolean;
6
+ defaultChecked?: boolean;
7
+ name?: string;
8
+ disabled?: boolean;
9
+ required?: boolean;
10
+ invalid?: boolean;
11
+ ariaLabel?: string;
12
+ children?: Array<VNode | string>;
13
+ }
14
+ interface OneRadioState {
15
+ internalChecked: boolean;
16
+ revision: number;
17
+ }
18
+ export declare const ONE_RADIO_STYLES: OneNamedStyle[];
19
+ export declare class OneRadio extends Component<OneRadioProps, OneRadioState> {
20
+ private fieldContext;
21
+ private unsubscribe;
22
+ protected initState(): OneRadioState;
23
+ protected initStyles(): void;
24
+ protected beforeMount(): void;
25
+ protected onMounted(): void;
26
+ protected onUnmounted(): void;
27
+ protected onUpdated(): void;
28
+ protected render(): VNode;
29
+ private getChecked;
30
+ private emitChecked;
31
+ }
32
+ export {};
@@ -0,0 +1,30 @@
1
+ import { Component, type VNode } from '@geektech/tsone';
2
+ import type { OneSelectOption } from '../select';
3
+ import { type OneNamedStyle } from '../styles/shared';
4
+ export interface OneRadioGroupProps {
5
+ options: readonly OneSelectOption[];
6
+ value?: string;
7
+ defaultValue?: string;
8
+ name?: string;
9
+ disabled?: boolean;
10
+ invalid?: boolean;
11
+ ariaLabel?: string;
12
+ }
13
+ interface OneRadioGroupState {
14
+ internalValue: string;
15
+ revision: number;
16
+ }
17
+ export declare const ONE_RADIO_GROUP_STYLES: OneNamedStyle[];
18
+ export declare class OneRadioGroup extends Component<OneRadioGroupProps, OneRadioGroupState> {
19
+ private fieldContext;
20
+ private unsubscribe;
21
+ protected initState(): OneRadioGroupState;
22
+ protected initStyles(): void;
23
+ protected beforeMount(): void;
24
+ protected onMounted(): void;
25
+ protected onUnmounted(): void;
26
+ protected render(): VNode;
27
+ private getValue;
28
+ private select;
29
+ }
30
+ export {};
@@ -0,0 +1,4 @@
1
+ export { OneRadio } from './OneRadio';
2
+ export type { OneRadioProps } from './OneRadio';
3
+ export { OneRadioGroup } from './OneRadioGroup';
4
+ export type { OneRadioGroupProps } from './OneRadioGroup';
@@ -0,0 +1,28 @@
1
+ import { Component, type VNode } from '@geektech/tsone';
2
+ import { type OneNamedStyle } from '../styles/shared';
3
+ export interface OneRateValueEvent {
4
+ value: number;
5
+ originalEvent: Event;
6
+ }
7
+ export interface OneRateProps {
8
+ value?: number;
9
+ defaultValue?: number;
10
+ count?: number;
11
+ disabled?: boolean;
12
+ readonly?: boolean;
13
+ allowClear?: boolean;
14
+ ariaLabel?: string;
15
+ }
16
+ interface OneRateState {
17
+ internalValue: number;
18
+ }
19
+ export declare const ONE_RATE_STYLES: OneNamedStyle[];
20
+ export declare function normalizeOneRateValue(value: number | undefined, fallback: number): number;
21
+ export declare class OneRate extends Component<OneRateProps, OneRateState> {
22
+ protected initState(): OneRateState;
23
+ protected initStyles(): void;
24
+ protected render(): VNode;
25
+ private getCount;
26
+ private emitValue;
27
+ }
28
+ export {};
@@ -0,0 +1,2 @@
1
+ export { OneRate } from './OneRate';
2
+ export type { OneRateProps, OneRateValueEvent } from './OneRate';
@@ -0,0 +1,16 @@
1
+ import { Component, type VNode } from '@geektech/tsone';
2
+ import { type OneNamedStyle } from '../styles/shared';
3
+ export interface OneSkeletonProps {
4
+ rows?: number;
5
+ title?: boolean;
6
+ avatar?: boolean;
7
+ animated?: boolean;
8
+ widths?: readonly string[];
9
+ ariaLabel?: string;
10
+ }
11
+ export declare const ONE_SKELETON_STYLES: OneNamedStyle[];
12
+ export declare class OneSkeleton extends Component<OneSkeletonProps> {
13
+ protected initState(): object;
14
+ protected initStyles(): void;
15
+ protected render(): VNode;
16
+ }
@@ -0,0 +1,2 @@
1
+ export { OneSkeleton } from './OneSkeleton';
2
+ export type { OneSkeletonProps } from './OneSkeleton';
@@ -0,0 +1,29 @@
1
+ import { Component, type VNode } from '@geektech/tsone';
2
+ import { type OneNamedStyle } from '../styles/shared';
3
+ export interface OneSliderValueEvent {
4
+ value: number;
5
+ originalEvent: Event;
6
+ }
7
+ export interface OneSliderProps {
8
+ value?: number;
9
+ defaultValue?: number;
10
+ min?: number;
11
+ max?: number;
12
+ step?: number;
13
+ disabled?: boolean;
14
+ showValue?: boolean;
15
+ ariaLabel?: string;
16
+ }
17
+ interface OneSliderState {
18
+ internalValue: number;
19
+ }
20
+ export declare const ONE_SLIDER_STYLES: OneNamedStyle[];
21
+ export declare function normalizeOneSliderNumber(value: number | undefined, fallback: number): number;
22
+ export declare function clampOneSliderValue(value: number, min: number, max: number): number;
23
+ export declare class OneSlider extends Component<OneSliderProps, OneSliderState> {
24
+ protected initState(): OneSliderState;
25
+ protected initStyles(): void;
26
+ protected render(): VNode;
27
+ private emitValue;
28
+ }
29
+ export {};
@@ -0,0 +1,2 @@
1
+ export { OneSlider } from './OneSlider';
2
+ export type { OneSliderProps, OneSliderValueEvent } from './OneSlider';
@@ -9,6 +9,10 @@ export declare const ONE_THEME_DEFAULTS: {
9
9
  readonly colorPrimaryHover: "#4bc944";
10
10
  readonly colorDanger: "#b83232";
11
11
  readonly colorDangerHover: "#9f2d2d";
12
+ readonly colorInfo: "#2563eb";
13
+ readonly colorSuccess: "#2f7c39";
14
+ readonly colorWarning: "#9a6700";
15
+ readonly colorOverlay: "rgba(22, 32, 24, 0.48)";
12
16
  readonly colorSurface: "#ffffff";
13
17
  readonly colorText: "#162018";
14
18
  readonly colorMuted: "#647268";
@@ -24,7 +28,16 @@ export declare const ONE_THEME_DEFAULTS: {
24
28
  readonly fontSizeMd: "14px";
25
29
  readonly fontSizeLg: "16px";
26
30
  readonly shadowCard: "0 12px 30px rgba(32, 74, 38, 0.1)";
31
+ readonly shadowOverlay: "0 18px 48px rgba(22, 32, 24, 0.2)";
32
+ readonly zIndexDialog: "1000";
33
+ readonly zIndexMessage: "1100";
34
+ readonly zIndexTooltip: "1200";
27
35
  readonly fontFamily: "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif";
28
36
  };
37
+ export declare const ONE_THEME_TYPOGRAPHY_PROPERTIES: Readonly<{
38
+ fontFamily: "var(--one-font-family, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif)";
39
+ lineHeight: "var(--one-line-height, 1.5)";
40
+ }>;
41
+ export declare function oneThemeBorder(color?: string): string;
29
42
  export declare function normalizeOneSize(value: unknown): OneComponentSize;
30
43
  export declare function oneStylesToSheet(styles: readonly OneNamedStyle[]): StyleSheet;
@@ -0,0 +1,26 @@
1
+ import { Component, type VNode } from '@geektech/tsone';
2
+ import { type OneNamedStyle } from '../styles/shared';
3
+ export type OneTableRow = Record<string, unknown>;
4
+ export interface OneTableColumn<T extends OneTableRow = OneTableRow> {
5
+ key: string;
6
+ title?: string;
7
+ render?: (row: T) => VNode | string | number | boolean | null | undefined;
8
+ }
9
+ export interface OneTableProps<T extends OneTableRow = OneTableRow> {
10
+ data?: readonly T[];
11
+ columns?: readonly OneTableColumn<T>[];
12
+ rowKey?: string;
13
+ striped?: boolean;
14
+ hover?: boolean;
15
+ emptyText?: string;
16
+ ariaLabel?: string;
17
+ }
18
+ export declare const ONE_TABLE_STYLES: OneNamedStyle[];
19
+ export declare class OneTable extends Component<OneTableProps> {
20
+ protected initState(): object;
21
+ protected initStyles(): void;
22
+ protected render(): VNode;
23
+ private resolveColumns;
24
+ private renderCell;
25
+ private normalizeCell;
26
+ }
@@ -0,0 +1,2 @@
1
+ export { OneTable } from './OneTable';
2
+ export type { OneTableColumn, OneTableProps, OneTableRow } from './OneTable';
@@ -0,0 +1,34 @@
1
+ import { Component, type VNode } from '@geektech/tsone';
2
+ import type { OneNavigationChangeEvent } from '../navigation';
3
+ import { type OneNamedStyle } from '../styles/shared';
4
+ export interface OneTabItem {
5
+ value: string;
6
+ label: string;
7
+ disabled?: boolean;
8
+ }
9
+ export type OneTabsChangeEvent = OneNavigationChangeEvent<string>;
10
+ export interface OneTabsProps {
11
+ items: readonly OneTabItem[];
12
+ value?: string;
13
+ defaultValue?: string;
14
+ id?: string;
15
+ ariaLabel?: string;
16
+ children?: Array<VNode | string>;
17
+ }
18
+ interface OneTabsState {
19
+ internalValue: string | undefined;
20
+ }
21
+ export declare const ONE_TABS_STYLES: OneNamedStyle[];
22
+ export declare class OneTabs extends Component<OneTabsProps, OneTabsState> {
23
+ private readonly idPrefix;
24
+ protected initState(): OneTabsState;
25
+ protected initStyles(): void;
26
+ protected render(): VNode;
27
+ private normalizedItems;
28
+ private effectiveValue;
29
+ private activate;
30
+ private handleKeydown;
31
+ private enabledIndices;
32
+ private focusTab;
33
+ }
34
+ export {};
@@ -0,0 +1,2 @@
1
+ export { ONE_TABS_STYLES, OneTabs } from './OneTabs';
2
+ export type { OneTabItem, OneTabsChangeEvent, OneTabsProps } from './OneTabs';
@@ -0,0 +1,21 @@
1
+ import { Component, type VNode } from '@geektech/tsone';
2
+ import { type OneDataDisplayVariant } from '../data-display';
3
+ import { type OneNamedStyle } from '../styles/shared';
4
+ import type { OneComponentSize } from '../types';
5
+ export interface OneTagProps {
6
+ variant?: OneDataDisplayVariant;
7
+ size?: OneComponentSize;
8
+ closable?: boolean;
9
+ children?: Array<VNode | string>;
10
+ }
11
+ interface OneTagState {
12
+ visible: boolean;
13
+ }
14
+ export declare const ONE_TAG_STYLES: OneNamedStyle[];
15
+ export declare class OneTag extends Component<OneTagProps, OneTagState> {
16
+ protected initState(): OneTagState;
17
+ protected initStyles(): void;
18
+ protected render(): VNode;
19
+ private close;
20
+ }
21
+ export {};
@@ -0,0 +1,2 @@
1
+ export { OneTag } from './OneTag';
2
+ export type { OneTagProps } from './OneTag';