@leaflink/stash 51.2.0 → 51.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/illustrations/vignette/product-details.svg +29 -0
- package/dist/CurrencyInput.js +1 -0
- package/dist/CurrencyInput.js.map +1 -1
- package/dist/CurrencyInput.vue.d.ts +4 -0
- package/dist/DataViewFilters.js +1 -1
- package/dist/EmptyState.js +1 -1
- package/dist/EmptyState.vue.d.ts +2 -1
- package/dist/Field.js +1 -1
- package/dist/Field.vue.d.ts +7 -0
- package/dist/{Field.vue_vue_type_script_setup_true_lang-DRaKs9Lm.js → Field.vue_vue_type_script_setup_true_lang-DI6z3AE9.js} +21 -19
- package/dist/Field.vue_vue_type_script_setup_true_lang-DI6z3AE9.js.map +1 -0
- package/dist/FilterSelect.js +16 -15
- package/dist/FilterSelect.js.map +1 -1
- package/dist/FilterSelect.vue.d.ts +4 -0
- package/dist/Filters.vue.d.ts +27 -0
- package/dist/HttpError.js +1 -1
- package/dist/Illustration.js +2 -2
- package/dist/Illustration.vue.d.ts +1 -0
- package/dist/{Illustration.vue_vue_type_script_setup_true_lang-BBqgoJO8.js → Illustration.vue_vue_type_script_setup_true_lang-DlY0OGCe.js} +16 -16
- package/dist/Illustration.vue_vue_type_script_setup_true_lang-DlY0OGCe.js.map +1 -0
- package/dist/Input.js +16 -15
- package/dist/Input.js.map +1 -1
- package/dist/Input.vue.d.ts +4 -0
- package/dist/InputOptions.js +20 -19
- package/dist/InputOptions.js.map +1 -1
- package/dist/InputOptions.vue.d.ts +4 -0
- package/dist/Label.js +1 -1
- package/dist/Label.vue.d.ts +7 -0
- package/dist/{Label.vue_vue_type_script_setup_true_lang-DPnNUfc6.js → Label.vue_vue_type_script_setup_true_lang-CNquF3AP.js} +13 -11
- package/dist/Label.vue_vue_type_script_setup_true_lang-CNquF3AP.js.map +1 -0
- package/dist/ListView.vue.d.ts +48 -12
- package/dist/RadioGroup.js +48 -47
- package/dist/RadioGroup.js.map +1 -1
- package/dist/RadioGroup.vue.d.ts +4 -0
- package/dist/Select.js +2 -1
- package/dist/Select.js.map +1 -1
- package/dist/Select.vue.d.ts +4 -0
- package/dist/TableCell.js +1 -1
- package/dist/TableHeaderCell.js +1 -1
- package/dist/TableHeaderRow.js +1 -1
- package/dist/TableRow.js +1 -1
- package/dist/TextEditor.js +2 -1
- package/dist/TextEditor.js.map +1 -1
- package/dist/TextEditor.vue.d.ts +4 -0
- package/dist/Textarea.js +24 -23
- package/dist/Textarea.js.map +1 -1
- package/dist/Textarea.vue.d.ts +4 -0
- package/package.json +1 -1
- package/dist/Field.vue_vue_type_script_setup_true_lang-DRaKs9Lm.js.map +0 -1
- package/dist/Illustration.vue_vue_type_script_setup_true_lang-BBqgoJO8.js.map +0 -1
- package/dist/Label.vue_vue_type_script_setup_true_lang-DPnNUfc6.js.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as n, computed as r, createBlock as i, openBlock as t, resolveDynamicComponent as d, normalizeClass as c, withCtx as
|
|
2
|
-
import { t as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as n, computed as r, createBlock as i, openBlock as t, resolveDynamicComponent as d, normalizeClass as c, withCtx as f, renderSlot as p, createElementBlock as a, createCommentVNode as u, toDisplayString as m, unref as w } from "vue";
|
|
2
|
+
import { t as y } from "./locale.js";
|
|
3
|
+
const b = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "tw-font-semibold tw-text-red-500",
|
|
6
6
|
title: "Required",
|
|
7
7
|
"aria-label": "required"
|
|
8
|
-
},
|
|
8
|
+
}, h = {
|
|
9
9
|
key: 1,
|
|
10
10
|
class: "tw-text-ice-700"
|
|
11
11
|
}, x = /* @__PURE__ */ n({
|
|
@@ -16,22 +16,24 @@ const h = {
|
|
|
16
16
|
isRequired: { type: Boolean, default: !1 },
|
|
17
17
|
showOptional: { type: Boolean, default: !1 },
|
|
18
18
|
legend: { type: Boolean, default: !1 },
|
|
19
|
-
disabled: { type: Boolean }
|
|
19
|
+
disabled: { type: Boolean },
|
|
20
|
+
isSrOnly: { type: Boolean, default: !1 }
|
|
20
21
|
},
|
|
21
22
|
setup(l) {
|
|
22
23
|
const e = l, o = r(() => e.legend ? "legend" : "label");
|
|
23
|
-
return (s,
|
|
24
|
+
return (s, _) => (t(), i(d(o.value), {
|
|
24
25
|
class: c(["stash-label tw-block tw-truncate tw-text-sm tw-font-medium tw-leading-6", {
|
|
25
26
|
"tw-animate-shake": e.hasError,
|
|
26
27
|
"stash-label--disabled tw-text-ice-700": e.disabled,
|
|
27
|
-
"tw-text-ice-900": !e.disabled
|
|
28
|
+
"tw-text-ice-900": !e.disabled,
|
|
29
|
+
"tw-sr-only": e.isSrOnly
|
|
28
30
|
}]),
|
|
29
31
|
for: e.for,
|
|
30
32
|
"data-test": "stash-label"
|
|
31
33
|
}, {
|
|
32
|
-
default:
|
|
33
|
-
|
|
34
|
-
e.isRequired ? (t(), a("span",
|
|
34
|
+
default: f(() => [
|
|
35
|
+
p(s.$slots, "default"),
|
|
36
|
+
e.isRequired ? (t(), a("span", b, " * ")) : e.showOptional ? (t(), a("span", h, " (" + m(w(y)("ll.optional")) + ")", 1)) : u("", !0)
|
|
35
37
|
]),
|
|
36
38
|
_: 3
|
|
37
39
|
}, 8, ["class", "for"]));
|
|
@@ -40,4 +42,4 @@ const h = {
|
|
|
40
42
|
export {
|
|
41
43
|
x as _
|
|
42
44
|
};
|
|
43
|
-
//# sourceMappingURL=Label.vue_vue_type_script_setup_true_lang-
|
|
45
|
+
//# sourceMappingURL=Label.vue_vue_type_script_setup_true_lang-CNquF3AP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Label.vue_vue_type_script_setup_true_lang-CNquF3AP.js","sources":["../src/components/Label/Label.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed } from 'vue';\n\n import { t } from '../../locale';\n\n export interface LabelProps {\n /**\n * The `id` of the input element that this label is associated with.\n */\n for?: string;\n\n /**\n * Indicates whether the label should be styled as an error.\n */\n hasError?: boolean;\n\n /**\n * Indicates whether the input element that this label is associated with is required.\n */\n isRequired?: boolean;\n\n /**\n * Indicates whether the label should show that the input is optional.\n */\n showOptional?: boolean;\n\n /**\n * Indicates whether the wrapper element to be rendered should be a label or a legend.\n */\n legend?: boolean;\n\n /**\n * Indicates whether the label is disabled.\n */\n disabled?: boolean;\n\n /**\n * Indicates whether the label should be visually hidden (screen reader only).\n */\n isSrOnly?: boolean;\n }\n\n const props = withDefaults(defineProps<LabelProps>(), {\n for: undefined,\n hasError: false,\n isRequired: false,\n showOptional: false,\n legend: false,\n isDisabled: false,\n isSrOnly: false,\n });\n\n const is = computed(() => {\n return props.legend ? 'legend' : 'label';\n });\n</script>\n\n<template>\n <component\n :is=\"is\"\n class=\"stash-label tw-block tw-truncate tw-text-sm tw-font-medium tw-leading-6\"\n :class=\"{\n 'tw-animate-shake': props.hasError,\n 'stash-label--disabled tw-text-ice-700': props.disabled,\n 'tw-text-ice-900': !props.disabled,\n 'tw-sr-only': props.isSrOnly,\n }\"\n :for=\"props.for\"\n data-test=\"stash-label\"\n >\n <!-- @slot The label text -->\n <slot></slot>\n <span v-if=\"props.isRequired\" class=\"tw-font-semibold tw-text-red-500\" title=\"Required\" aria-label=\"required\">\n *\n </span>\n <span v-else-if=\"props.showOptional\" class=\"tw-text-ice-700\"> ({{ t('ll.optional') }})</span>\n </component>\n</template>\n"],"names":["props","__props","is","computed"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA0CE,UAAMA,IAAQC,GAURC,IAAKC,EAAS,MACXH,EAAM,SAAS,WAAW,OAClC;;;;;;;;;;;;;;;;;;;"}
|
package/dist/ListView.vue.d.ts
CHANGED
|
@@ -1798,6 +1798,9 @@ type: PropType<boolean>;
|
|
|
1798
1798
|
showOptionalInLabel: {
|
|
1799
1799
|
type: PropType<boolean>;
|
|
1800
1800
|
};
|
|
1801
|
+
isLabelSrOnly: {
|
|
1802
|
+
type: PropType<boolean>;
|
|
1803
|
+
};
|
|
1801
1804
|
placeholder: {
|
|
1802
1805
|
type: PropType<string>;
|
|
1803
1806
|
default: undefined;
|
|
@@ -1880,6 +1883,9 @@ type: PropType<boolean>;
|
|
|
1880
1883
|
showOptionalInLabel: {
|
|
1881
1884
|
type: PropType<boolean>;
|
|
1882
1885
|
};
|
|
1886
|
+
isLabelSrOnly: {
|
|
1887
|
+
type: PropType<boolean>;
|
|
1888
|
+
};
|
|
1883
1889
|
placeholder: {
|
|
1884
1890
|
type: PropType<string>;
|
|
1885
1891
|
default: undefined;
|
|
@@ -1954,6 +1960,9 @@ type: PropType<boolean>;
|
|
|
1954
1960
|
showOptionalInLabel: {
|
|
1955
1961
|
type: PropType<boolean>;
|
|
1956
1962
|
};
|
|
1963
|
+
isLabelSrOnly: {
|
|
1964
|
+
type: PropType<boolean>;
|
|
1965
|
+
};
|
|
1957
1966
|
placeholder: {
|
|
1958
1967
|
type: PropType<string>;
|
|
1959
1968
|
default: undefined;
|
|
@@ -2041,6 +2050,9 @@ type: PropType<boolean>;
|
|
|
2041
2050
|
showOptionalInLabel: {
|
|
2042
2051
|
type: PropType<boolean>;
|
|
2043
2052
|
};
|
|
2053
|
+
isLabelSrOnly: {
|
|
2054
|
+
type: PropType<boolean>;
|
|
2055
|
+
};
|
|
2044
2056
|
placeholder: {
|
|
2045
2057
|
type: PropType<string>;
|
|
2046
2058
|
default: undefined;
|
|
@@ -2156,6 +2168,9 @@ type: PropType<boolean>;
|
|
|
2156
2168
|
showOptionalInLabel: {
|
|
2157
2169
|
type: PropType<boolean>;
|
|
2158
2170
|
};
|
|
2171
|
+
isLabelSrOnly: {
|
|
2172
|
+
type: PropType<boolean>;
|
|
2173
|
+
};
|
|
2159
2174
|
placeholder: {
|
|
2160
2175
|
type: PropType<string>;
|
|
2161
2176
|
default: undefined;
|
|
@@ -2255,6 +2270,9 @@ type: PropType<boolean>;
|
|
|
2255
2270
|
showOptionalInLabel: {
|
|
2256
2271
|
type: PropType<boolean>;
|
|
2257
2272
|
};
|
|
2273
|
+
isLabelSrOnly: {
|
|
2274
|
+
type: PropType<boolean>;
|
|
2275
|
+
};
|
|
2258
2276
|
placeholder: {
|
|
2259
2277
|
type: PropType<string>;
|
|
2260
2278
|
default: undefined;
|
|
@@ -2446,6 +2464,9 @@ type: PropType<boolean>;
|
|
|
2446
2464
|
showOptionalInLabel: {
|
|
2447
2465
|
type: PropType<boolean>;
|
|
2448
2466
|
};
|
|
2467
|
+
isLabelSrOnly: {
|
|
2468
|
+
type: PropType<boolean>;
|
|
2469
|
+
};
|
|
2449
2470
|
placeholder: {
|
|
2450
2471
|
type: PropType<string>;
|
|
2451
2472
|
default: string;
|
|
@@ -2655,6 +2676,9 @@ type: PropType<boolean>;
|
|
|
2655
2676
|
showOptionalInLabel: {
|
|
2656
2677
|
type: PropType<boolean>;
|
|
2657
2678
|
};
|
|
2679
|
+
isLabelSrOnly: {
|
|
2680
|
+
type: PropType<boolean>;
|
|
2681
|
+
};
|
|
2658
2682
|
placeholder: {
|
|
2659
2683
|
type: PropType<string>;
|
|
2660
2684
|
default: string;
|
|
@@ -2854,6 +2878,9 @@ type: PropType<boolean>;
|
|
|
2854
2878
|
showOptionalInLabel: {
|
|
2855
2879
|
type: PropType<boolean>;
|
|
2856
2880
|
};
|
|
2881
|
+
isLabelSrOnly: {
|
|
2882
|
+
type: PropType<boolean>;
|
|
2883
|
+
};
|
|
2857
2884
|
placeholder: {
|
|
2858
2885
|
type: PropType<string>;
|
|
2859
2886
|
default: string;
|
|
@@ -3513,7 +3540,7 @@ type: PropType<string>;
|
|
|
3513
3540
|
default: string;
|
|
3514
3541
|
};
|
|
3515
3542
|
vignette: {
|
|
3516
|
-
type: PropType<"map" | "search" | "calendar" | "dashboard" | "edit" | "megaphone" | "truck" | "warehouse" | "payments" | "light-bulb" | "messages" | "pie-chart" | "api" | "bank" | "basket" | "brand-menu" | "deals" | "document-search" | "empty-tray" | "graph" | "integrations" | "money-bank" | "notifications" | "orders-empty" | "product-cards" | "product-display" | "search-storefront" | "store" | "todo" | "users" | "warehouse-delivery">;
|
|
3543
|
+
type: PropType<"map" | "search" | "calendar" | "dashboard" | "edit" | "megaphone" | "truck" | "warehouse" | "payments" | "light-bulb" | "messages" | "pie-chart" | "api" | "bank" | "basket" | "brand-menu" | "deals" | "document-search" | "empty-tray" | "graph" | "integrations" | "money-bank" | "notifications" | "orders-empty" | "product-cards" | "product-details" | "product-display" | "search-storefront" | "store" | "todo" | "users" | "warehouse-delivery">;
|
|
3517
3544
|
default: undefined;
|
|
3518
3545
|
};
|
|
3519
3546
|
footnote: {
|
|
@@ -3532,7 +3559,7 @@ src: string;
|
|
|
3532
3559
|
};
|
|
3533
3560
|
text: string;
|
|
3534
3561
|
subtitle: string;
|
|
3535
|
-
vignette: "map" | "search" | "calendar" | "dashboard" | "edit" | "megaphone" | "truck" | "warehouse" | "payments" | "light-bulb" | "messages" | "pie-chart" | "api" | "bank" | "basket" | "brand-menu" | "deals" | "document-search" | "empty-tray" | "graph" | "integrations" | "money-bank" | "notifications" | "orders-empty" | "product-cards" | "product-display" | "search-storefront" | "store" | "todo" | "users" | "warehouse-delivery";
|
|
3562
|
+
vignette: "map" | "search" | "calendar" | "dashboard" | "edit" | "megaphone" | "truck" | "warehouse" | "payments" | "light-bulb" | "messages" | "pie-chart" | "api" | "bank" | "basket" | "brand-menu" | "deals" | "document-search" | "empty-tray" | "graph" | "integrations" | "money-bank" | "notifications" | "orders-empty" | "product-cards" | "product-details" | "product-display" | "search-storefront" | "store" | "todo" | "users" | "warehouse-delivery";
|
|
3536
3563
|
footnote: string;
|
|
3537
3564
|
vignetteSize: number;
|
|
3538
3565
|
}, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
|
|
@@ -3566,7 +3593,7 @@ type: PropType<string>;
|
|
|
3566
3593
|
default: string;
|
|
3567
3594
|
};
|
|
3568
3595
|
vignette: {
|
|
3569
|
-
type: PropType<"map" | "search" | "calendar" | "dashboard" | "edit" | "megaphone" | "truck" | "warehouse" | "payments" | "light-bulb" | "messages" | "pie-chart" | "api" | "bank" | "basket" | "brand-menu" | "deals" | "document-search" | "empty-tray" | "graph" | "integrations" | "money-bank" | "notifications" | "orders-empty" | "product-cards" | "product-display" | "search-storefront" | "store" | "todo" | "users" | "warehouse-delivery">;
|
|
3596
|
+
type: PropType<"map" | "search" | "calendar" | "dashboard" | "edit" | "megaphone" | "truck" | "warehouse" | "payments" | "light-bulb" | "messages" | "pie-chart" | "api" | "bank" | "basket" | "brand-menu" | "deals" | "document-search" | "empty-tray" | "graph" | "integrations" | "money-bank" | "notifications" | "orders-empty" | "product-cards" | "product-details" | "product-display" | "search-storefront" | "store" | "todo" | "users" | "warehouse-delivery">;
|
|
3570
3597
|
default: undefined;
|
|
3571
3598
|
};
|
|
3572
3599
|
footnote: {
|
|
@@ -3585,7 +3612,7 @@ src: string;
|
|
|
3585
3612
|
};
|
|
3586
3613
|
text: string;
|
|
3587
3614
|
subtitle: string;
|
|
3588
|
-
vignette: "map" | "search" | "calendar" | "dashboard" | "edit" | "megaphone" | "truck" | "warehouse" | "payments" | "light-bulb" | "messages" | "pie-chart" | "api" | "bank" | "basket" | "brand-menu" | "deals" | "document-search" | "empty-tray" | "graph" | "integrations" | "money-bank" | "notifications" | "orders-empty" | "product-cards" | "product-display" | "search-storefront" | "store" | "todo" | "users" | "warehouse-delivery";
|
|
3615
|
+
vignette: "map" | "search" | "calendar" | "dashboard" | "edit" | "megaphone" | "truck" | "warehouse" | "payments" | "light-bulb" | "messages" | "pie-chart" | "api" | "bank" | "basket" | "brand-menu" | "deals" | "document-search" | "empty-tray" | "graph" | "integrations" | "money-bank" | "notifications" | "orders-empty" | "product-cards" | "product-details" | "product-display" | "search-storefront" | "store" | "todo" | "users" | "warehouse-delivery";
|
|
3589
3616
|
footnote: string;
|
|
3590
3617
|
vignetteSize: number;
|
|
3591
3618
|
}>;
|
|
@@ -3616,7 +3643,7 @@ type: PropType<string>;
|
|
|
3616
3643
|
default: string;
|
|
3617
3644
|
};
|
|
3618
3645
|
vignette: {
|
|
3619
|
-
type: PropType<"map" | "search" | "calendar" | "dashboard" | "edit" | "megaphone" | "truck" | "warehouse" | "payments" | "light-bulb" | "messages" | "pie-chart" | "api" | "bank" | "basket" | "brand-menu" | "deals" | "document-search" | "empty-tray" | "graph" | "integrations" | "money-bank" | "notifications" | "orders-empty" | "product-cards" | "product-display" | "search-storefront" | "store" | "todo" | "users" | "warehouse-delivery">;
|
|
3646
|
+
type: PropType<"map" | "search" | "calendar" | "dashboard" | "edit" | "megaphone" | "truck" | "warehouse" | "payments" | "light-bulb" | "messages" | "pie-chart" | "api" | "bank" | "basket" | "brand-menu" | "deals" | "document-search" | "empty-tray" | "graph" | "integrations" | "money-bank" | "notifications" | "orders-empty" | "product-cards" | "product-details" | "product-display" | "search-storefront" | "store" | "todo" | "users" | "warehouse-delivery">;
|
|
3620
3647
|
default: undefined;
|
|
3621
3648
|
};
|
|
3622
3649
|
footnote: {
|
|
@@ -3635,7 +3662,7 @@ src: string;
|
|
|
3635
3662
|
};
|
|
3636
3663
|
text: string;
|
|
3637
3664
|
subtitle: string;
|
|
3638
|
-
vignette: "map" | "search" | "calendar" | "dashboard" | "edit" | "megaphone" | "truck" | "warehouse" | "payments" | "light-bulb" | "messages" | "pie-chart" | "api" | "bank" | "basket" | "brand-menu" | "deals" | "document-search" | "empty-tray" | "graph" | "integrations" | "money-bank" | "notifications" | "orders-empty" | "product-cards" | "product-display" | "search-storefront" | "store" | "todo" | "users" | "warehouse-delivery";
|
|
3665
|
+
vignette: "map" | "search" | "calendar" | "dashboard" | "edit" | "megaphone" | "truck" | "warehouse" | "payments" | "light-bulb" | "messages" | "pie-chart" | "api" | "bank" | "basket" | "brand-menu" | "deals" | "document-search" | "empty-tray" | "graph" | "integrations" | "money-bank" | "notifications" | "orders-empty" | "product-cards" | "product-details" | "product-display" | "search-storefront" | "store" | "todo" | "users" | "warehouse-delivery";
|
|
3639
3666
|
footnote: string;
|
|
3640
3667
|
vignetteSize: number;
|
|
3641
3668
|
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
@@ -4530,6 +4557,9 @@ type: PropType<boolean>;
|
|
|
4530
4557
|
showOptionalInLabel: {
|
|
4531
4558
|
type: PropType<boolean>;
|
|
4532
4559
|
};
|
|
4560
|
+
isLabelSrOnly: {
|
|
4561
|
+
type: PropType<boolean>;
|
|
4562
|
+
};
|
|
4533
4563
|
placeholder: {
|
|
4534
4564
|
type: PropType<string>;
|
|
4535
4565
|
default: undefined;
|
|
@@ -4612,6 +4642,9 @@ type: PropType<boolean>;
|
|
|
4612
4642
|
showOptionalInLabel: {
|
|
4613
4643
|
type: PropType<boolean>;
|
|
4614
4644
|
};
|
|
4645
|
+
isLabelSrOnly: {
|
|
4646
|
+
type: PropType<boolean>;
|
|
4647
|
+
};
|
|
4615
4648
|
placeholder: {
|
|
4616
4649
|
type: PropType<string>;
|
|
4617
4650
|
default: undefined;
|
|
@@ -4686,6 +4719,9 @@ type: PropType<boolean>;
|
|
|
4686
4719
|
showOptionalInLabel: {
|
|
4687
4720
|
type: PropType<boolean>;
|
|
4688
4721
|
};
|
|
4722
|
+
isLabelSrOnly: {
|
|
4723
|
+
type: PropType<boolean>;
|
|
4724
|
+
};
|
|
4689
4725
|
placeholder: {
|
|
4690
4726
|
type: PropType<string>;
|
|
4691
4727
|
default: undefined;
|
|
@@ -5308,7 +5344,7 @@ type: PropType<string>;
|
|
|
5308
5344
|
default: string;
|
|
5309
5345
|
};
|
|
5310
5346
|
vignette: {
|
|
5311
|
-
type: PropType<"map" | "search" | "calendar" | "dashboard" | "edit" | "megaphone" | "truck" | "warehouse" | "payments" | "light-bulb" | "messages" | "pie-chart" | "api" | "bank" | "basket" | "brand-menu" | "deals" | "document-search" | "empty-tray" | "graph" | "integrations" | "money-bank" | "notifications" | "orders-empty" | "product-cards" | "product-display" | "search-storefront" | "store" | "todo" | "users" | "warehouse-delivery">;
|
|
5347
|
+
type: PropType<"map" | "search" | "calendar" | "dashboard" | "edit" | "megaphone" | "truck" | "warehouse" | "payments" | "light-bulb" | "messages" | "pie-chart" | "api" | "bank" | "basket" | "brand-menu" | "deals" | "document-search" | "empty-tray" | "graph" | "integrations" | "money-bank" | "notifications" | "orders-empty" | "product-cards" | "product-details" | "product-display" | "search-storefront" | "store" | "todo" | "users" | "warehouse-delivery">;
|
|
5312
5348
|
default: undefined;
|
|
5313
5349
|
};
|
|
5314
5350
|
footnote: {
|
|
@@ -5327,7 +5363,7 @@ src: string;
|
|
|
5327
5363
|
};
|
|
5328
5364
|
text: string;
|
|
5329
5365
|
subtitle: string;
|
|
5330
|
-
vignette: "map" | "search" | "calendar" | "dashboard" | "edit" | "megaphone" | "truck" | "warehouse" | "payments" | "light-bulb" | "messages" | "pie-chart" | "api" | "bank" | "basket" | "brand-menu" | "deals" | "document-search" | "empty-tray" | "graph" | "integrations" | "money-bank" | "notifications" | "orders-empty" | "product-cards" | "product-display" | "search-storefront" | "store" | "todo" | "users" | "warehouse-delivery";
|
|
5366
|
+
vignette: "map" | "search" | "calendar" | "dashboard" | "edit" | "megaphone" | "truck" | "warehouse" | "payments" | "light-bulb" | "messages" | "pie-chart" | "api" | "bank" | "basket" | "brand-menu" | "deals" | "document-search" | "empty-tray" | "graph" | "integrations" | "money-bank" | "notifications" | "orders-empty" | "product-cards" | "product-details" | "product-display" | "search-storefront" | "store" | "todo" | "users" | "warehouse-delivery";
|
|
5331
5367
|
footnote: string;
|
|
5332
5368
|
vignetteSize: number;
|
|
5333
5369
|
}, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
|
|
@@ -5361,7 +5397,7 @@ type: PropType<string>;
|
|
|
5361
5397
|
default: string;
|
|
5362
5398
|
};
|
|
5363
5399
|
vignette: {
|
|
5364
|
-
type: PropType<"map" | "search" | "calendar" | "dashboard" | "edit" | "megaphone" | "truck" | "warehouse" | "payments" | "light-bulb" | "messages" | "pie-chart" | "api" | "bank" | "basket" | "brand-menu" | "deals" | "document-search" | "empty-tray" | "graph" | "integrations" | "money-bank" | "notifications" | "orders-empty" | "product-cards" | "product-display" | "search-storefront" | "store" | "todo" | "users" | "warehouse-delivery">;
|
|
5400
|
+
type: PropType<"map" | "search" | "calendar" | "dashboard" | "edit" | "megaphone" | "truck" | "warehouse" | "payments" | "light-bulb" | "messages" | "pie-chart" | "api" | "bank" | "basket" | "brand-menu" | "deals" | "document-search" | "empty-tray" | "graph" | "integrations" | "money-bank" | "notifications" | "orders-empty" | "product-cards" | "product-details" | "product-display" | "search-storefront" | "store" | "todo" | "users" | "warehouse-delivery">;
|
|
5365
5401
|
default: undefined;
|
|
5366
5402
|
};
|
|
5367
5403
|
footnote: {
|
|
@@ -5380,7 +5416,7 @@ src: string;
|
|
|
5380
5416
|
};
|
|
5381
5417
|
text: string;
|
|
5382
5418
|
subtitle: string;
|
|
5383
|
-
vignette: "map" | "search" | "calendar" | "dashboard" | "edit" | "megaphone" | "truck" | "warehouse" | "payments" | "light-bulb" | "messages" | "pie-chart" | "api" | "bank" | "basket" | "brand-menu" | "deals" | "document-search" | "empty-tray" | "graph" | "integrations" | "money-bank" | "notifications" | "orders-empty" | "product-cards" | "product-display" | "search-storefront" | "store" | "todo" | "users" | "warehouse-delivery";
|
|
5419
|
+
vignette: "map" | "search" | "calendar" | "dashboard" | "edit" | "megaphone" | "truck" | "warehouse" | "payments" | "light-bulb" | "messages" | "pie-chart" | "api" | "bank" | "basket" | "brand-menu" | "deals" | "document-search" | "empty-tray" | "graph" | "integrations" | "money-bank" | "notifications" | "orders-empty" | "product-cards" | "product-details" | "product-display" | "search-storefront" | "store" | "todo" | "users" | "warehouse-delivery";
|
|
5384
5420
|
footnote: string;
|
|
5385
5421
|
vignetteSize: number;
|
|
5386
5422
|
}>;
|
|
@@ -5411,7 +5447,7 @@ type: PropType<string>;
|
|
|
5411
5447
|
default: string;
|
|
5412
5448
|
};
|
|
5413
5449
|
vignette: {
|
|
5414
|
-
type: PropType<"map" | "search" | "calendar" | "dashboard" | "edit" | "megaphone" | "truck" | "warehouse" | "payments" | "light-bulb" | "messages" | "pie-chart" | "api" | "bank" | "basket" | "brand-menu" | "deals" | "document-search" | "empty-tray" | "graph" | "integrations" | "money-bank" | "notifications" | "orders-empty" | "product-cards" | "product-display" | "search-storefront" | "store" | "todo" | "users" | "warehouse-delivery">;
|
|
5450
|
+
type: PropType<"map" | "search" | "calendar" | "dashboard" | "edit" | "megaphone" | "truck" | "warehouse" | "payments" | "light-bulb" | "messages" | "pie-chart" | "api" | "bank" | "basket" | "brand-menu" | "deals" | "document-search" | "empty-tray" | "graph" | "integrations" | "money-bank" | "notifications" | "orders-empty" | "product-cards" | "product-details" | "product-display" | "search-storefront" | "store" | "todo" | "users" | "warehouse-delivery">;
|
|
5415
5451
|
default: undefined;
|
|
5416
5452
|
};
|
|
5417
5453
|
footnote: {
|
|
@@ -5430,7 +5466,7 @@ src: string;
|
|
|
5430
5466
|
};
|
|
5431
5467
|
text: string;
|
|
5432
5468
|
subtitle: string;
|
|
5433
|
-
vignette: "map" | "search" | "calendar" | "dashboard" | "edit" | "megaphone" | "truck" | "warehouse" | "payments" | "light-bulb" | "messages" | "pie-chart" | "api" | "bank" | "basket" | "brand-menu" | "deals" | "document-search" | "empty-tray" | "graph" | "integrations" | "money-bank" | "notifications" | "orders-empty" | "product-cards" | "product-display" | "search-storefront" | "store" | "todo" | "users" | "warehouse-delivery";
|
|
5469
|
+
vignette: "map" | "search" | "calendar" | "dashboard" | "edit" | "megaphone" | "truck" | "warehouse" | "payments" | "light-bulb" | "messages" | "pie-chart" | "api" | "bank" | "basket" | "brand-menu" | "deals" | "document-search" | "empty-tray" | "graph" | "integrations" | "money-bank" | "notifications" | "orders-empty" | "product-cards" | "product-details" | "product-display" | "search-storefront" | "store" | "todo" | "users" | "warehouse-delivery";
|
|
5434
5470
|
footnote: string;
|
|
5435
5471
|
vignetteSize: number;
|
|
5436
5472
|
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
package/dist/RadioGroup.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { defineComponent as x, inject as g, useCssModule as V, createElementBlock as c, openBlock as
|
|
1
|
+
import { defineComponent as x, inject as g, useCssModule as V, createElementBlock as c, openBlock as s, normalizeClass as v, unref as e, Fragment as R, renderList as I, createElementVNode as u, toDisplayString as $, provide as S, computed as m, ref as C, useTemplateRef as j, onMounted as D, onUnmounted as q, watchEffect as A, createBlock as M, mergeProps as L, withCtx as N, renderSlot as W, resolveDynamicComponent as P } from "vue";
|
|
2
2
|
import U from "lodash-es/uniqueId";
|
|
3
3
|
import { R as k } from "./RadioGroup.keys-CqfiKkNz.js";
|
|
4
4
|
import { _ as B } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
-
import { _ as F } from "./Field.vue_vue_type_script_setup_true_lang-
|
|
5
|
+
import { _ as F } from "./Field.vue_vue_type_script_setup_true_lang-DI6z3AE9.js";
|
|
6
6
|
const J = ["id", "name", "value", "checked", "disabled"], H = ["for"], K = /* @__PURE__ */ x({
|
|
7
7
|
__name: "VariantButton",
|
|
8
8
|
setup(p) {
|
|
9
9
|
const i = g(k.key);
|
|
10
10
|
if (!i)
|
|
11
11
|
throw new Error("VariantButton must be used with a RadioGroup instance.");
|
|
12
|
-
const { name: o, disabled: a, fullWidth:
|
|
13
|
-
return (h, n) => (
|
|
12
|
+
const { name: o, disabled: a, fullWidth: b, modelValue: d, options: f, update: l } = i, _ = V();
|
|
13
|
+
return (h, n) => (s(), c("div", {
|
|
14
14
|
class: v(["tw-flex", e(_).root])
|
|
15
15
|
}, [
|
|
16
|
-
(
|
|
16
|
+
(s(!0), c(R, null, I(e(f), (t) => (s(), c("div", {
|
|
17
17
|
key: `${e(o)}-${t.id}`,
|
|
18
|
-
class: v([{ "tw-w-full": e(
|
|
18
|
+
class: v([{ "tw-w-full": e(b) }])
|
|
19
19
|
}, [
|
|
20
20
|
u("input", {
|
|
21
21
|
id: `${e(o)}-${t.id}`,
|
|
@@ -26,7 +26,7 @@ const J = ["id", "name", "value", "checked", "disabled"], H = ["for"], K = /* @_
|
|
|
26
26
|
checked: e(d) === t.value,
|
|
27
27
|
disabled: e(a) || t.disabled,
|
|
28
28
|
onInput: n[0] || (n[0] = //@ts-ignore
|
|
29
|
-
(...
|
|
29
|
+
(...w) => e(l) && e(l)(...w))
|
|
30
30
|
}, null, 40, J),
|
|
31
31
|
u("label", {
|
|
32
32
|
for: `${e(o)}-${t.id}`
|
|
@@ -44,13 +44,13 @@ const J = ["id", "name", "value", "checked", "disabled"], H = ["for"], K = /* @_
|
|
|
44
44
|
const i = g(k.key);
|
|
45
45
|
if (!i)
|
|
46
46
|
throw new Error("VariantChip must be used with a RadioGroup instance.");
|
|
47
|
-
const { name: o, disabled: a, fullWidth:
|
|
48
|
-
return (h, n) => (
|
|
47
|
+
const { name: o, disabled: a, fullWidth: b, modelValue: d, options: f, update: l } = i, _ = V();
|
|
48
|
+
return (h, n) => (s(), c("div", {
|
|
49
49
|
class: v(["tw-my-1.5 tw-flex tw-flex-wrap", e(_).root])
|
|
50
50
|
}, [
|
|
51
|
-
(
|
|
51
|
+
(s(!0), c(R, null, I(e(f), (t) => (s(), c("div", {
|
|
52
52
|
key: `${e(o)}-${t.id}`,
|
|
53
|
-
class: v([{ "tw-w-full": e(
|
|
53
|
+
class: v([{ "tw-w-full": e(b) }])
|
|
54
54
|
}, [
|
|
55
55
|
u("input", {
|
|
56
56
|
id: `${e(o)}-${t.id}`,
|
|
@@ -61,7 +61,7 @@ const J = ["id", "name", "value", "checked", "disabled"], H = ["for"], K = /* @_
|
|
|
61
61
|
checked: e(d) === t.value,
|
|
62
62
|
disabled: e(a) || t.disabled,
|
|
63
63
|
onInput: n[0] || (n[0] = //@ts-ignore
|
|
64
|
-
(...
|
|
64
|
+
(...w) => e(l) && e(l)(...w))
|
|
65
65
|
}, null, 40, ee),
|
|
66
66
|
u("label", {
|
|
67
67
|
for: `${e(o)}-${t.id}`
|
|
@@ -71,21 +71,21 @@ const J = ["id", "name", "value", "checked", "disabled"], H = ["for"], K = /* @_
|
|
|
71
71
|
}
|
|
72
72
|
}), oe = "_root_kagur_2", re = {
|
|
73
73
|
root: oe
|
|
74
|
-
},
|
|
74
|
+
}, le = {
|
|
75
75
|
$style: re
|
|
76
|
-
},
|
|
76
|
+
}, se = /* @__PURE__ */ B(ae, [["__cssModules", le]]), ne = ["id", "name", "value", "checked", "disabled"], ie = ["for"], de = /* @__PURE__ */ x({
|
|
77
77
|
__name: "VariantRadio",
|
|
78
78
|
setup(p) {
|
|
79
79
|
const i = g(k.key);
|
|
80
80
|
if (!i)
|
|
81
81
|
throw new Error("VariantRadio must be used with a RadioGroup instance.");
|
|
82
|
-
const { name: o, disabled: a, fullWidth:
|
|
83
|
-
return (h, n) => (
|
|
82
|
+
const { name: o, disabled: a, fullWidth: b, modelValue: d, options: f, update: l } = i, _ = V();
|
|
83
|
+
return (h, n) => (s(), c("div", {
|
|
84
84
|
class: v(["tw-flex tw-flex-wrap", e(_).root])
|
|
85
85
|
}, [
|
|
86
|
-
(
|
|
86
|
+
(s(!0), c(R, null, I(e(f), (t) => (s(), c("div", {
|
|
87
87
|
key: `${e(o)}-${t.id}`,
|
|
88
|
-
class: v([{ "tw-w-full": e(
|
|
88
|
+
class: v([{ "tw-w-full": e(b) }])
|
|
89
89
|
}, [
|
|
90
90
|
u("input", {
|
|
91
91
|
id: `${e(o)}-${t.id}`,
|
|
@@ -95,7 +95,7 @@ const J = ["id", "name", "value", "checked", "disabled"], H = ["for"], K = /* @_
|
|
|
95
95
|
checked: e(d) === t.value,
|
|
96
96
|
disabled: e(a) || t.disabled,
|
|
97
97
|
onInput: n[0] || (n[0] = //@ts-ignore
|
|
98
|
-
(...
|
|
98
|
+
(...w) => e(l) && e(l)(...w))
|
|
99
99
|
}, null, 40, ne),
|
|
100
100
|
u("label", {
|
|
101
101
|
for: `${e(o)}-${t.id}`
|
|
@@ -107,19 +107,19 @@ const J = ["id", "name", "value", "checked", "disabled"], H = ["for"], K = /* @_
|
|
|
107
107
|
root: ue
|
|
108
108
|
}, _e = {
|
|
109
109
|
$style: ce
|
|
110
|
-
}, pe = /* @__PURE__ */ B(de, [["__cssModules", _e]]), ve = ["for"], fe = ["id", "name", "value", "checked", "disabled"], me = { class: "tw-m-0 tw-text-ice-900" },
|
|
110
|
+
}, pe = /* @__PURE__ */ B(de, [["__cssModules", _e]]), ve = ["for"], fe = ["id", "name", "value", "checked", "disabled"], me = { class: "tw-m-0 tw-text-ice-900" }, be = { class: "tw-m-0 tw-text-ice-700" }, we = /* @__PURE__ */ x({
|
|
111
111
|
__name: "VariantTile",
|
|
112
112
|
setup(p) {
|
|
113
113
|
const i = g(k.key);
|
|
114
114
|
if (!i)
|
|
115
115
|
throw new Error("VariantTile must be used with a RadioGroup instance.");
|
|
116
|
-
const { name: o, disabled: a, fullWidth:
|
|
117
|
-
return (h, n) => (
|
|
116
|
+
const { name: o, disabled: a, fullWidth: b, modelValue: d, options: f, update: l } = i, _ = V();
|
|
117
|
+
return (h, n) => (s(), c("div", {
|
|
118
118
|
class: v(["tw-flex tw-flex-wrap", e(_).root])
|
|
119
119
|
}, [
|
|
120
|
-
(
|
|
120
|
+
(s(!0), c(R, null, I(e(f), (t) => (s(), c("label", {
|
|
121
121
|
key: `${e(o)}-${t.id}`,
|
|
122
|
-
class: v([e(_)["tile-container"], { "tw-w-full": e(
|
|
122
|
+
class: v([e(_)["tile-container"], { "tw-w-full": e(b) }]),
|
|
123
123
|
for: `${e(o)}-${t.id}`
|
|
124
124
|
}, [
|
|
125
125
|
u("div", {
|
|
@@ -140,7 +140,7 @@ const J = ["id", "name", "value", "checked", "disabled"], H = ["for"], K = /* @_
|
|
|
140
140
|
checked: e(d) === t.value,
|
|
141
141
|
disabled: e(a) || t.disabled,
|
|
142
142
|
onInput: n[0] || (n[0] = //@ts-ignore
|
|
143
|
-
(...
|
|
143
|
+
(...w) => e(l) && e(l)(...w))
|
|
144
144
|
}, null, 40, fe),
|
|
145
145
|
u("div", null, [
|
|
146
146
|
u("span", null, $(t.text), 1)
|
|
@@ -156,7 +156,7 @@ const J = ["id", "name", "value", "checked", "disabled"], H = ["for"], K = /* @_
|
|
|
156
156
|
]])
|
|
157
157
|
}, [
|
|
158
158
|
u("p", me, $(t.subTitle), 1),
|
|
159
|
-
u("p",
|
|
159
|
+
u("p", be, $(t.subText), 1)
|
|
160
160
|
], 2)
|
|
161
161
|
], 10, ve))), 128))
|
|
162
162
|
], 2));
|
|
@@ -168,7 +168,7 @@ const J = ["id", "name", "value", "checked", "disabled"], H = ["for"], K = /* @_
|
|
|
168
168
|
"tile-body": "_tile-body_1sppn_31"
|
|
169
169
|
}, ye = {
|
|
170
170
|
$style: $e
|
|
171
|
-
}, xe = /* @__PURE__ */ B(
|
|
171
|
+
}, xe = /* @__PURE__ */ B(we, [["__cssModules", ye]]);
|
|
172
172
|
var y = /* @__PURE__ */ ((p) => (p.Radio = "radio", p.Button = "button", p.Chip = "chip", p.Tile = "tile", p))(y || {});
|
|
173
173
|
const ke = /* @__PURE__ */ x({
|
|
174
174
|
__name: "RadioGroup",
|
|
@@ -188,6 +188,7 @@ const ke = /* @__PURE__ */ x({
|
|
|
188
188
|
isRequired: { type: Boolean },
|
|
189
189
|
label: {},
|
|
190
190
|
showOptionalInLabel: { type: Boolean },
|
|
191
|
+
isLabelSrOnly: { type: Boolean },
|
|
191
192
|
fieldset: { type: Boolean },
|
|
192
193
|
isDisabled: { type: Boolean },
|
|
193
194
|
disabled: { type: Boolean }
|
|
@@ -196,12 +197,12 @@ const ke = /* @__PURE__ */ x({
|
|
|
196
197
|
setup(p, { emit: i }) {
|
|
197
198
|
const o = {
|
|
198
199
|
[y.Button]: Z,
|
|
199
|
-
[y.Chip]:
|
|
200
|
+
[y.Chip]: se,
|
|
200
201
|
[y.Radio]: pe,
|
|
201
202
|
[y.Tile]: xe
|
|
202
|
-
}, a = p,
|
|
203
|
+
}, a = p, b = i;
|
|
203
204
|
function d(r) {
|
|
204
|
-
|
|
205
|
+
b("update:modelValue", r.target.value);
|
|
205
206
|
}
|
|
206
207
|
const f = U("radio-group-field-error-");
|
|
207
208
|
S(k.key, {
|
|
@@ -211,38 +212,38 @@ const ke = /* @__PURE__ */ x({
|
|
|
211
212
|
modelValue: m(() => a.modelValue),
|
|
212
213
|
options: m(() => a.options),
|
|
213
214
|
variant: m(() => a.variant),
|
|
214
|
-
orientation: m(() =>
|
|
215
|
+
orientation: m(() => l.value),
|
|
215
216
|
update: d
|
|
216
217
|
});
|
|
217
|
-
const
|
|
218
|
+
const l = C(a.orientation), _ = m(() => ({
|
|
218
219
|
"tw-flex-wrap": a.variant !== "button",
|
|
219
|
-
"tw-gap-x-1.5 tw-gap-y-3": a.variant === "chip" &&
|
|
220
|
-
"tw-gap-6": a.variant === "radio" || a.variant === "tile" || a.variant === "chip" &&
|
|
221
|
-
"tw-flex-col":
|
|
220
|
+
"tw-gap-x-1.5 tw-gap-y-3": a.variant === "chip" && l.value === "horizontal",
|
|
221
|
+
"tw-gap-6": a.variant === "radio" || a.variant === "tile" || a.variant === "chip" && l.value === "vertical",
|
|
222
|
+
"tw-flex-col": l.value === "vertical"
|
|
222
223
|
})), h = C(null), n = j("radioGroup"), t = m(() => {
|
|
223
224
|
var r;
|
|
224
225
|
return (r = n.value) == null ? void 0 : r.$el.parentElement;
|
|
225
|
-
}),
|
|
226
|
+
}), w = m(() => {
|
|
226
227
|
var r;
|
|
227
228
|
return a.variant !== "button" ? [] : Array.from((r = n.value) == null ? void 0 : r.$el.querySelectorAll("[data-variant-button]")) || [];
|
|
228
229
|
});
|
|
229
230
|
function E() {
|
|
230
|
-
return
|
|
231
|
-
const
|
|
232
|
-
return r +
|
|
231
|
+
return w.value.reduce((r, T) => {
|
|
232
|
+
const z = T.getBoundingClientRect().width;
|
|
233
|
+
return r + z;
|
|
233
234
|
}, 0);
|
|
234
235
|
}
|
|
235
|
-
const G = C(0),
|
|
236
|
-
|
|
236
|
+
const G = C(0), O = (r) => {
|
|
237
|
+
l.value = G.value > r.contentBoxSize[0].inlineSize ? "vertical" : a.orientation;
|
|
237
238
|
};
|
|
238
239
|
return D(() => {
|
|
239
|
-
a.variant === "button" && !a.fullWidth && (G.value = E(), h.value = new ResizeObserver((r) =>
|
|
240
|
+
a.variant === "button" && !a.fullWidth && (G.value = E(), h.value = new ResizeObserver((r) => O(r[0])), h.value.observe(t.value));
|
|
240
241
|
}), q(() => {
|
|
241
242
|
var r;
|
|
242
243
|
a.variant === "button" && h.value && ((r = h.value) == null || r.disconnect());
|
|
243
244
|
}), A(() => {
|
|
244
|
-
|
|
245
|
-
}), (r, T) => (
|
|
245
|
+
l.value = a.orientation;
|
|
246
|
+
}), (r, T) => (s(), M(F, L(a, {
|
|
246
247
|
ref: "radioGroup",
|
|
247
248
|
class: "stash-radio-group",
|
|
248
249
|
"data-test": "stash-radio-group",
|
|
@@ -252,10 +253,10 @@ const ke = /* @__PURE__ */ x({
|
|
|
252
253
|
role: "radiogroup",
|
|
253
254
|
fieldset: ""
|
|
254
255
|
}), {
|
|
255
|
-
default:
|
|
256
|
+
default: N(() => [
|
|
256
257
|
a.options ? W(r.$slots, "default", { key: 0 }, () => [
|
|
257
|
-
(
|
|
258
|
-
], !0) : (
|
|
258
|
+
(s(), M(P(o[a.variant])))
|
|
259
|
+
], !0) : (s(), c("div", {
|
|
259
260
|
key: 1,
|
|
260
261
|
class: v(["tw-flex", _.value]),
|
|
261
262
|
"data-test": "stash-radio-group|default-slot"
|