@octans/ui 1.0.0 → 1.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 (58) hide show
  1. package/README.md +45 -2
  2. package/dist/components/ActionList/ActionList.vue.d.ts +4 -4
  3. package/dist/components/AppFrame/AppFrame.vue.d.ts +3 -3
  4. package/dist/components/Badge/Badge.vue.d.ts +3 -3
  5. package/dist/components/Banner/Banner.vue.d.ts +18 -0
  6. package/dist/components/Button/Button.vue.d.ts +66 -0
  7. package/dist/components/Calendar/types.d.ts +52 -0
  8. package/dist/components/CalendarHeatmap/CalendarHeatmap.vue.d.ts +1 -1
  9. package/dist/components/Card/CardSection.vue.d.ts +1 -1
  10. package/dist/components/ColorSelector/ColorSelector.vue.d.ts +1 -1
  11. package/dist/components/ColorSelector/types.d.ts +2 -2
  12. package/dist/components/DataTable/BulkActions.vue.d.ts +21 -3
  13. package/dist/components/DatePicker/types.d.ts +33 -0
  14. package/dist/components/FileInput/FileInput.vue.d.ts +104 -0
  15. package/dist/components/FileInput/ItemList.vue.d.ts +6 -0
  16. package/dist/components/FileInput/pageDrop.d.ts +23 -0
  17. package/dist/components/Filters/FilterActions.vue.d.ts +21 -3
  18. package/dist/components/Filters/FilterItem.vue.d.ts +30 -3
  19. package/dist/components/Filters/Filters.vue.d.ts +72 -9
  20. package/dist/components/Formatter/Formatter.vue.d.ts +18 -0
  21. package/dist/components/KeyboardKey/KeyboardKey.vue.d.ts +38 -0
  22. package/dist/components/KeyboardKey/index.d.ts +2 -0
  23. package/dist/components/Labelled/Labelled.vue.d.ts +18 -2
  24. package/dist/components/Modal/ModalSection.vue.d.ts +71 -0
  25. package/dist/components/Modal/index.d.ts +2 -1
  26. package/dist/components/Page/Page.vue.d.ts +34 -4
  27. package/dist/components/{Popper/Popper.vue.d.ts → Popover/Popover.vue.d.ts} +4 -4
  28. package/dist/components/Popover/index.d.ts +90 -0
  29. package/dist/components/{Popper → Popover}/types.d.ts +3 -3
  30. package/dist/components/RangeSlider/RangeSlider.vue.d.ts +27 -0
  31. package/dist/components/Select/Select.vue.d.ts +30 -3
  32. package/dist/components/SkeletonPage/SkeletonPage.vue.d.ts +19 -0
  33. package/dist/components/SkeletonPage/index.d.ts +2 -0
  34. package/dist/components/SkeletonPage/types.d.ts +26 -0
  35. package/dist/components/Tag/Tag.vue.d.ts +3 -3
  36. package/dist/components/TextField/types.d.ts +10 -0
  37. package/dist/components/TimePicker/types.d.ts +10 -0
  38. package/dist/components/ToggleSwitch/ToggleSwitch.vue.d.ts +8 -2
  39. package/dist/components/ToggleSwitch/types.d.ts +29 -0
  40. package/dist/components/Tooltip/Tooltip.vue.d.ts +2 -2
  41. package/dist/components/all.d.ts +3 -1
  42. package/dist/components/types.d.ts +5 -0
  43. package/dist/lib.d.ts +4 -1
  44. package/dist/reset.css +73 -0
  45. package/dist/style.css +1 -1
  46. package/dist/ui.js +4156 -3721
  47. package/dist/ui.umd.js +3 -3
  48. package/dist/utils/color.d.ts +11 -0
  49. package/dist/utils/contrastPairs.d.ts +39 -0
  50. package/dist/utils/createTheme.d.ts +29 -0
  51. package/dist/utils/customTheme.d.ts +1 -1
  52. package/dist/utils/date.d.ts +12 -1
  53. package/dist/utils/format.d.ts +8 -0
  54. package/dist/utils/positionPanel.d.ts +2 -2
  55. package/dist/utils/radix.d.ts +2 -2
  56. package/package.json +5 -2
  57. package/skills/octans-ui/SKILL.md +303 -0
  58. package/dist/components/Popper/index.d.ts +0 -2
@@ -1,11 +1,41 @@
1
1
  import { PageProps } from './types';
2
- declare var __VLS_21: {}, __VLS_60: {}, __VLS_77: {};
2
+ declare var __VLS_1: {}, __VLS_8: {
3
+ breadcrumbs: import('./types').BreadcrumbType[];
4
+ }, __VLS_18: {}, __VLS_20: {
5
+ title: string | undefined;
6
+ }, __VLS_22: {}, __VLS_31: {}, __VLS_39: {
7
+ subtitle: string | undefined;
8
+ }, __VLS_41: {
9
+ actions: import('../types').ActionType[];
10
+ groups: import('./types').ActionGroupType[];
11
+ }, __VLS_63: {
12
+ sections: {
13
+ title: string;
14
+ items: import('../types').ActionType[];
15
+ }[];
16
+ }, __VLS_76: {}, __VLS_93: {};
3
17
  type __VLS_Slots = {} & {
4
- badge?: (props: typeof __VLS_21) => any;
18
+ loader?: (props: typeof __VLS_1) => any;
19
+ } & {
20
+ breadcrumbs?: (props: typeof __VLS_8) => any;
21
+ } & {
22
+ header?: (props: typeof __VLS_18) => any;
23
+ } & {
24
+ title?: (props: typeof __VLS_20) => any;
25
+ } & {
26
+ help?: (props: typeof __VLS_22) => any;
27
+ } & {
28
+ badge?: (props: typeof __VLS_31) => any;
29
+ } & {
30
+ subtitle?: (props: typeof __VLS_39) => any;
31
+ } & {
32
+ secondaryActions?: (props: typeof __VLS_41) => any;
33
+ } & {
34
+ collapsedActions?: (props: typeof __VLS_63) => any;
5
35
  } & {
6
- primaryAction?: (props: typeof __VLS_60) => any;
36
+ primaryAction?: (props: typeof __VLS_76) => any;
7
37
  } & {
8
- default?: (props: typeof __VLS_77) => any;
38
+ default?: (props: typeof __VLS_93) => any;
9
39
  };
10
40
  declare const __VLS_base: import('vue').DefineComponent<PageProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
11
41
  save: () => any;
@@ -1,4 +1,4 @@
1
- import { PopperProps } from './types';
1
+ import { PopoverProps } from './types';
2
2
  declare function show(): void;
3
3
  declare function hide(): void;
4
4
  declare function toggle(): void;
@@ -18,16 +18,16 @@ type __VLS_Slots = {} & {
18
18
  } & {
19
19
  default?: (props: typeof __VLS_40) => any;
20
20
  };
21
- declare const __VLS_base: import('vue').DefineComponent<PopperProps, {
21
+ declare const __VLS_base: import('vue').DefineComponent<PopoverProps, {
22
22
  show: typeof show;
23
23
  hide: typeof hide;
24
24
  toggle: typeof toggle;
25
25
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
26
26
  "update:visible": (val: boolean) => any;
27
- }, string, import('vue').PublicProps, Readonly<PopperProps> & Readonly<{
27
+ }, string, import('vue').PublicProps, Readonly<PopoverProps> & Readonly<{
28
28
  "onUpdate:visible"?: ((val: boolean) => any) | undefined;
29
29
  }>, {
30
- placement: import('./types').PopperPlacementType;
30
+ placement: import('./types').PopoverPlacementType;
31
31
  teleportTo: string;
32
32
  disabled: boolean;
33
33
  autoTriggerToggle: boolean;
@@ -0,0 +1,90 @@
1
+ import { PopoverPlacementType, PopoverProps } from './types';
2
+ export { default as Popover } from './Popover.vue';
3
+ export * from './types';
4
+ /**
5
+ * @deprecated Renamed to `Popover`.
6
+ *
7
+ * The component was never built on popper.js — it wraps reka-ui's Popover
8
+ * primitives — so the name pointed at a library the library does not use, and
9
+ * away from the thing every design system calls this. The alias keeps existing
10
+ * imports working and will be removed in a future major.
11
+ */
12
+ export declare const Popper: {
13
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<PopoverProps> & Readonly<{
14
+ "onUpdate:visible"?: ((val: boolean) => any) | undefined;
15
+ }>, {
16
+ show: () => void;
17
+ hide: () => void;
18
+ toggle: () => void;
19
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
20
+ "update:visible": (val: boolean) => any;
21
+ }, import('vue').PublicProps, {
22
+ placement: PopoverPlacementType;
23
+ teleportTo: string;
24
+ disabled: boolean;
25
+ autoTriggerToggle: boolean;
26
+ autoHide: boolean;
27
+ hover: boolean;
28
+ zIndex: number;
29
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
30
+ P: {};
31
+ B: {};
32
+ D: {};
33
+ C: {};
34
+ M: {};
35
+ Defaults: {};
36
+ }, Readonly<PopoverProps> & Readonly<{
37
+ "onUpdate:visible"?: ((val: boolean) => any) | undefined;
38
+ }>, {
39
+ show: () => void;
40
+ hide: () => void;
41
+ toggle: () => void;
42
+ }, {}, {}, {}, {
43
+ placement: PopoverPlacementType;
44
+ teleportTo: string;
45
+ disabled: boolean;
46
+ autoTriggerToggle: boolean;
47
+ autoHide: boolean;
48
+ hover: boolean;
49
+ zIndex: number;
50
+ }>;
51
+ __isFragment?: never;
52
+ __isTeleport?: never;
53
+ __isSuspense?: never;
54
+ } & import('vue').ComponentOptionsBase<Readonly<PopoverProps> & Readonly<{
55
+ "onUpdate:visible"?: ((val: boolean) => any) | undefined;
56
+ }>, {
57
+ show: () => void;
58
+ hide: () => void;
59
+ toggle: () => void;
60
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
61
+ "update:visible": (val: boolean) => any;
62
+ }, string, {
63
+ placement: PopoverPlacementType;
64
+ teleportTo: string;
65
+ disabled: boolean;
66
+ autoTriggerToggle: boolean;
67
+ autoHide: boolean;
68
+ hover: boolean;
69
+ zIndex: number;
70
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
71
+ $slots: {
72
+ trigger?: (props: {
73
+ visible: boolean;
74
+ show: () => void;
75
+ hide: () => void;
76
+ toggle: () => void;
77
+ }) => any;
78
+ } & {
79
+ default?: (props: {
80
+ visible: boolean;
81
+ show: () => void;
82
+ hide: () => void;
83
+ toggle: () => void;
84
+ }) => any;
85
+ };
86
+ });
87
+ /** @deprecated Renamed to `PopoverProps`. */
88
+ export type PopperProps = PopoverProps;
89
+ /** @deprecated Renamed to `PopoverPlacementType`. */
90
+ export type PopperPlacementType = PopoverPlacementType;
@@ -1,7 +1,7 @@
1
- export type PopperPlacementType = 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end';
2
- export interface PopperProps {
1
+ export type PopoverPlacementType = 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end';
2
+ export interface PopoverProps {
3
3
  visible?: boolean;
4
- placement?: PopperPlacementType;
4
+ placement?: PopoverPlacementType;
5
5
  teleportTo?: string;
6
6
  disabled?: boolean;
7
7
  /**
@@ -14,6 +14,19 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
14
14
  error: {
15
15
  type: PropType<string | false | null>;
16
16
  };
17
+ /**
18
+ * Marks the field as required: an asterisk after the label, and
19
+ * `aria-required` on the control.
20
+ *
21
+ * Announced, not enforced — it deliberately does NOT set the native
22
+ * `required` attribute, so the browser's own validation bubble stays out
23
+ * of the way of whatever the app does about errors. Use `error` to show a
24
+ * failure.
25
+ */
26
+ required: {
27
+ type: BooleanConstructor;
28
+ default: boolean;
29
+ };
17
30
  /**
18
31
  * Help text to show below the control.
19
32
  */
@@ -105,6 +118,19 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
105
118
  error: {
106
119
  type: PropType<string | false | null>;
107
120
  };
121
+ /**
122
+ * Marks the field as required: an asterisk after the label, and
123
+ * `aria-required` on the control.
124
+ *
125
+ * Announced, not enforced — it deliberately does NOT set the native
126
+ * `required` attribute, so the browser's own validation bubble stays out
127
+ * of the way of whatever the app does about errors. Use `error` to show a
128
+ * failure.
129
+ */
130
+ required: {
131
+ type: BooleanConstructor;
132
+ default: boolean;
133
+ };
108
134
  /**
109
135
  * Help text to show below the control.
110
136
  */
@@ -173,6 +199,7 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
173
199
  };
174
200
  }>> & Readonly<{}>, {
175
201
  disabled: boolean;
202
+ required: boolean;
176
203
  modelValue: number;
177
204
  readonly: boolean;
178
205
  showInput: boolean;
@@ -45,6 +45,19 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
45
45
  helpLink: {
46
46
  type: PropType<string | false | null>;
47
47
  };
48
+ /**
49
+ * Marks the field as required: an asterisk after the label, and
50
+ * `aria-required` on the control.
51
+ *
52
+ * Announced, not enforced — it deliberately does NOT set the native
53
+ * `required` attribute, so the browser's own validation bubble stays out
54
+ * of the way of whatever the app does about errors. Use `error` to show a
55
+ * failure.
56
+ */
57
+ required: {
58
+ type: BooleanConstructor;
59
+ default: boolean;
60
+ };
48
61
  /**
49
62
  * A array of values when using the `multiple` mode, otherwise a single
50
63
  * value of any type.
@@ -376,6 +389,19 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
376
389
  helpLink: {
377
390
  type: PropType<string | false | null>;
378
391
  };
392
+ /**
393
+ * Marks the field as required: an asterisk after the label, and
394
+ * `aria-required` on the control.
395
+ *
396
+ * Announced, not enforced — it deliberately does NOT set the native
397
+ * `required` attribute, so the browser's own validation bubble stays out
398
+ * of the way of whatever the app does about errors. Use `error` to show a
399
+ * failure.
400
+ */
401
+ required: {
402
+ type: BooleanConstructor;
403
+ default: boolean;
404
+ };
379
405
  /**
380
406
  * A array of values when using the `multiple` mode, otherwise a single
381
407
  * value of any type.
@@ -594,6 +620,7 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
594
620
  }>, {
595
621
  disabled: boolean;
596
622
  loading: boolean;
623
+ required: boolean;
597
624
  modelValue: any;
598
625
  placeholder: string;
599
626
  readonly: boolean;
@@ -756,7 +783,7 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
756
783
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
757
784
  remove: () => any;
758
785
  }, import('vue').PublicProps, {
759
- tooltipPosition: import('../Popper').PopperPlacementType;
786
+ tooltipPosition: import('../Popover').PopoverPlacementType;
760
787
  required: boolean;
761
788
  }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
762
789
  P: {};
@@ -768,7 +795,7 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
768
795
  }, Readonly<import('../Tag/Tag.vue').TagProps> & Readonly<{
769
796
  onRemove?: (() => any) | undefined;
770
797
  }>, {}, {}, {}, {}, {
771
- tooltipPosition: import('../Popper').PopperPlacementType;
798
+ tooltipPosition: import('../Popover').PopoverPlacementType;
772
799
  required: boolean;
773
800
  }>;
774
801
  __isFragment?: never;
@@ -779,7 +806,7 @@ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractP
779
806
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
780
807
  remove: () => any;
781
808
  }, string, {
782
- tooltipPosition: import('../Popper').PopperPlacementType;
809
+ tooltipPosition: import('../Popover').PopoverPlacementType;
783
810
  required: boolean;
784
811
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
785
812
  $slots: {
@@ -0,0 +1,19 @@
1
+ import { SkeletonPageProps } from './types';
2
+ declare var __VLS_15: {};
3
+ type __VLS_Slots = {} & {
4
+ default?: (props: typeof __VLS_15) => any;
5
+ };
6
+ declare const __VLS_base: import('vue').DefineComponent<SkeletonPageProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<SkeletonPageProps> & Readonly<{}>, {
7
+ primaryAction: boolean;
8
+ size: "default" | "fullWidth" | "narrow" | "wide";
9
+ title: boolean;
10
+ cards: number;
11
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
12
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
15
+ type __VLS_WithSlots<T, S> = T & {
16
+ new (): {
17
+ $slots: S;
18
+ };
19
+ };
@@ -0,0 +1,2 @@
1
+ export { default as SkeletonPage } from './SkeletonPage.vue';
2
+ export * from './types';
@@ -0,0 +1,26 @@
1
+ import { PageProps } from '../Page';
2
+ export interface SkeletonPageProps {
3
+ /**
4
+ * The width preset, forwarded to the `Page` underneath.
5
+ *
6
+ * Set it to whatever the real page uses. That is the whole reason this
7
+ * renders a real `Page` rather than a loose stack of shapes — a skeleton at
8
+ * a different width moves the content sideways the moment it swaps out.
9
+ */
10
+ size?: PageProps['size'];
11
+ /**
12
+ * Draws a placeholder where the page title will be. On by default; turn it
13
+ * off for a page whose title you already know and can render for real.
14
+ */
15
+ title?: boolean;
16
+ /**
17
+ * Draws a button-shaped placeholder in the header, for a page that has a
18
+ * primary action.
19
+ */
20
+ primaryAction?: boolean;
21
+ /**
22
+ * How many skeleton cards to stack in the body. Ignored when the default
23
+ * slot is used.
24
+ */
25
+ cards?: number;
26
+ }
@@ -1,11 +1,11 @@
1
- import { PopperPlacementType } from '../Popper';
1
+ import { PopoverPlacementType } from '../Popover';
2
2
  export interface TagProps {
3
3
  /**
4
4
  * Disables the remove button.
5
5
  */
6
6
  required?: boolean;
7
7
  tooltip?: string | null;
8
- tooltipPosition?: PopperPlacementType;
8
+ tooltipPosition?: PopoverPlacementType;
9
9
  }
10
10
  declare var __VLS_1: {};
11
11
  type __VLS_Slots = {} & {
@@ -16,7 +16,7 @@ declare const __VLS_base: import('vue').DefineComponent<TagProps, {}, {}, {}, {}
16
16
  }, string, import('vue').PublicProps, Readonly<TagProps> & Readonly<{
17
17
  onRemove?: (() => any) | undefined;
18
18
  }>, {
19
- tooltipPosition: PopperPlacementType;
19
+ tooltipPosition: PopoverPlacementType;
20
20
  required: boolean;
21
21
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
22
22
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -127,4 +127,14 @@ export interface TextFieldProps {
127
127
  * fill from the right (e.g. thousands separators).
128
128
  */
129
129
  maskReversed?: boolean;
130
+ /**
131
+ * Marks the field as required: an asterisk after the label, and
132
+ * `aria-required` on the control.
133
+ *
134
+ * Announced, not enforced — it deliberately does NOT set the native
135
+ * `required` attribute, so the browser's own validation bubble stays out of
136
+ * the way of whatever the app does about errors. Use `error` to show a
137
+ * failure.
138
+ */
139
+ required?: boolean;
130
140
  }
@@ -82,6 +82,16 @@ export interface TimePickerProps {
82
82
  * when the field loses focus.
83
83
  */
84
84
  minuteStepStrict?: boolean;
85
+ /**
86
+ * Marks the field as required: an asterisk after the label, and
87
+ * `aria-required` on the control.
88
+ *
89
+ * Announced, not enforced — it deliberately does NOT set the native
90
+ * `required` attribute, so the browser's own validation bubble stays out of
91
+ * the way of whatever the app does about errors. Use `error` to show a
92
+ * failure.
93
+ */
94
+ required?: boolean;
85
95
  /**
86
96
  * @deprecated No longer used. The picker is now an inline input and does not
87
97
  * open a popper. Kept for backwards compatibility.
@@ -1,9 +1,9 @@
1
1
  import { ToggleSwitchProps } from './types';
2
- declare var __VLS_1: {
2
+ declare var __VLS_8: {
3
3
  checked: boolean;
4
4
  };
5
5
  type __VLS_Slots = {} & {
6
- handle?: (props: typeof __VLS_1) => any;
6
+ handle?: (props: typeof __VLS_8) => any;
7
7
  };
8
8
  declare const __VLS_base: import('vue').DefineComponent<ToggleSwitchProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
9
9
  "update:modelValue": (v: boolean) => any;
@@ -12,7 +12,13 @@ declare const __VLS_base: import('vue').DefineComponent<ToggleSwitchProps, {}, {
12
12
  }>, {
13
13
  disabled: boolean;
14
14
  size: "small" | "medium" | "large";
15
+ label: string | false | null;
16
+ error: string | false | null;
15
17
  color: string;
18
+ helpText: string | false | null;
19
+ required: boolean;
20
+ helpTextHtml: string | false | null;
21
+ helpLink: string | false | null;
16
22
  checked: boolean;
17
23
  trueValue: any;
18
24
  falseValue: any;
@@ -1,4 +1,33 @@
1
1
  export interface ToggleSwitchProps {
2
+ /**
3
+ * The title of the field, drawn above the switch.
4
+ *
5
+ * A switch with any of `label` / `error` / `helpText` / `helpTextHtml` /
6
+ * `helpLink` set is wrapped in `Labelled`, like every other form control in
7
+ * the library. Without them the markup is the bare switch, as it always was.
8
+ */
9
+ label?: string | false | null;
10
+ /**
11
+ * Displays the value as an error message below the switch.
12
+ */
13
+ error?: string | false | null;
14
+ /**
15
+ * Displays the value as help text below the switch.
16
+ */
17
+ helpText?: string | false | null;
18
+ /**
19
+ * Renders help text as raw HTML. Use with caution.
20
+ */
21
+ helpTextHtml?: string | false | null;
22
+ /**
23
+ * Renders a help icon next to the label which links to an external page.
24
+ */
25
+ helpLink?: string | false | null;
26
+ /**
27
+ * Marks the field as required: an asterisk after the label, and
28
+ * `aria-required` on the switch.
29
+ */
30
+ required?: boolean;
2
31
  /**
3
32
  * The bound value / v-model.
4
33
  */
@@ -1,6 +1,6 @@
1
- import { PopperPlacementType } from '../Popper';
1
+ import { PopoverPlacementType } from '../Popover';
2
2
  export interface TooltipProps {
3
- placement?: PopperPlacementType;
3
+ placement?: PopoverPlacementType;
4
4
  content?: string;
5
5
  }
6
6
  declare var __VLS_26: {}, __VLS_34: {};
@@ -39,6 +39,7 @@ export * from './GradientPicker';
39
39
  export * from './Heading';
40
40
  export * from './Icon';
41
41
  export * from './InlineError';
42
+ export * from './KeyboardKey';
42
43
  export * from './Labelled';
43
44
  export * from './Layout';
44
45
  export * from './Link';
@@ -54,7 +55,7 @@ export * from './OtpInput';
54
55
  export * from './Page';
55
56
  export * from './PageActions';
56
57
  export * from './Pagination';
57
- export * from './Popper';
58
+ export * from './Popover';
58
59
  export * from './PreventAutoComplete';
59
60
  export * from './ProgressBar';
60
61
  export * from './RadioButton';
@@ -69,6 +70,7 @@ export * from './Sheet';
69
70
  export * from './SkeletonBodyText';
70
71
  export * from './SkeletonCard';
71
72
  export * from './SkeletonDisplayText';
73
+ export * from './SkeletonPage';
72
74
  export * from './Spinner';
73
75
  export * from './Splitter';
74
76
  export * from './Stack';
@@ -10,6 +10,11 @@ export interface ActionType {
10
10
  type?: ActionTypeType;
11
11
  icon?: string;
12
12
  disabled?: boolean;
13
+ /**
14
+ * Swaps the button's label for a spinner while the action is in flight.
15
+ * `disabled` already stops a second submit; this is what SAYS so.
16
+ */
17
+ loading?: boolean;
13
18
  url?: string;
14
19
  tooltip?: string;
15
20
  tooltipPosition?: ActionTooltipPositionType;
package/dist/lib.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { format } from './utils/format';
2
- import { setLocale } from './utils/date';
2
+ import { setLocale, setTimezone, getTimezone } from './utils/date';
3
3
  import { setTheme, toggleTheme, getResolvedTheme, getThemePreference, onThemeChange, persistTheme } from './utils/theme';
4
4
  import { translate, setTranslations, addTranslations, setTranslationLocale, getTranslationLocale, getAvailableLocales, TranslationDictionary } from './utils/translate';
5
5
  import * as components from './components/all';
@@ -12,6 +12,7 @@ interface PluginOptions {
12
12
  }
13
13
  export * from './components/all';
14
14
  export { addCollection, addIcon } from '@iconify/vue';
15
+ export { setTimezone, getTimezone } from './utils/date';
15
16
  export { translate, $t, setTranslations, addTranslations, setTranslationLocale, getTranslationLocale, getAvailableLocales, type TranslationDictionary } from './utils/translate';
16
17
  export { setTheme, toggleTheme, getResolvedTheme, getThemePreference, onThemeChange, persistTheme, type ThemeType, type ThemePreferenceType } from './utils/theme';
17
18
  export { listCustomThemes, getCustomTheme, saveCustomTheme, deleteCustomTheme, applyCustomTheme, clearCustomTheme, restoreCustomTheme, getActiveCustomThemeId, getResolvedTokenValue, exportCustomTheme, importCustomTheme, createThemeId, ThemeImportError, type CustomTheme } from './utils/customTheme';
@@ -29,6 +30,8 @@ declare const UI: {
29
30
  setLocale: typeof setLocale;
30
31
  translate: typeof translate;
31
32
  t: typeof translate;
33
+ setTimezone: typeof setTimezone;
34
+ getTimezone: typeof getTimezone;
32
35
  setTranslations: typeof setTranslations;
33
36
  addTranslations: typeof addTranslations;
34
37
  setTranslationLocale: typeof setTranslationLocale;
package/dist/reset.css ADDED
@@ -0,0 +1,73 @@
1
+ /**
2
+ * Octans page reset — OPT IN.
3
+ *
4
+ * import '@octans/ui/style.css'
5
+ * import '@octans/ui/reset.css' // only when Octans owns the whole page
6
+ *
7
+ * The main stylesheet deliberately resets nothing outside `.UIElement`, so the
8
+ * library can be dropped into a page it doesn't own without moving anything.
9
+ * That is the right default, and it is the wrong one for an app where Octans
10
+ * IS the UI: everything the app renders itself — the shell, the layout
11
+ * wrappers, the nav — silently falls back to browser defaults. Serif text,
12
+ * the user agent's 8px body margin, `content-box` sizing, and a body with no
13
+ * height so it grows past the viewport and earns a second scrollbar.
14
+ *
15
+ * This file is that missing layer and nothing more. It is deliberately small:
16
+ * it states the four things the UA gets wrong for a full-page app, and leaves
17
+ * everything else — image display, list markers, heading sizes — alone.
18
+ *
19
+ * THIS FILE IS PLAIN CSS AND IS COPIED TO dist/ VERBATIM. It is not part of
20
+ * the JS graph, so it cannot use Sass, and every token it reads carries a
21
+ * literal fallback for the case where it is imported without `style.css`.
22
+ */
23
+
24
+ *,
25
+ *::before,
26
+ *::after {
27
+ box-sizing: border-box;
28
+ }
29
+
30
+ /* `height` on the root so percentages below it resolve; `min-height` — not
31
+ `height` — on the body, so a document taller than the viewport still
32
+ scrolls normally instead of overflowing a fixed-height box. */
33
+ html {
34
+ height: 100%;
35
+ }
36
+
37
+ body {
38
+ min-height: 100%;
39
+ margin: 0;
40
+ padding: 0;
41
+ background-color: var(--octans-surface-app, #eff1f5);
42
+ color: var(--octans-text, #2c333d);
43
+ font-family: var(
44
+ --octans-font,
45
+ system-ui,
46
+ -apple-system,
47
+ 'Segoe UI',
48
+ Roboto,
49
+ 'Noto Sans',
50
+ 'Liberation Sans',
51
+ Arial,
52
+ sans-serif,
53
+ 'Apple Color Emoji',
54
+ 'Segoe UI Emoji'
55
+ );
56
+ /* Matches `.UIElement`. Without it, app-authored markup renders at the UA's
57
+ 16px directly beside 14px Octans components. */
58
+ font-size: 14px;
59
+ -webkit-font-smoothing: antialiased;
60
+ }
61
+
62
+ /* Form controls inherit neither font nor colour — the trap the skill
63
+ documents at component level, applied once at page level. `font: inherit`
64
+ rather than `font-family` alone, because size, weight and line-height are
65
+ all reset by the UA too. */
66
+ button,
67
+ input,
68
+ select,
69
+ textarea,
70
+ optgroup {
71
+ font: inherit;
72
+ color: inherit;
73
+ }