@privyid/persona 0.3.0 → 0.5.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.
- package/LICENSE +21 -0
- package/README.md +4 -0
- package/dist/components/app/App.vue +3 -2
- package/dist/components/aspect-ratio/index.d.ts +3 -0
- package/dist/components/aspect-ratio/index.mjs +21 -0
- package/dist/components/aspect-ratio/utils/calculate-ratio.d.ts +7 -0
- package/dist/components/aspect-ratio/utils/calculate-ratio.mjs +10 -0
- package/dist/components/aspect-ratio/utils/resize-observer.d.ts +1 -0
- package/dist/components/aspect-ratio/utils/resize-observer.mjs +22 -0
- package/dist/components/avatar/Avatar.vue +1 -1
- package/dist/components/avatar/Avatar.vue.d.ts +1 -2
- package/dist/components/avatar/index.d.ts +2 -0
- package/dist/components/avatar/index.mjs +0 -0
- package/dist/components/badge/Badge.vue +33 -58
- package/dist/components/badge/Badge.vue.d.ts +1 -2
- package/dist/components/badge/index.d.ts +2 -0
- package/dist/components/badge/index.mjs +0 -0
- package/dist/components/banner/Banner.vue +23 -9
- package/dist/components/banner/Banner.vue.d.ts +1 -1
- package/dist/components/banner/index.d.ts +1 -0
- package/dist/components/banner/index.mjs +0 -0
- package/dist/components/button/Button.vue +74 -77
- package/dist/components/button/Button.vue.d.ts +1 -3
- package/dist/components/button/index.d.ts +3 -0
- package/dist/components/button/index.mjs +0 -0
- package/dist/components/button-group/ButtonGroup.vue +126 -63
- package/dist/components/button-group/ButtonGroup.vue.d.ts +1 -0
- package/dist/components/calendar/Calendar.vue +31 -30
- package/dist/components/calendar/adapter/adapter.d.ts +7 -0
- package/dist/components/calendar/adapter/adapter.mjs +8 -0
- package/dist/components/calendar/adapter/date.mjs +6 -4
- package/dist/components/calendar/adapter/month.mjs +2 -3
- package/dist/components/camera/Camera.vue +383 -0
- package/dist/components/camera/Camera.vue.d.ts +94 -0
- package/dist/components/camera/adapter/adapter.d.ts +41 -0
- package/dist/components/camera/adapter/adapter.mjs +3 -0
- package/dist/components/camera/adapter/capture.d.ts +5 -0
- package/dist/components/camera/adapter/capture.mjs +12 -0
- package/dist/components/camera/adapter/liveness.d.ts +5 -0
- package/dist/components/camera/adapter/liveness.mjs +46 -0
- package/dist/components/camera/adapter/qr-code.d.ts +2 -0
- package/dist/components/camera/adapter/qr-code.mjs +19 -0
- package/dist/components/camera/assets/shutter.wav +0 -0
- package/dist/components/camera/utils/motion.d.ts +29 -0
- package/dist/components/camera/utils/motion.mjs +88 -0
- package/dist/components/camera/utils/take-picture.d.ts +1 -0
- package/dist/components/camera/utils/take-picture.mjs +14 -0
- package/dist/components/caption/Caption.vue +60 -7
- package/dist/components/caption/Caption.vue.d.ts +27 -7
- package/dist/components/card/Card.vue +14 -8
- package/dist/components/card/Card.vue.d.ts +10 -1
- package/dist/components/card/CardSection.vue +2 -1
- package/dist/components/card/index.d.ts +1 -0
- package/dist/components/card/index.mjs +0 -0
- package/dist/components/chart/Chart.vue +6 -3
- package/dist/components/chart/Chart.vue.d.ts +1 -2
- package/dist/components/chart/index.d.ts +2 -0
- package/dist/components/chart/index.mjs +0 -0
- package/dist/components/chart/{use-chart.d.ts → utils/use-chart.d.ts} +0 -0
- package/dist/components/chart/{use-chart.mjs → utils/use-chart.mjs} +0 -0
- package/dist/components/checkbox/Checkbox.vue +47 -14
- package/dist/components/checkbox/Checkbox.vue.d.ts +0 -4
- package/dist/components/checkbox/{use-checkbox.d.ts → index.d.ts} +1 -1
- package/dist/components/checkbox/{use-checkbox.mjs → index.mjs} +0 -0
- package/dist/components/collapse/Collapse.vue +88 -0
- package/dist/components/collapse/Collapse.vue.d.ts +29 -0
- package/dist/components/contextual-bar/ContextualBar.vue +292 -0
- package/dist/components/contextual-bar/ContextualBar.vue.d.ts +78 -0
- package/dist/components/contextual-bar/assets/images/img-background-contextualbar.svg +14 -0
- package/dist/components/contextual-bar/assets/images/img-bg-contextualbar.svg +19 -0
- package/dist/components/contextual-bar/index.d.ts +1 -0
- package/dist/components/contextual-bar/index.mjs +0 -0
- package/dist/components/cropper/Cropper.vue +423 -0
- package/dist/components/cropper/Cropper.vue.d.ts +149 -0
- package/dist/components/cropper/assets/ps-neutral.png +0 -0
- package/dist/components/cropper/assets/sample-1.jpg +0 -0
- package/dist/components/cropper/utils/crop-image.d.ts +44 -0
- package/dist/components/cropper/utils/crop-image.mjs +43 -0
- package/dist/components/cropper/utils/use-pinch.d.ts +8 -0
- package/dist/components/cropper/utils/use-pinch.mjs +42 -0
- package/dist/components/cropper/utils/use-ratio.d.ts +9 -0
- package/dist/components/cropper/utils/use-ratio.mjs +24 -0
- package/dist/components/datepicker/Datepicker.vue +14 -5
- package/dist/components/datepicker/Datepicker.vue.d.ts +9 -0
- package/dist/components/dialog/Dialog.vue +2 -0
- package/dist/components/dialog/Dialog.vue.d.ts +1 -1
- package/dist/components/dialog/DialogFooter.vue +4 -2
- package/dist/components/dialog/DialogFooter.vue.d.ts +2 -1
- package/dist/components/dialog/index.d.ts +31 -6
- package/dist/components/dialog/index.mjs +32 -5
- package/dist/components/divider/Divider.vue +22 -2
- package/dist/components/dot/Dot.vue +27 -20
- package/dist/components/dot/Dot.vue.d.ts +10 -1
- package/dist/components/dot/index.d.ts +2 -0
- package/dist/components/dot/index.mjs +0 -0
- package/dist/components/dropdown/Dropdown.vue +73 -21
- package/dist/components/dropdown/Dropdown.vue.d.ts +16 -12
- package/dist/components/dropdown/DropdownItem.vue +3 -3
- package/dist/components/dropdown/index.d.ts +9 -0
- package/dist/components/dropdown/index.mjs +1 -0
- package/dist/components/dropdown/utils/use-focus.d.ts +1 -1
- package/dist/components/dropdown/utils/use-focus.mjs +4 -2
- package/dist/components/dropdown-subitem/DropdownSubitem.vue +12 -12
- package/dist/components/dropdown-subitem/DropdownSubitem.vue.d.ts +1 -1
- package/dist/components/dropdown-subitem/{use-dropdown-subitem.d.ts → index.d.ts} +0 -0
- package/dist/components/dropdown-subitem/{use-dropdown-subitem.mjs → index.mjs} +0 -0
- package/dist/components/dropzone/Dropzone.vue +202 -0
- package/dist/components/dropzone/Dropzone.vue.d.ts +93 -0
- package/dist/components/dropzone/index.d.ts +4 -0
- package/dist/components/dropzone/index.mjs +0 -0
- package/dist/components/dropzone/utils/accept.d.ts +1 -0
- package/dist/components/dropzone/utils/accept.mjs +17 -0
- package/dist/components/filterbar/Filterbar.vue +7 -5
- package/dist/components/filterbar/Filterbar.vue.d.ts +1 -1
- package/dist/components/filterbar/{use-filterbar.d.ts → index.d.ts} +1 -1
- package/dist/components/filterbar/{use-filterbar.mjs → index.mjs} +0 -0
- package/dist/components/filterbar/pinned/Date.vue +9 -7
- package/dist/components/filterbar/pinned/Date.vue.d.ts +1 -1
- package/dist/components/filterbar/pinned/Multiselect.vue +16 -13
- package/dist/components/filterbar/pinned/Multiselect.vue.d.ts +2 -2
- package/dist/components/filterbar/pinned/Select.vue +11 -8
- package/dist/components/filterbar/pinned/Select.vue.d.ts +2 -2
- package/dist/components/filterbar/pinned/Toggle.vue +2 -1
- package/dist/components/filterbar/pinned/Toggle.vue.d.ts +1 -1
- package/dist/components/form-group/FormGroup.vue +103 -0
- package/dist/components/form-group/FormGroup.vue.d.ts +61 -0
- package/dist/components/global/context.d.ts +24 -0
- package/dist/components/global/context.mjs +18 -0
- package/dist/components/global/router.d.ts +23 -0
- package/dist/components/global/router.mjs +7 -0
- package/dist/components/global/use-singleton.d.ts +17 -2
- package/dist/components/global/use-singleton.mjs +18 -10
- package/dist/components/heading/Heading.vue +50 -0
- package/dist/components/heading/Heading.vue.d.ts +19 -1
- package/dist/components/heading/index.d.ts +3 -0
- package/dist/components/heading/index.mjs +0 -0
- package/dist/components/input/Input.vue +119 -24
- package/dist/components/input/Input.vue.d.ts +38 -2
- package/dist/components/input/{use-input.d.ts → index.d.ts} +0 -0
- package/dist/components/input/{use-input.mjs → index.mjs} +0 -0
- package/dist/components/input-file/InputFile.vue +171 -0
- package/dist/components/input-file/InputFile.vue.d.ts +120 -0
- package/dist/components/input-group/InputGroup.vue +131 -0
- package/dist/components/input-group/InputGroup.vue.d.ts +45 -0
- package/dist/components/input-group/InputGroupAddon.vue +43 -0
- package/dist/components/input-password/InputPassword.vue +62 -0
- package/dist/components/input-password/InputPassword.vue.d.ts +5 -0
- package/dist/components/input-password/index.d.ts +2 -0
- package/dist/components/input-password/index.mjs +17 -0
- package/dist/components/input-pin/InputPin.vue +145 -0
- package/dist/components/input-pin/InputPin.vue.d.ts +64 -0
- package/dist/components/input-range/InputRange.vue +274 -0
- package/dist/components/input-range/InputRange.vue.d.ts +108 -0
- package/dist/components/input-range/utils/use-drag.d.ts +3 -0
- package/dist/components/input-range/utils/use-drag.mjs +19 -0
- package/dist/components/label/Label.vue +29 -41
- package/dist/components/label/Label.vue.d.ts +1 -1
- package/dist/components/markdown/index.d.ts +20 -0
- package/dist/components/markdown/index.mjs +15 -0
- package/dist/components/modal/Modal.vue +71 -5
- package/dist/components/modal/Modal.vue.d.ts +30 -0
- package/dist/components/nav/Nav.vue +16 -14
- package/dist/components/nav/Nav.vue.d.ts +3 -4
- package/dist/components/nav/NavForm.vue +19 -0
- package/dist/components/nav/NavItem.vue +14 -4
- package/dist/components/nav/NavItem.vue.d.ts +3 -4
- package/dist/components/nav/NavItemDropdown.vue +5 -1
- package/dist/components/nav/NavItemDropdown.vue.d.ts +9 -0
- package/dist/components/nav/NavSubItem.vue +5 -5
- package/dist/components/nav/index.d.ts +2 -0
- package/dist/components/nav/index.mjs +0 -0
- package/dist/components/navbar/Navbar.vue +143 -0
- package/dist/components/navbar/Navbar.vue.d.ts +57 -0
- package/dist/components/navbar/NavbarBrand.vue +33 -0
- package/dist/components/navbar/NavbarBrand.vue.d.ts +14 -0
- package/dist/components/navbar/NavbarNav.vue +109 -0
- package/dist/components/navbar/NavbarNav.vue.d.ts +19 -0
- package/dist/components/navbar/NavbarToggle.vue +74 -0
- package/dist/components/navbar/NavbarToggle.vue.d.ts +6 -0
- package/dist/components/navbar/index.d.ts +10 -0
- package/dist/components/navbar/index.mjs +1 -0
- package/dist/components/navbar-menu/NavbarNavMenu.vue +62 -0
- package/dist/components/navbar-menu/NavbarNavMenu.vue.d.ts +16 -0
- package/dist/components/overlay/Overlay.vue +8 -3
- package/dist/components/overlay/Overlay.vue.d.ts +14 -3
- package/dist/components/overlay/{use-overlay.d.ts → index.d.ts} +0 -0
- package/dist/components/overlay/{use-overlay.mjs → index.mjs} +0 -0
- package/dist/components/progress/Progress.vue +200 -0
- package/dist/components/progress/Progress.vue.d.ts +42 -0
- package/dist/components/progress/ProgressItem.vue +50 -0
- package/dist/components/progress/ProgressItem.vue.d.ts +25 -0
- package/dist/components/radio/Radio.vue +88 -31
- package/dist/components/radio/Radio.vue.d.ts +6 -6
- package/dist/components/radio/{use-radio.d.ts → index.d.ts} +1 -1
- package/dist/components/radio/{use-radio.mjs → index.mjs} +0 -0
- package/dist/components/select/Select.vue +10 -4
- package/dist/components/select/Select.vue.d.ts +11 -2
- package/dist/components/select/adapter/adapter.d.ts +1 -1
- package/dist/components/select/adapter/async-adapter.d.ts +1 -1
- package/dist/components/select/{use-select.d.ts → index.d.ts} +0 -0
- package/dist/components/select/{use-select.mjs → index.mjs} +0 -0
- package/dist/components/sidebar/Sidebar.vue +3 -3
- package/dist/components/sidebar/Sidebar.vue.d.ts +4 -9
- package/dist/components/sidebar/SidebarNav.vue +11 -11
- package/dist/components/sidebar/SidebarNav.vue.d.ts +2 -2
- package/dist/components/sidebar/index.d.ts +9 -0
- package/dist/components/sidebar/index.mjs +1 -0
- package/dist/components/sidebar-menu/SidebarMenu.vue.d.ts +4 -2
- package/dist/components/sidebar-menu/{use-sidebar-menu.d.ts → index.d.ts} +2 -0
- package/dist/components/sidebar-menu/{use-sidebar-menu.mjs → index.mjs} +0 -0
- package/dist/components/signature-draw/SignatureDraw.vue +1 -1
- package/dist/components/signature-draw/SignatureDrawDesktop.vue +5 -5
- package/dist/components/signature-draw/SignatureDrawMobile.vue +17 -5
- package/dist/components/signature-draw/utils/canvas.d.ts +7 -1
- package/dist/components/signature-draw/utils/canvas.mjs +8 -2
- package/dist/components/signature-draw/utils/use-draw.mjs +6 -5
- package/dist/components/signature-text/SignatureText.vue +1 -1
- package/dist/components/signature-text/SignatureText.vue.d.ts +1 -1
- package/dist/components/signature-text/utils/formatter.mjs +1 -1
- package/dist/components/spinner/Spinner.vue +1 -0
- package/dist/components/spinner/SpinnerRing.vue +1 -0
- package/dist/components/spread/Spread.vue +55 -0
- package/dist/components/spread/Spread.vue.d.ts +14 -0
- package/dist/components/steps/Step.vue +55 -0
- package/dist/components/steps/Step.vue.d.ts +32 -0
- package/dist/components/steps/StepSlider.vue +39 -0
- package/dist/components/steps/StepSlider.vue.d.ts +25 -0
- package/dist/components/steps/Steps.vue +111 -0
- package/dist/components/steps/Steps.vue.d.ts +56 -0
- package/dist/components/steps/index.d.ts +26 -0
- package/dist/components/steps/index.mjs +52 -0
- package/dist/components/steps/utils/hook.d.ts +10 -0
- package/dist/components/steps/utils/hook.mjs +34 -0
- package/dist/components/strengthbar/Strengthbar.vue +96 -0
- package/dist/components/strengthbar/Strengthbar.vue.d.ts +45 -0
- package/dist/components/subheading/Subheading.vue +65 -20
- package/dist/components/subheading/Subheading.vue.d.ts +23 -5
- package/dist/components/subheading/index.d.ts +1 -0
- package/dist/components/subheading/index.mjs +0 -0
- package/dist/components/table/Table.vue +21 -9
- package/dist/components/table/Table.vue.d.ts +1 -1
- package/dist/components/table/{use-table.d.ts → index.d.ts} +0 -0
- package/dist/components/table/{use-table.mjs → index.mjs} +0 -0
- package/dist/components/tabs/TabContent.vue +2 -2
- package/dist/components/tabs/Tabs.vue +12 -9
- package/dist/components/tabs/Tabs.vue.d.ts +2 -1
- package/dist/components/textarea/Textarea.vue +27 -16
- package/dist/components/textarea/Textarea.vue.d.ts +10 -1
- package/dist/components/toast/Toast.vue +102 -72
- package/dist/components/toast/Toast.vue.d.ts +1 -1
- package/dist/components/toast/ToastContainer.vue +1 -1
- package/dist/components/toast/ToastContainer.vue.d.ts +3 -3
- package/dist/components/toast/{use-toast.d.ts → index.d.ts} +1 -1
- package/dist/components/toast/index.mjs +6 -0
- package/dist/components/toggle/Toggle.vue +17 -21
- package/dist/components/tooltip/Tooltip.vue +161 -0
- package/dist/components/tooltip/Tooltip.vue.d.ts +51 -0
- package/dist/components/tooltip/TooltipContainer.vue +66 -0
- package/dist/components/tooltip/TooltipContainer.vue.d.ts +11 -0
- package/dist/components/tooltip/index.d.ts +14 -0
- package/dist/components/tooltip/index.mjs +82 -0
- package/dist/components/tooltip/utils/create-handler.d.ts +9 -0
- package/dist/components/tooltip/utils/create-handler.mjs +16 -0
- package/dist/components/tooltip/utils/parse-bindings.d.ts +22 -0
- package/dist/components/tooltip/utils/parse-bindings.mjs +45 -0
- package/dist/components/tour/Tour.vue +105 -0
- package/dist/components/tour/Tour.vue.d.ts +11 -0
- package/dist/components/tour/TourDialog.vue +204 -0
- package/dist/components/tour/TourDialog.vue.d.ts +108 -0
- package/dist/components/tour/TourHighlight.vue +57 -0
- package/dist/components/tour/TourHighlight.vue.d.ts +15 -0
- package/dist/components/tour/core/base.d.ts +59 -0
- package/dist/components/tour/core/base.mjs +43 -0
- package/dist/components/tour/core/step/action.d.ts +15 -0
- package/dist/components/tour/core/step/action.mjs +14 -0
- package/dist/components/tour/core/step/conditional.d.ts +26 -0
- package/dist/components/tour/core/step/conditional.mjs +69 -0
- package/dist/components/tour/core/step/delay.d.ts +8 -0
- package/dist/components/tour/core/step/delay.mjs +9 -0
- package/dist/components/tour/core/step/dialog.d.ts +11 -0
- package/dist/components/tour/core/step/dialog.mjs +25 -0
- package/dist/components/tour/core/step/visit.d.ts +9 -0
- package/dist/components/tour/core/step/visit.mjs +18 -0
- package/dist/components/tour/core/step.d.ts +37 -0
- package/dist/components/tour/core/step.mjs +30 -0
- package/dist/components/tour/core/story.d.ts +130 -0
- package/dist/components/tour/core/story.mjs +85 -0
- package/dist/components/tour/core/tour.d.ts +120 -0
- package/dist/components/tour/core/tour.mjs +133 -0
- package/dist/components/tour/index.d.ts +3 -0
- package/dist/components/tour/index.mjs +4 -0
- package/dist/components/tour/utils/is-visible.d.ts +2 -0
- package/dist/components/tour/utils/is-visible.mjs +35 -0
- package/dist/components/tour/utils/use-selector.d.ts +3 -0
- package/dist/components/tour/utils/use-selector.mjs +25 -0
- package/dist/components/tour/utils/wait-element.d.ts +6 -0
- package/dist/components/tour/utils/wait-element.mjs +44 -0
- package/dist/components/utils/base64.d.ts +8 -0
- package/dist/components/utils/base64.mjs +29 -0
- package/dist/components/utils/color.d.ts +6 -1
- package/dist/components/utils/color.mjs +4 -0
- package/dist/components/utils/value.mjs +2 -1
- package/dist/components/utils/vnode.d.ts +14 -1
- package/dist/components/utils/vnode.mjs +5 -2
- package/dist/components/wizard/Wizard.vue +85 -0
- package/dist/components/wizard/Wizard.vue.d.ts +72 -0
- package/dist/components/wizard/WizardBody.vue +50 -0
- package/dist/components/wizard/WizardBody.vue.d.ts +23 -0
- package/dist/components/wizard/WizardHeader.vue +38 -0
- package/dist/components/wizard/WizardHeader.vue.d.ts +16 -0
- package/dist/components/wizard/WizardStep.vue +20 -0
- package/dist/components/wizard/WizardStep.vue.d.ts +34 -0
- package/dist/core/index.d.ts +16 -6
- package/dist/core/index.mjs +37 -6
- package/dist/directive/index.d.ts +3 -0
- package/dist/directive/index.mjs +12 -0
- package/dist/module.d.ts +9 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +1613 -4
- package/dist/runtime/plugin.d.ts +2 -0
- package/dist/runtime/plugin.mjs +14 -0
- package/dist/types.d.ts +5 -1
- package/package.json +46 -9
- package/dist/components/dialog/use-dialog.d.ts +0 -28
- package/dist/components/dialog/use-dialog.mjs +0 -31
- package/dist/components/dropdown/utils/use-popper.d.ts +0 -6
- package/dist/components/dropdown/utils/use-popper.mjs +0 -32
- package/dist/components/input/InputGroup.vue +0 -25
- package/dist/components/toast/use-toast.mjs +0 -5
- package/dist/core/index.cjs +0 -75
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 Privy Identitas Digital
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -10,3 +10,7 @@ Learn more about this package: https://privy-open-source.github.io/design-system
|
|
|
10
10
|
|
|
11
11
|
- Run `npm run dev:prepare` to generate type stubs.
|
|
12
12
|
- Use `npm run dev` to start [playground](./playground) in development mode.
|
|
13
|
+
|
|
14
|
+
## License
|
|
15
|
+
|
|
16
|
+
[MIT License](/LICENSE)
|
|
@@ -15,14 +15,15 @@
|
|
|
15
15
|
* Hyperlink
|
|
16
16
|
*/
|
|
17
17
|
a {
|
|
18
|
-
|
|
18
|
+
--p-color-primary-hover: darken(theme(backgroundColor.accent.emphasis), 5%);
|
|
19
|
+
@apply underline text-accent hover:bg-[color:var(--p-color-primary-hover)];
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
/**
|
|
22
23
|
* Caption
|
|
23
24
|
*/
|
|
24
25
|
caption {
|
|
25
|
-
@apply text-xs text-
|
|
26
|
+
@apply text-xs text-muted;
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { calculateRatio } from "./utils/calculate-ratio.mjs";
|
|
2
|
+
import { getObserver } from "./utils/resize-observer.mjs";
|
|
3
|
+
export const pAspectRatio = {
|
|
4
|
+
async mounted(el, { value, modifiers }) {
|
|
5
|
+
const observer = await getObserver();
|
|
6
|
+
el.dataset.aspectRatio = `${value}`;
|
|
7
|
+
el.dataset.aspectFixed = modifiers.fixed ? "true" : "false";
|
|
8
|
+
calculateRatio(el, value, !!modifiers.fixed);
|
|
9
|
+
observer.observe(el);
|
|
10
|
+
},
|
|
11
|
+
updated(el, { value, modifiers }) {
|
|
12
|
+
el.dataset.aspectRatio = `${value}`;
|
|
13
|
+
el.dataset.aspectFixed = modifiers.fixed ? "true" : "false";
|
|
14
|
+
calculateRatio(el, value, !!modifiers.fixed);
|
|
15
|
+
},
|
|
16
|
+
async beforeUnmount(el) {
|
|
17
|
+
const observer = await getObserver();
|
|
18
|
+
observer.unobserve(el);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
export const vPAspectRatio = pAspectRatio;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getObserver(): Promise<ResizeObserver>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { calculateRatio } from "./calculate-ratio.mjs";
|
|
2
|
+
let observer;
|
|
3
|
+
export async function getObserver() {
|
|
4
|
+
let Observer = window.ResizeObserver;
|
|
5
|
+
if (!Observer) {
|
|
6
|
+
const {
|
|
7
|
+
ResizeObserver: Polyfill
|
|
8
|
+
} = await import("@juggle/resize-observer");
|
|
9
|
+
Observer = Polyfill;
|
|
10
|
+
}
|
|
11
|
+
if (!observer) {
|
|
12
|
+
observer = new Observer((entries) => {
|
|
13
|
+
for (const entry of entries) {
|
|
14
|
+
const target = entry.target;
|
|
15
|
+
const ratio = Number.parseFloat(target.dataset.aspectRatio);
|
|
16
|
+
const fixed = target.dataset.aspectFixed === "true";
|
|
17
|
+
calculateRatio(target, ratio, fixed);
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return observer;
|
|
22
|
+
}
|
|
@@ -115,7 +115,7 @@ export default defineComponent({
|
|
|
115
115
|
|
|
116
116
|
<style lang="postcss">
|
|
117
117
|
.avatar {
|
|
118
|
-
@apply rounded-full inline-flex items-center justify-center overflow-hidden bg-
|
|
118
|
+
@apply rounded-full inline-flex items-center justify-center overflow-hidden text-subtle bg-subtle;
|
|
119
119
|
|
|
120
120
|
&__image {
|
|
121
121
|
@apply w-full h-full object-cover;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { PropType } from 'vue-demi';
|
|
2
|
-
|
|
3
|
-
declare type SizeVariant = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
2
|
+
import { TypeVariant, SizeVariant } from '.';
|
|
4
3
|
declare const _default: import("vue-demi").DefineComponent<{
|
|
5
4
|
variant: {
|
|
6
5
|
type: PropType<TypeVariant>;
|
|
File without changes
|
|
@@ -15,7 +15,7 @@ export default defineComponent({
|
|
|
15
15
|
props: {
|
|
16
16
|
color: {
|
|
17
17
|
type: String,
|
|
18
|
-
default: "
|
|
18
|
+
default: "default"
|
|
19
19
|
},
|
|
20
20
|
variant: {
|
|
21
21
|
type: String,
|
|
@@ -28,7 +28,7 @@ export default defineComponent({
|
|
|
28
28
|
if (props.color)
|
|
29
29
|
result.push(`badge--${props.color}`);
|
|
30
30
|
if (props.variant)
|
|
31
|
-
result.push(`badge
|
|
31
|
+
result.push(`badge--variant-${props.variant}`);
|
|
32
32
|
return result;
|
|
33
33
|
});
|
|
34
34
|
return { classNames };
|
|
@@ -48,42 +48,34 @@ 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-
|
|
51
|
+
@apply inline-block font-bold text-xs px-2 py-0.5 text-on-emphasis rounded-full;
|
|
52
52
|
|
|
53
53
|
/**
|
|
54
54
|
* Provide colors variant
|
|
55
|
-
*
|
|
56
|
-
* primary,
|
|
57
|
-
*
|
|
55
|
+
* 4 colors variant available
|
|
56
|
+
* primary, success, warning
|
|
57
|
+
* & danger
|
|
58
58
|
*/
|
|
59
|
-
|
|
59
|
+
&&--variant-default {
|
|
60
60
|
&.badge {
|
|
61
|
-
&--
|
|
62
|
-
@apply bg-
|
|
61
|
+
&--default {
|
|
62
|
+
@apply bg-emphasis-subtle;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
&--
|
|
66
|
-
@apply bg-
|
|
65
|
+
&--primary {
|
|
66
|
+
@apply bg-accent-emphasis;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
&--success {
|
|
70
|
-
@apply bg-success-
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
&--info {
|
|
74
|
-
@apply bg-info-100;
|
|
70
|
+
@apply bg-success-emphasis;
|
|
75
71
|
}
|
|
76
72
|
|
|
77
73
|
&--warning {
|
|
78
|
-
@apply bg-warning-
|
|
74
|
+
@apply bg-warning-emphasis;
|
|
79
75
|
}
|
|
80
76
|
|
|
81
77
|
&--danger {
|
|
82
|
-
@apply bg-danger-
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
&--gold {
|
|
86
|
-
@apply bg-gold-100;
|
|
78
|
+
@apply bg-danger-emphasis;
|
|
87
79
|
}
|
|
88
80
|
}
|
|
89
81
|
}
|
|
@@ -92,35 +84,27 @@ export default defineComponent({
|
|
|
92
84
|
* Set color of Badge
|
|
93
85
|
* in light and inverse variant
|
|
94
86
|
*/
|
|
95
|
-
|
|
96
|
-
|
|
87
|
+
&&--variant-light,
|
|
88
|
+
&&--variant-inverse {
|
|
97
89
|
&.badge {
|
|
98
|
-
&--
|
|
99
|
-
@apply text-
|
|
90
|
+
&--default {
|
|
91
|
+
@apply text-subtle;
|
|
100
92
|
}
|
|
101
93
|
|
|
102
|
-
&--
|
|
103
|
-
@apply text-
|
|
94
|
+
&--primary {
|
|
95
|
+
@apply text-accent;
|
|
104
96
|
}
|
|
105
97
|
|
|
106
98
|
&--success {
|
|
107
|
-
@apply text-success
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
&--info {
|
|
111
|
-
@apply text-info-100;
|
|
99
|
+
@apply text-success;
|
|
112
100
|
}
|
|
113
101
|
|
|
114
102
|
&--warning {
|
|
115
|
-
@apply text-warning
|
|
103
|
+
@apply text-warning;
|
|
116
104
|
}
|
|
117
105
|
|
|
118
106
|
&--danger {
|
|
119
|
-
@apply text-danger
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
&--gold {
|
|
123
|
-
@apply text-gold-100;
|
|
107
|
+
@apply text-danger;
|
|
124
108
|
}
|
|
125
109
|
}
|
|
126
110
|
}
|
|
@@ -129,34 +113,26 @@ export default defineComponent({
|
|
|
129
113
|
* Set background
|
|
130
114
|
* in light variant
|
|
131
115
|
*/
|
|
132
|
-
&--light {
|
|
116
|
+
&--variant-light {
|
|
133
117
|
&.badge {
|
|
134
118
|
&--primary {
|
|
135
|
-
@apply bg-
|
|
119
|
+
@apply bg-accent;
|
|
136
120
|
}
|
|
137
121
|
|
|
138
|
-
&--
|
|
139
|
-
@apply bg-
|
|
122
|
+
&--default {
|
|
123
|
+
@apply bg-base-black/5;
|
|
140
124
|
}
|
|
141
125
|
|
|
142
126
|
&--success {
|
|
143
|
-
@apply bg-success
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
&--info {
|
|
147
|
-
@apply bg-info-5;
|
|
127
|
+
@apply bg-success;
|
|
148
128
|
}
|
|
149
129
|
|
|
150
130
|
&--warning {
|
|
151
|
-
@apply bg-warning
|
|
131
|
+
@apply bg-warning;
|
|
152
132
|
}
|
|
153
133
|
|
|
154
134
|
&--danger {
|
|
155
|
-
@apply bg-danger
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
&--gold {
|
|
159
|
-
@apply bg-gold-5;
|
|
135
|
+
@apply bg-danger;
|
|
160
136
|
}
|
|
161
137
|
}
|
|
162
138
|
}
|
|
@@ -165,16 +141,15 @@ export default defineComponent({
|
|
|
165
141
|
* Remove background
|
|
166
142
|
* in inverse and dot variant
|
|
167
143
|
*/
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
@apply bg-transparent;
|
|
144
|
+
&:where(.badge--variant-inverse, .badge--dot) {
|
|
145
|
+
@apply bg-default;
|
|
171
146
|
}
|
|
172
147
|
|
|
173
148
|
/**
|
|
174
149
|
* Reset box-model of
|
|
175
150
|
* dot variant
|
|
176
151
|
*/
|
|
177
|
-
|
|
152
|
+
&&--dot {
|
|
178
153
|
@apply p-0 m-0 tracking-[0];
|
|
179
154
|
|
|
180
155
|
.dot {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { PropType } from 'vue-demi';
|
|
2
|
-
|
|
3
|
-
declare type StyleVariant = 'default' | 'light' | 'inverse';
|
|
2
|
+
import { ColorVariant, StyleVariant } from '.';
|
|
4
3
|
declare const _default: import("vue-demi").DefineComponent<{
|
|
5
4
|
color: {
|
|
6
5
|
type: PropType<ColorVariant>;
|
|
File without changes
|
|
@@ -78,26 +78,40 @@ export default defineComponent({
|
|
|
78
78
|
|
|
79
79
|
<style lang="postcss">
|
|
80
80
|
.banner {
|
|
81
|
-
@apply p-4 flex
|
|
81
|
+
@apply p-4 flex space-x-2 rounded text-subtle;
|
|
82
82
|
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
a {
|
|
84
|
+
&:not(.btn) {
|
|
85
|
+
@apply underline decoration-solid text-accent;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.subheading {
|
|
90
|
+
&:not(&--md) {
|
|
91
|
+
@apply mb-1;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@apply mb-2;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&&--info {
|
|
98
|
+
@apply bg-subtle;
|
|
85
99
|
|
|
86
100
|
.banner__icon {
|
|
87
|
-
@apply text-
|
|
101
|
+
@apply text-accent;
|
|
88
102
|
}
|
|
89
103
|
}
|
|
90
104
|
|
|
91
|
-
|
|
92
|
-
@apply bg-danger
|
|
105
|
+
&&--danger {
|
|
106
|
+
@apply bg-danger;
|
|
93
107
|
|
|
94
108
|
.banner__icon {
|
|
95
|
-
@apply text-danger
|
|
109
|
+
@apply text-danger;
|
|
96
110
|
}
|
|
97
111
|
}
|
|
98
112
|
|
|
99
113
|
&__body {
|
|
100
|
-
@apply flex-grow;
|
|
114
|
+
@apply flex-grow text-sm;
|
|
101
115
|
}
|
|
102
116
|
|
|
103
117
|
&__icon,
|
|
@@ -106,7 +120,7 @@ export default defineComponent({
|
|
|
106
120
|
}
|
|
107
121
|
|
|
108
122
|
&__close {
|
|
109
|
-
@apply cursor-pointer text-
|
|
123
|
+
@apply cursor-pointer text-default/30 hover:text-default/50;
|
|
110
124
|
}
|
|
111
125
|
}
|
|
112
126
|
</style>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type StyleVariant = 'info' | 'danger';
|
|
File without changes
|