@leaflink/stash 42.8.1 → 43.0.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 +1 -1
- package/dist/AddressSelect.js +9 -10
- package/dist/AddressSelect.js.map +1 -1
- package/dist/Alert.js +9 -9
- package/dist/Alert.js.map +1 -1
- package/dist/AppSidebar.js +11 -11
- package/dist/AppSidebar.js.map +1 -1
- package/dist/Avatar.js +33 -32
- package/dist/Avatar.js.map +1 -1
- package/dist/Avatar.vue.d.ts +16 -95
- package/dist/Badge.js +2 -2
- package/dist/Badge.js.map +1 -1
- package/dist/Checkbox.js +4 -4
- package/dist/Checkbox.js.map +1 -1
- package/dist/{Checkbox.vue_vue_type_style_index_0_scoped_0cd31c8f_lang-4ed993c7.js → Checkbox.vue_vue_type_style_index_0_scoped_0d7e7fd0_lang-4ed993c7.js} +1 -1
- package/dist/Checkbox.vue_vue_type_style_index_0_scoped_0d7e7fd0_lang-4ed993c7.js.map +1 -0
- package/dist/Chip.js +32 -30
- package/dist/Chip.js.map +1 -1
- package/dist/Chip.vue.d.ts +16 -95
- package/dist/ConfirmationCodeInput.js +23 -23
- package/dist/ConfirmationCodeInput.js.map +1 -1
- package/dist/ContextSwitcher.js +2 -2
- package/dist/ContextSwitcher.js.map +1 -1
- package/dist/Copy.js +1 -1
- package/dist/Copy.js.map +1 -1
- package/dist/DataView.js +1 -1
- package/dist/DataViewFilters.js +23 -24
- package/dist/DataViewFilters.js.map +1 -1
- package/dist/DataViewSortButton.js +11 -11
- package/dist/DataViewSortButton.js.map +1 -1
- package/dist/DataViewToolbar.js +1 -1
- package/dist/Dialog.js +10 -10
- package/dist/Dialog.js.map +1 -1
- package/dist/Dropdown.js +7 -7
- package/dist/Dropdown.js.map +1 -1
- package/dist/FilterChip.js +2 -3
- package/dist/FilterChip.js.map +1 -1
- package/dist/FilterDrawerItem.js +5 -6
- package/dist/FilterDrawerItem.js.map +1 -1
- package/dist/FilterDropdown.js +3 -4
- package/dist/FilterDropdown.js.map +1 -1
- package/dist/FilterSelect.js +26 -27
- package/dist/FilterSelect.js.map +1 -1
- package/dist/Filters.js +3 -4
- package/dist/Filters.js.map +1 -1
- package/dist/HttpError.js +18 -18
- package/dist/HttpError.js.map +1 -1
- package/dist/IconLabel.js +12 -13
- package/dist/IconLabel.js.map +1 -1
- package/dist/IconLabel.vue.d.ts +9 -75
- package/dist/Illustration.js +1 -1
- package/dist/Illustration.js.map +1 -1
- package/dist/Illustration.vue.d.ts +19 -14
- package/dist/InputOptions.js +7 -8
- package/dist/InputOptions.js.map +1 -1
- package/dist/LicenseChip.js +32 -26
- package/dist/LicenseChip.js.map +1 -1
- package/dist/LicenseChip.vue.d.ts +2 -4
- package/dist/ListItem.js +1 -1
- package/dist/ListView.js +30 -31
- package/dist/ListView.js.map +1 -1
- package/dist/MenuItem.js +4 -4
- package/dist/MenuItem.js.map +1 -1
- package/dist/Metric.js +1 -1
- package/dist/Metric.js.map +1 -1
- package/dist/Metric.vue.d.ts +8 -74
- package/dist/Modal.js +13 -13
- package/dist/Modal.js.map +1 -1
- package/dist/Module.js +1 -1
- package/dist/Module.js.map +1 -1
- package/dist/ModuleFooter.js +1 -1
- package/dist/ModuleFooter.js.map +1 -1
- package/dist/ModuleHeader.js +1 -1
- package/dist/ModuleHeader.js.map +1 -1
- package/dist/PageNavigation.js +28 -29
- package/dist/PageNavigation.js.map +1 -1
- package/dist/Paginate.js +1 -1
- package/dist/Paginate.js.map +1 -1
- package/dist/Paginate.vue_used_vue_type_style_index_0_lang.module-bfccf992.js +11 -0
- package/dist/Paginate.vue_used_vue_type_style_index_0_lang.module-bfccf992.js.map +1 -0
- package/dist/QuickAction.js +14 -14
- package/dist/QuickAction.js.map +1 -1
- package/dist/RadioGroup.js +73 -71
- package/dist/RadioGroup.js.map +1 -1
- package/dist/RadioNew.js +4 -4
- package/dist/SearchBar.js +15 -15
- package/dist/SearchBar.js.map +1 -1
- package/dist/Select.js +92 -93
- package/dist/Select.js.map +1 -1
- package/dist/SelectStatus.js +53 -51
- package/dist/SelectStatus.js.map +1 -1
- package/dist/SelectStatus.vue.d.ts +52 -1
- package/dist/Step.js +28 -28
- package/dist/Step.js.map +1 -1
- package/dist/Tab.js +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/Tabs.js +2 -2
- package/dist/{Tabs.vue_vue_type_script_setup_true_lang-aca4f8b8.js → Tabs.vue_vue_type_script_setup_true_lang-56e85faa.js} +3 -3
- package/dist/Tabs.vue_vue_type_script_setup_true_lang-56e85faa.js.map +1 -0
- package/dist/Textarea.js +1 -1
- package/dist/Textarea.js.map +1 -1
- package/dist/Toast.js +1 -1
- package/dist/Toasts.js +1 -1
- package/dist/ToastsPlugin.js +1 -1
- package/dist/colorScheme.d.ts +3 -16
- package/dist/components.css +1 -1
- package/dist/index.d.ts +64 -25
- package/dist/index.js +188 -186
- package/dist/index.js.map +1 -1
- package/dist/statusLevels-a8b041f4.js +7 -0
- package/dist/statusLevels-a8b041f4.js.map +1 -0
- package/dist/tailwind-base.d.ts +0 -10
- package/dist/tailwind-base.js +22 -20
- package/dist/tailwind-base.js.map +1 -1
- package/dist/utils/colorScheme.js +1 -1
- package/dist/utils/colorScheme.js.map +1 -1
- package/package.json +1 -1
- package/styles/base.css +2 -2
- package/tailwind-base.ts +22 -21
- package/types/colors.ts +84 -26
- package/types/statusLevels.ts +4 -4
- package/dist/Checkbox.vue_vue_type_style_index_0_scoped_0cd31c8f_lang-4ed993c7.js.map +0 -1
- package/dist/Paginate.vue_used_vue_type_style_index_0_lang.module-e579235f.js +0 -11
- package/dist/Paginate.vue_used_vue_type_style_index_0_lang.module-e579235f.js.map +0 -1
- package/dist/Tabs.vue_vue_type_script_setup_true_lang-aca4f8b8.js.map +0 -1
- package/dist/colors-13e95ebf.js +0 -6
- package/dist/colors-13e95ebf.js.map +0 -1
- package/dist/statusLevels-aabf1e3c.js +0 -7
- package/dist/statusLevels-aabf1e3c.js.map +0 -1
package/README.md
CHANGED
|
@@ -184,7 +184,7 @@ In order to avoid class name clashes, `@leaflink/stash` prefixes Tailwind utilit
|
|
|
184
184
|
import Button from "@leaflink/stash/Button.vue"
|
|
185
185
|
import IconLabel from "@leaflink/stash/IconLabel.vue"
|
|
186
186
|
|
|
187
|
-
<Button icon-label class="tw-text-blue tw-ml-3">
|
|
187
|
+
<Button icon-label class="tw-text-blue-500 tw-ml-3">
|
|
188
188
|
<IconLabel icon="user-add" title="Add Recipient" size="dense" stacked>Add Recipient</IconLabel>
|
|
189
189
|
</Button>
|
|
190
190
|
```
|
package/dist/AddressSelect.js
CHANGED
|
@@ -18,7 +18,6 @@ import "lodash-es/isFinite";
|
|
|
18
18
|
import "./clickoutside.js";
|
|
19
19
|
import "./MenusPlugin-5e93f0a5.js";
|
|
20
20
|
import "./Chip.js";
|
|
21
|
-
import "./colors-13e95ebf.js";
|
|
22
21
|
import "./utils/colorScheme.js";
|
|
23
22
|
import "./Icon.js";
|
|
24
23
|
import "./index-79ce320f.js";
|
|
@@ -27,7 +26,7 @@ import "./_plugin-vue_export-helper-dad06003.js";
|
|
|
27
26
|
import "./Field.vue_vue_type_script_setup_true_lang-475832fe.js";
|
|
28
27
|
import "./Label.vue_vue_type_script_setup_true_lang-1d29d98a.js";
|
|
29
28
|
import "./locale.js";
|
|
30
|
-
const _ = "address-select-",
|
|
29
|
+
const _ = "address-select-", fe = /* @__PURE__ */ M({
|
|
31
30
|
__name: "AddressSelect",
|
|
32
31
|
props: {
|
|
33
32
|
apiKey: { default: void 0 },
|
|
@@ -52,7 +51,7 @@ const _ = "address-select-", ve = /* @__PURE__ */ M({
|
|
|
52
51
|
const t = g, V = S(), d = A("stashOptions"), u = h(() => t.apiKey || (d == null ? void 0 : d.googleMapsApiKey));
|
|
53
52
|
if (!u.value)
|
|
54
53
|
throw new Error("Google Maps API key is required");
|
|
55
|
-
const { getPlaceDetails: b, getPlacePredictions: x } = C(u.value),
|
|
54
|
+
const { getPlaceDetails: b, getPlacePredictions: x } = C(u.value), s = n(!1), a = n(), r = n(), E = G(w, t.debounceTime), i = h(() => {
|
|
56
55
|
var e, p, m, c, f, v;
|
|
57
56
|
return [
|
|
58
57
|
[(e = t.modelValue) == null ? void 0 : e.street_address, (p = t.modelValue) == null ? void 0 : p.extended_address].filter(Boolean).join(" "),
|
|
@@ -63,18 +62,18 @@ const _ = "address-select-", ve = /* @__PURE__ */ M({
|
|
|
63
62
|
});
|
|
64
63
|
T(() => t.modelValue, () => {
|
|
65
64
|
var o;
|
|
66
|
-
if (
|
|
65
|
+
if (i.value && !((o = a.value) != null && o.length)) {
|
|
67
66
|
const e = {
|
|
68
67
|
id: t.modelValue.place_id || K(_),
|
|
69
|
-
name:
|
|
68
|
+
name: i.value,
|
|
70
69
|
address: t.modelValue
|
|
71
70
|
};
|
|
72
71
|
a.value = [e], r.value = e;
|
|
73
72
|
} else
|
|
74
|
-
|
|
73
|
+
i.value || (r.value = void 0, a.value = []);
|
|
75
74
|
}, { immediate: !0 });
|
|
76
75
|
async function w(o) {
|
|
77
|
-
|
|
76
|
+
s.value = !0;
|
|
78
77
|
try {
|
|
79
78
|
a.value = await x(o);
|
|
80
79
|
} catch (e) {
|
|
@@ -83,7 +82,7 @@ const _ = "address-select-", ve = /* @__PURE__ */ M({
|
|
|
83
82
|
else
|
|
84
83
|
throw e;
|
|
85
84
|
} finally {
|
|
86
|
-
|
|
85
|
+
s.value = !1;
|
|
87
86
|
}
|
|
88
87
|
}
|
|
89
88
|
async function B(o) {
|
|
@@ -116,7 +115,7 @@ const _ = "address-select-", ve = /* @__PURE__ */ M({
|
|
|
116
115
|
single: "",
|
|
117
116
|
"data-test": "select|address",
|
|
118
117
|
disabled: t.disabled,
|
|
119
|
-
loading:
|
|
118
|
+
loading: s.value,
|
|
120
119
|
options: a.value,
|
|
121
120
|
placeholder: t.placeholder,
|
|
122
121
|
label: t.label,
|
|
@@ -139,6 +138,6 @@ const _ = "address-select-", ve = /* @__PURE__ */ M({
|
|
|
139
138
|
}
|
|
140
139
|
});
|
|
141
140
|
export {
|
|
142
|
-
|
|
141
|
+
fe as default
|
|
143
142
|
};
|
|
144
143
|
//# sourceMappingURL=AddressSelect.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressSelect.js","sources":["../src/components/AddressSelect/AddressSelect.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import debounce from 'lodash-es/debounce';\n import uniqueId from 'lodash-es/uniqueId';\n import { computed, inject, ref, useSlots, watch } from 'vue';\n\n import { StashProvideState } from '../../../types/misc';\n import useGoogleMaps, { type Address, type AddressOption } from '../../composables/useGoogleMaps/useGoogleMaps';\n import { DEBOUNCE } from '../../constants';\n import Select from '../Select/Select.vue';\n\n export interface AddressSelectProps {\n /**\n * Google Maps API Key. This takes precedence over the key defined in stashOptions\n */\n apiKey?: string;\n /**\n * Wether the Select is disabled or not\n */\n disabled?: boolean;\n /**\n * Select placeholder\n */\n placeholder?: string;\n /**\n * Debounce time in milliseconds to perform API requests on search\n */\n debounceTime?: number;\n /**\n * Model value address\n */\n modelValue: Address;\n /**\n * Hint text to be passed down to Select component\n */\n hintText?: string;\n /**\n * Error text to be passed down to Select component\n */\n errorText?: string;\n /**\n * Label text to be passed down to Select component\n */\n label?: string;\n /**\n * Disallows values from being de-selected\n */\n preventEmpty?: boolean;\n }\n\n const props = withDefaults(defineProps<AddressSelectProps>(), {\n disabled: false,\n placeholder: 'Type an address',\n debounceTime: DEBOUNCE.MEDIUM,\n modelValue: () => ({\n street_address: undefined,\n extended_address: undefined,\n city: undefined,\n state: undefined,\n postal_code: undefined,\n country: undefined,\n }),\n hintText: undefined,\n errorText: undefined,\n label: undefined,\n preventEmpty: false,\n apiKey: undefined,\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when the model value changes\n */\n (e: 'update:modelValue', value: Address): void,\n /**\n * Emitted when an error occurs while reaching out to Google's API\n */\n (e: 'error', value: unknown): void\n }>();\n\n const slots = useSlots();\n const stashOptions = inject<StashProvideState>('stashOptions');\n\n const googleMapsApiKey = computed(() => props.apiKey || stashOptions?.googleMapsApiKey);\n\n if (!googleMapsApiKey.value) {\n throw new Error('Google Maps API key is required');\n }\n\n const { getPlaceDetails, getPlacePredictions } = useGoogleMaps(googleMapsApiKey.value);\n\n const ID_PREFIX = 'address-select-';\n\n const isLoading = ref(false);\n const options = ref<Array<AddressOption>>();\n const internalValue = ref<AddressOption>();\n\n const debouncedSearch = debounce(search, props.debounceTime);\n\n const formattedAddress = computed(() => {\n const formattedAddress = [\n [props.modelValue?.street_address, props.modelValue?.extended_address].filter(Boolean).join(' '),\n props.modelValue?.city,\n [props.modelValue?.state, props.modelValue?.postal_code].filter(Boolean).join(' '),\n props.modelValue?.country\n ].filter(Boolean).join(', ');\n\n return formattedAddress;\n });\n\n // When we don't have options just yet, we need to create them on our own\n watch(() => props.modelValue, () => {\n if (formattedAddress.value && !options.value?.length) {\n const option = {\n id: props.modelValue.place_id || uniqueId(ID_PREFIX),\n name: formattedAddress.value,\n address: props.modelValue,\n };\n\n options.value = [option];\n internalValue.value = option;\n } else if (!formattedAddress.value) {\n internalValue.value = undefined;\n options.value = [];\n }\n }, { immediate: true });\n\n async function search(query: string) {\n isLoading.value = true;\n\n try {\n options.value = await getPlacePredictions(query);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n } catch (error: any) {\n options.value = [];\n if (error?.isGoogleMapsError) {\n emit('error', error);\n } else {\n throw error;\n }\n } finally {\n isLoading.value = false;\n }\n }\n\n async function select(option: AddressOption) {\n internalValue.value = option;\n\n // When an option is de-selected, the option will be undefined\n if (!option) {\n emit('update:modelValue', {\n street_address: undefined,\n extended_address: undefined,\n city: undefined,\n state: undefined,\n postal_code: undefined,\n country: undefined,\n });\n return;\n }\n\n // When an option does not have a google place id, we don't want to fetch it's details\n if (option.id.startsWith(ID_PREFIX) && option.address) {\n emit('update:modelValue', option.address);\n return;\n }\n\n try {\n const address = await getPlaceDetails(option.id);\n emit('update:modelValue', address);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n } catch (error: any) {\n if (error?.isGoogleMapsError) {\n emit('error', error);\n } else {\n throw error;\n }\n }\n }\n</script>\n\n<template>\n <Select\n single\n data-test=\"select|address\"\n :disabled=\"props.disabled\"\n :loading=\"isLoading\"\n :options=\"options\"\n :placeholder=\"props.placeholder\"\n :label=\"props.label\"\n :hint-text=\"props.hintText\"\n :error=\"props.errorText\"\n :model-value=\"internalValue\"\n :prevent-empty=\"props.preventEmpty\"\n disable-filtering\n @search=\"debouncedSearch\"\n @update:model-value=\"select\"\n >\n <template v-if=\"slots.hint\" #hint>\n <slot name=\"hint\"></slot>\n </template>\n </Select>\n</template>\n"],"names":["ID_PREFIX","slots","useSlots","stashOptions","inject","googleMapsApiKey","computed","props","getPlaceDetails","getPlacePredictions","useGoogleMaps","isLoading","ref","options","internalValue","debouncedSearch","debounce","search","formattedAddress","_a","_b","_c","_d","_e","_f","watch","option","uniqueId","query","error","emit","select","address"],"mappings":"
|
|
1
|
+
{"version":3,"file":"AddressSelect.js","sources":["../src/components/AddressSelect/AddressSelect.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import debounce from 'lodash-es/debounce';\n import uniqueId from 'lodash-es/uniqueId';\n import { computed, inject, ref, useSlots, watch } from 'vue';\n\n import { StashProvideState } from '../../../types/misc';\n import useGoogleMaps, { type Address, type AddressOption } from '../../composables/useGoogleMaps/useGoogleMaps';\n import { DEBOUNCE } from '../../constants';\n import Select from '../Select/Select.vue';\n\n export interface AddressSelectProps {\n /**\n * Google Maps API Key. This takes precedence over the key defined in stashOptions\n */\n apiKey?: string;\n /**\n * Wether the Select is disabled or not\n */\n disabled?: boolean;\n /**\n * Select placeholder\n */\n placeholder?: string;\n /**\n * Debounce time in milliseconds to perform API requests on search\n */\n debounceTime?: number;\n /**\n * Model value address\n */\n modelValue: Address;\n /**\n * Hint text to be passed down to Select component\n */\n hintText?: string;\n /**\n * Error text to be passed down to Select component\n */\n errorText?: string;\n /**\n * Label text to be passed down to Select component\n */\n label?: string;\n /**\n * Disallows values from being de-selected\n */\n preventEmpty?: boolean;\n }\n\n const props = withDefaults(defineProps<AddressSelectProps>(), {\n disabled: false,\n placeholder: 'Type an address',\n debounceTime: DEBOUNCE.MEDIUM,\n modelValue: () => ({\n street_address: undefined,\n extended_address: undefined,\n city: undefined,\n state: undefined,\n postal_code: undefined,\n country: undefined,\n }),\n hintText: undefined,\n errorText: undefined,\n label: undefined,\n preventEmpty: false,\n apiKey: undefined,\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when the model value changes\n */\n (e: 'update:modelValue', value: Address): void,\n /**\n * Emitted when an error occurs while reaching out to Google's API\n */\n (e: 'error', value: unknown): void\n }>();\n\n const slots = useSlots();\n const stashOptions = inject<StashProvideState>('stashOptions');\n\n const googleMapsApiKey = computed(() => props.apiKey || stashOptions?.googleMapsApiKey);\n\n if (!googleMapsApiKey.value) {\n throw new Error('Google Maps API key is required');\n }\n\n const { getPlaceDetails, getPlacePredictions } = useGoogleMaps(googleMapsApiKey.value);\n\n const ID_PREFIX = 'address-select-';\n\n const isLoading = ref(false);\n const options = ref<Array<AddressOption>>();\n const internalValue = ref<AddressOption>();\n\n const debouncedSearch = debounce(search, props.debounceTime);\n\n const formattedAddress = computed(() => {\n const formattedAddress = [\n [props.modelValue?.street_address, props.modelValue?.extended_address].filter(Boolean).join(' '),\n props.modelValue?.city,\n [props.modelValue?.state, props.modelValue?.postal_code].filter(Boolean).join(' '),\n props.modelValue?.country\n ].filter(Boolean).join(', ');\n\n return formattedAddress;\n });\n\n // When we don't have options just yet, we need to create them on our own\n watch(() => props.modelValue, () => {\n if (formattedAddress.value && !options.value?.length) {\n const option = {\n id: props.modelValue.place_id || uniqueId(ID_PREFIX),\n name: formattedAddress.value,\n address: props.modelValue,\n };\n\n options.value = [option];\n internalValue.value = option;\n } else if (!formattedAddress.value) {\n internalValue.value = undefined;\n options.value = [];\n }\n }, { immediate: true });\n\n async function search(query: string) {\n isLoading.value = true;\n\n try {\n options.value = await getPlacePredictions(query);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n } catch (error: any) {\n options.value = [];\n if (error?.isGoogleMapsError) {\n emit('error', error);\n } else {\n throw error;\n }\n } finally {\n isLoading.value = false;\n }\n }\n\n async function select(option: AddressOption) {\n internalValue.value = option;\n\n // When an option is de-selected, the option will be undefined\n if (!option) {\n emit('update:modelValue', {\n street_address: undefined,\n extended_address: undefined,\n city: undefined,\n state: undefined,\n postal_code: undefined,\n country: undefined,\n });\n return;\n }\n\n // When an option does not have a google place id, we don't want to fetch it's details\n if (option.id.startsWith(ID_PREFIX) && option.address) {\n emit('update:modelValue', option.address);\n return;\n }\n\n try {\n const address = await getPlaceDetails(option.id);\n emit('update:modelValue', address);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n } catch (error: any) {\n if (error?.isGoogleMapsError) {\n emit('error', error);\n } else {\n throw error;\n }\n }\n }\n</script>\n\n<template>\n <Select\n single\n data-test=\"select|address\"\n :disabled=\"props.disabled\"\n :loading=\"isLoading\"\n :options=\"options\"\n :placeholder=\"props.placeholder\"\n :label=\"props.label\"\n :hint-text=\"props.hintText\"\n :error=\"props.errorText\"\n :model-value=\"internalValue\"\n :prevent-empty=\"props.preventEmpty\"\n disable-filtering\n @search=\"debouncedSearch\"\n @update:model-value=\"select\"\n >\n <template v-if=\"slots.hint\" #hint>\n <slot name=\"hint\"></slot>\n </template>\n </Select>\n</template>\n"],"names":["ID_PREFIX","slots","useSlots","stashOptions","inject","googleMapsApiKey","computed","props","getPlaceDetails","getPlacePredictions","useGoogleMaps","isLoading","ref","options","internalValue","debouncedSearch","debounce","search","formattedAddress","_a","_b","_c","_d","_e","_f","watch","option","uniqueId","query","error","emit","select","address"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0FE,MAAMA,IAAY;;;;;;;;;;;;;;;;;;;;;;iBAXZC,IAAQC,KACRC,IAAeC,EAA0B,cAAc,GAEvDC,IAAmBC,EAAS,MAAMC,EAAM,WAAUJ,KAAA,gBAAAA,EAAc,iBAAgB;AAElF,QAAA,CAACE,EAAiB;AACd,YAAA,IAAI,MAAM,iCAAiC;AAGnD,UAAM,EAAE,iBAAAG,GAAiB,qBAAAC,EAAA,IAAwBC,EAAcL,EAAiB,KAAK,GAI/EM,IAAYC,EAAI,EAAK,GACrBC,IAAUD,KACVE,IAAgBF,KAEhBG,IAAkBC,EAASC,GAAQV,EAAM,YAAY,GAErDW,IAAmBZ,EAAS,MAAM;;AAQ/BY,aAPkB;AAAA,QACvB,EAACC,IAAAZ,EAAM,eAAN,gBAAAY,EAAkB,iBAAgBC,IAAAb,EAAM,eAAN,gBAAAa,EAAkB,gBAAgB,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,SAC/FC,IAAAd,EAAM,eAAN,gBAAAc,EAAkB;AAAA,QAClB,EAACC,IAAAf,EAAM,eAAN,gBAAAe,EAAkB,QAAOC,IAAAhB,EAAM,eAAN,gBAAAgB,EAAkB,WAAW,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,SACjFC,IAAAjB,EAAM,eAAN,gBAAAiB,EAAkB;AAAA,MAClB,EAAA,OAAO,OAAO,EAAE,KAAK,IAAI;AAAA,IAEpB,CACR;AAGK,IAAAC,EAAA,MAAMlB,EAAM,YAAY,MAAM;;AAClC,UAAIW,EAAiB,SAAS,GAACC,IAAAN,EAAQ,UAAR,QAAAM,EAAe,SAAQ;AACpD,cAAMO,IAAS;AAAA,UACb,IAAInB,EAAM,WAAW,YAAYoB,EAAS3B,CAAS;AAAA,UACnD,MAAMkB,EAAiB;AAAA,UACvB,SAASX,EAAM;AAAA,QAAA;AAGT,QAAAM,EAAA,QAAQ,CAACa,CAAM,GACvBZ,EAAc,QAAQY;AAAA,MAAA;AACxB,QAAYR,EAAiB,UAC3BJ,EAAc,QAAQ,QACtBD,EAAQ,QAAQ;IAClB,GACC,EAAE,WAAW,GAAA,CAAM;AAEtB,mBAAeI,EAAOW,GAAe;AACnC,MAAAjB,EAAU,QAAQ;AAEd,UAAA;AACM,QAAAE,EAAA,QAAQ,MAAMJ,EAAoBmB,CAAK;AAAA,eAExCC,GAAY;AAEnB,YADAhB,EAAQ,QAAQ,IACZgB,KAAA,QAAAA,EAAO;AACT,UAAAC,EAAK,SAASD,CAAK;AAAA;AAEb,gBAAAA;AAAA,MACR,UACA;AACA,QAAAlB,EAAU,QAAQ;AAAA,MACpB;AAAA,IACF;AAEA,mBAAeoB,EAAOL,GAAuB;AAI3C,UAHAZ,EAAc,QAAQY,GAGlB,CAACA,GAAQ;AACX,QAAAI,EAAK,qBAAqB;AAAA,UACxB,gBAAgB;AAAA,UAChB,kBAAkB;AAAA,UAClB,MAAM;AAAA,UACN,OAAO;AAAA,UACP,aAAa;AAAA,UACb,SAAS;AAAA,QAAA,CACV;AACD;AAAA,MACF;AAGA,UAAIJ,EAAO,GAAG,WAAW1B,CAAS,KAAK0B,EAAO,SAAS;AAChD,QAAAI,EAAA,qBAAqBJ,EAAO,OAAO;AACxC;AAAA,MACF;AAEI,UAAA;AACF,cAAMM,IAAU,MAAMxB,EAAgBkB,EAAO,EAAE;AAC/C,QAAAI,EAAK,qBAAqBE,CAAO;AAAA,eAE1BH,GAAY;AACnB,YAAIA,KAAA,QAAAA,EAAO;AACT,UAAAC,EAAK,SAASD,CAAK;AAAA;AAEb,gBAAAA;AAAA,MAEV;AAAA,IACF;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/Alert.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as x, useSlots as $, useCssModule as C, ref as I, computed as s, withDirectives as S, openBlock as i, createElementBlock as l, normalizeClass as r, createVNode as w, unref as t, createElementVNode as f, renderSlot as m, createCommentVNode as o } from "vue";
|
|
2
2
|
import y from "lodash-es/capitalize";
|
|
3
3
|
import B from "lodash-es/uniqueId";
|
|
4
|
-
import { S as M, a as N } from "./statusLevels-
|
|
4
|
+
import { S as M, a as N } from "./statusLevels-a8b041f4.js";
|
|
5
5
|
import V from "./sticky.js";
|
|
6
6
|
import p from "./Icon.js";
|
|
7
7
|
import { _ as j } from "./_plugin-vue_export-helper-dad06003.js";
|
|
@@ -30,14 +30,14 @@ const z = { class: "tw-m-0" }, A = /* @__PURE__ */ x({
|
|
|
30
30
|
"tw-my-6": e.variant === "outlined",
|
|
31
31
|
// Todo - this makes ZERO sense. We should remove this altogether and let the consumer handle the margin.
|
|
32
32
|
"tw-rounded": e.radius === "standard",
|
|
33
|
-
"tw-border-red": e.severity === "error",
|
|
34
|
-
"tw-border-orange": e.severity === "warning",
|
|
35
|
-
"tw-border-blue": e.severity === "info",
|
|
36
|
-
"tw-border-green": e.severity === "success",
|
|
37
|
-
"tw-bg-red": e.severity === "error" && e.variant === "filled",
|
|
38
|
-
"tw-bg-orange": e.severity === "warning" && e.variant === "filled",
|
|
39
|
-
"tw-bg-blue": e.severity === "info" && e.variant === "filled",
|
|
40
|
-
"tw-bg-green": e.severity === "success" && e.variant === "filled",
|
|
33
|
+
"tw-border-red-500": e.severity === "error",
|
|
34
|
+
"tw-border-orange-500": e.severity === "warning",
|
|
35
|
+
"tw-border-blue-500": e.severity === "info",
|
|
36
|
+
"tw-border-green-500": e.severity === "success",
|
|
37
|
+
"tw-bg-red-500": e.severity === "error" && e.variant === "filled",
|
|
38
|
+
"tw-bg-orange-500": e.severity === "warning" && e.variant === "filled",
|
|
39
|
+
"tw-bg-blue-500": e.severity === "info" && e.variant === "filled",
|
|
40
|
+
"tw-bg-green-500": e.severity === "success" && e.variant === "filled",
|
|
41
41
|
"tw-bg-red-100": e.severity === "error" && e.variant === "outlined",
|
|
42
42
|
"tw-bg-orange-100": e.severity === "warning" && e.variant === "outlined",
|
|
43
43
|
"tw-bg-blue-100": e.severity === "info" && e.variant === "outlined",
|
package/dist/Alert.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.js","sources":["../src/components/Alert/Alert.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import capitalize from 'lodash-es/capitalize';\n import uniqueId from 'lodash-es/uniqueId';\n import { computed, ref, useCssModule, useSlots } from 'vue';\n\n import { StatusColor, StatusColors, StatusIcon, StatusIcons, StatusSeverity } from '../../../types/statusLevels';\n import vSticky from '../../directives/sticky/sticky';\n import Icon from '../Icon/Icon.vue';\n\n defineOptions({\n name: 'll-alert',\n });\n\n export interface AlertProps {\n /**\n * Determines if the alert is centered\n */\n centered?: boolean;\n\n /**\n * Determines if the alert is permanent (doesn't have a close button).\n */\n permanent?: boolean;\n\n /**\n * The type of border radius to use. Available types:\n *\n * - `none` - no border radius\n * - `standard` - 4px border radius\n */\n radius?: 'none' | 'standard';\n\n /**\n * The type of alert. Available types:\n *\n * - `info`\n * - `success`\n * - `warning`\n * - `error`\n */\n severity?: StatusSeverity;\n\n /**\n * Determines if the alert is sticky. By default, it's not sticky. The provided `number` value is a top offset of alert.\n */\n sticky?: number | null;\n\n /**\n * The variant of alert. Available variants:\n *\n * - `filled` - previously alert component\n * - `outlined` - previously banner component\n */\n variant?: 'outlined' | 'filled';\n }\n\n const props = withDefaults(defineProps<AlertProps>(), {\n centered: false,\n permanent: false,\n radius: 'standard',\n severity: 'info',\n sticky: null,\n variant: 'outlined',\n });\n\n const iconId = uniqueId('close-icon');\n const slots = useSlots();\n const classes = useCssModule();\n const show = ref(true);\n const icon = computed<StatusIcon>(() => StatusIcons[capitalize(props.severity)]);\n const color = computed<StatusColor>(() => StatusColors[capitalize(props.severity)]);\n\n const iconColor = computed<string>(() => {\n if (props.variant === 'filled' && ['warning', 'success'].includes(props.severity)) {\n return 'tw-text-ice-900';\n }\n\n if (props.variant === 'filled' && ['info', 'error'].includes(props.severity)) {\n return 'tw-text-white';\n }\n\n return `tw-text-${color.value}`;\n });\n\n const computedTextColor = computed<string>(() => {\n if (props.variant === 'filled' && ['info', 'error'].includes(props.severity)) {\n return 'tw-text-white';\n }\n\n return 'tw-text-ice-900';\n });\n</script>\n\n<template>\n <div\n v-if=\"show\"\n v-sticky=\"props.sticky\"\n class=\"stash-alert tw-items-center tw-flex tw-p-3 tw-relative tw-leading-6 tw-border tw-border-solid\"\n :class=\"[\n `stash-alert--${props.severity}`,\n `stash-alert--${props.variant}`,\n computedTextColor,\n {\n 'tw-my-6': props.variant === 'outlined', // Todo - this makes ZERO sense. We should remove this altogether and let the consumer handle the margin.\n 'tw-rounded': props.radius === 'standard',\n 'tw-border-red': props.severity === 'error',\n 'tw-border-orange': props.severity === 'warning',\n 'tw-border-blue': props.severity === 'info',\n 'tw-border-green': props.severity === 'success',\n 'tw-bg-red': props.severity === 'error' && props.variant === 'filled',\n 'tw-bg-orange': props.severity === 'warning' && props.variant === 'filled',\n 'tw-bg-blue': props.severity === 'info' && props.variant === 'filled',\n 'tw-bg-green': props.severity === 'success' && props.variant === 'filled',\n 'tw-bg-red-100': props.severity === 'error' && props.variant === 'outlined',\n 'tw-bg-orange-100': props.severity === 'warning' && props.variant === 'outlined',\n 'tw-bg-blue-100': props.severity === 'info' && props.variant === 'outlined',\n 'tw-bg-green-100': props.severity === 'success' && props.variant === 'outlined',\n },\n ]\"\n data-test=\"stash-alert\"\n >\n <Icon\n class=\"stash-alert__icon\"\n :class=\"[classes.iconInfo, iconColor, `stash-alert__icon--${icon}`]\"\n :name=\"icon\"\n :title=\"`${props.severity} icon`\"\n data-test=\"stash-alert|status-icon\"\n />\n\n <!-- Alert text elements -->\n <div\n class=\"tw-flex tw-flex-1 tw-px-2 tw-flex-wrap\"\n :class=\"{\n 'tw-justify-center': props.centered,\n 'tw-justify-between': !props.centered,\n }\"\n >\n <p class=\"tw-m-0\">\n <slot></slot>\n </p>\n\n <div\n v-if=\"slots.link\"\n class=\"stash-alert__link tw-pointer tw-underline hover:tw-no-underline\"\n :class=\"[classes.link, computedTextColor, { 'tw-ml-2': props.centered }]\"\n data-test=\"stash-alert|link\"\n >\n <slot name=\"link\"></slot>\n </div>\n </div>\n\n <button\n v-if=\"!props.permanent\"\n class=\"stash-alert__close\"\n :class=\"[classes.button, computedTextColor]\"\n type=\"button\"\n data-test=\"stash-alert|close\"\n @click=\"show = false\"\n >\n <Icon :id=\"iconId\" name=\"close\" title=\"Dismiss alert\" />\n </button>\n </div>\n</template>\n\n<style module>\n :global(.stash-alert__link) {\n a,\n button {\n color: theme('colors.ice.900');\n cursor: pointer;\n text-decoration: underline;\n\n &:hover {\n text-decoration: none;\n }\n }\n }\n\n :global(.stash-alert--filled.stash-alert--error),\n :global(.stash-alert--filled.stash-alert--info) {\n :global(.stash-alert__link) a,\n :global(.stash-alert__link) button {\n color: theme('colors.white');\n }\n }\n</style>\n"],"names":["iconId","uniqueId","slots","useSlots","classes","useCssModule","show","ref","icon","computed","StatusIcons","capitalize","props","color","StatusColors","iconColor","computedTextColor"],"mappings":";;;;;;;;;;;;;;;;;;;;;iBAiEQA,IAASC,EAAS,YAAY,GAC9BC,IAAQC,KACRC,IAAUC,KACVC,IAAOC,EAAI,EAAI,GACfC,IAAOC,EAAqB,MAAMC,EAAYC,EAAWC,EAAM,QAAQ,CAAC,CAAC,GACzEC,IAAQJ,EAAsB,MAAMK,EAAaH,EAAWC,EAAM,QAAQ,CAAC,CAAC,GAE5EG,IAAYN,EAAiB,MAC7BG,EAAM,YAAY,YAAY,CAAC,WAAW,SAAS,EAAE,SAASA,EAAM,QAAQ,IACvE,oBAGLA,EAAM,YAAY,YAAY,CAAC,QAAQ,OAAO,EAAE,SAASA,EAAM,QAAQ,IAClE,kBAGF,WAAWC,EAAM,KAAK,EAC9B,GAEKG,IAAoBP,EAAiB,MACrCG,EAAM,YAAY,YAAY,CAAC,QAAQ,OAAO,EAAE,SAASA,EAAM,QAAQ,IAClE,kBAGF,iBACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"Alert.js","sources":["../src/components/Alert/Alert.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import capitalize from 'lodash-es/capitalize';\n import uniqueId from 'lodash-es/uniqueId';\n import { computed, ref, useCssModule, useSlots } from 'vue';\n\n import { StatusColor, StatusColors, StatusIcon, StatusIcons, StatusSeverity } from '../../../types/statusLevels';\n import vSticky from '../../directives/sticky/sticky';\n import Icon from '../Icon/Icon.vue';\n\n defineOptions({\n name: 'll-alert',\n });\n\n export interface AlertProps {\n /**\n * Determines if the alert is centered\n */\n centered?: boolean;\n\n /**\n * Determines if the alert is permanent (doesn't have a close button).\n */\n permanent?: boolean;\n\n /**\n * The type of border radius to use. Available types:\n *\n * - `none` - no border radius\n * - `standard` - 4px border radius\n */\n radius?: 'none' | 'standard';\n\n /**\n * The type of alert. Available types:\n *\n * - `info`\n * - `success`\n * - `warning`\n * - `error`\n */\n severity?: StatusSeverity;\n\n /**\n * Determines if the alert is sticky. By default, it's not sticky. The provided `number` value is a top offset of alert.\n */\n sticky?: number | null;\n\n /**\n * The variant of alert. Available variants:\n *\n * - `filled` - previously alert component\n * - `outlined` - previously banner component\n */\n variant?: 'outlined' | 'filled';\n }\n\n const props = withDefaults(defineProps<AlertProps>(), {\n centered: false,\n permanent: false,\n radius: 'standard',\n severity: 'info',\n sticky: null,\n variant: 'outlined',\n });\n\n const iconId = uniqueId('close-icon');\n const slots = useSlots();\n const classes = useCssModule();\n const show = ref(true);\n const icon = computed<StatusIcon>(() => StatusIcons[capitalize(props.severity)]);\n const color = computed<StatusColor>(() => StatusColors[capitalize(props.severity)]);\n\n const iconColor = computed<string>(() => {\n if (props.variant === 'filled' && ['warning', 'success'].includes(props.severity)) {\n return 'tw-text-ice-900';\n }\n\n if (props.variant === 'filled' && ['info', 'error'].includes(props.severity)) {\n return 'tw-text-white';\n }\n\n return `tw-text-${color.value}`;\n });\n\n const computedTextColor = computed<string>(() => {\n if (props.variant === 'filled' && ['info', 'error'].includes(props.severity)) {\n return 'tw-text-white';\n }\n\n return 'tw-text-ice-900';\n });\n</script>\n\n<template>\n <div\n v-if=\"show\"\n v-sticky=\"props.sticky\"\n class=\"stash-alert tw-items-center tw-flex tw-p-3 tw-relative tw-leading-6 tw-border tw-border-solid\"\n :class=\"[\n `stash-alert--${props.severity}`,\n `stash-alert--${props.variant}`,\n computedTextColor,\n {\n 'tw-my-6': props.variant === 'outlined', // Todo - this makes ZERO sense. We should remove this altogether and let the consumer handle the margin.\n 'tw-rounded': props.radius === 'standard',\n 'tw-border-red-500': props.severity === 'error',\n 'tw-border-orange-500': props.severity === 'warning',\n 'tw-border-blue-500': props.severity === 'info',\n 'tw-border-green-500': props.severity === 'success',\n 'tw-bg-red-500': props.severity === 'error' && props.variant === 'filled',\n 'tw-bg-orange-500': props.severity === 'warning' && props.variant === 'filled',\n 'tw-bg-blue-500': props.severity === 'info' && props.variant === 'filled',\n 'tw-bg-green-500': props.severity === 'success' && props.variant === 'filled',\n 'tw-bg-red-100': props.severity === 'error' && props.variant === 'outlined',\n 'tw-bg-orange-100': props.severity === 'warning' && props.variant === 'outlined',\n 'tw-bg-blue-100': props.severity === 'info' && props.variant === 'outlined',\n 'tw-bg-green-100': props.severity === 'success' && props.variant === 'outlined',\n },\n ]\"\n data-test=\"stash-alert\"\n >\n <Icon\n class=\"stash-alert__icon\"\n :class=\"[classes.iconInfo, iconColor, `stash-alert__icon--${icon}`]\"\n :name=\"icon\"\n :title=\"`${props.severity} icon`\"\n data-test=\"stash-alert|status-icon\"\n />\n\n <!-- Alert text elements -->\n <div\n class=\"tw-flex tw-flex-1 tw-px-2 tw-flex-wrap\"\n :class=\"{\n 'tw-justify-center': props.centered,\n 'tw-justify-between': !props.centered,\n }\"\n >\n <p class=\"tw-m-0\">\n <slot></slot>\n </p>\n\n <div\n v-if=\"slots.link\"\n class=\"stash-alert__link tw-pointer tw-underline hover:tw-no-underline\"\n :class=\"[classes.link, computedTextColor, { 'tw-ml-2': props.centered }]\"\n data-test=\"stash-alert|link\"\n >\n <slot name=\"link\"></slot>\n </div>\n </div>\n\n <button\n v-if=\"!props.permanent\"\n class=\"stash-alert__close\"\n :class=\"[classes.button, computedTextColor]\"\n type=\"button\"\n data-test=\"stash-alert|close\"\n @click=\"show = false\"\n >\n <Icon :id=\"iconId\" name=\"close\" title=\"Dismiss alert\" />\n </button>\n </div>\n</template>\n\n<style module>\n :global(.stash-alert__link) {\n a,\n button {\n color: theme('colors.ice.900');\n cursor: pointer;\n text-decoration: underline;\n\n &:hover {\n text-decoration: none;\n }\n }\n }\n\n :global(.stash-alert--filled.stash-alert--error),\n :global(.stash-alert--filled.stash-alert--info) {\n :global(.stash-alert__link) a,\n :global(.stash-alert__link) button {\n color: theme('colors.white');\n }\n }\n</style>\n"],"names":["iconId","uniqueId","slots","useSlots","classes","useCssModule","show","ref","icon","computed","StatusIcons","capitalize","props","color","StatusColors","iconColor","computedTextColor"],"mappings":";;;;;;;;;;;;;;;;;;;;;iBAiEQA,IAASC,EAAS,YAAY,GAC9BC,IAAQC,KACRC,IAAUC,KACVC,IAAOC,EAAI,EAAI,GACfC,IAAOC,EAAqB,MAAMC,EAAYC,EAAWC,EAAM,QAAQ,CAAC,CAAC,GACzEC,IAAQJ,EAAsB,MAAMK,EAAaH,EAAWC,EAAM,QAAQ,CAAC,CAAC,GAE5EG,IAAYN,EAAiB,MAC7BG,EAAM,YAAY,YAAY,CAAC,WAAW,SAAS,EAAE,SAASA,EAAM,QAAQ,IACvE,oBAGLA,EAAM,YAAY,YAAY,CAAC,QAAQ,OAAO,EAAE,SAASA,EAAM,QAAQ,IAClE,kBAGF,WAAWC,EAAM,KAAK,EAC9B,GAEKG,IAAoBP,EAAiB,MACrCG,EAAM,YAAY,YAAY,CAAC,QAAQ,OAAO,EAAE,SAASA,EAAM,QAAQ,IAClE,kBAGF,iBACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/AppSidebar.js
CHANGED
|
@@ -3,8 +3,8 @@ import $ from "./useMediaQuery.js";
|
|
|
3
3
|
import z from "./Backdrop.js";
|
|
4
4
|
import A from "./Divider.js";
|
|
5
5
|
import { _ as N } from "./_plugin-vue_export-helper-dad06003.js";
|
|
6
|
-
const j = (t) => (I("data-v-
|
|
7
|
-
class: "stash-app-sidebar__aside tw-fixed tw-h-screen tw-bg-purple tw-flex tw-flex-col",
|
|
6
|
+
const j = (t) => (I("data-v-7962d89f"), t = t(), V(), t), D = {
|
|
7
|
+
class: "stash-app-sidebar__aside tw-fixed tw-h-screen tw-bg-purple-500 tw-flex tw-flex-col",
|
|
8
8
|
"data-test": "stash-app-sidebar__aside"
|
|
9
9
|
}, M = {
|
|
10
10
|
key: 0,
|
|
@@ -25,21 +25,21 @@ const j = (t) => (I("data-v-141f019e"), t = t(), V(), t), D = {
|
|
|
25
25
|
},
|
|
26
26
|
emits: ["dismiss", "update:is-open"],
|
|
27
27
|
setup(t, { emit: _ }) {
|
|
28
|
-
const f = t, r = x(), l = $("screen and (min-width: 1321px)"), e = m(() => f.isOpen && !l.value),
|
|
28
|
+
const f = t, r = x(), l = $("screen and (min-width: 1321px)"), e = m(() => f.isOpen && !l.value), d = C({ height: "", overflow: "" }), h = m(() => f.isOpen || l.value);
|
|
29
29
|
function S() {
|
|
30
30
|
_("dismiss"), _("update:is-open", !1);
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function p() {
|
|
33
33
|
return document.scrollingElement || document.body;
|
|
34
34
|
}
|
|
35
35
|
return E(() => {
|
|
36
|
-
l.value || (e.value && Object.assign(
|
|
37
|
-
overflow:
|
|
38
|
-
height:
|
|
39
|
-
}), Object.assign(
|
|
40
|
-
overflow: e.value ? "hidden" :
|
|
36
|
+
l.value || (e.value && Object.assign(d.value, {
|
|
37
|
+
overflow: p().style.overflow,
|
|
38
|
+
height: p().style.height
|
|
39
|
+
}), Object.assign(p().style, {
|
|
40
|
+
overflow: e.value ? "hidden" : d.value.overflow,
|
|
41
41
|
// Prevents page from scrolling when AppSidebar is open
|
|
42
|
-
height: e.value ? "100%" :
|
|
42
|
+
height: e.value ? "100%" : d.value.height
|
|
43
43
|
// Ensures the backdrop covers the entire page when AppSidebar is open
|
|
44
44
|
}));
|
|
45
45
|
}), (s, F) => (a(), o("div", {
|
|
@@ -88,7 +88,7 @@ const j = (t) => (I("data-v-141f019e"), t = t(), V(), t), D = {
|
|
|
88
88
|
], 2));
|
|
89
89
|
}
|
|
90
90
|
});
|
|
91
|
-
const U = /* @__PURE__ */ N(q, [["__scopeId", "data-v-
|
|
91
|
+
const U = /* @__PURE__ */ N(q, [["__scopeId", "data-v-7962d89f"]]);
|
|
92
92
|
export {
|
|
93
93
|
U as default
|
|
94
94
|
};
|
package/dist/AppSidebar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppSidebar.js","sources":["../src/components/AppSidebar/AppSidebar.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, ref, useSlots, watchEffect } from 'vue';\n\n import useMediaQuery from '../../composables/useMediaQuery/useMediaQuery';\n import Backdrop from '../Backdrop/Backdrop.vue';\n import Divider from '../Divider/Divider.vue';\n\n export interface AppSidebarProps {\n /**\n * Controls wether the sidebar is opened or not\n */\n isOpen?: boolean;\n }\n\n const props = withDefaults(defineProps<AppSidebarProps>(), {\n isOpen: false,\n });\n\n const slots = useSlots();\n\n const emit =\n defineEmits<{\n /**\n * @deprecated Use the `update:is-open` event instead\n */\n (e: 'dismiss'): void;\n (e: 'update:is-open', isOpen: boolean): void;\n }>();\n\n const isExtraLargeScreen = useMediaQuery('screen and (min-width: 1321px)');\n const isBackdropVisible = computed(() => props.isOpen && !isExtraLargeScreen.value);\n const initialPageScrollingElementStyle = ref({ height: '', overflow: '' });\n const isSidebarOpen = computed(() => props.isOpen || isExtraLargeScreen.value);\n\n function onBackdropClick() {\n emit('dismiss');\n emit('update:is-open', false);\n }\n\n function getPageScrollingElement() {\n return (document.scrollingElement || document.body) as HTMLElement;\n }\n\n watchEffect(() => {\n if (isExtraLargeScreen.value) {\n return;\n }\n\n if (isBackdropVisible.value) {\n Object.assign(initialPageScrollingElementStyle.value, {\n overflow: getPageScrollingElement().style.overflow,\n height: getPageScrollingElement().style.height,\n });\n }\n\n Object.assign(getPageScrollingElement().style, {\n overflow: isBackdropVisible.value ? 'hidden' : initialPageScrollingElementStyle.value.overflow, // Prevents page from scrolling when AppSidebar is open\n height: isBackdropVisible.value ? '100%' : initialPageScrollingElementStyle.value.height, // Ensures the backdrop covers the entire page when AppSidebar is open\n });\n });\n</script>\n\n<template>\n <div\n id=\"stash-app-sidebar\"\n class=\"stash-app-sidebar tw-relative\"\n :class=\"{\n 'stash-app-sidebar--is-open': isSidebarOpen,\n 'tw-z-modal': isBackdropVisible,\n 'tw-z-[301]': !isBackdropVisible,\n }\"\n data-test=\"stash-app-sidebar\"\n >\n <Transition name=\"backdrop\">\n <Backdrop v-show=\"isBackdropVisible\" class=\"stash-app-sidebar__backdrop\" @click.stop=\"onBackdropClick\" />\n </Transition>\n <Transition name=\"aside\">\n <aside\n v-show=\"isSidebarOpen\"\n class=\"stash-app-sidebar__aside tw-fixed tw-h-screen tw-bg-purple tw-flex tw-flex-col\"\n data-test=\"stash-app-sidebar__aside\"\n >\n <Divider class=\"stash-app-sidebar__divider\" />\n <div v-if=\"slots['app-context']\" class=\"tw-px-3 tw-pt-6\">\n <!-- @slot App Context component slot, ideally for rendering the context switcher -->\n <slot name=\"app-context\"></slot>\n </div>\n <div v-if=\"slots['company-context']\" class=\"tw-px-3 tw-pt-6\">\n <!-- @slot Company Context component slot, ideally for rendering the company picker -->\n <slot name=\"company-context\"></slot>\n </div>\n <nav v-if=\"slots['navigation']\" class=\"tw-pt-6\">\n <ul role=\"menubar\" aria-orientation=\"vertical\">\n <!-- @slot Navigation component slot, for rendering navigation items -->\n <slot name=\"navigation\"></slot>\n </ul>\n </nav>\n <div class=\"tw-flex-1\"></div>\n <!-- @slot Footer component slot, for rendering version/environment notes -->\n <slot name=\"footer\"></slot>\n </aside>\n </Transition>\n </div>\n</template>\n\n<style scoped>\n .stash-app-sidebar__aside {\n padding-top: calc(var(--top-header-height) - 1px); /* -1px to compensate for the border height */\n width: var(--sidebar-width);\n }\n\n .stash-app-sidebar__divider::before,\n .stash-app-sidebar__divider::after {\n border-bottom: 1px solid rgb(255 255 255 / 12%);\n }\n\n .backdrop-enter-active,\n .backdrop-leave-active {\n transition: opacity 200ms ease-in-out;\n }\n\n .backdrop-enter-from,\n .backdrop-leave-to {\n opacity: 0;\n }\n\n .aside-enter-active,\n .aside-leave-active {\n transition: opacity 200ms ease-in-out, transform 200ms ease-in-out;\n }\n\n .aside-enter-from,\n .aside-leave-to {\n opacity: 0;\n transform: translateX(-20%);\n }\n</style>\n"],"names":["slots","useSlots","isExtraLargeScreen","useMediaQuery","isBackdropVisible","computed","props","initialPageScrollingElementStyle","ref","isSidebarOpen","onBackdropClick","emit","getPageScrollingElement","watchEffect"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkBQA,IAAQC,KAWRC,IAAqBC,EAAc,gCAAgC,GACnEC,IAAoBC,EAAS,MAAMC,EAAM,UAAU,CAACJ,EAAmB,KAAK,GAC5EK,IAAmCC,EAAI,EAAE,QAAQ,IAAI,UAAU,IAAI,GACnEC,IAAgBJ,EAAS,MAAMC,EAAM,UAAUJ,EAAmB,KAAK;AAE7E,aAASQ,IAAkB;AACzB,MAAAC,EAAK,SAAS,GACdA,EAAK,kBAAkB,EAAK;AAAA,IAC9B;AAEA,aAASC,IAA0B;AACzB,aAAA,SAAS,oBAAoB,SAAS;AAAA,IAChD;AAEA,WAAAC,EAAY,MAAM;AAChB,MAAIX,EAAmB,UAInBE,EAAkB,SACb,OAAA,OAAOG,EAAiC,OAAO;AAAA,QACpD,UAAUK,IAA0B,MAAM;AAAA,QAC1C,QAAQA,IAA0B,MAAM;AAAA,MAAA,CACzC,GAGI,OAAA,OAAOA,EAAwB,EAAE,OAAO;AAAA,QAC7C,UAAUR,EAAkB,QAAQ,WAAWG,EAAiC,MAAM;AAAA;AAAA,QACtF,QAAQH,EAAkB,QAAQ,SAASG,EAAiC,MAAM;AAAA;AAAA,MAAA,CACnF;AAAA,IAAA,CACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"AppSidebar.js","sources":["../src/components/AppSidebar/AppSidebar.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, ref, useSlots, watchEffect } from 'vue';\n\n import useMediaQuery from '../../composables/useMediaQuery/useMediaQuery';\n import Backdrop from '../Backdrop/Backdrop.vue';\n import Divider from '../Divider/Divider.vue';\n\n export interface AppSidebarProps {\n /**\n * Controls wether the sidebar is opened or not\n */\n isOpen?: boolean;\n }\n\n const props = withDefaults(defineProps<AppSidebarProps>(), {\n isOpen: false,\n });\n\n const slots = useSlots();\n\n const emit =\n defineEmits<{\n /**\n * @deprecated Use the `update:is-open` event instead\n */\n (e: 'dismiss'): void;\n (e: 'update:is-open', isOpen: boolean): void;\n }>();\n\n const isExtraLargeScreen = useMediaQuery('screen and (min-width: 1321px)');\n const isBackdropVisible = computed(() => props.isOpen && !isExtraLargeScreen.value);\n const initialPageScrollingElementStyle = ref({ height: '', overflow: '' });\n const isSidebarOpen = computed(() => props.isOpen || isExtraLargeScreen.value);\n\n function onBackdropClick() {\n emit('dismiss');\n emit('update:is-open', false);\n }\n\n function getPageScrollingElement() {\n return (document.scrollingElement || document.body) as HTMLElement;\n }\n\n watchEffect(() => {\n if (isExtraLargeScreen.value) {\n return;\n }\n\n if (isBackdropVisible.value) {\n Object.assign(initialPageScrollingElementStyle.value, {\n overflow: getPageScrollingElement().style.overflow,\n height: getPageScrollingElement().style.height,\n });\n }\n\n Object.assign(getPageScrollingElement().style, {\n overflow: isBackdropVisible.value ? 'hidden' : initialPageScrollingElementStyle.value.overflow, // Prevents page from scrolling when AppSidebar is open\n height: isBackdropVisible.value ? '100%' : initialPageScrollingElementStyle.value.height, // Ensures the backdrop covers the entire page when AppSidebar is open\n });\n });\n</script>\n\n<template>\n <div\n id=\"stash-app-sidebar\"\n class=\"stash-app-sidebar tw-relative\"\n :class=\"{\n 'stash-app-sidebar--is-open': isSidebarOpen,\n 'tw-z-modal': isBackdropVisible,\n 'tw-z-[301]': !isBackdropVisible,\n }\"\n data-test=\"stash-app-sidebar\"\n >\n <Transition name=\"backdrop\">\n <Backdrop v-show=\"isBackdropVisible\" class=\"stash-app-sidebar__backdrop\" @click.stop=\"onBackdropClick\" />\n </Transition>\n <Transition name=\"aside\">\n <aside\n v-show=\"isSidebarOpen\"\n class=\"stash-app-sidebar__aside tw-fixed tw-h-screen tw-bg-purple-500 tw-flex tw-flex-col\"\n data-test=\"stash-app-sidebar__aside\"\n >\n <Divider class=\"stash-app-sidebar__divider\" />\n <div v-if=\"slots['app-context']\" class=\"tw-px-3 tw-pt-6\">\n <!-- @slot App Context component slot, ideally for rendering the context switcher -->\n <slot name=\"app-context\"></slot>\n </div>\n <div v-if=\"slots['company-context']\" class=\"tw-px-3 tw-pt-6\">\n <!-- @slot Company Context component slot, ideally for rendering the company picker -->\n <slot name=\"company-context\"></slot>\n </div>\n <nav v-if=\"slots['navigation']\" class=\"tw-pt-6\">\n <ul role=\"menubar\" aria-orientation=\"vertical\">\n <!-- @slot Navigation component slot, for rendering navigation items -->\n <slot name=\"navigation\"></slot>\n </ul>\n </nav>\n <div class=\"tw-flex-1\"></div>\n <!-- @slot Footer component slot, for rendering version/environment notes -->\n <slot name=\"footer\"></slot>\n </aside>\n </Transition>\n </div>\n</template>\n\n<style scoped>\n .stash-app-sidebar__aside {\n padding-top: calc(var(--top-header-height) - 1px); /* -1px to compensate for the border height */\n width: var(--sidebar-width);\n }\n\n .stash-app-sidebar__divider::before,\n .stash-app-sidebar__divider::after {\n border-bottom: 1px solid rgb(255 255 255 / 12%);\n }\n\n .backdrop-enter-active,\n .backdrop-leave-active {\n transition: opacity 200ms ease-in-out;\n }\n\n .backdrop-enter-from,\n .backdrop-leave-to {\n opacity: 0;\n }\n\n .aside-enter-active,\n .aside-leave-active {\n transition: opacity 200ms ease-in-out, transform 200ms ease-in-out;\n }\n\n .aside-enter-from,\n .aside-leave-to {\n opacity: 0;\n transform: translateX(-20%);\n }\n</style>\n"],"names":["slots","useSlots","isExtraLargeScreen","useMediaQuery","isBackdropVisible","computed","props","initialPageScrollingElementStyle","ref","isSidebarOpen","onBackdropClick","emit","getPageScrollingElement","watchEffect"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkBQA,IAAQC,KAWRC,IAAqBC,EAAc,gCAAgC,GACnEC,IAAoBC,EAAS,MAAMC,EAAM,UAAU,CAACJ,EAAmB,KAAK,GAC5EK,IAAmCC,EAAI,EAAE,QAAQ,IAAI,UAAU,IAAI,GACnEC,IAAgBJ,EAAS,MAAMC,EAAM,UAAUJ,EAAmB,KAAK;AAE7E,aAASQ,IAAkB;AACzB,MAAAC,EAAK,SAAS,GACdA,EAAK,kBAAkB,EAAK;AAAA,IAC9B;AAEA,aAASC,IAA0B;AACzB,aAAA,SAAS,oBAAoB,SAAS;AAAA,IAChD;AAEA,WAAAC,EAAY,MAAM;AAChB,MAAIX,EAAmB,UAInBE,EAAkB,SACb,OAAA,OAAOG,EAAiC,OAAO;AAAA,QACpD,UAAUK,IAA0B,MAAM;AAAA,QAC1C,QAAQA,IAA0B,MAAM;AAAA,MAAA,CACzC,GAGI,OAAA,OAAOA,EAAwB,EAAE,OAAO;AAAA,QAC7C,UAAUR,EAAkB,QAAQ,WAAWG,EAAiC,MAAM;AAAA;AAAA,QACtF,QAAQH,EAAkB,QAAQ,SAASG,EAAiC,MAAM;AAAA;AAAA,MAAA,CACnF;AAAA,IAAA,CACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/Avatar.js
CHANGED
|
@@ -1,53 +1,54 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { S as v } from "./colors-13e95ebf.js";
|
|
1
|
+
import { defineComponent as p, useAttrs as _, useCssModule as f, computed as c, openBlock as i, createElementBlock as d, mergeProps as u, unref as a, toDisplayString as h } from "vue";
|
|
3
2
|
import b from "./utils/colorScheme.js";
|
|
4
|
-
import { _ as
|
|
5
|
-
const
|
|
3
|
+
import { _ as k } from "./_plugin-vue_export-helper-dad06003.js";
|
|
4
|
+
const x = ["alt", "src", "tabindex"], C = ["tabindex"], w = /* @__PURE__ */ p({
|
|
6
5
|
name: "ll-avatar",
|
|
7
6
|
__name: "Avatar",
|
|
8
7
|
props: {
|
|
9
8
|
name: { default: "" },
|
|
10
|
-
|
|
9
|
+
colorScheme: { default: "ice" },
|
|
11
10
|
shade: { default: "light" },
|
|
12
11
|
src: { default: void 0 },
|
|
13
12
|
alt: { default: void 0 },
|
|
14
13
|
bgColor: { default: void 0 },
|
|
15
14
|
textColor: { default: void 0 }
|
|
16
15
|
},
|
|
17
|
-
setup(
|
|
18
|
-
const
|
|
16
|
+
setup(m) {
|
|
17
|
+
const t = m, s = _(), e = f(), n = c(
|
|
19
18
|
() => b({
|
|
20
|
-
shade:
|
|
21
|
-
color:
|
|
19
|
+
shade: t.shade,
|
|
20
|
+
color: t.colorScheme
|
|
22
21
|
})
|
|
23
|
-
),
|
|
24
|
-
const [
|
|
25
|
-
return
|
|
26
|
-
}),
|
|
27
|
-
return (
|
|
22
|
+
), v = c(() => {
|
|
23
|
+
const [l, r] = String(t.name).toUpperCase().split(" ");
|
|
24
|
+
return r ? l.charAt(0) + r.charAt(0) : l.charAt(0);
|
|
25
|
+
}), o = c(() => !!s.onClick);
|
|
26
|
+
return (l, r) => t.src ? (i(), d("img", u({
|
|
28
27
|
key: 0,
|
|
29
|
-
class:
|
|
28
|
+
class: ["stash-avatar stash-avatar--image tw-inline-block tw-rounded-full", [a(e).root, { [a(e).clickable]: o.value }]],
|
|
30
29
|
alt: t.alt,
|
|
31
30
|
src: t.src,
|
|
32
|
-
tabindex:
|
|
33
|
-
|
|
31
|
+
tabindex: o.value ? 0 : -1,
|
|
32
|
+
"data-test": "stash-avatar"
|
|
33
|
+
}, a(s)), null, 16, x)) : (i(), d("div", u({
|
|
34
34
|
key: 1,
|
|
35
|
-
class:
|
|
36
|
-
|
|
37
|
-
`tw-text-${t.textColor ||
|
|
38
|
-
`tw-bg-${t.bgColor ||
|
|
39
|
-
{ [
|
|
40
|
-
]]
|
|
41
|
-
tabindex:
|
|
42
|
-
|
|
35
|
+
class: ["stash-avatar stash-avatar--initials tw-inline-block tw-rounded-full tw-text-center tw-font-semibold tw-cursor-default", [
|
|
36
|
+
a(e).root,
|
|
37
|
+
`tw-text-${t.textColor || n.value.computedTextColor}`,
|
|
38
|
+
`tw-bg-${t.bgColor || n.value.computedBgColor}`,
|
|
39
|
+
{ [a(e).clickable]: o.value }
|
|
40
|
+
]],
|
|
41
|
+
tabindex: o.value ? 0 : -1,
|
|
42
|
+
"data-test": "stash-avatar"
|
|
43
|
+
}, a(s)), h(v.value), 17, C));
|
|
43
44
|
}
|
|
44
|
-
}),
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
},
|
|
48
|
-
$style:
|
|
49
|
-
},
|
|
45
|
+
}), g = "_root_yvwkb_2", y = "_clickable_yvwkb_9", A = {
|
|
46
|
+
root: g,
|
|
47
|
+
clickable: y
|
|
48
|
+
}, S = {
|
|
49
|
+
$style: A
|
|
50
|
+
}, D = /* @__PURE__ */ k(w, [["__cssModules", S]]);
|
|
50
51
|
export {
|
|
51
|
-
|
|
52
|
+
D as default
|
|
52
53
|
};
|
|
53
54
|
//# sourceMappingURL=Avatar.js.map
|
package/dist/Avatar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.js","sources":["../src/components/Avatar/Avatar.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, useAttrs } from 'vue';\n\n import {
|
|
1
|
+
{"version":3,"file":"Avatar.js","sources":["../src/components/Avatar/Avatar.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, useAttrs, useCssModule } from 'vue';\n\n import { StashCommonColor, StashPrimaryColorGroup } from '../../../types/colors';\n import colorSchemeUtil from '../../utils/colorScheme';\n\n defineOptions({\n name: 'll-avatar',\n });\n\n export interface AvatarProps {\n /**\n * The name of the user will be parsed and have its initial displayed in case the src prop is empty\n */\n name?: string;\n\n /**\n * The color for the chip that determines both the text and bg color. Needs to\n * be one of the brand colors in our design system (not a shade).\n */\n colorScheme?: StashPrimaryColorGroup;\n\n /**\n * The shade of the provided color to use for the background color. This effects the inferred\n * text color unless a specific text color is provided. Currently only `light` and `main`\n * shades are supported. `dark` may be added in the future.\n */\n shade?: 'light' | 'main';\n\n /**\n * The image that will be displayed within the avatar\n */\n src?: string;\n\n /**\n * The alternative text to be displayed in case the image is unavailable\n */\n alt?: string;\n\n /**\n * The background color of the chip. Needs to be one of our design system colors.\n */\n bgColor?: StashCommonColor;\n\n /**\n * The color of the chip text. Needs to be one of our design system colors.\n */\n textColor?: StashCommonColor;\n }\n\n const props = withDefaults(defineProps<AvatarProps>(), {\n src: undefined,\n name: '',\n alt: undefined,\n colorScheme: 'ice',\n shade: 'light',\n bgColor: undefined,\n textColor: undefined,\n });\n\n const attrs = useAttrs();\n const classes = useCssModule();\n\n const computedColors = computed(() =>\n colorSchemeUtil({\n shade: props.shade,\n color: props.colorScheme,\n }),\n );\n\n const initials = computed(() => {\n const [firstName, lastName] = String(props.name).toUpperCase().split(' ');\n const initials = lastName ? firstName.charAt(0) + lastName.charAt(0) : firstName.charAt(0);\n\n return initials;\n });\n\n const isClickable = computed(() => {\n return !!attrs.onClick;\n });\n</script>\n\n<template>\n <img\n v-if=\"props.src\"\n class=\"stash-avatar stash-avatar--image tw-inline-block tw-rounded-full\"\n :class=\"[classes.root, { [classes.clickable]: isClickable }]\"\n :alt=\"props.alt\"\n :src=\"props.src\"\n :tabindex=\"isClickable ? 0 : -1\"\n data-test=\"stash-avatar\"\n v-bind=\"attrs\"\n />\n <div\n v-else\n class=\"\n stash-avatar stash-avatar--initials\n tw-inline-block tw-rounded-full tw-text-center tw-font-semibold tw-cursor-default\n \"\n :class=\"[\n classes.root,\n `tw-text-${props.textColor || computedColors.computedTextColor}`,\n `tw-bg-${props.bgColor || computedColors.computedBgColor}`,\n { [classes.clickable]: isClickable },\n ]\"\n :tabindex=\"isClickable ? 0 : -1\"\n data-test=\"stash-avatar\"\n v-bind=\"attrs\"\n >\n {{ initials }}\n </div>\n</template>\n\n<style module>\n .root {\n font-size: theme('fontSize.sm');\n height: theme('spacing.9');\n line-height: calc(theme('spacing.9') + 2px);\n width: theme('spacing.9');\n }\n\n .clickable:hover,\n .clickable:focus,\n .clickable:active {\n outline: 1px solid theme('colors.blue.500');\n outline-offset: -1px;\n }\n\n .clickable:focus,\n .clickable:active {\n box-shadow: 0 0 0 4px rgb(0 114 240 / 15%);\n }\n</style>\n"],"names":["attrs","useAttrs","classes","useCssModule","computedColors","computed","colorSchemeUtil","props","initials","firstName","lastName","isClickable"],"mappings":";;;;;;;;;;;;;;;;iBA4DQA,IAAQC,KACRC,IAAUC,KAEVC,IAAiBC;AAAA,MAAS,MAC9BC,EAAgB;AAAA,QACd,OAAOC,EAAM;AAAA,QACb,OAAOA,EAAM;AAAA,MAAA,CACd;AAAA,IAAA,GAGGC,IAAWH,EAAS,MAAM;AACxB,YAAA,CAACI,GAAWC,CAAQ,IAAI,OAAOH,EAAM,IAAI,EAAE,YAAA,EAAc,MAAM,GAAG;AAGjEC,aAFUE,IAAWD,EAAU,OAAO,CAAC,IAAIC,EAAS,OAAO,CAAC,IAAID,EAAU,OAAO,CAAC;AAAA,IAElF,CACR,GAEKE,IAAcN,EAAS,MACpB,CAAC,CAACL,EAAM,OAChB;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/Avatar.vue.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ export declare interface AvatarProps {
|
|
|
36
36
|
* The color for the chip that determines both the text and bg color. Needs to
|
|
37
37
|
* be one of the brand colors in our design system (not a shade).
|
|
38
38
|
*/
|
|
39
|
-
|
|
39
|
+
colorScheme?: StashPrimaryColorGroup;
|
|
40
40
|
/**
|
|
41
41
|
* The shade of the provided color to use for the background color. This effects the inferred
|
|
42
42
|
* text color unless a specific text color is provided. Currently only `light` and `main`
|
|
@@ -54,18 +54,18 @@ export declare interface AvatarProps {
|
|
|
54
54
|
/**
|
|
55
55
|
* The background color of the chip. Needs to be one of our design system colors.
|
|
56
56
|
*/
|
|
57
|
-
bgColor?:
|
|
57
|
+
bgColor?: StashCommonColor;
|
|
58
58
|
/**
|
|
59
59
|
* The color of the chip text. Needs to be one of our design system colors.
|
|
60
60
|
*/
|
|
61
|
-
textColor?:
|
|
61
|
+
textColor?: StashCommonColor;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<AvatarProps>, {
|
|
65
65
|
src: undefined;
|
|
66
66
|
name: string;
|
|
67
67
|
alt: undefined;
|
|
68
|
-
|
|
68
|
+
colorScheme: string;
|
|
69
69
|
shade: string;
|
|
70
70
|
bgColor: undefined;
|
|
71
71
|
textColor: undefined;
|
|
@@ -73,144 +73,65 @@ declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRunt
|
|
|
73
73
|
src: undefined;
|
|
74
74
|
name: string;
|
|
75
75
|
alt: undefined;
|
|
76
|
-
|
|
76
|
+
colorScheme: string;
|
|
77
77
|
shade: string;
|
|
78
78
|
bgColor: undefined;
|
|
79
79
|
textColor: undefined;
|
|
80
80
|
}>>>, {
|
|
81
81
|
name: string;
|
|
82
|
-
color: "blue" | "red" | "green" | "royal" | "purple" | "ice" | "orange" | "seafoam" | "teal" | "yellow";
|
|
83
82
|
src: string;
|
|
84
83
|
alt: string;
|
|
85
84
|
shade: "main" | "light";
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
colorScheme: StashPrimaryColorGroup;
|
|
86
|
+
bgColor: "ice-700" | "purple-700" | "purple-500" | "purple-100" | "royal-700" | "royal-500" | "royal-100" | "blue-700" | "blue-500" | "blue-100" | "teal-700" | "teal-500" | "teal-100" | "green-700" | "green-500" | "green-100" | "seafoam-700" | "seafoam-500" | "seafoam-100" | "yellow-700" | "yellow-500" | "yellow-100" | "orange-700" | "orange-500" | "orange-100" | "red-700" | "red-500" | "red-100" | "ice-500" | "ice-200" | "ice-100" | "white" | "black";
|
|
87
|
+
textColor: "ice-700" | "purple-700" | "purple-500" | "purple-100" | "royal-700" | "royal-500" | "royal-100" | "blue-700" | "blue-500" | "blue-100" | "teal-700" | "teal-500" | "teal-100" | "green-700" | "green-500" | "green-100" | "seafoam-700" | "seafoam-500" | "seafoam-100" | "yellow-700" | "yellow-500" | "yellow-100" | "orange-700" | "orange-500" | "orange-100" | "red-700" | "red-500" | "red-100" | "ice-500" | "ice-200" | "ice-100" | "white" | "black";
|
|
88
88
|
}, {}>;
|
|
89
89
|
export default _default;
|
|
90
90
|
|
|
91
|
-
declare type
|
|
91
|
+
declare type StashCommonColor = `${StashCommonColors}`;
|
|
92
92
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
/**
|
|
94
|
+
* A limited list of stash brand colors, only including their 100, 500, and 700 shades.
|
|
95
|
+
*/
|
|
96
|
+
declare enum StashCommonColors {
|
|
97
97
|
Purple700 = "purple-700",
|
|
98
|
-
Purple600 = "purple-600",
|
|
99
98
|
Purple500 = "purple-500",
|
|
100
|
-
Purple400 = "purple-400",
|
|
101
|
-
Purple300 = "purple-300",
|
|
102
|
-
Purple200 = "purple-200",
|
|
103
99
|
Purple100 = "purple-100",
|
|
104
|
-
Royal = "royal",
|
|
105
|
-
Royal900 = "royal-900",
|
|
106
|
-
Royal800 = "royal-800",
|
|
107
100
|
Royal700 = "royal-700",
|
|
108
|
-
Royal600 = "royal-600",
|
|
109
101
|
Royal500 = "royal-500",
|
|
110
|
-
Royal400 = "royal-400",
|
|
111
|
-
Royal300 = "royal-300",
|
|
112
|
-
Royal200 = "royal-200",
|
|
113
102
|
Royal100 = "royal-100",
|
|
114
|
-
Blue = "blue",
|
|
115
|
-
Blue900 = "blue-900",
|
|
116
|
-
Blue800 = "blue-800",
|
|
117
103
|
Blue700 = "blue-700",
|
|
118
|
-
Blue600 = "blue-600",
|
|
119
104
|
Blue500 = "blue-500",
|
|
120
|
-
Blue400 = "blue-400",
|
|
121
|
-
Blue300 = "blue-300",
|
|
122
|
-
Blue200 = "blue-200",
|
|
123
105
|
Blue100 = "blue-100",
|
|
124
|
-
Teal = "teal",
|
|
125
|
-
Teal900 = "teal-900",
|
|
126
|
-
Teal800 = "teal-800",
|
|
127
106
|
Teal700 = "teal-700",
|
|
128
|
-
Teal600 = "teal-600",
|
|
129
107
|
Teal500 = "teal-500",
|
|
130
|
-
Teal400 = "teal-400",
|
|
131
|
-
Teal300 = "teal-300",
|
|
132
|
-
Teal200 = "teal-200",
|
|
133
108
|
Teal100 = "teal-100",
|
|
134
|
-
Green = "green",
|
|
135
|
-
Green900 = "green-900",
|
|
136
|
-
Green800 = "green-800",
|
|
137
109
|
Green700 = "green-700",
|
|
138
|
-
Green600 = "green-600",
|
|
139
110
|
Green500 = "green-500",
|
|
140
|
-
Green400 = "green-400",
|
|
141
|
-
Green300 = "green-300",
|
|
142
|
-
Green200 = "green-200",
|
|
143
111
|
Green100 = "green-100",
|
|
144
|
-
Seafoam = "seafoam",
|
|
145
|
-
Seafoam900 = "seafoam-900",
|
|
146
|
-
Seafoam800 = "seafoam-800",
|
|
147
112
|
Seafoam700 = "seafoam-700",
|
|
148
|
-
Seafoam600 = "seafoam-600",
|
|
149
113
|
Seafoam500 = "seafoam-500",
|
|
150
|
-
Seafoam400 = "seafoam-400",
|
|
151
|
-
Seafoam300 = "seafoam-300",
|
|
152
|
-
Seafoam200 = "seafoam-200",
|
|
153
114
|
Seafoam100 = "seafoam-100",
|
|
154
|
-
Yellow = "yellow",
|
|
155
|
-
Yellow900 = "yellow-900",
|
|
156
|
-
Yellow800 = "yellow-800",
|
|
157
115
|
Yellow700 = "yellow-700",
|
|
158
|
-
Yellow600 = "yellow-600",
|
|
159
116
|
Yellow500 = "yellow-500",
|
|
160
|
-
Yellow400 = "yellow-400",
|
|
161
|
-
Yellow300 = "yellow-300",
|
|
162
|
-
Yellow200 = "yellow-200",
|
|
163
117
|
Yellow100 = "yellow-100",
|
|
164
|
-
Orange = "orange",
|
|
165
|
-
Orange900 = "orange-900",
|
|
166
|
-
Orange800 = "orange-800",
|
|
167
118
|
Orange700 = "orange-700",
|
|
168
|
-
Orange600 = "orange-600",
|
|
169
119
|
Orange500 = "orange-500",
|
|
170
|
-
Orange400 = "orange-400",
|
|
171
|
-
Orange300 = "orange-300",
|
|
172
|
-
Orange200 = "orange-200",
|
|
173
120
|
Orange100 = "orange-100",
|
|
174
|
-
Red = "red",
|
|
175
|
-
Red900 = "red-900",
|
|
176
|
-
Red800 = "red-800",
|
|
177
121
|
Red700 = "red-700",
|
|
178
|
-
Red600 = "red-600",
|
|
179
122
|
Red500 = "red-500",
|
|
180
|
-
Red400 = "red-400",
|
|
181
|
-
Red300 = "red-300",
|
|
182
|
-
Red200 = "red-200",
|
|
183
123
|
Red100 = "red-100",
|
|
184
|
-
Ice = "ice",
|
|
185
|
-
Ice900 = "ice-900",
|
|
186
|
-
Ice800 = "ice-800",
|
|
187
124
|
Ice700 = "ice-700",
|
|
188
|
-
Ice600 = "ice-600",
|
|
189
125
|
Ice500 = "ice-500",
|
|
190
|
-
|
|
191
|
-
Ice300 = "ice-300",
|
|
192
|
-
Ice200 = "ice-200",
|
|
126
|
+
Ice200 = "ice-200",// This is the one outlier, but it's used purposefully in a few places
|
|
193
127
|
Ice100 = "ice-100",
|
|
194
128
|
White = "white",
|
|
195
129
|
Black = "black"
|
|
196
130
|
}
|
|
197
131
|
|
|
198
|
-
declare type StashPrimaryColor = `${StashPrimaryColors}`;
|
|
199
|
-
|
|
200
132
|
/**
|
|
201
|
-
*
|
|
133
|
+
* The names of the color groups.
|
|
202
134
|
*/
|
|
203
|
-
declare
|
|
204
|
-
Blue = "blue",
|
|
205
|
-
Green = "green",
|
|
206
|
-
Ice = "ice",
|
|
207
|
-
Orange = "orange",
|
|
208
|
-
Purple = "purple",
|
|
209
|
-
Red = "red",
|
|
210
|
-
Royal = "royal",
|
|
211
|
-
Seafoam = "seafoam",
|
|
212
|
-
Teal = "teal",
|
|
213
|
-
Yellow = "yellow"
|
|
214
|
-
}
|
|
135
|
+
declare type StashPrimaryColorGroup = 'blue' | 'green' | 'ice' | 'orange' | 'purple' | 'red' | 'royal' | 'seafoam' | 'teal' | 'yellow';
|
|
215
136
|
|
|
216
137
|
export { }
|
package/dist/Badge.js
CHANGED
|
@@ -53,8 +53,8 @@ const S = {
|
|
|
53
53
|
class: c(["tw-text-white tw-font-semibold tw-rounded-full tw-text-[10px] tw-text-center tw-whitespace-nowrap tw-leading-[0.875rem] tw-inline-block", [
|
|
54
54
|
{
|
|
55
55
|
"tw-animate-grow": n.value,
|
|
56
|
-
"tw-bg-red": t.color === "red" && !t.isDisabled,
|
|
57
|
-
"tw-bg-blue": t.color === "blue" && !t.isDisabled,
|
|
56
|
+
"tw-bg-red-500": t.color === "red" && !t.isDisabled,
|
|
57
|
+
"tw-bg-blue-500": t.color === "blue" && !t.isDisabled,
|
|
58
58
|
"tw-absolute": t.variant === "dot",
|
|
59
59
|
"tw-bg-ice-200 tw-text-white": t.isDisabled,
|
|
60
60
|
[i(o)["badge-dot"]]: t.variant === "dot",
|