@leaflink/stash 48.10.0 → 48.10.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/dist/Accordion.js +1 -1
- package/dist/ActionsDropdown.js +1 -1
- package/dist/AddressSelect.js +1 -1
- package/dist/AddressSelect.js.map +1 -1
- package/dist/Alert.js +1 -1
- package/dist/Alert.js.map +1 -1
- package/dist/AppNavigationItem.js +1 -1
- package/dist/AppTopbar.js +1 -1
- package/dist/Avatar.vue.d.ts +1 -1
- package/dist/Badge.js.map +1 -1
- package/dist/Button.vue.d.ts +3 -1
- package/dist/CardMedia.js +1 -1
- package/dist/Carousel.js.map +1 -1
- package/dist/ChevronToggle.js +1 -1
- package/dist/ChevronToggle.vue_vue_type_script_setup_true_lang-1591294c.js.map +1 -1
- package/dist/Chip.js +1 -1
- package/dist/Chip.js.map +1 -1
- package/dist/Chip.vue.d.ts +1 -1
- package/dist/ConfirmationCodeInput.js.map +1 -1
- package/dist/ContextSwitcher.js.map +1 -1
- package/dist/Copy.js +1 -1
- package/dist/CurrencyInput.js +39 -34
- package/dist/CurrencyInput.js.map +1 -1
- package/dist/DataView.js +1 -1
- package/dist/DataView.js.map +1 -1
- package/dist/DataViewFilters.js +1 -1
- package/dist/DataViewFilters.js.map +1 -1
- package/dist/DataViewSortButton.js +1 -1
- package/dist/DataViewToolbar.js +1 -1
- package/dist/DatePicker.js +3355 -3368
- package/dist/DatePicker.js.map +1 -1
- package/dist/Dialog.js +75 -69
- package/dist/Dialog.js.map +1 -1
- package/dist/Dropdown.js +1 -1
- package/dist/Dropdown.js.map +1 -1
- package/dist/EmptyState.js +2 -2
- package/dist/Expand.vue_vue_type_script_setup_true_lang-1751f4a6.js.map +1 -1
- package/dist/FileUpload.js +1 -1
- package/dist/FileUpload.js.map +1 -1
- package/dist/FilterChip.js +1 -1
- package/dist/FilterDrawerItem.js +1 -1
- package/dist/FilterDropdown.js +1 -1
- package/dist/FilterSelect.js +1 -1
- package/dist/FilterSelect.js.map +1 -1
- package/dist/Filters.js +1 -1
- package/dist/Filters.js.map +1 -1
- package/dist/HttpError.js +2 -2
- package/dist/Icon.js +1 -1
- package/dist/Icon.js.map +1 -1
- package/dist/IconLabel.js +1 -1
- package/dist/IconLabel.vue.d.ts +1 -1
- package/dist/Illustration.js +3 -3
- package/dist/{Illustration.vue_vue_type_script_setup_true_lang-4b8944da.js → Illustration.vue_vue_type_script_setup_true_lang-e26c3841.js} +2 -2
- package/dist/{Illustration.vue_vue_type_script_setup_true_lang-4b8944da.js.map → Illustration.vue_vue_type_script_setup_true_lang-e26c3841.js.map} +1 -1
- package/dist/Image.js.map +1 -1
- package/dist/InlineEdit.js +1 -1
- package/dist/Input.js +1 -1
- package/dist/Input.js.map +1 -1
- package/dist/InputOptions.js +1 -1
- package/dist/LicenseChip.js +1 -1
- package/dist/ListView.js +2 -2
- package/dist/ListView.js.map +1 -1
- package/dist/Logo.vue_vue_type_script_setup_true_lang-d7da48a0.js.map +1 -1
- package/dist/Metric.vue.d.ts +1 -1
- package/dist/Modal.js +1 -1
- package/dist/Modals.js +6 -6
- package/dist/Modals.js.map +1 -1
- package/dist/ObfuscateText.js +1 -1
- package/dist/PageNavigation.js +1 -1
- package/dist/PageNavigation.js.map +1 -1
- package/dist/Paginate.js +1 -1
- package/dist/PlaidLink.js.map +1 -1
- package/dist/QuickAction.js +1 -1
- package/dist/RadioNew.js.map +1 -1
- package/dist/RangeInput.js +1 -1
- package/dist/SearchBar.js +1 -1
- package/dist/Select.js +709 -653
- package/dist/Select.js.map +1 -1
- package/dist/SelectStatus.js +1 -1
- package/dist/SelectStatus.js.map +1 -1
- package/dist/SelectStatus.vue.d.ts +1 -1
- package/dist/Skeleton.js.map +1 -1
- package/dist/Step.js +1 -1
- package/dist/Stepper.js +1 -1
- package/dist/Tab.js +1 -1
- package/dist/Tab.vue_vue_type_script_setup_true_lang-69d1b046.js.map +1 -1
- package/dist/Table.js +2 -2
- package/dist/TableCell.js +2 -2
- package/dist/TableHeaderCell.js +2 -2
- package/dist/TableHeaderRow.js +2 -2
- package/dist/TableRow.js +2 -2
- package/dist/TableRow.vue.d.ts +1 -1
- package/dist/Tabs.js +1 -1
- package/dist/TextEditor.js +991 -991
- package/dist/TextEditor.js.map +1 -1
- package/dist/Textarea.js.map +1 -1
- package/dist/Toast.js +274 -252
- package/dist/Toast.js.map +1 -1
- package/dist/Toasts.js +1 -1
- package/dist/ToastsPlugin.js +1 -1
- package/dist/components.css +2 -2
- package/dist/index-5e5945a9.js.map +1 -1
- package/dist/{index-79ce320f.js → index-9e1095ef.js} +6 -4
- package/dist/index-9e1095ef.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/isDefined-2ce6cde4.js.map +1 -1
- package/dist/observe.js.map +1 -1
- package/dist/searchFuzzy-74a7de1c.js.map +1 -1
- package/dist/sticky.js.map +1 -1
- package/dist/tailwind-base.js.map +1 -1
- package/dist/toTimeZone-e6e9ab75.js.map +1 -1
- package/dist/tooltip.js.map +1 -1
- package/dist/useGoogleMaps.js +109 -119
- package/dist/useGoogleMaps.js.map +1 -1
- package/dist/useModals.d.ts +6 -363
- package/dist/useModals.js.map +1 -1
- package/dist/useScriptTag.js.map +1 -1
- package/dist/useStepper.js.map +1 -1
- package/dist/useValidation.js.map +1 -1
- package/dist/utils/colorScheme.js.map +1 -1
- package/dist/utils/createQueryString.js.map +1 -1
- package/dist/utils/formatDateTime.js.map +1 -1
- package/dist/utils/helpers.js.map +1 -1
- package/dist/utils/i18n.js.map +1 -1
- package/dist/utils/storage.js.map +1 -1
- package/dist/viewable.js.map +1 -1
- package/package.json +30 -46
- package/dist/index-79ce320f.js.map +0 -1
package/dist/Modals.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as p, openBlock as s, createBlock as
|
|
1
|
+
import { defineComponent as p, openBlock as s, createBlock as c, TransitionGroup as m, withCtx as a, createElementBlock as d, Fragment as f, renderList as l, unref as v, resolveDynamicComponent as M, mergeProps as L, toHandlers as b, createSlots as g, createElementVNode as k } from "vue";
|
|
2
2
|
import y from "./useModals.js";
|
|
3
3
|
import { _ as h } from "./_plugin-vue_export-helper-dad06003.js";
|
|
4
4
|
import "lodash-es/merge";
|
|
@@ -14,14 +14,14 @@ const B = ["innerHTML"], C = /* @__PURE__ */ p({
|
|
|
14
14
|
cancel: () => t.close({ index: o })
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
|
-
return (n, o) => (s(),
|
|
18
|
-
default:
|
|
19
|
-
(s(!0), d(f, null, l(v(t).active, (e, r) => (s(),
|
|
17
|
+
return (n, o) => (s(), c(m, { name: "modals" }, {
|
|
18
|
+
default: a(() => [
|
|
19
|
+
(s(!0), d(f, null, l(v(t).active, (e, r) => (s(), c(M(e.component), L({
|
|
20
20
|
key: `modal-${r}`
|
|
21
21
|
}, e.attributes, { "is-open": !0 }, b(_(e, r))), g({ _: 2 }, [
|
|
22
22
|
l(e.slots, (i, u) => ({
|
|
23
23
|
name: u,
|
|
24
|
-
fn:
|
|
24
|
+
fn: a(() => [
|
|
25
25
|
k("div", { innerHTML: i }, null, 8, B)
|
|
26
26
|
])
|
|
27
27
|
}))
|
|
@@ -31,7 +31,7 @@ const B = ["innerHTML"], C = /* @__PURE__ */ p({
|
|
|
31
31
|
}));
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
|
-
const w = /* @__PURE__ */ h(C, [["__scopeId", "data-v-
|
|
34
|
+
const w = /* @__PURE__ */ h(C, [["__scopeId", "data-v-cbf7c57d"]]);
|
|
35
35
|
export {
|
|
36
36
|
w as default
|
|
37
37
|
};
|
package/dist/Modals.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modals.js","sources":["../src/components/Modals/Modals.vue"],"sourcesContent":["<script lang=\"ts\" setup>\n import { DeepReadonly } from 'vue';\n\n import useModals, { type Modal } from '../../composables/useModals/useModals';\n\n const modals = useModals();\n\n function getListeners(modal: DeepReadonly<Modal
|
|
1
|
+
{"version":3,"file":"Modals.js","sources":["../src/components/Modals/Modals.vue"],"sourcesContent":["<script lang=\"ts\" setup>\n /* @ts-ignore-file */\n import { DeepReadonly } from 'vue';\n\n import useModals, { type Modal } from '../../composables/useModals/useModals';\n\n const modals = useModals();\n\n // @ts-ignore - Stupid TS version issues. Todo: remove ` | any` when TS/vite/vue deps are updated.\n function getListeners(modal: DeepReadonly<Modal> | any, index: number) {\n if (modal.options?.disableDefaultListeners) {\n return {};\n }\n\n return {\n dismiss: () => modals.close({ index }),\n close: () => modals.close({ index }),\n cancel: () => modals.close({ index }),\n };\n }\n</script>\n\n<template>\n <TransitionGroup name=\"modals\">\n <component\n :is=\"modal.component\"\n v-for=\"(modal, index) in modals.active\"\n :key=\"`modal-${index}`\"\n v-bind=\"modal.attributes\"\n :is-open=\"true\"\n v-on=\"getListeners(modal, index)\"\n >\n <template v-for=\"(value, name) in modal.slots\" :key=\"name\" #[name]>\n <!-- eslint-disable-next-line vue/no-v-html -->\n <div v-html=\"value\" />\n </template>\n </component>\n </TransitionGroup>\n</template>\n\n<style scoped>\n .modals-enter-active,\n .modals-leave-active {\n --swing-timing-function: cubic-bezier(0.25, 0.8, 0.5, 1); /* \"swing\" from the $transition sass map */\n transition: opacity 165ms var(--swing-timing-function);\n }\n\n .modals-enter-from,\n .modals-leave-to {\n opacity: 0;\n }\n\n .modals-enter-active :deep(.stash-modal__dialog--position-center),\n .modals-leave-active :deep(.stash-modal__dialog--position-center) {\n transition: transform 165ms var(--swing-timing-function);\n }\n\n .modals-enter-from :deep(.stash-modal__dialog--position-center),\n .modals-leave-to :deep(.stash-modal__dialog--position-center) {\n transform: translateY(20px);\n }\n\n .modals-enter-active :deep(.stash-modal__dialog--is-drawer),\n .modals-leave-active :deep(.stash-modal__dialog--is-drawer) {\n transition: transform 165ms var(--swing-timing-function);\n }\n\n .modals-enter-from :deep(.stash-modal__dialog--position-left),\n .modals-leave-to :deep(.stash-modal__dialog--position-left) {\n transform: translateX(-50px);\n }\n\n .modals-enter-from :deep(.stash-modal__dialog--position-right),\n .modals-leave-to :deep(.stash-modal__dialog--position-right) {\n transform: translateX(50px);\n }\n</style>\n"],"names":["modals","useModals","getListeners","modal","index","_a"],"mappings":";;;;;;;AAME,UAAMA,IAASC;AAGN,aAAAC,EAAaC,GAAkCC,GAAe;;AACjE,cAAAC,IAAAF,EAAM,YAAN,QAAAE,EAAe,0BACV,KAGF;AAAA,QACL,SAAS,MAAML,EAAO,MAAM,EAAE,OAAAI,GAAO;AAAA,QACrC,OAAO,MAAMJ,EAAO,MAAM,EAAE,OAAAI,GAAO;AAAA,QACnC,QAAQ,MAAMJ,EAAO,MAAM,EAAE,OAAAI,GAAO;AAAA,MAAA;AAAA,IAExC;;;;;;;;;;;;;;;;;;;"}
|
package/dist/ObfuscateText.js
CHANGED
|
@@ -4,7 +4,7 @@ import b from "./Icon.js";
|
|
|
4
4
|
import "./Button.vue_used_vue_type_style_index_0_lang.module-a9290468.js";
|
|
5
5
|
import "./_plugin-vue_export-helper-dad06003.js";
|
|
6
6
|
import "lodash-es/uniqueId";
|
|
7
|
-
import "./index-
|
|
7
|
+
import "./index-9e1095ef.js";
|
|
8
8
|
import "./Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js";
|
|
9
9
|
const k = {
|
|
10
10
|
class: "stash-obfuscate-text",
|
package/dist/PageNavigation.js
CHANGED
|
@@ -20,7 +20,7 @@ import "lodash-es/camelCase";
|
|
|
20
20
|
import "lodash-es/isFinite";
|
|
21
21
|
import "lodash-es/isPlainObject";
|
|
22
22
|
import "./Icon.js";
|
|
23
|
-
import "./index-
|
|
23
|
+
import "./index-9e1095ef.js";
|
|
24
24
|
import "./Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js";
|
|
25
25
|
const E = {
|
|
26
26
|
class: "stash-page-navigation container",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageNavigation.js","sources":["../src/components/PageNavigation/PageNavigation.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import logger from '@leaflink/snitch';\n import kebabCase from 'lodash-es/kebabCase';\n import { onMounted, ref, watch } from 'vue';\n import { RouteLocationRaw, useRoute, useRouter } from 'vue-router';\n\n import Tab, { type TabProps } from '../Tab/Tab.vue';\n import Tabs from '../Tabs/Tabs.vue';\n\n defineOptions({\n name: 'll-page-navigation',\n });\n\n export interface NavItem extends Omit<TabProps, 'value'> {\n /**\n * The tab's label\n */\n label: string;\n\n /**\n * The tab's label\n */\n value?: string;\n }\n\n export interface PageNavigationProps {\n /**\n * Index of active tab (zero-based)\n * @deprecated Use v-model instead.\n */\n activeIndex?: number | string;\n\n /**\n * The currently active tab value\n */\n modelValue?: string;\n\n /**\n * Array of tabs. A `tab` is an object containing a `label` and either an `href` | `to`\n */\n items: NavItem[];\n }\n\n const props = withDefaults(defineProps<PageNavigationProps>(), {\n activeIndex: undefined,\n modelValue: '',\n });\n\n const emit =\n defineEmits<{\n /**\n * Emits the current active nav value\n */\n (e: 'update:modelValue', activeTab: string): void;\n\n /**\n * Emits the current active nav index\n * @deprecated - Use v-model instead.\n */\n (e: 'change', activeNavIndex: number): void;\n }>();\n\n if (props.activeIndex) {\n logger.info('The `activeIndex` prop is deprecated. Use `v-model` instead.');\n }\n\n const route = useRoute();\n const router = useRouter();\n\n // this ref is needed to keep track of the active tab even if v-model is not passed\n const activeTab = ref('');\n\n function onUpdateActiveTab(newActiveTab: string) {\n if (newActiveTab === activeTab.value) return;\n\n activeTab.value = newActiveTab;\n emit('update:modelValue', newActiveTab);\n }\n\n watch(() => props.modelValue, (newValue, oldValue) => {\n if (oldValue === newValue) return;\n\n // TODO: Remove this once activeIndex is removed\n const activeNavItemIndex = props.items.findIndex((item) => kebabCase(item.label) === newValue);\n emit('change', activeNavItemIndex);\n\n // Forcing updating activeTab when the component is in a keep alive state\n onUpdateActiveTab(newValue);\n });\n\n onMounted(() => {\n if (!props.items.length) return;\n\n // TODO: Remove this once activeIndex is removed\n if (props.activeIndex !== undefined) {\n const activeTabItem = props.items[props.activeIndex];\n\n onUpdateActiveTab(kebabCase(activeTabItem.label));\n\n return;\n }\n\n if (props.modelValue !== activeTab.value) {\n onUpdateActiveTab(props.modelValue);\n return;\n }\n\n if (!router) return;\n\n const itemMatchingRoute = props.items.find(item => {\n if (item?.disabled || (!item?.to && !item?.href)) return;\n\n const { path } = router.resolve(item?.to as RouteLocationRaw || item?.href as string);\n\n if (path === route.path) {\n return true;\n }\n\n if (!route.path.includes(path)) return;\n\n const sliceIndex = (route.path.length - route.path.lastIndexOf('/')) * -1;\n const parentPath = route.path.slice(0, sliceIndex);\n\n return path === parentPath;\n });\n\n if (!itemMatchingRoute) return;\n\n onUpdateActiveTab(itemMatchingRoute?.value || kebabCase(itemMatchingRoute.label));\n });\n</script>\n\n<template>\n <nav class=\"stash-page-navigation container\" data-test=\"stash-page-navigation\">\n <Tabs :active-tab=\"activeTab\" @update:active-tab=\"onUpdateActiveTab\">\n <Tab\n v-for=\"(item, index) in props.items\"\n :key=\"item.label\"\n :value=\"item?.value || kebabCase(item.label)\"\n :to=\"item.to\"\n :href=\"item.href\"\n :badge=\"item.badge\"\n :disabled=\"item.disabled\"\n :data-id=\"index\"\n >\n {{ item.label }}\n </Tab>\n </Tabs>\n </nav>\n</template>\n"],"names":["props","logger","route","useRoute","router","useRouter","activeTab","ref","onUpdateActiveTab","newActiveTab","emit","watch","newValue","oldValue","activeNavItemIndex","item","kebabCase","onMounted","activeTabItem","itemMatchingRoute","path","sliceIndex","parentPath"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8DE,IAAIA,EAAM,eACRC,EAAO,KAAK,8DAA8D;AAG5E,UAAMC,IAAQC,KACRC,IAASC,KAGTC,IAAYC,EAAI,EAAE;AAExB,aAASC,EAAkBC,GAAsB;AAC/C,MAAIA,MAAiBH,EAAU,UAE/BA,EAAU,QAAQG,GAClBC,EAAK,qBAAqBD,CAAY;AAAA,IACxC;AAEA,WAAAE,EAAM,MAAMX,EAAM,YAAY,CAACY,GAAUC,MAAa;AACpD,UAAIA,MAAaD;AAAU;AAGrB,YAAAE,IAAqBd,EAAM,MAAM,UAAU,CAACe,MAASC,EAAUD,EAAK,KAAK,MAAMH,CAAQ;AAC7F,MAAAF,EAAK,UAAUI,CAAkB,GAGjCN,EAAkBI,CAAQ;AAAA,IAAA,CAC3B,GAEDK,EAAU,MAAM;AACV,UAAA,CAACjB,EAAM,MAAM;AAAQ;AAGrB,UAAAA,EAAM,gBAAgB,QAAW;AACnC,cAAMkB,IAAgBlB,EAAM,MAAMA,EAAM,WAAW;AAEjC,QAAAQ,EAAAQ,EAAUE,EAAc,KAAK,CAAC;AAEhD;AAAA
|
|
1
|
+
{"version":3,"file":"PageNavigation.js","sources":["../src/components/PageNavigation/PageNavigation.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import logger from '@leaflink/snitch';\n import kebabCase from 'lodash-es/kebabCase';\n import { onMounted, ref, watch } from 'vue';\n import { RouteLocationRaw, useRoute, useRouter } from 'vue-router';\n\n import Tab, { type TabProps } from '../Tab/Tab.vue';\n import Tabs from '../Tabs/Tabs.vue';\n\n defineOptions({\n name: 'll-page-navigation',\n });\n\n export interface NavItem extends Omit<TabProps, 'value'> {\n /**\n * The tab's label\n */\n label: string;\n\n /**\n * The tab's label\n */\n value?: string;\n }\n\n export interface PageNavigationProps {\n /**\n * Index of active tab (zero-based)\n * @deprecated Use v-model instead.\n */\n activeIndex?: number | string;\n\n /**\n * The currently active tab value\n */\n modelValue?: string;\n\n /**\n * Array of tabs. A `tab` is an object containing a `label` and either an `href` | `to`\n */\n items: NavItem[];\n }\n\n const props = withDefaults(defineProps<PageNavigationProps>(), {\n activeIndex: undefined,\n modelValue: '',\n });\n\n const emit =\n defineEmits<{\n /**\n * Emits the current active nav value\n */\n (e: 'update:modelValue', activeTab: string): void;\n\n /**\n * Emits the current active nav index\n * @deprecated - Use v-model instead.\n */\n (e: 'change', activeNavIndex: number): void;\n }>();\n\n if (props.activeIndex) {\n logger.info('The `activeIndex` prop is deprecated. Use `v-model` instead.');\n }\n\n const route = useRoute();\n const router = useRouter();\n\n // this ref is needed to keep track of the active tab even if v-model is not passed\n const activeTab = ref('');\n\n function onUpdateActiveTab(newActiveTab: string) {\n if (newActiveTab === activeTab.value) return;\n\n activeTab.value = newActiveTab;\n emit('update:modelValue', newActiveTab);\n }\n\n watch(() => props.modelValue, (newValue, oldValue) => {\n if (oldValue === newValue) return;\n\n // TODO: Remove this once activeIndex is removed\n const activeNavItemIndex = props.items.findIndex((item) => kebabCase(item.label) === newValue);\n emit('change', activeNavItemIndex);\n\n // Forcing updating activeTab when the component is in a keep alive state\n onUpdateActiveTab(newValue);\n });\n\n onMounted(() => {\n if (!props.items.length) return;\n\n // TODO: Remove this once activeIndex is removed\n if (props.activeIndex !== undefined) {\n const activeTabItem = props.items[props.activeIndex];\n\n onUpdateActiveTab(kebabCase(activeTabItem.label));\n\n return;\n }\n\n if (props.modelValue !== activeTab.value) {\n onUpdateActiveTab(props.modelValue);\n return;\n }\n\n if (!router) return;\n\n const itemMatchingRoute = props.items.find(item => {\n if (item?.disabled || (!item?.to && !item?.href)) return;\n\n const { path } = router.resolve(item?.to as RouteLocationRaw || item?.href as string);\n\n if (path === route.path) {\n return true;\n }\n\n if (!route.path.includes(path)) return;\n\n const sliceIndex = (route.path.length - route.path.lastIndexOf('/')) * -1;\n const parentPath = route.path.slice(0, sliceIndex);\n\n return path === parentPath;\n });\n\n if (!itemMatchingRoute) return;\n\n onUpdateActiveTab(itemMatchingRoute?.value || kebabCase(itemMatchingRoute.label));\n });\n</script>\n\n<template>\n <nav class=\"stash-page-navigation container\" data-test=\"stash-page-navigation\">\n <Tabs :active-tab=\"activeTab\" @update:active-tab=\"onUpdateActiveTab\">\n <Tab\n v-for=\"(item, index) in props.items\"\n :key=\"item.label\"\n :value=\"item?.value || kebabCase(item.label)\"\n :to=\"item.to\"\n :href=\"item.href\"\n :badge=\"item.badge\"\n :disabled=\"item.disabled\"\n :data-id=\"index\"\n >\n {{ item.label }}\n </Tab>\n </Tabs>\n </nav>\n</template>\n"],"names":["props","logger","route","useRoute","router","useRouter","activeTab","ref","onUpdateActiveTab","newActiveTab","emit","watch","newValue","oldValue","activeNavItemIndex","item","kebabCase","onMounted","activeTabItem","itemMatchingRoute","path","sliceIndex","parentPath"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8DE,IAAIA,EAAM,eACRC,EAAO,KAAK,8DAA8D;AAG5E,UAAMC,IAAQC,KACRC,IAASC,KAGTC,IAAYC,EAAI,EAAE;AAExB,aAASC,EAAkBC,GAAsB;AAC/C,MAAIA,MAAiBH,EAAU,UAE/BA,EAAU,QAAQG,GAClBC,EAAK,qBAAqBD,CAAY;AAAA,IACxC;AAEA,WAAAE,EAAM,MAAMX,EAAM,YAAY,CAACY,GAAUC,MAAa;AACpD,UAAIA,MAAaD;AAAU;AAGrB,YAAAE,IAAqBd,EAAM,MAAM,UAAU,CAACe,MAASC,EAAUD,EAAK,KAAK,MAAMH,CAAQ;AAC7F,MAAAF,EAAK,UAAUI,CAAkB,GAGjCN,EAAkBI,CAAQ;AAAA,IAAA,CAC3B,GAEDK,EAAU,MAAM;AACV,UAAA,CAACjB,EAAM,MAAM;AAAQ;AAGrB,UAAAA,EAAM,gBAAgB,QAAW;AACnC,cAAMkB,IAAgBlB,EAAM,MAAMA,EAAM,WAAW;AAEjC,QAAAQ,EAAAQ,EAAUE,EAAc,KAAK,CAAC;AAEhD;AAAA;AAGE,UAAAlB,EAAM,eAAeM,EAAU,OAAO;AACxC,QAAAE,EAAkBR,EAAM,UAAU;AAClC;AAAA;AAGF,UAAI,CAACI;AAAQ;AAEb,YAAMe,IAAoBnB,EAAM,MAAM,KAAK,CAAQe,MAAA;AACjD,YAAIA,KAAA,QAAAA,EAAM,YAAa,EAACA,KAAA,QAAAA,EAAM,OAAM,EAACA,KAAA,QAAAA,EAAM;AAAO;AAE5C,cAAA,EAAE,MAAAK,EAAS,IAAAhB,EAAO,SAAQW,KAAA,gBAAAA,EAAM,QAA0BA,KAAA,gBAAAA,EAAM,KAAc;AAEhF,YAAAK,MAASlB,EAAM;AACV,iBAAA;AAGT,YAAI,CAACA,EAAM,KAAK,SAASkB,CAAI;AAAG;AAE1B,cAAAC,KAAcnB,EAAM,KAAK,SAASA,EAAM,KAAK,YAAY,GAAG,KAAK,IACjEoB,IAAapB,EAAM,KAAK,MAAM,GAAGmB,CAAU;AAEjD,eAAOD,MAASE;AAAA,MAAA,CACjB;AAED,MAAKH,KAELX,GAAkBW,KAAA,gBAAAA,EAAmB,UAASH,EAAUG,EAAkB,KAAK,CAAC;AAAA,IAAA,CACjF;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/Paginate.js
CHANGED
|
@@ -3,7 +3,7 @@ import m from "./Icon.js";
|
|
|
3
3
|
import { s as M } from "./Paginate.vue_used_vue_type_style_index_0_lang.module-18343da7.js";
|
|
4
4
|
import { _ as E } from "./_plugin-vue_export-helper-dad06003.js";
|
|
5
5
|
import "lodash-es/uniqueId";
|
|
6
|
-
import "./index-
|
|
6
|
+
import "./index-9e1095ef.js";
|
|
7
7
|
import "./Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js";
|
|
8
8
|
const L = {
|
|
9
9
|
class: "stash-paginate tw-flex tw-justify-center",
|
package/dist/PlaidLink.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlaidLink.js","sources":["../src/components/PlaidLink/PlaidLink.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import logger from '@leaflink/snitch';\n import { computed, ref } from 'vue';\n\n import { LinkTokenResponse, Plaid } from '../../../types/plaid';\n import usePlaidLink from '../../composables/usePlaidLink/usePlaidLink';\n\n export interface PlaidLinkProps {\n /**\n * @deprecated Plaid does not support other URLs for loading its SDK\n * Plaid initialization script url to be used\n */\n initScriptUrl?: string;\n\n /**\n * Key to be used in session storage for OAuth flow\n */\n storageKey?: string;\n\n /**\n * Url to be used to redirect the user from the OAuth flow\n */\n returnTo?: string;\n\n /**\n * Plaid link token\n */\n token?: string;\n\n /**\n * Plaid environment to connect\n */\n env?: Plaid.Environment;\n\n /**\n * Function that returns a link token object to be used with Plaid.\n * `link_token` takes precedence over `token` if informed.\n */\n createToken?: () => Promise<LinkTokenResponse>;\n }\n\n const props = withDefaults(defineProps<PlaidLinkProps>(), {\n initScriptUrl: 'https://cdn.plaid.com/link/v2/stable/link-initialize.js',\n storageKey: undefined,\n returnTo: window.location.href,\n env: 'sandbox',\n token: undefined,\n createToken: undefined,\n });\n\n const internalStorageKey = computed(() => {\n if (props.storageKey) {\n return props.storageKey;\n }\n\n // returns up to the last 3 parts of the host. e.g. for `subdomain.my.domain.com` it will return `my.domain.com`\n const host = window.location.host.split('.').splice(-3).join('.');\n\n return `${host}-plaid`;\n });\n\n const emit =\n defineEmits<{\n /**\n * Emitted whenever the exit event contains errors\n */\n (e: 'error', error: Plaid.Error | null | Error, metadata?: Plaid.OnExitMetaData): void;\n /**\n * Emitted whenever the user successfully links an item\n */\n (e: 'success', public_token: string, metadata: Plaid.OnSuccessMetaData): void;\n /**\n * Emitted whenever the user exits the Link flow\n */\n (e: 'exit', metadata: Plaid.OnExitMetaData): void;\n /**\n * Emitted when the Link is ready to be opened\n */\n (e: 'load'): void;\n /**\n * Emitted at specific points during the Link flow\n */\n (e: 'event', eventName: Plaid.EventName, metadata: Plaid.OnEventMetaData): void;\n }>();\n\n const isPlaidModalOpen = ref(false);\n\n const onExit: Plaid.OnExit = (error: Plaid.Error | null, metadata: Plaid.OnExitMetaData) => {\n isPlaidModalOpen.value = false;\n\n if (error) {\n logger.error(new Error('Plaid: Error trying to link an account'), {\n tags: { plaid: true },\n extra: { PlaidError: error },\n });\n emit('error', error, metadata);\n }\n\n sessionStorage.removeItem(internalStorageKey.value);\n\n emit('exit', metadata);\n };\n\n const onSuccess: Plaid.OnSuccess = (public_token: string, metadata: Plaid.OnSuccessMetaData) => {\n isPlaidModalOpen.value = false;\n\n sessionStorage.removeItem(internalStorageKey.value);\n\n emit('success', public_token, metadata);\n };\n\n const onLoad: Plaid.OnLoad = (...args) => emit('load', ...args);\n\n const onEvent: Plaid.OnEvent = (...args) => emit('event', ...args);\n\n const plaidLinkOptions = ref<Plaid.CreateConfig>({\n env: props.env,\n onSuccess,\n onEvent,\n onLoad,\n onExit,\n });\n\n const { open: openPlaidLink } = usePlaidLink(plaidLinkOptions);\n\n async function handleClick() {\n if (isPlaidModalOpen.value === true) {\n return;\n }\n\n isPlaidModalOpen.value = true;\n\n if (typeof props.createToken === 'function') {\n try {\n const { link_token } = await props.createToken();\n\n plaidLinkOptions.value.token = link_token;\n } catch (err) {\n const error = new Error('Plaid: Error trying to invoke createToken');\n\n logger.error(error, {\n tags: { plaid: true },\n extra: { error: err },\n });\n\n emit('error', error);\n }\n } else if (props.token) {\n plaidLinkOptions.value.token = props.token;\n }\n\n if (!plaidLinkOptions.value.token) {\n const error = new Error('Plaid: link token not found');\n\n logger.error(error, { tags: { plaid: true } });\n emit('error', error);\n\n isPlaidModalOpen.value = false;\n\n return;\n }\n\n sessionStorage.setItem(\n internalStorageKey.value,\n JSON.stringify({ token: plaidLinkOptions.value.token, returnTo: props.returnTo, env: props.env }),\n );\n\n openPlaidLink();\n }\n\n defineExpose({\n handleClick,\n });\n</script>\n\n<template>\n <span data-test=\"stash-plaid-link\" @click=\"handleClick\">\n <!-- @slot Default slot to trigger Plaid's modal -->\n <slot :open=\"isPlaidModalOpen\"></slot>\n </span>\n</template>\n"],"names":["internalStorageKey","computed","props","isPlaidModalOpen","ref","onExit","error","metadata","logger","emit","onSuccess","public_token","onLoad","args","onEvent","plaidLinkOptions","openPlaidLink","usePlaidLink","handleClick","link_token","err","__expose"],"mappings":";;;;;;;;;;;;;;;;iBAkDQA,IAAqBC,EAAS,MAC9BC,EAAM,aACDA,EAAM,aAMR,GAFM,OAAO,SAAS,KAAK,MAAM,GAAG,EAAE,OAAO,EAAE,EAAE,KAAK,GAAG,
|
|
1
|
+
{"version":3,"file":"PlaidLink.js","sources":["../src/components/PlaidLink/PlaidLink.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import logger from '@leaflink/snitch';\n import { computed, ref } from 'vue';\n\n import { LinkTokenResponse, Plaid } from '../../../types/plaid';\n import usePlaidLink from '../../composables/usePlaidLink/usePlaidLink';\n\n export interface PlaidLinkProps {\n /**\n * @deprecated Plaid does not support other URLs for loading its SDK\n * Plaid initialization script url to be used\n */\n initScriptUrl?: string;\n\n /**\n * Key to be used in session storage for OAuth flow\n */\n storageKey?: string;\n\n /**\n * Url to be used to redirect the user from the OAuth flow\n */\n returnTo?: string;\n\n /**\n * Plaid link token\n */\n token?: string;\n\n /**\n * Plaid environment to connect\n */\n env?: Plaid.Environment;\n\n /**\n * Function that returns a link token object to be used with Plaid.\n * `link_token` takes precedence over `token` if informed.\n */\n createToken?: () => Promise<LinkTokenResponse>;\n }\n\n const props = withDefaults(defineProps<PlaidLinkProps>(), {\n initScriptUrl: 'https://cdn.plaid.com/link/v2/stable/link-initialize.js',\n storageKey: undefined,\n returnTo: window.location.href,\n env: 'sandbox',\n token: undefined,\n createToken: undefined,\n });\n\n const internalStorageKey = computed(() => {\n if (props.storageKey) {\n return props.storageKey;\n }\n\n // returns up to the last 3 parts of the host. e.g. for `subdomain.my.domain.com` it will return `my.domain.com`\n const host = window.location.host.split('.').splice(-3).join('.');\n\n return `${host}-plaid`;\n });\n\n const emit =\n defineEmits<{\n /**\n * Emitted whenever the exit event contains errors\n */\n (e: 'error', error: Plaid.Error | null | Error, metadata?: Plaid.OnExitMetaData): void;\n /**\n * Emitted whenever the user successfully links an item\n */\n (e: 'success', public_token: string, metadata: Plaid.OnSuccessMetaData): void;\n /**\n * Emitted whenever the user exits the Link flow\n */\n (e: 'exit', metadata: Plaid.OnExitMetaData): void;\n /**\n * Emitted when the Link is ready to be opened\n */\n (e: 'load'): void;\n /**\n * Emitted at specific points during the Link flow\n */\n (e: 'event', eventName: Plaid.EventName, metadata: Plaid.OnEventMetaData): void;\n }>();\n\n const isPlaidModalOpen = ref(false);\n\n const onExit: Plaid.OnExit = (error: Plaid.Error | null, metadata: Plaid.OnExitMetaData) => {\n isPlaidModalOpen.value = false;\n\n if (error) {\n logger.error(new Error('Plaid: Error trying to link an account'), {\n tags: { plaid: true },\n extra: { PlaidError: error },\n });\n emit('error', error, metadata);\n }\n\n sessionStorage.removeItem(internalStorageKey.value);\n\n emit('exit', metadata);\n };\n\n const onSuccess: Plaid.OnSuccess = (public_token: string, metadata: Plaid.OnSuccessMetaData) => {\n isPlaidModalOpen.value = false;\n\n sessionStorage.removeItem(internalStorageKey.value);\n\n emit('success', public_token, metadata);\n };\n\n const onLoad: Plaid.OnLoad = (...args) => emit('load', ...args);\n\n const onEvent: Plaid.OnEvent = (...args) => emit('event', ...args);\n\n const plaidLinkOptions = ref<Plaid.CreateConfig>({\n env: props.env,\n onSuccess,\n onEvent,\n onLoad,\n onExit,\n });\n\n const { open: openPlaidLink } = usePlaidLink(plaidLinkOptions);\n\n async function handleClick() {\n if (isPlaidModalOpen.value === true) {\n return;\n }\n\n isPlaidModalOpen.value = true;\n\n if (typeof props.createToken === 'function') {\n try {\n const { link_token } = await props.createToken();\n\n plaidLinkOptions.value.token = link_token;\n } catch (err) {\n const error = new Error('Plaid: Error trying to invoke createToken');\n\n logger.error(error, {\n tags: { plaid: true },\n extra: { error: err },\n });\n\n emit('error', error);\n }\n } else if (props.token) {\n plaidLinkOptions.value.token = props.token;\n }\n\n if (!plaidLinkOptions.value.token) {\n const error = new Error('Plaid: link token not found');\n\n logger.error(error, { tags: { plaid: true } });\n emit('error', error);\n\n isPlaidModalOpen.value = false;\n\n return;\n }\n\n sessionStorage.setItem(\n internalStorageKey.value,\n JSON.stringify({ token: plaidLinkOptions.value.token, returnTo: props.returnTo, env: props.env }),\n );\n\n openPlaidLink();\n }\n\n defineExpose({\n handleClick,\n });\n</script>\n\n<template>\n <span data-test=\"stash-plaid-link\" @click=\"handleClick\">\n <!-- @slot Default slot to trigger Plaid's modal -->\n <slot :open=\"isPlaidModalOpen\"></slot>\n </span>\n</template>\n"],"names":["internalStorageKey","computed","props","isPlaidModalOpen","ref","onExit","error","metadata","logger","emit","onSuccess","public_token","onLoad","args","onEvent","plaidLinkOptions","openPlaidLink","usePlaidLink","handleClick","link_token","err","__expose"],"mappings":";;;;;;;;;;;;;;;;iBAkDQA,IAAqBC,EAAS,MAC9BC,EAAM,aACDA,EAAM,aAMR,GAFM,OAAO,SAAS,KAAK,MAAM,GAAG,EAAE,OAAO,EAAE,EAAE,KAAK,GAAG,SAGjE,GA0BKC,IAAmBC,EAAI,EAAK,GAE5BC,IAAuB,CAACC,GAA2BC,MAAmC;AAC1F,MAAAJ,EAAiB,QAAQ,IAErBG,MACFE,EAAO,MAAM,IAAI,MAAM,wCAAwC,GAAG;AAAA,QAChE,MAAM,EAAE,OAAO,GAAK;AAAA,QACpB,OAAO,EAAE,YAAYF,EAAM;AAAA,MAAA,CAC5B,GACIG,EAAA,SAASH,GAAOC,CAAQ,IAGhB,eAAA,WAAWP,EAAmB,KAAK,GAElDS,EAAK,QAAQF,CAAQ;AAAA,IAAA,GAGjBG,IAA6B,CAACC,GAAsBJ,MAAsC;AAC9F,MAAAJ,EAAiB,QAAQ,IAEV,eAAA,WAAWH,EAAmB,KAAK,GAE7CS,EAAA,WAAWE,GAAcJ,CAAQ;AAAA,IAAA,GAGlCK,IAAuB,IAAIC,MAASJ,EAAK,QAAQ,GAAGI,CAAI,GAExDC,IAAyB,IAAID,MAASJ,EAAK,SAAS,GAAGI,CAAI,GAE3DE,IAAmBX,EAAwB;AAAA,MAC/C,KAAKF,EAAM;AAAA,MACX,WAAAQ;AAAA,MACA,SAAAI;AAAA,MACA,QAAAF;AAAA,MACA,QAAAP;AAAA,IAAA,CACD,GAEK,EAAE,MAAMW,EAAc,IAAIC,EAAaF,CAAgB;AAE7D,mBAAeG,IAAc;AACvB,UAAAf,EAAiB,UAAU,IAM3B;AAAA,YAFJA,EAAiB,QAAQ,IAErB,OAAOD,EAAM,eAAgB;AAC3B,cAAA;AACF,kBAAM,EAAE,YAAAiB,EAAe,IAAA,MAAMjB,EAAM,YAAY;AAE/C,YAAAa,EAAiB,MAAM,QAAQI;AAAA,mBACxBC;AACD,kBAAAd,IAAQ,IAAI,MAAM,2CAA2C;AAEnE,YAAAE,EAAO,MAAMF,GAAO;AAAA,cAClB,MAAM,EAAE,OAAO,GAAK;AAAA,cACpB,OAAO,EAAE,OAAOc,EAAI;AAAA,YAAA,CACrB,GAEDX,EAAK,SAASH,CAAK;AAAA,UACrB;AAAA;AACF,UAAWJ,EAAM,UACEa,EAAA,MAAM,QAAQb,EAAM;AAGnC,YAAA,CAACa,EAAiB,MAAM,OAAO;AAC3B,gBAAAT,IAAQ,IAAI,MAAM,6BAA6B;AAE9C,UAAAE,EAAA,MAAMF,GAAO,EAAE,MAAM,EAAE,OAAO,MAAQ,GAC7CG,EAAK,SAASH,CAAK,GAEnBH,EAAiB,QAAQ;AAEzB;AAAA;AAGa,uBAAA;AAAA,UACbH,EAAmB;AAAA,UACnB,KAAK,UAAU,EAAE,OAAOe,EAAiB,MAAM,OAAO,UAAUb,EAAM,UAAU,KAAKA,EAAM,KAAK;AAAA,QAAA,GAGpFc;;IAChB;AAEa,WAAAK,EAAA;AAAA,MACX,aAAAH;AAAA,IAAA,CACD;;;;;;;;"}
|
package/dist/QuickAction.js
CHANGED
|
@@ -2,7 +2,7 @@ import { defineComponent as u, useCssModule as _, computed as o, openBlock as d,
|
|
|
2
2
|
import n from "./Icon.js";
|
|
3
3
|
import { _ as x } from "./_plugin-vue_export-helper-dad06003.js";
|
|
4
4
|
import "lodash-es/uniqueId";
|
|
5
|
-
import "./index-
|
|
5
|
+
import "./index-9e1095ef.js";
|
|
6
6
|
import "./Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js";
|
|
7
7
|
const b = { class: "tw-flex tw-items-center tw-gap-3" }, k = { class: "tw-flex tw-items-center tw-justify-center tw-rounded tw-bg-blue-100 tw-p-3" }, v = { class: "tw-flex-1" }, g = { class: "tw-text-blue-500" }, y = { class: "tw-text-xs tw-font-normal tw-text-ice-700 lg:tw-mb-0" }, C = /* @__PURE__ */ u({
|
|
8
8
|
__name: "QuickAction",
|
package/dist/RadioNew.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioNew.js","sources":["../src/components/RadioNew/components/VariantButton.vue","../src/components/RadioNew/components/VariantChip.vue","../src/components/RadioNew/components/VariantRadio.vue","../src/components/RadioNew/components/VariantTile.vue","../src/components/RadioNew/Radio.types.ts","../src/components/RadioNew/RadioNew.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { useCssModule } from 'vue';\n\n export interface RadioVariantProps {\n /**\n * Whether the input 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 * A unique string to distinguish one Radio instance from another\n * and to link the label to the input; required for accessibility\n */\n id: string | number;\n\n /**\n * The description which appears to the right of the radio button\n */\n label?: string;\n\n /**\n * value bound to the parent component\n */\n modelValue?: string | undefined;\n\n /**\n * Passed to the \"name\" attribute of the `<input>` element.\n */\n name?: string;\n\n /**\n * The value for the radio input.\n */\n value: string;\n }\n\n const props = defineProps<RadioVariantProps>();\n const classes = useCssModule();\n\n const emit =\n defineEmits<{\n (e: 'input', event: Event): void;\n }>();\n</script>\n\n<template>\n <div :class=\"[classes.root, { 'tw-w-full': props.fullWidth }]\">\n <input\n :id=\"`${props.name}-${props.id}`\"\n class=\"tw-sr-only\"\n :class=\"classes.input\"\n type=\"radio\"\n :name=\"props.name\"\n :value=\"props.value\"\n :checked=\"props.modelValue === props.value\"\n :disabled=\"props.disabled || props.disabled\"\n @input=\"emit('input', $event)\"\n />\n <label :class=\"classes.label\" :for=\"`${props.name}-${props.id}`\">\n {{ props.label }}\n </label>\n </div>\n</template>\n\n<style module>\n .label {\n padding: 8px 30px;\n border: 1px solid var(--color-ice-500);\n font-weight: theme('fontWeight.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:first-of-type .label {\n border-top-left-radius: theme('borderRadius.DEFAULT');\n border-bottom-left-radius: theme('borderRadius.DEFAULT');\n }\n\n .root:last-of-type .label {\n border-top-right-radius: theme('borderRadius.DEFAULT');\n border-bottom-right-radius: theme('borderRadius.DEFAULT');\n }\n\n .root:not(:first-of-type) .label {\n margin-left: -1px;\n }\n\n .root:not(:last-of-type) .label {\n border-right-color: transparent;\n }\n\n .input:disabled ~ .label {\n background-color: var(--color-ice-100);\n color: var(--color-ice-500);\n cursor: auto;\n }\n\n .input:not(:checked, :disabled) ~ .label:hover {\n border-color: var(--color-blue-500);\n color: var(--color-blue-500);\n z-index: 1;\n position: relative;\n }\n\n .input:checked:not(:disabled) ~ .label {\n border-color: var(--color-blue-500);\n color: var(--color-blue-500);\n background-color: var(--color-blue-100);\n z-index: 1;\n position: relative;\n }\n</style>\n","<script setup lang=\"ts\">\n import { useCssModule } from 'vue';\n\n export interface RadioVariantProps {\n /**\n * Whether the input 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 * A unique string to distinguish one Radio instance from another\n * and to link the label to the input; required for accessibility\n */\n id: string | number;\n\n /**\n * The description which appears to the right of the radio button\n */\n label?: string;\n\n /**\n * value bound to the parent component\n */\n modelValue?: string | undefined;\n\n /**\n * Passed to the \"name\" attribute of the `<input>` element.\n */\n name?: string;\n\n /**\n * The value for the radio input.\n */\n value: string;\n }\n\n const props = defineProps<RadioVariantProps>();\n const classes = useCssModule();\n\n const emit =\n defineEmits<{\n (e: 'input', event: Event): void;\n }>();\n</script>\n\n<template>\n <div :class=\"[classes.root, { 'tw-w-full': props.fullWidth }]\">\n <input\n :id=\"`${props.name}-${props.id}`\"\n class=\"tw-sr-only\"\n :class=\"classes.input\"\n type=\"radio\"\n :name=\"props.name\"\n :value=\"props.value\"\n :checked=\"props.modelValue === props.value\"\n :disabled=\"props.disabled || props.disabled\"\n @input=\"emit('input', $event)\"\n />\n <label :class=\"classes.label\" :for=\"`${props.name}-${props.id}`\">\n {{ props.label }}\n </label>\n </div>\n</template>\n\n<style module>\n .label {\n display: inline-block;\n padding: theme('spacing.1') theme('spacing.3');\n border: 1px solid var(--color-ice-500);\n font-weight: theme('fontWeight.normal');\n line-height: 1.375rem;\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 .input:disabled ~ .label {\n background-color: var(--color-ice-100);\n color: var(--color-ice-500);\n cursor: auto;\n }\n\n .input:checked:not(:disabled) ~ .label {\n border-color: var(--color-blue-500);\n color: theme('colors.white');\n background-color: var(--color-blue-500);\n font-weight: theme('fontWeight.bold');\n }\n\n .input:not(:checked, :disabled) ~ .label:hover {\n border-color: var(--color-blue-500);\n }\n</style>\n","<script setup lang=\"ts\">\n import { useCssModule } from 'vue';\n\n export interface RadioVariantProps {\n /**\n * Whether the input 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 * A unique string to distinguish one Radio instance from another\n * and to link the label to the input; required for accessibility\n */\n id: string | number;\n\n /**\n * The description which appears to the right of the radio button\n */\n label?: string;\n\n /**\n * value bound to the parent component\n */\n modelValue?: string | undefined;\n\n /**\n * Passed to the \"name\" attribute of the `<input>` element.\n */\n name?: string;\n\n /**\n * The value for the radio input.\n */\n value: string;\n }\n\n const props = defineProps<RadioVariantProps>();\n const classes = useCssModule();\n\n const emit =\n defineEmits<{\n (e: 'input', event: Event): void;\n }>();\n</script>\n\n<template>\n <div class=\"tw-flex\" :class=\"[classes.root, { 'tw-w-full': props.fullWidth }]\">\n <input\n :id=\"`${props.name}-${props.id}`\"\n :class=\"classes.input\"\n type=\"radio\"\n :name=\"props.name\"\n :value=\"props.value\"\n :checked=\"props.modelValue === props.value\"\n :disabled=\"props.disabled\"\n @input=\"emit('input', $event)\"\n />\n <label\n v-show=\"props.label\"\n :class=\"[classes.label, { 'tw-text-ice-500': props.disabled }]\"\n :for=\"`${props.name}-${props.id}`\"\n >\n {{ props.label }}\n </label>\n </div>\n</template>\n\n<style module>\n .label {\n font-weight: theme('fontWeight.medium');\n user-select: none;\n cursor: pointer;\n padding: 0 theme('spacing.3');\n }\n\n .input {\n appearance: none;\n border-radius: 50%;\n min-width: 20px;\n width: 20px;\n height: 20px;\n border: 1px solid var(--color-ice-500);\n transition: all 0.2s;\n position: relative;\n cursor: pointer;\n }\n\n .input:checked {\n background-image: radial-gradient(var(--color-blue-500) 50%, transparent 54%);\n }\n\n .input:disabled {\n background-image: radial-gradient(var(--color-ice-100) 100%, var(--color-ice-100) 100%);\n }\n\n .input:disabled:checked {\n background-image: radial-gradient(var(--color-ice-500) 50%, var(--color-ice-100) 54%);\n }\n\n .input:hover:not(:disabled) {\n border-color: var(--color-blue-500);\n }\n\n .input:disabled ~ .label {\n cursor: auto;\n }\n\n .input:hover:not(:disabled) ~ .label {\n color: var(--color-ice-900);\n }\n\n .input:not(:disabled) ~ .label:hover {\n color: var(--color-ice-900);\n }\n</style>\n","<script setup lang=\"ts\">\n import { useCssModule } from 'vue';\n\n export interface RadioVariantProps {\n /**\n * Whether the input 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 * A unique string to distinguish one Radio instance from another\n * and to link the label to the input; required for accessibility\n */\n id: string | number;\n\n /**\n * The description which appears to the right of the radio button\n */\n label?: string;\n\n /**\n * value bound to the parent component\n */\n modelValue?: string | undefined;\n\n /**\n * Passed to the \"name\" attribute of the `<input>` element.\n */\n name?: string;\n\n /**\n * The value for the radio input.\n */\n value: string;\n }\n\n const props = defineProps<RadioVariantProps>();\n const classes = useCssModule();\n\n const emit =\n defineEmits<{\n (e: 'input', event: Event): void;\n }>();\n</script>\n\n<template>\n <label\n :class=\"[classes.root, { 'tw-w-full': props.fullWidth, [classes['root--disabled']]: props.disabled }]\"\n :for=\"`${props.name}-${props.id}`\"\n >\n <div\n class=\"tw-flex tw-border\"\n :class=\"[\n classes['tile-header'],\n {\n 'tw-border-blue-500 tw-bg-blue-100': props.modelValue === props.value && !props.disabled,\n 'tw-border-ice-500 tw-bg-ice-100': props.modelValue !== props.value || props.disabled,\n },\n ]\"\n >\n <input\n :id=\"`${props.name}-${props.id}`\"\n :aria-labelledby=\"`tile-label-${props.name}-${props.id}`\"\n class=\"tw-sr-only\"\n :class=\"classes.input\"\n type=\"radio\"\n :name=\"props.name\"\n :value=\"props.value\"\n :checked=\"props.modelValue === props.value\"\n :disabled=\"props.disabled\"\n @input=\"emit('input', $event)\"\n />\n <div :id=\"`tile-label-${props.name}-${props.id}`\" :class=\"[classes.label, { 'tw-text-ice-500': props.disabled }]\">\n {{ props.label }}\n </div>\n </div>\n <div\n :class=\"[\n classes['tile-body'],\n {\n 'tw-border-ice-500': props.modelValue !== props.value || props.disabled,\n 'tw-border-blue-500': props.modelValue === props.value && !props.disabled,\n },\n ]\"\n >\n <slot></slot>\n </div>\n </label>\n</template>\n\n<style module>\n .root {\n border-radius: theme('borderRadius.DEFAULT');\n cursor: pointer;\n display: flex;\n flex: 1;\n flex-direction: column;\n user-select: none;\n }\n\n .root--disabled {\n cursor: auto;\n }\n\n .tile-header,\n .tile-body {\n transition: all 0.2s;\n }\n\n .tile-header {\n border-radius: theme('borderRadius.DEFAULT') theme('borderRadius.DEFAULT') 0 0;\n padding: theme('spacing.3') 0;\n }\n\n .root:hover:not(.root--disabled) .tile-header {\n background-color: var(--color-blue-100) !important;\n border-color: var(--color-blue-500) !important;\n color: var(--color-ice-900) !important;\n transition: all 0.2s;\n }\n\n .label {\n font-weight: theme('fontWeight.medium');\n user-select: none;\n cursor: pointer;\n padding: 0 theme('spacing.3');\n }\n\n .input {\n appearance: none;\n background-color: theme('colors.white');\n border-radius: 50%;\n width: 20px;\n height: 20px;\n border: 1px solid var(--color-ice-500);\n transition: all 0.2s;\n position: relative;\n cursor: pointer;\n top: 2px;\n margin-left: theme('spacing.3');\n }\n\n .input:checked {\n background-image: radial-gradient(var(--color-blue-500) 50%, transparent 54%);\n }\n\n .input:disabled:checked {\n background-image: radial-gradient(var(--color-ice-500) 50%, var(--color-ice-100) 54%);\n }\n\n .tile-body {\n border-radius: 0 0 theme('borderRadius.DEFAULT') theme('borderRadius.DEFAULT');\n border-width: 0 1px 1px 1px;\n background-color: theme('colors.white');\n padding: theme('spacing.6');\n display: flex;\n flex-direction: column;\n }\n\n .root:hover:not(.root--disabled) .tile-body {\n border-color: var(--color-blue-500) !important;\n transition: all 0.2s;\n }\n</style>\n","export enum RadioVariant {\n Radio = 'radio',\n Button = 'button',\n Chip = 'chip',\n Tile = 'tile',\n}\n\nexport type RadioVariants = `${RadioVariant}`;\n","<script lang=\"ts\">\n export * from './Radio.types';\n\n export interface RadioProps {\n /**\n * Passed to the \"name\" attribute of the `<input>` element.\n */\n name?: string;\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 * A unique string to distinguish one Radio instance from another\n * and to link the label to the input; required for accessibility\n */\n id: string | number;\n\n /**\n * value bound to the parent component\n */\n modelValue?: string | undefined;\n\n /**\n * Adds error styling\n */\n hasError?: boolean;\n\n /**\n * The description which appears to the right of the radio button\n */\n label?: string;\n\n /**\n * the styling for the radio button @defaultValue 'radio'\n */\n variant?: RadioVariants;\n\n /**\n * The value for the radio input.\n */\n value: string;\n }\n</script>\n\n<script setup lang=\"ts\">\n import { computed, inject } from 'vue';\n\n import { RADIO_GROUP_INJECTION } from '../RadioGroup/RadioGroup.keys';\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 { RadioVariant, RadioVariants } from './Radio.types';\n\n const variantComponentsMap = {\n [RadioVariant.Button]: VariantButton,\n [RadioVariant.Chip]: VariantChip,\n [RadioVariant.Radio]: VariantRadio,\n [RadioVariant.Tile]: VariantTile,\n };\n\n const radioGroupInjection = inject(RADIO_GROUP_INJECTION.key, null);\n\n const props = withDefaults(defineProps<RadioProps>(), {\n disabled: false,\n fullWidth: false,\n hasError: false,\n id: undefined,\n label: '',\n modelValue: undefined,\n name: undefined,\n variant: undefined,\n });\n\n /**\n * use prop values but fallback to radio group context values if they are provided\n */\n const derivedModelValue = computed(() => props.modelValue || radioGroupInjection?.modelValue.value);\n const derivedName = computed(() => props.name || radioGroupInjection?.name.value);\n const derivedNameFullWidth = computed(() => props.fullWidth || radioGroupInjection?.fullWidth.value);\n const derivedDisabled = computed(() => props.disabled || radioGroupInjection?.disabled.value);\n const derivedVariant = computed<RadioVariants>(() => props.variant || radioGroupInjection?.variant.value || 'radio');\n\n const emit =\n defineEmits<{\n (e: 'update:modelValue', value: RadioProps['value']): void;\n }>();\n\n function onInput(e: Event) {\n if (radioGroupInjection?.update) {\n radioGroupInjection.update(e);\n\n return;\n }\n\n emit('update:modelValue', (e.target as HTMLInputElement).value);\n }\n</script>\n\n<template>\n <component\n :is=\"variantComponentsMap[derivedVariant]\"\n :id=\"props.id\"\n :disabled=\"derivedDisabled\"\n :has-error=\"props.hasError\"\n :full-width=\"derivedNameFullWidth\"\n :label=\"props.label\"\n :model-value=\"derivedModelValue\"\n :name=\"derivedName\"\n :value=\"props.value\"\n @input=\"onInput\"\n >\n <slot></slot>\n </component>\n</template>\n"],"names":["classes","useCssModule","RadioVariant","variantComponentsMap","VariantButton","VariantChip","VariantRadio","VariantTile","radioGroupInjection","inject","RADIO_GROUP_INJECTION","derivedModelValue","computed","props","derivedName","derivedNameFullWidth","derivedDisabled","derivedVariant","onInput","e","emit"],"mappings":";;;;;;;;;;;;;;;;iBA0CQA,IAAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBCAVD,IAAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBCAVD,IAAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBCAVD,IAAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC1CN,IAAAC,sBAAAA,OACVA,EAAA,QAAQ,SACRA,EAAA,SAAS,UACTA,EAAA,OAAO,QACPA,EAAA,OAAO,QAJGA,IAAAA,KAAA,CAAA,CAAA;;;;;;;;;;;;;;;;iBC8DJC,IAAuB;AAAA,MAC3B,CAACD,EAAa,MAAM,GAAGE;AAAA,MACvB,CAACF,EAAa,IAAI,GAAGG;AAAA,MACrB,CAACH,EAAa,KAAK,GAAGI;AAAA,MACtB,CAACJ,EAAa,IAAI,GAAGK;AAAA,IAAA,GAGjBC,IAAsBC,EAAOC,EAAsB,KAAK,IAAI,GAgB5DC,IAAoBC,EAAS,MAAMC,EAAM,eAAcL,KAAA,gBAAAA,EAAqB,WAAW,MAAK,GAC5FM,IAAcF,EAAS,MAAMC,EAAM,SAAQL,KAAA,gBAAAA,EAAqB,KAAK,MAAK,GAC1EO,IAAuBH,EAAS,MAAMC,EAAM,cAAaL,KAAA,gBAAAA,EAAqB,UAAU,MAAK,GAC7FQ,IAAkBJ,EAAS,MAAMC,EAAM,aAAYL,KAAA,gBAAAA,EAAqB,SAAS,MAAK,GACtFS,IAAiBL,EAAwB,MAAMC,EAAM,YAAWL,KAAA,gBAAAA,EAAqB,QAAQ,UAAS,OAAO;AAOnH,aAASU,EAAQC,GAAU;AACzB,UAAIX,KAAA,QAAAA,EAAqB,QAAQ;AAC/B,QAAAA,EAAoB,OAAOW,CAAC;AAE5B;AAAA,MACF;AAEK,MAAAC,EAAA,qBAAsBD,EAAE,OAA4B,KAAK;AAAA,IAChE;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"RadioNew.js","sources":["../src/components/RadioNew/components/VariantButton.vue","../src/components/RadioNew/components/VariantChip.vue","../src/components/RadioNew/components/VariantRadio.vue","../src/components/RadioNew/components/VariantTile.vue","../src/components/RadioNew/Radio.types.ts","../src/components/RadioNew/RadioNew.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { useCssModule } from 'vue';\n\n export interface RadioVariantProps {\n /**\n * Whether the input 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 * A unique string to distinguish one Radio instance from another\n * and to link the label to the input; required for accessibility\n */\n id: string | number;\n\n /**\n * The description which appears to the right of the radio button\n */\n label?: string;\n\n /**\n * value bound to the parent component\n */\n modelValue?: string | undefined;\n\n /**\n * Passed to the \"name\" attribute of the `<input>` element.\n */\n name?: string;\n\n /**\n * The value for the radio input.\n */\n value: string;\n }\n\n const props = defineProps<RadioVariantProps>();\n const classes = useCssModule();\n\n const emit =\n defineEmits<{\n (e: 'input', event: Event): void;\n }>();\n</script>\n\n<template>\n <div :class=\"[classes.root, { 'tw-w-full': props.fullWidth }]\">\n <input\n :id=\"`${props.name}-${props.id}`\"\n class=\"tw-sr-only\"\n :class=\"classes.input\"\n type=\"radio\"\n :name=\"props.name\"\n :value=\"props.value\"\n :checked=\"props.modelValue === props.value\"\n :disabled=\"props.disabled || props.disabled\"\n @input=\"emit('input', $event)\"\n />\n <label :class=\"classes.label\" :for=\"`${props.name}-${props.id}`\">\n {{ props.label }}\n </label>\n </div>\n</template>\n\n<style module>\n .label {\n padding: 8px 30px;\n border: 1px solid var(--color-ice-500);\n font-weight: theme('fontWeight.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:first-of-type .label {\n border-top-left-radius: theme('borderRadius.DEFAULT');\n border-bottom-left-radius: theme('borderRadius.DEFAULT');\n }\n\n .root:last-of-type .label {\n border-top-right-radius: theme('borderRadius.DEFAULT');\n border-bottom-right-radius: theme('borderRadius.DEFAULT');\n }\n\n .root:not(:first-of-type) .label {\n margin-left: -1px;\n }\n\n .root:not(:last-of-type) .label {\n border-right-color: transparent;\n }\n\n .input:disabled ~ .label {\n background-color: var(--color-ice-100);\n color: var(--color-ice-500);\n cursor: auto;\n }\n\n .input:not(:checked, :disabled) ~ .label:hover {\n border-color: var(--color-blue-500);\n color: var(--color-blue-500);\n z-index: 1;\n position: relative;\n }\n\n .input:checked:not(:disabled) ~ .label {\n border-color: var(--color-blue-500);\n color: var(--color-blue-500);\n background-color: var(--color-blue-100);\n z-index: 1;\n position: relative;\n }\n</style>\n","<script setup lang=\"ts\">\n import { useCssModule } from 'vue';\n\n export interface RadioVariantProps {\n /**\n * Whether the input 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 * A unique string to distinguish one Radio instance from another\n * and to link the label to the input; required for accessibility\n */\n id: string | number;\n\n /**\n * The description which appears to the right of the radio button\n */\n label?: string;\n\n /**\n * value bound to the parent component\n */\n modelValue?: string | undefined;\n\n /**\n * Passed to the \"name\" attribute of the `<input>` element.\n */\n name?: string;\n\n /**\n * The value for the radio input.\n */\n value: string;\n }\n\n const props = defineProps<RadioVariantProps>();\n const classes = useCssModule();\n\n const emit =\n defineEmits<{\n (e: 'input', event: Event): void;\n }>();\n</script>\n\n<template>\n <div :class=\"[classes.root, { 'tw-w-full': props.fullWidth }]\">\n <input\n :id=\"`${props.name}-${props.id}`\"\n class=\"tw-sr-only\"\n :class=\"classes.input\"\n type=\"radio\"\n :name=\"props.name\"\n :value=\"props.value\"\n :checked=\"props.modelValue === props.value\"\n :disabled=\"props.disabled || props.disabled\"\n @input=\"emit('input', $event)\"\n />\n <label :class=\"classes.label\" :for=\"`${props.name}-${props.id}`\">\n {{ props.label }}\n </label>\n </div>\n</template>\n\n<style module>\n .label {\n display: inline-block;\n padding: theme('spacing.1') theme('spacing.3');\n border: 1px solid var(--color-ice-500);\n font-weight: theme('fontWeight.normal');\n line-height: 1.375rem;\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 .input:disabled ~ .label {\n background-color: var(--color-ice-100);\n color: var(--color-ice-500);\n cursor: auto;\n }\n\n .input:checked:not(:disabled) ~ .label {\n border-color: var(--color-blue-500);\n color: theme('colors.white');\n background-color: var(--color-blue-500);\n font-weight: theme('fontWeight.bold');\n }\n\n .input:not(:checked, :disabled) ~ .label:hover {\n border-color: var(--color-blue-500);\n }\n</style>\n","<script setup lang=\"ts\">\n import { useCssModule } from 'vue';\n\n export interface RadioVariantProps {\n /**\n * Whether the input 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 * A unique string to distinguish one Radio instance from another\n * and to link the label to the input; required for accessibility\n */\n id: string | number;\n\n /**\n * The description which appears to the right of the radio button\n */\n label?: string;\n\n /**\n * value bound to the parent component\n */\n modelValue?: string | undefined;\n\n /**\n * Passed to the \"name\" attribute of the `<input>` element.\n */\n name?: string;\n\n /**\n * The value for the radio input.\n */\n value: string;\n }\n\n const props = defineProps<RadioVariantProps>();\n const classes = useCssModule();\n\n const emit =\n defineEmits<{\n (e: 'input', event: Event): void;\n }>();\n</script>\n\n<template>\n <div class=\"tw-flex\" :class=\"[classes.root, { 'tw-w-full': props.fullWidth }]\">\n <input\n :id=\"`${props.name}-${props.id}`\"\n :class=\"classes.input\"\n type=\"radio\"\n :name=\"props.name\"\n :value=\"props.value\"\n :checked=\"props.modelValue === props.value\"\n :disabled=\"props.disabled\"\n @input=\"emit('input', $event)\"\n />\n <label\n v-show=\"props.label\"\n :class=\"[classes.label, { 'tw-text-ice-500': props.disabled }]\"\n :for=\"`${props.name}-${props.id}`\"\n >\n {{ props.label }}\n </label>\n </div>\n</template>\n\n<style module>\n .label {\n font-weight: theme('fontWeight.medium');\n user-select: none;\n cursor: pointer;\n padding: 0 theme('spacing.3');\n }\n\n .input {\n appearance: none;\n border-radius: 50%;\n min-width: 20px;\n width: 20px;\n height: 20px;\n border: 1px solid var(--color-ice-500);\n transition: all 0.2s;\n position: relative;\n cursor: pointer;\n }\n\n .input:checked {\n background-image: radial-gradient(var(--color-blue-500) 50%, transparent 54%);\n }\n\n .input:disabled {\n background-image: radial-gradient(var(--color-ice-100) 100%, var(--color-ice-100) 100%);\n }\n\n .input:disabled:checked {\n background-image: radial-gradient(var(--color-ice-500) 50%, var(--color-ice-100) 54%);\n }\n\n .input:hover:not(:disabled) {\n border-color: var(--color-blue-500);\n }\n\n .input:disabled ~ .label {\n cursor: auto;\n }\n\n .input:hover:not(:disabled) ~ .label {\n color: var(--color-ice-900);\n }\n\n .input:not(:disabled) ~ .label:hover {\n color: var(--color-ice-900);\n }\n</style>\n","<script setup lang=\"ts\">\n import { useCssModule } from 'vue';\n\n export interface RadioVariantProps {\n /**\n * Whether the input 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 * A unique string to distinguish one Radio instance from another\n * and to link the label to the input; required for accessibility\n */\n id: string | number;\n\n /**\n * The description which appears to the right of the radio button\n */\n label?: string;\n\n /**\n * value bound to the parent component\n */\n modelValue?: string | undefined;\n\n /**\n * Passed to the \"name\" attribute of the `<input>` element.\n */\n name?: string;\n\n /**\n * The value for the radio input.\n */\n value: string;\n }\n\n const props = defineProps<RadioVariantProps>();\n const classes = useCssModule();\n\n const emit =\n defineEmits<{\n (e: 'input', event: Event): void;\n }>();\n</script>\n\n<template>\n <label\n :class=\"[classes.root, { 'tw-w-full': props.fullWidth, [classes['root--disabled']]: props.disabled }]\"\n :for=\"`${props.name}-${props.id}`\"\n >\n <div\n class=\"tw-flex tw-border\"\n :class=\"[\n classes['tile-header'],\n {\n 'tw-border-blue-500 tw-bg-blue-100': props.modelValue === props.value && !props.disabled,\n 'tw-border-ice-500 tw-bg-ice-100': props.modelValue !== props.value || props.disabled,\n },\n ]\"\n >\n <input\n :id=\"`${props.name}-${props.id}`\"\n :aria-labelledby=\"`tile-label-${props.name}-${props.id}`\"\n class=\"tw-sr-only\"\n :class=\"classes.input\"\n type=\"radio\"\n :name=\"props.name\"\n :value=\"props.value\"\n :checked=\"props.modelValue === props.value\"\n :disabled=\"props.disabled\"\n @input=\"emit('input', $event)\"\n />\n <div :id=\"`tile-label-${props.name}-${props.id}`\" :class=\"[classes.label, { 'tw-text-ice-500': props.disabled }]\">\n {{ props.label }}\n </div>\n </div>\n <div\n :class=\"[\n classes['tile-body'],\n {\n 'tw-border-ice-500': props.modelValue !== props.value || props.disabled,\n 'tw-border-blue-500': props.modelValue === props.value && !props.disabled,\n },\n ]\"\n >\n <slot></slot>\n </div>\n </label>\n</template>\n\n<style module>\n .root {\n border-radius: theme('borderRadius.DEFAULT');\n cursor: pointer;\n display: flex;\n flex: 1;\n flex-direction: column;\n user-select: none;\n }\n\n .root--disabled {\n cursor: auto;\n }\n\n .tile-header,\n .tile-body {\n transition: all 0.2s;\n }\n\n .tile-header {\n border-radius: theme('borderRadius.DEFAULT') theme('borderRadius.DEFAULT') 0 0;\n padding: theme('spacing.3') 0;\n }\n\n .root:hover:not(.root--disabled) .tile-header {\n background-color: var(--color-blue-100) !important;\n border-color: var(--color-blue-500) !important;\n color: var(--color-ice-900) !important;\n transition: all 0.2s;\n }\n\n .label {\n font-weight: theme('fontWeight.medium');\n user-select: none;\n cursor: pointer;\n padding: 0 theme('spacing.3');\n }\n\n .input {\n appearance: none;\n background-color: theme('colors.white');\n border-radius: 50%;\n width: 20px;\n height: 20px;\n border: 1px solid var(--color-ice-500);\n transition: all 0.2s;\n position: relative;\n cursor: pointer;\n top: 2px;\n margin-left: theme('spacing.3');\n }\n\n .input:checked {\n background-image: radial-gradient(var(--color-blue-500) 50%, transparent 54%);\n }\n\n .input:disabled:checked {\n background-image: radial-gradient(var(--color-ice-500) 50%, var(--color-ice-100) 54%);\n }\n\n .tile-body {\n border-radius: 0 0 theme('borderRadius.DEFAULT') theme('borderRadius.DEFAULT');\n border-width: 0 1px 1px 1px;\n background-color: theme('colors.white');\n padding: theme('spacing.6');\n display: flex;\n flex-direction: column;\n }\n\n .root:hover:not(.root--disabled) .tile-body {\n border-color: var(--color-blue-500) !important;\n transition: all 0.2s;\n }\n</style>\n","export enum RadioVariant {\n Radio = 'radio',\n Button = 'button',\n Chip = 'chip',\n Tile = 'tile',\n}\n\nexport type RadioVariants = `${RadioVariant}`;\n","<script lang=\"ts\">\n export * from './Radio.types';\n\n export interface RadioProps {\n /**\n * Passed to the \"name\" attribute of the `<input>` element.\n */\n name?: string;\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 * A unique string to distinguish one Radio instance from another\n * and to link the label to the input; required for accessibility\n */\n id: string | number;\n\n /**\n * value bound to the parent component\n */\n modelValue?: string | undefined;\n\n /**\n * Adds error styling\n */\n hasError?: boolean;\n\n /**\n * The description which appears to the right of the radio button\n */\n label?: string;\n\n /**\n * the styling for the radio button @defaultValue 'radio'\n */\n variant?: RadioVariants;\n\n /**\n * The value for the radio input.\n */\n value: string;\n }\n</script>\n\n<script setup lang=\"ts\">\n import { computed, inject } from 'vue';\n\n import { RADIO_GROUP_INJECTION } from '../RadioGroup/RadioGroup.keys';\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 { RadioVariant, RadioVariants } from './Radio.types';\n\n const variantComponentsMap = {\n [RadioVariant.Button]: VariantButton,\n [RadioVariant.Chip]: VariantChip,\n [RadioVariant.Radio]: VariantRadio,\n [RadioVariant.Tile]: VariantTile,\n };\n\n const radioGroupInjection = inject(RADIO_GROUP_INJECTION.key, null);\n\n const props = withDefaults(defineProps<RadioProps>(), {\n disabled: false,\n fullWidth: false,\n hasError: false,\n id: undefined,\n label: '',\n modelValue: undefined,\n name: undefined,\n variant: undefined,\n });\n\n /**\n * use prop values but fallback to radio group context values if they are provided\n */\n const derivedModelValue = computed(() => props.modelValue || radioGroupInjection?.modelValue.value);\n const derivedName = computed(() => props.name || radioGroupInjection?.name.value);\n const derivedNameFullWidth = computed(() => props.fullWidth || radioGroupInjection?.fullWidth.value);\n const derivedDisabled = computed(() => props.disabled || radioGroupInjection?.disabled.value);\n const derivedVariant = computed<RadioVariants>(() => props.variant || radioGroupInjection?.variant.value || 'radio');\n\n const emit =\n defineEmits<{\n (e: 'update:modelValue', value: RadioProps['value']): void;\n }>();\n\n function onInput(e: Event) {\n if (radioGroupInjection?.update) {\n radioGroupInjection.update(e);\n\n return;\n }\n\n emit('update:modelValue', (e.target as HTMLInputElement).value);\n }\n</script>\n\n<template>\n <component\n :is=\"variantComponentsMap[derivedVariant]\"\n :id=\"props.id\"\n :disabled=\"derivedDisabled\"\n :has-error=\"props.hasError\"\n :full-width=\"derivedNameFullWidth\"\n :label=\"props.label\"\n :model-value=\"derivedModelValue\"\n :name=\"derivedName\"\n :value=\"props.value\"\n @input=\"onInput\"\n >\n <slot></slot>\n </component>\n</template>\n"],"names":["classes","useCssModule","RadioVariant","variantComponentsMap","VariantButton","VariantChip","VariantRadio","VariantTile","radioGroupInjection","inject","RADIO_GROUP_INJECTION","derivedModelValue","computed","props","derivedName","derivedNameFullWidth","derivedDisabled","derivedVariant","onInput","e","emit"],"mappings":";;;;;;;;;;;;;;;;iBA0CQA,IAAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBCAVD,IAAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBCAVD,IAAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBCAVD,IAAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC1CN,IAAAC,sBAAAA,OACVA,EAAA,QAAQ,SACRA,EAAA,SAAS,UACTA,EAAA,OAAO,QACPA,EAAA,OAAO,QAJGA,IAAAA,KAAA,CAAA,CAAA;;;;;;;;;;;;;;;;iBC8DJC,IAAuB;AAAA,MAC3B,CAACD,EAAa,MAAM,GAAGE;AAAA,MACvB,CAACF,EAAa,IAAI,GAAGG;AAAA,MACrB,CAACH,EAAa,KAAK,GAAGI;AAAA,MACtB,CAACJ,EAAa,IAAI,GAAGK;AAAA,IAAA,GAGjBC,IAAsBC,EAAOC,EAAsB,KAAK,IAAI,GAgB5DC,IAAoBC,EAAS,MAAMC,EAAM,eAAcL,KAAA,gBAAAA,EAAqB,WAAW,MAAK,GAC5FM,IAAcF,EAAS,MAAMC,EAAM,SAAQL,KAAA,gBAAAA,EAAqB,KAAK,MAAK,GAC1EO,IAAuBH,EAAS,MAAMC,EAAM,cAAaL,KAAA,gBAAAA,EAAqB,UAAU,MAAK,GAC7FQ,IAAkBJ,EAAS,MAAMC,EAAM,aAAYL,KAAA,gBAAAA,EAAqB,SAAS,MAAK,GACtFS,IAAiBL,EAAwB,MAAMC,EAAM,YAAWL,KAAA,gBAAAA,EAAqB,QAAQ,UAAS,OAAO;AAOnH,aAASU,EAAQC,GAAU;AACzB,UAAIX,KAAA,QAAAA,EAAqB,QAAQ;AAC/B,QAAAA,EAAoB,OAAOW,CAAC;AAE5B;AAAA;AAGG,MAAAC,EAAA,qBAAsBD,EAAE,OAA4B,KAAK;AAAA,IAChE;;;;;;;;;;;;;;;;;;;"}
|
package/dist/RangeInput.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as s, useSlots as n, openBlock as a, createElementBlock as r, renderSlot as o, createVNode as m } from "vue";
|
|
2
2
|
import p from "./Icon.js";
|
|
3
3
|
import "lodash-es/uniqueId";
|
|
4
|
-
import "./index-
|
|
4
|
+
import "./index-9e1095ef.js";
|
|
5
5
|
import "./Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js";
|
|
6
6
|
import "./_plugin-vue_export-helper-dad06003.js";
|
|
7
7
|
const i = {
|
package/dist/SearchBar.js
CHANGED
|
@@ -7,7 +7,7 @@ import { _ as j } from "./_plugin-vue_export-helper-dad06003.js";
|
|
|
7
7
|
import "lodash-es/get";
|
|
8
8
|
import "./Button.vue_used_vue_type_style_index_0_lang.module-a9290468.js";
|
|
9
9
|
import "lodash-es/uniqueId";
|
|
10
|
-
import "./index-
|
|
10
|
+
import "./index-9e1095ef.js";
|
|
11
11
|
import "./Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js";
|
|
12
12
|
import "lodash-es/isNil";
|
|
13
13
|
import "./utils/i18n.js";
|