@privyid/persona 1.0.0-rc.9 → 1.1.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 (119) hide show
  1. package/dist/components/accordion/AccordionItems.vue.d.ts +6 -6
  2. package/dist/components/aspect-ratio/index.d.ts +1 -1
  3. package/dist/components/avatar/Avatar.vue +2 -2
  4. package/dist/components/avatar/AvatarTruncate.vue.d.ts +7 -7
  5. package/dist/components/badge/Badge.vue +4 -4
  6. package/dist/components/banner/Banner.vue +2 -2
  7. package/dist/components/button/Button.vue +31 -6
  8. package/dist/components/card/Card.vue +78 -9
  9. package/dist/components/card/CardSection.vue +7 -0
  10. package/dist/components/card/index.d.ts +1 -0
  11. package/dist/components/checkbox/Checkbox.vue +4 -4
  12. package/dist/components/checkbox/index.d.ts +1 -1
  13. package/dist/components/contextual-bar/ContextualBar.vue +2 -2
  14. package/dist/components/datepicker/Datepicker.vue +6 -0
  15. package/dist/components/dialog/Dialog.vue +3 -3
  16. package/dist/components/dialog/DialogFooter.vue +17 -15
  17. package/dist/components/divider/Divider.vue +6 -6
  18. package/dist/components/dropzone/Dropzone.vue +2 -2
  19. package/dist/components/filterbar/Filterbar.vue.d.ts +14 -7
  20. package/dist/components/filterbar/pinned/PinnedDate.vue.d.ts +13 -9
  21. package/dist/components/filterbar/pinned/PinnedMultiselect.vue.d.ts +14 -8
  22. package/dist/components/filterbar/pinned/PinnedSelect.vue.d.ts +15 -10
  23. package/dist/components/filterbar/pinned/PinnedToggle.vue.d.ts +16 -14
  24. package/dist/components/global/store.d.ts +2 -2
  25. package/dist/components/input/Input.vue +4 -4
  26. package/dist/components/input-color/inputColor.vue +3 -3
  27. package/dist/components/input-file/InputFile.vue +2 -2
  28. package/dist/components/input-group/InputGroup.vue +2 -2
  29. package/dist/components/input-group/InputGroupAddon.vue +4 -4
  30. package/dist/components/input-password/index.d.ts +1 -1
  31. package/dist/components/input-range/InputRange.vue +4 -4
  32. package/dist/components/label/Label.vue +5 -5
  33. package/dist/components/markdown/index.d.ts +1 -1
  34. package/dist/components/meta.json +53 -51
  35. package/dist/components/nav/Nav.vue +22 -13
  36. package/dist/components/nav/NavItem.vue +1 -5
  37. package/dist/components/navbar/Navbar.vue +4 -4
  38. package/dist/components/navbar/NavbarNav.vue +4 -4
  39. package/dist/components/navbar/NavbarToggle.vue +2 -2
  40. package/dist/components/overlay/utils/use-loading.d.ts +1 -1
  41. package/dist/components/pagination/Pagination.vue +2 -2
  42. package/dist/components/pdf-helipad/utils/use-drag.d.ts +1 -1
  43. package/dist/components/pdf-object/PdfObject.vue +2 -2
  44. package/dist/components/pdf-object/index.d.ts +16 -16
  45. package/dist/components/pdf-object/utils/use-drag.d.ts +1 -1
  46. package/dist/components/pdf-object/utils/use-drop.d.ts +1 -1
  47. package/dist/components/pdf-object/utils/use-resize.d.ts +1 -1
  48. package/dist/components/pdf-text/utils/text-to-image.mjs +2 -2
  49. package/dist/components/pdf-viewer/PdfError.vue +1 -1
  50. package/dist/components/pdf-viewer/PdfNavigation.vue +44 -4
  51. package/dist/components/pdf-viewer/PdfViewer.vue +40 -3
  52. package/dist/components/pdf-viewer/index.d.ts +7 -3
  53. package/dist/components/pdf-viewer/index.mjs +3 -1
  54. package/dist/components/pdf-viewer/utils/pdfjs.d.ts +1 -1
  55. package/dist/components/pdf-viewer/utils/pdfjs.mjs +2 -2
  56. package/dist/components/pdf-viewer/utils/use-idle.d.ts +1 -1
  57. package/dist/components/pdf-viewer/utils/use-sticky.d.ts +1 -1
  58. package/dist/components/pdf-viewer/utils/use-viewer.d.ts +18 -18
  59. package/dist/components/popup/Popup.vue +6 -6
  60. package/dist/components/progress/Progress.vue +2 -2
  61. package/dist/components/progress-indicator/ProgressIndicator.vue +4 -4
  62. package/dist/components/progressbar/Progressbar.vue +2 -2
  63. package/dist/components/pspdfkit/PspdfViewer.vue +12 -2
  64. package/dist/components/pspdfkit/css/custom.css +8 -8
  65. package/dist/components/pspdfkit/utils/use-drop.d.ts +1 -1
  66. package/dist/components/pspdfkit/utils/use-viewer.d.ts +10 -10
  67. package/dist/components/radio/Radio.vue +6 -6
  68. package/dist/components/radio/index.d.ts +1 -1
  69. package/dist/components/richtext/Richtext.vue +10 -10
  70. package/dist/components/richtext/RichtextToolbarAdvance.vue +11 -11
  71. package/dist/components/richtext/{controls/Link.vue → control/RichtextControlLink.vue} +1 -1
  72. package/dist/components/richtext/{floating-menu/LinkDetail.vue → popup/RichtextPopupLinkDetail.vue} +1 -1
  73. package/dist/components/ringbar/Ringbar.vue +2 -2
  74. package/dist/components/select/Select.vue +23 -17
  75. package/dist/components/shimmer/Shimmer.vue +4 -4
  76. package/dist/components/sidebar/SidebarContent.vue.d.ts +5 -5
  77. package/dist/components/sidebar/SidebarNav.vue +2 -2
  78. package/dist/components/signature-draw/utils/smooth-line.mjs +1 -1
  79. package/dist/components/steps/StepSlider.vue.d.ts +5 -5
  80. package/dist/components/strengthbar/Strengthbar.vue +2 -2
  81. package/dist/components/table/Table.vue.d.ts +85 -9
  82. package/dist/components/table/index.d.ts +11 -0
  83. package/dist/components/table-static/TableStatic.vue +90 -8
  84. package/dist/components/table-static/TableStaticSort.vue +23 -0
  85. package/dist/components/table-static/index.d.ts +64 -0
  86. package/dist/components/table-static/index.mjs +24 -0
  87. package/dist/components/tabs/TabContent.vue.d.ts +7 -7
  88. package/dist/components/textarea/Textarea.vue +6 -6
  89. package/dist/components/time/index.d.ts +2 -2
  90. package/dist/components/toast/Toast.vue +2 -2
  91. package/dist/components/toggle/Toggle.vue +4 -4
  92. package/dist/components/tooltip/index.d.ts +1 -1
  93. package/dist/components/utils/array.d.ts +2 -0
  94. package/dist/components/utils/array.mjs +19 -0
  95. package/dist/components/wizard/WizardHeader.vue.d.ts +5 -5
  96. package/dist/core/index.d.ts +4 -0
  97. package/dist/core/index.mjs +12 -0
  98. package/dist/module.d.mts +11 -1
  99. package/dist/module.d.ts +11 -1
  100. package/dist/module.mjs +66 -16
  101. package/dist/runtime/plugins/persona.js +35 -0
  102. package/package.json +34 -24
  103. package/dist/module.json +0 -12
  104. package/dist/runtime/plugin.js +0 -21
  105. package/dist/types.d.mts +0 -1
  106. package/dist/types.d.ts +0 -1
  107. /package/dist/components/richtext/{controls/FontFamily.vue → control/RichtextControlFontFamily.vue} +0 -0
  108. /package/dist/components/richtext/{controls/FontSize.vue → control/RichtextControlFontSize.vue} +0 -0
  109. /package/dist/components/richtext/{controls/Highlight.vue → control/RichtextControlHighlight.vue} +0 -0
  110. /package/dist/components/richtext/{controls/History.vue → control/RichtextControlHistory.vue} +0 -0
  111. /package/dist/components/richtext/{controls/Image.vue → control/RichtextControlImage.vue} +0 -0
  112. /package/dist/components/richtext/{controls/List.vue → control/RichtextControlList.vue} +0 -0
  113. /package/dist/components/richtext/{controls/Table.vue → control/RichtextControlTable.vue} +0 -0
  114. /package/dist/components/richtext/{controls/TextAlign.vue → control/RichtextControlTextAlign.vue} +0 -0
  115. /package/dist/components/richtext/{controls/TextFormat.vue → control/RichtextControlTextFormat.vue} +0 -0
  116. /package/dist/components/richtext/{controls/TextHeading.vue → control/RichtextControlTextHeading.vue} +0 -0
  117. /package/dist/components/richtext/{floating-menu/ImageEdit.vue → popup/RichtextPopupImageEdit.vue} +0 -0
  118. /package/dist/components/richtext/{floating-menu/LinkEdit.vue → popup/RichtextPopupLinkEdit.vue} +0 -0
  119. /package/dist/runtime/{plugin.d.ts → plugins/persona.d.ts} +0 -0
@@ -3,7 +3,7 @@
3
3
  * https://github.com/vuejs/rfcs/discussions/585
4
4
  */
5
5
  import type { PropType } from 'vue-demi';
6
- declare const _default: import("vue-demi").DefineComponent<{
6
+ declare const _default: import("vue-demi").DefineComponent<import("vue-demi").ExtractPropTypes<{
7
7
  modelValue: {
8
8
  type: PropType<number | number[]>;
9
9
  default: undefined;
@@ -16,9 +16,9 @@ declare const _default: import("vue-demi").DefineComponent<{
16
16
  type: BooleanConstructor;
17
17
  default: boolean;
18
18
  };
19
- }, () => import("vue-demi").VNode<import("vue-demi").RendererNode, import("vue-demi").RendererElement, {
19
+ }>, () => import("vue-demi").VNode<import("vue-demi").RendererNode, import("vue-demi").RendererElement, {
20
20
  [key: string]: any;
21
- }>[], unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue-demi").PublicProps, Readonly<import("vue-demi").ExtractPropTypes<{
21
+ }>[], {}, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue-demi").PublicProps, Readonly<import("vue-demi").ExtractPropTypes<{
22
22
  modelValue: {
23
23
  type: PropType<number | number[]>;
24
24
  default: undefined;
@@ -31,11 +31,11 @@ declare const _default: import("vue-demi").DefineComponent<{
31
31
  type: BooleanConstructor;
32
32
  default: boolean;
33
33
  };
34
- }>> & {
34
+ }>> & Readonly<{
35
35
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
36
- }, {
36
+ }>, {
37
37
  modelValue: number | number[];
38
38
  multiple: boolean;
39
39
  noCaret: boolean;
40
- }, {}>;
40
+ }, {}, {}, {}, string, import("vue-demi").ComponentProvideOptions, true, {}, any>;
41
41
  export default _default;
@@ -1,3 +1,3 @@
1
1
  import type { Directive } from 'vue-demi';
2
2
  export declare const pAspectRatio: Directive<HTMLElement, number>;
3
- export declare const vPAspectRatio: import("vue-demi").ObjectDirective<HTMLElement, number>;
3
+ export declare const vPAspectRatio: import("vue-demi").ObjectDirective<HTMLElement, number, string, string>;
@@ -138,8 +138,8 @@ onMounted(() => {
138
138
 
139
139
  <style lang="postcss">
140
140
  .avatar {
141
- @apply inline-flex items-center justify-center overflow-hidden text-subtle bg-subtle;
142
- @apply dark:text-dark-subtle dark:bg-dark-subtle;
141
+ @apply inline-flex items-center justify-center overflow-hidden text-subtle bg-base;
142
+ @apply dark:text-dark-subtle dark:bg-dark-base;
143
143
 
144
144
  &:not(&--square) {
145
145
  @apply rounded-full;
@@ -4,28 +4,28 @@
4
4
  */
5
5
  import type { PropType } from 'vue-demi';
6
6
  import type { SizeVariant } from '.';
7
- declare const _default: import("vue-demi").DefineComponent<{
7
+ declare const _default: import("vue-demi").DefineComponent<import("vue-demi").ExtractPropTypes<{
8
8
  size: {
9
9
  type: PropType<SizeVariant>;
10
10
  default: string;
11
11
  };
12
12
  length: {
13
- type: (NumberConstructor | StringConstructor)[];
13
+ type: (StringConstructor | NumberConstructor)[];
14
14
  default: number;
15
15
  };
16
- }, () => import("vue-demi").VNode<import("vue-demi").RendererNode, import("vue-demi").RendererElement, {
16
+ }>, () => import("vue-demi").VNode<import("vue-demi").RendererNode, import("vue-demi").RendererElement, {
17
17
  [key: string]: any;
18
- }>[], unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, {}, string, import("vue-demi").PublicProps, Readonly<import("vue-demi").ExtractPropTypes<{
18
+ }>[], {}, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, {}, string, import("vue-demi").PublicProps, Readonly<import("vue-demi").ExtractPropTypes<{
19
19
  size: {
20
20
  type: PropType<SizeVariant>;
21
21
  default: string;
22
22
  };
23
23
  length: {
24
- type: (NumberConstructor | StringConstructor)[];
24
+ type: (StringConstructor | NumberConstructor)[];
25
25
  default: number;
26
26
  };
27
- }>>, {
27
+ }>> & Readonly<{}>, {
28
28
  size: SizeVariant;
29
29
  length: string | number;
30
- }, {}>;
30
+ }, {}, {}, {}, string, import("vue-demi").ComponentProvideOptions, true, {}, any>;
31
31
  export default _default;
@@ -48,8 +48,8 @@ const classNames = computed(() => {
48
48
  * Set global style
49
49
  * of badge
50
50
  */
51
- --p-color-primary-light: lighten(theme(colors.brand.accent), 40%);
52
- --p-color-dark-primary-light: darken(theme(colors.dark.brand.accent), 40%);
51
+ --p-color-primary-light: lighten(theme(colors.brand.accent.DEFAULT), 40%);
52
+ --p-color-dark-primary-light: darken(theme(colors.dark.brand.accent.DEFAULT), 40%);
53
53
 
54
54
  @apply inline-block font-bold text-xs px-2 py-0.5 rounded-full space-x-1 align-middle;
55
55
 
@@ -161,8 +161,8 @@ const classNames = computed(() => {
161
161
  &--variant-light {
162
162
  &.badge {
163
163
  &--default {
164
- --p-bg-variant-light: theme(backgroundColor.subtle.alpha);
165
- --p-bg-dark-variant-light: theme(backgroundColor.dark.subtle.alpha);
164
+ --p-bg-variant-light: theme(backgroundColor.emphasis-alpha);
165
+ --p-bg-dark-variant-light: theme(backgroundColor.dark.emphasis-alpha);
166
166
  @apply bg-[color:var(--p-bg-variant-light)];
167
167
  @apply dark:bg-[color:var(--p-bg-dark-variant-light)];
168
168
  }
@@ -167,8 +167,8 @@ defineSlots<{
167
167
  }
168
168
 
169
169
  &&--info {
170
- @apply bg-base;
171
- @apply dark:bg-dark-base;
170
+ @apply bg-ground;
171
+ @apply dark:bg-dark-ground;
172
172
 
173
173
  .banner__icon {
174
174
  @apply text-info;
@@ -165,6 +165,15 @@ defineSlots<{
165
165
  --p-button-md-padding-x: theme(spacing.5);
166
166
  --p-button-lg-padding-x: theme(spacing.8);
167
167
 
168
+ /**
169
+ * only for button
170
+ * variant link
171
+ */
172
+ --p-button-xs-padding-y: theme(spacing[0.5]);
173
+ --p-button-sm-padding-y: theme(spacing.1);
174
+ --p-button-md-padding-y: theme(spacing[2.5]);
175
+ --p-button-lg-padding-y: theme(spacing.4);
176
+
168
177
  @apply inline-flex align-middle justify-center font-medium no-underline hover:no-underline disabled:opacity-50 disabled:pointer-events-none transition-all ease-in-out duration-200;
169
178
 
170
179
  > svg {
@@ -181,18 +190,34 @@ defineSlots<{
181
190
  */
182
191
  &&--xs {
183
192
  @apply px-[var(--p-button-xs-padding-x)] py-[2px] gap-1 text-sm rounded-xs;
193
+
194
+ &:where(.btn--variant-link) {
195
+ @apply py-[var(--p-button-xs-padding-y)];
196
+ }
184
197
  }
185
198
 
186
199
  &&--sm {
187
200
  @apply px-[var(--p-button-sm-padding-x)] py-1 gap-2 text-base tracking-wider rounded-sm;
201
+
202
+ &:where(.btn--variant-link) {
203
+ @apply py-[var(--p-button-sm-padding-y)];
204
+ }
188
205
  }
189
206
 
190
207
  &&--md {
191
208
  @apply px-[var(--p-button-md-padding-x)] py-[10px] gap-3 text-base tracking-wider rounded;
209
+
210
+ &:where(.btn--variant-link) {
211
+ @apply py-[var(--p-button-md-padding-y)];
212
+ }
192
213
  }
193
214
 
194
215
  &&--lg {
195
216
  @apply px-[var(--p-button-lg-padding-x)] py-4 gap-4 text-base tracking-wider rounded;
217
+
218
+ &:where(.btn--variant-link) {
219
+ @apply py-[var(--p-button-lg-padding-y)];
220
+ }
196
221
  }
197
222
 
198
223
  /*
@@ -205,8 +230,8 @@ defineSlots<{
205
230
 
206
231
  &.btn {
207
232
  &--default {
208
- @apply bg-default-alpha focus:bg-subtle-alpha active:bg-subtle-alpha hover:text-default focus:text-default;
209
- @apply dark:bg-dark-default-alpha focus:dark:bg-dark-subtle-alpha active:dark:bg-dark-subtle-alpha hover:dark:text-dark-default focus:dark:text-dark-default;
233
+ @apply bg-default-alpha focus:bg-default-alpha active:bg-default-alpha hover:text-default focus:text-default;
234
+ @apply dark:bg-dark-default-alpha focus:dark:bg-dark-default-alpha active:dark:bg-dark-default-alpha hover:dark:text-dark-default focus:dark:text-dark-default;
210
235
 
211
236
  /* Border */
212
237
  @apply text-default border-default-alpha hover:border-subtle-alpha active:border-subtle-alpha focus:border-subtle-alpha;
@@ -342,12 +367,12 @@ defineSlots<{
342
367
  * Button input variant
343
368
  */
344
369
  &&--variant-input {
345
- @apply border border-solid border-muted text-subtle font-normal bg-default hover:border-subtle focus:border-subtle active:outline-default;
346
- @apply dark:border-dark-muted dark:text-dark-subtle dark:bg-dark-default hover:dark:border-dark-subtle focus:dark:border-dark-subtle active:dark:outline-dark-default;
370
+ @apply border border-solid border-subtlest text-subtle font-normal bg-default hover:border-subtle focus:border-subtle active:outline-default;
371
+ @apply dark:border-dark-subtlest dark:text-dark-subtle dark:bg-dark-default hover:dark:border-dark-subtle focus:dark:border-dark-subtle active:dark:outline-dark-default;
347
372
 
348
373
  .state--disabled & {
349
- @apply bg-subtle border-muted pointer-events-none text-muted;
350
- @apply dark:bg-dark-subtle dark:border-dark-muted dark:text-dark-muted;
374
+ @apply bg-base border-subtlest pointer-events-none text-muted;
375
+ @apply dark:bg-dark-base dark:border-dark-subtlest dark:text-dark-muted;
351
376
  }
352
377
 
353
378
  .state--error & {
@@ -57,7 +57,7 @@ import type { PropType, VNode } from 'vue-demi'
57
57
  import { computed, ref } from 'vue-demi'
58
58
  import IconClose from '@privyid/persona-icon/vue/close/16.vue'
59
59
  import Heading from '../heading/Heading.vue'
60
- import type { ElementVariant } from '.'
60
+ import type { ElementVariant, SpacingVariant } from '.'
61
61
 
62
62
  const props = defineProps({
63
63
  element: {
@@ -76,6 +76,10 @@ const props = defineProps({
76
76
  type : Boolean,
77
77
  default: false,
78
78
  },
79
+ readonly: {
80
+ type : Boolean,
81
+ default: false,
82
+ },
79
83
  callout: {
80
84
  type : Boolean,
81
85
  default: false,
@@ -88,6 +92,10 @@ const props = defineProps({
88
92
  type : [String, Array],
89
93
  default: undefined,
90
94
  },
95
+ spacing: {
96
+ type : String as PropType<SpacingVariant>,
97
+ default: 'md',
98
+ },
91
99
  })
92
100
 
93
101
  const emit = defineEmits<{
@@ -105,9 +113,15 @@ const classNames = computed(() => {
105
113
  if (props.disabled)
106
114
  result.push('card--disabled')
107
115
 
116
+ if (props.readonly)
117
+ result.push('card--readonly')
118
+
108
119
  if (props.callout)
109
120
  result.push('card--callout')
110
121
 
122
+ if (props.spacing)
123
+ result.push(`card--spacing-${props.spacing}`)
124
+
111
125
  return result
112
126
  })
113
127
 
@@ -136,7 +150,7 @@ defineSlots<{
136
150
  * Component Name: Card
137
151
  * Component URI : https : //www.figma.com/file/JIYmbyRYZHc9bnVp6Npm9K/B-A-S-E-%2F-Components?node-id=294%3A5079
138
152
  * Date Created : May 22, 2022
139
- * Last Update : May 23, 2022
153
+ * Last Update : Nov 08, 2024
140
154
  */
141
155
  .card {
142
156
  --p-card-padding-x: theme(spacing.6);
@@ -147,8 +161,10 @@ defineSlots<{
147
161
  --p-card-border-dark: theme(borderColor.dark.default.DEFAULT);
148
162
  --p-card-color: theme(textColor.default);
149
163
  --p-card-color-dark: theme(textColor.dark.default);
164
+ --p-card-border-radius: theme(borderRadius.md);
165
+ --p-card-inside-border-radius: theme(borderRadius.DEFAULT);
150
166
 
151
- @apply border bg-[color:var(--p-card-bg)] border-[color:var(--p-card-border)] text-[color:var(--p-card-color)] rounded-md;
167
+ @apply border bg-[color:var(--p-card-bg)] border-[color:var(--p-card-border)] text-[color:var(--p-card-color)] rounded-[var(--p-card-border-radius)];
152
168
  @apply dark:bg-[color:var(--p-card-bg-dark)] dark:border-[color:var(--p-card-border-dark)] dark:text-[color:var(--p-card-color-dark)];
153
169
 
154
170
  /**
@@ -156,7 +172,29 @@ defineSlots<{
156
172
  * has 8px rounded
157
173
  */
158
174
  .card {
159
- @apply rounded;
175
+ @apply rounded-[var(--p-card-inside-border-radius)];
176
+ }
177
+
178
+ &&--spacing {
179
+ &-sm {
180
+ --p-card-padding-x: theme(spacing.4);
181
+ --p-card-padding-y: theme(spacing.4);
182
+ }
183
+
184
+ &-md {
185
+ --p-card-padding-x: theme(spacing.6);
186
+ --p-card-padding-y: theme(spacing.6);
187
+ }
188
+
189
+ &-lg {
190
+ --p-card-padding-x: theme(spacing.9);
191
+ --p-card-padding-y: theme(spacing.9);
192
+ }
193
+
194
+ &-xl {
195
+ --p-card-padding-x: theme(spacing.12);
196
+ --p-card-padding-y: theme(spacing.12);
197
+ }
160
198
  }
161
199
 
162
200
  /*
@@ -213,6 +251,15 @@ defineSlots<{
213
251
  * padding of card-body-top-parent set to 0
214
252
  */
215
253
  &&--sectioned {
254
+ &:has(.card__section--readonly) {
255
+ .card__section:first-child:where(.card__section--readonly) {
256
+ @apply rounded-t-[var(--p-card-border-radius)];
257
+ }
258
+
259
+ .card__section:last-child:where(.card__section--readonly) {
260
+ @apply rounded-b-[var(--p-card-border-radius)];
261
+ }
262
+ }
216
263
  > .card__body {
217
264
  @apply p-0;
218
265
  }
@@ -223,8 +270,16 @@ defineSlots<{
223
270
  * If Card disabled
224
271
  */
225
272
  &&--disabled {
226
- @apply bg-subtle;
227
- @apply dark:bg-dark-subtle;
273
+ @apply opacity-50 cursor-not-allowed;
274
+ }
275
+
276
+ /**
277
+ * Give background base
278
+ * when Card are readonly
279
+ */
280
+ &&--readonly {
281
+ @apply bg-ground cursor-not-allowed;
282
+ @apply dark:bg-dark-ground;
228
283
  }
229
284
 
230
285
  /**
@@ -236,6 +291,10 @@ defineSlots<{
236
291
  }
237
292
 
238
293
  &__header {
294
+ .heading {
295
+ @apply font-medium leading-none;
296
+ }
297
+
239
298
  &&--default {
240
299
  @apply flex justify-between items-center;
241
300
  }
@@ -257,6 +316,11 @@ defineSlots<{
257
316
  @apply text-default/30 hover:text-default/50 hover:cursor-pointer;
258
317
  @apply dark:text-dark-default/30 hover:dark:text-dark-default/50;
259
318
  }
319
+
320
+ + .card__body,
321
+ + .card__section > .card__body {
322
+ @apply pt-4;
323
+ }
260
324
  }
261
325
 
262
326
  &__section {
@@ -269,8 +333,13 @@ defineSlots<{
269
333
 
270
334
  &&--disabled,
271
335
  &.card--disabled {
272
- @apply bg-subtle;
273
- @apply dark:bg-dark-subtle;
336
+ @apply opacity-50 cursor-not-allowed;
337
+ }
338
+
339
+ &&--readonly,
340
+ &.card--readonly {
341
+ @apply bg-ground cursor-not-allowed;
342
+ @apply dark:bg-dark-ground;
274
343
  }
275
344
 
276
345
  &.card--disabled {
@@ -279,7 +348,7 @@ defineSlots<{
279
348
  }
280
349
 
281
350
  &__footer {
282
- @apply pb-[var(--p-card-padding-y)] px-[var(--p-card-padding-x)] pt-3;
351
+ @apply pb-[var(--p-card-padding-y)] px-[var(--p-card-padding-x)] pt-8;
283
352
  }
284
353
  }
285
354
  </style>
@@ -54,6 +54,10 @@ const props = defineProps({
54
54
  type : Boolean,
55
55
  default: false,
56
56
  },
57
+ readonly: {
58
+ type : Boolean,
59
+ default: false,
60
+ },
57
61
  })
58
62
 
59
63
  const classNames = computed(() => {
@@ -62,6 +66,9 @@ const classNames = computed(() => {
62
66
  if (props.disabled)
63
67
  result.push('card__section--disabled')
64
68
 
69
+ if (props.readonly)
70
+ result.push('card__section--readonly')
71
+
65
72
  return result
66
73
  })
67
74
 
@@ -1 +1,2 @@
1
1
  export type ElementVariant = 'div' | 'section' | 'article';
2
+ export type SpacingVariant = 'sm' | 'md' | 'lg' | 'xl';
@@ -191,12 +191,12 @@ defineSlots<{
191
191
 
192
192
  &:not(.checkbox--checked, .checkbox--indeterminate) {
193
193
  .checkbox__icon {
194
- @apply bg-subtle border-subtle;
195
- @apply dark:bg-dark-subtle dark:border-dark-subtle;
194
+ @apply bg-base border-subtle;
195
+ @apply dark:bg-dark-base dark:border-dark-subtle;
196
196
 
197
197
  > svg {
198
- @apply fill-subtle;
199
- @apply dark:fill-dark-subtle;
198
+ @apply fill-base;
199
+ @apply dark:fill-dark-base;
200
200
  }
201
201
  }
202
202
  }
@@ -4,4 +4,4 @@ export interface CheckboxProps extends InputProps<unknown> {
4
4
  value: unknown;
5
5
  uncheckedValue: unknown;
6
6
  }
7
- export declare function useVModel(props: CheckboxProps): import("vue-demi").Ref<boolean>;
7
+ export declare function useVModel(props: CheckboxProps): import("vue-demi").Ref<boolean, boolean>;
@@ -402,8 +402,8 @@ defineSlots<{
402
402
  * and neutral
403
403
  */
404
404
  &&--info {
405
- @apply bg-base text-default;
406
- @apply dark:bg-dark-base dark:text-dark-default;
405
+ @apply bg-ground text-default;
406
+ @apply dark:bg-dark-ground dark:text-dark-default;
407
407
 
408
408
  .contextual-bar {
409
409
  &__icon {
@@ -4,6 +4,7 @@
4
4
  class="datepicker"
5
5
  data-testid="datepicker"
6
6
  aria-label="datepicker"
7
+ :placement="placement"
7
8
  :class="classNames"
8
9
  :disabled="disabled">
9
10
  <template #activator>
@@ -63,6 +64,7 @@ import type { CalendarMode } from '../calendar/adapter/adapter'
63
64
  import { useVModel } from '../input'
64
65
  import IconCalendar from '@privyid/persona-icon/vue/calendar/16.vue'
65
66
  import type { SizeVariant } from '../button'
67
+ import type { Placement } from '@floating-ui/dom'
66
68
 
67
69
  defineOptions({ inheritAttrs: false })
68
70
 
@@ -139,6 +141,10 @@ const props = defineProps({
139
141
  type : String,
140
142
  default: undefined,
141
143
  },
144
+ placement: {
145
+ type : String as PropType<Placement>,
146
+ default: 'bottom-start',
147
+ },
142
148
  })
143
149
 
144
150
  const emit = defineEmits<{
@@ -4,7 +4,7 @@
4
4
  :key="id"
5
5
  v-model="modal"
6
6
  v-bind="context.attrs"
7
- class="dialog"
7
+ class="modal-dialog"
8
8
  :title="context.title"
9
9
  :size="context.size"
10
10
  :centered="context.centered"
@@ -15,7 +15,7 @@
15
15
  @close="onCancel">
16
16
  <template #header>
17
17
  <template v-if="dialogIcon">
18
- <div class="dialog__icon">
18
+ <div class="modal-dialog__icon">
19
19
  <component
20
20
  :is="dialogIcon"
21
21
  :class="context.iconClass"
@@ -139,7 +139,7 @@ defineExpose({
139
139
  </script>
140
140
 
141
141
  <style lang="postcss">
142
- .dialog {
142
+ .modal-dialog {
143
143
  --p-modal-z-index: theme(zIndex.dialog);
144
144
 
145
145
  &__icon {
@@ -96,10 +96,10 @@ const emit = defineEmits<{
96
96
  }>()
97
97
 
98
98
  const footerClassNames = computed(() => {
99
- const result: string[] = ['footer']
99
+ const result: string[] = ['modal-dialog__footer']
100
100
 
101
101
  if (props.align)
102
- result.push(`footer--align-${props.align}`)
102
+ result.push(`modal-dialog__footer--align-${props.align}`)
103
103
 
104
104
  return result
105
105
  })
@@ -114,22 +114,24 @@ function confirm (): void {
114
114
  </script>
115
115
 
116
116
  <style lang="postcss">
117
- .footer {
118
- @apply flex items-center space-x-3;
117
+ .modal-dialog {
118
+ &__footer {
119
+ @apply flex items-center space-x-3;
119
120
 
120
- &--align {
121
- &-left,
122
- &-start {
123
- @apply justify-start;
124
- }
121
+ &--align {
122
+ &-left,
123
+ &-start {
124
+ @apply justify-start;
125
+ }
125
126
 
126
- &-right,
127
- &-end {
128
- @apply justify-end;
129
- }
127
+ &-right,
128
+ &-end {
129
+ @apply justify-end;
130
+ }
130
131
 
131
- &-center {
132
- @apply justify-center;
132
+ &-center {
133
+ @apply justify-center;
134
+ }
133
135
  }
134
136
  }
135
137
  }
@@ -29,8 +29,8 @@ const classNames = computed(() => {
29
29
 
30
30
  <style lang="postcss">
31
31
  .divider {
32
- @apply bg-subtle-alpha;
33
- @apply dark:bg-dark-subtle-alpha my-2;
32
+ @apply bg-emphasis-alpha;
33
+ @apply dark:bg-dark-emphasis-alpha my-2;
34
34
 
35
35
  &&--horizontal {
36
36
  @apply w-full h-[1px];
@@ -42,8 +42,8 @@ const classNames = computed(() => {
42
42
  @apply dark:border-dark-subtle dark:bg-transparent;
43
43
 
44
44
  &::before {
45
- @apply content-[''] bg-subtle-alpha w-[1px] h-full;
46
- @apply dark:bg-dark-subtle-alpha;
45
+ @apply content-[''] bg-emphasis-alpha w-[1px] h-full;
46
+ @apply dark:bg-dark-emphasis-alpha;
47
47
  }
48
48
  }
49
49
 
@@ -58,8 +58,8 @@ const classNames = computed(() => {
58
58
  }
59
59
 
60
60
  .state--disabled & {
61
- @apply bg-subtle border-subtle pointer-events-none text-muted;
62
- @apply dark:bg-dark-subtle dark:border-dark-subtle dark:text-dark-muted;
61
+ @apply bg-base border-subtle pointer-events-none text-muted;
62
+ @apply dark:bg-dark-base dark:border-dark-subtle dark:text-dark-muted;
63
63
  }
64
64
  }
65
65
  </style>
@@ -213,10 +213,10 @@ defineSlots<{
213
213
 
214
214
  <style lang="postcss">
215
215
  .dropzone {
216
- @apply cursor-pointer block w-full;
216
+ @apply cursor-pointer block w-full relative;
217
217
 
218
218
  &__input {
219
- @apply hidden;
219
+ @apply absolute w-[.1px] h-[.1px] opacity-0 overflow-hidden -z-1 bottom-0 right-0;
220
220
  }
221
221
 
222
222
  * {
@@ -1,6 +1,6 @@
1
1
  import type { PropType } from 'vue-demi';
2
2
  import type { FilterItem } from '.';
3
- declare const _default: import("vue-demi").DefineComponent<{
3
+ declare const _default: import("vue-demi").DefineComponent<import("vue-demi").ExtractPropTypes<{
4
4
  schema: {
5
5
  type: PropType<FilterItem[]>;
6
6
  default: () => never[];
@@ -9,13 +9,13 @@ declare const _default: import("vue-demi").DefineComponent<{
9
9
  type: PropType<Record<string, unknown>>;
10
10
  default: () => {};
11
11
  };
12
- }, {
13
- model: import("vue-demi").Ref<Record<string, unknown>>;
12
+ }>, {
13
+ model: import("vue-demi").Ref<Record<string, unknown>, Record<string, unknown>>;
14
14
  pinnedItems: import("vue-demi").ComputedRef<FilterItem[]>;
15
15
  getValue: (key: string) => unknown;
16
16
  setValue: (key: string, value: unknown) => void;
17
17
  reset: () => void;
18
- }, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue-demi").PublicProps, Readonly<import("vue-demi").ExtractPropTypes<{
18
+ }, {}, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue-demi").PublicProps, Readonly<import("vue-demi").ExtractPropTypes<{
19
19
  schema: {
20
20
  type: PropType<FilterItem[]>;
21
21
  default: () => never[];
@@ -24,10 +24,17 @@ declare const _default: import("vue-demi").DefineComponent<{
24
24
  type: PropType<Record<string, unknown>>;
25
25
  default: () => {};
26
26
  };
27
- }>> & {
27
+ }>> & Readonly<{
28
28
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
29
- }, {
29
+ }>, {
30
30
  modelValue: Record<string, unknown>;
31
31
  schema: FilterItem[];
32
- }, {}>;
32
+ }, {}, {
33
+ Button: any;
34
+ Dropdown: any;
35
+ Date: any;
36
+ Select: any;
37
+ Multiselect: any;
38
+ Toggle: any;
39
+ }, {}, string, import("vue-demi").ComponentProvideOptions, true, {}, any>;
33
40
  export default _default;