@octans/ui 1.0.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 (283) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +226 -0
  3. package/bin/octans-icons.mjs +208 -0
  4. package/dist/components/ActionList/ActionList.vue.d.ts +77 -0
  5. package/dist/components/ActionList/ActionListButton.vue.d.ts +85 -0
  6. package/dist/components/ActionList/ActionListMenu.vue.d.ts +18 -0
  7. package/dist/components/ActionList/index.d.ts +1 -0
  8. package/dist/components/AppFrame/AppFrame.vue.d.ts +26 -0
  9. package/dist/components/AppFrame/context.d.ts +40 -0
  10. package/dist/components/AppFrame/index.d.ts +3 -0
  11. package/dist/components/AppFrame/types.d.ts +52 -0
  12. package/dist/components/Badge/Badge.vue.d.ts +125 -0
  13. package/dist/components/Badge/index.d.ts +1 -0
  14. package/dist/components/Banner/Banner.vue.d.ts +239 -0
  15. package/dist/components/Banner/index.d.ts +1 -0
  16. package/dist/components/Button/Button.vue.d.ts +284 -0
  17. package/dist/components/Button/ButtonGroup.vue.d.ts +44 -0
  18. package/dist/components/Button/ButtonGroupItem.vue.d.ts +5 -0
  19. package/dist/components/Button/index.d.ts +3 -0
  20. package/dist/components/Calendar/Calendar.vue.d.ts +15 -0
  21. package/dist/components/Calendar/index.d.ts +2 -0
  22. package/dist/components/Calendar/types.d.ts +39 -0
  23. package/dist/components/CalendarHeatmap/CalendarHeatmap.vue.d.ts +21 -0
  24. package/dist/components/CalendarHeatmap/index.d.ts +2 -0
  25. package/dist/components/CalendarHeatmap/types.d.ts +168 -0
  26. package/dist/components/Caption/Caption.vue.d.ts +5 -0
  27. package/dist/components/Caption/index.d.ts +1 -0
  28. package/dist/components/Card/Card.vue.d.ts +82 -0
  29. package/dist/components/Card/CardSection.vue.d.ts +89 -0
  30. package/dist/components/Card/index.d.ts +2 -0
  31. package/dist/components/Card/utils.d.ts +4 -0
  32. package/dist/components/Checkbox/Checkbox.vue.d.ts +171 -0
  33. package/dist/components/Checkbox/CheckboxControl.vue.d.ts +59 -0
  34. package/dist/components/Checkbox/index.d.ts +2 -0
  35. package/dist/components/Choice/Choice.vue.d.ts +102 -0
  36. package/dist/components/Choice/index.d.ts +1 -0
  37. package/dist/components/ChoiceList/ChoiceList.vue.d.ts +199 -0
  38. package/dist/components/ChoiceList/index.d.ts +2 -0
  39. package/dist/components/ChoiceList/types.d.ts +31 -0
  40. package/dist/components/ColorPicker/ColorPicker.vue.d.ts +18 -0
  41. package/dist/components/ColorPicker/index.d.ts +2 -0
  42. package/dist/components/ColorPicker/types.d.ts +62 -0
  43. package/dist/components/ColorSelector/ColorSelector.vue.d.ts +34 -0
  44. package/dist/components/ColorSelector/index.d.ts +2 -0
  45. package/dist/components/ColorSelector/types.d.ts +143 -0
  46. package/dist/components/DataTable/BulkActions.vue.d.ts +282 -0
  47. package/dist/components/DataTable/DataTable.vue.d.ts +40 -0
  48. package/dist/components/DataTable/DataTableFooter.vue.d.ts +22 -0
  49. package/dist/components/DataTable/index.d.ts +2 -0
  50. package/dist/components/DataTable/types.d.ts +249 -0
  51. package/dist/components/DatePicker/DatePicker.vue.d.ts +17 -0
  52. package/dist/components/DatePicker/index.d.ts +4 -0
  53. package/dist/components/DatePicker/types.d.ts +57 -0
  54. package/dist/components/Divider/Divider.vue.d.ts +20 -0
  55. package/dist/components/Divider/index.d.ts +2 -0
  56. package/dist/components/Divider/types.d.ts +76 -0
  57. package/dist/components/EventDelegator/EventDelegator.vue.d.ts +18 -0
  58. package/dist/components/EventDelegator/index.d.ts +1 -0
  59. package/dist/components/EventDelegator/utils.d.ts +25 -0
  60. package/dist/components/FileInput/DropZone.vue.d.ts +67 -0
  61. package/dist/components/FileInput/FileInput.vue.d.ts +422 -0
  62. package/dist/components/FileInput/ItemList.vue.d.ts +109 -0
  63. package/dist/components/FileInput/index.d.ts +1 -0
  64. package/dist/components/FileInput/utils.d.ts +15 -0
  65. package/dist/components/Filters/FilterActions.vue.d.ts +236 -0
  66. package/dist/components/Filters/FilterItem.vue.d.ts +813 -0
  67. package/dist/components/Filters/Filters.vue.d.ts +1627 -0
  68. package/dist/components/Filters/index.d.ts +1 -0
  69. package/dist/components/Filters/utils.d.ts +1 -0
  70. package/dist/components/FooterHelp/FooterHelp.vue.d.ts +16 -0
  71. package/dist/components/FooterHelp/index.d.ts +1 -0
  72. package/dist/components/FormLayout/FormLayout.vue.d.ts +5 -0
  73. package/dist/components/FormLayout/FormLayoutGroup.vue.d.ts +17 -0
  74. package/dist/components/FormLayout/index.d.ts +2 -0
  75. package/dist/components/Formatter/Formatter.vue.d.ts +42 -0
  76. package/dist/components/Formatter/index.d.ts +1 -0
  77. package/dist/components/GlobalNav/GlobalNav.vue.d.ts +33 -0
  78. package/dist/components/GlobalNav/index.d.ts +2 -0
  79. package/dist/components/GlobalNav/types.d.ts +64 -0
  80. package/dist/components/GradientPicker/GradientPicker.vue.d.ts +20 -0
  81. package/dist/components/GradientPicker/index.d.ts +2 -0
  82. package/dist/components/GradientPicker/types.d.ts +74 -0
  83. package/dist/components/Heading/Heading.vue.d.ts +18 -0
  84. package/dist/components/Heading/index.d.ts +1 -0
  85. package/dist/components/Icon/Icon.vue.d.ts +112 -0
  86. package/dist/components/Icon/iconBundle.d.ts +1 -0
  87. package/dist/components/Icon/index.d.ts +1 -0
  88. package/dist/components/InlineError/InlineError.vue.d.ts +6 -0
  89. package/dist/components/InlineError/index.d.ts +1 -0
  90. package/dist/components/Labelled/Labelled.vue.d.ts +110 -0
  91. package/dist/components/Labelled/index.d.ts +1 -0
  92. package/dist/components/Layout/Layout.vue.d.ts +13 -0
  93. package/dist/components/Layout/LayoutSection.vue.d.ts +16 -0
  94. package/dist/components/Layout/LayoutSectionAnnotated.vue.d.ts +34 -0
  95. package/dist/components/Layout/index.d.ts +3 -0
  96. package/dist/components/LineClamper/LineClamper.vue.d.ts +16 -0
  97. package/dist/components/LineClamper/index.d.ts +2 -0
  98. package/dist/components/LineClamper/types.d.ts +7 -0
  99. package/dist/components/Link/Link.vue.d.ts +19 -0
  100. package/dist/components/Link/index.d.ts +1 -0
  101. package/dist/components/List/List.vue.d.ts +15 -0
  102. package/dist/components/List/ListItem.vue.d.ts +16 -0
  103. package/dist/components/List/index.d.ts +3 -0
  104. package/dist/components/List/types.d.ts +51 -0
  105. package/dist/components/LoaderOverlay/LoaderOverlay.vue.d.ts +18 -0
  106. package/dist/components/LoaderOverlay/host.d.ts +6 -0
  107. package/dist/components/LoaderOverlay/index.d.ts +26 -0
  108. package/dist/components/LoaderOverlay/store.d.ts +7 -0
  109. package/dist/components/LoaderOverlay/types.d.ts +24 -0
  110. package/dist/components/LoadingBar/LoadingBar.vue.d.ts +7 -0
  111. package/dist/components/LoadingBar/host.d.ts +6 -0
  112. package/dist/components/LoadingBar/index.d.ts +28 -0
  113. package/dist/components/LoadingBar/store.d.ts +6 -0
  114. package/dist/components/LoadingBar/types.d.ts +16 -0
  115. package/dist/components/MaybeMountingPortal/MaybeMountingPortal.vue.d.ts +53 -0
  116. package/dist/components/MaybeMountingPortal/index.d.ts +1 -0
  117. package/dist/components/MaybeRouterLink/MaybeRouterLink.vue.d.ts +34 -0
  118. package/dist/components/MaybeRouterLink/index.d.ts +2 -0
  119. package/dist/components/MaybeRouterLink/types.d.ts +49 -0
  120. package/dist/components/Modal/Modal.vue.d.ts +28 -0
  121. package/dist/components/Modal/ModalBackdrop.vue.d.ts +12 -0
  122. package/dist/components/Modal/ModalHost.vue.d.ts +3 -0
  123. package/dist/components/Modal/ModalStackItem.vue.d.ts +14 -0
  124. package/dist/components/Modal/api/AlertModal.vue.d.ts +10 -0
  125. package/dist/components/Modal/api/Base.d.ts +12 -0
  126. package/dist/components/Modal/api/ConfirmModal.vue.d.ts +10 -0
  127. package/dist/components/Modal/api/GenericModal.vue.d.ts +10 -0
  128. package/dist/components/Modal/api/PromptModal.vue.d.ts +10 -0
  129. package/dist/components/Modal/api/types.d.ts +110 -0
  130. package/dist/components/Modal/host.d.ts +2 -0
  131. package/dist/components/Modal/index.d.ts +10 -0
  132. package/dist/components/Modal/manager.d.ts +80 -0
  133. package/dist/components/Modal/types.d.ts +49 -0
  134. package/dist/components/NavField/NavField.vue.d.ts +223 -0
  135. package/dist/components/NavField/index.d.ts +1 -0
  136. package/dist/components/Navigation/Navigation.vue.d.ts +47 -0
  137. package/dist/components/Navigation/components/Item.vue.d.ts +10 -0
  138. package/dist/components/Navigation/components/Section.vue.d.ts +13 -0
  139. package/dist/components/Navigation/index.d.ts +2 -0
  140. package/dist/components/Navigation/types.d.ts +117 -0
  141. package/dist/components/OtpInput/OtpInput.vue.d.ts +21 -0
  142. package/dist/components/OtpInput/index.d.ts +2 -0
  143. package/dist/components/OtpInput/types.d.ts +87 -0
  144. package/dist/components/Page/Page.vue.d.ts +34 -0
  145. package/dist/components/Page/index.d.ts +2 -0
  146. package/dist/components/Page/types.d.ts +75 -0
  147. package/dist/components/PageActions/PageActions.vue.d.ts +6 -0
  148. package/dist/components/PageActions/index.d.ts +2 -0
  149. package/dist/components/PageActions/types.d.ts +17 -0
  150. package/dist/components/Pagination/Pagination.vue.d.ts +22 -0
  151. package/dist/components/Pagination/index.d.ts +1 -0
  152. package/dist/components/Popper/Popper.vue.d.ts +45 -0
  153. package/dist/components/Popper/index.d.ts +2 -0
  154. package/dist/components/Popper/types.d.ts +29 -0
  155. package/dist/components/PreventAutoComplete/PreventAutoComplete.vue.d.ts +24 -0
  156. package/dist/components/PreventAutoComplete/index.d.ts +1 -0
  157. package/dist/components/ProgressBar/ProgressBar.vue.d.ts +48 -0
  158. package/dist/components/ProgressBar/index.d.ts +2 -0
  159. package/dist/components/RadioButton/RadioButton.vue.d.ts +143 -0
  160. package/dist/components/RadioButton/RadioButtonControl.vue.d.ts +50 -0
  161. package/dist/components/RadioButton/index.d.ts +2 -0
  162. package/dist/components/RangeSlider/RangeSlider.vue.d.ts +303 -0
  163. package/dist/components/RangeSlider/index.d.ts +1 -0
  164. package/dist/components/Rating/Rating.vue.d.ts +20 -0
  165. package/dist/components/Rating/index.d.ts +2 -0
  166. package/dist/components/Rating/types.d.ts +78 -0
  167. package/dist/components/ResourceList/ResourceItem.vue.d.ts +17 -0
  168. package/dist/components/ResourceList/ResourceList.vue.d.ts +19 -0
  169. package/dist/components/ResourceList/index.d.ts +3 -0
  170. package/dist/components/ResourceList/types.d.ts +19 -0
  171. package/dist/components/SaveBar/SaveBar.vue.d.ts +15 -0
  172. package/dist/components/SaveBar/index.d.ts +4 -0
  173. package/dist/components/SaveBar/store.d.ts +56 -0
  174. package/dist/components/SaveBar/types.d.ts +42 -0
  175. package/dist/components/SaveBarController/SaveBarController.vue.d.ts +40 -0
  176. package/dist/components/SaveBarController/index.d.ts +1 -0
  177. package/dist/components/ScrollPane/ScrollPane.vue.d.ts +24 -0
  178. package/dist/components/ScrollPane/index.d.ts +2 -0
  179. package/dist/components/ScrollPane/types.d.ts +64 -0
  180. package/dist/components/SegmentedControl/SegmentedControl.vue.d.ts +39 -0
  181. package/dist/components/SegmentedControl/index.d.ts +2 -0
  182. package/dist/components/SegmentedControl/types.d.ts +119 -0
  183. package/dist/components/Select/Select.vue.d.ts +901 -0
  184. package/dist/components/Select/index.d.ts +3 -0
  185. package/dist/components/Sheet/Sheet.vue.d.ts +41 -0
  186. package/dist/components/Sheet/index.d.ts +2 -0
  187. package/dist/components/Sheet/manager.d.ts +34 -0
  188. package/dist/components/Sheet/types.d.ts +92 -0
  189. package/dist/components/SkeletonBodyText/SkeletonBodyText.vue.d.ts +17 -0
  190. package/dist/components/SkeletonBodyText/index.d.ts +1 -0
  191. package/dist/components/SkeletonCard/SkeletonCard.vue.d.ts +34 -0
  192. package/dist/components/SkeletonCard/index.d.ts +1 -0
  193. package/dist/components/SkeletonDisplayText/SkeletonDisplayText.vue.d.ts +17 -0
  194. package/dist/components/SkeletonDisplayText/index.d.ts +1 -0
  195. package/dist/components/Spinner/Spinner.vue.d.ts +52 -0
  196. package/dist/components/Spinner/index.d.ts +1 -0
  197. package/dist/components/Splitter/Splitter.vue.d.ts +60 -0
  198. package/dist/components/Splitter/index.d.ts +2 -0
  199. package/dist/components/Splitter/types.d.ts +177 -0
  200. package/dist/components/Stack/Stack.vue.d.ts +130 -0
  201. package/dist/components/Stack/StackItem.vue.d.ts +23 -0
  202. package/dist/components/Stack/index.d.ts +2 -0
  203. package/dist/components/StatGroup/Stat.vue.d.ts +16 -0
  204. package/dist/components/StatGroup/StatGroup.vue.d.ts +17 -0
  205. package/dist/components/StatGroup/index.d.ts +3 -0
  206. package/dist/components/StatGroup/types.d.ts +42 -0
  207. package/dist/components/Sticky/Sticky.vue.d.ts +27 -0
  208. package/dist/components/Sticky/index.d.ts +2 -0
  209. package/dist/components/Sticky/types.d.ts +24 -0
  210. package/dist/components/SyntaxHighlighter/SyntaxHighlighter.vue.d.ts +12 -0
  211. package/dist/components/SyntaxHighlighter/index.d.ts +2 -0
  212. package/dist/components/SyntaxHighlighter/types.d.ts +10 -0
  213. package/dist/components/Tabs/Tabs.vue.d.ts +23 -0
  214. package/dist/components/Tabs/index.d.ts +2 -0
  215. package/dist/components/Tabs/types.d.ts +19 -0
  216. package/dist/components/Tag/Tag.vue.d.ts +29 -0
  217. package/dist/components/Tag/index.d.ts +1 -0
  218. package/dist/components/TextContainer/TextContainer.vue.d.ts +13 -0
  219. package/dist/components/TextContainer/index.d.ts +1 -0
  220. package/dist/components/TextField/TextField.vue.d.ts +38 -0
  221. package/dist/components/TextField/index.d.ts +2 -0
  222. package/dist/components/TextField/types.d.ts +130 -0
  223. package/dist/components/TextStyle/TextStyle.vue.d.ts +15 -0
  224. package/dist/components/TextStyle/index.d.ts +1 -0
  225. package/dist/components/Thumbnail/Thumbnail.vue.d.ts +17 -0
  226. package/dist/components/Thumbnail/index.d.ts +2 -0
  227. package/dist/components/Thumbnail/types.d.ts +32 -0
  228. package/dist/components/TimePicker/TimePicker.vue.d.ts +25 -0
  229. package/dist/components/TimePicker/index.d.ts +2 -0
  230. package/dist/components/TimePicker/types.d.ts +90 -0
  231. package/dist/components/TimezonePicker/TimezonePicker.vue.d.ts +15 -0
  232. package/dist/components/TimezonePicker/index.d.ts +2 -0
  233. package/dist/components/TimezonePicker/types.d.ts +50 -0
  234. package/dist/components/TimezonePicker/zoneCountries.d.ts +2 -0
  235. package/dist/components/ToastManager/ProgressBar.vue.d.ts +8 -0
  236. package/dist/components/ToastManager/Toast.vue.d.ts +14 -0
  237. package/dist/components/ToastManager/ToastManager.vue.d.ts +19 -0
  238. package/dist/components/ToastManager/host.d.ts +14 -0
  239. package/dist/components/ToastManager/index.d.ts +24 -0
  240. package/dist/components/ToastManager/manager.d.ts +45 -0
  241. package/dist/components/ToastManager/types.d.ts +44 -0
  242. package/dist/components/ToggleSwitch/ToggleSwitch.vue.d.ts +35 -0
  243. package/dist/components/ToggleSwitch/index.d.ts +2 -0
  244. package/dist/components/ToggleSwitch/types.d.ts +84 -0
  245. package/dist/components/Tooltip/Tooltip.vue.d.ts +20 -0
  246. package/dist/components/Tooltip/index.d.ts +1 -0
  247. package/dist/components/UiProvider/UiProvider.vue.d.ts +16 -0
  248. package/dist/components/UiProvider/index.d.ts +2 -0
  249. package/dist/components/UiProvider/types.d.ts +2 -0
  250. package/dist/components/UiProvider/utils.d.ts +5 -0
  251. package/dist/components/UnstyledLink/UnstyledLink.vue.d.ts +5 -0
  252. package/dist/components/UnstyledLink/index.d.ts +1 -0
  253. package/dist/components/all.d.ts +92 -0
  254. package/dist/components/types.d.ts +74 -0
  255. package/dist/globalExtensions.d.ts +7 -0
  256. package/dist/i18n/en.json.d.ts +60 -0
  257. package/dist/lib.d.ts +67 -0
  258. package/dist/lib.umd.d.ts +1 -0
  259. package/dist/style.css +2 -0
  260. package/dist/test/setup.d.ts +1 -0
  261. package/dist/ui.js +20051 -0
  262. package/dist/ui.umd.js +10 -0
  263. package/dist/utils/autoHost.d.ts +27 -0
  264. package/dist/utils/color.d.ts +112 -0
  265. package/dist/utils/colorRamp.d.ts +51 -0
  266. package/dist/utils/createTheme.d.ts +52 -0
  267. package/dist/utils/customTheme.d.ts +73 -0
  268. package/dist/utils/date.d.ts +4 -0
  269. package/dist/utils/debounce.d.ts +3 -0
  270. package/dist/utils/deferredPromise.d.ts +6 -0
  271. package/dist/utils/format.d.ts +9 -0
  272. package/dist/utils/fuzzy.d.ts +33 -0
  273. package/dist/utils/gradient.d.ts +83 -0
  274. package/dist/utils/index.d.ts +31 -0
  275. package/dist/utils/loader.d.ts +1 -0
  276. package/dist/utils/positionPanel.d.ts +32 -0
  277. package/dist/utils/radix.d.ts +6 -0
  278. package/dist/utils/theme.d.ts +42 -0
  279. package/dist/utils/timezone.d.ts +66 -0
  280. package/dist/utils/tokens.d.ts +62 -0
  281. package/dist/utils/translate.d.ts +27 -0
  282. package/dist/zoneCountries-CWZGMHyp.js +353 -0
  283. package/package.json +120 -0
@@ -0,0 +1,15 @@
1
+ import { TimezonePickerProps } from './types';
2
+ declare const __VLS_export: import('vue').DefineComponent<TimezonePickerProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
3
+ "update:modelValue": (value: string | undefined) => any;
4
+ }, string, import('vue').PublicProps, Readonly<TimezonePickerProps> & Readonly<{
5
+ "onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
6
+ }>, {
7
+ disabled: boolean;
8
+ inline: boolean;
9
+ readonly: boolean;
10
+ condensed: boolean;
11
+ guess: boolean;
12
+ groupByCountry: boolean;
13
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export { default as TimezonePicker } from './TimezonePicker.vue';
2
+ export * from './types';
@@ -0,0 +1,50 @@
1
+ export interface TimezonePickerProps {
2
+ /** The selected IANA timezone id, e.g. `Australia/Sydney`. */
3
+ modelValue?: string;
4
+ label?: string;
5
+ error?: string;
6
+ /** Help text to show below the control. */
7
+ helpText?: string;
8
+ /** Renders help text as raw HTML. Use with caution. */
9
+ helpTextHtml?: string;
10
+ /** Renders a help icon next to the label which links to an external page. */
11
+ helpLink?: string;
12
+ disabled?: boolean;
13
+ readonly?: boolean;
14
+ /**
15
+ * When `true` and `modelValue` is empty, the picker guesses the user's
16
+ * timezone on mount and emits it.
17
+ */
18
+ guess?: boolean;
19
+ /**
20
+ * Shows a Location field above the timezone field and narrows the list to
21
+ * that country's zones. **On by default** — picking a country first turns
22
+ * ~420 zones into a handful, which is what makes the picker feel manageable.
23
+ *
24
+ * Set to `false` for a single searchable list of every zone, which suits
25
+ * users who already know the city they want. That also avoids loading the
26
+ * bundled zone → country map, which is imported on demand.
27
+ */
28
+ groupByCountry?: boolean;
29
+ /**
30
+ * Renders the fields directly instead of behind a summary field and a modal.
31
+ *
32
+ * Use this when the picker already sits inside a form that has its own save
33
+ * action — the modal's Update/Cancel would then be a second, redundant
34
+ * commit step.
35
+ *
36
+ * **Changes emit immediately.** There is no Update button to press, so
37
+ * `update:modelValue` fires as soon as a selection is made. Selecting a
38
+ * country also emits, because it moves the value to that country's first
39
+ * zone.
40
+ */
41
+ inline?: boolean;
42
+ /**
43
+ * Narrows the fields so they stay side by side in tighter containers.
44
+ *
45
+ * Inline fields already sit side by side and wrap when there isn't room;
46
+ * this lowers the width at which they wrap. Only applies when `inline` and
47
+ * `groupByCountry` are both on.
48
+ */
49
+ condensed?: boolean;
50
+ }
@@ -0,0 +1,2 @@
1
+ export declare const ZONE_COUNTRIES: Record<string, string>;
2
+ export default ZONE_COUNTRIES;
@@ -0,0 +1,8 @@
1
+ export interface ProgressBarProps {
2
+ value?: number;
3
+ }
4
+ declare const __VLS_export: import('vue').DefineComponent<ProgressBarProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ProgressBarProps> & Readonly<{}>, {
5
+ value: number;
6
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
@@ -0,0 +1,14 @@
1
+ import { ToastProps } from './types';
2
+ declare const __VLS_export: import('vue').DefineComponent<ToastProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
3
+ pause: (...args: any[]) => void;
4
+ remove: (...args: any[]) => void;
5
+ resume: (...args: any[]) => void;
6
+ }, string, import('vue').PublicProps, Readonly<ToastProps> & Readonly<{
7
+ onPause?: ((...args: any[]) => any) | undefined;
8
+ onRemove?: ((...args: any[]) => any) | undefined;
9
+ onResume?: ((...args: any[]) => any) | undefined;
10
+ }>, {
11
+ contrasting: boolean;
12
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
@@ -0,0 +1,19 @@
1
+ import { ToastPosition } from './types';
2
+ type __VLS_Props = {
3
+ position?: ToastPosition;
4
+ offset?: number | {
5
+ x?: number;
6
+ y?: number;
7
+ };
8
+ contrasting?: boolean;
9
+ };
10
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
11
+ position: ToastPosition;
12
+ contrasting: boolean;
13
+ offset: number | {
14
+ x?: number;
15
+ y?: number;
16
+ };
17
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Removes the auto-mounted host. `app.unmount()` is a real teardown — leave
3
+ * transitions are skipped but every `onUnmounted` runs — so nothing is left
4
+ * behind on the page or in memory.
5
+ */
6
+ export declare function teardownHost(): void;
7
+ /**
8
+ * Mounts the default host the first time a toast is shown.
9
+ *
10
+ * Does nothing if the consumer already has a `<ToastManager>` of their own, and
11
+ * nothing at all without a DOM — `toast()` under SSR still records the item, it
12
+ * just has nowhere to draw it until the client takes over.
13
+ */
14
+ export declare function ensureHost(): void;
@@ -0,0 +1,24 @@
1
+ import { default as ToastManager } from './ToastManager.vue';
2
+ import { ToastManagerConfig, ToastManagerItemType } from './types';
3
+ /**
4
+ * Shows a toast, and returns it. The returned object is reactive: assigning to
5
+ * `title`, `content`, `progress` or `loading` updates the toast on screen, and
6
+ * `remove()` dismisses it.
7
+ *
8
+ * A host is mounted on first use, so nothing has to be placed in the page for
9
+ * this to work. Render a `<ToastManager>` yourself if you want to control the
10
+ * position with props — `toast()` will use it.
11
+ */
12
+ declare function toast(opts: Partial<ToastManagerItemType>): ToastManagerItemType;
13
+ declare namespace toast {
14
+ var clearAll: () => void;
15
+ var configure: (config: ToastManagerConfig) => void;
16
+ var promise: <T>(promise: Promise<T>, opts: {
17
+ loading: string | Partial<ToastManagerItemType>;
18
+ success?: ToastPromiseState;
19
+ error?: ToastPromiseState;
20
+ }) => ToastManagerItemType;
21
+ }
22
+ type ToastPromiseState = string | Partial<ToastManagerItemType> | ((value: any) => string | Partial<ToastManagerItemType>);
23
+ export { toast, ToastManager };
24
+ export type { ToastItemType, ToastManagerItemType, ToastManagerConfig, ToastActionType, ToastPosition, ToastTone } from './types';
@@ -0,0 +1,45 @@
1
+ import { ToastManagerConfig, ToastManagerItemType, ToastTone } from './types';
2
+ export declare const TONE_ICONS: Record<ToastTone, string>;
3
+ interface TimerState {
4
+ handle: ReturnType<typeof setTimeout>;
5
+ startedAt: number;
6
+ remaining: number;
7
+ }
8
+ export declare class Manager {
9
+ nextId: number;
10
+ items: ToastManagerItemType[];
11
+ /** `toast.configure()` defaults. A mounted host falls back to its own props
12
+ * for anything not set here. */
13
+ config: ToastManagerConfig;
14
+ timers: Map<number, TimerState>;
15
+ /** How many `<ToastManager>`s are currently rendering these items. */
16
+ hosts: number;
17
+ private hostWatchers;
18
+ constructor();
19
+ addItem(data: Partial<ToastManagerItemType>): ToastManagerItemType;
20
+ startTimer(item: ToastManagerItemType, duration?: number): void;
21
+ pauseTimer(item: ToastManagerItemType): void;
22
+ resumeTimer(item: ToastManagerItemType): void;
23
+ clearTimer(item: ToastManagerItemType): void;
24
+ removeItem(item: ToastManagerItemType): void;
25
+ clearAll(): void;
26
+ configure(config: ToastManagerConfig): void;
27
+ addHost(): void;
28
+ removeHost(): void;
29
+ /** Notified whenever a host mounts. Used by `ensureHost()` to retire its own
30
+ * auto-mounted host once the consumer supplies one. */
31
+ watchHosts(fn: () => void): () => void;
32
+ }
33
+ /**
34
+ * The single store every `toast()` call writes to, and every mounted
35
+ * `<ToastManager>` reads from.
36
+ *
37
+ * State lives here rather than inside the component on purpose. It used to be
38
+ * the other way round, which meant `toast()` had to find a component instance
39
+ * by DOM id, read Vue's private `_vnode` off the element and call through
40
+ * `component.exposed` — and a `<ToastManager>` in the consumer's own tree was
41
+ * invisible to it, so their props were silently ignored in favour of a second,
42
+ * auto-mounted manager.
43
+ */
44
+ export declare const manager: Manager;
45
+ export {};
@@ -0,0 +1,44 @@
1
+ export type ToastPosition = 'n' | 'ne' | 'e' | 'se' | 's' | 'sw' | 'w' | 'nw';
2
+ export type ToastTone = 'success' | 'warning' | 'error' | 'info';
3
+ export interface ToastActionType {
4
+ label: string;
5
+ onAction?(): void;
6
+ }
7
+ export interface ToastItemType {
8
+ title: string;
9
+ content?: string;
10
+ progress?: number;
11
+ icon?: string;
12
+ loading?: boolean;
13
+ actions?: ToastActionType[];
14
+ /** Corner or edge of the viewport the toast stacks at. Defaults to the
15
+ * manager's `position` (out of the box `'se'`, the bottom right). */
16
+ position?: ToastPosition;
17
+ /** Sets a default icon and accent color for common toast flavors. */
18
+ tone?: ToastTone;
19
+ /** Dark toast on a light UI (the default). Pass `false` for a white toast.
20
+ * Defaults to the manager's `contrasting`. */
21
+ contrasting?: boolean;
22
+ }
23
+ export interface ToastProps {
24
+ item: ToastItemType;
25
+ contrasting?: boolean;
26
+ }
27
+ export interface ToastManagerItemType extends ToastItemType {
28
+ _id: number;
29
+ duration: number;
30
+ remove(): void;
31
+ }
32
+ export interface ToastManagerConfig {
33
+ /** Default stack position for toasts that don't set their own. */
34
+ position?: ToastPosition;
35
+ /** Distance in pixels between each stack and the viewport edges it anchors
36
+ * to, in addition to the toasts' built-in 16px margin. A number applies to
37
+ * both axes. */
38
+ offset?: number | {
39
+ x?: number;
40
+ y?: number;
41
+ };
42
+ /** Default theme for toasts that don't set their own `contrasting`. */
43
+ contrasting?: boolean;
44
+ }
@@ -0,0 +1,35 @@
1
+ import { ToggleSwitchProps } from './types';
2
+ declare var __VLS_1: {
3
+ checked: boolean;
4
+ };
5
+ type __VLS_Slots = {} & {
6
+ handle?: (props: typeof __VLS_1) => any;
7
+ };
8
+ declare const __VLS_base: import('vue').DefineComponent<ToggleSwitchProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
9
+ "update:modelValue": (v: boolean) => any;
10
+ }, string, import('vue').PublicProps, Readonly<ToggleSwitchProps> & Readonly<{
11
+ "onUpdate:modelValue"?: ((v: boolean) => any) | undefined;
12
+ }>, {
13
+ disabled: boolean;
14
+ size: "small" | "medium" | "large";
15
+ color: string;
16
+ checked: boolean;
17
+ trueValue: any;
18
+ falseValue: any;
19
+ colorOn: string;
20
+ colorOff: string;
21
+ icons: boolean;
22
+ iconOn: string;
23
+ iconOff: string;
24
+ iconColor: string;
25
+ iconColorOn: string;
26
+ iconColorOff: string;
27
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
28
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
29
+ declare const _default: typeof __VLS_export;
30
+ export default _default;
31
+ type __VLS_WithSlots<T, S> = T & {
32
+ new (): {
33
+ $slots: S;
34
+ };
35
+ };
@@ -0,0 +1,2 @@
1
+ export { default as ToggleSwitch } from './ToggleSwitch.vue';
2
+ export * from './types';
@@ -0,0 +1,84 @@
1
+ export interface ToggleSwitchProps {
2
+ /**
3
+ * The bound value / v-model.
4
+ */
5
+ modelValue?: any;
6
+ /**
7
+ * The model value to use when checked.
8
+ */
9
+ trueValue?: any;
10
+ /**
11
+ * The model value to use when not checked.
12
+ */
13
+ falseValue?: any;
14
+ /**
15
+ * When `true` the checkbox will be checked. This is an alternative
16
+ * to assigning `value` to be `trueValue`.
17
+ */
18
+ checked?: boolean;
19
+ disabled?: boolean;
20
+ /**
21
+ * Shorthand for `colorOn` — the track colour when checked. `colorOn` wins if
22
+ * both are given.
23
+ */
24
+ color?: string;
25
+ /**
26
+ * Track colour when checked. Any CSS colour.
27
+ *
28
+ * Defaults to `var(--octans-primary)`, so it follows the active theme.
29
+ */
30
+ colorOn?: string;
31
+ /**
32
+ * Track colour when unchecked. Any CSS colour.
33
+ *
34
+ * Defaults to `var(--octans-border-input)`. Setting this also colours the
35
+ * off icon, which otherwise stays subdued grey — the default track is too
36
+ * pale to read as an icon against the white knob.
37
+ */
38
+ colorOff?: string;
39
+ /**
40
+ * Visual size of the switch. All dimensions scale proportionally.
41
+ *
42
+ * - `"small"` — 42×24
43
+ * - `"medium"` — 60×34 (default)
44
+ * - `"large"` — 78×44
45
+ */
46
+ size?: 'small' | 'medium' | 'large';
47
+ /**
48
+ * Shows a tick / cross inside the knob. **On by default** — state then reads
49
+ * at a glance instead of relying on position and colour alone, which is the
50
+ * more accessible default and the one most people want.
51
+ *
52
+ * Set `:icons="false"` for a plain knob.
53
+ */
54
+ icons?: boolean;
55
+ /**
56
+ * Icon shown in the knob when checked. Any name the `Icon` component
57
+ * accepts. Defaults to `mdi:check`.
58
+ */
59
+ iconOn?: string;
60
+ /**
61
+ * Icon shown in the knob when unchecked. Any name the `Icon` component
62
+ * accepts. Defaults to `mdi:close`.
63
+ */
64
+ iconOff?: string;
65
+ /**
66
+ * Shorthand for both icon colours. `iconColorOn` / `iconColorOff` win over
67
+ * this for the state they name.
68
+ */
69
+ iconColor?: string;
70
+ /**
71
+ * Colour of the knob icon when checked.
72
+ *
73
+ * Defaults to the on track colour, which ties the knob to the track. Worth
74
+ * overriding if you give the knob a non-white background.
75
+ */
76
+ iconColorOn?: string;
77
+ /**
78
+ * Colour of the knob icon when unchecked.
79
+ *
80
+ * Defaults to `colorOff` when you set one, otherwise subdued grey — the
81
+ * default off track is too pale to read against the white knob.
82
+ */
83
+ iconColorOff?: string;
84
+ }
@@ -0,0 +1,20 @@
1
+ import { PopperPlacementType } from '../Popper';
2
+ export interface TooltipProps {
3
+ placement?: PopperPlacementType;
4
+ content?: string;
5
+ }
6
+ declare var __VLS_26: {}, __VLS_34: {};
7
+ type __VLS_Slots = {} & {
8
+ content?: (props: typeof __VLS_26) => any;
9
+ } & {
10
+ default?: (props: typeof __VLS_34) => any;
11
+ };
12
+ declare const __VLS_base: import('vue').DefineComponent<TooltipProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<TooltipProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
13
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
16
+ type __VLS_WithSlots<T, S> = T & {
17
+ new (): {
18
+ $slots: S;
19
+ };
20
+ };
@@ -0,0 +1 @@
1
+ export { default as Tooltip } from './Tooltip.vue';
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Lets Tooltip tell whether it is already inside a provider. Without it every
3
+ * Tooltip has to supply its own, which works but breaks radix's grouping —
4
+ * moving between two tooltips no longer skips the open delay.
5
+ */
6
+ export declare const hasTooltipProviderKey: unique symbol;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
9
+ declare const __VLS_export: __VLS_WithSlots<import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>, {
10
+ default?: (props: {}) => any;
11
+ }>;
12
+ type __VLS_WithSlots<T, S> = T & {
13
+ new (): {
14
+ $slots: S;
15
+ };
16
+ };
@@ -0,0 +1,2 @@
1
+ export { default as UiProvider } from './UiProvider.vue';
2
+ export * from './types';
@@ -0,0 +1,2 @@
1
+ import { ToastManager } from '../ToastManager';
2
+ export type ToastManagerInstance = InstanceType<typeof ToastManager>;
@@ -0,0 +1,5 @@
1
+ import { InjectionKey, Ref } from 'vue';
2
+ import { ToastManagerInstance } from './types';
3
+ export declare const ToastManagerKey: InjectionKey<Ref<ToastManagerInstance | undefined>>;
4
+ export declare function provideToastManager(instanceRef: Ref<ToastManagerInstance | undefined>): void;
5
+ export declare function injectToastManager(): ToastManagerInstance;
@@ -0,0 +1,5 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: import('vue').DefineComponent<{}, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
4
+ [key: string]: any;
5
+ }>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1 @@
1
+ export { default as UnstyledLink } from './UnstyledLink.vue';
@@ -0,0 +1,92 @@
1
+ /**
2
+ * HEY YOU! Don't import this file from components.
3
+ *
4
+ * For now this is only to be used by the library entry point `src/lib.ts` to
5
+ * conveniently import all components and their types.
6
+ *
7
+ * Components should always import other components via explicit imports to keep
8
+ * their dependencies at a minimum e.g.:
9
+ *
10
+ * ```
11
+ * import {Select, type SelectOptionType} from '@/components/Select'
12
+ * ```
13
+ */
14
+ export * from './ActionList';
15
+ export * from './AppFrame';
16
+ export * from './Badge';
17
+ export * from './Banner';
18
+ export * from './Button';
19
+ export * from './Calendar';
20
+ export * from './CalendarHeatmap';
21
+ export * from './Caption';
22
+ export * from './Card';
23
+ export * from './Checkbox';
24
+ export * from './Choice';
25
+ export * from './ChoiceList';
26
+ export * from './ColorPicker';
27
+ export * from './ColorSelector';
28
+ export * from './DataTable';
29
+ export * from './DatePicker';
30
+ export * from './Divider';
31
+ export * from './EventDelegator';
32
+ export * from './FileInput';
33
+ export * from './Filters';
34
+ export * from './FooterHelp';
35
+ export * from './Formatter';
36
+ export * from './FormLayout';
37
+ export * from './GlobalNav';
38
+ export * from './GradientPicker';
39
+ export * from './Heading';
40
+ export * from './Icon';
41
+ export * from './InlineError';
42
+ export * from './Labelled';
43
+ export * from './Layout';
44
+ export * from './Link';
45
+ export * from './List';
46
+ export * from './LoaderOverlay';
47
+ export * from './LoadingBar';
48
+ export * from './MaybeMountingPortal';
49
+ export * from './MaybeRouterLink';
50
+ export * from './Modal';
51
+ export * from './NavField';
52
+ export * from './Navigation';
53
+ export * from './OtpInput';
54
+ export * from './Page';
55
+ export * from './PageActions';
56
+ export * from './Pagination';
57
+ export * from './Popper';
58
+ export * from './PreventAutoComplete';
59
+ export * from './ProgressBar';
60
+ export * from './RadioButton';
61
+ export * from './RangeSlider';
62
+ export * from './Rating';
63
+ export * from './SaveBar';
64
+ export * from './SaveBarController';
65
+ export * from './ScrollPane';
66
+ export * from './SegmentedControl';
67
+ export * from './Select';
68
+ export * from './Sheet';
69
+ export * from './SkeletonBodyText';
70
+ export * from './SkeletonCard';
71
+ export * from './SkeletonDisplayText';
72
+ export * from './Spinner';
73
+ export * from './Splitter';
74
+ export * from './Stack';
75
+ export * from './StatGroup';
76
+ export * from './Tabs';
77
+ export * from './Tag';
78
+ export * from './TextContainer';
79
+ export * from './TextField';
80
+ export * from './TextStyle';
81
+ export * from './Thumbnail';
82
+ export * from './ToastManager';
83
+ export * from './TimePicker';
84
+ export * from './TimezonePicker';
85
+ export * from './ToggleSwitch';
86
+ export * from './Tooltip';
87
+ export * from './UiProvider';
88
+ export * from './UnstyledLink';
89
+ export * from './LineClamper';
90
+ export * from './Sticky';
91
+ export * from './SyntaxHighlighter';
92
+ export * from './ResourceList';
@@ -0,0 +1,74 @@
1
+ export type ActionTypeType = 'default' | 'primary' | 'secondary' | 'destructive' | 'outline' | 'plain' | 'link';
2
+ /**
3
+ * The colour role a button (or similar action) draws from. Orthogonal to the
4
+ * action TYPE, which sets its visual weight — any role can ride any type.
5
+ */
6
+ export type ActionColorType = 'primary' | 'secondary' | 'tertiary' | 'info' | 'success' | 'warning' | 'error';
7
+ export type ActionTooltipPositionType = 'top' | 'bottom' | 'right' | 'left';
8
+ export interface ActionType {
9
+ label: string;
10
+ type?: ActionTypeType;
11
+ icon?: string;
12
+ disabled?: boolean;
13
+ url?: string;
14
+ tooltip?: string;
15
+ tooltipPosition?: ActionTooltipPositionType;
16
+ external?: boolean;
17
+ visible?: boolean;
18
+ /**
19
+ * Called when the action is chosen. Takes no arguments — an action knows
20
+ * what it acts on, because you closed over it when you built the action.
21
+ *
22
+ * Components that DO have something to hand back declare their own action
23
+ * type saying so, rather than widening this one: `DataTableRowActionType`
24
+ * passes the row, `DataTableBulkActionType` the selected rows, and
25
+ * `NavigationSecondaryItemType` the item.
26
+ */
27
+ onAction?(): void;
28
+ }
29
+ /**
30
+ * An action bound to one thing — a table row, a list entry — which receives
31
+ * that thing when chosen.
32
+ *
33
+ * `ActionType` with a typed argument rather than a looser `ActionType`: the
34
+ * argument is the whole reason these exist, so it belongs in the type where
35
+ * an editor will offer it.
36
+ */
37
+ export interface ActionWithSubjectType<T> extends Omit<ActionType, 'onAction'> {
38
+ onAction?(subject: T): void;
39
+ }
40
+ export interface BadgeType {
41
+ label: string;
42
+ progress?: BadgeProgressType;
43
+ size?: BadgeSizeType;
44
+ status?: BadgeStatusType;
45
+ }
46
+ export type BadgeProgressType = `incomplete` | `partiallyComplete` | `complete`;
47
+ export type BadgeStatusType = `info` | `success` | `warning` | `error` | `attention` | `new`;
48
+ export type BadgeSizeType = `small` | `medium`;
49
+ /**
50
+ * The status of a badge overlaid on an icon or a button, as distinct from
51
+ * `BadgeStatusType` which belongs to the standalone Badge component.
52
+ */
53
+ export type IconBadgeStatusType = `info` | `success` | `warning` | `error`;
54
+ /**
55
+ * The long form of a button badge. The short form is a bare string: either a
56
+ * status (`badge="warning"`) or some text, optionally coloured with
57
+ * `badgeStatus` (`badge="3" badge-status="error"`).
58
+ */
59
+ export interface IconBadgeType {
60
+ /**
61
+ * Text to show in a pill on the corner of the button, e.g. a count. Without
62
+ * it the badge is drawn as a small glyph on the button's icon instead.
63
+ */
64
+ text?: string | number;
65
+ status?: IconBadgeStatusType;
66
+ /**
67
+ * An Iconify name to use for the glyph instead of the status default.
68
+ */
69
+ icon?: string;
70
+ /**
71
+ * A colour to use instead of the status default.
72
+ */
73
+ color?: string;
74
+ }
@@ -0,0 +1,7 @@
1
+ import { default as UI } from './lib';
2
+ export {};
3
+ declare module 'vue' {
4
+ interface ComponentCustomProperties {
5
+ $ui: typeof UI;
6
+ }
7
+ }