@leaflink/stash 42.5.0 → 42.5.1
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/README.md +24 -3
- package/dist/ActionsDropdown.js +15 -20
- package/dist/ActionsDropdown.js.map +1 -1
- package/dist/AddressSelect.js +34 -45
- package/dist/AddressSelect.js.map +1 -1
- package/dist/Alert.js +11 -13
- package/dist/Alert.js.map +1 -1
- package/dist/AppNavigationItem.js +4 -6
- package/dist/AppNavigationItem.js.map +1 -1
- package/dist/AppTopbar.js +13 -15
- package/dist/AppTopbar.js.map +1 -1
- package/dist/ButtonGroup.js +12 -14
- package/dist/ButtonGroup.js.map +1 -1
- package/dist/CardMedia.js +9 -11
- package/dist/CardMedia.js.map +1 -1
- package/dist/Carousel.js +41 -44
- package/dist/Carousel.js.map +1 -1
- package/dist/Checkbox.js +9 -11
- package/dist/Checkbox.js.map +1 -1
- package/dist/ChevronToggle.js +2 -4
- package/dist/ChevronToggle.js.map +1 -1
- package/dist/Chip.js +4 -6
- package/dist/Chip.js.map +1 -1
- package/dist/ContextSwitcher.js +12 -17
- package/dist/ContextSwitcher.js.map +1 -1
- package/dist/Copy.js +19 -24
- package/dist/Copy.js.map +1 -1
- package/dist/CurrencyInput.js +8 -13
- package/dist/CurrencyInput.js.map +1 -1
- package/dist/DataView.js +48 -59
- package/dist/DataView.js.map +1 -1
- package/dist/DataViewFilters.js +87 -97
- package/dist/DataViewFilters.js.map +1 -1
- package/dist/DataViewSortButton.js +14 -18
- package/dist/DataViewSortButton.js.map +1 -1
- package/dist/DataViewToolbar.js +12 -14
- package/dist/DataViewToolbar.js.map +1 -1
- package/dist/DatePicker.js +8 -18
- package/dist/DatePicker.js.map +1 -1
- package/dist/Dialog.js +6 -9
- package/dist/Dialog.js.map +1 -1
- package/dist/Dropdown.js +15 -20
- package/dist/Dropdown.js.map +1 -1
- package/dist/EmptyState.js +10 -13
- package/dist/EmptyState.js.map +1 -1
- package/dist/Field.js +3 -6
- package/dist/Field.js.map +1 -1
- package/dist/{Field.vue_vue_type_script_setup_true_lang-c864abd3.js → Field.vue_vue_type_script_setup_true_lang-475832fe.js} +2 -2
- package/dist/{Field.vue_vue_type_script_setup_true_lang-c864abd3.js.map → Field.vue_vue_type_script_setup_true_lang-475832fe.js.map} +1 -1
- package/dist/FileUpload.js +27 -30
- package/dist/FileUpload.js.map +1 -1
- package/dist/FilterChip.js +10 -13
- package/dist/FilterChip.js.map +1 -1
- package/dist/FilterDrawerItem.js +5 -8
- package/dist/FilterDrawerItem.js.map +1 -1
- package/dist/FilterDropdown.js +73 -88
- package/dist/FilterDropdown.js.map +1 -1
- package/dist/FilterSelect.js +15 -18
- package/dist/FilterSelect.js.map +1 -1
- package/dist/Filters.js +67 -78
- package/dist/Filters.js.map +1 -1
- package/dist/HttpError.js +4 -7
- package/dist/HttpError.js.map +1 -1
- package/dist/Icon.js +236 -14
- package/dist/Icon.js.map +1 -1
- package/dist/Icon.vue.d.ts +2 -2
- package/dist/Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js +11 -0
- package/dist/Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js.map +1 -0
- package/dist/IconLabel.js +4 -6
- package/dist/IconLabel.js.map +1 -1
- package/dist/Illustration.js +6 -8
- package/dist/Illustration.js.map +1 -1
- package/dist/Image.js +39 -49
- package/dist/Image.js.map +1 -1
- package/dist/InlineEdit.js +10 -12
- package/dist/InlineEdit.js.map +1 -1
- package/dist/Input.js +50 -55
- package/dist/Input.js.map +1 -1
- package/dist/InputOptions.js +20 -29
- package/dist/InputOptions.js.map +1 -1
- package/dist/Label.js +1 -4
- package/dist/Label.js.map +1 -1
- package/dist/LicenseChip.js +7 -9
- package/dist/LicenseChip.js.map +1 -1
- package/dist/ListItem.js +11 -13
- package/dist/ListItem.js.map +1 -1
- package/dist/ListView.js +47 -58
- package/dist/ListView.js.map +1 -1
- package/dist/Metric.js +6 -8
- package/dist/Metric.js.map +1 -1
- package/dist/Modal.js +16 -19
- package/dist/Modal.js.map +1 -1
- package/dist/Modals.js +16 -26
- package/dist/Modals.js.map +1 -1
- package/dist/ModalsPlugin.js +12 -22
- package/dist/ModalsPlugin.js.map +1 -1
- package/dist/ObfuscateText.js +7 -9
- package/dist/ObfuscateText.js.map +1 -1
- package/dist/PageNavigation.js +25 -29
- package/dist/PageNavigation.js.map +1 -1
- package/dist/Paginate.js +29 -31
- package/dist/Paginate.js.map +1 -1
- package/dist/QuickAction.js +13 -15
- package/dist/QuickAction.js.map +1 -1
- package/dist/RadioGroup.js +86 -89
- package/dist/RadioGroup.js.map +1 -1
- package/dist/SearchBar.js +18 -20
- package/dist/SearchBar.js.map +1 -1
- package/dist/Select.js +13 -23
- package/dist/Select.js.map +1 -1
- package/dist/SelectStatus.js +26 -36
- package/dist/SelectStatus.js.map +1 -1
- package/dist/Step.js +19 -21
- package/dist/Step.js.map +1 -1
- package/dist/Switch.js +8 -10
- package/dist/Switch.js.map +1 -1
- package/dist/Tab.js +25 -30
- package/dist/Tab.js.map +1 -1
- package/dist/Table.js +19 -21
- package/dist/Table.js.map +1 -1
- package/dist/TableCell.js +21 -22
- package/dist/TableCell.js.map +1 -1
- package/dist/TableHeaderCell.js +4 -4
- package/dist/TableHeaderRow.js +7 -9
- package/dist/TableHeaderRow.js.map +1 -1
- package/dist/TableRow.js +22 -24
- package/dist/TableRow.js.map +1 -1
- package/dist/Tabs.js +11 -16
- package/dist/Tabs.js.map +1 -1
- package/dist/{Tabs.vue_vue_type_script_setup_true_lang-ba383fda.js → Tabs.vue_vue_type_script_setup_true_lang-aca4f8b8.js} +3 -3
- package/dist/{Tabs.vue_vue_type_script_setup_true_lang-ba383fda.js.map → Tabs.vue_vue_type_script_setup_true_lang-aca4f8b8.js.map} +1 -1
- package/dist/Textarea.js +10 -13
- package/dist/Textarea.js.map +1 -1
- package/dist/Toast.js +8 -10
- package/dist/Toast.js.map +1 -1
- package/dist/Toasts.js +14 -25
- package/dist/Toasts.js.map +1 -1
- package/dist/ToastsPlugin.js +14 -25
- package/dist/ToastsPlugin.js.map +1 -1
- package/dist/components.css +1 -1
- package/dist/index.js +53 -62
- package/dist/index.js.map +1 -1
- package/dist/locale.js +12 -15
- package/dist/locale.js.map +1 -1
- package/dist/{searchFuzzy-13c124f8.js → searchFuzzy-74a7de1c.js} +2 -2
- package/dist/{searchFuzzy-13c124f8.js.map → searchFuzzy-74a7de1c.js.map} +1 -1
- package/dist/storage.js +6 -11
- package/dist/storage.js.map +1 -1
- package/dist/tooltip.js +21 -26
- package/dist/tooltip.js.map +1 -1
- package/dist/useGoogleMaps.js +91 -226
- package/dist/useGoogleMaps.js.map +1 -1
- package/dist/useModals.js +21 -31
- package/dist/useModals.js.map +1 -1
- package/dist/useSearch.js +17 -22
- package/dist/useSearch.js.map +1 -1
- package/dist/useToasts.js +25 -36
- package/dist/useToasts.js.map +1 -1
- package/dist/useValidation.js +79 -108
- package/dist/useValidation.js.map +1 -1
- package/dist/utils/calculateElementOverflow.js +9 -14
- package/dist/utils/calculateElementOverflow.js.map +1 -1
- package/dist/utils/createQueryString.js +9 -15
- package/dist/utils/createQueryString.js.map +1 -1
- package/dist/utils/helpers.js +46 -59
- package/dist/utils/helpers.js.map +1 -1
- package/dist/utils/i18n.js +17 -20
- package/dist/utils/i18n.js.map +1 -1
- package/dist/utils/searchFuzzy.js +7 -12
- package/dist/utils/searchFuzzy.js.map +1 -1
- package/dist/utils/storage.js +10 -15
- package/dist/utils/storage.js.map +1 -1
- package/dist/viewable.js +26 -34
- package/dist/viewable.js.map +1 -1
- package/package.json +2 -4
- package/dist/Icon.vue_used_vue_type_style_index_0_lang.module-d2507af3.js +0 -243
- package/dist/Icon.vue_used_vue_type_style_index_0_lang.module-d2507af3.js.map +0 -1
- package/dist/_MapCache-65811284.js +0 -188
- package/dist/_MapCache-65811284.js.map +0 -1
- package/dist/_Uint8Array-06e4d083.js +0 -66
- package/dist/_Uint8Array-06e4d083.js.map +0 -1
- package/dist/_baseAssignValue-dd1499b4.js +0 -22
- package/dist/_baseAssignValue-dd1499b4.js.map +0 -1
- package/dist/_baseIsEqual-d594c87f.js +0 -171
- package/dist/_baseIsEqual-d594c87f.js.map +0 -1
- package/dist/_createCompounder-ae01a723.js +0 -245
- package/dist/_createCompounder-ae01a723.js.map +0 -1
- package/dist/_getAllKeys-5e735d41.js +0 -44
- package/dist/_getAllKeys-5e735d41.js.map +0 -1
- package/dist/_getPrototype-3e6fccd6.js +0 -7
- package/dist/_getPrototype-3e6fccd6.js.map +0 -1
- package/dist/_getTag-4db47fa6.js +0 -47
- package/dist/_getTag-4db47fa6.js.map +0 -1
- package/dist/_initCloneObject-161353b9.js +0 -88
- package/dist/_initCloneObject-161353b9.js.map +0 -1
- package/dist/_overArg-6d920d99.js +0 -9
- package/dist/_overArg-6d920d99.js.map +0 -1
- package/dist/capitalize-667d9f60.js +0 -42
- package/dist/capitalize-667d9f60.js.map +0 -1
- package/dist/cloneDeep-5bc375b0.js +0 -146
- package/dist/cloneDeep-5bc375b0.js.map +0 -1
- package/dist/debounce-6aca1ca9.js +0 -86
- package/dist/debounce-6aca1ca9.js.map +0 -1
- package/dist/get-27d90892.js +0 -66
- package/dist/get-27d90892.js.map +0 -1
- package/dist/identity-452d03fd.js +0 -20
- package/dist/identity-452d03fd.js.map +0 -1
- package/dist/isArrayLike-09233e52.js +0 -61
- package/dist/isArrayLike-09233e52.js.map +0 -1
- package/dist/isEmpty-2fbad344.js +0 -23
- package/dist/isEmpty-2fbad344.js.map +0 -1
- package/dist/isEqual-fca467fb.js +0 -8
- package/dist/isEqual-fca467fb.js.map +0 -1
- package/dist/isObjectLike-54341556.js +0 -39
- package/dist/isObjectLike-54341556.js.map +0 -1
- package/dist/isPlainObject-55c7f916.js +0 -16
- package/dist/isPlainObject-55c7f916.js.map +0 -1
- package/dist/merge-b14fad9d.js +0 -124
- package/dist/merge-b14fad9d.js.map +0 -1
- package/dist/toString-7d5bf363.js +0 -29
- package/dist/toString-7d5bf363.js.map +0 -1
- package/dist/uniqueId-847efe53.js +0 -10
- package/dist/uniqueId-847efe53.js.map +0 -1
package/dist/Paginate.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { defineComponent as w, useCssModule as y, computed as S, openBlock as r, createElementBlock as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as w, useCssModule as y, computed as S, openBlock as r, createElementBlock as l, createElementVNode as c, normalizeClass as o, unref as i, createVNode as f, Fragment as g, renderList as x, createCommentVNode as p, toDisplayString as z } from "vue";
|
|
2
|
+
import m from "./Icon.js";
|
|
3
3
|
import { s as M } from "./Paginate.vue_used_vue_type_style_index_0_lang.module-e579235f.js";
|
|
4
4
|
import { _ as E } from "./_plugin-vue_export-helper-dad06003.js";
|
|
5
|
-
import "
|
|
6
|
-
import "./uniqueId-847efe53.js";
|
|
7
|
-
import "./toString-7d5bf363.js";
|
|
8
|
-
import "./isObjectLike-54341556.js";
|
|
5
|
+
import "lodash-es/uniqueId";
|
|
9
6
|
import "./index-79ce320f.js";
|
|
7
|
+
import "./Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js";
|
|
10
8
|
const L = {
|
|
11
9
|
class: "stash-paginate tw-flex tw-justify-center",
|
|
12
10
|
"data-test": "stash-paginate"
|
|
@@ -20,63 +18,63 @@ const L = {
|
|
|
20
18
|
},
|
|
21
19
|
emits: ["set-page"],
|
|
22
20
|
setup(h, { emit: v }) {
|
|
23
|
-
const
|
|
24
|
-
function u(
|
|
25
|
-
v("set-page",
|
|
21
|
+
const t = h, n = y(), s = S(() => Math.ceil(t.listLength / t.pageSize));
|
|
22
|
+
function u(e) {
|
|
23
|
+
v("set-page", e);
|
|
26
24
|
}
|
|
27
25
|
function P() {
|
|
28
|
-
|
|
26
|
+
t.currentPage < s.value && u(t.currentPage + 1);
|
|
29
27
|
}
|
|
30
28
|
function _() {
|
|
31
|
-
|
|
29
|
+
t.currentPage > 1 && u(t.currentPage - 1);
|
|
32
30
|
}
|
|
33
|
-
function b(
|
|
34
|
-
const d = Math.abs(
|
|
35
|
-
return s.value < 10 ||
|
|
31
|
+
function b(e) {
|
|
32
|
+
const d = Math.abs(t.currentPage - e);
|
|
33
|
+
return s.value < 10 || e === 1 || e === s.value || t.currentPage < 6 && e < 8 || s.value - t.currentPage < 5 && s.value - e < 7 || d < 3;
|
|
36
34
|
}
|
|
37
|
-
function k(
|
|
38
|
-
return s.value > 9 &&
|
|
35
|
+
function k(e) {
|
|
36
|
+
return s.value > 9 && t.currentPage > 5 && e === 2;
|
|
39
37
|
}
|
|
40
|
-
function C(
|
|
41
|
-
return s.value > 9 && s.value -
|
|
38
|
+
function C(e) {
|
|
39
|
+
return s.value > 9 && s.value - t.currentPage > 4 && e === s.value - 1;
|
|
42
40
|
}
|
|
43
|
-
return (
|
|
41
|
+
return (e, d) => (r(), l("div", L, [
|
|
44
42
|
c("ul", {
|
|
45
|
-
class: o(["stash-paginate__list tw-flex",
|
|
43
|
+
class: o(["stash-paginate__list tw-flex", i(n).pagination]),
|
|
46
44
|
"data-test": "stash-paginate|list"
|
|
47
45
|
}, [
|
|
48
46
|
c("button", {
|
|
49
47
|
"data-test": "stash-paginate|prev-page",
|
|
50
|
-
class: o([
|
|
48
|
+
class: o([i(n).prev, { [i(n)["is-disabled"]]: e.currentPage === 1 }]),
|
|
51
49
|
onClick: _
|
|
52
50
|
}, [
|
|
53
|
-
f(
|
|
51
|
+
f(m, {
|
|
54
52
|
size: "small",
|
|
55
53
|
name: "chevron-left"
|
|
56
54
|
})
|
|
57
55
|
], 2),
|
|
58
|
-
(r(!0),
|
|
59
|
-
k(a) ? (r(),
|
|
56
|
+
(r(!0), l(g, null, x(s.value, (a) => (r(), l(g, null, [
|
|
57
|
+
k(a) ? (r(), l("button", {
|
|
60
58
|
key: `${a}-ellipsis`,
|
|
61
59
|
"data-test": "stash-paginate|first-ellipsis"
|
|
62
60
|
}, " … ")) : p("", !0),
|
|
63
|
-
b(a) ? (r(),
|
|
61
|
+
b(a) ? (r(), l("button", {
|
|
64
62
|
key: a,
|
|
65
63
|
"data-test": "stash-paginate|page-number",
|
|
66
|
-
class: o({ [
|
|
64
|
+
class: o({ [i(n)["is-active"]]: e.currentPage === a }),
|
|
67
65
|
onClick: (B) => u(a)
|
|
68
66
|
}, z(a), 11, $)) : p("", !0),
|
|
69
|
-
C(a) ? (r(),
|
|
67
|
+
C(a) ? (r(), l("button", {
|
|
70
68
|
key: `${a}-ellipsis`,
|
|
71
69
|
"data-test": "stash-paginate|last-ellipsis"
|
|
72
70
|
}, " … ")) : p("", !0)
|
|
73
71
|
], 64))), 256)),
|
|
74
72
|
c("button", {
|
|
75
73
|
"data-test": "stash-paginate|next-page",
|
|
76
|
-
class: o([
|
|
74
|
+
class: o([i(n).next, { [i(n)["is-disabled"]]: e.currentPage === s.value }]),
|
|
77
75
|
onClick: P
|
|
78
76
|
}, [
|
|
79
|
-
f(
|
|
77
|
+
f(m, {
|
|
80
78
|
size: "small",
|
|
81
79
|
class: "tw-rotate-180",
|
|
82
80
|
name: "chevron-left"
|
|
@@ -87,8 +85,8 @@ const L = {
|
|
|
87
85
|
}
|
|
88
86
|
}), V = {
|
|
89
87
|
$style: M
|
|
90
|
-
},
|
|
88
|
+
}, H = /* @__PURE__ */ E(N, [["__cssModules", V]]);
|
|
91
89
|
export {
|
|
92
|
-
|
|
90
|
+
H as default
|
|
93
91
|
};
|
|
94
92
|
//# sourceMappingURL=Paginate.js.map
|
package/dist/Paginate.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Paginate.js","sources":["../src/components/Paginate/Paginate.vue"],"sourcesContent":["<script lang=\"ts\" setup>\n import { computed, useCssModule } from 'vue';\n\n import Icon from '../Icon/Icon.vue';\n\n defineOptions({\n name: 'll-paginate',\n });\n\n export interface PaginateProps {\n /**\n * Current page number\n */\n currentPage?: number;\n /**\n * Total number of items in list\n */\n listLength?: number;\n /**\n * Number of items per page\n */\n pageSize?: number;\n }\n\n const props = withDefaults(defineProps<PaginateProps>(), {\n currentPage: 1,\n listLength: 1,\n pageSize: 50,\n });\n\n const emit =\n defineEmits<{\n /**\n * Emitted when the page number changes.\n */\n (e: 'set-page', pageNumber: number): void;\n }>();\n\n const classes = useCssModule();\n\n const pages = computed(() => Math.ceil(props.listLength / props.pageSize));\n\n /**\n * Emits current page to list view.\n */\n function updatePage(currentPage: number) {\n emit('set-page', currentPage);\n }\n\n /**\n * Sets current page to next page\n */\n function next() {\n if (props.currentPage < pages.value) {\n updatePage(props.currentPage + 1);\n }\n }\n\n /**\n * Sets current page to previous page\n */\n function prev() {\n if (props.currentPage > 1) {\n updatePage(props.currentPage - 1);\n }\n }\n\n /**\n * Determines whether to show page\n * @returns {boolean} - should show page in pagination component\n */\n function shouldShowPage(page: number): boolean {\n const pageDiff = Math.abs(props.currentPage - page);\n\n if (\n pages.value < 10 ||\n page === 1 ||\n page === pages.value ||\n (props.currentPage < 6 && page < 8) ||\n (pages.value - props.currentPage < 5 && pages.value - page < 7) ||\n pageDiff < 3\n ) {\n return true;\n }\n\n return false;\n }\n\n /**\n * Determines whether to show the leading ellipsis\n * @returns {boolean} should show or not\n */\n function shouldShowFirstEllipsis(page: number): boolean {\n return pages.value > 9 && props.currentPage > 5 && page === 2;\n }\n\n /**\n * Determines whether to show the trailing ellipsis\n * @returns {boolean} should show or not\n */\n function shouldShowLastEllipsis(page: number): boolean {\n return pages.value > 9 && pages.value - props.currentPage > 4 && page === pages.value - 1;\n }\n</script>\n\n<template>\n <div class=\"stash-paginate tw-flex tw-justify-center\" data-test=\"stash-paginate\">\n <ul class=\"stash-paginate__list tw-flex\" :class=\"classes.pagination\" data-test=\"stash-paginate|list\">\n <button\n data-test=\"stash-paginate|prev-page\"\n :class=\"[classes.prev, { [classes['is-disabled']]: currentPage === 1 }]\"\n @click=\"prev\"\n >\n <Icon size=\"small\" name=\"chevron-left\" />\n </button>\n <template v-for=\"page in pages\">\n <button\n v-if=\"shouldShowFirstEllipsis(page)\"\n :key=\"`${page}-ellipsis`\"\n data-test=\"stash-paginate|first-ellipsis\"\n >\n …\n </button>\n <button\n v-if=\"shouldShowPage(page)\"\n :key=\"page\"\n data-test=\"stash-paginate|page-number\"\n :class=\"{ [classes['is-active']]: currentPage === page }\"\n @click=\"updatePage(page)\"\n >\n {{ page }}\n </button>\n <button v-if=\"shouldShowLastEllipsis(page)\" :key=\"`${page}-ellipsis`\" data-test=\"stash-paginate|last-ellipsis\">\n …\n </button>\n </template>\n <button\n data-test=\"stash-paginate|next-page\"\n :class=\"[classes.next, { [classes['is-disabled']]: currentPage === pages }]\"\n @click=\"next\"\n >\n <Icon size=\"small\" class=\"tw-rotate-180\" name=\"chevron-left\" />\n </button>\n </ul>\n </div>\n</template>\n\n<style module>\n .pagination {\n /* Todo: We shouldn't really be making assumptions about the outer spacing of the pagination component */\n margin-top: theme(spacing.12);\n z-index: 0;\n\n a,\n button {\n @apply tw-border tw-border-solid tw-border-ice-200;\n align-items: center;\n background-color: theme(colors.white);\n color: theme(colors.blue.DEFAULT);\n cursor: pointer;\n display: flex;\n height: theme(height.input);\n justify-content: center;\n margin: 0 0 0 -1px;\n width: theme(height.input);\n\n &.prev {\n border-bottom-left-radius: theme(borderRadius.DEFAULT);\n border-top-left-radius: theme(borderRadius.DEFAULT);\n }\n\n &.next {\n border-bottom-right-radius: theme(borderRadius.DEFAULT);\n border-top-right-radius: theme(borderRadius.DEFAULT);\n }\n\n &:focus {\n outline: none;\n }\n\n &:hover {\n text-decoration: none;\n }\n\n &.is-active {\n background-color: theme(colors.blue.DEFAULT);\n color: theme(colors.white);\n pointer-events: none;\n z-index: theme(zIndex.control);\n }\n\n &:hover,\n &.is-active {\n @apply tw-border tw-border-solid tw-border-blue;\n position: relative;\n }\n\n &.is-disabled {\n cursor: not-allowed;\n opacity: 0.5;\n }\n }\n }\n</style>\n"],"names":["classes","useCssModule","pages","computed","props","updatePage","currentPage","emit","next","prev","shouldShowPage","page","pageDiff","shouldShowFirstEllipsis","shouldShowLastEllipsis"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Paginate.js","sources":["../src/components/Paginate/Paginate.vue"],"sourcesContent":["<script lang=\"ts\" setup>\n import { computed, useCssModule } from 'vue';\n\n import Icon from '../Icon/Icon.vue';\n\n defineOptions({\n name: 'll-paginate',\n });\n\n export interface PaginateProps {\n /**\n * Current page number\n */\n currentPage?: number;\n /**\n * Total number of items in list\n */\n listLength?: number;\n /**\n * Number of items per page\n */\n pageSize?: number;\n }\n\n const props = withDefaults(defineProps<PaginateProps>(), {\n currentPage: 1,\n listLength: 1,\n pageSize: 50,\n });\n\n const emit =\n defineEmits<{\n /**\n * Emitted when the page number changes.\n */\n (e: 'set-page', pageNumber: number): void;\n }>();\n\n const classes = useCssModule();\n\n const pages = computed(() => Math.ceil(props.listLength / props.pageSize));\n\n /**\n * Emits current page to list view.\n */\n function updatePage(currentPage: number) {\n emit('set-page', currentPage);\n }\n\n /**\n * Sets current page to next page\n */\n function next() {\n if (props.currentPage < pages.value) {\n updatePage(props.currentPage + 1);\n }\n }\n\n /**\n * Sets current page to previous page\n */\n function prev() {\n if (props.currentPage > 1) {\n updatePage(props.currentPage - 1);\n }\n }\n\n /**\n * Determines whether to show page\n * @returns {boolean} - should show page in pagination component\n */\n function shouldShowPage(page: number): boolean {\n const pageDiff = Math.abs(props.currentPage - page);\n\n if (\n pages.value < 10 ||\n page === 1 ||\n page === pages.value ||\n (props.currentPage < 6 && page < 8) ||\n (pages.value - props.currentPage < 5 && pages.value - page < 7) ||\n pageDiff < 3\n ) {\n return true;\n }\n\n return false;\n }\n\n /**\n * Determines whether to show the leading ellipsis\n * @returns {boolean} should show or not\n */\n function shouldShowFirstEllipsis(page: number): boolean {\n return pages.value > 9 && props.currentPage > 5 && page === 2;\n }\n\n /**\n * Determines whether to show the trailing ellipsis\n * @returns {boolean} should show or not\n */\n function shouldShowLastEllipsis(page: number): boolean {\n return pages.value > 9 && pages.value - props.currentPage > 4 && page === pages.value - 1;\n }\n</script>\n\n<template>\n <div class=\"stash-paginate tw-flex tw-justify-center\" data-test=\"stash-paginate\">\n <ul class=\"stash-paginate__list tw-flex\" :class=\"classes.pagination\" data-test=\"stash-paginate|list\">\n <button\n data-test=\"stash-paginate|prev-page\"\n :class=\"[classes.prev, { [classes['is-disabled']]: currentPage === 1 }]\"\n @click=\"prev\"\n >\n <Icon size=\"small\" name=\"chevron-left\" />\n </button>\n <template v-for=\"page in pages\">\n <button\n v-if=\"shouldShowFirstEllipsis(page)\"\n :key=\"`${page}-ellipsis`\"\n data-test=\"stash-paginate|first-ellipsis\"\n >\n …\n </button>\n <button\n v-if=\"shouldShowPage(page)\"\n :key=\"page\"\n data-test=\"stash-paginate|page-number\"\n :class=\"{ [classes['is-active']]: currentPage === page }\"\n @click=\"updatePage(page)\"\n >\n {{ page }}\n </button>\n <button v-if=\"shouldShowLastEllipsis(page)\" :key=\"`${page}-ellipsis`\" data-test=\"stash-paginate|last-ellipsis\">\n …\n </button>\n </template>\n <button\n data-test=\"stash-paginate|next-page\"\n :class=\"[classes.next, { [classes['is-disabled']]: currentPage === pages }]\"\n @click=\"next\"\n >\n <Icon size=\"small\" class=\"tw-rotate-180\" name=\"chevron-left\" />\n </button>\n </ul>\n </div>\n</template>\n\n<style module>\n .pagination {\n /* Todo: We shouldn't really be making assumptions about the outer spacing of the pagination component */\n margin-top: theme(spacing.12);\n z-index: 0;\n\n a,\n button {\n @apply tw-border tw-border-solid tw-border-ice-200;\n align-items: center;\n background-color: theme(colors.white);\n color: theme(colors.blue.DEFAULT);\n cursor: pointer;\n display: flex;\n height: theme(height.input);\n justify-content: center;\n margin: 0 0 0 -1px;\n width: theme(height.input);\n\n &.prev {\n border-bottom-left-radius: theme(borderRadius.DEFAULT);\n border-top-left-radius: theme(borderRadius.DEFAULT);\n }\n\n &.next {\n border-bottom-right-radius: theme(borderRadius.DEFAULT);\n border-top-right-radius: theme(borderRadius.DEFAULT);\n }\n\n &:focus {\n outline: none;\n }\n\n &:hover {\n text-decoration: none;\n }\n\n &.is-active {\n background-color: theme(colors.blue.DEFAULT);\n color: theme(colors.white);\n pointer-events: none;\n z-index: theme(zIndex.control);\n }\n\n &:hover,\n &.is-active {\n @apply tw-border tw-border-solid tw-border-blue;\n position: relative;\n }\n\n &.is-disabled {\n cursor: not-allowed;\n opacity: 0.5;\n }\n }\n }\n</style>\n"],"names":["classes","useCssModule","pages","computed","props","updatePage","currentPage","emit","next","prev","shouldShowPage","page","pageDiff","shouldShowFirstEllipsis","shouldShowLastEllipsis"],"mappings":";;;;;;;;;;;;;;;;;;;;iBAsCQA,IAAUC,KAEVC,IAAQC,EAAS,MAAM,KAAK,KAAKC,EAAM,aAAaA,EAAM,QAAQ,CAAC;AAKzE,aAASC,EAAWC,GAAqB;AACvC,MAAAC,EAAK,YAAYD,CAAW;AAAA,IAC9B;AAKA,aAASE,IAAO;AACV,MAAAJ,EAAM,cAAcF,EAAM,SACjBG,EAAAD,EAAM,cAAc,CAAC;AAAA,IAEpC;AAKA,aAASK,IAAO;AACV,MAAAL,EAAM,cAAc,KACXC,EAAAD,EAAM,cAAc,CAAC;AAAA,IAEpC;AAMA,aAASM,EAAeC,GAAuB;AAC7C,YAAMC,IAAW,KAAK,IAAIR,EAAM,cAAcO,CAAI;AAGhD,aAAAT,EAAM,QAAQ,MACdS,MAAS,KACTA,MAAST,EAAM,SACdE,EAAM,cAAc,KAAKO,IAAO,KAChCT,EAAM,QAAQE,EAAM,cAAc,KAAKF,EAAM,QAAQS,IAAO,KAC7DC,IAAW;AAAA,IAMf;AAMA,aAASC,EAAwBF,GAAuB;AACtD,aAAOT,EAAM,QAAQ,KAAKE,EAAM,cAAc,KAAKO,MAAS;AAAA,IAC9D;AAMA,aAASG,EAAuBH,GAAuB;AAC9C,aAAAT,EAAM,QAAQ,KAAKA,EAAM,QAAQE,EAAM,cAAc,KAAKO,MAAST,EAAM,QAAQ;AAAA,IAC1F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/QuickAction.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { defineComponent as l, computed as o, openBlock as u, createBlock as _, resolveDynamicComponent as
|
|
2
|
-
import
|
|
3
|
-
import { _ as
|
|
4
|
-
import "
|
|
5
|
-
import "./uniqueId-847efe53.js";
|
|
6
|
-
import "./toString-7d5bf363.js";
|
|
7
|
-
import "./isObjectLike-54341556.js";
|
|
1
|
+
import { defineComponent as l, computed as o, openBlock as u, createBlock as _, resolveDynamicComponent as d, mergeProps as p, withCtx as f, createElementVNode as e, createVNode as s, toDisplayString as n } from "vue";
|
|
2
|
+
import r from "./Icon.js";
|
|
3
|
+
import { _ as m } from "./_plugin-vue_export-helper-dad06003.js";
|
|
4
|
+
import "lodash-es/uniqueId";
|
|
8
5
|
import "./index-79ce320f.js";
|
|
6
|
+
import "./Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js";
|
|
9
7
|
const w = { class: "content tw-flex tw-items-center" }, h = { class: "tw-flex tw-items-center tw-justify-center tw-rounded tw-bg-blue-100 tw-p-3" }, x = { class: "tw-flex-1" }, b = { class: "tw-text-blue" }, v = { class: "subtitle tw-text-xs lg:tw-mb-0 tw-text-ice-700 tw-font-normal" }, k = /* @__PURE__ */ l({
|
|
10
8
|
__name: "QuickAction",
|
|
11
9
|
props: {
|
|
@@ -21,23 +19,23 @@ const w = { class: "content tw-flex tw-items-center" }, h = { class: "tw-flex tw
|
|
|
21
19
|
} : t.href ? {
|
|
22
20
|
href: t.href
|
|
23
21
|
} : {});
|
|
24
|
-
return (g, y) => (u(), _(
|
|
22
|
+
return (g, y) => (u(), _(d(i.value), p(a.value, {
|
|
25
23
|
class: "stash-quick-action root tw-p-3 tw-shadow tw-rounded",
|
|
26
24
|
"data-test": "stash-quick-action"
|
|
27
25
|
}), {
|
|
28
|
-
default:
|
|
26
|
+
default: f(() => [
|
|
29
27
|
e("div", w, [
|
|
30
28
|
e("div", h, [
|
|
31
|
-
s(
|
|
29
|
+
s(r, {
|
|
32
30
|
name: t.icon,
|
|
33
31
|
class: "tw-text-blue"
|
|
34
32
|
}, null, 8, ["name"])
|
|
35
33
|
]),
|
|
36
34
|
e("div", x, [
|
|
37
|
-
e("h4", b,
|
|
38
|
-
e("p", v,
|
|
35
|
+
e("h4", b, n(t.title), 1),
|
|
36
|
+
e("p", v, n(t.subtitle), 1)
|
|
39
37
|
]),
|
|
40
|
-
s(
|
|
38
|
+
s(r, {
|
|
41
39
|
name: "arrow-right",
|
|
42
40
|
class: "tw-text-blue"
|
|
43
41
|
})
|
|
@@ -47,8 +45,8 @@ const w = { class: "content tw-flex tw-items-center" }, h = { class: "tw-flex tw
|
|
|
47
45
|
}, 16));
|
|
48
46
|
}
|
|
49
47
|
});
|
|
50
|
-
const
|
|
48
|
+
const I = /* @__PURE__ */ m(k, [["__scopeId", "data-v-704bf5c4"]]);
|
|
51
49
|
export {
|
|
52
|
-
|
|
50
|
+
I as default
|
|
53
51
|
};
|
|
54
52
|
//# sourceMappingURL=QuickAction.js.map
|
package/dist/QuickAction.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuickAction.js","sources":["../src/components/QuickAction/QuickAction.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed } from 'vue';\n import { type RouteLocationRaw } from 'vue-router';\n\n import { IconName } from '../Icon/Icon.types';\n import Icon from '../Icon/Icon.vue';\n\n export interface QuickActionProps {\n /**\n * The title prop will show the first line of text\n */\n title: string;\n\n /**\n * The subtitle prop will show the second line of text\n */\n subtitle: string;\n\n /**\n * The `to` prop for vue-router's `RouterLink` component\n */\n to?: RouteLocationRaw;\n /**\n * If defined, the quick action will render as an `<a />` tag.\n */\n href?: string;\n /**\n * Icon to render on the left side\n */\n icon: IconName;\n }\n\n const props = defineProps<QuickActionProps>();\n\n const is = computed(() => {\n if (props.to) {\n return 'router-link';\n }\n\n if (props.href) {\n return 'a';\n }\n\n return 'div';\n });\n\n const linkAttrs = computed(() => {\n if (props.to) {\n return {\n to: props.to,\n };\n }\n\n if (props.href) {\n return {\n href: props.href\n };\n }\n\n return {};\n });\n</script>\n\n<template>\n <component\n :is=\"is\"\n v-bind=\"linkAttrs\"\n class=\"stash-quick-action root tw-p-3 tw-shadow tw-rounded\"\n data-test=\"stash-quick-action\"\n >\n <div class=\"content tw-flex tw-items-center\">\n <div class=\"tw-flex tw-items-center tw-justify-center tw-rounded tw-bg-blue-100 tw-p-3\">\n <Icon :name=\"props.icon\" class=\"tw-text-blue\" />\n </div>\n <div class=\"tw-flex-1\">\n <h4 class=\"tw-text-blue\">{{ props.title }}</h4>\n <p class=\"subtitle tw-text-xs lg:tw-mb-0 tw-text-ice-700 tw-font-normal\">\n {{ props.subtitle }}\n </p>\n </div>\n <Icon name=\"arrow-right\" class=\"tw-text-blue\" />\n </div>\n </component>\n</template>\n\n<style scoped>\n .root {\n background-color: #fff;\n border: 1px solid transparent; /* it prevents layout size shifting of extra height/width when hover */\n cursor: pointer;\n display: inline-block;\n }\n\n .root:hover,\n .root:active,\n .root:focus {\n border: 1px solid var(--color-blue-500);\n text-decoration: none;\n }\n\n .content {\n gap: 12px;\n }\n</style>\n"],"names":["is","computed","props","linkAttrs"],"mappings":"
|
|
1
|
+
{"version":3,"file":"QuickAction.js","sources":["../src/components/QuickAction/QuickAction.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed } from 'vue';\n import { type RouteLocationRaw } from 'vue-router';\n\n import { IconName } from '../Icon/Icon.types';\n import Icon from '../Icon/Icon.vue';\n\n export interface QuickActionProps {\n /**\n * The title prop will show the first line of text\n */\n title: string;\n\n /**\n * The subtitle prop will show the second line of text\n */\n subtitle: string;\n\n /**\n * The `to` prop for vue-router's `RouterLink` component\n */\n to?: RouteLocationRaw;\n /**\n * If defined, the quick action will render as an `<a />` tag.\n */\n href?: string;\n /**\n * Icon to render on the left side\n */\n icon: IconName;\n }\n\n const props = defineProps<QuickActionProps>();\n\n const is = computed(() => {\n if (props.to) {\n return 'router-link';\n }\n\n if (props.href) {\n return 'a';\n }\n\n return 'div';\n });\n\n const linkAttrs = computed(() => {\n if (props.to) {\n return {\n to: props.to,\n };\n }\n\n if (props.href) {\n return {\n href: props.href\n };\n }\n\n return {};\n });\n</script>\n\n<template>\n <component\n :is=\"is\"\n v-bind=\"linkAttrs\"\n class=\"stash-quick-action root tw-p-3 tw-shadow tw-rounded\"\n data-test=\"stash-quick-action\"\n >\n <div class=\"content tw-flex tw-items-center\">\n <div class=\"tw-flex tw-items-center tw-justify-center tw-rounded tw-bg-blue-100 tw-p-3\">\n <Icon :name=\"props.icon\" class=\"tw-text-blue\" />\n </div>\n <div class=\"tw-flex-1\">\n <h4 class=\"tw-text-blue\">{{ props.title }}</h4>\n <p class=\"subtitle tw-text-xs lg:tw-mb-0 tw-text-ice-700 tw-font-normal\">\n {{ props.subtitle }}\n </p>\n </div>\n <Icon name=\"arrow-right\" class=\"tw-text-blue\" />\n </div>\n </component>\n</template>\n\n<style scoped>\n .root {\n background-color: #fff;\n border: 1px solid transparent; /* it prevents layout size shifting of extra height/width when hover */\n cursor: pointer;\n display: inline-block;\n }\n\n .root:hover,\n .root:active,\n .root:focus {\n border: 1px solid var(--color-blue-500);\n text-decoration: none;\n }\n\n .content {\n gap: 12px;\n }\n</style>\n"],"names":["is","computed","props","linkAttrs"],"mappings":";;;;;;;;;;;;;;;;iBAkCQA,IAAKC,EAAS,MACdC,EAAM,KACD,gBAGLA,EAAM,OACD,MAGF,KACR,GAEKC,IAAYF,EAAS,MACrBC,EAAM,KACD;AAAA,MACL,IAAIA,EAAM;AAAA,IAAA,IAIVA,EAAM,OACD;AAAA,MACL,MAAMA,EAAM;AAAA,IAAA,IAIT,EACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/RadioGroup.js
CHANGED
|
@@ -1,40 +1,37 @@
|
|
|
1
|
-
import { defineComponent as y, inject as x, openBlock as
|
|
2
|
-
import
|
|
3
|
-
import { _ as G } from "./Field.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { defineComponent as y, inject as x, openBlock as d, createElementBlock as n, Fragment as w, renderList as V, unref as e, normalizeClass as f, createElementVNode as o, toDisplayString as h, provide as g, computed as v, createBlock as B, withCtx as T, renderSlot as R, resolveDynamicComponent as C } from "vue";
|
|
2
|
+
import E from "lodash-es/uniqueId";
|
|
3
|
+
import { _ as G } from "./Field.vue_vue_type_script_setup_true_lang-475832fe.js";
|
|
4
4
|
import { R as $ } from "./RadioGroup.keys-974818d6.js";
|
|
5
5
|
import { _ as k } from "./_plugin-vue_export-helper-dad06003.js";
|
|
6
|
-
import "./toString-7d5bf363.js";
|
|
7
|
-
import "./isObjectLike-54341556.js";
|
|
8
6
|
import "./Label.vue_vue_type_script_setup_true_lang-1d29d98a.js";
|
|
9
7
|
import "./locale.js";
|
|
10
|
-
import "
|
|
11
|
-
import "./_MapCache-65811284.js";
|
|
8
|
+
import "lodash-es/get";
|
|
12
9
|
const O = { class: "root flex" }, W = ["id", "name", "value", "checked", "disabled"], j = ["for"], q = /* @__PURE__ */ y({
|
|
13
10
|
__name: "VariantButton",
|
|
14
11
|
setup(u) {
|
|
15
|
-
const
|
|
16
|
-
if (!
|
|
12
|
+
const r = x($.key);
|
|
13
|
+
if (!r)
|
|
17
14
|
throw new Error("VariantButton must be used with a RadioGroup instance.");
|
|
18
|
-
const { name:
|
|
19
|
-
return (I, c) => (
|
|
20
|
-
(
|
|
21
|
-
key: `${e(
|
|
15
|
+
const { name: a, disabled: _, fullWidth: p, modelValue: l, options: i, update: s } = r;
|
|
16
|
+
return (I, c) => (d(), n("div", O, [
|
|
17
|
+
(d(!0), n(w, null, V(e(i), (t) => (d(), n("div", {
|
|
18
|
+
key: `${e(a)}-${t.id}`,
|
|
22
19
|
class: f([{ "w-full": e(p) }])
|
|
23
20
|
}, [
|
|
24
21
|
o("input", {
|
|
25
|
-
id: `${e(
|
|
22
|
+
id: `${e(a)}-${t.id}`,
|
|
26
23
|
class: "sr-only",
|
|
27
24
|
type: "radio",
|
|
28
|
-
name: e(
|
|
29
|
-
value:
|
|
30
|
-
checked: e(l) ===
|
|
31
|
-
disabled: e(_) ||
|
|
25
|
+
name: e(a),
|
|
26
|
+
value: t.value,
|
|
27
|
+
checked: e(l) === t.value,
|
|
28
|
+
disabled: e(_) || t.disabled,
|
|
32
29
|
onInput: c[0] || (c[0] = //@ts-ignore
|
|
33
30
|
(...m) => e(s) && e(s)(...m))
|
|
34
31
|
}, null, 40, W),
|
|
35
32
|
o("label", {
|
|
36
|
-
for: `${e(
|
|
37
|
-
}, h(
|
|
33
|
+
for: `${e(a)}-${t.id}`
|
|
34
|
+
}, h(t.text), 9, j)
|
|
38
35
|
], 2))), 128))
|
|
39
36
|
]));
|
|
40
37
|
}
|
|
@@ -42,29 +39,29 @@ const O = { class: "root flex" }, W = ["id", "name", "value", "checked", "disabl
|
|
|
42
39
|
const S = /* @__PURE__ */ k(q, [["__scopeId", "data-v-e8a24f17"]]), D = { class: "root flex flex-wrap tw-my-1.5" }, L = ["id", "name", "value", "checked", "disabled"], N = ["for"], z = /* @__PURE__ */ y({
|
|
43
40
|
__name: "VariantChip",
|
|
44
41
|
setup(u) {
|
|
45
|
-
const
|
|
46
|
-
if (!
|
|
42
|
+
const r = x($.key);
|
|
43
|
+
if (!r)
|
|
47
44
|
throw new Error("VariantChip must be used with a RadioGroup instance.");
|
|
48
|
-
const { name:
|
|
49
|
-
return (I, c) => (
|
|
50
|
-
(
|
|
51
|
-
key: `${e(
|
|
45
|
+
const { name: a, disabled: _, fullWidth: p, modelValue: l, options: i, update: s } = r;
|
|
46
|
+
return (I, c) => (d(), n("div", D, [
|
|
47
|
+
(d(!0), n(w, null, V(e(i), (t) => (d(), n("div", {
|
|
48
|
+
key: `${e(a)}-${t.id}`,
|
|
52
49
|
class: f([{ "w-full": e(p) }])
|
|
53
50
|
}, [
|
|
54
51
|
o("input", {
|
|
55
|
-
id: `${e(
|
|
52
|
+
id: `${e(a)}-${t.id}`,
|
|
56
53
|
class: "sr-only",
|
|
57
54
|
type: "radio",
|
|
58
|
-
name: e(
|
|
59
|
-
value:
|
|
60
|
-
checked: e(l) ===
|
|
61
|
-
disabled: e(_) ||
|
|
55
|
+
name: e(a),
|
|
56
|
+
value: t.value,
|
|
57
|
+
checked: e(l) === t.value,
|
|
58
|
+
disabled: e(_) || t.disabled,
|
|
62
59
|
onInput: c[0] || (c[0] = //@ts-ignore
|
|
63
60
|
(...m) => e(s) && e(s)(...m))
|
|
64
61
|
}, null, 40, L),
|
|
65
62
|
o("label", {
|
|
66
|
-
for: `${e(
|
|
67
|
-
}, h(
|
|
63
|
+
for: `${e(a)}-${t.id}`
|
|
64
|
+
}, h(t.text), 9, N)
|
|
68
65
|
], 2))), 128))
|
|
69
66
|
]));
|
|
70
67
|
}
|
|
@@ -72,28 +69,28 @@ const S = /* @__PURE__ */ k(q, [["__scopeId", "data-v-e8a24f17"]]), D = { class:
|
|
|
72
69
|
const A = /* @__PURE__ */ k(z, [["__scopeId", "data-v-b4b020c6"]]), F = { class: "root flex flex-wrap" }, J = ["id", "name", "value", "checked", "disabled"], M = ["for"], P = /* @__PURE__ */ y({
|
|
73
70
|
__name: "VariantRadio",
|
|
74
71
|
setup(u) {
|
|
75
|
-
const
|
|
76
|
-
if (!
|
|
72
|
+
const r = x($.key);
|
|
73
|
+
if (!r)
|
|
77
74
|
throw new Error("VariantRadio must be used with a RadioGroup instance.");
|
|
78
|
-
const { name:
|
|
79
|
-
return (I, c) => (
|
|
80
|
-
(
|
|
81
|
-
key: `${e(
|
|
75
|
+
const { name: a, disabled: _, fullWidth: p, modelValue: l, options: i, update: s } = r;
|
|
76
|
+
return (I, c) => (d(), n("div", F, [
|
|
77
|
+
(d(!0), n(w, null, V(e(i), (t) => (d(), n("div", {
|
|
78
|
+
key: `${e(a)}-${t.id}`,
|
|
82
79
|
class: f([{ "w-full": e(p) }])
|
|
83
80
|
}, [
|
|
84
81
|
o("input", {
|
|
85
|
-
id: `${e(
|
|
82
|
+
id: `${e(a)}-${t.id}`,
|
|
86
83
|
type: "radio",
|
|
87
|
-
name: e(
|
|
88
|
-
value:
|
|
89
|
-
checked: e(l) ===
|
|
90
|
-
disabled: e(_) ||
|
|
84
|
+
name: e(a),
|
|
85
|
+
value: t.value,
|
|
86
|
+
checked: e(l) === t.value,
|
|
87
|
+
disabled: e(_) || t.disabled,
|
|
91
88
|
onInput: c[0] || (c[0] = //@ts-ignore
|
|
92
89
|
(...m) => e(s) && e(s)(...m))
|
|
93
90
|
}, null, 40, J),
|
|
94
91
|
o("label", {
|
|
95
|
-
for: `${e(
|
|
96
|
-
}, h(
|
|
92
|
+
for: `${e(a)}-${t.id}`
|
|
93
|
+
}, h(t.text), 9, M)
|
|
97
94
|
], 2))), 128))
|
|
98
95
|
]));
|
|
99
96
|
}
|
|
@@ -101,45 +98,45 @@ const A = /* @__PURE__ */ k(z, [["__scopeId", "data-v-b4b020c6"]]), F = { class:
|
|
|
101
98
|
const U = /* @__PURE__ */ k(P, [["__scopeId", "data-v-1962fcc7"]]), H = { class: "root flex flex-wrap" }, K = ["for"], Q = ["id", "name", "value", "checked", "disabled"], X = { class: "color-ice-900 tw-m-0" }, Y = { class: "color-ice-700 tw-m-0" }, Z = /* @__PURE__ */ y({
|
|
102
99
|
__name: "VariantTile",
|
|
103
100
|
setup(u) {
|
|
104
|
-
const
|
|
105
|
-
if (!
|
|
101
|
+
const r = x($.key);
|
|
102
|
+
if (!r)
|
|
106
103
|
throw new Error("VariantTile must be used with a RadioGroup instance.");
|
|
107
|
-
const { name:
|
|
108
|
-
return (I, c) => (
|
|
109
|
-
(
|
|
110
|
-
key: `${e(
|
|
104
|
+
const { name: a, disabled: _, fullWidth: p, modelValue: l, options: i, update: s } = r;
|
|
105
|
+
return (I, c) => (d(), n("div", H, [
|
|
106
|
+
(d(!0), n(w, null, V(e(i), (t) => (d(), n("label", {
|
|
107
|
+
key: `${e(a)}-${t.id}`,
|
|
111
108
|
class: f(["tile-container", { "w-full": e(p) }]),
|
|
112
|
-
for: `${e(
|
|
109
|
+
for: `${e(a)}-${t.id}`
|
|
113
110
|
}, [
|
|
114
111
|
o("div", {
|
|
115
112
|
class: f(["tile-header border flex", {
|
|
116
|
-
"border-blue-500 bg-blue-100 color-ice-900": e(l) ===
|
|
117
|
-
"border-ice-500 bg-ice-100 color-ice-700": e(l) !==
|
|
113
|
+
"border-blue-500 bg-blue-100 color-ice-900": e(l) === t.value,
|
|
114
|
+
"border-ice-500 bg-ice-100 color-ice-700": e(l) !== t.value
|
|
118
115
|
}])
|
|
119
116
|
}, [
|
|
120
117
|
o("input", {
|
|
121
|
-
id: `${e(
|
|
118
|
+
id: `${e(a)}-${t.id}`,
|
|
122
119
|
class: "sr-only",
|
|
123
120
|
type: "radio",
|
|
124
|
-
name: e(
|
|
125
|
-
value:
|
|
126
|
-
checked: e(l) ===
|
|
127
|
-
disabled: e(_) ||
|
|
121
|
+
name: e(a),
|
|
122
|
+
value: t.value,
|
|
123
|
+
checked: e(l) === t.value,
|
|
124
|
+
disabled: e(_) || t.disabled,
|
|
128
125
|
onInput: c[0] || (c[0] = //@ts-ignore
|
|
129
126
|
(...m) => e(s) && e(s)(...m))
|
|
130
127
|
}, null, 40, Q),
|
|
131
128
|
o("div", null, [
|
|
132
|
-
o("span", null, h(
|
|
129
|
+
o("span", null, h(t.text), 1)
|
|
133
130
|
])
|
|
134
131
|
], 2),
|
|
135
132
|
o("div", {
|
|
136
133
|
class: f(["tile-body border-r border-b border-l", {
|
|
137
|
-
"border-ice-500": e(l) !==
|
|
138
|
-
"border-blue-500": e(l) ===
|
|
134
|
+
"border-ice-500": e(l) !== t.value,
|
|
135
|
+
"border-blue-500": e(l) === t.value
|
|
139
136
|
}])
|
|
140
137
|
}, [
|
|
141
|
-
o("p", X, h(
|
|
142
|
-
o("p", Y, h(
|
|
138
|
+
o("p", X, h(t.subTitle), 1),
|
|
139
|
+
o("p", Y, h(t.subText), 1)
|
|
143
140
|
], 2)
|
|
144
141
|
], 10, K))), 128))
|
|
145
142
|
]));
|
|
@@ -147,7 +144,7 @@ const U = /* @__PURE__ */ k(P, [["__scopeId", "data-v-1962fcc7"]]), H = { class:
|
|
|
147
144
|
});
|
|
148
145
|
const ee = /* @__PURE__ */ k(Z, [["__scopeId", "data-v-e6997760"]]);
|
|
149
146
|
var b = /* @__PURE__ */ ((u) => (u.Radio = "radio", u.Button = "button", u.Chip = "chip", u.Tile = "tile", u))(b || {});
|
|
150
|
-
const
|
|
147
|
+
const ne = /* @__PURE__ */ y({
|
|
151
148
|
__name: "RadioGroup",
|
|
152
149
|
props: {
|
|
153
150
|
name: { default: void 0 },
|
|
@@ -165,48 +162,48 @@ const _e = /* @__PURE__ */ y({
|
|
|
165
162
|
showOptionalInLabel: { type: Boolean }
|
|
166
163
|
},
|
|
167
164
|
emits: ["update:modelValue"],
|
|
168
|
-
setup(u, { emit:
|
|
169
|
-
const
|
|
165
|
+
setup(u, { emit: r }) {
|
|
166
|
+
const a = u, _ = {
|
|
170
167
|
[b.Button]: S,
|
|
171
168
|
[b.Chip]: A,
|
|
172
169
|
[b.Radio]: U,
|
|
173
170
|
[b.Tile]: ee
|
|
174
171
|
};
|
|
175
172
|
function p(i) {
|
|
176
|
-
|
|
173
|
+
r("update:modelValue", i.target.value);
|
|
177
174
|
}
|
|
178
175
|
const l = E("radio-group-field-error-");
|
|
179
176
|
return g($.key, {
|
|
180
|
-
name: v(() =>
|
|
181
|
-
disabled: v(() =>
|
|
182
|
-
fullWidth: v(() =>
|
|
183
|
-
modelValue: v(() =>
|
|
184
|
-
options: v(() =>
|
|
185
|
-
variant: v(() =>
|
|
177
|
+
name: v(() => a.name),
|
|
178
|
+
disabled: v(() => a.disabled),
|
|
179
|
+
fullWidth: v(() => a.fullWidth),
|
|
180
|
+
modelValue: v(() => a.modelValue),
|
|
181
|
+
options: v(() => a.options),
|
|
182
|
+
variant: v(() => a.variant),
|
|
186
183
|
update: p
|
|
187
|
-
}), (i, s) => (
|
|
184
|
+
}), (i, s) => (d(), B(G, {
|
|
188
185
|
class: f([
|
|
189
186
|
{
|
|
190
|
-
"tw-flex": !
|
|
191
|
-
"tw-gap-6": !
|
|
187
|
+
"tw-flex": !a.options,
|
|
188
|
+
"tw-gap-6": !a.options && a.variant !== e(b).Button
|
|
192
189
|
}
|
|
193
190
|
]),
|
|
194
191
|
"aria-errormessage": e(l),
|
|
195
|
-
"aria-invalid": !!
|
|
192
|
+
"aria-invalid": !!a.errorText,
|
|
196
193
|
role: "radiogroup",
|
|
197
194
|
fieldset: "",
|
|
198
|
-
label:
|
|
199
|
-
"add-bottom-space":
|
|
195
|
+
label: a.label,
|
|
196
|
+
"add-bottom-space": a.addBottomSpace,
|
|
200
197
|
"error-id": e(l),
|
|
201
|
-
"error-text":
|
|
202
|
-
"hint-text":
|
|
203
|
-
"show-optional-in-label":
|
|
204
|
-
"is-required":
|
|
205
|
-
"is-read-only":
|
|
198
|
+
"error-text": a.errorText,
|
|
199
|
+
"hint-text": a.hintText,
|
|
200
|
+
"show-optional-in-label": a.showOptionalInLabel,
|
|
201
|
+
"is-required": a.isRequired,
|
|
202
|
+
"is-read-only": a.isReadOnly
|
|
206
203
|
}, {
|
|
207
204
|
default: T(() => [
|
|
208
|
-
|
|
209
|
-
(
|
|
205
|
+
a.options ? R(i.$slots, "default", { key: 0 }, () => [
|
|
206
|
+
(d(), B(C(_[a.variant])))
|
|
210
207
|
]) : R(i.$slots, "default", { key: 1 })
|
|
211
208
|
]),
|
|
212
209
|
_: 3
|
|
@@ -216,6 +213,6 @@ const _e = /* @__PURE__ */ y({
|
|
|
216
213
|
export {
|
|
217
214
|
$ as RADIO_GROUP_INJECTION,
|
|
218
215
|
b as RadioGroupVariant,
|
|
219
|
-
|
|
216
|
+
ne as default
|
|
220
217
|
};
|
|
221
218
|
//# sourceMappingURL=RadioGroup.js.map
|
package/dist/RadioGroup.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroup.js","sources":["../src/components/RadioGroup/components/VariantButton.vue","../src/components/RadioGroup/components/VariantChip.vue","../src/components/RadioGroup/components/VariantRadio.vue","../src/components/RadioGroup/components/VariantTile.vue","../src/components/RadioGroup/RadioGroup.types.ts","../src/components/RadioGroup/RadioGroup.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { inject } from 'vue';\n\n import { RADIO_GROUP_INJECTION } from '../RadioGroup.keys';\n\n const radioGroupInjection = inject(RADIO_GROUP_INJECTION.key);\n\n if (!radioGroupInjection) {\n throw new Error('VariantButton must be used with a RadioGroup instance.');\n }\n\n const { name, disabled, fullWidth, modelValue, options, update } = radioGroupInjection;\n</script>\n\n<template>\n <div class=\"root flex\">\n <div v-for=\"option in options\" :key=\"`${name}-${option.id}`\" :class=\"[{ 'w-full': fullWidth }]\">\n <input\n :id=\"`${name}-${option.id}`\"\n class=\"sr-only\"\n type=\"radio\"\n :name=\"name\"\n :value=\"option.value\"\n :checked=\"modelValue === option.value\"\n :disabled=\"disabled || option.disabled\"\n @input=\"update\"\n />\n <label :for=\"`${name}-${option.id}`\">\n {{ option.text }}\n </label>\n </div>\n </div>\n</template>\n\n<style scoped>\n .root label {\n padding: 8px 30px;\n border: 1px solid var(--color-ice);\n font-weight: var(--font-weight-semibold);\n color: var(--color-ice-700);\n cursor: pointer;\n transition: all 0.2s;\n user-select: none;\n display: block;\n text-align: center;\n }\n\n .root > div:first-child label {\n border-top-left-radius: var(--border-radius);\n border-bottom-left-radius: var(--border-radius);\n }\n\n .root > div:last-child label {\n border-top-right-radius: var(--border-radius);\n border-bottom-right-radius: var(--border-radius);\n }\n\n .root > div:not(:first-child) label {\n margin-left: -1px;\n }\n\n .root > div:not(:last-child) label {\n border-right-color: transparent;\n }\n\n .root input:disabled ~ label {\n background-color: var(--color-ice-200);\n color: var(--color-ice);\n cursor: auto;\n }\n\n .root input:not(:checked, :disabled) ~ label:hover {\n border-color: var(--color-blue);\n color: var(--color-blue);\n z-index: 1;\n position: relative;\n }\n\n .root input:checked:not(:disabled) ~ label {\n border-color: var(--color-blue);\n color: var(--color-blue);\n background-color: var(--color-blue-100);\n z-index: 1;\n position: relative;\n }\n</style>\n","<script setup lang=\"ts\">\n import { inject } from 'vue';\n\n import { RADIO_GROUP_INJECTION } from '../RadioGroup.keys';\n\n const radioGroupInjection = inject(RADIO_GROUP_INJECTION.key);\n\n if (!radioGroupInjection) {\n throw new Error('VariantChip must be used with a RadioGroup instance.');\n }\n\n const { name, disabled, fullWidth, modelValue, options, update } = radioGroupInjection;\n</script>\n\n<template>\n <div class=\"root flex flex-wrap tw-my-1.5\">\n <div v-for=\"option in options\" :key=\"`${name}-${option.id}`\" :class=\"[{ 'w-full': fullWidth }]\">\n <input\n :id=\"`${name}-${option.id}`\"\n class=\"sr-only\"\n type=\"radio\"\n :name=\"name\"\n :value=\"option.value\"\n :checked=\"modelValue === option.value\"\n :disabled=\"disabled || option.disabled\"\n @input=\"update\"\n />\n <label :for=\"`${name}-${option.id}`\">\n {{ option.text }}\n </label>\n </div>\n </div>\n</template>\n\n<style scoped>\n .root {\n gap: var(--ll-space-3);\n }\n\n .root label {\n padding: var(--ll-space-1) var(--ll-space-2);\n border: 1px solid var(--color-ice);\n font-weight: var(--font-weight-normal);\n color: var(--color-ice-900);\n cursor: pointer;\n transition: all 0.2s;\n user-select: none;\n border-radius: 9999px;\n white-space: nowrap;\n }\n\n .root input:disabled ~ label {\n background-color: var(--color-ice-200);\n color: var(--color-ice);\n cursor: auto;\n }\n\n .root input:checked:not(:disabled) ~ label {\n border-color: var(--color-blue);\n color: var(--color-white);\n background-color: var(--color-blue);\n font-weight: var(--font-weight-bold);\n }\n\n .root input:not(:checked, :disabled) ~ label:hover {\n border-color: var(--color-blue);\n }\n</style>\n","<script setup lang=\"ts\">\n import { inject } from 'vue';\n\n import { RADIO_GROUP_INJECTION } from '../RadioGroup.keys';\n\n const radioGroupInjection = inject(RADIO_GROUP_INJECTION.key);\n\n if (!radioGroupInjection) {\n throw new Error('VariantRadio must be used with a RadioGroup instance.');\n }\n\n const { name, disabled, fullWidth, modelValue, options, update } = radioGroupInjection;\n</script>\n\n<template>\n <div class=\"root flex flex-wrap\">\n <div v-for=\"option in options\" :key=\"`${name}-${option.id}`\" :class=\"[{ 'w-full': fullWidth }]\">\n <input\n :id=\"`${name}-${option.id}`\"\n type=\"radio\"\n :name=\"name\"\n :value=\"option.value\"\n :checked=\"modelValue === option.value\"\n :disabled=\"disabled || option.disabled\"\n @input=\"update\"\n />\n <label :for=\"`${name}-${option.id}`\">\n {{ option.text }}\n </label>\n </div>\n </div>\n</template>\n\n<style scoped>\n .root {\n gap: var(--ll-space-3);\n }\n\n .root label {\n font-weight: var(--font-weight-medium);\n user-select: none;\n cursor: pointer;\n padding: 0 var(--ll-space-2);\n }\n\n .root input {\n appearance: none;\n border-radius: 50%;\n width: 20px;\n height: 20px;\n border: 1px solid var(--color-ice);\n transition: all 0.2s;\n position: relative;\n cursor: pointer;\n top: 5px;\n }\n\n .root input:checked {\n background-image: radial-gradient(var(--color-blue) 50%, transparent 54%);\n }\n\n .root input:disabled {\n background: #eef2f4;\n }\n\n .root input:disabled ~ label {\n cursor: auto;\n }\n\n .root input:disabled:checked {\n background-image: radial-gradient(var(--color-ice) 50%, transparent 54%);\n }\n\n .root input:hover:not(:disabled) {\n border-color: var(--color-blue);\n }\n\n .root input:hover:not(:disabled) ~ label {\n color: var(--color-ice-900);\n }\n\n .root input:not(:disabled) ~ label:hover {\n color: var(--color-ice-900);\n }\n</style>\n","<script setup lang=\"ts\">\n import { inject } from 'vue';\n\n import { RADIO_GROUP_INJECTION } from '../RadioGroup.keys';\n\n const radioGroupInjection = inject(RADIO_GROUP_INJECTION.key);\n\n if (!radioGroupInjection) {\n throw new Error('VariantTile must be used with a RadioGroup instance.');\n }\n\n const { name, disabled, fullWidth, modelValue, options, update } = radioGroupInjection;\n</script>\n\n<template>\n <div class=\"root flex flex-wrap\">\n <label\n v-for=\"option in options\"\n :key=\"`${name}-${option.id}`\"\n class=\"tile-container\"\n :class=\"{ 'w-full': fullWidth }\"\n :for=\"`${name}-${option.id}`\"\n >\n <div\n class=\"tile-header border flex\"\n :class=\"{\n 'border-blue-500 bg-blue-100 color-ice-900': modelValue === option.value,\n 'border-ice-500 bg-ice-100 color-ice-700': modelValue !== option.value,\n }\"\n >\n <input\n :id=\"`${name}-${option.id}`\"\n class=\"sr-only\"\n type=\"radio\"\n :name=\"name\"\n :value=\"option.value\"\n :checked=\"modelValue === option.value\"\n :disabled=\"disabled || option.disabled\"\n @input=\"update\"\n />\n <div>\n <span>\n {{ option.text }}\n </span>\n </div>\n </div>\n <div\n class=\"tile-body border-r border-b border-l\"\n :class=\"{\n 'border-ice-500': modelValue !== option.value,\n 'border-blue-500': modelValue === option.value,\n }\"\n >\n <p class=\"color-ice-900 tw-m-0\">{{ option.subTitle }}</p>\n <p class=\"color-ice-700 tw-m-0\">{{ option.subText }}</p>\n </div>\n </label>\n </div>\n</template>\n\n<style scoped>\n .root {\n gap: var(--ll-space-3);\n }\n\n .root label {\n cursor: pointer;\n user-select: none;\n }\n\n .root input:disabled ~ label {\n cursor: auto;\n }\n\n .root input:hover:not(:disabled) ~ label {\n color: var(--color-ice-900);\n }\n\n .root input:not(:disabled) ~ label:hover {\n color: var(--color-ice-900);\n }\n\n .root label.tile-container {\n border-radius: var(--border-radius);\n display: flex;\n flex: 1;\n flex-direction: column;\n }\n\n .tile-header,\n .tile-body {\n transition: all 0.2s;\n }\n\n .tile-header {\n border-radius: var(--border-radius) var(--border-radius) 0 0;\n padding: var(--ll-space-2) 0;\n }\n\n .root label.tile-container:hover .tile-header {\n background-color: var(--color-blue-100) !important;\n border-color: var(--color-blue) !important;\n color: var(--color-ice-900) !important;\n transition: all 0.2s;\n }\n\n .tile-body {\n border-radius: 0 0 var(--border-radius) var(--border-radius);\n background-color: var(--color-white);\n padding: var(--ll-space-3);\n display: flex;\n flex-direction: column;\n }\n\n .root label.tile-container:hover .tile-body {\n border-color: var(--color-blue) !important;\n transition: all 0.2s;\n }\n\n .root input {\n appearance: none;\n background-color: var(--color-white);\n border-radius: 50%;\n width: 20px;\n height: 20px;\n border: 1px solid var(--color-ice);\n transition: all 0.2s;\n position: relative;\n cursor: pointer;\n top: 2px;\n }\n\n .root input ~ div {\n font-weight: var(--font-weight-medium);\n user-select: none;\n cursor: pointer;\n padding: 0 var(--ll-space-2);\n }\n\n .root input:disabled {\n background: #eef2f4;\n }\n\n .root input:checked {\n background-image: radial-gradient(var(--color-blue) 50%, transparent 54%);\n }\n\n .root label.tile-container input {\n margin-left: var(--ll-space-2);\n }\n\n .root input:disabled:checked {\n background-image: radial-gradient(var(--color-ice) 50%, transparent 54%);\n }\n\n @media screen and (width <= 640px) {\n .root {\n flex-direction: column;\n }\n }\n</style>\n","import { ComputedRef } from 'vue';\n\nexport enum RadioGroupVariant {\n Radio = 'radio',\n Button = 'button',\n Chip = 'chip',\n Tile = 'tile',\n}\n\nexport type RadioGroupVariants = `${RadioGroupVariant}`;\n\n/**\n * An individual radio `<input>` within a RadioGroup instance\n */\nexport interface RadioGroupOption {\n /**\n * Disables the RadioGroupOption if truthy\n */\n disabled?: boolean;\n\n /**\n * The unique identifier for the option\n */\n id: string;\n\n /**\n * The text to be displayed for the option\n */\n text: string;\n\n /**\n * The value of the option. Used for the modelValue of the RadioGroup.\n */\n value: string;\n\n /**\n * The subtitle for tile variant\n */\n subTitle?: string;\n\n /**\n * The subtext for tile variant\n */\n subText?: string;\n}\n\n/**\n * Properties and utilities provided to children of a RadioGroup instance\n */\nexport interface RadioGroupInjection {\n /**\n * This type should match RadioGroupProps['disabled']\n */\n disabled: ComputedRef<boolean | undefined>;\n\n /**\n * This type should match RadioGroupProps['fullWidth']\n */\n fullWidth: ComputedRef<boolean | undefined>;\n\n /**\n * This type should match RadioGroupProps['modelValue']\n */\n modelValue: ComputedRef<string | undefined>;\n\n /**\n * This type should match RadioGroupProps['name']\n */\n name: ComputedRef<string | undefined>;\n\n /**\n * This type should match RadioGroupProps['options']\n */\n options: ComputedRef<RadioGroupOption[] | undefined>;\n\n /**\n * Triggered when the user changes their selection; updates the v-model.\n */\n update: (e: Event) => void;\n\n /**\n * This type should match RadioGroupProps['variant']\n * @default 'radio'\n */\n variant: ComputedRef<RadioGroupVariants | undefined>;\n}\n","<script lang=\"ts\">\n import { RadioGroupOption, RadioGroupVariant, RadioGroupVariants } from './RadioGroup.types';\n\n export * from './RadioGroup.keys';\n export * from './RadioGroup.types';\n\n export interface RadioGroupProps {\n /**\n * Passed to the \"name\" attribute of the `<input>` elements within the RadioGroup.\n */\n name?: string;\n\n /**\n * Deprecated - Compose your radio group with the `Radio` component instead\n * @deprecated\n */\n options?: RadioGroupOption[];\n\n modelValue?: RadioGroupOption['value'];\n\n /**\n * @defaultValue 'radio'\n */\n variant?: RadioGroupVariants;\n\n /**\n * Whether the entire group should be disabled\n */\n disabled?: boolean;\n\n /**\n * Whether the group should expand to the parent's width\n */\n fullWidth?: boolean;\n\n /**\n * Adds spacing under the field that is consistent whether or not hint/error text is displayed.\n */\n addBottomSpace?: boolean;\n\n /**\n * Error text to display. Replaces `hintText` (if provided) & adds error styling.\n */\n errorText?: string;\n\n /**\n * Displays text below the input; hidden when the isReadOnly prop is truthy.\n */\n hintText?: string;\n\n /**\n * Whether it's a readonly field.\n */\n isReadOnly?: boolean;\n\n /**\n * Whether the field is required.\n */\n isRequired?: boolean;\n\n /**\n * Label to render above the input.\n */\n label?: string;\n\n /**\n * Show \"(optional)\" to the right of the label text\n */\n showOptionalInLabel?: boolean;\n }\n</script>\n\n<script setup lang=\"ts\">\n import uniqueId from 'lodash-es/uniqueId';\n import { computed, provide } from 'vue';\n\n import Field from '../Field/Field.vue';\n import VariantButton from './components/VariantButton.vue';\n import VariantChip from './components/VariantChip.vue';\n import VariantRadio from './components/VariantRadio.vue';\n import VariantTile from './components/VariantTile.vue';\n import { RADIO_GROUP_INJECTION } from './RadioGroup.keys';\n\n const variantComponentsMap = {\n [RadioGroupVariant.Button]: VariantButton,\n [RadioGroupVariant.Chip]: VariantChip,\n [RadioGroupVariant.Radio]: VariantRadio,\n [RadioGroupVariant.Tile]: VariantTile,\n };\n\n const props = withDefaults(defineProps<RadioGroupProps>(), {\n variant: 'radio',\n disabled: false,\n fullWidth: false,\n errorText: undefined,\n hintText: undefined,\n label: undefined,\n modelValue: undefined,\n name: undefined,\n options: undefined,\n });\n\n const emit =\n defineEmits<{\n /**\n * Occurs when the user selects a radio option. Also, it enables v-model usage on the component.\n */\n (e: 'update:modelValue', value: RadioGroupOption['value']): void;\n }>();\n\n function update(e: Event) {\n emit('update:modelValue', (e.target as HTMLInputElement).value);\n }\n\n const errorId = uniqueId('radio-group-field-error-');\n\n provide(RADIO_GROUP_INJECTION.key, {\n name: computed(() => props.name),\n disabled: computed(() => props.disabled),\n fullWidth: computed(() => props.fullWidth),\n modelValue: computed(() => props.modelValue),\n options: computed(() => props.options),\n variant: computed(() => props.variant),\n update,\n });\n</script>\n\n<template>\n <Field\n :class=\"[\n {\n 'tw-flex': !props.options,\n 'tw-gap-6': !props.options && props.variant !== RadioGroupVariant.Button,\n },\n ]\"\n :aria-errormessage=\"errorId\"\n :aria-invalid=\"!!props.errorText\"\n role=\"radiogroup\"\n fieldset\n :label=\"props.label\"\n :add-bottom-space=\"props.addBottomSpace\"\n :error-id=\"errorId\"\n :error-text=\"props.errorText\"\n :hint-text=\"props.hintText\"\n :show-optional-in-label=\"props.showOptionalInLabel\"\n :is-required=\"props.isRequired\"\n :is-read-only=\"props.isReadOnly\"\n >\n <slot v-if=\"props.options\">\n <component :is=\"variantComponentsMap[props.variant]\" />\n </slot>\n <slot v-else></slot>\n </Field>\n</template>\n"],"names":["radioGroupInjection","inject","RADIO_GROUP_INJECTION","name","disabled","fullWidth","modelValue","options","update","RadioGroupVariant","variantComponentsMap","VariantButton","VariantChip","VariantRadio","VariantTile","e","emit","errorId","uniqueId","provide","computed","props"],"mappings":";;;;;;;;;;;;;;AAKQ,UAAAA,IAAsBC,EAAOC,EAAsB,GAAG;AAE5D,QAAI,CAACF;AACG,YAAA,IAAI,MAAM,wDAAwD;AAG1E,UAAM,EAAE,MAAAG,GAAM,UAAAC,GAAU,WAAAC,GAAW,YAAAC,GAAY,SAAAC,GAAS,QAAAC,EAAW,IAAAR;;;;;;;;;;;;;;;;;;;;;;;;;;;ACN7D,UAAAA,IAAsBC,EAAOC,EAAsB,GAAG;AAE5D,QAAI,CAACF;AACG,YAAA,IAAI,MAAM,sDAAsD;AAGxE,UAAM,EAAE,MAAAG,GAAM,UAAAC,GAAU,WAAAC,GAAW,YAAAC,GAAY,SAAAC,GAAS,QAAAC,EAAW,IAAAR;;;;;;;;;;;;;;;;;;;;;;;;;;;ACN7D,UAAAA,IAAsBC,EAAOC,EAAsB,GAAG;AAE5D,QAAI,CAACF;AACG,YAAA,IAAI,MAAM,uDAAuD;AAGzE,UAAM,EAAE,MAAAG,GAAM,UAAAC,GAAU,WAAAC,GAAW,YAAAC,GAAY,SAAAC,GAAS,QAAAC,EAAW,IAAAR;;;;;;;;;;;;;;;;;;;;;;;;;;ACN7D,UAAAA,IAAsBC,EAAOC,EAAsB,GAAG;AAE5D,QAAI,CAACF;AACG,YAAA,IAAI,MAAM,sDAAsD;AAGxE,UAAM,EAAE,MAAAG,GAAM,UAAAC,GAAU,WAAAC,GAAW,YAAAC,GAAY,SAAAC,GAAS,QAAAC,EAAW,IAAAR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACTzD,IAAAS,sBAAAA,OACVA,EAAA,QAAQ,SACRA,EAAA,SAAS,UACTA,EAAA,OAAO,QACPA,EAAA,OAAO,QAJGA,IAAAA,KAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;iBCiFJC,IAAuB;AAAA,MAC3B,CAACD,EAAkB,MAAM,GAAGE;AAAA,MAC5B,CAACF,EAAkB,IAAI,GAAGG;AAAA,MAC1B,CAACH,EAAkB,KAAK,GAAGI;AAAA,MAC3B,CAACJ,EAAkB,IAAI,GAAGK;AAAA,IAAA;AAuB5B,aAASN,EAAOO,GAAU;AACnB,MAAAC,EAAA,qBAAsBD,EAAE,OAA4B,KAAK;AAAA,IAChE;AAEM,UAAAE,IAAUC,EAAS,0BAA0B;AAEnD,WAAAC,EAAQjB,EAAsB,KAAK;AAAA,MACjC,MAAMkB,EAAS,MAAMC,EAAM,IAAI;AAAA,MAC/B,UAAUD,EAAS,MAAMC,EAAM,QAAQ;AAAA,MACvC,WAAWD,EAAS,MAAMC,EAAM,SAAS;AAAA,MACzC,YAAYD,EAAS,MAAMC,EAAM,UAAU;AAAA,MAC3C,SAASD,EAAS,MAAMC,EAAM,OAAO;AAAA,MACrC,SAASD,EAAS,MAAMC,EAAM,OAAO;AAAA,MACrC,QAAAb;AAAA,IAAA,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"RadioGroup.js","sources":["../src/components/RadioGroup/components/VariantButton.vue","../src/components/RadioGroup/components/VariantChip.vue","../src/components/RadioGroup/components/VariantRadio.vue","../src/components/RadioGroup/components/VariantTile.vue","../src/components/RadioGroup/RadioGroup.types.ts","../src/components/RadioGroup/RadioGroup.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { inject } from 'vue';\n\n import { RADIO_GROUP_INJECTION } from '../RadioGroup.keys';\n\n const radioGroupInjection = inject(RADIO_GROUP_INJECTION.key);\n\n if (!radioGroupInjection) {\n throw new Error('VariantButton must be used with a RadioGroup instance.');\n }\n\n const { name, disabled, fullWidth, modelValue, options, update } = radioGroupInjection;\n</script>\n\n<template>\n <div class=\"root flex\">\n <div v-for=\"option in options\" :key=\"`${name}-${option.id}`\" :class=\"[{ 'w-full': fullWidth }]\">\n <input\n :id=\"`${name}-${option.id}`\"\n class=\"sr-only\"\n type=\"radio\"\n :name=\"name\"\n :value=\"option.value\"\n :checked=\"modelValue === option.value\"\n :disabled=\"disabled || option.disabled\"\n @input=\"update\"\n />\n <label :for=\"`${name}-${option.id}`\">\n {{ option.text }}\n </label>\n </div>\n </div>\n</template>\n\n<style scoped>\n .root label {\n padding: 8px 30px;\n border: 1px solid var(--color-ice);\n font-weight: var(--font-weight-semibold);\n color: var(--color-ice-700);\n cursor: pointer;\n transition: all 0.2s;\n user-select: none;\n display: block;\n text-align: center;\n }\n\n .root > div:first-child label {\n border-top-left-radius: var(--border-radius);\n border-bottom-left-radius: var(--border-radius);\n }\n\n .root > div:last-child label {\n border-top-right-radius: var(--border-radius);\n border-bottom-right-radius: var(--border-radius);\n }\n\n .root > div:not(:first-child) label {\n margin-left: -1px;\n }\n\n .root > div:not(:last-child) label {\n border-right-color: transparent;\n }\n\n .root input:disabled ~ label {\n background-color: var(--color-ice-200);\n color: var(--color-ice);\n cursor: auto;\n }\n\n .root input:not(:checked, :disabled) ~ label:hover {\n border-color: var(--color-blue);\n color: var(--color-blue);\n z-index: 1;\n position: relative;\n }\n\n .root input:checked:not(:disabled) ~ label {\n border-color: var(--color-blue);\n color: var(--color-blue);\n background-color: var(--color-blue-100);\n z-index: 1;\n position: relative;\n }\n</style>\n","<script setup lang=\"ts\">\n import { inject } from 'vue';\n\n import { RADIO_GROUP_INJECTION } from '../RadioGroup.keys';\n\n const radioGroupInjection = inject(RADIO_GROUP_INJECTION.key);\n\n if (!radioGroupInjection) {\n throw new Error('VariantChip must be used with a RadioGroup instance.');\n }\n\n const { name, disabled, fullWidth, modelValue, options, update } = radioGroupInjection;\n</script>\n\n<template>\n <div class=\"root flex flex-wrap tw-my-1.5\">\n <div v-for=\"option in options\" :key=\"`${name}-${option.id}`\" :class=\"[{ 'w-full': fullWidth }]\">\n <input\n :id=\"`${name}-${option.id}`\"\n class=\"sr-only\"\n type=\"radio\"\n :name=\"name\"\n :value=\"option.value\"\n :checked=\"modelValue === option.value\"\n :disabled=\"disabled || option.disabled\"\n @input=\"update\"\n />\n <label :for=\"`${name}-${option.id}`\">\n {{ option.text }}\n </label>\n </div>\n </div>\n</template>\n\n<style scoped>\n .root {\n gap: var(--ll-space-3);\n }\n\n .root label {\n padding: var(--ll-space-1) var(--ll-space-2);\n border: 1px solid var(--color-ice);\n font-weight: var(--font-weight-normal);\n color: var(--color-ice-900);\n cursor: pointer;\n transition: all 0.2s;\n user-select: none;\n border-radius: 9999px;\n white-space: nowrap;\n }\n\n .root input:disabled ~ label {\n background-color: var(--color-ice-200);\n color: var(--color-ice);\n cursor: auto;\n }\n\n .root input:checked:not(:disabled) ~ label {\n border-color: var(--color-blue);\n color: var(--color-white);\n background-color: var(--color-blue);\n font-weight: var(--font-weight-bold);\n }\n\n .root input:not(:checked, :disabled) ~ label:hover {\n border-color: var(--color-blue);\n }\n</style>\n","<script setup lang=\"ts\">\n import { inject } from 'vue';\n\n import { RADIO_GROUP_INJECTION } from '../RadioGroup.keys';\n\n const radioGroupInjection = inject(RADIO_GROUP_INJECTION.key);\n\n if (!radioGroupInjection) {\n throw new Error('VariantRadio must be used with a RadioGroup instance.');\n }\n\n const { name, disabled, fullWidth, modelValue, options, update } = radioGroupInjection;\n</script>\n\n<template>\n <div class=\"root flex flex-wrap\">\n <div v-for=\"option in options\" :key=\"`${name}-${option.id}`\" :class=\"[{ 'w-full': fullWidth }]\">\n <input\n :id=\"`${name}-${option.id}`\"\n type=\"radio\"\n :name=\"name\"\n :value=\"option.value\"\n :checked=\"modelValue === option.value\"\n :disabled=\"disabled || option.disabled\"\n @input=\"update\"\n />\n <label :for=\"`${name}-${option.id}`\">\n {{ option.text }}\n </label>\n </div>\n </div>\n</template>\n\n<style scoped>\n .root {\n gap: var(--ll-space-3);\n }\n\n .root label {\n font-weight: var(--font-weight-medium);\n user-select: none;\n cursor: pointer;\n padding: 0 var(--ll-space-2);\n }\n\n .root input {\n appearance: none;\n border-radius: 50%;\n width: 20px;\n height: 20px;\n border: 1px solid var(--color-ice);\n transition: all 0.2s;\n position: relative;\n cursor: pointer;\n top: 5px;\n }\n\n .root input:checked {\n background-image: radial-gradient(var(--color-blue) 50%, transparent 54%);\n }\n\n .root input:disabled {\n background: #eef2f4;\n }\n\n .root input:disabled ~ label {\n cursor: auto;\n }\n\n .root input:disabled:checked {\n background-image: radial-gradient(var(--color-ice) 50%, transparent 54%);\n }\n\n .root input:hover:not(:disabled) {\n border-color: var(--color-blue);\n }\n\n .root input:hover:not(:disabled) ~ label {\n color: var(--color-ice-900);\n }\n\n .root input:not(:disabled) ~ label:hover {\n color: var(--color-ice-900);\n }\n</style>\n","<script setup lang=\"ts\">\n import { inject } from 'vue';\n\n import { RADIO_GROUP_INJECTION } from '../RadioGroup.keys';\n\n const radioGroupInjection = inject(RADIO_GROUP_INJECTION.key);\n\n if (!radioGroupInjection) {\n throw new Error('VariantTile must be used with a RadioGroup instance.');\n }\n\n const { name, disabled, fullWidth, modelValue, options, update } = radioGroupInjection;\n</script>\n\n<template>\n <div class=\"root flex flex-wrap\">\n <label\n v-for=\"option in options\"\n :key=\"`${name}-${option.id}`\"\n class=\"tile-container\"\n :class=\"{ 'w-full': fullWidth }\"\n :for=\"`${name}-${option.id}`\"\n >\n <div\n class=\"tile-header border flex\"\n :class=\"{\n 'border-blue-500 bg-blue-100 color-ice-900': modelValue === option.value,\n 'border-ice-500 bg-ice-100 color-ice-700': modelValue !== option.value,\n }\"\n >\n <input\n :id=\"`${name}-${option.id}`\"\n class=\"sr-only\"\n type=\"radio\"\n :name=\"name\"\n :value=\"option.value\"\n :checked=\"modelValue === option.value\"\n :disabled=\"disabled || option.disabled\"\n @input=\"update\"\n />\n <div>\n <span>\n {{ option.text }}\n </span>\n </div>\n </div>\n <div\n class=\"tile-body border-r border-b border-l\"\n :class=\"{\n 'border-ice-500': modelValue !== option.value,\n 'border-blue-500': modelValue === option.value,\n }\"\n >\n <p class=\"color-ice-900 tw-m-0\">{{ option.subTitle }}</p>\n <p class=\"color-ice-700 tw-m-0\">{{ option.subText }}</p>\n </div>\n </label>\n </div>\n</template>\n\n<style scoped>\n .root {\n gap: var(--ll-space-3);\n }\n\n .root label {\n cursor: pointer;\n user-select: none;\n }\n\n .root input:disabled ~ label {\n cursor: auto;\n }\n\n .root input:hover:not(:disabled) ~ label {\n color: var(--color-ice-900);\n }\n\n .root input:not(:disabled) ~ label:hover {\n color: var(--color-ice-900);\n }\n\n .root label.tile-container {\n border-radius: var(--border-radius);\n display: flex;\n flex: 1;\n flex-direction: column;\n }\n\n .tile-header,\n .tile-body {\n transition: all 0.2s;\n }\n\n .tile-header {\n border-radius: var(--border-radius) var(--border-radius) 0 0;\n padding: var(--ll-space-2) 0;\n }\n\n .root label.tile-container:hover .tile-header {\n background-color: var(--color-blue-100) !important;\n border-color: var(--color-blue) !important;\n color: var(--color-ice-900) !important;\n transition: all 0.2s;\n }\n\n .tile-body {\n border-radius: 0 0 var(--border-radius) var(--border-radius);\n background-color: var(--color-white);\n padding: var(--ll-space-3);\n display: flex;\n flex-direction: column;\n }\n\n .root label.tile-container:hover .tile-body {\n border-color: var(--color-blue) !important;\n transition: all 0.2s;\n }\n\n .root input {\n appearance: none;\n background-color: var(--color-white);\n border-radius: 50%;\n width: 20px;\n height: 20px;\n border: 1px solid var(--color-ice);\n transition: all 0.2s;\n position: relative;\n cursor: pointer;\n top: 2px;\n }\n\n .root input ~ div {\n font-weight: var(--font-weight-medium);\n user-select: none;\n cursor: pointer;\n padding: 0 var(--ll-space-2);\n }\n\n .root input:disabled {\n background: #eef2f4;\n }\n\n .root input:checked {\n background-image: radial-gradient(var(--color-blue) 50%, transparent 54%);\n }\n\n .root label.tile-container input {\n margin-left: var(--ll-space-2);\n }\n\n .root input:disabled:checked {\n background-image: radial-gradient(var(--color-ice) 50%, transparent 54%);\n }\n\n @media screen and (width <= 640px) {\n .root {\n flex-direction: column;\n }\n }\n</style>\n","import { ComputedRef } from 'vue';\n\nexport enum RadioGroupVariant {\n Radio = 'radio',\n Button = 'button',\n Chip = 'chip',\n Tile = 'tile',\n}\n\nexport type RadioGroupVariants = `${RadioGroupVariant}`;\n\n/**\n * An individual radio `<input>` within a RadioGroup instance\n */\nexport interface RadioGroupOption {\n /**\n * Disables the RadioGroupOption if truthy\n */\n disabled?: boolean;\n\n /**\n * The unique identifier for the option\n */\n id: string;\n\n /**\n * The text to be displayed for the option\n */\n text: string;\n\n /**\n * The value of the option. Used for the modelValue of the RadioGroup.\n */\n value: string;\n\n /**\n * The subtitle for tile variant\n */\n subTitle?: string;\n\n /**\n * The subtext for tile variant\n */\n subText?: string;\n}\n\n/**\n * Properties and utilities provided to children of a RadioGroup instance\n */\nexport interface RadioGroupInjection {\n /**\n * This type should match RadioGroupProps['disabled']\n */\n disabled: ComputedRef<boolean | undefined>;\n\n /**\n * This type should match RadioGroupProps['fullWidth']\n */\n fullWidth: ComputedRef<boolean | undefined>;\n\n /**\n * This type should match RadioGroupProps['modelValue']\n */\n modelValue: ComputedRef<string | undefined>;\n\n /**\n * This type should match RadioGroupProps['name']\n */\n name: ComputedRef<string | undefined>;\n\n /**\n * This type should match RadioGroupProps['options']\n */\n options: ComputedRef<RadioGroupOption[] | undefined>;\n\n /**\n * Triggered when the user changes their selection; updates the v-model.\n */\n update: (e: Event) => void;\n\n /**\n * This type should match RadioGroupProps['variant']\n * @default 'radio'\n */\n variant: ComputedRef<RadioGroupVariants | undefined>;\n}\n","<script lang=\"ts\">\n import { RadioGroupOption, RadioGroupVariant, RadioGroupVariants } from './RadioGroup.types';\n\n export * from './RadioGroup.keys';\n export * from './RadioGroup.types';\n\n export interface RadioGroupProps {\n /**\n * Passed to the \"name\" attribute of the `<input>` elements within the RadioGroup.\n */\n name?: string;\n\n /**\n * Deprecated - Compose your radio group with the `Radio` component instead\n * @deprecated\n */\n options?: RadioGroupOption[];\n\n modelValue?: RadioGroupOption['value'];\n\n /**\n * @defaultValue 'radio'\n */\n variant?: RadioGroupVariants;\n\n /**\n * Whether the entire group should be disabled\n */\n disabled?: boolean;\n\n /**\n * Whether the group should expand to the parent's width\n */\n fullWidth?: boolean;\n\n /**\n * Adds spacing under the field that is consistent whether or not hint/error text is displayed.\n */\n addBottomSpace?: boolean;\n\n /**\n * Error text to display. Replaces `hintText` (if provided) & adds error styling.\n */\n errorText?: string;\n\n /**\n * Displays text below the input; hidden when the isReadOnly prop is truthy.\n */\n hintText?: string;\n\n /**\n * Whether it's a readonly field.\n */\n isReadOnly?: boolean;\n\n /**\n * Whether the field is required.\n */\n isRequired?: boolean;\n\n /**\n * Label to render above the input.\n */\n label?: string;\n\n /**\n * Show \"(optional)\" to the right of the label text\n */\n showOptionalInLabel?: boolean;\n }\n</script>\n\n<script setup lang=\"ts\">\n import uniqueId from 'lodash-es/uniqueId';\n import { computed, provide } from 'vue';\n\n import Field from '../Field/Field.vue';\n import VariantButton from './components/VariantButton.vue';\n import VariantChip from './components/VariantChip.vue';\n import VariantRadio from './components/VariantRadio.vue';\n import VariantTile from './components/VariantTile.vue';\n import { RADIO_GROUP_INJECTION } from './RadioGroup.keys';\n\n const variantComponentsMap = {\n [RadioGroupVariant.Button]: VariantButton,\n [RadioGroupVariant.Chip]: VariantChip,\n [RadioGroupVariant.Radio]: VariantRadio,\n [RadioGroupVariant.Tile]: VariantTile,\n };\n\n const props = withDefaults(defineProps<RadioGroupProps>(), {\n variant: 'radio',\n disabled: false,\n fullWidth: false,\n errorText: undefined,\n hintText: undefined,\n label: undefined,\n modelValue: undefined,\n name: undefined,\n options: undefined,\n });\n\n const emit =\n defineEmits<{\n /**\n * Occurs when the user selects a radio option. Also, it enables v-model usage on the component.\n */\n (e: 'update:modelValue', value: RadioGroupOption['value']): void;\n }>();\n\n function update(e: Event) {\n emit('update:modelValue', (e.target as HTMLInputElement).value);\n }\n\n const errorId = uniqueId('radio-group-field-error-');\n\n provide(RADIO_GROUP_INJECTION.key, {\n name: computed(() => props.name),\n disabled: computed(() => props.disabled),\n fullWidth: computed(() => props.fullWidth),\n modelValue: computed(() => props.modelValue),\n options: computed(() => props.options),\n variant: computed(() => props.variant),\n update,\n });\n</script>\n\n<template>\n <Field\n :class=\"[\n {\n 'tw-flex': !props.options,\n 'tw-gap-6': !props.options && props.variant !== RadioGroupVariant.Button,\n },\n ]\"\n :aria-errormessage=\"errorId\"\n :aria-invalid=\"!!props.errorText\"\n role=\"radiogroup\"\n fieldset\n :label=\"props.label\"\n :add-bottom-space=\"props.addBottomSpace\"\n :error-id=\"errorId\"\n :error-text=\"props.errorText\"\n :hint-text=\"props.hintText\"\n :show-optional-in-label=\"props.showOptionalInLabel\"\n :is-required=\"props.isRequired\"\n :is-read-only=\"props.isReadOnly\"\n >\n <slot v-if=\"props.options\">\n <component :is=\"variantComponentsMap[props.variant]\" />\n </slot>\n <slot v-else></slot>\n </Field>\n</template>\n"],"names":["radioGroupInjection","inject","RADIO_GROUP_INJECTION","name","disabled","fullWidth","modelValue","options","update","RadioGroupVariant","variantComponentsMap","VariantButton","VariantChip","VariantRadio","VariantTile","e","emit","errorId","uniqueId","provide","computed","props"],"mappings":";;;;;;;;;;;AAKQ,UAAAA,IAAsBC,EAAOC,EAAsB,GAAG;AAE5D,QAAI,CAACF;AACG,YAAA,IAAI,MAAM,wDAAwD;AAG1E,UAAM,EAAE,MAAAG,GAAM,UAAAC,GAAU,WAAAC,GAAW,YAAAC,GAAY,SAAAC,GAAS,QAAAC,EAAW,IAAAR;;;;;;;;;;;;;;;;;;;;;;;;;;;ACN7D,UAAAA,IAAsBC,EAAOC,EAAsB,GAAG;AAE5D,QAAI,CAACF;AACG,YAAA,IAAI,MAAM,sDAAsD;AAGxE,UAAM,EAAE,MAAAG,GAAM,UAAAC,GAAU,WAAAC,GAAW,YAAAC,GAAY,SAAAC,GAAS,QAAAC,EAAW,IAAAR;;;;;;;;;;;;;;;;;;;;;;;;;;;ACN7D,UAAAA,IAAsBC,EAAOC,EAAsB,GAAG;AAE5D,QAAI,CAACF;AACG,YAAA,IAAI,MAAM,uDAAuD;AAGzE,UAAM,EAAE,MAAAG,GAAM,UAAAC,GAAU,WAAAC,GAAW,YAAAC,GAAY,SAAAC,GAAS,QAAAC,EAAW,IAAAR;;;;;;;;;;;;;;;;;;;;;;;;;;ACN7D,UAAAA,IAAsBC,EAAOC,EAAsB,GAAG;AAE5D,QAAI,CAACF;AACG,YAAA,IAAI,MAAM,sDAAsD;AAGxE,UAAM,EAAE,MAAAG,GAAM,UAAAC,GAAU,WAAAC,GAAW,YAAAC,GAAY,SAAAC,GAAS,QAAAC,EAAW,IAAAR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACTzD,IAAAS,sBAAAA,OACVA,EAAA,QAAQ,SACRA,EAAA,SAAS,UACTA,EAAA,OAAO,QACPA,EAAA,OAAO,QAJGA,IAAAA,KAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;iBCiFJC,IAAuB;AAAA,MAC3B,CAACD,EAAkB,MAAM,GAAGE;AAAA,MAC5B,CAACF,EAAkB,IAAI,GAAGG;AAAA,MAC1B,CAACH,EAAkB,KAAK,GAAGI;AAAA,MAC3B,CAACJ,EAAkB,IAAI,GAAGK;AAAA,IAAA;AAuB5B,aAASN,EAAOO,GAAU;AACnB,MAAAC,EAAA,qBAAsBD,EAAE,OAA4B,KAAK;AAAA,IAChE;AAEM,UAAAE,IAAUC,EAAS,0BAA0B;AAEnD,WAAAC,EAAQjB,EAAsB,KAAK;AAAA,MACjC,MAAMkB,EAAS,MAAMC,EAAM,IAAI;AAAA,MAC/B,UAAUD,EAAS,MAAMC,EAAM,QAAQ;AAAA,MACvC,WAAWD,EAAS,MAAMC,EAAM,SAAS;AAAA,MACzC,YAAYD,EAAS,MAAMC,EAAM,UAAU;AAAA,MAC3C,SAASD,EAAS,MAAMC,EAAM,OAAO;AAAA,MACrC,SAASD,EAAS,MAAMC,EAAM,OAAO;AAAA,MACrC,QAAAb;AAAA,IAAA,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|