fds-vue-core 2.1.40 → 2.1.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/fds-vue-core.cjs.js
CHANGED
|
@@ -10120,7 +10120,7 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
|
10120
10120
|
const modelValue = vue.useModel(__props, "modelValue");
|
|
10121
10121
|
const props = __props;
|
|
10122
10122
|
const emit = __emit;
|
|
10123
|
-
const { id, placeholder, attrs } = useAttrsWithDefaults(props);
|
|
10123
|
+
const { id, placeholder, attrs, disabled } = useAttrsWithDefaults(props);
|
|
10124
10124
|
const autoId = `fds-select-${Math.random().toString(36).slice(2, 9)}`;
|
|
10125
10125
|
const selectId = vue.computed(() => id.value && id.value.trim() !== "" ? id.value : autoId);
|
|
10126
10126
|
const labelAttrs = vue.computed(() => {
|
|
@@ -10143,7 +10143,7 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
|
10143
10143
|
return {
|
|
10144
10144
|
...filtered,
|
|
10145
10145
|
id: selectId.value,
|
|
10146
|
-
disabled:
|
|
10146
|
+
disabled: disabled.value,
|
|
10147
10147
|
"aria-invalid": props.valid === false ? "true" : void 0
|
|
10148
10148
|
};
|
|
10149
10149
|
});
|
|
@@ -10151,15 +10151,15 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
|
10151
10151
|
const hasDefaultSlot = vue.computed(() => !!slots.default);
|
|
10152
10152
|
const externalClass = vue.computed(() => attrs.class);
|
|
10153
10153
|
const showInvalidMessage = vue.computed(
|
|
10154
|
-
() => props.valid === false && !props.optional && props.invalidMessage && !
|
|
10154
|
+
() => props.valid === false && !props.optional && props.invalidMessage && !disabled.value
|
|
10155
10155
|
);
|
|
10156
|
-
const isInvalid = vue.computed(() => props.valid === false && !props.optional && !
|
|
10156
|
+
const isInvalid = vue.computed(() => props.valid === false && !props.optional && !disabled.value);
|
|
10157
10157
|
const selectClasses = vue.computed(() => [
|
|
10158
10158
|
"block w-full rounded-md border border-gray-500 px-3 py-2 pr-10 h-12",
|
|
10159
10159
|
"focus:outline-2 focus:outline-blue-500 focus:border-transparent",
|
|
10160
10160
|
"appearance-none",
|
|
10161
|
-
|
|
10162
|
-
isInvalid.value && !
|
|
10161
|
+
disabled.value ? "outline-dashed text-gray-600 outline-2 -outline-offset-2 outline-gray-400 cursor-not-allowed border-transparent" : "bg-white cursor-pointer",
|
|
10162
|
+
isInvalid.value && !disabled.value && "outline-2 -outline-offset-2 outline-red-600 text-red-600"
|
|
10163
10163
|
]);
|
|
10164
10164
|
const internalValue = vue.computed({
|
|
10165
10165
|
get: () => modelValue.value !== void 0 ? modelValue.value : props.value ?? "",
|
|
@@ -10208,9 +10208,9 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
|
10208
10208
|
name: "arrowDown",
|
|
10209
10209
|
size: 24,
|
|
10210
10210
|
class: vue.normalizeClass({
|
|
10211
|
-
"fill-gray-500":
|
|
10212
|
-
"fill-red-500": isInvalid.value && !
|
|
10213
|
-
"fill-blue-500": !
|
|
10211
|
+
"fill-gray-500": vue.unref(disabled),
|
|
10212
|
+
"fill-red-500": isInvalid.value && !vue.unref(disabled),
|
|
10213
|
+
"fill-blue-500": !vue.unref(disabled) && !isInvalid.value
|
|
10214
10214
|
})
|
|
10215
10215
|
}, null, 8, ["class"])
|
|
10216
10216
|
])
|