@privyid/persona 0.9.0 → 0.11.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 (261) hide show
  1. package/dist/components/avatar/Avatar.vue +1 -0
  2. package/dist/components/avatar/Avatar.vue.d.ts +13 -13
  3. package/dist/components/avatar/index.d.ts +2 -2
  4. package/dist/components/badge/Badge.vue +48 -8
  5. package/dist/components/badge/Badge.vue.d.ts +2 -1
  6. package/dist/components/badge/index.d.ts +1 -2
  7. package/dist/components/banner/Banner.vue +19 -7
  8. package/dist/components/banner/Banner.vue.d.ts +1 -1
  9. package/dist/components/banner/index.d.ts +1 -1
  10. package/dist/components/breadcrumbs/Breadcrumb.vue +60 -0
  11. package/dist/components/breadcrumbs/Breadcrumb.vue.d.ts +41 -0
  12. package/dist/components/breadcrumbs/BreadcrumbItem.vue +87 -0
  13. package/dist/components/breadcrumbs/BreadcrumbItem.vue.d.ts +28 -0
  14. package/dist/components/breadcrumbs/BreadcrumbItemDropdown.vue +68 -0
  15. package/dist/components/breadcrumbs/BreadcrumbItemDropdown.vue.d.ts +25 -0
  16. package/dist/components/breadcrumbs/index.d.ts +11 -0
  17. package/dist/components/breadcrumbs/index.mjs +3 -0
  18. package/dist/components/button/Button.vue +84 -14
  19. package/dist/components/button/Button.vue.d.ts +12 -2
  20. package/dist/components/button/index.d.ts +4 -3
  21. package/dist/components/button-group/ButtonGroup.vue +11 -18
  22. package/dist/components/button-group/index.d.ts +6 -0
  23. package/dist/components/button-group/index.mjs +1 -0
  24. package/dist/components/calendar/Calendar.vue +8 -3
  25. package/dist/components/calendar/Calendar.vue.d.ts +31 -31
  26. package/dist/components/calendar/adapter/adapter.d.ts +1 -1
  27. package/dist/components/calendar/adapter/date.mjs +1 -1
  28. package/dist/components/camera/Camera.vue +7 -3
  29. package/dist/components/camera/Camera.vue.d.ts +19 -19
  30. package/dist/components/camera/adapter/adapter.d.ts +2 -2
  31. package/dist/components/camera/adapter/liveness.mjs +1 -1
  32. package/dist/components/caption/Caption.vue +1 -0
  33. package/dist/components/caption/index.d.ts +1 -1
  34. package/dist/components/card/Card.vue +9 -3
  35. package/dist/components/card/Card.vue.d.ts +5 -5
  36. package/dist/components/card/CardSection.vue.d.ts +2 -2
  37. package/dist/components/card/index.d.ts +1 -1
  38. package/dist/components/chart/Chart.vue +1 -0
  39. package/dist/components/chart/ChartVal.vue.d.ts +2 -2
  40. package/dist/components/chart/adapter/index.d.ts +1 -1
  41. package/dist/components/chart/index.d.ts +1 -1
  42. package/dist/components/checkbox/Checkbox.vue +14 -5
  43. package/dist/components/checkbox/Checkbox.vue.d.ts +13 -13
  44. package/dist/components/collapse/Collapse.vue +2 -1
  45. package/dist/components/collapse/Collapse.vue.d.ts +1 -1
  46. package/dist/components/contextual-bar/ContextualBar.vue +15 -3
  47. package/dist/components/contextual-bar/ContextualBar.vue.d.ts +11 -11
  48. package/dist/components/contextual-bar/index.d.ts +1 -1
  49. package/dist/components/cropper/Cropper.vue +3 -2
  50. package/dist/components/cropper/Cropper.vue.d.ts +20 -20
  51. package/dist/components/cropper/utils/use-pinch.mjs +10 -2
  52. package/dist/components/datepicker/Datepicker.vue +1 -0
  53. package/dist/components/datepicker/Datepicker.vue.d.ts +16 -16
  54. package/dist/components/dialog/Dialog.vue.d.ts +2 -2
  55. package/dist/components/dialog/DialogFooter.vue +2 -2
  56. package/dist/components/dialog/DialogFooter.vue.d.ts +7 -7
  57. package/dist/components/dialog/index.d.ts +11 -16
  58. package/dist/components/divider/Divider.vue +12 -2
  59. package/dist/components/dot/Dot.vue +12 -2
  60. package/dist/components/dot/Dot.vue.d.ts +2 -1
  61. package/dist/components/dot/index.d.ts +1 -2
  62. package/dist/components/dropdown/Dropdown.vue +5 -3
  63. package/dist/components/dropdown/Dropdown.vue.d.ts +8 -8
  64. package/dist/components/dropdown/DropdownItem.vue +49 -6
  65. package/dist/components/dropdown/DropdownItem.vue.d.ts +22 -1
  66. package/dist/components/dropdown-subitem/DropdownSubitem.vue.d.ts +3 -3
  67. package/dist/components/dropzone/Dropzone.vue.d.ts +12 -12
  68. package/dist/components/dropzone/index.d.ts +1 -1
  69. package/dist/components/filterbar/Filterbar.vue +7 -6
  70. package/dist/components/filterbar/Filterbar.vue.d.ts +3 -3
  71. package/dist/components/filterbar/index.d.ts +1 -1
  72. package/dist/components/filterbar/pinned/{Date.vue.d.ts → PinnedDate.vue.d.ts} +8 -8
  73. package/dist/components/filterbar/pinned/{Multiselect.vue.d.ts → PinnedMultiselect.vue.d.ts} +5 -5
  74. package/dist/components/filterbar/pinned/{Select.vue.d.ts → PinnedSelect.vue.d.ts} +10 -10
  75. package/dist/components/filterbar/pinned/{Toggle.vue.d.ts → PinnedToggle.vue.d.ts} +11 -11
  76. package/dist/components/form-group/FormGroup.vue +9 -4
  77. package/dist/components/form-group/FormGroup.vue.d.ts +2 -2
  78. package/dist/components/global/context.d.ts +1 -1
  79. package/dist/components/global/use-singleton.d.ts +2 -2
  80. package/dist/components/global/utils/queue.d.ts +2 -2
  81. package/dist/components/heading/Heading.vue +6 -0
  82. package/dist/components/heading/index.d.ts +3 -3
  83. package/dist/components/input/Input.vue +27 -19
  84. package/dist/components/input/Input.vue.d.ts +4 -4
  85. package/dist/components/input-file/InputFile.vue +42 -6
  86. package/dist/components/input-file/InputFile.vue.d.ts +24 -9
  87. package/dist/components/input-group/InputGroup.vue +55 -41
  88. package/dist/components/input-group/InputGroupAddon.vue +10 -11
  89. package/dist/components/input-group/index.d.ts +6 -0
  90. package/dist/components/input-group/index.mjs +1 -0
  91. package/dist/components/input-password/InputPassword.vue +3 -1
  92. package/dist/components/input-pin/InputPin.vue +3 -3
  93. package/dist/components/input-pin/InputPin.vue.d.ts +3 -3
  94. package/dist/components/input-range/InputRange.vue +8 -5
  95. package/dist/components/input-range/InputRange.vue.d.ts +11 -11
  96. package/dist/components/input-range/utils/use-drag.mjs +5 -1
  97. package/dist/components/label/Label.vue +34 -7
  98. package/dist/components/label/Label.vue.d.ts +3 -4
  99. package/dist/components/label/index.d.ts +1 -0
  100. package/dist/components/label/index.mjs +0 -0
  101. package/dist/components/main/Main.vue +7 -3
  102. package/dist/components/modal/Modal.vue +19 -6
  103. package/dist/components/modal/Modal.vue.d.ts +9 -9
  104. package/dist/components/nav/Nav.vue +24 -8
  105. package/dist/components/nav/Nav.vue.d.ts +2 -2
  106. package/dist/components/nav/NavForm.vue +1 -1
  107. package/dist/components/nav/NavItem.vue +2 -0
  108. package/dist/components/nav/NavItem.vue.d.ts +8 -8
  109. package/dist/components/nav/NavItemDropdown.vue.d.ts +1 -1
  110. package/dist/components/nav/NavSubItem.vue +4 -0
  111. package/dist/components/nav/NavSubItem.vue.d.ts +2 -2
  112. package/dist/components/nav/index.d.ts +2 -2
  113. package/dist/components/navbar/Navbar.vue +6 -3
  114. package/dist/components/navbar/Navbar.vue.d.ts +5 -5
  115. package/dist/components/navbar/NavbarBrand.vue +2 -1
  116. package/dist/components/navbar/NavbarBrand.vue.d.ts +2 -2
  117. package/dist/components/navbar/NavbarNav.vue +16 -5
  118. package/dist/components/navbar/NavbarNav.vue.d.ts +2 -2
  119. package/dist/components/navbar/NavbarToggle.vue +2 -1
  120. package/dist/components/navbar/index.d.ts +1 -1
  121. package/dist/components/overlay/Overlay.vue +2 -1
  122. package/dist/components/page/Page.vue +13 -9
  123. package/dist/components/page/Page.vue.d.ts +3 -3
  124. package/dist/components/pagination/Pagination.vue +16 -9
  125. package/dist/components/pagination/Pagination.vue.d.ts +5 -5
  126. package/dist/components/pagination/index.d.ts +1 -1
  127. package/dist/components/pagination/index.mjs +1 -1
  128. package/dist/components/pagination/utils/calculate-page.d.ts +1 -1
  129. package/dist/components/pdf-helipad/PdfHelipad.vue +134 -0
  130. package/dist/components/pdf-helipad/PdfHelipad.vue.d.ts +45 -0
  131. package/dist/components/pdf-helipad/index.d.ts +7 -0
  132. package/dist/components/pdf-helipad/index.mjs +0 -0
  133. package/dist/components/pdf-helipad/utils/use-drag.d.ts +8 -0
  134. package/dist/components/pdf-helipad/utils/use-drag.mjs +38 -0
  135. package/dist/components/pdf-object/PdfObject.vue +3 -1
  136. package/dist/components/pdf-object/PdfObject.vue.d.ts +20 -20
  137. package/dist/components/pdf-object/PdfObjectDebugger.vue +4 -1
  138. package/dist/components/pdf-object/PdfObjectDebugger.vue.d.ts +5 -5
  139. package/dist/components/pdf-object/PdfObjects.vue +1 -0
  140. package/dist/components/pdf-object/index.d.ts +5 -5
  141. package/dist/components/pdf-object/utils/overlap.d.ts +1 -1
  142. package/dist/components/pdf-object/utils/position.d.ts +1 -1
  143. package/dist/components/pdf-object/utils/use-drop.mjs +1 -1
  144. package/dist/components/pdf-text/PdfText.vue +129 -0
  145. package/dist/components/pdf-text/PdfText.vue.d.ts +168 -0
  146. package/dist/components/pdf-text/utils/text-to-image.d.ts +68 -0
  147. package/dist/components/pdf-text/utils/text-to-image.mjs +118 -0
  148. package/dist/components/pdf-viewer/PdfError.vue +20 -3
  149. package/dist/components/pdf-viewer/PdfLoading.vue +1 -1
  150. package/dist/components/pdf-viewer/PdfNavigation.vue +9 -5
  151. package/dist/components/pdf-viewer/PdfViewer.vue +11 -3
  152. package/dist/components/pdf-viewer/PdfViewer.vue.d.ts +12 -12
  153. package/dist/components/pdf-viewer/assets/pdf-loading.svg +1 -100
  154. package/dist/components/pdf-viewer/index.d.ts +1 -1
  155. package/dist/components/pdf-viewer/utils/use-viewer.d.ts +7 -7
  156. package/dist/components/progress/Progress.vue +15 -7
  157. package/dist/components/progress/Progress.vue.d.ts +2 -2
  158. package/dist/components/progress/ProgressItem.vue.d.ts +1 -1
  159. package/dist/components/radio/Radio.vue +17 -6
  160. package/dist/components/radio/Radio.vue.d.ts +9 -9
  161. package/dist/components/radio/index.d.ts +1 -1
  162. package/dist/components/select/Select.vue +10 -1
  163. package/dist/components/select/Select.vue.d.ts +11 -11
  164. package/dist/components/select/adapter/async-adapter.d.ts +2 -2
  165. package/dist/components/sidebar/Sidebar.vue +10 -4
  166. package/dist/components/sidebar/Sidebar.vue.d.ts +3 -3
  167. package/dist/components/sidebar/SidebarBrand.vue +2 -1
  168. package/dist/components/sidebar/SidebarBrand.vue.d.ts +2 -2
  169. package/dist/components/sidebar/SidebarNav.vue +5 -17
  170. package/dist/components/sidebar/SidebarNav.vue.d.ts +4 -4
  171. package/dist/components/sidebar/index.d.ts +1 -1
  172. package/dist/components/sidebar-menu/SidebarMenu.vue +1 -1
  173. package/dist/components/sidebar-menu/SidebarMenu.vue.d.ts +4 -4
  174. package/dist/components/signature-draw/SignatureDraw.vue.d.ts +3 -3
  175. package/dist/components/signature-draw/SignatureDrawDesktop.vue +4 -1
  176. package/dist/components/signature-draw/SignatureDrawDesktop.vue.d.ts +3 -3
  177. package/dist/components/signature-draw/SignatureDrawMobile.vue +5 -0
  178. package/dist/components/signature-draw/SignatureDrawMobile.vue.d.ts +3 -3
  179. package/dist/components/signature-draw/utils/canvas.d.ts +1 -1
  180. package/dist/components/signature-draw/utils/smooth-line.mjs +15 -0
  181. package/dist/components/signature-draw/utils/use-draw.mjs +5 -1
  182. package/dist/components/signature-text/SignatureText.vue +9 -4
  183. package/dist/components/signature-text/SignatureText.vue.d.ts +17 -8
  184. package/dist/components/steps/Step.vue.d.ts +5 -5
  185. package/dist/components/steps/Steps.vue.d.ts +1 -1
  186. package/dist/components/steps/index.d.ts +9 -9
  187. package/dist/components/steps/utils/hook.d.ts +1 -1
  188. package/dist/components/strengthbar/Strengthbar.vue +4 -0
  189. package/dist/components/subheading/Subheading.vue +1 -1
  190. package/dist/components/subheading/Subheading.vue.d.ts +2 -2
  191. package/dist/components/subheading/index.d.ts +1 -1
  192. package/dist/components/table/Table.vue +82 -6
  193. package/dist/components/table/Table.vue.d.ts +19 -10
  194. package/dist/components/tabs/Tabs.vue +4 -1
  195. package/dist/components/tabs/Tabs.vue.d.ts +2 -2
  196. package/dist/components/text/Text.vue.d.ts +2 -2
  197. package/dist/components/text/index.d.ts +1 -1
  198. package/dist/components/textarea/Textarea.vue +8 -7
  199. package/dist/components/textarea/Textarea.vue.d.ts +5 -5
  200. package/dist/components/toast/Toast.vue +17 -3
  201. package/dist/components/toast/Toast.vue.d.ts +1 -1
  202. package/dist/components/toast/ToastContainer.vue.d.ts +4 -4
  203. package/dist/components/toast/index.d.ts +2 -2
  204. package/dist/components/toggle/Toggle.vue +26 -8
  205. package/dist/components/toggle/Toggle.vue.d.ts +12 -12
  206. package/dist/components/tooltip/Tooltip.vue +6 -2
  207. package/dist/components/tooltip/Tooltip.vue.d.ts +7 -7
  208. package/dist/components/tooltip/index.d.ts +1 -1
  209. package/dist/components/tooltip/index.mjs +1 -1
  210. package/dist/components/tooltip/utils/create-handler.d.ts +1 -1
  211. package/dist/components/tour/Tour.vue.d.ts +3 -3
  212. package/dist/components/tour/TourDialog.vue +9 -1
  213. package/dist/components/tour/TourDialog.vue.d.ts +8 -8
  214. package/dist/components/tour/TourHighlight.vue.d.ts +2 -2
  215. package/dist/components/tour/core/base.d.ts +1 -1
  216. package/dist/components/tour/core/base.mjs +15 -0
  217. package/dist/components/tour/core/step/action.d.ts +4 -4
  218. package/dist/components/tour/core/step.d.ts +3 -3
  219. package/dist/components/tour/core/step.mjs +19 -0
  220. package/dist/components/tour/core/story.d.ts +1 -1
  221. package/dist/components/tour/core/story.mjs +81 -0
  222. package/dist/components/tour/core/tour.d.ts +1 -1
  223. package/dist/components/tour/core/tour.mjs +55 -1
  224. package/dist/components/truncate/Truncate.vue +8 -0
  225. package/dist/components/utils/base64.mjs +1 -1
  226. package/dist/components/utils/value.d.ts +4 -4
  227. package/dist/components/wizard/Wizard.vue.d.ts +6 -6
  228. package/dist/components/wizard/WizardBody.vue.d.ts +1 -1
  229. package/dist/components/wizard/WizardStep.vue.d.ts +4 -4
  230. package/dist/core/index.d.ts +3 -1
  231. package/dist/core/index.mjs +4 -1
  232. package/dist/module.json +1 -1
  233. package/dist/module.mjs +1 -0
  234. package/dist/types.d.ts +1 -1
  235. package/package.json +14 -12
  236. package/dist/components/badge/assets/images/img-guide-badge.svg +0 -1
  237. package/dist/components/card/assets/images/img-card-callout-01.svg +0 -1
  238. package/dist/components/contextual-bar/assets/images/img-background-contextualbar.svg +0 -14
  239. package/dist/components/contextual-bar/assets/images/img-bg-contextualbar.svg +0 -19
  240. package/dist/components/cropper/assets/sample-1.jpg +0 -0
  241. package/dist/components/modal/assets/images/img-modal-banner-sheet.jpg +0 -0
  242. package/dist/components/pdf-object-text/PdfObjectText.vue +0 -170
  243. package/dist/components/pdf-object-text/PdfObjectText.vue.d.ts +0 -140
  244. package/dist/components/pdf-object-text/utils/text-to-image.d.ts +0 -51
  245. package/dist/components/pdf-object-text/utils/text-to-image.mjs +0 -77
  246. package/dist/components/pdf-viewer/assets/Calibrator-v3.pdf +8 -99519
  247. package/dist/components/pdf-viewer/assets/Calibrator-v3_protected.pdf +0 -0
  248. package/dist/components/pdf-viewer/assets/fixed-vs-fit.svg +0 -186
  249. package/dist/components/pdf-viewer/assets/sample-3.pdf +0 -0
  250. package/dist/components/pdf-viewer/assets/sample-with-sign.pdf +0 -0
  251. package/dist/components/pdf-viewer/assets/sample.pdf +0 -18304
  252. package/dist/components/sidebar/assets/images/icon-flag.svg +0 -1
  253. package/dist/components/sidebar/assets/images/logo-privy-icon.svg +0 -1
  254. package/dist/components/sidebar/assets/images/logo-privy.svg +0 -1
  255. package/dist/components/sidebar-menu/assets/images/img-flag.svg +0 -1
  256. package/dist/components/signature-draw/assets/empty-img.png +0 -0
  257. package/dist/components/signature-text/sample/sample-signature.png +0 -0
  258. /package/dist/components/filterbar/pinned/{Date.vue → PinnedDate.vue} +0 -0
  259. /package/dist/components/filterbar/pinned/{Multiselect.vue → PinnedMultiselect.vue} +0 -0
  260. /package/dist/components/filterbar/pinned/{Select.vue → PinnedSelect.vue} +0 -0
  261. /package/dist/components/filterbar/pinned/{Toggle.vue → PinnedToggle.vue} +0 -0
@@ -116,6 +116,7 @@ export default defineComponent({
116
116
  <style lang="postcss">
117
117
  .avatar {
118
118
  @apply rounded-full inline-flex items-center justify-center overflow-hidden text-subtle bg-subtle;
119
+ @apply dark:text-dark-subtle dark:bg-dark-subtle;
119
120
 
120
121
  &__image {
121
122
  @apply w-full h-full object-cover;
@@ -3,11 +3,11 @@ import { TypeVariant, SizeVariant } from '.';
3
3
  declare const _default: import("vue-demi").DefineComponent<{
4
4
  variant: {
5
5
  type: PropType<TypeVariant>;
6
- default: any;
6
+ default: undefined;
7
7
  };
8
8
  src: {
9
9
  type: StringConstructor;
10
- default: any;
10
+ default: undefined;
11
11
  };
12
12
  fallbackSrc: {
13
13
  type: StringConstructor;
@@ -15,15 +15,15 @@ declare const _default: import("vue-demi").DefineComponent<{
15
15
  };
16
16
  name: {
17
17
  type: StringConstructor;
18
- default: any;
18
+ default: undefined;
19
19
  };
20
20
  size: {
21
21
  type: PropType<SizeVariant>;
22
22
  default: string;
23
23
  };
24
24
  imgClass: {
25
- type: (ObjectConstructor | StringConstructor | ArrayConstructor)[];
26
- default: any;
25
+ type: (StringConstructor | ArrayConstructor | ObjectConstructor)[];
26
+ default: undefined;
27
27
  };
28
28
  }, {
29
29
  classNames: import("vue-demi").ComputedRef<string[]>;
@@ -32,11 +32,11 @@ declare const _default: import("vue-demi").DefineComponent<{
32
32
  }, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, ("imgloaded" | "imgerror")[], "imgloaded" | "imgerror", import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
33
33
  variant: {
34
34
  type: PropType<TypeVariant>;
35
- default: any;
35
+ default: undefined;
36
36
  };
37
37
  src: {
38
38
  type: StringConstructor;
39
- default: any;
39
+ default: undefined;
40
40
  };
41
41
  fallbackSrc: {
42
42
  type: StringConstructor;
@@ -44,23 +44,23 @@ declare const _default: import("vue-demi").DefineComponent<{
44
44
  };
45
45
  name: {
46
46
  type: StringConstructor;
47
- default: any;
47
+ default: undefined;
48
48
  };
49
49
  size: {
50
50
  type: PropType<SizeVariant>;
51
51
  default: string;
52
52
  };
53
53
  imgClass: {
54
- type: (ObjectConstructor | StringConstructor | ArrayConstructor)[];
55
- default: any;
54
+ type: (StringConstructor | ArrayConstructor | ObjectConstructor)[];
55
+ default: undefined;
56
56
  };
57
57
  }>> & {
58
- onImgloaded?: (...args: any[]) => any;
59
- onImgerror?: (...args: any[]) => any;
58
+ onImgloaded?: ((...args: any[]) => any) | undefined;
59
+ onImgerror?: ((...args: any[]) => any) | undefined;
60
60
  }, {
61
- src: string;
62
61
  name: string;
63
62
  variant: TypeVariant;
63
+ src: string;
64
64
  fallbackSrc: string;
65
65
  size: SizeVariant;
66
66
  imgClass: string | unknown[] | Record<string, any>;
@@ -1,2 +1,2 @@
1
- export declare type TypeVariant = 'image' | 'alias';
2
- export declare type SizeVariant = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
1
+ export type TypeVariant = 'image' | 'alias';
2
+ export type SizeVariant = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
@@ -48,7 +48,10 @@ export default defineComponent({
48
48
  * Set global style
49
49
  * of badge
50
50
  */
51
- @apply inline-block font-bold text-xs px-2 py-0.5 text-on-emphasis rounded-full;
51
+ --p-color-primary-light: lighten(theme(colors.brand.accent), 40%);
52
+ --p-color-dark-primary-light: darken(theme(colors.dark.brand.accent), 40%);
53
+
54
+ @apply inline-block font-bold text-xs px-2 py-0.5 text-state-emphasis dark:text-dark-state-emphasis rounded-full;
52
55
 
53
56
  /**
54
57
  * Provide colors variant
@@ -59,23 +62,35 @@ export default defineComponent({
59
62
  &&--variant-default {
60
63
  &.badge {
61
64
  &--default {
62
- @apply bg-emphasis-subtle;
65
+ --p-bg-variant-default: theme(backgroundColor.inverse);
66
+ --p-bg-dark-variant-default: theme(backgroundColor.dark.inverse);
67
+ @apply bg-[color:var(--p-bg-variant-default)];
68
+ @apply dark:bg-[color:var(--p-bg-dark-variant-default)] dark:text-dark-on-emphasis;
63
69
  }
64
70
 
65
71
  &--primary {
66
- @apply bg-accent-emphasis;
72
+ @apply bg-brand-accent;
73
+ @apply dark:bg-dark-brand-accent;
74
+ }
75
+
76
+ &--info {
77
+ @apply bg-info-emphasis;
78
+ @apply dark:bg-dark-info-emphasis;
67
79
  }
68
80
 
69
81
  &--success {
70
82
  @apply bg-success-emphasis;
83
+ @apply dark:bg-dark-success-emphasis;
71
84
  }
72
85
 
73
86
  &--warning {
74
87
  @apply bg-warning-emphasis;
88
+ @apply dark:bg-dark-warning-emphasis;
75
89
  }
76
90
 
77
91
  &--danger {
78
92
  @apply bg-danger-emphasis;
93
+ @apply dark:bg-dark-danger-emphasis;
79
94
  }
80
95
  }
81
96
  }
@@ -88,23 +103,35 @@ export default defineComponent({
88
103
  &&--variant-inverse {
89
104
  &.badge {
90
105
  &--default {
91
- @apply text-subtle;
106
+ --p-color-variant-inverse: theme(textColor.subtle);
107
+ --p-color-dark-variant-inverse: theme(textColor.dark.subtle);
108
+ @apply text-[color:var(--p-color-variant-inverse)];
109
+ @apply dark:text-[color:var(--p-color-dark-variant-inverse)];
92
110
  }
93
111
 
94
112
  &--primary {
95
- @apply text-accent;
113
+ @apply text-brand-accent;
114
+ @apply dark:text-dark-brand-accent;
115
+ }
116
+
117
+ &--info {
118
+ @apply text-info;
119
+ @apply dark:text-dark-info;
96
120
  }
97
121
 
98
122
  &--success {
99
123
  @apply text-success;
124
+ @apply dark:text-dark-success;
100
125
  }
101
126
 
102
127
  &--warning {
103
128
  @apply text-warning;
129
+ @apply dark:text-dark-warning;
104
130
  }
105
131
 
106
132
  &--danger {
107
133
  @apply text-danger;
134
+ @apply dark:text-dark-danger;
108
135
  }
109
136
  }
110
137
  }
@@ -115,24 +142,36 @@ export default defineComponent({
115
142
  */
116
143
  &--variant-light {
117
144
  &.badge {
145
+ &--default {
146
+ --p-bg-variant-light: theme(backgroundColor.subtle.alpha);
147
+ --p-bg-dark-variant-light: theme(backgroundColor.dark.subtle.alpha);
148
+ @apply bg-[color:var(--p-bg-variant-light)];
149
+ @apply dark:bg-[color:var(--p-bg-dark-variant-light)];
150
+ }
151
+
118
152
  &--primary {
119
- @apply bg-accent;
153
+ @apply bg-[color:var(--p-color-primary-light)];
154
+ @apply dark:bg-[color:var(--p-color-dark-primary-light)];
120
155
  }
121
156
 
122
- &--default {
123
- @apply bg-base-black/5;
157
+ &--info {
158
+ @apply bg-info;
159
+ @apply dark:bg-dark-info;
124
160
  }
125
161
 
126
162
  &--success {
127
163
  @apply bg-success;
164
+ @apply dark:bg-dark-success;
128
165
  }
129
166
 
130
167
  &--warning {
131
168
  @apply bg-warning;
169
+ @apply dark:bg-dark-warning;
132
170
  }
133
171
 
134
172
  &--danger {
135
173
  @apply bg-danger;
174
+ @apply dark:bg-dark-danger;
136
175
  }
137
176
  }
138
177
  }
@@ -143,6 +182,7 @@ export default defineComponent({
143
182
  */
144
183
  &:where(.badge--variant-inverse, .badge--dot) {
145
184
  @apply bg-default;
185
+ @apply dark:bg-dark-default;
146
186
  }
147
187
 
148
188
  /**
@@ -1,5 +1,6 @@
1
1
  import { PropType } from 'vue-demi';
2
- import { ColorVariant, StyleVariant } from '.';
2
+ import { StyleVariant } from '.';
3
+ import { ColorVariant } from '../button';
3
4
  declare const _default: import("vue-demi").DefineComponent<{
4
5
  color: {
5
6
  type: PropType<ColorVariant>;
@@ -1,2 +1 @@
1
- export declare type ColorVariant = 'default' | 'primary' | 'success' | 'warning' | 'danger';
2
- export declare type StyleVariant = 'default' | 'light' | 'inverse';
1
+ export type StyleVariant = 'default' | 'light' | 'inverse';
@@ -3,10 +3,15 @@
3
3
  v-if="show"
4
4
  data-testid="banner"
5
5
  :class="classNames">
6
- <div class="banner__icon">
7
- <component
8
- :is="icon"
9
- v-if="icon" />
6
+ <div
7
+ class="banner__icon"
8
+ data-testid="banner-icon"
9
+ :class="{ 'banner__icon--custom' : $slots.icon }">
10
+ <slot name="icon">
11
+ <component
12
+ :is="icon"
13
+ v-if="icon" />
14
+ </slot>
10
15
  </div>
11
16
  <div class="banner__body">
12
17
  <slot :close="close" />
@@ -79,10 +84,12 @@ export default defineComponent({
79
84
  <style lang="postcss">
80
85
  .banner {
81
86
  @apply p-4 flex space-x-2 rounded text-subtle;
87
+ @apply dark:text-dark-subtle;
82
88
 
83
89
  a {
84
90
  &:not(.btn) {
85
- @apply underline decoration-solid text-accent;
91
+ @apply underline decoration-solid text-info;
92
+ @apply dark:text-dark-info;
86
93
  }
87
94
  }
88
95
 
@@ -95,18 +102,22 @@ export default defineComponent({
95
102
  }
96
103
 
97
104
  &&--info {
98
- @apply bg-subtle;
105
+ @apply bg-base;
106
+ @apply dark:bg-dark-base;
99
107
 
100
108
  .banner__icon {
101
- @apply text-accent;
109
+ @apply text-info;
110
+ @apply dark:text-dark-info;
102
111
  }
103
112
  }
104
113
 
105
114
  &&--danger {
106
115
  @apply bg-danger;
116
+ @apply dark:bg-dark-danger;
107
117
 
108
118
  .banner__icon {
109
119
  @apply text-danger;
120
+ @apply dark:text-dark-danger;
110
121
  }
111
122
  }
112
123
 
@@ -121,6 +132,7 @@ export default defineComponent({
121
132
 
122
133
  &__close {
123
134
  @apply cursor-pointer text-default/30 hover:text-default/50;
135
+ @apply dark:text-dark-default/30 hover:dark:text-dark-default/50;
124
136
  }
125
137
  }
126
138
  </style>
@@ -24,7 +24,7 @@ declare const _default: import("vue-demi").DefineComponent<{
24
24
  default: boolean;
25
25
  };
26
26
  }>> & {
27
- onDismissed?: (...args: any[]) => any;
27
+ onDismissed?: ((...args: any[]) => any) | undefined;
28
28
  }, {
29
29
  variant: StyleVariant;
30
30
  dismissable: boolean;
@@ -1 +1 @@
1
- export declare type StyleVariant = 'info' | 'danger';
1
+ export type StyleVariant = 'info' | 'danger';
@@ -0,0 +1,60 @@
1
+ <template>
2
+ <ul
3
+ class="breadcrumbs"
4
+ data-testid="breadcrumbs">
5
+ <slot>
6
+ <template
7
+ v-for="(item, id) in items"
8
+ :key="id">
9
+ <BreadcrumbItemDropdown
10
+ v-if="item.subitem"
11
+ :text="item.text"
12
+ :active="item.active"
13
+ :href="item.href">
14
+ <template
15
+ v-for="(subitem, idx) in item.subitem"
16
+ :key="idx">
17
+ <DropdownItem
18
+ :active="subitem.active"
19
+ :href="subitem.href">
20
+ {{ subitem.text }}
21
+ </DropdownItem>
22
+ </template>
23
+ </BreadcrumbItemDropdown>
24
+ <BreadcrumbItem
25
+ v-else
26
+ :active="item.active"
27
+ :href="item.href">
28
+ {{ item.text }}
29
+ </BreadcrumbItem>
30
+ </template>
31
+ </slot>
32
+ </ul>
33
+ </template>
34
+
35
+ <script>
36
+ import { defineComponent } from "vue-demi";
37
+ import BreadcrumbItem from "./BreadcrumbItem.vue";
38
+ import BreadcrumbItemDropdown from "./BreadcrumbItemDropdown.vue";
39
+ import DropdownItem from "../dropdown/DropdownItem.vue";
40
+ export default defineComponent({
41
+ components: {
42
+ BreadcrumbItem,
43
+ BreadcrumbItemDropdown,
44
+ DropdownItem
45
+ },
46
+ props: {
47
+ items: {
48
+ type: Array,
49
+ default: () => {
50
+ }
51
+ }
52
+ }
53
+ });
54
+ </script>
55
+
56
+ <style lang="postcss">
57
+ .breadcrumbs {
58
+ @apply flex space-x-3 items-center;
59
+ }
60
+ </style>
@@ -0,0 +1,41 @@
1
+ import { BreadcrumbItems } from '.';
2
+ declare const _default: import("vue-demi").DefineComponent<{
3
+ items: {
4
+ type: {
5
+ (arrayLength: number): BreadcrumbItems[];
6
+ (...items: BreadcrumbItems[]): BreadcrumbItems[];
7
+ new (arrayLength: number): BreadcrumbItems[];
8
+ new (...items: BreadcrumbItems[]): BreadcrumbItems[];
9
+ isArray(arg: any): arg is any[];
10
+ readonly prototype: any[];
11
+ from<T>(arrayLike: ArrayLike<T>): T[];
12
+ from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
13
+ from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
14
+ from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
15
+ of<T_4>(...items: T_4[]): T_4[];
16
+ readonly [Symbol.species]: ArrayConstructor;
17
+ };
18
+ default: () => void;
19
+ };
20
+ }, unknown, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, {}, string, import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
21
+ items: {
22
+ type: {
23
+ (arrayLength: number): BreadcrumbItems[];
24
+ (...items: BreadcrumbItems[]): BreadcrumbItems[];
25
+ new (arrayLength: number): BreadcrumbItems[];
26
+ new (...items: BreadcrumbItems[]): BreadcrumbItems[];
27
+ isArray(arg: any): arg is any[];
28
+ readonly prototype: any[];
29
+ from<T>(arrayLike: ArrayLike<T>): T[];
30
+ from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
31
+ from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
32
+ from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
33
+ of<T_4>(...items: T_4[]): T_4[];
34
+ readonly [Symbol.species]: ArrayConstructor;
35
+ };
36
+ default: () => void;
37
+ };
38
+ }>>, {
39
+ items: BreadcrumbItems[];
40
+ }>;
41
+ export default _default;
@@ -0,0 +1,87 @@
1
+ <template>
2
+ <li
3
+ data-testid="breadcrumbs-item"
4
+ class="breadcrumbs__item"
5
+ :class="classNames">
6
+ <component
7
+ :is="tagName"
8
+ :href="permalink">
9
+ <slot />
10
+ </component>
11
+ <IconChevron
12
+ v-if="!active"
13
+ data-testid="breadcrumbs-icon"
14
+ class="breadcrumbs__item__icon" />
15
+ </li>
16
+ </template>
17
+
18
+ <script>
19
+ import { defineComponent, computed } from "vue-demi";
20
+ import IconChevron from "@carbon/icons-vue/lib/chevron--right/16";
21
+ export default defineComponent({
22
+ components: { IconChevron },
23
+ props: {
24
+ href: {
25
+ type: String,
26
+ default: "#"
27
+ },
28
+ active: {
29
+ type: Boolean,
30
+ default: false
31
+ }
32
+ },
33
+ setup(props) {
34
+ const classNames = computed(() => {
35
+ const result = [""];
36
+ if (props.active)
37
+ result.push("breadcrumbs__item--active");
38
+ return result;
39
+ });
40
+ const tagName = computed(() => {
41
+ let tag = "a";
42
+ if (props.active)
43
+ tag = "span";
44
+ return tag;
45
+ });
46
+ const permalink = computed(() => {
47
+ if (props.active)
48
+ return;
49
+ return props.href;
50
+ });
51
+ return {
52
+ classNames,
53
+ tagName,
54
+ permalink
55
+ };
56
+ }
57
+ });
58
+ </script>
59
+
60
+ <style lang="postcss">
61
+ .breadcrumbs {
62
+ &__item {
63
+ @apply inline-flex text-sm items-center;
64
+
65
+ &:last-child {
66
+ & > .breadcrumbs__item__icon {
67
+ @apply hidden;
68
+ }
69
+ }
70
+
71
+ &:not(:last-child) {
72
+ & > .breadcrumbs__item__icon {
73
+ @apply inline-flex ml-3;
74
+ }
75
+ }
76
+
77
+ & > a {
78
+ @apply text-subtle cursor-pointer underline decoration-solid hover:no-underline;
79
+ @apply dark:text-dark-subtle;
80
+ }
81
+
82
+ & > span {
83
+ @apply font-bold cursor-default;
84
+ }
85
+ }
86
+ }
87
+ </style>
@@ -0,0 +1,28 @@
1
+ import { TagVariant } from '.';
2
+ declare const _default: import("vue-demi").DefineComponent<{
3
+ href: {
4
+ type: StringConstructor;
5
+ default: string;
6
+ };
7
+ active: {
8
+ type: BooleanConstructor;
9
+ default: boolean;
10
+ };
11
+ }, {
12
+ classNames: import("vue-demi").ComputedRef<string[]>;
13
+ tagName: import("vue-demi").ComputedRef<TagVariant>;
14
+ permalink: import("vue-demi").ComputedRef<string | undefined>;
15
+ }, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, {}, string, import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
16
+ href: {
17
+ type: StringConstructor;
18
+ default: string;
19
+ };
20
+ active: {
21
+ type: BooleanConstructor;
22
+ default: boolean;
23
+ };
24
+ }>>, {
25
+ href: string;
26
+ active: boolean;
27
+ }>;
28
+ export default _default;
@@ -0,0 +1,68 @@
1
+ <template>
2
+ <li
3
+ data-testid="breadcrumbs-dropdown"
4
+ class="breadcrumbs__item"
5
+ :class="classNames">
6
+ <Dropdown
7
+ :text="text"
8
+ placement="bottom-end"
9
+ size="xs">
10
+ <slot />
11
+ </Dropdown>
12
+ <IconChevron
13
+ v-if="!active"
14
+ data-testid="breadcrumbs-icon"
15
+ class="breadcrumbs__item__icon" />
16
+ </li>
17
+ </template>
18
+
19
+ <script>
20
+ import { defineComponent, computed } from "vue-demi";
21
+ import Dropdown from "../dropdown/Dropdown.vue";
22
+ import IconChevron from "@carbon/icons-vue/lib/chevron--right/16";
23
+ export default defineComponent({
24
+ components: { Dropdown, IconChevron },
25
+ props: {
26
+ text: {
27
+ type: String,
28
+ default: ""
29
+ },
30
+ active: {
31
+ type: Boolean,
32
+ default: false
33
+ }
34
+ },
35
+ setup(props) {
36
+ const classNames = computed(() => {
37
+ const result = ["breadcrumbs__item--dropdown"];
38
+ if (props.active)
39
+ result.push("breadcrumbs__item--active");
40
+ return result;
41
+ });
42
+ return { classNames };
43
+ }
44
+ });
45
+ </script>
46
+
47
+ <style lang="postcss">
48
+ .breadcrumbs__item {
49
+ &&--dropdown {
50
+ .dropdown__activator {
51
+ @apply px-0 text-subtle bg-transparent border-transparent hover:shadow-none hover:border-transparent hover:bg-transparent focus:shadow-none focus:border-transparent focus:bg-transparent;
52
+ @apply dark:text-dark-subtle dark:bg-transparent dark:border-transparent hover:dark:border-transparent hover:dark:bg-transparent focus:dark:border-transparent focus:dark:bg-transparent;
53
+ }
54
+ }
55
+
56
+ &&--active {
57
+ .dropdown__activator {
58
+ @apply text-default;
59
+ @apply dark:text-dark-default;
60
+
61
+ & > .dropdown__caret {
62
+ @apply text-subtle;
63
+ @apply dark:text-dark-subtle;
64
+ }
65
+ }
66
+ }
67
+ }
68
+ </style>
@@ -0,0 +1,25 @@
1
+ declare const _default: import("vue-demi").DefineComponent<{
2
+ text: {
3
+ type: StringConstructor;
4
+ default: string;
5
+ };
6
+ active: {
7
+ type: BooleanConstructor;
8
+ default: boolean;
9
+ };
10
+ }, {
11
+ classNames: import("vue-demi").ComputedRef<string[]>;
12
+ }, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, {}, string, import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
13
+ text: {
14
+ type: StringConstructor;
15
+ default: string;
16
+ };
17
+ active: {
18
+ type: BooleanConstructor;
19
+ default: boolean;
20
+ };
21
+ }>>, {
22
+ active: boolean;
23
+ text: string;
24
+ }>;
25
+ export default _default;
@@ -0,0 +1,11 @@
1
+ interface Breadcrumb {
2
+ text: string;
3
+ href?: string;
4
+ active?: boolean;
5
+ }
6
+ export interface BreadcrumbItems extends Breadcrumb {
7
+ subitem?: Breadcrumb[];
8
+ }
9
+ export type TagVariant = 'a' | 'span';
10
+ export declare function defineNavigation(navigation: BreadcrumbItems[]): BreadcrumbItems[];
11
+ export {};
@@ -0,0 +1,3 @@
1
+ export function defineNavigation(navigation) {
2
+ return navigation;
3
+ }