@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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @youversion/design-system-components
2
2
 
3
+ ## 1.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - f535b3d: Update SegmentControl props
8
+
3
9
  ## 1.5.0
4
10
 
5
11
  ### Minor Changes
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({ className: l, defaultValue: i, onChange: e = () => {
5318
- }, values: r, ...a }, t) {
5319
- const [u, v] = T(i ?? 0), g = u > 0 ? u - 1 : 0, p = (w) => {
5320
- v(w), e(w);
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
- B,
5332
+ "div",
5324
5333
  {
5325
- ...a,
5334
+ ...v,
5326
5335
  className: `inline-flex overflow-hidden text-gray-40 dark:text-white ${l}`,
5327
- ref: t,
5328
- children: r.map((w, b) => /* @__PURE__ */ n(
5336
+ ref: g,
5337
+ children: r.map((y, k) => /* @__PURE__ */ n(
5329
5338
  to,
5330
5339
  {
5331
- activeIndex: u,
5332
- currentIndex: b,
5340
+ activeIndex: p,
5341
+ activeItemClassName: u,
5342
+ className: t,
5343
+ currentIndex: k,
5333
5344
  lastIndex: r.length - 1,
5334
- onSelectedValue: p,
5335
- prevIndex: g,
5336
- value: w
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",