@anker-in/ui 0.1.16 → 0.1.18
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/index.css +3 -3
- package/dist/index.css.map +1 -1
- package/dist/index.js +21 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21 -14
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
package/dist/index.mjs
CHANGED
|
@@ -1966,7 +1966,7 @@ var QuestionnaireForm = ({
|
|
|
1966
1966
|
onChange: (e) => handleOtherInputChange(questionId, e.target.value),
|
|
1967
1967
|
placeholder: question.placeholder || "Please specify...",
|
|
1968
1968
|
className: cn(
|
|
1969
|
-
"w-full
|
|
1969
|
+
"w-full px-4 py-3 rounded-lg border text-base bg-white dark:bg-white dark:text-gray-900",
|
|
1970
1970
|
"focus:outline-none focus:ring-2 focus:ring-[#3ADB67] focus:border-transparent",
|
|
1971
1971
|
hasError ? "border-red-500" : "border-[#E4E5E6]"
|
|
1972
1972
|
)
|
|
@@ -2008,11 +2008,17 @@ var QuestionnaireForm = ({
|
|
|
2008
2008
|
optionValue
|
|
2009
2009
|
);
|
|
2010
2010
|
}) });
|
|
2011
|
-
case "select":
|
|
2011
|
+
case "select": {
|
|
2012
|
+
const currentValue = responses[questionId];
|
|
2013
|
+
const hasOnlyOneOption = question.options?.length === 1;
|
|
2014
|
+
const defaultValue = hasOnlyOneOption && !currentValue && question.options?.[0] ? question.options[0].value || question.options[0].label : currentValue || "";
|
|
2015
|
+
if (hasOnlyOneOption && !currentValue && question.options?.[0]) {
|
|
2016
|
+
handleChange(questionId, defaultValue);
|
|
2017
|
+
}
|
|
2012
2018
|
return /* @__PURE__ */ jsx(
|
|
2013
2019
|
"select",
|
|
2014
2020
|
{
|
|
2015
|
-
value:
|
|
2021
|
+
value: defaultValue,
|
|
2016
2022
|
onChange: (e) => handleChange(questionId, e.target.value),
|
|
2017
2023
|
className: cn(
|
|
2018
2024
|
"w-full px-4 py-3 rounded-lg border text-base bg-white dark:bg-white dark:text-gray-900",
|
|
@@ -2030,6 +2036,7 @@ var QuestionnaireForm = ({
|
|
|
2030
2036
|
))
|
|
2031
2037
|
}
|
|
2032
2038
|
);
|
|
2039
|
+
}
|
|
2033
2040
|
default:
|
|
2034
2041
|
return null;
|
|
2035
2042
|
}
|
|
@@ -2725,7 +2732,7 @@ var DateTimePicker = ({
|
|
|
2725
2732
|
};
|
|
2726
2733
|
var DateTimePicker_default = DateTimePicker;
|
|
2727
2734
|
|
|
2728
|
-
// node_modules/swiper/shared/ssr-window.esm.mjs
|
|
2735
|
+
// ../../node_modules/swiper/shared/ssr-window.esm.mjs
|
|
2729
2736
|
function isObject(obj) {
|
|
2730
2737
|
return obj !== null && typeof obj === "object" && "constructor" in obj && obj.constructor === Object;
|
|
2731
2738
|
}
|
|
@@ -2869,7 +2876,7 @@ function getWindow() {
|
|
|
2869
2876
|
return win;
|
|
2870
2877
|
}
|
|
2871
2878
|
|
|
2872
|
-
// node_modules/swiper/shared/utils.mjs
|
|
2879
|
+
// ../../node_modules/swiper/shared/utils.mjs
|
|
2873
2880
|
function classesToTokens(classes2 = "") {
|
|
2874
2881
|
return classes2.trim().split(" ").filter((c) => !!c.trim());
|
|
2875
2882
|
}
|
|
@@ -3140,7 +3147,7 @@ function setInnerHTML(el, html = "") {
|
|
|
3140
3147
|
}
|
|
3141
3148
|
}
|
|
3142
3149
|
|
|
3143
|
-
// node_modules/swiper/shared/swiper-core.mjs
|
|
3150
|
+
// ../../node_modules/swiper/shared/swiper-core.mjs
|
|
3144
3151
|
var support;
|
|
3145
3152
|
function calcSupport() {
|
|
3146
3153
|
const window2 = getWindow();
|
|
@@ -6774,7 +6781,7 @@ Object.keys(prototypes).forEach((prototypeGroup) => {
|
|
|
6774
6781
|
});
|
|
6775
6782
|
Swiper.use([Resize, Observer]);
|
|
6776
6783
|
|
|
6777
|
-
// node_modules/swiper/shared/update-swiper.mjs
|
|
6784
|
+
// ../../node_modules/swiper/shared/update-swiper.mjs
|
|
6778
6785
|
var paramsList = [
|
|
6779
6786
|
"eventsPrefix",
|
|
6780
6787
|
"injectStyles",
|
|
@@ -7103,7 +7110,7 @@ function updateSwiper({
|
|
|
7103
7110
|
swiper.update();
|
|
7104
7111
|
}
|
|
7105
7112
|
|
|
7106
|
-
// node_modules/swiper/shared/update-on-virtual-data.mjs
|
|
7113
|
+
// ../../node_modules/swiper/shared/update-on-virtual-data.mjs
|
|
7107
7114
|
function getParams(obj = {}, splitEvents = true) {
|
|
7108
7115
|
const params = {
|
|
7109
7116
|
on: {}
|
|
@@ -7221,7 +7228,7 @@ var updateOnVirtualData = (swiper) => {
|
|
|
7221
7228
|
}
|
|
7222
7229
|
};
|
|
7223
7230
|
|
|
7224
|
-
// node_modules/swiper/swiper-react.mjs
|
|
7231
|
+
// ../../node_modules/swiper/swiper-react.mjs
|
|
7225
7232
|
function _extends() {
|
|
7226
7233
|
_extends = Object.assign ? Object.assign.bind() : function(target) {
|
|
7227
7234
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -7567,7 +7574,7 @@ var SwiperSlide = /* @__PURE__ */ forwardRef(({
|
|
|
7567
7574
|
});
|
|
7568
7575
|
SwiperSlide.displayName = "SwiperSlide";
|
|
7569
7576
|
|
|
7570
|
-
// node_modules/swiper/shared/create-element-if-not-defined.mjs
|
|
7577
|
+
// ../../node_modules/swiper/shared/create-element-if-not-defined.mjs
|
|
7571
7578
|
function createElementIfNotDefined(swiper, originalParams, params, checkProps) {
|
|
7572
7579
|
if (swiper.params.createElements) {
|
|
7573
7580
|
Object.keys(checkProps).forEach((key) => {
|
|
@@ -7586,7 +7593,7 @@ function createElementIfNotDefined(swiper, originalParams, params, checkProps) {
|
|
|
7586
7593
|
return params;
|
|
7587
7594
|
}
|
|
7588
7595
|
|
|
7589
|
-
// node_modules/swiper/modules/navigation.mjs
|
|
7596
|
+
// ../../node_modules/swiper/modules/navigation.mjs
|
|
7590
7597
|
var arrowSvg = `<svg class="swiper-navigation-icon" width="11" height="20" viewBox="0 0 11 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0.38296 20.0762C0.111788 19.805 0.111788 19.3654 0.38296 19.0942L9.19758 10.2796L0.38296 1.46497C0.111788 1.19379 0.111788 0.754138 0.38296 0.482966C0.654131 0.211794 1.09379 0.211794 1.36496 0.482966L10.4341 9.55214C10.8359 9.9539 10.8359 10.6053 10.4341 11.007L1.36496 20.0762C1.09379 20.3474 0.654131 20.3474 0.38296 20.0762Z" fill="currentColor"/></svg>`;
|
|
7591
7598
|
function Navigation({
|
|
7592
7599
|
swiper,
|
|
@@ -7788,12 +7795,12 @@ function Navigation({
|
|
|
7788
7795
|
});
|
|
7789
7796
|
}
|
|
7790
7797
|
|
|
7791
|
-
// node_modules/swiper/shared/classes-to-selector.mjs
|
|
7798
|
+
// ../../node_modules/swiper/shared/classes-to-selector.mjs
|
|
7792
7799
|
function classesToSelector(classes2 = "") {
|
|
7793
7800
|
return `.${classes2.trim().replace(/([\.:!+\/()[\]])/g, "\\$1").replace(/ /g, ".")}`;
|
|
7794
7801
|
}
|
|
7795
7802
|
|
|
7796
|
-
// node_modules/swiper/modules/pagination.mjs
|
|
7803
|
+
// ../../node_modules/swiper/modules/pagination.mjs
|
|
7797
7804
|
function Pagination({
|
|
7798
7805
|
swiper,
|
|
7799
7806
|
extendParams,
|
|
@@ -8241,7 +8248,7 @@ function Pagination({
|
|
|
8241
8248
|
});
|
|
8242
8249
|
}
|
|
8243
8250
|
|
|
8244
|
-
// node_modules/swiper/modules/autoplay.mjs
|
|
8251
|
+
// ../../node_modules/swiper/modules/autoplay.mjs
|
|
8245
8252
|
function Autoplay({
|
|
8246
8253
|
swiper,
|
|
8247
8254
|
extendParams,
|