@webx-ui/core 0.1.0 → 0.3.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 (94) hide show
  1. package/dist/components/Action/Action.d.ts +35 -0
  2. package/dist/components/Action/index.d.ts +2 -0
  3. package/dist/components/Action/types.d.ts +37 -0
  4. package/dist/components/Actions/Actions.d.ts +45 -0
  5. package/dist/components/Actions/index.d.ts +2 -0
  6. package/dist/components/Actions/types.d.ts +20 -0
  7. package/dist/components/Autocomplete/Autocomplete.d.ts +60 -0
  8. package/dist/components/Autocomplete/index.d.ts +2 -0
  9. package/dist/components/Autocomplete/types.d.ts +58 -0
  10. package/dist/components/Badge/Badge.d.ts +31 -0
  11. package/dist/components/Badge/index.d.ts +2 -0
  12. package/dist/components/Badge/types.d.ts +21 -0
  13. package/dist/components/Button/Button.d.ts +5 -5
  14. package/dist/components/Button/types.d.ts +3 -2
  15. package/dist/components/ButtonGroup/ButtonGroup.d.ts +26 -0
  16. package/dist/components/ButtonGroup/index.d.ts +2 -0
  17. package/dist/components/ButtonGroup/types.d.ts +20 -0
  18. package/dist/components/Cascader/Cascader.d.ts +62 -0
  19. package/dist/components/Cascader/index.d.ts +2 -0
  20. package/dist/components/Cascader/types.d.ts +55 -0
  21. package/dist/components/Checkbox/Checkbox.d.ts +3 -3
  22. package/dist/components/ColorPicker/ColorPicker.d.ts +5 -5
  23. package/dist/components/Countdown/Countdown.d.ts +42 -0
  24. package/dist/components/Countdown/format.d.ts +12 -0
  25. package/dist/components/Countdown/index.d.ts +3 -0
  26. package/dist/components/Countdown/types.d.ts +27 -0
  27. package/dist/components/DatePicker/DatePicker.d.ts +12 -12
  28. package/dist/components/DateRangePicker/DateRangePicker.d.ts +11 -11
  29. package/dist/components/DateTimePicker/DateTimePicker.d.ts +5 -5
  30. package/dist/components/Dropdown/Dropdown.d.ts +46 -0
  31. package/dist/components/Dropdown/index.d.ts +2 -0
  32. package/dist/components/Dropdown/types.d.ts +28 -0
  33. package/dist/components/DropdownItem/DropdownItem.d.ts +32 -0
  34. package/dist/components/DropdownItem/index.d.ts +2 -0
  35. package/dist/components/DropdownItem/types.d.ts +20 -0
  36. package/dist/components/EntityCard/EntityCard.d.ts +40 -0
  37. package/dist/components/EntityCard/index.d.ts +2 -0
  38. package/dist/components/EntityCard/types.d.ts +37 -0
  39. package/dist/components/FormItem/FormItem.d.ts +2 -2
  40. package/dist/components/Heading/Heading.d.ts +24 -0
  41. package/dist/components/Heading/index.d.ts +2 -0
  42. package/dist/components/Heading/types.d.ts +16 -0
  43. package/dist/components/Icon/Icon.d.ts +8 -0
  44. package/dist/components/Icon/icons.d.ts +85 -0
  45. package/dist/components/Icon/index.d.ts +4 -0
  46. package/dist/components/Icon/types.d.ts +25 -0
  47. package/dist/components/Indicator/Indicator.d.ts +29 -0
  48. package/dist/components/Indicator/index.d.ts +2 -0
  49. package/dist/components/Indicator/types.d.ts +21 -0
  50. package/dist/components/Input/Input.d.ts +6 -6
  51. package/dist/components/InputNumber/InputNumber.d.ts +3 -3
  52. package/dist/components/Link/Link.d.ts +34 -0
  53. package/dist/components/Link/index.d.ts +2 -0
  54. package/dist/components/Link/types.d.ts +26 -0
  55. package/dist/components/Pagination/Pagination.d.ts +45 -0
  56. package/dist/components/Pagination/index.d.ts +2 -0
  57. package/dist/components/Pagination/types.d.ts +29 -0
  58. package/dist/components/Prose/Prose.d.ts +22 -0
  59. package/dist/components/Prose/index.d.ts +2 -0
  60. package/dist/components/Prose/types.d.ts +13 -0
  61. package/dist/components/Radio/Radio.d.ts +2 -2
  62. package/dist/components/Rate/Rate.d.ts +2 -2
  63. package/dist/components/RichText/RichText.d.ts +4 -4
  64. package/dist/components/RichText/ToolbarButton.d.ts +1 -1
  65. package/dist/components/Select/Select.d.ts +10 -10
  66. package/dist/components/Slider/Slider.d.ts +1 -1
  67. package/dist/components/Statistic/Statistic.d.ts +34 -0
  68. package/dist/components/Statistic/index.d.ts +2 -0
  69. package/dist/components/Statistic/types.d.ts +24 -0
  70. package/dist/components/Switch/Switch.d.ts +2 -2
  71. package/dist/components/Table/Table.d.ts +34 -0
  72. package/dist/components/Table/index.d.ts +2 -0
  73. package/dist/components/Table/types.d.ts +142 -0
  74. package/dist/components/TagsInput/TagsInput.d.ts +4 -4
  75. package/dist/components/Text/Text.d.ts +27 -0
  76. package/dist/components/Text/index.d.ts +2 -0
  77. package/dist/components/Text/types.d.ts +21 -0
  78. package/dist/components/Textarea/Textarea.d.ts +3 -3
  79. package/dist/components/TimePicker/TimePicker.d.ts +5 -5
  80. package/dist/components/Timeline/Timeline.d.ts +20 -0
  81. package/dist/components/Timeline/index.d.ts +2 -0
  82. package/dist/components/Timeline/types.d.ts +6 -0
  83. package/dist/components/TimelineItem/TimelineItem.d.ts +29 -0
  84. package/dist/components/TimelineItem/index.d.ts +2 -0
  85. package/dist/components/TimelineItem/types.d.ts +21 -0
  86. package/dist/components/index.d.ts +21 -0
  87. package/dist/composables/useActions.d.ts +8 -0
  88. package/dist/composables/useButtonGroup.d.ts +15 -0
  89. package/dist/composables/useDropdown.d.ts +9 -0
  90. package/dist/composables/useTimeline.d.ts +8 -0
  91. package/dist/index.js +3459 -1179
  92. package/dist/index.js.map +1 -1
  93. package/dist/style.css +1 -1
  94. package/package.json +1 -1
@@ -0,0 +1,27 @@
1
+ import { TextProps } from './types';
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: {
5
+ default?(_: {}): any;
6
+ };
7
+ refs: {};
8
+ rootEl: any;
9
+ };
10
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
+ declare const __VLS_component: import('vue').DefineComponent<TextProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<TextProps> & Readonly<{}>, {
12
+ size: import('./types').TextSize;
13
+ tone: import('./types').TextTone;
14
+ as: string;
15
+ align: import('./types').TextAlign;
16
+ truncate: boolean | number;
17
+ weight: import('./types').TextWeight;
18
+ italic: boolean;
19
+ mono: boolean;
20
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
21
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
22
+ export default _default;
23
+ type __VLS_WithTemplateSlots<T, S> = T & {
24
+ new (): {
25
+ $slots: S;
26
+ };
27
+ };
@@ -0,0 +1,2 @@
1
+ export { default as WxText } from './Text';
2
+ export type * from './types';
@@ -0,0 +1,21 @@
1
+ export type TextSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
2
+ export type TextWeight = 'regular' | 'medium' | 'semibold' | 'bold';
3
+ export type TextTone = 'default' | 'strong' | 'muted' | 'placeholder' | 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'inverse';
4
+ export type TextAlign = 'start' | 'center' | 'end' | 'justify';
5
+ export interface TextProps {
6
+ /** Element to render. Use `p` for a paragraph, `label` beside a control, and so on. */
7
+ as?: string;
8
+ size?: TextSize;
9
+ weight?: TextWeight;
10
+ /** Colour role, taken from the text tokens. */
11
+ tone?: TextTone;
12
+ align?: TextAlign;
13
+ /**
14
+ * Cuts the text off with an ellipsis: `true` on one line, a number over that many
15
+ * lines. The element needs a width to cut against.
16
+ */
17
+ truncate?: boolean | number;
18
+ italic?: boolean;
19
+ /** Tabular text — ids, hashes, prices in a column. */
20
+ mono?: boolean;
21
+ }
@@ -23,11 +23,11 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {
23
23
  }>, {
24
24
  size: import('../..').ControlSize;
25
25
  disabled: boolean;
26
- id: string;
27
- ariaLabel: string;
28
26
  placeholder: string;
29
- readonly: boolean;
27
+ ariaLabel: string;
30
28
  status: import('../..').ControlStatus;
29
+ id: string;
30
+ readonly: boolean;
31
31
  maxlength: number;
32
32
  showCount: boolean;
33
33
  resize: "none" | "vertical" | "both";
@@ -25,15 +25,15 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
25
25
  name: string;
26
26
  size: import('../..').ControlSize;
27
27
  disabled: boolean;
28
- id: string;
28
+ teleport: boolean | string;
29
+ placeholder: string;
29
30
  ariaLabel: string;
30
31
  clearable: boolean;
31
- placeholder: string;
32
- teleport: boolean | string;
33
- readonly: boolean;
34
32
  status: import('../..').ControlStatus;
35
- valueFormat: string;
33
+ id: string;
34
+ readonly: boolean;
36
35
  format: string;
36
+ valueFormat: string;
37
37
  minDate: string | Date;
38
38
  maxDate: string | Date;
39
39
  seconds: boolean;
@@ -0,0 +1,20 @@
1
+ import { TimelineProps } from './types';
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: {
5
+ default?(_: {}): any;
6
+ };
7
+ refs: {};
8
+ rootEl: HTMLUListElement;
9
+ };
10
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
+ declare const __VLS_component: import('vue').DefineComponent<TimelineProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<TimelineProps> & Readonly<{}>, {
12
+ size: import('./types').TimelineSize;
13
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLUListElement>;
14
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
15
+ export default _default;
16
+ type __VLS_WithTemplateSlots<T, S> = T & {
17
+ new (): {
18
+ $slots: S;
19
+ };
20
+ };
@@ -0,0 +1,2 @@
1
+ export { default as WxTimeline } from './Timeline';
2
+ export type * from './types';
@@ -0,0 +1,6 @@
1
+ import { TimelineSize } from '../../composables/useTimeline';
2
+ export interface TimelineProps {
3
+ /** Spacing and dot size for every item in the timeline. */
4
+ size?: TimelineSize;
5
+ }
6
+ export type { TimelineSize };
@@ -0,0 +1,29 @@
1
+ import { TimelineItemProps } from './types';
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: {
5
+ dot?(_: {}): any;
6
+ title?(_: {}): any;
7
+ default?(_: {}): any;
8
+ };
9
+ refs: {};
10
+ rootEl: HTMLLIElement;
11
+ };
12
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
13
+ declare const __VLS_component: import('vue').DefineComponent<TimelineItemProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<TimelineItemProps> & Readonly<{}>, {
14
+ type: import('./types').TimelineItemType;
15
+ title: string;
16
+ icon: import('..').IconName;
17
+ datetime: string;
18
+ timestamp: string;
19
+ timestampPlacement: import('./types').TimestampPlacement;
20
+ hollow: boolean;
21
+ hideLine: boolean;
22
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLLIElement>;
23
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
24
+ export default _default;
25
+ type __VLS_WithTemplateSlots<T, S> = T & {
26
+ new (): {
27
+ $slots: S;
28
+ };
29
+ };
@@ -0,0 +1,2 @@
1
+ export { default as WxTimelineItem } from './TimelineItem';
2
+ export type * from './types';
@@ -0,0 +1,21 @@
1
+ import { IconName } from '../Icon/types';
2
+ export type TimelineItemType = 'default' | 'primary' | 'success' | 'warning' | 'danger' | 'info';
3
+ export type TimestampPlacement = 'top' | 'bottom';
4
+ export interface TimelineItemProps {
5
+ /** When it happened — any pre-formatted string. */
6
+ timestamp?: string;
7
+ /** Machine-readable value for the `<time datetime>`, e.g. `2026-03-12T09:30:00Z`. */
8
+ datetime?: string;
9
+ /** Above the entry (the usual log order) or under it. */
10
+ timestampPlacement?: TimestampPlacement;
11
+ /** Headline of the entry. */
12
+ title?: string;
13
+ /** Colour of the dot. */
14
+ type?: TimelineItemType;
15
+ /** Draws the dot as a ring — a step that has not happened yet. */
16
+ hollow?: boolean;
17
+ /** Puts an icon inside the dot instead of filling it. */
18
+ icon?: IconName;
19
+ /** Hides the line under this entry — for the last one when the list continues elsewhere. */
20
+ hideLine?: boolean;
21
+ }
@@ -1,22 +1,43 @@
1
+ export * from './Action';
2
+ export * from './Actions';
3
+ export * from './Autocomplete';
4
+ export * from './Badge';
1
5
  export * from './Button';
6
+ export * from './ButtonGroup';
2
7
  export * from './Card';
8
+ export * from './Cascader';
3
9
  export * from './Checkbox';
4
10
  export * from './CheckboxGroup';
5
11
  export * from './ColorPicker';
12
+ export * from './Countdown';
6
13
  export * from './DatePicker';
7
14
  export * from './DateRangePicker';
8
15
  export * from './DateTimePicker';
16
+ export * from './Dropdown';
17
+ export * from './DropdownItem';
18
+ export * from './EntityCard';
9
19
  export * from './Form';
10
20
  export * from './FormItem';
21
+ export * from './Heading';
22
+ export * from './Icon';
23
+ export * from './Indicator';
11
24
  export * from './Input';
12
25
  export * from './InputNumber';
26
+ export * from './Link';
27
+ export * from './Pagination';
28
+ export * from './Prose';
13
29
  export * from './Radio';
14
30
  export * from './RadioGroup';
15
31
  export * from './Rate';
16
32
  export * from './RichText';
17
33
  export * from './Select';
18
34
  export * from './Slider';
35
+ export * from './Statistic';
19
36
  export * from './Switch';
37
+ export * from './Table';
20
38
  export * from './TagsInput';
39
+ export * from './Text';
21
40
  export * from './Textarea';
41
+ export * from './Timeline';
42
+ export * from './TimelineItem';
22
43
  export * from './TimePicker';
@@ -0,0 +1,8 @@
1
+ import { ComputedRef, InjectionKey } from 'vue';
2
+ import { ActionSize } from '../components/Action/types';
3
+ /** What a `WxActions` row hands down to the actions inside it. */
4
+ export interface ActionsContext {
5
+ size: ComputedRef<ActionSize | undefined>;
6
+ }
7
+ export declare const actionsKey: InjectionKey<ActionsContext>;
8
+ export declare function useActions(): ActionsContext | null;
@@ -0,0 +1,15 @@
1
+ import { ComputedRef, InjectionKey } from 'vue';
2
+ import { ButtonSize, ButtonType, ButtonVariant } from '../components/Button/types';
3
+ /**
4
+ * What a `WxButtonGroup` hands down to the buttons inside it. Every field is
5
+ * optional: a button's own prop always wins, the group only fills the gaps.
6
+ */
7
+ export interface ButtonGroupContext {
8
+ type: ComputedRef<ButtonType | undefined>;
9
+ variant: ComputedRef<ButtonVariant | undefined>;
10
+ size: ComputedRef<ButtonSize | undefined>;
11
+ disabled: ComputedRef<boolean>;
12
+ vertical: ComputedRef<boolean>;
13
+ }
14
+ export declare const buttonGroupKey: InjectionKey<ButtonGroupContext>;
15
+ export declare function useButtonGroup(): ButtonGroupContext | null;
@@ -0,0 +1,9 @@
1
+ import { InjectionKey } from 'vue';
2
+ /** What a `WxDropdown` hands down, so an item inside it can close the panel. */
3
+ export interface DropdownContext {
4
+ close: () => void;
5
+ /** Whether a click on an item closes the panel — the dropdown's `closeOnClick`. */
6
+ closeOnSelect: () => boolean;
7
+ }
8
+ export declare const dropdownKey: InjectionKey<DropdownContext>;
9
+ export declare function useDropdown(): DropdownContext | null;
@@ -0,0 +1,8 @@
1
+ import { ComputedRef, InjectionKey } from 'vue';
2
+ export type TimelineSize = 'sm' | 'md';
3
+ /** What `WxTimeline` hands down to the items inside it. */
4
+ export interface TimelineContext {
5
+ size: ComputedRef<TimelineSize>;
6
+ }
7
+ export declare const timelineKey: InjectionKey<TimelineContext>;
8
+ export declare function useTimeline(): TimelineContext | null;