@youversion/design-system-components 1.5.0 → 1.6.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/CHANGELOG.md +6 -0
- package/dist/index.es.js +34 -15
- package/dist/index.umd.js +2 -2
- package/dist/src/SegmentedControl/SegmentedControl.d.ts +5 -1
- package/dist/src/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/src/SegmentedControl/SegmentedControl.stories.d.ts +3 -2
- package/dist/src/SegmentedControl/SegmentedControl.stories.d.ts.map +1 -1
- package/dist/src/SegmentedControl/SegmentedControlItem.d.ts +5 -2
- package/dist/src/SegmentedControl/SegmentedControlItem.d.ts.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.es.js
CHANGED
|
@@ -5314,26 +5314,38 @@ const Jn = ({
|
|
|
5314
5314
|
);
|
|
5315
5315
|
}, Kn = d(Jn);
|
|
5316
5316
|
Kn.displayName = "SearchableSelect";
|
|
5317
|
-
function eo({
|
|
5318
|
-
|
|
5319
|
-
|
|
5320
|
-
|
|
5317
|
+
function eo({
|
|
5318
|
+
className: l,
|
|
5319
|
+
defaultValue: i,
|
|
5320
|
+
onChange: e = () => {
|
|
5321
|
+
},
|
|
5322
|
+
values: r,
|
|
5323
|
+
size: a = "lg",
|
|
5324
|
+
itemClassName: t,
|
|
5325
|
+
activeItemClassName: u,
|
|
5326
|
+
...v
|
|
5327
|
+
}, g) {
|
|
5328
|
+
const [p, w] = T(i ?? 0), b = p > 0 ? p - 1 : 0, Z = (y) => {
|
|
5329
|
+
w(y), e(y);
|
|
5321
5330
|
};
|
|
5322
5331
|
return /* @__PURE__ */ n(
|
|
5323
|
-
|
|
5332
|
+
"div",
|
|
5324
5333
|
{
|
|
5325
|
-
...
|
|
5334
|
+
...v,
|
|
5326
5335
|
className: `inline-flex overflow-hidden text-gray-40 dark:text-white ${l}`,
|
|
5327
|
-
ref:
|
|
5328
|
-
children: r.map((
|
|
5336
|
+
ref: g,
|
|
5337
|
+
children: r.map((y, k) => /* @__PURE__ */ n(
|
|
5329
5338
|
to,
|
|
5330
5339
|
{
|
|
5331
|
-
activeIndex:
|
|
5332
|
-
|
|
5340
|
+
activeIndex: p,
|
|
5341
|
+
activeItemClassName: u,
|
|
5342
|
+
className: t,
|
|
5343
|
+
currentIndex: k,
|
|
5333
5344
|
lastIndex: r.length - 1,
|
|
5334
|
-
onSelectedValue:
|
|
5335
|
-
prevIndex:
|
|
5336
|
-
|
|
5345
|
+
onSelectedValue: Z,
|
|
5346
|
+
prevIndex: b,
|
|
5347
|
+
size: a,
|
|
5348
|
+
value: y
|
|
5337
5349
|
}
|
|
5338
5350
|
))
|
|
5339
5351
|
}
|
|
@@ -5347,7 +5359,10 @@ function to({
|
|
|
5347
5359
|
lastIndex: e,
|
|
5348
5360
|
onSelectedValue: r,
|
|
5349
5361
|
prevIndex: a,
|
|
5350
|
-
value: t
|
|
5362
|
+
value: t,
|
|
5363
|
+
size: u,
|
|
5364
|
+
className: v,
|
|
5365
|
+
activeItemClassName: g = ""
|
|
5351
5366
|
}) {
|
|
5352
5367
|
return /* @__PURE__ */ o(d1, { children: [
|
|
5353
5368
|
/* @__PURE__ */ n(
|
|
@@ -5358,7 +5373,11 @@ function to({
|
|
|
5358
5373
|
${i === l ? " bg-gray-40 dark:bg-white text-white dark:text-gray-40 border-gray-40 dark:border-white" : ""}
|
|
5359
5374
|
`,
|
|
5360
5375
|
i === 0 ? "border-l-small rounded-ss-1 rounded-es-1" : "",
|
|
5361
|
-
i === e ? "border-r-small rounded-se-1 rounded-ee-1" : ""
|
|
5376
|
+
i === e ? "border-r-small rounded-se-1 rounded-ee-1" : "",
|
|
5377
|
+
u === "md" ? "py-1.5" : "",
|
|
5378
|
+
u === "sm" ? "py-0.5 text-14" : "",
|
|
5379
|
+
v,
|
|
5380
|
+
i === l ? g : ""
|
|
5362
5381
|
),
|
|
5363
5382
|
onClick: i !== l ? () => r(i) : void 0,
|
|
5364
5383
|
type: "button",
|