@nurix/ui-component-library 1.1.7-stage.146 → 1.1.7-stage.147

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.d.mts CHANGED
@@ -3861,6 +3861,15 @@ interface WeeklyScheduleProps {
3861
3861
  * @default { start: "09:00", end: "17:00" }
3862
3862
  */
3863
3863
  defaultSlot?: WeeklyTimeSlot;
3864
+ /**
3865
+ * Optional id namespace for the internal day toggles. When more than
3866
+ * one `WeeklySchedule` can appear on the same page (e.g. one per
3867
+ * timezone group), pass a value unique to each instance so the per-day
3868
+ * switch `id`/`htmlFor` pairs stay unique. Without it every instance
3869
+ * emits the same ids and clicking a day label toggles the first
3870
+ * instance's switch. Defaults to `"weekly-schedule"`.
3871
+ */
3872
+ id?: string;
3864
3873
  className?: string;
3865
3874
  style?: React$1.CSSProperties;
3866
3875
  /**
package/dist/index.d.ts CHANGED
@@ -3861,6 +3861,15 @@ interface WeeklyScheduleProps {
3861
3861
  * @default { start: "09:00", end: "17:00" }
3862
3862
  */
3863
3863
  defaultSlot?: WeeklyTimeSlot;
3864
+ /**
3865
+ * Optional id namespace for the internal day toggles. When more than
3866
+ * one `WeeklySchedule` can appear on the same page (e.g. one per
3867
+ * timezone group), pass a value unique to each instance so the per-day
3868
+ * switch `id`/`htmlFor` pairs stay unique. Without it every instance
3869
+ * emits the same ids and clicking a day label toggles the first
3870
+ * instance's switch. Defaults to `"weekly-schedule"`.
3871
+ */
3872
+ id?: string;
3864
3873
  className?: string;
3865
3874
  style?: React$1.CSSProperties;
3866
3875
  /**
package/dist/index.js CHANGED
@@ -18599,6 +18599,7 @@ var WeeklySchedule = React51.forwardRef(
18599
18599
  onValidationChange,
18600
18600
  dayLabels,
18601
18601
  defaultSlot = DEFAULT_SLOT,
18602
+ id = "weekly-schedule",
18602
18603
  className,
18603
18604
  style,
18604
18605
  "data-testid": dataTestId
@@ -18669,6 +18670,7 @@ var WeeklySchedule = React51.forwardRef(
18669
18670
  const entry = (_a5 = value.find((d) => d.day === day)) != null ? _a5 : { day, enabled: false, slots: [] };
18670
18671
  const isEnabled = entry.enabled;
18671
18672
  const slotsToRender = entry.slots.length > 0 ? entry.slots : [defaultSlot];
18673
+ const switchId = `${id}-switch-${day}`;
18672
18674
  return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
18673
18675
  "div",
18674
18676
  {
@@ -18683,7 +18685,7 @@ var WeeklySchedule = React51.forwardRef(
18683
18685
  /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
18684
18686
  Switch,
18685
18687
  {
18686
- id: `weekly-schedule-switch-${day}`,
18688
+ id: switchId,
18687
18689
  checked: isEnabled,
18688
18690
  onCheckedChange: (checked) => handleToggle(day, checked),
18689
18691
  size: "small",
@@ -18693,7 +18695,7 @@ var WeeklySchedule = React51.forwardRef(
18693
18695
  /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
18694
18696
  "label",
18695
18697
  {
18696
- htmlFor: `weekly-schedule-switch-${day}`,
18698
+ htmlFor: switchId,
18697
18699
  className: cn(
18698
18700
  WEEKLY_SCHEDULE_TOKENS.dayLabel,
18699
18701
  isEnabled ? WEEKLY_SCHEDULE_TOKENS.dayLabelEnabled : WEEKLY_SCHEDULE_TOKENS.dayLabelDisabled,
package/dist/index.mjs CHANGED
@@ -18494,6 +18494,7 @@ var WeeklySchedule = React51.forwardRef(
18494
18494
  onValidationChange,
18495
18495
  dayLabels,
18496
18496
  defaultSlot = DEFAULT_SLOT,
18497
+ id = "weekly-schedule",
18497
18498
  className,
18498
18499
  style,
18499
18500
  "data-testid": dataTestId
@@ -18564,6 +18565,7 @@ var WeeklySchedule = React51.forwardRef(
18564
18565
  const entry = (_a5 = value.find((d) => d.day === day)) != null ? _a5 : { day, enabled: false, slots: [] };
18565
18566
  const isEnabled = entry.enabled;
18566
18567
  const slotsToRender = entry.slots.length > 0 ? entry.slots : [defaultSlot];
18568
+ const switchId = `${id}-switch-${day}`;
18567
18569
  return /* @__PURE__ */ jsxs38(
18568
18570
  "div",
18569
18571
  {
@@ -18578,7 +18580,7 @@ var WeeklySchedule = React51.forwardRef(
18578
18580
  /* @__PURE__ */ jsx47(
18579
18581
  Switch,
18580
18582
  {
18581
- id: `weekly-schedule-switch-${day}`,
18583
+ id: switchId,
18582
18584
  checked: isEnabled,
18583
18585
  onCheckedChange: (checked) => handleToggle(day, checked),
18584
18586
  size: "small",
@@ -18588,7 +18590,7 @@ var WeeklySchedule = React51.forwardRef(
18588
18590
  /* @__PURE__ */ jsx47(
18589
18591
  "label",
18590
18592
  {
18591
- htmlFor: `weekly-schedule-switch-${day}`,
18593
+ htmlFor: switchId,
18592
18594
  className: cn(
18593
18595
  WEEKLY_SCHEDULE_TOKENS.dayLabel,
18594
18596
  isEnabled ? WEEKLY_SCHEDULE_TOKENS.dayLabelEnabled : WEEKLY_SCHEDULE_TOKENS.dayLabelDisabled,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nurix/ui-component-library",
3
- "version": "1.1.7-stage.146",
3
+ "version": "1.1.7-stage.147",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",