@opentiny/vue-radio
Advanced tools
Comparing version 3.9.0 to 3.10.0
@@ -73,3 +73,3 @@ function _extends() { | ||
}); | ||
var version = "3.9.0"; | ||
var version = "3.10.0"; | ||
Radio.model = { | ||
@@ -76,0 +76,0 @@ prop: "modelValue", |
import { renderless, api } from "@opentiny/vue-renderless/radio/vue"; | ||
import { defineComponent, props, setup as _setup } from "@opentiny/vue-common"; | ||
import { IconRadio, IconRadioselected, IconMobileRadio, IconMobileRadioSelected } from "@opentiny/vue-icon"; | ||
import { iconRadio, iconRadioselected, iconMobileRadio, iconMobileRadioSelected } from "@opentiny/vue-icon"; | ||
import { resolveComponent, openBlock, createElementBlock, mergeProps, withKeys, withModifiers, createElementVNode, normalizeClass, createBlock, withDirectives, vModelRadio, renderSlot, createTextVNode, toDisplayString } from "vue"; | ||
@@ -51,17 +51,25 @@ function _createForOfIteratorHelperLoose(o, allowArrayLike) { | ||
var classes = { | ||
"radio-default": "radio inline-flex items-center justify-between flex-auto align-middle leading-4 cursor-pointer sm:flex-row py-px sm:py-0 sm:h-fit h-[2.875rem]", | ||
"radio-left-circle": "relative flex-1 text-center sm:w-4 sm:h-4", | ||
"radio-left-circle-child": "inline-flex p-3 sm:p-0", | ||
"icon-radioselected-common": "w-5 h-5 sm:w-4 sm:h-4 fill-color-bg-1 flex-1 [&_circle:nth-of-type(1)]:fill-color-bg-1", | ||
"radio-default": "radio inline-flex items-center align-middle leading-4 cursor-pointer sm:flex-row py-px sm:py-0 sm:h-fit h-11", | ||
"radio-label-common": "relative text-center", | ||
"radio-label-size-common": "sm:w-4 sm:h-4", | ||
"radio-label-size-medium": "sm:w-6 sm:h-6", | ||
"radio-label-circle": "inline-flex p-3 sm:p-0", | ||
"icon-radioselected-common": "w-5 h-5 fill-color-bg-1 flex-1 [&_circle:nth-of-type(1)]:fill-color-bg-1", | ||
"icon-radioselected-size-common": "sm:w-4 sm:h-4", | ||
"icon-radioselected-size-medium": "sm:w-6 sm:h-6", | ||
"icon-radioselected-disabled": "fill-color-brand-disabled cursor-not-allowed [&_circle:nth-of-type(1)]:fill-color-bg-1", | ||
"icon-radioselected-default": "fill-color-brand", | ||
"icon-radio-common": "w-5 h-5 sm:w-4 sm:h-4 flex-1", | ||
"icon-radio-common": "w-5 h-5 flex-1", | ||
"icon-radio-size-common": "sm:w-4 sm:h-4", | ||
"icon-radio-size-medium": "sm:w-6 sm:h-6", | ||
"icon-radio-default": "fill-color-bg-1 [&_path:nth-of-type(1)]:fill-color-icon-secondary", | ||
"icon-radio-disabled": "[&_path:nth-of-type(1)]:fill-color-icon-disabled [&_path:nth-of-type(2)]:fill-color-bg-3 cursor-not-allowed", | ||
"icon-radio-disabled": "[&_path:nth-of-type(1)]:fill-color-icon-disabled [&_path:nth-of-type(2)]:fill-color-bg-3 cursor-not-allowed", | ||
"mobile-icon-radioselected-disabled": "fill-color-bg-1 [&_path:nth-of-type(1)]:fill-color-brand-disabled cursor-not-allowed", | ||
"mobile-icon-radioselected-default": "fill-color-bg-1 [&_path:nth-of-type(1)]:fill-color-brand", | ||
"mobile-icon-radio-default": "[&_path:nth-of-type(2)]:fill-color-none-hover [&_path:nth-of-type(1)]:fill-color-bg-1", | ||
"mobile-icon-radio-disabled": "[&_path:nth-of-type(2)]:fill-color-icon-disabled [&_path:nth-of-type(1)]:fill-color-bg-3 cursor-not-allowed", | ||
"radio-input": "absolute inset-0 w-0 h-0 -z-10 opacity-0", | ||
"radio-text-common": "sm:h-4 text-center text-color-text-primary flex-auto align-middle text-sm sm:text-xs", | ||
"mobile-icon-radio-disabled": "[&_path:nth-of-type(2)]:fill-color-icon-disabled [&_path:nth-of-type(1)]:fill-color-bg-3 cursor-not-allowed", | ||
"radio-input": "absolute left-0 right-0 top-0 bottom-0 w-0 h-0 -z-10 opacity-0", | ||
"radio-text-common": "sm:h-4 text-center text-color-text-primary align-middle text-sm", | ||
"radio-text-size-common": "sm:text-xs", | ||
"radio-text-size-medium": "sm:text-sm", | ||
"radio-hover": "sm:[&_path:nth-of-type(1)]:hover:fill-color-brand-hover", | ||
@@ -74,8 +82,8 @@ "radio-hover-selected": "sm:[&_path:nth-of-type(1)]:hover:fill-color-brand-hover", | ||
"mobile-show": "block sm:hidden", | ||
"readonly-is-checked": "visible m-0", | ||
"readonly-is-not-checked": "invisible m-0", | ||
"readonly-is-checked": "sm:m-0", | ||
"readonly-is-not-checked": "sm:hidden", | ||
"not-readonly-common": "sm:mr-5 sm:[&:last-child]:mr-0", | ||
"hidden-radio": "hidden", | ||
"hidden-radio": "sm:hidden", | ||
"not-readly-common-label": "sm:py-0 sm:pl-2 -ml-0.5 sm:ml-0", | ||
"readonly-checked-label": "pl-0", | ||
"readonly-checked-label": "sm:pl-0", | ||
"verticalStyle": "sm:mb-2 sm:[&:last-child]:mb-0 sm:mr-0" | ||
@@ -88,6 +96,6 @@ }; | ||
components: { | ||
IconRadio: IconRadio(), | ||
IconRadioselected: IconRadioselected(), | ||
IconMobileRadio: IconMobileRadio(), | ||
IconMobileRadioSelected: IconMobileRadioSelected() | ||
IconRadio: iconRadio(), | ||
IconRadioselected: iconRadioselected(), | ||
IconMobileRadio: iconMobileRadio(), | ||
IconMobileRadioSelected: iconMobileRadioSelected() | ||
}, | ||
@@ -126,6 +134,6 @@ setup: function setup(props2, context) { | ||
{ | ||
class: normalizeClass(_ctx.m(_ctx.gcls("radio-left-circle"), _ctx.gcls(_ctx.state.isDisplayOnly && _ctx.state.model === _ctx.label && "hidden-radio"))) | ||
class: normalizeClass(_ctx.m(_ctx.gcls("radio-label-common"), _ctx.gcls(_ctx.state.size === "medium" ? "radio-label-size-medium" : "radio-label-size-common"), _ctx.gcls(_ctx.state.isDisplayOnly && _ctx.state.model === _ctx.label && "hidden-radio"))) | ||
}, | ||
[createElementVNode("span", { | ||
class: normalizeClass(_ctx.m(_ctx.gcls("radio-left-circle-child"))), | ||
class: normalizeClass(_ctx.m(_ctx.gcls("radio-label-circle"))), | ||
tabindex: _ctx.tabindex | ||
@@ -142,3 +150,3 @@ }, [_ctx.state.model === _ctx.label ? (openBlock(), createBlock(_component_icon_radioselected, { | ||
"icon-radioselected-default": !_ctx.state.isDisabled | ||
}))) | ||
}), _ctx.gcls(_ctx.state.size === "medium" ? "icon-radioselected-size-medium" : "icon-radioselected-size-common"))) | ||
}, null, 8, ["class"])) : (openBlock(), createBlock(_component_icon_radio, { | ||
@@ -154,3 +162,3 @@ key: 1, | ||
"icon-radio-default": !_ctx.state.isDisabled | ||
}), _ctx.gcls("icon-radio-common"))) | ||
}), _ctx.gcls("icon-radio-common"), _ctx.gcls(_ctx.state.size === "medium" ? "icon-radio-size-medium" : "icon-radio-size-common"))) | ||
}, null, 8, ["class"])), _ctx.state.model === _ctx.label ? (openBlock(), createBlock(_component_icon_mobileRadioSelected, { | ||
@@ -199,3 +207,3 @@ key: 2, | ||
ref: "label", | ||
class: normalizeClass(_ctx.m(_ctx.gcls("radio-text-common"), _ctx.gcls({ | ||
class: normalizeClass(_ctx.m(_ctx.gcls("radio-text-common"), _ctx.gcls(_ctx.state.size === "medium" ? "radio-text-size-medium" : "radio-text-size-common"), _ctx.gcls({ | ||
"label-disabled": _ctx.state.isDisabled | ||
@@ -202,0 +210,0 @@ }), _ctx.gcls(_ctx.state.isDisplayOnly ? _ctx.state.model === _ctx.label ? "readonly-checked-label" : "" : "not-readly-common-label"))), |
import { renderless, api } from "@opentiny/vue-renderless/radio/vue"; | ||
import { defineComponent, props, setup as _setup } from "@opentiny/vue-common"; | ||
import "@opentiny/vue-theme/radio/index.css"; | ||
import { openBlock, createElementBlock, mergeProps, withKeys, withModifiers, createElementVNode, normalizeClass, withDirectives, vModelRadio, renderSlot, createTextVNode, toDisplayString } from "vue"; | ||
import { openBlock, createElementBlock, mergeProps, withKeys, withModifiers, createElementVNode, normalizeClass, withDirectives, vModelRadio, renderSlot, createTextVNode, toDisplayString, createCommentVNode } from "vue"; | ||
function _createForOfIteratorHelperLoose(o, allowArrayLike) { | ||
@@ -66,3 +66,4 @@ var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; | ||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { | ||
return openBlock(), createElementBlock("label", mergeProps({ | ||
return !_ctx.state.isDisplayOnly || _ctx.state.model === _ctx.label ? (openBlock(), createElementBlock("label", mergeProps({ | ||
key: 0, | ||
class: ["tiny-radio", [_ctx.border && _ctx.state.radioSize ? "tiny-radio--" + _ctx.state.radioSize : "", { | ||
@@ -138,3 +139,3 @@ "is-disabled": _ctx.state.isDisabled | ||
/* HYDRATE_EVENTS */ | ||
)], 16, _hoisted_1); | ||
)], 16, _hoisted_1)) : createCommentVNode("v-if", true); | ||
} | ||
@@ -141,0 +142,0 @@ var pc = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]); |
{ | ||
"name": "@opentiny/vue-radio", | ||
"version": "3.9.0", | ||
"version": "3.10.0", | ||
"description": "", | ||
@@ -8,5 +8,6 @@ "main": "./lib/index.js", | ||
"sideEffects": false, | ||
"type": "module", | ||
"dependencies": { | ||
"@opentiny/vue-common": "~3.9.0", | ||
"@opentiny/vue-renderless": "~3.9.0" | ||
"@opentiny/vue-common": "~3.10.0", | ||
"@opentiny/vue-renderless": "~3.10.0" | ||
}, | ||
@@ -13,0 +14,0 @@ "license": "MIT", |
@@ -33,5 +33,5 @@ declare const _default: import("@vue/runtime-core").DefineComponent<{ | ||
tiny_chart_theme: ObjectConstructor; | ||
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, { | ||
}, () => import("@vue/runtime-core").VNode<import("@vue/runtime-core").RendererNode, import("@vue/runtime-core").RendererElement, { | ||
[key: string]: any; | ||
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{ | ||
}>, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").VNodeProps & import("@vue/runtime-core").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{ | ||
_constants: { | ||
@@ -69,10 +69,10 @@ type: ObjectConstructor; | ||
}>>, { | ||
disabled: boolean; | ||
tiny_mode_root: boolean; | ||
_constants: Record<string, any>; | ||
tabindex: string; | ||
disabled: boolean; | ||
border: boolean; | ||
displayOnly: boolean; | ||
events: Record<string, any>; | ||
border: boolean; | ||
}>; | ||
}, {}>; | ||
export default _default; |
@@ -1,4 +0,4 @@ | ||
declare const _sfc_main: import("@vue/runtime-core").DefineComponent<Readonly<{ | ||
declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{ | ||
[x: string]: any; | ||
}>, any, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{ | ||
}>, any, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("@vue/runtime-core").VNodeProps & import("@vue/runtime-core").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{ | ||
[x: string]: any; | ||
@@ -10,3 +10,3 @@ }>>> & { | ||
[x: string]: any; | ||
}>; | ||
export default _sfc_main; | ||
}, {}>; | ||
export default _default; |
@@ -1,2 +0,2 @@ | ||
declare const _sfc_main: import("@vue/runtime-core").DefineComponent<Readonly<{ | ||
declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{ | ||
[x: string]: any; | ||
@@ -12,3 +12,3 @@ }>, { | ||
m: (...cssClasses: any[]) => string; | ||
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{ | ||
}, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, "change"[], "change", import("@vue/runtime-core").VNodeProps & import("@vue/runtime-core").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{ | ||
[x: string]: any; | ||
@@ -19,3 +19,3 @@ }>>> & { | ||
[x: string]: any; | ||
}>; | ||
export default _sfc_main; | ||
}, {}>; | ||
export default _default; |
@@ -1,2 +0,2 @@ | ||
declare const _sfc_main: import("@vue/runtime-core").DefineComponent<Readonly<{ | ||
declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{ | ||
[x: string]: any; | ||
@@ -12,3 +12,3 @@ }>, { | ||
m: (...cssClasses: any[]) => string; | ||
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{ | ||
}, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("@vue/runtime-core").VNodeProps & import("@vue/runtime-core").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{ | ||
[x: string]: any; | ||
@@ -20,3 +20,3 @@ }>>> & { | ||
[x: string]: any; | ||
}>; | ||
export default _sfc_main; | ||
}, {}>; | ||
export default _default; |
export declare const classes: { | ||
'radio-default': string; | ||
'radio-left-circle': string; | ||
'radio-left-circle-child': string; | ||
'radio-label-common': string; | ||
'radio-label-size-common': string; | ||
'radio-label-size-medium': string; | ||
'radio-label-circle': string; | ||
'icon-radioselected-common': string; | ||
'icon-radioselected-size-common': string; | ||
'icon-radioselected-size-medium': string; | ||
'icon-radioselected-disabled': string; | ||
'icon-radioselected-default': string; | ||
'icon-radio-common': string; | ||
'icon-radio-size-common': string; | ||
'icon-radio-size-medium': string; | ||
'icon-radio-default': string; | ||
@@ -17,2 +23,4 @@ 'icon-radio-disabled': string; | ||
'radio-text-common': string; | ||
'radio-text-size-common': string; | ||
'radio-text-size-medium': string; | ||
'radio-hover': string; | ||
@@ -19,0 +27,0 @@ 'radio-hover-selected': string; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
31395
13
765
Yes
+ Added@opentiny/vue-common@3.10.0(transitive)
+ Added@opentiny/vue-locale@3.10.0(transitive)
+ Added@opentiny/vue-renderless@3.10.7(transitive)
+ Added@opentiny/vue-theme@3.10.4(transitive)
+ Added@opentiny/vue-theme-mobile@3.10.1(transitive)
- Removed@opentiny/vue-common@3.9.0(transitive)
- Removed@opentiny/vue-locale@3.9.0(transitive)
- Removed@opentiny/vue-renderless@3.9.3(transitive)
- Removed@opentiny/vue-theme@3.9.4(transitive)
- Removed@opentiny/vue-theme-mobile@3.9.0(transitive)
Updated@opentiny/vue-common@~3.10.0