@dhasdk/simple-ui 1.0.10 → 1.0.11
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 +2 -2
- package/index.css +1 -1
- package/index.d.ts +2 -3
- package/index.js +3 -3
- package/index.mjs +108 -108
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2754,7 +2754,7 @@ const J = (e) => {
|
|
|
2754
2754
|
}, [p]), Z(() => {
|
|
2755
2755
|
O(u ? Ve : f(Ve, "bg-transparent border-0"));
|
|
2756
2756
|
}, [u]), Z(() => {
|
|
2757
|
-
j(y && u ? f(Se, "border-b-0
|
|
2757
|
+
j(y && u ? f(Se, "border-b-0 rounded-t rounded-b-none") : Se);
|
|
2758
2758
|
}, [y, u]), /* @__PURE__ */ L("div", { ref: $, className: n, children: [
|
|
2759
2759
|
/* @__PURE__ */ L(
|
|
2760
2760
|
"button",
|
|
@@ -3096,11 +3096,109 @@ const J = (e) => {
|
|
|
3096
3096
|
}
|
|
3097
3097
|
);
|
|
3098
3098
|
}
|
|
3099
|
-
), v0 =
|
|
3100
|
-
|
|
3099
|
+
), v0 = 'inline-flex items-center justify-center whitespace-nowrap rounded-md ring-offset-background transition-colors focus-visible:outline-hidden font-["Arial"] disabled:pointer-events-none text-sm md:text-base lg:text-lg disabled:opacity-50 px-6 py-[8px] md:py-[12px] lg:py-[16px] h-[40px] md:h-[48px] lg:h-[56px] ', ze = {
|
|
3100
|
+
default: {
|
|
3101
|
+
normal: "border-2 border-gray-300 rounded-md bg-gray-200 hover:bg-slate-400 text-black text-sm md:text-base lg:text-lg hover:text-black hover:border-slate-600 disabled:bg-dha-mc-bottom-nav-background disabled:text-dha-mc-checkbox-inactive focus:border-black disabled:border-dha-mc-bottom-nav-background disabled:border-2 py-0 md:py-0 lg:py-0 h-[48px] mt-1",
|
|
3102
|
+
selected: "bg-gray-500 text-white"
|
|
3103
|
+
// Only used if 'selected' is true to indicate state when 'selected'
|
|
3104
|
+
},
|
|
3105
|
+
filled: {
|
|
3106
|
+
normal: "rounded-md bg-[#092068] hover:bg-[#0c2c8e] text-white text-sm md:text-base lg:text-lg hover:text-white focus:shadow-[0px_0px_0px_3px_rgba(238,131,255,1.00)] active:bg-[#0F37B3] disabled:bg-[#e4e4e5] disabled:text-[#939194] disabled:border-[#e4e4e5] ",
|
|
3107
|
+
selected: ""
|
|
3108
|
+
// Only used if 'selected' is true
|
|
3109
|
+
},
|
|
3110
|
+
outline: {
|
|
3111
|
+
normal: "rounded-md border-[#092068] bg-white border-2 text-[#092068] text-sm md:text-base lg:text-lg disabled:border-dha-mc-secondary-border disabled:text-[#939194] hover:bg-[#d1dbfb] active:bg-[#9fc5f0] focus:shadow-[0px_0px_0px_3px_rgba(238,131,255,1.00)] ",
|
|
3112
|
+
selected: ""
|
|
3113
|
+
// Only used if 'selected' is true
|
|
3114
|
+
},
|
|
3115
|
+
transparent: {
|
|
3116
|
+
normal: "rounded-md text-sm md:text-base lg:text-lg text-[#092068] hover:bg-[#d1dbfb] active:bg-[#9fc5f0] focus:shadow-[0px_0px_0px_3px_rgba(251,137,241,1.00)] disabled:text-[#939194]",
|
|
3117
|
+
selected: ""
|
|
3118
|
+
// Only used if 'selected' is true
|
|
3119
|
+
}
|
|
3120
|
+
}, b2 = ee(
|
|
3121
|
+
({
|
|
3122
|
+
label: e,
|
|
3123
|
+
onClick: t,
|
|
3124
|
+
className: n,
|
|
3125
|
+
icon: r,
|
|
3126
|
+
iconPosition: a,
|
|
3127
|
+
variant: l = "default",
|
|
3128
|
+
type: o = "button",
|
|
3129
|
+
children: c,
|
|
3130
|
+
selected: i = !1,
|
|
3131
|
+
classNameSelected: m,
|
|
3132
|
+
classNameGroup: b = "",
|
|
3133
|
+
...p
|
|
3134
|
+
}, u) => {
|
|
3135
|
+
const [C, x] = I("");
|
|
3136
|
+
return Z(() => {
|
|
3137
|
+
let M = ze[l].normal || ze.default.normal;
|
|
3138
|
+
i && !m ? M = f(M, ze[l].selected) : i && m && (M = f(M, m)), x(f(v0, M));
|
|
3139
|
+
}, [i, m, l]), /* @__PURE__ */ L(
|
|
3140
|
+
"button",
|
|
3141
|
+
{
|
|
3142
|
+
type: o,
|
|
3143
|
+
onClick: t,
|
|
3144
|
+
className: `${a === "iconOnly" ? f(
|
|
3145
|
+
C,
|
|
3146
|
+
"px-[12px] md:px-[14px] lg:px-[16px] py-[8px] md:py-[12px] lg:py-[16px]",
|
|
3147
|
+
b,
|
|
3148
|
+
// passed in from ButtonGroup if present
|
|
3149
|
+
n
|
|
3150
|
+
// dev over-rides
|
|
3151
|
+
) : f(C, b, n)}`,
|
|
3152
|
+
ref: u,
|
|
3153
|
+
...p,
|
|
3154
|
+
children: [
|
|
3155
|
+
a === "left" && r && /* @__PURE__ */ s("span", { className: "icon-left mr-3 size-6", children: r }),
|
|
3156
|
+
a === "iconOnly" && r ? /* @__PURE__ */ s("span", { className: "size-6", children: r }) : /* @__PURE__ */ s("span", { className: "", children: c || e }),
|
|
3157
|
+
a === "right" && r && /* @__PURE__ */ s("span", { className: "icon-right ml-3 size-6", children: r })
|
|
3158
|
+
]
|
|
3159
|
+
}
|
|
3160
|
+
);
|
|
3161
|
+
}
|
|
3162
|
+
);
|
|
3163
|
+
b2.displayName = "SDK Button";
|
|
3164
|
+
const ye = {
|
|
3165
|
+
default: {
|
|
3166
|
+
container: "flex gap-4 w-full md:gap-8 lg:gap-12",
|
|
3167
|
+
button: "w-[150px]"
|
|
3168
|
+
},
|
|
3169
|
+
column: {
|
|
3170
|
+
container: "flex flex-col gap-3 w-full md:gap-4 lg:gap-6",
|
|
3171
|
+
button: "w-[150px]"
|
|
3172
|
+
},
|
|
3173
|
+
custom: {
|
|
3174
|
+
container: "",
|
|
3175
|
+
button: ""
|
|
3176
|
+
}
|
|
3177
|
+
}, C0 = ee(
|
|
3178
|
+
({ className: e, children: t, classNameButtons: n, variant: r = "default", ...a }, l) => {
|
|
3179
|
+
let o = 0;
|
|
3180
|
+
const c = Ue.map(t, (p) => {
|
|
3181
|
+
if (be(p)) {
|
|
3182
|
+
++o;
|
|
3183
|
+
const u = p, C = u.props.classNameGroup || "";
|
|
3184
|
+
return _e(u, {
|
|
3185
|
+
classNameGroup: f(C, ye[r].button, n)
|
|
3186
|
+
});
|
|
3187
|
+
}
|
|
3188
|
+
return p;
|
|
3189
|
+
}), i = o === 3 && r === "default", m = c == null ? void 0 : c.slice(0, 2), b = c == null ? void 0 : c.slice(2);
|
|
3190
|
+
return i ? /* @__PURE__ */ L("div", { className: "inline-flex flex-col gap-1", children: [
|
|
3191
|
+
/* @__PURE__ */ s("div", { className: f(ye[r].container, e), children: m }),
|
|
3192
|
+
/* @__PURE__ */ s("div", { className: f(ye[r].container, "justify-center", e), children: b })
|
|
3193
|
+
] }) : /* @__PURE__ */ s("div", { className: f("", ye[r].container, e), ref: l, children: c });
|
|
3194
|
+
}
|
|
3195
|
+
);
|
|
3196
|
+
C0.displayName = "SDK ButtonGroup";
|
|
3197
|
+
const y0 = "data:image/svg+xml,%3csvg%20width='7'%20height='11'%20viewBox='0%200%207%2011'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20id='Vector%201'%20d='M1%201L5%205.5L1%2010'%20stroke='%23747476'%20stroke-width='2'/%3e%3c/svg%3e", k0 = "data:image/svg+xml,%3csvg%20width='12'%20height='15'%20viewBox='0%200%2012%2015'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20id='Exclude'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6%200.5L0%205.75V14.5H4.28571V10.125H7.71429V14.5H12V5.75L6%200.5Z'%20fill='%23747476'/%3e%3c/svg%3e";
|
|
3198
|
+
function N0(e) {
|
|
3101
3199
|
return e.replace(/-/g, " ").replace(/\b\w/g, (t) => t.toUpperCase());
|
|
3102
3200
|
}
|
|
3103
|
-
const
|
|
3201
|
+
const M0 = {
|
|
3104
3202
|
default: "overflow-x-auto w-full text-base md:text-lg",
|
|
3105
3203
|
// image top
|
|
3106
3204
|
bold: "overflow-x-auto font-bold w-full text-base md:text-lg"
|
|
@@ -3110,11 +3208,11 @@ const k0 = {
|
|
|
3110
3208
|
className: t,
|
|
3111
3209
|
routes: n,
|
|
3112
3210
|
variant: r = "default",
|
|
3113
|
-
separator: a =
|
|
3211
|
+
separator: a = y0,
|
|
3114
3212
|
...l
|
|
3115
3213
|
}, o) => {
|
|
3116
3214
|
const c = X(null), i = X(null), [m, b] = I(!1), [p, u] = I(), [C, x] = I(0), { pathname: M } = k2(), $ = Oe(() => n && n.length > 0 ? n : M.split("/").filter(Boolean).map((_, O, H) => ({
|
|
3117
|
-
name:
|
|
3215
|
+
name: N0(decodeURIComponent(_)),
|
|
3118
3216
|
route: "/" + H.slice(0, O + 1).join("/")
|
|
3119
3217
|
})), [n, M]);
|
|
3120
3218
|
Z(() => {
|
|
@@ -3137,7 +3235,7 @@ const k0 = {
|
|
|
3137
3235
|
}, [p, $]), /* @__PURE__ */ s(
|
|
3138
3236
|
"nav",
|
|
3139
3237
|
{
|
|
3140
|
-
className: f(
|
|
3238
|
+
className: f(M0[r], e),
|
|
3141
3239
|
...l,
|
|
3142
3240
|
ref: o,
|
|
3143
3241
|
"aria-label": "Breadcrumbs",
|
|
@@ -3167,7 +3265,7 @@ const k0 = {
|
|
|
3167
3265
|
"capitalize me-2 inline-flex md:hidden",
|
|
3168
3266
|
t
|
|
3169
3267
|
),
|
|
3170
|
-
children: /* @__PURE__ */ s("img", { src:
|
|
3268
|
+
children: /* @__PURE__ */ s("img", { src: k0, ref: i, alt: "home icon" })
|
|
3171
3269
|
}
|
|
3172
3270
|
),
|
|
3173
3271
|
$.length > 0 ? /* @__PURE__ */ s("span", { className: f("me-2", t), children: /* @__PURE__ */ s("img", { src: a, alt: "vector" }) }) : ""
|
|
@@ -3229,105 +3327,7 @@ const k0 = {
|
|
|
3229
3327
|
}
|
|
3230
3328
|
);
|
|
3231
3329
|
}
|
|
3232
|
-
),
|
|
3233
|
-
default: {
|
|
3234
|
-
normal: "border-2 border-gray-300 rounded-md bg-gray-200 hover:bg-slate-400 text-black text-sm md:text-base lg:text-lg hover:text-black hover:border-slate-600 disabled:bg-dha-mc-bottom-nav-background disabled:text-dha-mc-checkbox-inactive focus:border-black disabled:border-dha-mc-bottom-nav-background disabled:border-2 py-0 md:py-0 lg:py-0 h-[48px] mt-1",
|
|
3235
|
-
selected: "bg-gray-500 text-white"
|
|
3236
|
-
// Only used if 'selected' is true to indicate state when 'selected'
|
|
3237
|
-
},
|
|
3238
|
-
filled: {
|
|
3239
|
-
normal: "rounded-md bg-[#092068] hover:bg-[#0c2c8e] text-white text-sm md:text-base lg:text-lg hover:text-white focus:shadow-[0px_0px_0px_3px_rgba(238,131,255,1.00)] active:bg-[#0F37B3] disabled:bg-[#e4e4e5] disabled:text-[#939194] disabled:border-[#e4e4e5] ",
|
|
3240
|
-
selected: ""
|
|
3241
|
-
// Only used if 'selected' is true
|
|
3242
|
-
},
|
|
3243
|
-
outline: {
|
|
3244
|
-
normal: "rounded-md border-[#092068] bg-white border-2 text-[#092068] text-sm md:text-base lg:text-lg disabled:border-dha-mc-secondary-border disabled:text-[#939194] hover:bg-[#d1dbfb] active:bg-[#9fc5f0] focus:shadow-[0px_0px_0px_3px_rgba(238,131,255,1.00)] ",
|
|
3245
|
-
selected: ""
|
|
3246
|
-
// Only used if 'selected' is true
|
|
3247
|
-
},
|
|
3248
|
-
transparent: {
|
|
3249
|
-
normal: "rounded-md text-sm md:text-base lg:text-lg text-[#092068] hover:bg-[#d1dbfb] active:bg-[#9fc5f0] focus:shadow-[0px_0px_0px_3px_rgba(251,137,241,1.00)] disabled:text-[#939194]",
|
|
3250
|
-
selected: ""
|
|
3251
|
-
// Only used if 'selected' is true
|
|
3252
|
-
}
|
|
3253
|
-
}, b2 = ee(
|
|
3254
|
-
({
|
|
3255
|
-
label: e,
|
|
3256
|
-
onClick: t,
|
|
3257
|
-
className: n,
|
|
3258
|
-
icon: r,
|
|
3259
|
-
iconPosition: a,
|
|
3260
|
-
variant: l = "default",
|
|
3261
|
-
type: o = "button",
|
|
3262
|
-
children: c,
|
|
3263
|
-
selected: i = !1,
|
|
3264
|
-
classNameSelected: m,
|
|
3265
|
-
classNameGroup: b = "",
|
|
3266
|
-
...p
|
|
3267
|
-
}, u) => {
|
|
3268
|
-
const [C, x] = I("");
|
|
3269
|
-
return Z(() => {
|
|
3270
|
-
let M = ze[l].normal || ze.default.normal;
|
|
3271
|
-
i && !m ? M = f(M, ze[l].selected) : i && m && (M = f(M, m)), x(f(N0, M));
|
|
3272
|
-
}, [i, m, l]), /* @__PURE__ */ L(
|
|
3273
|
-
"button",
|
|
3274
|
-
{
|
|
3275
|
-
type: o,
|
|
3276
|
-
onClick: t,
|
|
3277
|
-
className: `${a === "iconOnly" ? f(
|
|
3278
|
-
C,
|
|
3279
|
-
"px-[12px] md:px-[14px] lg:px-[16px] py-[8px] md:py-[12px] lg:py-[16px]",
|
|
3280
|
-
b,
|
|
3281
|
-
// passed in from ButtonGroup if present
|
|
3282
|
-
n
|
|
3283
|
-
// dev over-rides
|
|
3284
|
-
) : f(C, b, n)}`,
|
|
3285
|
-
ref: u,
|
|
3286
|
-
...p,
|
|
3287
|
-
children: [
|
|
3288
|
-
a === "left" && r && /* @__PURE__ */ s("span", { className: "icon-left mr-3 size-6", children: r }),
|
|
3289
|
-
a === "iconOnly" && r ? /* @__PURE__ */ s("span", { className: "size-6", children: r }) : /* @__PURE__ */ s("span", { className: "", children: c || e }),
|
|
3290
|
-
a === "right" && r && /* @__PURE__ */ s("span", { className: "icon-right ml-3 size-6", children: r })
|
|
3291
|
-
]
|
|
3292
|
-
}
|
|
3293
|
-
);
|
|
3294
|
-
}
|
|
3295
|
-
);
|
|
3296
|
-
b2.displayName = "SDK Button";
|
|
3297
|
-
const ye = {
|
|
3298
|
-
default: {
|
|
3299
|
-
container: "flex gap-4 w-full md:gap-8 lg:gap-12",
|
|
3300
|
-
button: "w-[150px]"
|
|
3301
|
-
},
|
|
3302
|
-
column: {
|
|
3303
|
-
container: "flex flex-col gap-3 w-full md:gap-4 lg:gap-6",
|
|
3304
|
-
button: "w-[150px]"
|
|
3305
|
-
},
|
|
3306
|
-
custom: {
|
|
3307
|
-
container: "",
|
|
3308
|
-
button: ""
|
|
3309
|
-
}
|
|
3310
|
-
}, M0 = ee(
|
|
3311
|
-
({ className: e, children: t, classNameButtons: n, variant: r = "default", ...a }, l) => {
|
|
3312
|
-
let o = 0;
|
|
3313
|
-
const c = Ue.map(t, (p) => {
|
|
3314
|
-
if (be(p)) {
|
|
3315
|
-
++o;
|
|
3316
|
-
const u = p, C = u.props.classNameGroup || "";
|
|
3317
|
-
return _e(u, {
|
|
3318
|
-
classNameGroup: f(C, ye[r].button, n)
|
|
3319
|
-
});
|
|
3320
|
-
}
|
|
3321
|
-
return p;
|
|
3322
|
-
}), i = o === 3 && r === "default", m = c == null ? void 0 : c.slice(0, 2), b = c == null ? void 0 : c.slice(2);
|
|
3323
|
-
return i ? /* @__PURE__ */ L("div", { className: "inline-flex flex-col gap-1", children: [
|
|
3324
|
-
/* @__PURE__ */ s("div", { className: f(ye[r].container, e), children: m }),
|
|
3325
|
-
/* @__PURE__ */ s("div", { className: f(ye[r].container, "justify-center", e), children: b })
|
|
3326
|
-
] }) : /* @__PURE__ */ s("div", { className: f("", ye[r].container, e), ref: l, children: c });
|
|
3327
|
-
}
|
|
3328
|
-
);
|
|
3329
|
-
M0.displayName = "SDK ButtonGroup";
|
|
3330
|
-
const _0 = {
|
|
3330
|
+
), _0 = {
|
|
3331
3331
|
default: "flex flex-col w-64 max-w-64",
|
|
3332
3332
|
// image top
|
|
3333
3333
|
imageBottom: "flex flex-col-reverse w-64 mx-w-64",
|
|
@@ -5439,7 +5439,7 @@ export {
|
|
|
5439
5439
|
Dt as Badge,
|
|
5440
5440
|
St as Breadcrumbs,
|
|
5441
5441
|
b2 as Button,
|
|
5442
|
-
|
|
5442
|
+
C0 as ButtonGroup,
|
|
5443
5443
|
S0 as Card,
|
|
5444
5444
|
Vt as CharacterCounter,
|
|
5445
5445
|
x2 as CheckBox,
|