@televet/kibble-ui 5.0.25-beta.9 → 5.0.26-beta.14

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.
Files changed (35) hide show
  1. package/dist/chunks/calendar.component-D1HEuPpr.js +55 -0
  2. package/dist/chunks/calendar.component-D1HEuPpr.js.map +1 -0
  3. package/dist/chunks/calendar.component-DjjLsuNb.js +2 -0
  4. package/dist/chunks/calendar.component-DjjLsuNb.js.map +1 -0
  5. package/dist/chunks/{datePicker.component-CLTjEX7i.js → datePicker.component-DuI1ybKD.js} +2 -2
  6. package/dist/chunks/{datePicker.component-CLTjEX7i.js.map → datePicker.component-DuI1ybKD.js.map} +1 -1
  7. package/dist/chunks/{datePicker.provider-CttuPiiS.js → datePicker.provider-DjDP292O.js} +3 -3
  8. package/dist/chunks/{datePicker.provider-CttuPiiS.js.map → datePicker.provider-DjDP292O.js.map} +1 -1
  9. package/dist/chunks/{dateTimePicker.component-CLAI_Q6e.js → dateTimePicker.component-r4V8f57O.js} +2 -2
  10. package/dist/chunks/{dateTimePicker.component-CLAI_Q6e.js.map → dateTimePicker.component-r4V8f57O.js.map} +1 -1
  11. package/dist/chunks/tab.types-DSPWRVCF.js +2 -0
  12. package/dist/chunks/{tab.types-ClVkJZuy.js.map → tab.types-DSPWRVCF.js.map} +1 -1
  13. package/dist/chunks/{tab.types-CL7gXexc.js → tab.types-JAJ5Xxff.js} +166 -178
  14. package/dist/chunks/{tab.types-CL7gXexc.js.map → tab.types-JAJ5Xxff.js.map} +1 -1
  15. package/dist/cjs/components/Calendar/index.cjs +1 -1
  16. package/dist/cjs/components/Tabs/index.cjs +1 -1
  17. package/dist/cjs/components/index.cjs +1 -1
  18. package/dist/cjs/index.cjs +1 -1
  19. package/dist/esm/cli/generate-theme-types.js +0 -0
  20. package/dist/esm/cli/postinstall.js +0 -0
  21. package/dist/esm/components/Calendar/index.js +3 -2
  22. package/dist/esm/components/DatePicker/index.js +2 -2
  23. package/dist/esm/components/DateTimePicker/index.js +1 -1
  24. package/dist/esm/components/Tabs/index.js +1 -1
  25. package/dist/esm/components/index.js +119 -118
  26. package/dist/esm/index.js +147 -146
  27. package/dist/types/components/Calendar/calendar.component.d.ts +12 -1
  28. package/dist/types/components/Calendar/calendarTodayButton.component.d.ts +10 -0
  29. package/dist/types/components/Calendar/index.d.ts +1 -0
  30. package/package.json +1 -1
  31. package/dist/chunks/calendar.component-BFSyxaB6.js +0 -2
  32. package/dist/chunks/calendar.component-BFSyxaB6.js.map +0 -1
  33. package/dist/chunks/calendar.component-CegJR9ey.js +0 -18
  34. package/dist/chunks/calendar.component-CegJR9ey.js.map +0 -1
  35. package/dist/chunks/tab.types-ClVkJZuy.js +0 -2
@@ -1,7 +1,7 @@
1
1
  import { j as s } from "./jsx-runtime-C5mzlN2N.js";
2
2
  import { useMemo as d, useEffect as N, useState as E } from "react";
3
3
  import { B as R } from "./button.component-BO6oee_V.js";
4
- import { e as Y, d as $, f as z, u as T, F as p, b as A, c as G, a as Q } from "./datePicker.provider-CttuPiiS.js";
4
+ import { e as Y, d as $, f as z, u as T, F as p, b as A, c as G, a as Q } from "./datePicker.provider-DjDP292O.js";
5
5
  import { u as q } from "./usePortalContentRef-DO_jc4W9.js";
6
6
  import { p as V } from "./popover.recipe-DPwwsWLb.js";
7
7
  import { s as L, c as J, g as K, t as f, a as P, f as U } from "./format-CqTHHSak.js";
@@ -314,4 +314,4 @@ export {
314
314
  n as a,
315
315
  ze as c
316
316
  };
317
- //# sourceMappingURL=dateTimePicker.component-CLAI_Q6e.js.map
317
+ //# sourceMappingURL=dateTimePicker.component-r4V8f57O.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dateTimePicker.component-CLAI_Q6e.js","sources":["../../src/components/DateTimePicker/dateTimePicker.types.ts","../../src/components/DateTimePicker/dateTimePicker.records.ts","../../node_modules/date-fns/startOfToday.js","../../node_modules/date-fns/endOfToday.js","../../node_modules/date-fns/startOfYesterday.js","../../node_modules/date-fns/endOfYesterday.js","../../node_modules/date-fns/endOfWeek.js","../../node_modules/date-fns/startOfMonth.js","../../node_modules/date-fns/endOfMonth.js","../../node_modules/date-fns/addWeeks.js","../../node_modules/date-fns/subWeeks.js","../../node_modules/date-fns/subMonths.js","../../node_modules/date-fns/isEqual.js","../../src/components/DateTimePicker/utils/quickOptions.ts","../../src/components/DateTimePicker/components/DateTimePickerQuickOptions/dateTimePickerQuickOptions.component.tsx","../../src/components/DateTimePicker/components/DateTimePickerRangeSelector/dateTimePickerRangeSelector.component.tsx","../../src/components/DateTimePicker/components/DateTimePickerCustomView/dateTimePickerCustomView.component.tsx","../../src/components/DateTimePicker/dateTimePicker.component.tsx"],"sourcesContent":["export enum DateTimePickerDefaultOptionValue {\n Today = 'Today',\n Yesterday = 'Yesterday',\n ThisWeek = 'ThisWeek',\n LastWeek = 'LastWeek',\n ThisMonth = 'ThisMonth',\n LastMonth = 'LastMonth',\n Custom = 'Custom',\n}\n\nexport const calendarViews = ['single', 'double'] as const;\nexport type CalendarView = (typeof calendarViews)[number];\n","import { IconName } from 'components/Icon/icon.types';\nimport { CalendarView, DateTimePickerDefaultOptionValue } from './dateTimePicker.types';\n\nexport const dateTimePickerDefaultOptions: {\n label: string;\n value: DateTimePickerDefaultOptionValue;\n iconName?: IconName;\n}[] = [\n {\n label: 'Today',\n value: DateTimePickerDefaultOptionValue.Today,\n },\n {\n label: 'Yesterday',\n value: DateTimePickerDefaultOptionValue.Yesterday,\n },\n {\n label: 'This Week',\n value: DateTimePickerDefaultOptionValue.ThisWeek,\n },\n {\n label: 'Last Week',\n value: DateTimePickerDefaultOptionValue.LastWeek,\n },\n {\n label: 'This Month',\n value: DateTimePickerDefaultOptionValue.ThisMonth,\n },\n {\n label: 'Last Month',\n value: DateTimePickerDefaultOptionValue.LastMonth,\n },\n {\n label: 'Custom',\n value: DateTimePickerDefaultOptionValue.Custom,\n iconName: 'calendarPen',\n },\n];\n\nexport const CalendarViewToNumberOfMonthsMap: Record<CalendarView, number> = {\n single: 1,\n double: 2,\n};\n","import { startOfDay } from \"./startOfDay.js\";\n\n/**\n * The {@link startOfToday} function options.\n */\n\n/**\n * @name startOfToday\n * @category Day Helpers\n * @summary Return the start of today.\n * @pure false\n *\n * @description\n * Return the start of today.\n *\n * @typeParam ContextDate - The `Date` type of the context function.\n *\n * @param options - An object with options\n *\n * @returns The start of today\n *\n * @example\n * // If today is 6 October 2014:\n * const result = startOfToday()\n * //=> Mon Oct 6 2014 00:00:00\n */\nexport function startOfToday(options) {\n return startOfDay(Date.now(), options);\n}\n\n// Fallback for modularized imports:\nexport default startOfToday;\n","import { endOfDay } from \"./endOfDay.js\";\n\n/**\n * The {@link endOfToday} function options.\n */\n\n/**\n * @name endOfToday\n * @category Day Helpers\n * @summary Return the end of today.\n * @pure false\n *\n * @description\n * Return the end of today.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param options - The options\n *\n * @returns The end of today\n *\n * @example\n * // If today is 6 October 2014:\n * const result = endOfToday()\n * //=> Mon Oct 6 2014 23:59:59.999\n */\nexport function endOfToday(options) {\n return endOfDay(Date.now(), options);\n}\n\n// Fallback for modularized imports:\nexport default endOfToday;\n","import { constructNow } from \"./constructNow.js\";\n\n/**\n * The {@link startOfYesterday} function options.\n */\n\n/**\n * @name startOfYesterday\n * @category Day Helpers\n * @summary Return the start of yesterday.\n * @pure false\n *\n * @typeParam ContextDate - The `Date` type of the context function.\n *\n * @param options - An object with options\n *\n * @description\n * Return the start of yesterday.\n *\n * @returns The start of yesterday\n *\n * @example\n * // If today is 6 October 2014:\n * const result = startOfYesterday()\n * //=> Sun Oct 5 2014 00:00:00\n */\nexport function startOfYesterday(options) {\n const now = constructNow(options?.in);\n const year = now.getFullYear();\n const month = now.getMonth();\n const day = now.getDate();\n\n const date = constructNow(options?.in);\n date.setFullYear(year, month, day - 1);\n date.setHours(0, 0, 0, 0);\n return date;\n}\n\n// Fallback for modularized imports:\nexport default startOfYesterday;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { constructNow } from \"./constructNow.js\";\n\n/**\n * The {@link endOfYesterday} function options.\n */\n\n/**\n * @name endOfYesterday\n * @category Day Helpers\n * @summary Return the end of yesterday.\n * @pure false\n *\n * @description\n * Return the end of yesterday.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @returns The end of yesterday\n *\n * @example\n * // If today is 6 October 2014:\n * const result = endOfYesterday()\n * //=> Sun Oct 5 2014 23:59:59.999\n */\nexport function endOfYesterday(options) {\n const now = constructNow(options?.in);\n const date = constructFrom(options?.in, 0);\n date.setFullYear(now.getFullYear(), now.getMonth(), now.getDate() - 1);\n date.setHours(23, 59, 59, 999);\n return date;\n}\n\n// Fallback for modularized imports:\nexport default endOfYesterday;\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link endOfWeek} function options.\n */\n\n/**\n * @name endOfWeek\n * @category Week Helpers\n * @summary Return the end of a week for the given date.\n *\n * @description\n * Return the end of a week for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The end of a week\n *\n * @example\n * // The end of a week for 2 September 2014 11:55:00:\n * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sat Sep 06 2014 23:59:59.999\n *\n * @example\n * // If the week starts on Monday, the end of the week for 2 September 2014 11:55:00:\n * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Sun Sep 07 2014 23:59:59.999\n */\nexport function endOfWeek(date, options) {\n const defaultOptions = getDefaultOptions();\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n const _date = toDate(date, options?.in);\n const day = _date.getDay();\n const diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn);\n\n _date.setDate(_date.getDate() + diff);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfWeek;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfMonth} function options.\n */\n\n/**\n * @name startOfMonth\n * @category Month Helpers\n * @summary Return the start of a month for the given date.\n *\n * @description\n * Return the start of a month for the given date. The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments.\n * Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed,\n * or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a month\n *\n * @example\n * // The start of a month for 2 September 2014 11:55:00:\n * const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfMonth(date, options) {\n const _date = toDate(date, options?.in);\n _date.setDate(1);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfMonth;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link endOfMonth} function options.\n */\n\n/**\n * @name endOfMonth\n * @category Month Helpers\n * @summary Return the end of a month for the given date.\n *\n * @description\n * Return the end of a month for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The end of a month\n *\n * @example\n * // The end of a month for 2 September 2014 11:55:00:\n * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\nexport function endOfMonth(date, options) {\n const _date = toDate(date, options?.in);\n const month = _date.getMonth();\n _date.setFullYear(_date.getFullYear(), month + 1, 0);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfMonth;\n","import { addDays } from \"./addDays.js\";\n\n/**\n * The {@link addWeeks} function options.\n */\n\n/**\n * @name addWeeks\n * @category Week Helpers\n * @summary Add the specified number of weeks to the given date.\n *\n * @description\n * Add the specified number of weeks to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of weeks to be added.\n * @param options - An object with options\n *\n * @returns The new date with the weeks added\n *\n * @example\n * // Add 4 weeks to 1 September 2014:\n * const result = addWeeks(new Date(2014, 8, 1), 4)\n * //=> Mon Sep 29 2014 00:00:00\n */\nexport function addWeeks(date, amount, options) {\n return addDays(date, amount * 7, options);\n}\n\n// Fallback for modularized imports:\nexport default addWeeks;\n","import { addWeeks } from \"./addWeeks.js\";\n\n/**\n * The {@link subWeeks} function options.\n */\n\n/**\n * @name subWeeks\n * @category Week Helpers\n * @summary Subtract the specified number of weeks from the given date.\n *\n * @description\n * Subtract the specified number of weeks from the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of weeks to be subtracted.\n * @param options - An object with options\n *\n * @returns The new date with the weeks subtracted\n *\n * @example\n * // Subtract 4 weeks from 1 September 2014:\n * const result = subWeeks(new Date(2014, 8, 1), 4)\n * //=> Mon Aug 04 2014 00:00:00\n */\nexport function subWeeks(date, amount, options) {\n return addWeeks(date, -amount, options);\n}\n\n// Fallback for modularized imports:\nexport default subWeeks;\n","import { addMonths } from \"./addMonths.js\";\n\n/**\n * The subMonths function options.\n */\n\n/**\n * @name subMonths\n * @category Month Helpers\n * @summary Subtract the specified number of months from the given date.\n *\n * @description\n * Subtract the specified number of months from the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of months to be subtracted.\n * @param options - An object with options\n *\n * @returns The new date with the months subtracted\n *\n * @example\n * // Subtract 5 months from 1 February 2015:\n * const result = subMonths(new Date(2015, 1, 1), 5)\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function subMonths(date, amount, options) {\n return addMonths(date, -amount, options);\n}\n\n// Fallback for modularized imports:\nexport default subMonths;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * @name isEqual\n * @category Common Helpers\n * @summary Are the given dates equal?\n *\n * @description\n * Are the given dates equal?\n *\n * @param dateLeft - The first date to compare\n * @param dateRight - The second date to compare\n *\n * @returns The dates are equal\n *\n * @example\n * // Are 2 July 2014 06:30:45.000 and 2 July 2014 06:30:45.500 equal?\n * const result = isEqual(\n * new Date(2014, 6, 2, 6, 30, 45, 0),\n * new Date(2014, 6, 2, 6, 30, 45, 500)\n * )\n * //=> false\n */\nexport function isEqual(leftDate, rightDate) {\n return +toDate(leftDate) === +toDate(rightDate);\n}\n\n// Fallback for modularized imports:\nexport default isEqual;\n","import startOfToday from 'date-fns/startOfToday';\nimport endOfToday from 'date-fns/endOfToday';\nimport startOfYesterday from 'date-fns/startOfYesterday';\nimport endOfYesterday from 'date-fns/endOfYesterday';\nimport startOfWeek from 'date-fns/startOfWeek';\nimport endOfWeek from 'date-fns/endOfWeek';\nimport startOfMonth from 'date-fns/startOfMonth';\nimport endOfMonth from 'date-fns/endOfMonth';\nimport subWeeks from 'date-fns/subWeeks';\nimport subMonths from 'date-fns/subMonths';\nimport isEqual from 'date-fns/isEqual';\nimport { DateTimePickerDefaultOptionValue } from '../dateTimePicker.types';\n\n/**\n * Utility function to get the date range for a given quick option\n */\nexport const getQuickOptionDateRange = (\n option: DateTimePickerDefaultOptionValue,\n): { startDate: Date; endDate: Date } | null => {\n const today = new Date();\n\n switch (option) {\n case DateTimePickerDefaultOptionValue.Today:\n return {\n startDate: startOfToday(),\n endDate: endOfToday(),\n };\n case DateTimePickerDefaultOptionValue.Yesterday:\n return {\n startDate: startOfYesterday(),\n endDate: endOfYesterday(),\n };\n case DateTimePickerDefaultOptionValue.ThisWeek:\n return {\n startDate: startOfWeek(today, { weekStartsOn: 1 }),\n endDate: endOfWeek(today, { weekStartsOn: 1 }),\n };\n case DateTimePickerDefaultOptionValue.LastWeek: {\n const lastWeekDate = subWeeks(today, 1);\n return {\n startDate: startOfWeek(lastWeekDate, { weekStartsOn: 1 }),\n endDate: endOfWeek(lastWeekDate, { weekStartsOn: 1 }),\n };\n }\n case DateTimePickerDefaultOptionValue.ThisMonth:\n return {\n startDate: startOfMonth(today),\n endDate: endOfMonth(today),\n };\n case DateTimePickerDefaultOptionValue.LastMonth: {\n const lastMonthDate = subMonths(today, 1);\n return {\n startDate: startOfMonth(lastMonthDate),\n endDate: endOfMonth(lastMonthDate),\n };\n }\n default:\n return null;\n }\n};\n\n/**\n * Matches provided dates to a quick option\n * Returns the matching option, or Custom if no match, or Today if no dates provided\n */\nexport const matchDatesToQuickOption = (\n startDate: Date | null,\n endDate: Date | null,\n): DateTimePickerDefaultOptionValue => {\n // If no dates provided, default to Today\n if (!startDate || !endDate) {\n return DateTimePickerDefaultOptionValue.Today;\n }\n\n // Try to match against each quick option (excluding Custom)\n const optionsToCheck = [\n DateTimePickerDefaultOptionValue.Today,\n DateTimePickerDefaultOptionValue.Yesterday,\n DateTimePickerDefaultOptionValue.ThisWeek,\n DateTimePickerDefaultOptionValue.LastWeek,\n DateTimePickerDefaultOptionValue.ThisMonth,\n DateTimePickerDefaultOptionValue.LastMonth,\n ];\n\n for (const option of optionsToCheck) {\n const optionRange = getQuickOptionDateRange(option);\n if (optionRange) {\n // Compare dates using isEqual for exact matches\n if (isEqual(startDate, optionRange.startDate) && isEqual(endDate, optionRange.endDate)) {\n return option;\n }\n }\n }\n\n // No match found, return Custom\n return DateTimePickerDefaultOptionValue.Custom;\n};\n","import React from 'react';\nimport { Flex } from '@chakra-ui/react/flex';\nimport { dateTimePickerDefaultOptions } from '../../dateTimePicker.records';\nimport { Button } from 'components/Button';\nimport { DateTimePickerDefaultOptionValue } from '../../dateTimePicker.types';\nimport { usePopoverContext } from '@chakra-ui/react/popover';\nimport { FocusedInput, useDatePickerContext } from 'components/DatePicker/context/datePicker.context';\nimport { getQuickOptionDateRange } from '../../utils/quickOptions';\n\ninterface DateTimePickerQuickOptionsProps {\n /** The currently selected quick option. */\n selectedQuickOption: DateTimePickerDefaultOptionValue;\n /** Callback function to set the selected quick option. */\n setSelectedQuickOption: (option: DateTimePickerDefaultOptionValue) => void;\n /** Data test id for the quick options.\n * @default kibble-datetime-picker-quick-options\n */\n 'data-testid'?: string;\n}\n\nexport const DateTimePickerQuickOptions = ({\n selectedQuickOption,\n setSelectedQuickOption,\n ['data-testid']: dataTestId = 'kibble-datetime-picker-quick-options',\n}: DateTimePickerQuickOptionsProps): React.JSX.Element => {\n const { setFocusedInput, onQuickOptionSelect } = useDatePickerContext();\n const { setOpen } = usePopoverContext();\n\n const handleOptionClick = (option: DateTimePickerDefaultOptionValue): void => {\n setSelectedQuickOption(option);\n\n if (option === DateTimePickerDefaultOptionValue.Custom) {\n setFocusedInput(FocusedInput.StartDate);\n return;\n }\n\n const dates = getQuickOptionDateRange(option);\n if (dates) {\n onQuickOptionSelect(dates);\n setOpen(false);\n }\n };\n\n return (\n <Flex className=\"DateTimePicker__QuickFilters\" flexDirection=\"column\" gap={2} w=\"100%\" maxW=\"120px\">\n {dateTimePickerDefaultOptions.map((option) => (\n <Button\n className=\"DateTimePicker__Option\"\n data-testid={`${dataTestId}-option-${option.value}`}\n key={option.value}\n variant=\"secondarySubtle\"\n {...(option.iconName && { iconName: option.iconName, iconPosition: 'right' })}\n {...(selectedQuickOption === option.value && { active: true })}\n onClick={() => handleOptionClick(option.value)}\n >\n {option.label}\n </Button>\n ))}\n </Flex>\n );\n};\n","import React, { useMemo } from 'react';\nimport { Grid, GridItem } from '@chakra-ui/react/grid';\nimport { FocusedInput, useDatePickerContext } from 'components/DatePicker/context/datePicker.context';\nimport { Text } from 'components/Text/text.component';\nimport { TextInput } from 'components/TextInput/textInput.component';\nimport { TimePicker } from 'components/TimePicker/timePicker.component';\nimport format from 'date-fns/format';\n\ninterface DateTimePickerRangeSelectorProps {\n /** Label for the range selector. */\n label: string;\n /** Type of range selector. */\n rangeType: FocusedInput;\n}\n\nexport const DateTimePickerRangeSelector = ({\n label,\n rangeType,\n}: DateTimePickerRangeSelectorProps): React.JSX.Element => {\n const { startDate, endDate, dateFormat, focusedInput, setFocusedInput, onTimeChange } = useDatePickerContext();\n const _date = useMemo(\n () => (rangeType === FocusedInput.StartDate ? startDate : endDate) || new Date(),\n [startDate, endDate, rangeType],\n );\n const formattedDate = useMemo(() => format(_date, dateFormat), [_date, dateFormat]);\n\n const handleTimeChange = (date?: Date): void => {\n if (!date) return;\n onTimeChange(date, rangeType);\n };\n\n return (\n <Grid\n alignItems=\"center\"\n templateColumns=\"repeat(5, 1fr)\"\n gap={1}\n bgColor=\"background.secondaryAlpha\"\n borderRadius=\"md\"\n p={1}\n flex=\"0 0 50%\"\n >\n <GridItem colSpan={1}>\n <Text size=\"sm\" fontWeight=\"semibold\" textAlign=\"center\">\n {label}\n </Text>\n </GridItem>\n <GridItem colSpan={2}>\n <TextInput\n readOnly\n value={formattedDate}\n onClick={() => setFocusedInput(rangeType)}\n {...(focusedInput === rangeType && {\n 'data-focus': true,\n })}\n />\n </GridItem>\n <GridItem colSpan={2}>\n <TimePicker\n minuteInterval={1}\n initialTime={_date}\n onClose={(time) => handleTimeChange(time)}\n inputProps={{ rightElement: undefined, onClick: () => setFocusedInput(rangeType) }}\n />\n </GridItem>\n </Grid>\n );\n};\n","import React, { useEffect } from 'react';\nimport { Box } from '@chakra-ui/react/box';\nimport { Flex } from '@chakra-ui/react/flex';\nimport { DateTimePickerRangeSelector } from '../DateTimePickerRangeSelector/dateTimePickerRangeSelector.component';\nimport { DatePickerHeader } from 'components/DatePicker/components/DatePickerHeader/datePickerHeader.component';\nimport { DatePickerCalendar } from 'components/DatePicker/components/DatePickerCalendar/datePickerCalendar.component';\nimport { FocusedInput, useDatePickerContext } from 'components/DatePicker/context/datePicker.context';\n\ninterface DateTimePickerCustomViewProps {\n /** Determines if the calendar view is single. */\n isSingleView: boolean;\n}\n\nexport const DateTimePickerCustomView = ({ isSingleView }: DateTimePickerCustomViewProps): React.JSX.Element => {\n const { focusedInput, setFocusedInput } = useDatePickerContext();\n\n useEffect(() => {\n if (!focusedInput) {\n setFocusedInput(FocusedInput.StartDate);\n }\n }, [focusedInput, setFocusedInput]);\n\n return (\n <Box className=\"DateTimePicker__CustomFilters\" mt={-1}>\n <Flex\n className=\"DateTimePicker__CustomFilters__RangeSelectors\"\n flexDirection={isSingleView ? 'column' : 'row'}\n alignItems=\"center\"\n gap={2}\n justifyContent=\"space-between\"\n >\n <DateTimePickerRangeSelector label=\"Start\" rangeType={FocusedInput.StartDate} />\n <DateTimePickerRangeSelector label=\"End\" rangeType={FocusedInput.EndDate} />\n </Flex>\n <Box className=\"CalendarView\" bgColor=\"background.secondaryAlpha\" borderRadius=\"md\" p={1} mt={5}>\n <Box className=\"CalendarView__Header\" bgColor=\"background.accent.subtle\" borderRadius=\"md\">\n <DatePickerHeader triggerProps={{ variant: 'ghostNeutral' }} />\n </Box>\n <Box className=\"CalendarView__Body\">\n <DatePickerCalendar showMonthLabels />\n </Box>\n </Box>\n </Box>\n );\n};\n","import React, { useEffect, useMemo, useState } from 'react';\nimport { Popover as CPopover } from '@chakra-ui/react/popover';\nimport { Button } from 'components/Button/button.component';\nimport { Flex } from '@chakra-ui/react/flex';\nimport { CalendarViewToNumberOfMonthsMap } from './dateTimePicker.records';\nimport { CalendarView, DateTimePickerDefaultOptionValue } from './dateTimePicker.types';\nimport { DatePickerProvider } from 'components/DatePicker/context/datePicker.provider';\nimport { DateProps } from 'components/DatePicker/datePicker.types';\nimport { Placement } from 'shared/types/placement';\nimport { usePortalContentRef } from 'hooks/usePortalContentRef';\nimport { Portal } from '@chakra-ui/react/portal';\nimport { useSlotRecipe } from '@chakra-ui/react/styled-system';\nimport { popoverRecipe } from 'components/Popover/popover.recipe';\nimport { DateTimePickerQuickOptions } from './components/DateTimePickerQuickOptions/dateTimePickerQuickOptions.component';\nimport startOfDay from 'date-fns/startOfDay';\nimport endOfDay from 'date-fns/endOfDay';\nimport { matchDatesToQuickOption } from './utils/quickOptions';\nimport { useBreakpoint } from 'hooks/useBreakpoint';\nimport { DateTimePickerCustomView } from './components/DateTimePickerCustomView/dateTimePickerCustomView.component';\nimport { Divider } from 'components/Divider/divider.component';\n\nexport interface DateTimePickerProps extends DateProps {\n /**\n * Controls the number of months displayed in the calendar.\n * @default double\n */\n calendarView?: CalendarView;\n /** Custom element to trigger the date time picker. If not provided, a button will be rendered. */\n trigger?: React.ReactNode;\n /**\n * Placement of the calendar popover\n * @default bottom\n */\n placement?: Placement;\n /**\n * If true, the date time picker will be rendered in a portal.\n * @default true\n */\n portalled?: boolean;\n /**\n * Whether to show the left side quick options in the calendar.\n * @default true\n */\n showQuickOptions?: boolean;\n /** Data test id for the date time picker.\n * @default kibble-datetime-picker\n */\n 'data-testid'?: string;\n}\n\nexport const DateTimePicker = ({\n trigger,\n calendarView = 'double',\n portalled = true,\n showQuickOptions = true,\n ['data-testid']: dataTestId = 'kibble-datetime-picker',\n ...rest\n}: DateTimePickerProps): React.JSX.Element => {\n const defaultDates = useMemo(() => {\n const today = new Date();\n return {\n startDate: startOfDay(today),\n endDate: endOfDay(today),\n };\n }, []);\n const { contentRef } = usePortalContentRef();\n const recipe = useSlotRecipe({ recipe: popoverRecipe });\n const styles = recipe();\n const breakpoint = useBreakpoint();\n\n // Initialize selected quick option based on provided dates\n const initialQuickOption = useMemo(() => {\n return showQuickOptions\n ? matchDatesToQuickOption(rest.startDate || null, rest.endDate || null)\n : DateTimePickerDefaultOptionValue.Custom;\n }, [showQuickOptions, rest.startDate, rest.endDate]);\n\n const [selectedQuickOption, setSelectedQuickOption] = useState<DateTimePickerDefaultOptionValue>(initialQuickOption);\n\n // Sync selectedQuickOption when props change\n useEffect(() => {\n setSelectedQuickOption(initialQuickOption);\n }, [initialQuickOption]);\n\n const _calendarView = useMemo(\n () => (['base', 'sm'].includes(breakpoint) ? 'single' : calendarView),\n [calendarView, breakpoint],\n );\n const numberOfMonths = useMemo(() => CalendarViewToNumberOfMonthsMap[_calendarView], [_calendarView]);\n const isSingleView = useMemo(() => _calendarView === 'single', [_calendarView]);\n const isCustomSelected = useMemo(\n () => selectedQuickOption === DateTimePickerDefaultOptionValue.Custom,\n [selectedQuickOption],\n );\n const popoverSize = useMemo(() => (isCustomSelected ? 'max-content' : '160px'), [isCustomSelected]);\n\n return (\n <DatePickerProvider\n {...rest}\n startDate={rest.startDate || defaultDates.startDate}\n endDate={rest.endDate || defaultDates.endDate}\n withDateRange\n numberOfMonths={numberOfMonths}\n sameWidth={true}\n >\n <CPopover.Trigger asChild w=\"max-content\">\n {trigger || (\n <Button variant=\"secondarySubtle\" iconName=\"calendarInfo\" data-testid={`${dataTestId}-default-trigger`}>\n Date/Time Range\n </Button>\n )}\n </CPopover.Trigger>\n <Portal container={contentRef || undefined} disabled={!portalled}>\n <CPopover.Positioner className=\"DateTimePicker\" data-testid={dataTestId}>\n <CPopover.Content\n className=\"DateTimePicker__Content\"\n data-testid={`${dataTestId}-content`}\n css={{\n ...styles.content,\n '--popover-size': popoverSize,\n maxW: showQuickOptions ? (isSingleView ? '550px' : '890px') : isSingleView ? '390px' : '730px',\n ...(isCustomSelected && { minW: showQuickOptions ? '550px' : '390px' }),\n }}\n >\n <CPopover.Body css={{ '--popover-padding': 0 }}>\n <Flex className=\"DateTimePicker__Container\" data-testid={`${dataTestId}-container`} p={5}>\n {showQuickOptions && (\n <DateTimePickerQuickOptions\n selectedQuickOption={selectedQuickOption}\n setSelectedQuickOption={setSelectedQuickOption}\n />\n )}\n {selectedQuickOption === DateTimePickerDefaultOptionValue.Custom && (\n <>\n {showQuickOptions && <Divider orientation=\"vertical\" my={-5} mx={5} />}\n <DateTimePickerCustomView isSingleView={isSingleView} />\n </>\n )}\n </Flex>\n </CPopover.Body>\n </CPopover.Content>\n </CPopover.Positioner>\n </Portal>\n </DatePickerProvider>\n );\n};\n"],"names":["DateTimePickerDefaultOptionValue","calendarViews","dateTimePickerDefaultOptions","CalendarViewToNumberOfMonthsMap","startOfToday","options","startOfDay","endOfToday","endOfDay","startOfYesterday","now","constructNow","year","month","day","date","endOfYesterday","constructFrom","endOfWeek","defaultOptions","getDefaultOptions","weekStartsOn","_date","toDate","diff","startOfMonth","endOfMonth","addWeeks","amount","addDays","subWeeks","subMonths","addMonths","isEqual","leftDate","rightDate","getQuickOptionDateRange","option","today","startOfWeek","lastWeekDate","lastMonthDate","matchDatesToQuickOption","startDate","endDate","optionsToCheck","optionRange","DateTimePickerQuickOptions","selectedQuickOption","setSelectedQuickOption","dataTestId","setFocusedInput","onQuickOptionSelect","useDatePickerContext","setOpen","usePopoverContext","handleOptionClick","FocusedInput","dates","jsx","Flex","Button","DateTimePickerRangeSelector","label","rangeType","dateFormat","focusedInput","onTimeChange","useMemo","formattedDate","format","handleTimeChange","jsxs","Grid","GridItem","Text","TextInput","TimePicker","time","DateTimePickerCustomView","isSingleView","useEffect","Box","DatePickerHeader","DatePickerCalendar","DateTimePicker","trigger","calendarView","portalled","showQuickOptions","rest","defaultDates","contentRef","usePortalContentRef","styles","useSlotRecipe","popoverRecipe","breakpoint","useBreakpoint","initialQuickOption","useState","_calendarView","numberOfMonths","isCustomSelected","popoverSize","DatePickerProvider","CPopover.Trigger","Portal","CPopover.Positioner","CPopover.Content","CPopover.Body","Fragment","Divider"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAY,IAAAA,sBAAAA,OACVA,EAAA,QAAQ,SACRA,EAAA,YAAY,aACZA,EAAA,WAAW,YACXA,EAAA,WAAW,YACXA,EAAA,YAAY,aACZA,EAAA,YAAY,aACZA,EAAA,SAAS,UAPCA,IAAAA,KAAA,CAAA,CAAA;AAUC,MAAAC,KAAgB,CAAC,UAAU,QAAQ,GCPnCC,KAIP;AAAA,EACJ;AAAA,IACE,OAAO;AAAA,IACP,OAAOF,EAAiC;AAAA,EAC1C;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAOA,EAAiC;AAAA,EAC1C;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAOA,EAAiC;AAAA,EAC1C;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAOA,EAAiC;AAAA,EAC1C;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAOA,EAAiC;AAAA,EAC1C;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAOA,EAAiC;AAAA,EAC1C;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAOA,EAAiC;AAAA,IACxC,UAAU;AAAA,EAAA;AAEd,GAEaG,KAAgE;AAAA,EAC3E,QAAQ;AAAA,EACR,QAAQ;AACV;AChBO,SAASC,GAAaC,GAAS;AACpC,SAAOC,EAAW,KAAK,IAAG,GAAID,CAAO;AACvC;ACDO,SAASE,GA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ACV,eAAa,GAAG3D,CAAU;AAAA,YAC1B,KAAK;AAAA,cACH,GAAG4C,EAAO;AAAA,cACV,kBAAkBU;AAAA,cAClB,MAAMf,IAAoBT,IAAe,UAAU,UAAWA,IAAe,UAAU;AAAA,cACvF,GAAIuB,KAAoB,EAAE,MAAMd,IAAmB,UAAU,QAAQ;AAAA,YACvE;AAAA,YAEA,gCAACqB,IAAA,EAAc,KAAK,EAAE,qBAAqB,EAAE,GAC3C,UAACtC,gBAAAA,OAAAZ,GAAA,EAAK,WAAU,6BAA4B,eAAa,GAAGV,CAAU,cAAc,GAAG,GACpF,UAAA;AAAA,cACCuC,KAAA9B,gBAAAA,EAAA;AAAA,gBAACZ;AAAA,gBAAA;AAAA,kBACC,qBAAAC;AAAA,kBACA,wBAAAC;AAAA,gBAAA;AAAA,cACF;AAAA,cAEDD,MAAwBhD,EAAiC,UAErDwE,gBAAAA,EAAA,KAAAuC,EAAA,UAAA,EAAA,UAAA;AAAA,gBAAAtB,2BAAqBuB,IAAQ,EAAA,aAAY,YAAW,IAAI,IAAI,IAAI,GAAG;AAAA,gBACpErD,gBAAAA,MAACoB,MAAyB,cAAAC,EAA4B,CAAA;AAAA,cAAA,EACxD,CAAA;AAAA,YAAA,EAAA,CAEJ,EACF,CAAA;AAAA,UAAA;AAAA,WAEJ,EACF,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACF;AAEJ;","x_google_ignoreList":[2,3,4,5,6,7,8,9,10,11,12]}
1
+ {"version":3,"file":"dateTimePicker.component-r4V8f57O.js","sources":["../../src/components/DateTimePicker/dateTimePicker.types.ts","../../src/components/DateTimePicker/dateTimePicker.records.ts","../../node_modules/date-fns/startOfToday.js","../../node_modules/date-fns/endOfToday.js","../../node_modules/date-fns/startOfYesterday.js","../../node_modules/date-fns/endOfYesterday.js","../../node_modules/date-fns/endOfWeek.js","../../node_modules/date-fns/startOfMonth.js","../../node_modules/date-fns/endOfMonth.js","../../node_modules/date-fns/addWeeks.js","../../node_modules/date-fns/subWeeks.js","../../node_modules/date-fns/subMonths.js","../../node_modules/date-fns/isEqual.js","../../src/components/DateTimePicker/utils/quickOptions.ts","../../src/components/DateTimePicker/components/DateTimePickerQuickOptions/dateTimePickerQuickOptions.component.tsx","../../src/components/DateTimePicker/components/DateTimePickerRangeSelector/dateTimePickerRangeSelector.component.tsx","../../src/components/DateTimePicker/components/DateTimePickerCustomView/dateTimePickerCustomView.component.tsx","../../src/components/DateTimePicker/dateTimePicker.component.tsx"],"sourcesContent":["export enum DateTimePickerDefaultOptionValue {\n Today = 'Today',\n Yesterday = 'Yesterday',\n ThisWeek = 'ThisWeek',\n LastWeek = 'LastWeek',\n ThisMonth = 'ThisMonth',\n LastMonth = 'LastMonth',\n Custom = 'Custom',\n}\n\nexport const calendarViews = ['single', 'double'] as const;\nexport type CalendarView = (typeof calendarViews)[number];\n","import { IconName } from 'components/Icon/icon.types';\nimport { CalendarView, DateTimePickerDefaultOptionValue } from './dateTimePicker.types';\n\nexport const dateTimePickerDefaultOptions: {\n label: string;\n value: DateTimePickerDefaultOptionValue;\n iconName?: IconName;\n}[] = [\n {\n label: 'Today',\n value: DateTimePickerDefaultOptionValue.Today,\n },\n {\n label: 'Yesterday',\n value: DateTimePickerDefaultOptionValue.Yesterday,\n },\n {\n label: 'This Week',\n value: DateTimePickerDefaultOptionValue.ThisWeek,\n },\n {\n label: 'Last Week',\n value: DateTimePickerDefaultOptionValue.LastWeek,\n },\n {\n label: 'This Month',\n value: DateTimePickerDefaultOptionValue.ThisMonth,\n },\n {\n label: 'Last Month',\n value: DateTimePickerDefaultOptionValue.LastMonth,\n },\n {\n label: 'Custom',\n value: DateTimePickerDefaultOptionValue.Custom,\n iconName: 'calendarPen',\n },\n];\n\nexport const CalendarViewToNumberOfMonthsMap: Record<CalendarView, number> = {\n single: 1,\n double: 2,\n};\n","import { startOfDay } from \"./startOfDay.js\";\n\n/**\n * The {@link startOfToday} function options.\n */\n\n/**\n * @name startOfToday\n * @category Day Helpers\n * @summary Return the start of today.\n * @pure false\n *\n * @description\n * Return the start of today.\n *\n * @typeParam ContextDate - The `Date` type of the context function.\n *\n * @param options - An object with options\n *\n * @returns The start of today\n *\n * @example\n * // If today is 6 October 2014:\n * const result = startOfToday()\n * //=> Mon Oct 6 2014 00:00:00\n */\nexport function startOfToday(options) {\n return startOfDay(Date.now(), options);\n}\n\n// Fallback for modularized imports:\nexport default startOfToday;\n","import { endOfDay } from \"./endOfDay.js\";\n\n/**\n * The {@link endOfToday} function options.\n */\n\n/**\n * @name endOfToday\n * @category Day Helpers\n * @summary Return the end of today.\n * @pure false\n *\n * @description\n * Return the end of today.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param options - The options\n *\n * @returns The end of today\n *\n * @example\n * // If today is 6 October 2014:\n * const result = endOfToday()\n * //=> Mon Oct 6 2014 23:59:59.999\n */\nexport function endOfToday(options) {\n return endOfDay(Date.now(), options);\n}\n\n// Fallback for modularized imports:\nexport default endOfToday;\n","import { constructNow } from \"./constructNow.js\";\n\n/**\n * The {@link startOfYesterday} function options.\n */\n\n/**\n * @name startOfYesterday\n * @category Day Helpers\n * @summary Return the start of yesterday.\n * @pure false\n *\n * @typeParam ContextDate - The `Date` type of the context function.\n *\n * @param options - An object with options\n *\n * @description\n * Return the start of yesterday.\n *\n * @returns The start of yesterday\n *\n * @example\n * // If today is 6 October 2014:\n * const result = startOfYesterday()\n * //=> Sun Oct 5 2014 00:00:00\n */\nexport function startOfYesterday(options) {\n const now = constructNow(options?.in);\n const year = now.getFullYear();\n const month = now.getMonth();\n const day = now.getDate();\n\n const date = constructNow(options?.in);\n date.setFullYear(year, month, day - 1);\n date.setHours(0, 0, 0, 0);\n return date;\n}\n\n// Fallback for modularized imports:\nexport default startOfYesterday;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { constructNow } from \"./constructNow.js\";\n\n/**\n * The {@link endOfYesterday} function options.\n */\n\n/**\n * @name endOfYesterday\n * @category Day Helpers\n * @summary Return the end of yesterday.\n * @pure false\n *\n * @description\n * Return the end of yesterday.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @returns The end of yesterday\n *\n * @example\n * // If today is 6 October 2014:\n * const result = endOfYesterday()\n * //=> Sun Oct 5 2014 23:59:59.999\n */\nexport function endOfYesterday(options) {\n const now = constructNow(options?.in);\n const date = constructFrom(options?.in, 0);\n date.setFullYear(now.getFullYear(), now.getMonth(), now.getDate() - 1);\n date.setHours(23, 59, 59, 999);\n return date;\n}\n\n// Fallback for modularized imports:\nexport default endOfYesterday;\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link endOfWeek} function options.\n */\n\n/**\n * @name endOfWeek\n * @category Week Helpers\n * @summary Return the end of a week for the given date.\n *\n * @description\n * Return the end of a week for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The end of a week\n *\n * @example\n * // The end of a week for 2 September 2014 11:55:00:\n * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sat Sep 06 2014 23:59:59.999\n *\n * @example\n * // If the week starts on Monday, the end of the week for 2 September 2014 11:55:00:\n * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Sun Sep 07 2014 23:59:59.999\n */\nexport function endOfWeek(date, options) {\n const defaultOptions = getDefaultOptions();\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n const _date = toDate(date, options?.in);\n const day = _date.getDay();\n const diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn);\n\n _date.setDate(_date.getDate() + diff);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfWeek;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfMonth} function options.\n */\n\n/**\n * @name startOfMonth\n * @category Month Helpers\n * @summary Return the start of a month for the given date.\n *\n * @description\n * Return the start of a month for the given date. The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments.\n * Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed,\n * or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a month\n *\n * @example\n * // The start of a month for 2 September 2014 11:55:00:\n * const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfMonth(date, options) {\n const _date = toDate(date, options?.in);\n _date.setDate(1);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfMonth;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link endOfMonth} function options.\n */\n\n/**\n * @name endOfMonth\n * @category Month Helpers\n * @summary Return the end of a month for the given date.\n *\n * @description\n * Return the end of a month for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The end of a month\n *\n * @example\n * // The end of a month for 2 September 2014 11:55:00:\n * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\nexport function endOfMonth(date, options) {\n const _date = toDate(date, options?.in);\n const month = _date.getMonth();\n _date.setFullYear(_date.getFullYear(), month + 1, 0);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfMonth;\n","import { addDays } from \"./addDays.js\";\n\n/**\n * The {@link addWeeks} function options.\n */\n\n/**\n * @name addWeeks\n * @category Week Helpers\n * @summary Add the specified number of weeks to the given date.\n *\n * @description\n * Add the specified number of weeks to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of weeks to be added.\n * @param options - An object with options\n *\n * @returns The new date with the weeks added\n *\n * @example\n * // Add 4 weeks to 1 September 2014:\n * const result = addWeeks(new Date(2014, 8, 1), 4)\n * //=> Mon Sep 29 2014 00:00:00\n */\nexport function addWeeks(date, amount, options) {\n return addDays(date, amount * 7, options);\n}\n\n// Fallback for modularized imports:\nexport default addWeeks;\n","import { addWeeks } from \"./addWeeks.js\";\n\n/**\n * The {@link subWeeks} function options.\n */\n\n/**\n * @name subWeeks\n * @category Week Helpers\n * @summary Subtract the specified number of weeks from the given date.\n *\n * @description\n * Subtract the specified number of weeks from the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of weeks to be subtracted.\n * @param options - An object with options\n *\n * @returns The new date with the weeks subtracted\n *\n * @example\n * // Subtract 4 weeks from 1 September 2014:\n * const result = subWeeks(new Date(2014, 8, 1), 4)\n * //=> Mon Aug 04 2014 00:00:00\n */\nexport function subWeeks(date, amount, options) {\n return addWeeks(date, -amount, options);\n}\n\n// Fallback for modularized imports:\nexport default subWeeks;\n","import { addMonths } from \"./addMonths.js\";\n\n/**\n * The subMonths function options.\n */\n\n/**\n * @name subMonths\n * @category Month Helpers\n * @summary Subtract the specified number of months from the given date.\n *\n * @description\n * Subtract the specified number of months from the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of months to be subtracted.\n * @param options - An object with options\n *\n * @returns The new date with the months subtracted\n *\n * @example\n * // Subtract 5 months from 1 February 2015:\n * const result = subMonths(new Date(2015, 1, 1), 5)\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function subMonths(date, amount, options) {\n return addMonths(date, -amount, options);\n}\n\n// Fallback for modularized imports:\nexport default subMonths;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * @name isEqual\n * @category Common Helpers\n * @summary Are the given dates equal?\n *\n * @description\n * Are the given dates equal?\n *\n * @param dateLeft - The first date to compare\n * @param dateRight - The second date to compare\n *\n * @returns The dates are equal\n *\n * @example\n * // Are 2 July 2014 06:30:45.000 and 2 July 2014 06:30:45.500 equal?\n * const result = isEqual(\n * new Date(2014, 6, 2, 6, 30, 45, 0),\n * new Date(2014, 6, 2, 6, 30, 45, 500)\n * )\n * //=> false\n */\nexport function isEqual(leftDate, rightDate) {\n return +toDate(leftDate) === +toDate(rightDate);\n}\n\n// Fallback for modularized imports:\nexport default isEqual;\n","import startOfToday from 'date-fns/startOfToday';\nimport endOfToday from 'date-fns/endOfToday';\nimport startOfYesterday from 'date-fns/startOfYesterday';\nimport endOfYesterday from 'date-fns/endOfYesterday';\nimport startOfWeek from 'date-fns/startOfWeek';\nimport endOfWeek from 'date-fns/endOfWeek';\nimport startOfMonth from 'date-fns/startOfMonth';\nimport endOfMonth from 'date-fns/endOfMonth';\nimport subWeeks from 'date-fns/subWeeks';\nimport subMonths from 'date-fns/subMonths';\nimport isEqual from 'date-fns/isEqual';\nimport { DateTimePickerDefaultOptionValue } from '../dateTimePicker.types';\n\n/**\n * Utility function to get the date range for a given quick option\n */\nexport const getQuickOptionDateRange = (\n option: DateTimePickerDefaultOptionValue,\n): { startDate: Date; endDate: Date } | null => {\n const today = new Date();\n\n switch (option) {\n case DateTimePickerDefaultOptionValue.Today:\n return {\n startDate: startOfToday(),\n endDate: endOfToday(),\n };\n case DateTimePickerDefaultOptionValue.Yesterday:\n return {\n startDate: startOfYesterday(),\n endDate: endOfYesterday(),\n };\n case DateTimePickerDefaultOptionValue.ThisWeek:\n return {\n startDate: startOfWeek(today, { weekStartsOn: 1 }),\n endDate: endOfWeek(today, { weekStartsOn: 1 }),\n };\n case DateTimePickerDefaultOptionValue.LastWeek: {\n const lastWeekDate = subWeeks(today, 1);\n return {\n startDate: startOfWeek(lastWeekDate, { weekStartsOn: 1 }),\n endDate: endOfWeek(lastWeekDate, { weekStartsOn: 1 }),\n };\n }\n case DateTimePickerDefaultOptionValue.ThisMonth:\n return {\n startDate: startOfMonth(today),\n endDate: endOfMonth(today),\n };\n case DateTimePickerDefaultOptionValue.LastMonth: {\n const lastMonthDate = subMonths(today, 1);\n return {\n startDate: startOfMonth(lastMonthDate),\n endDate: endOfMonth(lastMonthDate),\n };\n }\n default:\n return null;\n }\n};\n\n/**\n * Matches provided dates to a quick option\n * Returns the matching option, or Custom if no match, or Today if no dates provided\n */\nexport const matchDatesToQuickOption = (\n startDate: Date | null,\n endDate: Date | null,\n): DateTimePickerDefaultOptionValue => {\n // If no dates provided, default to Today\n if (!startDate || !endDate) {\n return DateTimePickerDefaultOptionValue.Today;\n }\n\n // Try to match against each quick option (excluding Custom)\n const optionsToCheck = [\n DateTimePickerDefaultOptionValue.Today,\n DateTimePickerDefaultOptionValue.Yesterday,\n DateTimePickerDefaultOptionValue.ThisWeek,\n DateTimePickerDefaultOptionValue.LastWeek,\n DateTimePickerDefaultOptionValue.ThisMonth,\n DateTimePickerDefaultOptionValue.LastMonth,\n ];\n\n for (const option of optionsToCheck) {\n const optionRange = getQuickOptionDateRange(option);\n if (optionRange) {\n // Compare dates using isEqual for exact matches\n if (isEqual(startDate, optionRange.startDate) && isEqual(endDate, optionRange.endDate)) {\n return option;\n }\n }\n }\n\n // No match found, return Custom\n return DateTimePickerDefaultOptionValue.Custom;\n};\n","import React from 'react';\nimport { Flex } from '@chakra-ui/react/flex';\nimport { dateTimePickerDefaultOptions } from '../../dateTimePicker.records';\nimport { Button } from 'components/Button';\nimport { DateTimePickerDefaultOptionValue } from '../../dateTimePicker.types';\nimport { usePopoverContext } from '@chakra-ui/react/popover';\nimport { FocusedInput, useDatePickerContext } from 'components/DatePicker/context/datePicker.context';\nimport { getQuickOptionDateRange } from '../../utils/quickOptions';\n\ninterface DateTimePickerQuickOptionsProps {\n /** The currently selected quick option. */\n selectedQuickOption: DateTimePickerDefaultOptionValue;\n /** Callback function to set the selected quick option. */\n setSelectedQuickOption: (option: DateTimePickerDefaultOptionValue) => void;\n /** Data test id for the quick options.\n * @default kibble-datetime-picker-quick-options\n */\n 'data-testid'?: string;\n}\n\nexport const DateTimePickerQuickOptions = ({\n selectedQuickOption,\n setSelectedQuickOption,\n ['data-testid']: dataTestId = 'kibble-datetime-picker-quick-options',\n}: DateTimePickerQuickOptionsProps): React.JSX.Element => {\n const { setFocusedInput, onQuickOptionSelect } = useDatePickerContext();\n const { setOpen } = usePopoverContext();\n\n const handleOptionClick = (option: DateTimePickerDefaultOptionValue): void => {\n setSelectedQuickOption(option);\n\n if (option === DateTimePickerDefaultOptionValue.Custom) {\n setFocusedInput(FocusedInput.StartDate);\n return;\n }\n\n const dates = getQuickOptionDateRange(option);\n if (dates) {\n onQuickOptionSelect(dates);\n setOpen(false);\n }\n };\n\n return (\n <Flex className=\"DateTimePicker__QuickFilters\" flexDirection=\"column\" gap={2} w=\"100%\" maxW=\"120px\">\n {dateTimePickerDefaultOptions.map((option) => (\n <Button\n className=\"DateTimePicker__Option\"\n data-testid={`${dataTestId}-option-${option.value}`}\n key={option.value}\n variant=\"secondarySubtle\"\n {...(option.iconName && { iconName: option.iconName, iconPosition: 'right' })}\n {...(selectedQuickOption === option.value && { active: true })}\n onClick={() => handleOptionClick(option.value)}\n >\n {option.label}\n </Button>\n ))}\n </Flex>\n );\n};\n","import React, { useMemo } from 'react';\nimport { Grid, GridItem } from '@chakra-ui/react/grid';\nimport { FocusedInput, useDatePickerContext } from 'components/DatePicker/context/datePicker.context';\nimport { Text } from 'components/Text/text.component';\nimport { TextInput } from 'components/TextInput/textInput.component';\nimport { TimePicker } from 'components/TimePicker/timePicker.component';\nimport format from 'date-fns/format';\n\ninterface DateTimePickerRangeSelectorProps {\n /** Label for the range selector. */\n label: string;\n /** Type of range selector. */\n rangeType: FocusedInput;\n}\n\nexport const DateTimePickerRangeSelector = ({\n label,\n rangeType,\n}: DateTimePickerRangeSelectorProps): React.JSX.Element => {\n const { startDate, endDate, dateFormat, focusedInput, setFocusedInput, onTimeChange } = useDatePickerContext();\n const _date = useMemo(\n () => (rangeType === FocusedInput.StartDate ? startDate : endDate) || new Date(),\n [startDate, endDate, rangeType],\n );\n const formattedDate = useMemo(() => format(_date, dateFormat), [_date, dateFormat]);\n\n const handleTimeChange = (date?: Date): void => {\n if (!date) return;\n onTimeChange(date, rangeType);\n };\n\n return (\n <Grid\n alignItems=\"center\"\n templateColumns=\"repeat(5, 1fr)\"\n gap={1}\n bgColor=\"background.secondaryAlpha\"\n borderRadius=\"md\"\n p={1}\n flex=\"0 0 50%\"\n >\n <GridItem colSpan={1}>\n <Text size=\"sm\" fontWeight=\"semibold\" textAlign=\"center\">\n {label}\n </Text>\n </GridItem>\n <GridItem colSpan={2}>\n <TextInput\n readOnly\n value={formattedDate}\n onClick={() => setFocusedInput(rangeType)}\n {...(focusedInput === rangeType && {\n 'data-focus': true,\n })}\n />\n </GridItem>\n <GridItem colSpan={2}>\n <TimePicker\n minuteInterval={1}\n initialTime={_date}\n onClose={(time) => handleTimeChange(time)}\n inputProps={{ rightElement: undefined, onClick: () => setFocusedInput(rangeType) }}\n />\n </GridItem>\n </Grid>\n );\n};\n","import React, { useEffect } from 'react';\nimport { Box } from '@chakra-ui/react/box';\nimport { Flex } from '@chakra-ui/react/flex';\nimport { DateTimePickerRangeSelector } from '../DateTimePickerRangeSelector/dateTimePickerRangeSelector.component';\nimport { DatePickerHeader } from 'components/DatePicker/components/DatePickerHeader/datePickerHeader.component';\nimport { DatePickerCalendar } from 'components/DatePicker/components/DatePickerCalendar/datePickerCalendar.component';\nimport { FocusedInput, useDatePickerContext } from 'components/DatePicker/context/datePicker.context';\n\ninterface DateTimePickerCustomViewProps {\n /** Determines if the calendar view is single. */\n isSingleView: boolean;\n}\n\nexport const DateTimePickerCustomView = ({ isSingleView }: DateTimePickerCustomViewProps): React.JSX.Element => {\n const { focusedInput, setFocusedInput } = useDatePickerContext();\n\n useEffect(() => {\n if (!focusedInput) {\n setFocusedInput(FocusedInput.StartDate);\n }\n }, [focusedInput, setFocusedInput]);\n\n return (\n <Box className=\"DateTimePicker__CustomFilters\" mt={-1}>\n <Flex\n className=\"DateTimePicker__CustomFilters__RangeSelectors\"\n flexDirection={isSingleView ? 'column' : 'row'}\n alignItems=\"center\"\n gap={2}\n justifyContent=\"space-between\"\n >\n <DateTimePickerRangeSelector label=\"Start\" rangeType={FocusedInput.StartDate} />\n <DateTimePickerRangeSelector label=\"End\" rangeType={FocusedInput.EndDate} />\n </Flex>\n <Box className=\"CalendarView\" bgColor=\"background.secondaryAlpha\" borderRadius=\"md\" p={1} mt={5}>\n <Box className=\"CalendarView__Header\" bgColor=\"background.accent.subtle\" borderRadius=\"md\">\n <DatePickerHeader triggerProps={{ variant: 'ghostNeutral' }} />\n </Box>\n <Box className=\"CalendarView__Body\">\n <DatePickerCalendar showMonthLabels />\n </Box>\n </Box>\n </Box>\n );\n};\n","import React, { useEffect, useMemo, useState } from 'react';\nimport { Popover as CPopover } from '@chakra-ui/react/popover';\nimport { Button } from 'components/Button/button.component';\nimport { Flex } from '@chakra-ui/react/flex';\nimport { CalendarViewToNumberOfMonthsMap } from './dateTimePicker.records';\nimport { CalendarView, DateTimePickerDefaultOptionValue } from './dateTimePicker.types';\nimport { DatePickerProvider } from 'components/DatePicker/context/datePicker.provider';\nimport { DateProps } from 'components/DatePicker/datePicker.types';\nimport { Placement } from 'shared/types/placement';\nimport { usePortalContentRef } from 'hooks/usePortalContentRef';\nimport { Portal } from '@chakra-ui/react/portal';\nimport { useSlotRecipe } from '@chakra-ui/react/styled-system';\nimport { popoverRecipe } from 'components/Popover/popover.recipe';\nimport { DateTimePickerQuickOptions } from './components/DateTimePickerQuickOptions/dateTimePickerQuickOptions.component';\nimport startOfDay from 'date-fns/startOfDay';\nimport endOfDay from 'date-fns/endOfDay';\nimport { matchDatesToQuickOption } from './utils/quickOptions';\nimport { useBreakpoint } from 'hooks/useBreakpoint';\nimport { DateTimePickerCustomView } from './components/DateTimePickerCustomView/dateTimePickerCustomView.component';\nimport { Divider } from 'components/Divider/divider.component';\n\nexport interface DateTimePickerProps extends DateProps {\n /**\n * Controls the number of months displayed in the calendar.\n * @default double\n */\n calendarView?: CalendarView;\n /** Custom element to trigger the date time picker. If not provided, a button will be rendered. */\n trigger?: React.ReactNode;\n /**\n * Placement of the calendar popover\n * @default bottom\n */\n placement?: Placement;\n /**\n * If true, the date time picker will be rendered in a portal.\n * @default true\n */\n portalled?: boolean;\n /**\n * Whether to show the left side quick options in the calendar.\n * @default true\n */\n showQuickOptions?: boolean;\n /** Data test id for the date time picker.\n * @default kibble-datetime-picker\n */\n 'data-testid'?: string;\n}\n\nexport const DateTimePicker = ({\n trigger,\n calendarView = 'double',\n portalled = true,\n showQuickOptions = true,\n ['data-testid']: dataTestId = 'kibble-datetime-picker',\n ...rest\n}: DateTimePickerProps): React.JSX.Element => {\n const defaultDates = useMemo(() => {\n const today = new Date();\n return {\n startDate: startOfDay(today),\n endDate: endOfDay(today),\n };\n }, []);\n const { contentRef } = usePortalContentRef();\n const recipe = useSlotRecipe({ recipe: popoverRecipe });\n const styles = recipe();\n const breakpoint = useBreakpoint();\n\n // Initialize selected quick option based on provided dates\n const initialQuickOption = useMemo(() => {\n return showQuickOptions\n ? matchDatesToQuickOption(rest.startDate || null, rest.endDate || null)\n : DateTimePickerDefaultOptionValue.Custom;\n }, [showQuickOptions, rest.startDate, rest.endDate]);\n\n const [selectedQuickOption, setSelectedQuickOption] = useState<DateTimePickerDefaultOptionValue>(initialQuickOption);\n\n // Sync selectedQuickOption when props change\n useEffect(() => {\n setSelectedQuickOption(initialQuickOption);\n }, [initialQuickOption]);\n\n const _calendarView = useMemo(\n () => (['base', 'sm'].includes(breakpoint) ? 'single' : calendarView),\n [calendarView, breakpoint],\n );\n const numberOfMonths = useMemo(() => CalendarViewToNumberOfMonthsMap[_calendarView], [_calendarView]);\n const isSingleView = useMemo(() => _calendarView === 'single', [_calendarView]);\n const isCustomSelected = useMemo(\n () => selectedQuickOption === DateTimePickerDefaultOptionValue.Custom,\n [selectedQuickOption],\n );\n const popoverSize = useMemo(() => (isCustomSelected ? 'max-content' : '160px'), [isCustomSelected]);\n\n return (\n <DatePickerProvider\n {...rest}\n startDate={rest.startDate || defaultDates.startDate}\n endDate={rest.endDate || defaultDates.endDate}\n withDateRange\n numberOfMonths={numberOfMonths}\n sameWidth={true}\n >\n <CPopover.Trigger asChild w=\"max-content\">\n {trigger || (\n <Button variant=\"secondarySubtle\" iconName=\"calendarInfo\" data-testid={`${dataTestId}-default-trigger`}>\n Date/Time Range\n </Button>\n )}\n </CPopover.Trigger>\n <Portal container={contentRef || undefined} disabled={!portalled}>\n <CPopover.Positioner className=\"DateTimePicker\" data-testid={dataTestId}>\n <CPopover.Content\n className=\"DateTimePicker__Content\"\n data-testid={`${dataTestId}-content`}\n css={{\n ...styles.content,\n '--popover-size': popoverSize,\n maxW: showQuickOptions ? (isSingleView ? '550px' : '890px') : isSingleView ? '390px' : '730px',\n ...(isCustomSelected && { minW: showQuickOptions ? '550px' : '390px' }),\n }}\n >\n <CPopover.Body css={{ '--popover-padding': 0 }}>\n <Flex className=\"DateTimePicker__Container\" data-testid={`${dataTestId}-container`} p={5}>\n {showQuickOptions && (\n <DateTimePickerQuickOptions\n selectedQuickOption={selectedQuickOption}\n setSelectedQuickOption={setSelectedQuickOption}\n />\n )}\n {selectedQuickOption === DateTimePickerDefaultOptionValue.Custom && (\n <>\n {showQuickOptions && <Divider orientation=\"vertical\" my={-5} mx={5} />}\n <DateTimePickerCustomView isSingleView={isSingleView} />\n </>\n )}\n </Flex>\n </CPopover.Body>\n </CPopover.Content>\n </CPopover.Positioner>\n </Portal>\n </DatePickerProvider>\n );\n};\n"],"names":["DateTimePickerDefaultOptionValue","calendarViews","dateTimePickerDefaultOptions","CalendarViewToNumberOfMonthsMap","startOfToday","options","startOfDay","endOfToday","endOfDay","startOfYesterday","now","constructNow","year","month","day","date","endOfYesterday","constructFrom","endOfWeek","defaultOptions","getDefaultOptions","weekStartsOn","_date","toDate","diff","startOfMonth","endOfMonth","addWeeks","amount","addDays","subWeeks","subMonths","addMonths","isEqual","leftDate","rightDate","getQuickOptionDateRange","option","today","startOfWeek","lastWeekDate","lastMonthDate","matchDatesToQuickOption","startDate","endDate","optionsToCheck","optionRange","DateTimePickerQuickOptions","selectedQuickOption","setSelectedQuickOption","dataTestId","setFocusedInput","onQuickOptionSelect","useDatePickerContext","setOpen","usePopoverContext","handleOptionClick","FocusedInput","dates","jsx","Flex","Button","DateTimePickerRangeSelector","label","rangeType","dateFormat","focusedInput","onTimeChange","useMemo","formattedDate","format","handleTimeChange","jsxs","Grid","GridItem","Text","TextInput","TimePicker","time","DateTimePickerCustomView","isSingleView","useEffect","Box","DatePickerHeader","DatePickerCalendar","DateTimePicker","trigger","calendarView","portalled","showQuickOptions","rest","defaultDates","contentRef","usePortalContentRef","styles","useSlotRecipe","popoverRecipe","breakpoint","useBreakpoint","initialQuickOption","useState","_calendarView","numberOfMonths","isCustomSelected","popoverSize","DatePickerProvider","CPopover.Trigger","Portal","CPopover.Positioner","CPopover.Content","CPopover.Body","Fragment","Divider"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAY,IAAAA,sBAAAA,OACVA,EAAA,QAAQ,SACRA,EAAA,YAAY,aACZA,EAAA,WAAW,YACXA,EAAA,WAAW,YACXA,EAAA,YAAY,aACZA,EAAA,YAAY,aACZA,EAAA,SAAS,UAPCA,IAAAA,KAAA,CAAA,CAAA;AAUC,MAAAC,KAAgB,CAAC,UAAU,QAAQ,GCPnCC,KAIP;AAAA,EACJ;AAAA,IACE,OAAO;AAAA,IACP,OAAOF,EAAiC;AAAA,EAC1C;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAOA,EAAiC;AAAA,EAC1C;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAOA,EAAiC;AAAA,EAC1C;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAOA,EAAiC;AAAA,EAC1C;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAOA,EAAiC;AAAA,EAC1C;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAOA,EAAiC;AAAA,EAC1C;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,OAAOA,EAAiC;AAAA,IACxC,UAAU;AAAA,EAAA;AAEd,GAEaG,KAAgE;AAAA,EAC3E,QAAQ;AAAA,EACR,QAAQ;AACV;AChBO,SAASC,GAAaC,GAAS;AACpC,SAAOC,EAAW,KAAK,IAAG,GAAID,CAAO;AACvC;ACDO,SAASE,GAAWF,GAAS;AAClC,SAAOG,EAAS,KAAK,IAAG,GAAIH,CAAO;AACrC;ACHO,SAASI,GAAiBJ,GAAS;AACxC,QAAMK,IAAMC,EAAaN,GAAS,E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AAU,UAAWA,IAAe,UAAU;AAAA,cACvF,GAAIuB,KAAoB,EAAE,MAAMd,IAAmB,UAAU,QAAQ;AAAA,YACvE;AAAA,YAEA,gCAACqB,IAAA,EAAc,KAAK,EAAE,qBAAqB,EAAE,GAC3C,UAACtC,gBAAAA,OAAAZ,GAAA,EAAK,WAAU,6BAA4B,eAAa,GAAGV,CAAU,cAAc,GAAG,GACpF,UAAA;AAAA,cACCuC,KAAA9B,gBAAAA,EAAA;AAAA,gBAACZ;AAAA,gBAAA;AAAA,kBACC,qBAAAC;AAAA,kBACA,wBAAAC;AAAA,gBAAA;AAAA,cACF;AAAA,cAEDD,MAAwBhD,EAAiC,UAErDwE,gBAAAA,EAAA,KAAAuC,EAAA,UAAA,EAAA,UAAA;AAAA,gBAAAtB,2BAAqBuB,IAAQ,EAAA,aAAY,YAAW,IAAI,IAAI,IAAI,GAAG;AAAA,gBACpErD,gBAAAA,MAACoB,MAAyB,cAAAC,EAA4B,CAAA;AAAA,cAAA,EACxD,CAAA;AAAA,YAAA,EAAA,CAEJ,EACF,CAAA;AAAA,UAAA;AAAA,WAEJ,EACF,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACF;AAEJ;","x_google_ignoreList":[2,3,4,5,6,7,8,9,10,11,12]}
@@ -0,0 +1,2 @@
1
+ "use strict";const u=require("./jsx-runtime-BjDatQAs.js"),_=require("./icon.component-B1hr5lLa.js"),X=require("./notificationCounter.component-CBwi5vXa.js"),H=require("./heading.component-DnoZOXdz.js"),K=require("./create-slot-recipe-context-HXE1VazG.js"),m=require("react"),l=require("./use-locale-context-ym21RUxU.js"),n=require("./index-CQURjLlA.js"),E=require("./render-strategy-kPh1pd2U.js"),F=require("./index-Ts8g8jZd.js"),z=require("./index-BQRnVsAg.js");function Y(e,t){const[r,a]=m.useState(e);return m.useEffect(()=>{const o=setTimeout(()=>{a(e)},t);return()=>{clearTimeout(o)}},[e,t]),r}const[N,A]=l.createContext({name:"TabsContext",hookName:"useTabsContext",providerName:"<TabsProvider />"}),L=m.forwardRef((e,t)=>{const[r,a]=l.createSplitProps()(e,["value"]),o=A(),s=E.useRenderStrategyPropsContext(),i=F.usePresence({...s,present:Y(o.value===e.value,0),immediate:!0}),g=n.mergeProps(o.getContentProps(r),i.getPresenceProps(),a);return u.jsxRuntimeExports.jsx(F.PresenceProvider,{value:i,children:i.unmounted?null:u.jsxRuntimeExports.jsx(l.ark.div,{...g,ref:l.composeRefs(i.ref,t)})})});L.displayName="TabContent";const $=m.forwardRef((e,t)=>{const r=A(),a=n.mergeProps(r.getIndicatorProps(),e);return u.jsxRuntimeExports.jsx(l.ark.div,{...a,ref:t})});$.displayName="TabIndicator";const O=m.forwardRef((e,t)=>{const r=A(),a=n.mergeProps(r.getListProps(),e);return u.jsxRuntimeExports.jsx(l.ark.div,{...a,ref:t})});O.displayName="TabList";const B=m.forwardRef((e,t)=>{const[r,a]=l.createSplitProps()(e,["disabled","value"]),o=A(),s=n.mergeProps(o.getTriggerProps(r),a);return u.jsxRuntimeExports.jsx(l.ark.button,{...s,ref:t})});B.displayName="TabTrigger";var G=n.createAnatomy("tabs").parts("root","list","trigger","content","indicator"),y=G.build(),J=e=>e.ids?.root??`tabs:${e.id}`,h=e=>e.ids?.list??`tabs:${e.id}:list`,I=(e,t)=>e.ids?.content??`tabs:${e.id}:content-${t}`,R=(e,t)=>e.ids?.trigger??`tabs:${e.id}:trigger-${t}`,k=e=>e.ids?.indicator??`tabs:${e.id}:indicator`,Q=e=>e.getById(h(e)),Z=(e,t)=>e.getById(I(e,t)),V=(e,t)=>e.getById(R(e,t)),S=e=>e.getById(k(e)),P=e=>{const r=`[role=tab][data-ownedby='${CSS.escape(h(e))}']:not([disabled])`;return n.queryAll(Q(e),r)},ee=e=>n.first(P(e)),te=e=>n.last(P(e)),ae=(e,t)=>n.nextById(P(e),R(e,t.value),t.loopFocus),re=(e,t)=>n.prevById(P(e),R(e,t.value),t.loopFocus),D=e=>({left:e?.offsetLeft??0,top:e?.offsetTop??0,width:e?.offsetWidth??0,height:e?.offsetHeight??0}),se=(e,t)=>{const r=n.itemById(P(e),R(e,t));return U(D(r))},U=e=>({width:`${e.width}px`,height:`${e.height}px`,left:`${e.left}px`,top:`${e.top}px`});function oe(e,t){const{state:r,send:a,context:o,prop:s,scope:i}=e,g=s("translations"),p=r.matches("focused"),f=s("orientation")==="vertical",b=s("orientation")==="horizontal",j=s("composite");function w(c){return{selected:o.get("value")===c.value,focused:o.get("focusedValue")===c.value,disabled:!!c.disabled}}return{value:o.get("value"),focusedValue:o.get("focusedValue"),setValue(c){a({type:"SET_VALUE",value:c})},clearValue(){a({type:"CLEAR_VALUE"})},setIndicatorRect(c){const d=R(i,c);a({type:"SET_INDICATOR_RECT",id:d})},syncTabIndex(){a({type:"SYNC_TAB_INDEX"})},selectNext(c){a({type:"TAB_FOCUS",value:c,src:"selectNext"}),a({type:"ARROW_NEXT",src:"selectNext"})},selectPrev(c){a({type:"TAB_FOCUS",value:c,src:"selectPrev"}),a({type:"ARROW_PREV",src:"selectPrev"})},focus(){const c=o.get("value");c&&V(i,c)?.focus()},getRootProps(){return t.element({...y.root.attrs,id:J(i),"data-orientation":s("orientation"),"data-focus":n.dataAttr(p),dir:s("dir")})},getListProps(){return t.element({...y.list.attrs,id:h(i),role:"tablist",dir:s("dir"),"data-focus":n.dataAttr(p),"aria-orientation":s("orientation"),"data-orientation":s("orientation"),"aria-label":g?.listLabel,onKeyDown(c){if(c.defaultPrevented||!n.isSelfTarget(c)||n.isComposingEvent(c))return;const d={ArrowDown(){b||a({type:"ARROW_NEXT",key:"ArrowDown"})},ArrowUp(){b||a({type:"ARROW_PREV",key:"ArrowUp"})},ArrowLeft(){f||a({type:"ARROW_PREV",key:"ArrowLeft"})},ArrowRight(){f||a({type:"ARROW_NEXT",key:"ArrowRight"})},Home(){a({type:"HOME"})},End(){a({type:"END"})}};let v=n.getEventKey(c,{dir:s("dir"),orientation:s("orientation")});const T=d[v];if(T){c.preventDefault(),T(c);return}}})},getTriggerState:w,getTriggerProps(c){const{value:d,disabled:v}=c,T=w(c);return t.button({...y.trigger.attrs,role:"tab",type:"button",disabled:v,dir:s("dir"),"data-orientation":s("orientation"),"data-disabled":n.dataAttr(v),"aria-disabled":v,"data-value":d,"aria-selected":T.selected,"data-selected":n.dataAttr(T.selected),"data-focus":n.dataAttr(T.focused),"aria-controls":T.selected?I(i,d):void 0,"data-ownedby":h(i),"data-ssr":n.dataAttr(o.get("ssr")),id:R(i,d),tabIndex:T.selected&&j?0:-1,onFocus(){a({type:"TAB_FOCUS",value:d})},onBlur(x){x.relatedTarget?.getAttribute("role")!=="tab"&&a({type:"TAB_BLUR"})},onClick(x){x.defaultPrevented||n.isOpeningInNewTab(x)||v||(n.isSafari()&&x.currentTarget.focus(),a({type:"TAB_CLICK",value:d}))}})},getContentProps(c){const{value:d}=c,v=o.get("value")===d;return t.element({...y.content.attrs,dir:s("dir"),id:I(i,d),tabIndex:j?0:-1,"aria-labelledby":R(i,d),role:"tabpanel","data-ownedby":h(i),"data-selected":n.dataAttr(v),"data-orientation":s("orientation"),hidden:!v})},getIndicatorProps(){const c=o.get("indicatorRect"),d=o.get("indicatorTransition");return t.element({id:k(i),...y.indicator.attrs,dir:s("dir"),"data-orientation":s("orientation"),style:{"--transition-property":"left, right, top, bottom, width, height","--left":c.left,"--top":c.top,"--width":c.width,"--height":c.height,position:"absolute",willChange:"var(--transition-property)",transitionProperty:"var(--transition-property)",transitionDuration:d?"var(--transition-duration, 150ms)":"0ms",transitionTimingFunction:"var(--transition-timing-function)",[b?"left":"top"]:b?"var(--left)":"var(--top)"}})}}}var{createMachine:ne}=n.setup(),ie=ne({props({props:e}){return{dir:"ltr",orientation:"horizontal",activationMode:"automatic",loopFocus:!0,composite:!0,navigate(t){n.clickIfLink(t.node)},defaultValue:null,...e}},initialState(){return"idle"},context({prop:e,bindable:t}){return{value:t(()=>({defaultValue:e("defaultValue"),value:e("value"),onChange(r){e("onValueChange")?.({value:r})}})),focusedValue:t(()=>({defaultValue:e("value")||e("defaultValue"),sync:!0,onChange(r){e("onFocusChange")?.({focusedValue:r})}})),ssr:t(()=>({defaultValue:!0})),indicatorTransition:t(()=>({defaultValue:!1})),indicatorRect:t(()=>({defaultValue:{left:"0px",top:"0px",width:"0px",height:"0px"}}))}},watch({context:e,prop:t,track:r,action:a}){r([()=>e.get("value")],()=>{a(["allowIndicatorTransition","syncIndicatorRect","syncTabIndex","navigateIfNeeded"])}),r([()=>t("dir"),()=>t("orientation")],()=>{a(["syncIndicatorRect"])})},on:{SET_VALUE:{actions:["setValue"]},CLEAR_VALUE:{actions:["clearValue"]},SET_INDICATOR_RECT:{actions:["setIndicatorRect"]},SYNC_TAB_INDEX:{actions:["syncTabIndex"]}},entry:["syncIndicatorRect","syncTabIndex","syncSsr"],exit:["cleanupObserver"],states:{idle:{on:{TAB_FOCUS:{target:"focused",actions:["setFocusedValue"]},TAB_CLICK:{target:"focused",actions:["setFocusedValue","setValue"]}}},focused:{on:{TAB_CLICK:{actions:["setFocusedValue","setValue"]},ARROW_PREV:[{guard:"selectOnFocus",actions:["focusPrevTab","selectFocusedTab"]},{actions:["focusPrevTab"]}],ARROW_NEXT:[{guard:"selectOnFocus",actions:["focusNextTab","selectFocusedTab"]},{actions:["focusNextTab"]}],HOME:[{guard:"selectOnFocus",actions:["focusFirstTab","selectFocusedTab"]},{actions:["focusFirstTab"]}],END:[{guard:"selectOnFocus",actions:["focusLastTab","selectFocusedTab"]},{actions:["focusLastTab"]}],TAB_FOCUS:{actions:["setFocusedValue"]},TAB_BLUR:{target:"idle",actions:["clearFocusedValue"]}}}},implementations:{guards:{selectOnFocus:({prop:e})=>e("activationMode")==="automatic"},actions:{selectFocusedTab({context:e,prop:t}){n.raf(()=>{const r=e.get("focusedValue");if(!r)return;const o=t("deselectable")&&e.get("value")===r?null:r;e.set("value",o)})},setFocusedValue({context:e,event:t,flush:r}){t.value!=null&&r(()=>{e.set("focusedValue",t.value)})},clearFocusedValue({context:e}){e.set("focusedValue",null)},setValue({context:e,event:t,prop:r}){const a=r("deselectable")&&e.get("value")===e.get("focusedValue");e.set("value",a?null:t.value)},clearValue({context:e}){e.set("value",null)},focusFirstTab({scope:e}){n.raf(()=>{ee(e)?.focus()})},focusLastTab({scope:e}){n.raf(()=>{te(e)?.focus()})},focusNextTab({context:e,prop:t,scope:r,event:a}){const o=a.value??e.get("focusedValue");if(!o)return;const s=ae(r,{value:o,loopFocus:t("loopFocus")});n.raf(()=>{t("composite")?s?.focus():s?.dataset.value!=null&&e.set("focusedValue",s.dataset.value)})},focusPrevTab({context:e,prop:t,scope:r,event:a}){const o=a.value??e.get("focusedValue");if(!o)return;const s=re(r,{value:o,loopFocus:t("loopFocus")});n.raf(()=>{t("composite")?s?.focus():s?.dataset.value!=null&&e.set("focusedValue",s.dataset.value)})},syncTabIndex({context:e,scope:t}){n.raf(()=>{const r=e.get("value");if(!r)return;const a=Z(t,r);if(!a)return;n.getFocusables(a).length>0?a.removeAttribute("tabindex"):a.setAttribute("tabindex","0")})},cleanupObserver({refs:e}){const t=e.get("indicatorCleanup");t&&t()},allowIndicatorTransition({context:e}){e.set("indicatorTransition",!0)},setIndicatorRect({context:e,event:t,scope:r}){const a=t.id??e.get("value");if(!S(r))return;if(!a){e.set("indicatorTransition",!1);return}V(r,a)&&(e.set("indicatorRect",se(r,a)),n.nextTick(()=>{e.set("indicatorTransition",!1)}))},syncSsr({context:e}){e.set("ssr",!1)},syncIndicatorRect({context:e,refs:t,scope:r}){const a=t.get("indicatorCleanup");a&&a();const o=e.get("value");if(!o){e.set("indicatorTransition",!1);return}const s=V(r,o),i=S(r);if(!s||!i)return;const g=n.trackElementRect([s],{measure(p){return D(p)},onEntry({rects:p}){const[f]=p;e.set("indicatorRect",U(f))}});t.set("indicatorCleanup",g)},navigateIfNeeded({context:e,prop:t,scope:r}){const a=e.get("value");if(!a)return;const o=V(r,a);n.isAnchorElement(o)&&t("navigate")?.({value:a,node:o,href:o.href})}}}});l.createProps()(["activationMode","composite","deselectable","dir","getRootNode","id","ids","loopFocus","navigate","onFocusChange","onValueChange","orientation","translations","value","defaultValue"]);l.createProps()(["disabled","value"]);l.createProps()(["value"]);const ce=e=>{const t=m.useId(),{getRootNode:r}=l.useEnvironmentContext(),{dir:a}=l.useLocaleContext(),o={id:t,dir:a,getRootNode:r,...e},s=l.useMachine(ie,o);return oe(s,l.normalizeProps)},q=m.forwardRef((e,t)=>{const[r,a]=E.splitRenderStrategyProps(e),[o,s]=l.createSplitProps()(a,["activationMode","composite","defaultValue","deselectable","id","ids","loopFocus","navigate","onFocusChange","onValueChange","orientation","translations","value"]),i=ce(o),g=n.mergeProps(i.getRootProps(),s);return u.jsxRuntimeExports.jsx(N,{value:i,children:u.jsxRuntimeExports.jsx(E.RenderStrategyPropsProvider,{value:r,children:u.jsxRuntimeExports.jsx(l.ark.div,{...g,ref:t})})})});q.displayName="TabsRoot";const W=m.forwardRef((e,t)=>{const[r,a]=E.splitRenderStrategyProps(e),[{value:o},s]=l.createSplitProps()(a,["value"]),i=n.mergeProps(o.getRootProps(),s);return u.jsxRuntimeExports.jsx(N,{value:o,children:u.jsxRuntimeExports.jsx(E.RenderStrategyPropsProvider,{value:r,children:u.jsxRuntimeExports.jsx(l.ark.div,{...i,ref:t})})})});W.displayName="TabsRootProvider";const{withProvider:M,withContext:C}=K.createSlotRecipeContext({key:"tabs"});M(W,"root",{forwardAsChild:!0});const ue=M(q,"root",{forwardAsChild:!0}),le=C(B,"trigger",{forwardAsChild:!0}),de=C(L,"content",{forwardAsChild:!0});C("div","contentGroup");const ge=C(O,"list",{forwardAsChild:!0});C($,"indicator",{forwardAsChild:!0});const fe={xs:"sm",sm:"md",md:"md",lg:"lg"},pe={xs:"xs",sm:"xs",md:"sm",lg:"md"},be=({iconName:e,iconPosition:t="left",label:r,notificationCounterProps:a,showNotificationCounter:o,size:s="md",["data-testid"]:i="kibble-tab",...g})=>u.jsxRuntimeExports.jsxs(le,{className:"Tab","data-testid":i,...g,children:[!!e&&t==="left"&&u.jsxRuntimeExports.jsx(_.Icon,{className:"Tab__Icon","data-testid":`${i}-icon-left`,name:e,size:s,variant:"default"}),u.jsxRuntimeExports.jsx(H.WrappedHeading,{as:"span",className:"Tab__Label","data-testid":`${i}-label`,size:pe[s],children:r}),!!e&&t==="right"&&u.jsxRuntimeExports.jsx(_.Icon,{className:"Tab__Icon","data-testid":`${i}-icon-right`,name:e,size:s}),o&&u.jsxRuntimeExports.jsx(X.NotificationCounter,{className:"Tab__NotificationCounter","data-testid":`${i}-notification-counter`,...a,size:fe[s]})]}),ve=({align:e="start",onChange:t,scrollable:r=!1,size:a="md",tabs:o,tabsContent:s,["data-testid"]:i="kibble-tabs",...g})=>{const p=u.jsxRuntimeExports.jsx(ge,{className:"Tabs__List","data-testid":`${i}-trigger-list`,children:o.map((f,b)=>u.jsxRuntimeExports.jsx(be,{...f,"data-testid":`${i}-trigger-${f.value}`,size:a,...r&&{style:{flexShrink:0}}},`tab-${b}`))});return u.jsxRuntimeExports.jsxs(ue,{className:"Tabs","data-testid":i,justify:e||g.justify,size:a,onValueChange:({value:f})=>t?.(f),...g,children:[r?u.jsxRuntimeExports.jsx(z.Box,{overflowX:"auto",scrollbarWidth:"none",children:p}):p,!!s&&s.map((f,b)=>u.jsxRuntimeExports.jsx(de,{"data-testid":`${i}-content-${o[b].value}`,...f},`${i}-tabContent-${b}`))]})},me=["xs","sm","md","lg"],Te=["left","right"];exports.Tabs=ve;exports.tabIconPositions=Te;exports.tabSizes=me;
2
+ //# sourceMappingURL=tab.types-DSPWRVCF.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tab.types-ClVkJZuy.js","sources":["../../node_modules/@ark-ui/react/dist/utils/use-debounce.js","../../node_modules/@ark-ui/react/dist/components/tabs/use-tabs-context.js","../../node_modules/@ark-ui/react/dist/components/tabs/tab-content.js","../../node_modules/@ark-ui/react/dist/components/tabs/tab-indicator.js","../../node_modules/@ark-ui/react/dist/components/tabs/tab-list.js","../../node_modules/@ark-ui/react/dist/components/tabs/tab-trigger.js","../../node_modules/@zag-js/tabs/dist/index.mjs","../../node_modules/@ark-ui/react/dist/components/tabs/use-tabs.js","../../node_modules/@ark-ui/react/dist/components/tabs/tabs-root.js","../../node_modules/@ark-ui/react/dist/components/tabs/tabs-root-provider.js","../../node_modules/@chakra-ui/react/dist/esm/components/tabs/tabs.js","../../src/components/Tabs/components/Tab/tab.records.ts","../../src/components/Tabs/components/Tab/tab.component.tsx","../../src/components/Tabs/tabs.component.tsx","../../src/components/Tabs/components/Tab/tab.types.ts"],"sourcesContent":["'use client';\nimport { useState, useEffect } from 'react';\n\nfunction useDebounce(value, delay) {\n const [debouncedValue, setDebouncedValue] = useState(value);\n useEffect(() => {\n const timer = setTimeout(() => {\n setDebouncedValue(value);\n }, delay);\n return () => {\n clearTimeout(timer);\n };\n }, [value, delay]);\n return debouncedValue;\n}\n\nexport { useDebounce };\n","'use client';\nimport { createContext } from '../../utils/create-context.js';\n\nconst [TabsProvider, useTabsContext] = createContext({\n name: \"TabsContext\",\n hookName: \"useTabsContext\",\n providerName: \"<TabsProvider />\"\n});\n\nexport { TabsProvider, useTabsContext };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { composeRefs } from '../../utils/compose-refs.js';\nimport { createSplitProps } from '../../utils/create-split-props.js';\nimport { useRenderStrategyPropsContext } from '../../utils/render-strategy.js';\nimport { useDebounce } from '../../utils/use-debounce.js';\nimport { ark } from '../factory.js';\nimport { usePresence } from '../presence/use-presence.js';\nimport { PresenceProvider } from '../presence/use-presence-context.js';\nimport { useTabsContext } from './use-tabs-context.js';\n\nconst TabContent = forwardRef((props, ref) => {\n const [contentProps, localProps] = createSplitProps()(props, [\"value\"]);\n const tabs = useTabsContext();\n const renderStrategyProps = useRenderStrategyPropsContext();\n const presence = usePresence({\n ...renderStrategyProps,\n present: useDebounce(tabs.value === props.value, 0),\n immediate: true\n });\n const mergedProps = mergeProps(tabs.getContentProps(contentProps), presence.getPresenceProps(), localProps);\n return /* @__PURE__ */ jsx(PresenceProvider, { value: presence, children: presence.unmounted ? null : /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref: composeRefs(presence.ref, ref) }) });\n});\nTabContent.displayName = \"TabContent\";\n\nexport { TabContent };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useTabsContext } from './use-tabs-context.js';\n\nconst TabIndicator = forwardRef((props, ref) => {\n const tabs = useTabsContext();\n const mergedProps = mergeProps(tabs.getIndicatorProps(), props);\n return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });\n});\nTabIndicator.displayName = \"TabIndicator\";\n\nexport { TabIndicator };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useTabsContext } from './use-tabs-context.js';\n\nconst TabList = forwardRef((props, ref) => {\n const tabs = useTabsContext();\n const mergedProps = mergeProps(tabs.getListProps(), props);\n return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });\n});\nTabList.displayName = \"TabList\";\n\nexport { TabList };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { createSplitProps } from '../../utils/create-split-props.js';\nimport { ark } from '../factory.js';\nimport { useTabsContext } from './use-tabs-context.js';\n\nconst TabTrigger = forwardRef((props, ref) => {\n const [tabProps, localProps] = createSplitProps()(props, [\"disabled\", \"value\"]);\n const tabs = useTabsContext();\n const mergedProps = mergeProps(tabs.getTriggerProps(tabProps), localProps);\n return /* @__PURE__ */ jsx(ark.button, { ...mergedProps, ref });\n});\nTabTrigger.displayName = \"TabTrigger\";\n\nexport { TabTrigger };\n","import { createAnatomy } from '@zag-js/anatomy';\nimport { isAnchorElement, trackElementRect, nextTick, raf, getFocusables, prevById, nextById, clickIfLink, itemById, queryAll, dataAttr, isOpeningInNewTab, isSafari, isSelfTarget, isComposingEvent, getEventKey } from '@zag-js/dom-query';\nimport { last, first, createSplitProps } from '@zag-js/utils';\nimport { setup } from '@zag-js/core';\nimport { createProps } from '@zag-js/types';\n\n// src/tabs.anatomy.ts\nvar anatomy = createAnatomy(\"tabs\").parts(\"root\", \"list\", \"trigger\", \"content\", \"indicator\");\nvar parts = anatomy.build();\nvar getRootId = (ctx) => ctx.ids?.root ?? `tabs:${ctx.id}`;\nvar getListId = (ctx) => ctx.ids?.list ?? `tabs:${ctx.id}:list`;\nvar getContentId = (ctx, id) => ctx.ids?.content ?? `tabs:${ctx.id}:content-${id}`;\nvar getTriggerId = (ctx, id) => ctx.ids?.trigger ?? `tabs:${ctx.id}:trigger-${id}`;\nvar getIndicatorId = (ctx) => ctx.ids?.indicator ?? `tabs:${ctx.id}:indicator`;\nvar getListEl = (ctx) => ctx.getById(getListId(ctx));\nvar getContentEl = (ctx, id) => ctx.getById(getContentId(ctx, id));\nvar getTriggerEl = (ctx, id) => ctx.getById(getTriggerId(ctx, id));\nvar getIndicatorEl = (ctx) => ctx.getById(getIndicatorId(ctx));\nvar getElements = (ctx) => {\n const ownerId = CSS.escape(getListId(ctx));\n const selector = `[role=tab][data-ownedby='${ownerId}']:not([disabled])`;\n return queryAll(getListEl(ctx), selector);\n};\nvar getFirstTriggerEl = (ctx) => first(getElements(ctx));\nvar getLastTriggerEl = (ctx) => last(getElements(ctx));\nvar getNextTriggerEl = (ctx, opts) => nextById(getElements(ctx), getTriggerId(ctx, opts.value), opts.loopFocus);\nvar getPrevTriggerEl = (ctx, opts) => prevById(getElements(ctx), getTriggerId(ctx, opts.value), opts.loopFocus);\nvar getOffsetRect = (el) => {\n return {\n left: el?.offsetLeft ?? 0,\n top: el?.offsetTop ?? 0,\n width: el?.offsetWidth ?? 0,\n height: el?.offsetHeight ?? 0\n };\n};\nvar getRectById = (ctx, id) => {\n const tab = itemById(getElements(ctx), getTriggerId(ctx, id));\n return resolveRect(getOffsetRect(tab));\n};\nvar resolveRect = (rect) => ({\n width: `${rect.width}px`,\n height: `${rect.height}px`,\n left: `${rect.left}px`,\n top: `${rect.top}px`\n});\n\n// src/tabs.connect.ts\nfunction connect(service, normalize) {\n const { state, send, context, prop, scope } = service;\n const translations = prop(\"translations\");\n const focused = state.matches(\"focused\");\n const isVertical = prop(\"orientation\") === \"vertical\";\n const isHorizontal = prop(\"orientation\") === \"horizontal\";\n const composite = prop(\"composite\");\n function getTriggerState(props2) {\n return {\n selected: context.get(\"value\") === props2.value,\n focused: context.get(\"focusedValue\") === props2.value,\n disabled: !!props2.disabled\n };\n }\n return {\n value: context.get(\"value\"),\n focusedValue: context.get(\"focusedValue\"),\n setValue(value) {\n send({ type: \"SET_VALUE\", value });\n },\n clearValue() {\n send({ type: \"CLEAR_VALUE\" });\n },\n setIndicatorRect(value) {\n const id = getTriggerId(scope, value);\n send({ type: \"SET_INDICATOR_RECT\", id });\n },\n syncTabIndex() {\n send({ type: \"SYNC_TAB_INDEX\" });\n },\n selectNext(fromValue) {\n send({ type: \"TAB_FOCUS\", value: fromValue, src: \"selectNext\" });\n send({ type: \"ARROW_NEXT\", src: \"selectNext\" });\n },\n selectPrev(fromValue) {\n send({ type: \"TAB_FOCUS\", value: fromValue, src: \"selectPrev\" });\n send({ type: \"ARROW_PREV\", src: \"selectPrev\" });\n },\n focus() {\n const value = context.get(\"value\");\n if (!value) return;\n getTriggerEl(scope, value)?.focus();\n },\n getRootProps() {\n return normalize.element({\n ...parts.root.attrs,\n id: getRootId(scope),\n \"data-orientation\": prop(\"orientation\"),\n \"data-focus\": dataAttr(focused),\n dir: prop(\"dir\")\n });\n },\n getListProps() {\n return normalize.element({\n ...parts.list.attrs,\n id: getListId(scope),\n role: \"tablist\",\n dir: prop(\"dir\"),\n \"data-focus\": dataAttr(focused),\n \"aria-orientation\": prop(\"orientation\"),\n \"data-orientation\": prop(\"orientation\"),\n \"aria-label\": translations?.listLabel,\n onKeyDown(event) {\n if (event.defaultPrevented) return;\n if (!isSelfTarget(event)) return;\n if (isComposingEvent(event)) return;\n const keyMap = {\n ArrowDown() {\n if (isHorizontal) return;\n send({ type: \"ARROW_NEXT\", key: \"ArrowDown\" });\n },\n ArrowUp() {\n if (isHorizontal) return;\n send({ type: \"ARROW_PREV\", key: \"ArrowUp\" });\n },\n ArrowLeft() {\n if (isVertical) return;\n send({ type: \"ARROW_PREV\", key: \"ArrowLeft\" });\n },\n ArrowRight() {\n if (isVertical) return;\n send({ type: \"ARROW_NEXT\", key: \"ArrowRight\" });\n },\n Home() {\n send({ type: \"HOME\" });\n },\n End() {\n send({ type: \"END\" });\n }\n };\n let key = getEventKey(event, {\n dir: prop(\"dir\"),\n orientation: prop(\"orientation\")\n });\n const exec = keyMap[key];\n if (exec) {\n event.preventDefault();\n exec(event);\n return;\n }\n }\n });\n },\n getTriggerState,\n getTriggerProps(props2) {\n const { value, disabled } = props2;\n const triggerState = getTriggerState(props2);\n return normalize.button({\n ...parts.trigger.attrs,\n role: \"tab\",\n type: \"button\",\n disabled,\n dir: prop(\"dir\"),\n \"data-orientation\": prop(\"orientation\"),\n \"data-disabled\": dataAttr(disabled),\n \"aria-disabled\": disabled,\n \"data-value\": value,\n \"aria-selected\": triggerState.selected,\n \"data-selected\": dataAttr(triggerState.selected),\n \"data-focus\": dataAttr(triggerState.focused),\n \"aria-controls\": triggerState.selected ? getContentId(scope, value) : void 0,\n \"data-ownedby\": getListId(scope),\n \"data-ssr\": dataAttr(context.get(\"ssr\")),\n id: getTriggerId(scope, value),\n tabIndex: triggerState.selected && composite ? 0 : -1,\n onFocus() {\n send({ type: \"TAB_FOCUS\", value });\n },\n onBlur(event) {\n const target = event.relatedTarget;\n if (target?.getAttribute(\"role\") !== \"tab\") {\n send({ type: \"TAB_BLUR\" });\n }\n },\n onClick(event) {\n if (event.defaultPrevented) return;\n if (isOpeningInNewTab(event)) return;\n if (disabled) return;\n if (isSafari()) {\n event.currentTarget.focus();\n }\n send({ type: \"TAB_CLICK\", value });\n }\n });\n },\n getContentProps(props2) {\n const { value } = props2;\n const selected = context.get(\"value\") === value;\n return normalize.element({\n ...parts.content.attrs,\n dir: prop(\"dir\"),\n id: getContentId(scope, value),\n tabIndex: composite ? 0 : -1,\n \"aria-labelledby\": getTriggerId(scope, value),\n role: \"tabpanel\",\n \"data-ownedby\": getListId(scope),\n \"data-selected\": dataAttr(selected),\n \"data-orientation\": prop(\"orientation\"),\n hidden: !selected\n });\n },\n getIndicatorProps() {\n const indicatorRect = context.get(\"indicatorRect\");\n const indicatorTransition = context.get(\"indicatorTransition\");\n return normalize.element({\n id: getIndicatorId(scope),\n ...parts.indicator.attrs,\n dir: prop(\"dir\"),\n \"data-orientation\": prop(\"orientation\"),\n style: {\n \"--transition-property\": \"left, right, top, bottom, width, height\",\n \"--left\": indicatorRect.left,\n \"--top\": indicatorRect.top,\n \"--width\": indicatorRect.width,\n \"--height\": indicatorRect.height,\n position: \"absolute\",\n willChange: \"var(--transition-property)\",\n transitionProperty: \"var(--transition-property)\",\n transitionDuration: indicatorTransition ? \"var(--transition-duration, 150ms)\" : \"0ms\",\n transitionTimingFunction: \"var(--transition-timing-function)\",\n [isHorizontal ? \"left\" : \"top\"]: isHorizontal ? \"var(--left)\" : \"var(--top)\"\n }\n });\n }\n };\n}\nvar { createMachine } = setup();\nvar machine = createMachine({\n props({ props: props2 }) {\n return {\n dir: \"ltr\",\n orientation: \"horizontal\",\n activationMode: \"automatic\",\n loopFocus: true,\n composite: true,\n navigate(details) {\n clickIfLink(details.node);\n },\n defaultValue: null,\n ...props2\n };\n },\n initialState() {\n return \"idle\";\n },\n context({ prop, bindable }) {\n return {\n value: bindable(() => ({\n defaultValue: prop(\"defaultValue\"),\n value: prop(\"value\"),\n onChange(value) {\n prop(\"onValueChange\")?.({ value });\n }\n })),\n focusedValue: bindable(() => ({\n defaultValue: prop(\"value\") || prop(\"defaultValue\"),\n sync: true,\n onChange(value) {\n prop(\"onFocusChange\")?.({ focusedValue: value });\n }\n })),\n ssr: bindable(() => ({ defaultValue: true })),\n indicatorTransition: bindable(() => ({ defaultValue: false })),\n indicatorRect: bindable(() => ({\n defaultValue: { left: \"0px\", top: \"0px\", width: \"0px\", height: \"0px\" }\n }))\n };\n },\n watch({ context, prop, track, action }) {\n track([() => context.get(\"value\")], () => {\n action([\"allowIndicatorTransition\", \"syncIndicatorRect\", \"syncTabIndex\", \"navigateIfNeeded\"]);\n });\n track([() => prop(\"dir\"), () => prop(\"orientation\")], () => {\n action([\"syncIndicatorRect\"]);\n });\n },\n on: {\n SET_VALUE: {\n actions: [\"setValue\"]\n },\n CLEAR_VALUE: {\n actions: [\"clearValue\"]\n },\n SET_INDICATOR_RECT: {\n actions: [\"setIndicatorRect\"]\n },\n SYNC_TAB_INDEX: {\n actions: [\"syncTabIndex\"]\n }\n },\n entry: [\"syncIndicatorRect\", \"syncTabIndex\", \"syncSsr\"],\n exit: [\"cleanupObserver\"],\n states: {\n idle: {\n on: {\n TAB_FOCUS: {\n target: \"focused\",\n actions: [\"setFocusedValue\"]\n },\n TAB_CLICK: {\n target: \"focused\",\n actions: [\"setFocusedValue\", \"setValue\"]\n }\n }\n },\n focused: {\n on: {\n TAB_CLICK: {\n actions: [\"setFocusedValue\", \"setValue\"]\n },\n ARROW_PREV: [\n {\n guard: \"selectOnFocus\",\n actions: [\"focusPrevTab\", \"selectFocusedTab\"]\n },\n {\n actions: [\"focusPrevTab\"]\n }\n ],\n ARROW_NEXT: [\n {\n guard: \"selectOnFocus\",\n actions: [\"focusNextTab\", \"selectFocusedTab\"]\n },\n {\n actions: [\"focusNextTab\"]\n }\n ],\n HOME: [\n {\n guard: \"selectOnFocus\",\n actions: [\"focusFirstTab\", \"selectFocusedTab\"]\n },\n {\n actions: [\"focusFirstTab\"]\n }\n ],\n END: [\n {\n guard: \"selectOnFocus\",\n actions: [\"focusLastTab\", \"selectFocusedTab\"]\n },\n {\n actions: [\"focusLastTab\"]\n }\n ],\n TAB_FOCUS: {\n actions: [\"setFocusedValue\"]\n },\n TAB_BLUR: {\n target: \"idle\",\n actions: [\"clearFocusedValue\"]\n }\n }\n }\n },\n implementations: {\n guards: {\n selectOnFocus: ({ prop }) => prop(\"activationMode\") === \"automatic\"\n },\n actions: {\n selectFocusedTab({ context, prop }) {\n raf(() => {\n const focusedValue = context.get(\"focusedValue\");\n if (!focusedValue) return;\n const nullable = prop(\"deselectable\") && context.get(\"value\") === focusedValue;\n const value = nullable ? null : focusedValue;\n context.set(\"value\", value);\n });\n },\n setFocusedValue({ context, event, flush }) {\n if (event.value == null) return;\n flush(() => {\n context.set(\"focusedValue\", event.value);\n });\n },\n clearFocusedValue({ context }) {\n context.set(\"focusedValue\", null);\n },\n setValue({ context, event, prop }) {\n const nullable = prop(\"deselectable\") && context.get(\"value\") === context.get(\"focusedValue\");\n context.set(\"value\", nullable ? null : event.value);\n },\n clearValue({ context }) {\n context.set(\"value\", null);\n },\n focusFirstTab({ scope }) {\n raf(() => {\n getFirstTriggerEl(scope)?.focus();\n });\n },\n focusLastTab({ scope }) {\n raf(() => {\n getLastTriggerEl(scope)?.focus();\n });\n },\n focusNextTab({ context, prop, scope, event }) {\n const focusedValue = event.value ?? context.get(\"focusedValue\");\n if (!focusedValue) return;\n const triggerEl = getNextTriggerEl(scope, {\n value: focusedValue,\n loopFocus: prop(\"loopFocus\")\n });\n raf(() => {\n if (prop(\"composite\")) {\n triggerEl?.focus();\n } else if (triggerEl?.dataset.value != null) {\n context.set(\"focusedValue\", triggerEl.dataset.value);\n }\n });\n },\n focusPrevTab({ context, prop, scope, event }) {\n const focusedValue = event.value ?? context.get(\"focusedValue\");\n if (!focusedValue) return;\n const triggerEl = getPrevTriggerEl(scope, {\n value: focusedValue,\n loopFocus: prop(\"loopFocus\")\n });\n raf(() => {\n if (prop(\"composite\")) {\n triggerEl?.focus();\n } else if (triggerEl?.dataset.value != null) {\n context.set(\"focusedValue\", triggerEl.dataset.value);\n }\n });\n },\n syncTabIndex({ context, scope }) {\n raf(() => {\n const value = context.get(\"value\");\n if (!value) return;\n const contentEl = getContentEl(scope, value);\n if (!contentEl) return;\n const focusables = getFocusables(contentEl);\n if (focusables.length > 0) {\n contentEl.removeAttribute(\"tabindex\");\n } else {\n contentEl.setAttribute(\"tabindex\", \"0\");\n }\n });\n },\n cleanupObserver({ refs }) {\n const cleanup = refs.get(\"indicatorCleanup\");\n if (cleanup) cleanup();\n },\n allowIndicatorTransition({ context }) {\n context.set(\"indicatorTransition\", true);\n },\n setIndicatorRect({ context, event, scope }) {\n const value = event.id ?? context.get(\"value\");\n const indicatorEl = getIndicatorEl(scope);\n if (!indicatorEl) return;\n if (!value) {\n context.set(\"indicatorTransition\", false);\n return;\n }\n const triggerEl = getTriggerEl(scope, value);\n if (!triggerEl) return;\n context.set(\"indicatorRect\", getRectById(scope, value));\n nextTick(() => {\n context.set(\"indicatorTransition\", false);\n });\n },\n syncSsr({ context }) {\n context.set(\"ssr\", false);\n },\n syncIndicatorRect({ context, refs, scope }) {\n const cleanup = refs.get(\"indicatorCleanup\");\n if (cleanup) cleanup();\n const value = context.get(\"value\");\n if (!value) {\n context.set(\"indicatorTransition\", false);\n return;\n }\n const triggerEl = getTriggerEl(scope, value);\n const indicatorEl = getIndicatorEl(scope);\n if (!triggerEl || !indicatorEl) return;\n const indicatorCleanup = trackElementRect([triggerEl], {\n measure(el) {\n return getOffsetRect(el);\n },\n onEntry({ rects }) {\n const [rect] = rects;\n context.set(\"indicatorRect\", resolveRect(rect));\n }\n });\n refs.set(\"indicatorCleanup\", indicatorCleanup);\n },\n navigateIfNeeded({ context, prop, scope }) {\n const value = context.get(\"value\");\n if (!value) return;\n const triggerEl = getTriggerEl(scope, value);\n if (isAnchorElement(triggerEl)) {\n prop(\"navigate\")?.({ value, node: triggerEl, href: triggerEl.href });\n }\n }\n }\n }\n});\nvar props = createProps()([\n \"activationMode\",\n \"composite\",\n \"deselectable\",\n \"dir\",\n \"getRootNode\",\n \"id\",\n \"ids\",\n \"loopFocus\",\n \"navigate\",\n \"onFocusChange\",\n \"onValueChange\",\n \"orientation\",\n \"translations\",\n \"value\",\n \"defaultValue\"\n]);\nvar splitProps = createSplitProps(props);\nvar triggerProps = createProps()([\"disabled\", \"value\"]);\nvar splitTriggerProps = createSplitProps(triggerProps);\nvar contentProps = createProps()([\"value\"]);\nvar splitContentProps = createSplitProps(contentProps);\n\nexport { anatomy, connect, contentProps, machine, props, splitContentProps, splitProps, splitTriggerProps, triggerProps };\n","'use client';\nimport { useMachine, normalizeProps } from '@zag-js/react';\nimport * as tabs from '@zag-js/tabs';\nimport { useId } from 'react';\nimport { useEnvironmentContext } from '../../providers/environment/use-environment-context.js';\nimport { useLocaleContext } from '../../providers/locale/use-locale-context.js';\n\nconst useTabs = (props) => {\n const id = useId();\n const { getRootNode } = useEnvironmentContext();\n const { dir } = useLocaleContext();\n const machineProps = {\n id,\n dir,\n getRootNode,\n ...props\n };\n const service = useMachine(tabs.machine, machineProps);\n return tabs.connect(service, normalizeProps);\n};\n\nexport { useTabs };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { createSplitProps } from '../../utils/create-split-props.js';\nimport { splitRenderStrategyProps, RenderStrategyPropsProvider } from '../../utils/render-strategy.js';\nimport { ark } from '../factory.js';\nimport { useTabs } from './use-tabs.js';\nimport { TabsProvider } from './use-tabs-context.js';\n\nconst TabsRoot = forwardRef((props, ref) => {\n const [renderStrategyProps, tabsProps] = splitRenderStrategyProps(props);\n const [useTabsProps, localprops] = createSplitProps()(tabsProps, [\n \"activationMode\",\n \"composite\",\n \"defaultValue\",\n \"deselectable\",\n \"id\",\n \"ids\",\n \"loopFocus\",\n \"navigate\",\n \"onFocusChange\",\n \"onValueChange\",\n \"orientation\",\n \"translations\",\n \"value\"\n ]);\n const tabs = useTabs(useTabsProps);\n const mergedProps = mergeProps(tabs.getRootProps(), localprops);\n return /* @__PURE__ */ jsx(TabsProvider, { value: tabs, children: /* @__PURE__ */ jsx(RenderStrategyPropsProvider, { value: renderStrategyProps, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }) }) });\n});\nTabsRoot.displayName = \"TabsRoot\";\n\nexport { TabsRoot };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { createSplitProps } from '../../utils/create-split-props.js';\nimport { splitRenderStrategyProps, RenderStrategyPropsProvider } from '../../utils/render-strategy.js';\nimport { ark } from '../factory.js';\nimport { TabsProvider } from './use-tabs-context.js';\n\nconst TabsRootProvider = forwardRef((props, ref) => {\n const [renderStrategyProps, tabsProps] = splitRenderStrategyProps(props);\n const [{ value: tabs }, localprops] = createSplitProps()(tabsProps, [\"value\"]);\n const mergedProps = mergeProps(tabs.getRootProps(), localprops);\n return /* @__PURE__ */ jsx(TabsProvider, { value: tabs, children: /* @__PURE__ */ jsx(RenderStrategyPropsProvider, { value: renderStrategyProps, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }) }) });\n});\nTabsRootProvider.displayName = \"TabsRootProvider\";\n\nexport { TabsRootProvider };\n","\"use strict\";\n\"use client\";\nimport { Tabs } from '@ark-ui/react/tabs';\nimport { createSlotRecipeContext } from '../../styled-system/create-slot-recipe-context.js';\n\nconst {\n withProvider,\n withContext,\n useStyles: useTabsStyles,\n PropsProvider\n} = createSlotRecipeContext({ key: \"tabs\" });\nconst TabsRootProvider = withProvider(Tabs.RootProvider, \"root\", { forwardAsChild: true });\nconst TabsRoot = withProvider(\n Tabs.Root,\n \"root\",\n { forwardAsChild: true }\n);\nconst TabsPropsProvider = PropsProvider;\nconst TabsTrigger = withContext(\n Tabs.Trigger,\n \"trigger\",\n { forwardAsChild: true }\n);\nconst TabsContent = withContext(\n Tabs.Content,\n \"content\",\n { forwardAsChild: true }\n);\nconst TabsContentGroup = withContext(\"div\", \"contentGroup\");\nconst TabsList = withContext(\n Tabs.List,\n \"list\",\n { forwardAsChild: true }\n);\nconst TabsIndicator = withContext(\n Tabs.Indicator,\n \"indicator\",\n { forwardAsChild: true }\n);\n\nexport { TabsContent, TabsContentGroup, TabsIndicator, TabsList, TabsPropsProvider, TabsRoot, TabsRootProvider, TabsTrigger, useTabsStyles };\n","import { TabSize } from './tab.types';\nimport { NotificationCounterSize } from 'components/NotificationCounter/notificationCounter.types';\nimport { HeadingSize } from 'components/Heading/heading.types';\n\nexport const tabNotificationCounterSize: Record<TabSize, NotificationCounterSize> = {\n xs: 'sm',\n sm: 'md',\n md: 'md',\n lg: 'lg',\n};\n\nexport const tabLabelSize: Record<TabSize, HeadingSize> = {\n xs: 'xs',\n sm: 'xs',\n md: 'sm',\n lg: 'md',\n};\n","import React from 'react';\nimport { Tabs } from '@chakra-ui/react/tabs';\nimport { Icon, IconName } from 'components/Icon';\nimport {\n NotificationCounter,\n NotificationCounterProps,\n} from 'components/NotificationCounter/notificationCounter.component';\nimport { TabIconPosition, TabSize } from './tab.types';\nimport { tabLabelSize, tabNotificationCounterSize } from './tab.records';\nimport { Heading } from 'components/Heading/heading.component';\n\nexport interface TabProps extends Tabs.TriggerProps {\n /** The name of the icon to be displayed. */\n iconName?: IconName;\n /** The position of the icon. */\n iconPosition?: TabIconPosition;\n /** The label of the tab. */\n label: string;\n /** Props to customize the notification counter. */\n notificationCounterProps?: Omit<NotificationCounterProps, 'size'>;\n /** Whether to show the notification counter to the right of the label or not. */\n showNotificationCounter?: boolean;\n /**\n * The size of the tab.\n * @default md\n */\n size?: TabSize;\n /** The value of the tab. */\n value: string;\n /** Data test id for the tab. */\n 'data-testid'?: string;\n}\n\nexport const Tab = ({\n iconName,\n iconPosition = 'left',\n label,\n notificationCounterProps,\n showNotificationCounter,\n size = 'md',\n ['data-testid']: dataTestId = 'kibble-tab',\n ...rest\n}: TabProps): React.JSX.Element => {\n return (\n <Tabs.Trigger className=\"Tab\" data-testid={dataTestId} {...rest}>\n {!!iconName && iconPosition === 'left' && (\n <Icon\n className=\"Tab__Icon\"\n data-testid={`${dataTestId}-icon-left`}\n name={iconName}\n size={size}\n variant=\"default\"\n />\n )}\n <Heading as=\"span\" className=\"Tab__Label\" data-testid={`${dataTestId}-label`} size={tabLabelSize[size]}>\n {label}\n </Heading>\n {!!iconName && iconPosition === 'right' && (\n <Icon className=\"Tab__Icon\" data-testid={`${dataTestId}-icon-right`} name={iconName} size={size} />\n )}\n {showNotificationCounter && (\n <NotificationCounter\n className=\"Tab__NotificationCounter\"\n data-testid={`${dataTestId}-notification-counter`}\n {...notificationCounterProps}\n size={tabNotificationCounterSize[size]}\n />\n )}\n </Tabs.Trigger>\n );\n};\n","import React from 'react';\nimport { Tabs as CTabs } from '@chakra-ui/react/tabs';\nimport { TabSize } from './components/Tab/tab.types';\nimport { Tab, TabProps } from './components/Tab/tab.component';\nimport { Alignment } from 'shared/types/alignment';\n\nexport interface TabsProps extends Omit<CTabs.RootProps, 'onChange' | 'variant'> {\n /** Alignment of the tabs. */\n align?: Alignment;\n /** Callback function when the tab changes. */\n onChange?: (value: string) => void;\n /**\n * When true, the tab list scrolls horizontally instead of wrapping or overflowing.\n * @default false\n */\n scrollable?: boolean;\n /**\n * Size of the tabs.\n * @default md\n */\n size?: TabSize;\n /** Array of tabs. Each tab should have a value prop. */\n tabs: TabProps[];\n /** Array of tab contents, each tab content should have a value prop that matches the value of their corresponding tab. */\n tabsContent?: CTabs.ContentProps[];\n /**\n * Data test id for the tabs.\n * @default kibble-tabs\n */\n 'data-testid'?: string;\n /** The current value of the tabs. */\n value?: string | null;\n}\n\nexport const Tabs = ({\n align = 'start',\n onChange,\n scrollable = false,\n size = 'md',\n tabs,\n tabsContent,\n ['data-testid']: dataTestId = 'kibble-tabs',\n ...rest\n}: TabsProps): React.JSX.Element => {\n console.log('frank - 3');\n return (\n <CTabs.Root\n className=\"Tabs\"\n data-testid={dataTestId}\n justify={align || rest.justify}\n size={size}\n onValueChange={({ value }) => onChange?.(value)}\n {...rest}\n {...(scrollable && { style: { ...rest.style, width: '100%', minWidth: 0, overflow: 'hidden' } })}\n >\n <CTabs.List\n className=\"Tabs__List\"\n data-testid={`${dataTestId}-trigger-list`}\n {...(scrollable && {\n style: {\n display: 'block',\n overflowX: 'scroll',\n whiteSpace: 'nowrap',\n scrollbarWidth: 'none',\n },\n })}\n >\n {tabs.map((tab, index) => (\n <Tab\n key={`tab-${index}`}\n {...tab}\n data-testid={`${dataTestId}-trigger-${tab.value}`}\n size={size}\n {...(scrollable && { style: { display: 'inline-flex', float: 'none' } })}\n />\n ))}\n </CTabs.List>\n {!!tabsContent &&\n tabsContent.map((tabContent, index) => (\n <CTabs.Content\n key={`${dataTestId}-tabContent-${index}`}\n data-testid={`${dataTestId}-content-${tabs[index].value}`}\n {...tabContent}\n />\n ))}\n </CTabs.Root>\n );\n};\n","export const tabSizes = ['xs', 'sm', 'md', 'lg'] as const;\nexport type TabSize = (typeof tabSizes)[number];\n\nexport const tabIconPositions = ['left', 'right'] as const;\nexport type TabIconPosition = (typeof tabIconPositions)[number];\n"],"names":["useDebounce","value","delay","debouncedValue","setDebouncedValue","useState","useEffect","timer","TabsProvider","useTabsContext","createContext","TabContent","forwardRef","props","ref","contentProps","localProps","createSplitProps","tabs","renderStrategyProps","useRenderStrategyPropsContext","presence","usePresence","mergedProps","mergeProps","jsx","PresenceProvider","ark","composeRefs","TabIndicator","TabList","TabTrigger","tabProps","anatomy","createAnatomy","parts","getRootId","ctx","getListId","getContentId","id","getTriggerId","getIndicatorId","getListEl","getContentEl","getTriggerEl","getIndicatorEl","getElements","selector","queryAll","getFirstTriggerEl","first","getLastTriggerEl","last","getNextTriggerEl","opts","nextById","getPrevTriggerEl","prevById","getOffsetRect","el","getRectById","tab","itemById","resolveRect","rect","connect","service","normalize","state","send","context","prop","scope","translations","focused","isVertical","isHorizontal","composite","getTriggerState","props2","fromValue","dataAttr","event","isSelfTarget","isComposingEvent","keyMap","key","getEventKey","exec","disabled","triggerState","isOpeningInNewTab","isSafari","selected","indicatorRect","indicatorTransition","createMachine","setup","machine","details","clickIfLink","bindable","track","action","raf","focusedValue","flush","nullable","triggerEl","contentEl","getFocusables","refs","cleanup","nextTick","indicatorEl","indicatorCleanup","trackElementRect","rects","isAnchorElement","createProps","useTabs","useId","getRootNode","useEnvironmentContext","dir","useLocaleContext","machineProps","useMachine","tabs.machine","tabs.connect","normalizeProps","TabsRoot","tabsProps","splitRenderStrategyProps","useTabsProps","localprops","RenderStrategyPropsProvider","TabsRootProvider","withProvider","withContext","createSlotRecipeContext","Tabs.RootProvider","Tabs.Root","TabsTrigger","Tabs.Trigger","TabsContent","Tabs.Content","TabsList","Tabs.List","Tabs.Indicator","tabNotificationCounterSize","tabLabelSize","Tab","iconName","iconPosition","label","notificationCounterProps","showNotificationCounter","size","dataTestId","rest","jsxs","Icon","Heading","NotificationCounter","Tabs","align","onChange","scrollable","tabsContent","CTabs.Root","CTabs.List","index","tabContent","CTabs.Content","tabSizes","tabIconPositions"],"mappings":"8aAGA,SAASA,EAAYC,EAAOC,EAAO,CACjC,KAAM,CAACC,EAAgBC,CAAiB,EAAIC,EAAAA,SAASJ,CAAK,EAC1DK,OAAAA,EAAAA,UAAU,IAAM,CACd,MAAMC,EAAQ,WAAW,IAAM,CAC7BH,EAAkBH,CAAK,CACxB,EAAEC,CAAK,EACR,MAAO,IAAM,CACX,aAAaK,CAAK,CACnB,CACL,EAAK,CAACN,EAAOC,CAAK,CAAC,EACVC,CACT,CCXA,KAAM,CAACK,EAAcC,CAAc,EAAIC,gBAAc,CACnD,KAAM,cACN,SAAU,iBACV,aAAc,kBAChB,CAAC,ECMKC,EAAaC,EAAU,WAAC,CAACC,EAAOC,IAAQ,CAC5C,KAAM,CAACC,EAAcC,CAAU,EAAIC,EAAgB,iBAAA,EAAGJ,EAAO,CAAC,OAAO,CAAC,EAChEK,EAAOT,EAAgB,EACvBU,EAAsBC,EAAAA,8BAA+B,EACrDC,EAAWC,EAAAA,YAAY,CAC3B,GAAGH,EACH,QAASnB,E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AiG,EACC,GAAIU,GAAc,CAAE,MAAO,CAAE,QAAS,cAAe,MAAO,MAAS,CAAA,CAAA,EAJjE,OAAOI,CAAK,EAMpB,CAAA,CAAA,CACH,EACC,CAAC,CAACH,GACDA,EAAY,IAAI,CAACI,EAAYD,IAC3BpJ,EAAA,kBAAA,IAACsJ,GAAA,CAEC,cAAa,GAAGf,CAAU,YAAY9I,EAAK2J,CAAK,EAAE,KAAK,GACtD,GAAGC,CAAA,EAFC,GAAGd,CAAU,eAAea,CAAK,EAIzC,CAAA,CAAA,CAAA,CACL,GCrFSG,GAAW,CAAC,KAAM,KAAM,KAAM,IAAI,EAGlCC,GAAmB,CAAC,OAAQ,OAAO","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10]}
1
+ {"version":3,"file":"tab.types-DSPWRVCF.js","sources":["../../node_modules/@ark-ui/react/dist/utils/use-debounce.js","../../node_modules/@ark-ui/react/dist/components/tabs/use-tabs-context.js","../../node_modules/@ark-ui/react/dist/components/tabs/tab-content.js","../../node_modules/@ark-ui/react/dist/components/tabs/tab-indicator.js","../../node_modules/@ark-ui/react/dist/components/tabs/tab-list.js","../../node_modules/@ark-ui/react/dist/components/tabs/tab-trigger.js","../../node_modules/@zag-js/tabs/dist/index.mjs","../../node_modules/@ark-ui/react/dist/components/tabs/use-tabs.js","../../node_modules/@ark-ui/react/dist/components/tabs/tabs-root.js","../../node_modules/@ark-ui/react/dist/components/tabs/tabs-root-provider.js","../../node_modules/@chakra-ui/react/dist/esm/components/tabs/tabs.js","../../src/components/Tabs/components/Tab/tab.records.ts","../../src/components/Tabs/components/Tab/tab.component.tsx","../../src/components/Tabs/tabs.component.tsx","../../src/components/Tabs/components/Tab/tab.types.ts"],"sourcesContent":["'use client';\nimport { useState, useEffect } from 'react';\n\nfunction useDebounce(value, delay) {\n const [debouncedValue, setDebouncedValue] = useState(value);\n useEffect(() => {\n const timer = setTimeout(() => {\n setDebouncedValue(value);\n }, delay);\n return () => {\n clearTimeout(timer);\n };\n }, [value, delay]);\n return debouncedValue;\n}\n\nexport { useDebounce };\n","'use client';\nimport { createContext } from '../../utils/create-context.js';\n\nconst [TabsProvider, useTabsContext] = createContext({\n name: \"TabsContext\",\n hookName: \"useTabsContext\",\n providerName: \"<TabsProvider />\"\n});\n\nexport { TabsProvider, useTabsContext };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { composeRefs } from '../../utils/compose-refs.js';\nimport { createSplitProps } from '../../utils/create-split-props.js';\nimport { useRenderStrategyPropsContext } from '../../utils/render-strategy.js';\nimport { useDebounce } from '../../utils/use-debounce.js';\nimport { ark } from '../factory.js';\nimport { usePresence } from '../presence/use-presence.js';\nimport { PresenceProvider } from '../presence/use-presence-context.js';\nimport { useTabsContext } from './use-tabs-context.js';\n\nconst TabContent = forwardRef((props, ref) => {\n const [contentProps, localProps] = createSplitProps()(props, [\"value\"]);\n const tabs = useTabsContext();\n const renderStrategyProps = useRenderStrategyPropsContext();\n const presence = usePresence({\n ...renderStrategyProps,\n present: useDebounce(tabs.value === props.value, 0),\n immediate: true\n });\n const mergedProps = mergeProps(tabs.getContentProps(contentProps), presence.getPresenceProps(), localProps);\n return /* @__PURE__ */ jsx(PresenceProvider, { value: presence, children: presence.unmounted ? null : /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref: composeRefs(presence.ref, ref) }) });\n});\nTabContent.displayName = \"TabContent\";\n\nexport { TabContent };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useTabsContext } from './use-tabs-context.js';\n\nconst TabIndicator = forwardRef((props, ref) => {\n const tabs = useTabsContext();\n const mergedProps = mergeProps(tabs.getIndicatorProps(), props);\n return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });\n});\nTabIndicator.displayName = \"TabIndicator\";\n\nexport { TabIndicator };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { ark } from '../factory.js';\nimport { useTabsContext } from './use-tabs-context.js';\n\nconst TabList = forwardRef((props, ref) => {\n const tabs = useTabsContext();\n const mergedProps = mergeProps(tabs.getListProps(), props);\n return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });\n});\nTabList.displayName = \"TabList\";\n\nexport { TabList };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { createSplitProps } from '../../utils/create-split-props.js';\nimport { ark } from '../factory.js';\nimport { useTabsContext } from './use-tabs-context.js';\n\nconst TabTrigger = forwardRef((props, ref) => {\n const [tabProps, localProps] = createSplitProps()(props, [\"disabled\", \"value\"]);\n const tabs = useTabsContext();\n const mergedProps = mergeProps(tabs.getTriggerProps(tabProps), localProps);\n return /* @__PURE__ */ jsx(ark.button, { ...mergedProps, ref });\n});\nTabTrigger.displayName = \"TabTrigger\";\n\nexport { TabTrigger };\n","import { createAnatomy } from '@zag-js/anatomy';\nimport { isAnchorElement, trackElementRect, nextTick, raf, getFocusables, prevById, nextById, clickIfLink, itemById, queryAll, dataAttr, isOpeningInNewTab, isSafari, isSelfTarget, isComposingEvent, getEventKey } from '@zag-js/dom-query';\nimport { last, first, createSplitProps } from '@zag-js/utils';\nimport { setup } from '@zag-js/core';\nimport { createProps } from '@zag-js/types';\n\n// src/tabs.anatomy.ts\nvar anatomy = createAnatomy(\"tabs\").parts(\"root\", \"list\", \"trigger\", \"content\", \"indicator\");\nvar parts = anatomy.build();\nvar getRootId = (ctx) => ctx.ids?.root ?? `tabs:${ctx.id}`;\nvar getListId = (ctx) => ctx.ids?.list ?? `tabs:${ctx.id}:list`;\nvar getContentId = (ctx, id) => ctx.ids?.content ?? `tabs:${ctx.id}:content-${id}`;\nvar getTriggerId = (ctx, id) => ctx.ids?.trigger ?? `tabs:${ctx.id}:trigger-${id}`;\nvar getIndicatorId = (ctx) => ctx.ids?.indicator ?? `tabs:${ctx.id}:indicator`;\nvar getListEl = (ctx) => ctx.getById(getListId(ctx));\nvar getContentEl = (ctx, id) => ctx.getById(getContentId(ctx, id));\nvar getTriggerEl = (ctx, id) => ctx.getById(getTriggerId(ctx, id));\nvar getIndicatorEl = (ctx) => ctx.getById(getIndicatorId(ctx));\nvar getElements = (ctx) => {\n const ownerId = CSS.escape(getListId(ctx));\n const selector = `[role=tab][data-ownedby='${ownerId}']:not([disabled])`;\n return queryAll(getListEl(ctx), selector);\n};\nvar getFirstTriggerEl = (ctx) => first(getElements(ctx));\nvar getLastTriggerEl = (ctx) => last(getElements(ctx));\nvar getNextTriggerEl = (ctx, opts) => nextById(getElements(ctx), getTriggerId(ctx, opts.value), opts.loopFocus);\nvar getPrevTriggerEl = (ctx, opts) => prevById(getElements(ctx), getTriggerId(ctx, opts.value), opts.loopFocus);\nvar getOffsetRect = (el) => {\n return {\n left: el?.offsetLeft ?? 0,\n top: el?.offsetTop ?? 0,\n width: el?.offsetWidth ?? 0,\n height: el?.offsetHeight ?? 0\n };\n};\nvar getRectById = (ctx, id) => {\n const tab = itemById(getElements(ctx), getTriggerId(ctx, id));\n return resolveRect(getOffsetRect(tab));\n};\nvar resolveRect = (rect) => ({\n width: `${rect.width}px`,\n height: `${rect.height}px`,\n left: `${rect.left}px`,\n top: `${rect.top}px`\n});\n\n// src/tabs.connect.ts\nfunction connect(service, normalize) {\n const { state, send, context, prop, scope } = service;\n const translations = prop(\"translations\");\n const focused = state.matches(\"focused\");\n const isVertical = prop(\"orientation\") === \"vertical\";\n const isHorizontal = prop(\"orientation\") === \"horizontal\";\n const composite = prop(\"composite\");\n function getTriggerState(props2) {\n return {\n selected: context.get(\"value\") === props2.value,\n focused: context.get(\"focusedValue\") === props2.value,\n disabled: !!props2.disabled\n };\n }\n return {\n value: context.get(\"value\"),\n focusedValue: context.get(\"focusedValue\"),\n setValue(value) {\n send({ type: \"SET_VALUE\", value });\n },\n clearValue() {\n send({ type: \"CLEAR_VALUE\" });\n },\n setIndicatorRect(value) {\n const id = getTriggerId(scope, value);\n send({ type: \"SET_INDICATOR_RECT\", id });\n },\n syncTabIndex() {\n send({ type: \"SYNC_TAB_INDEX\" });\n },\n selectNext(fromValue) {\n send({ type: \"TAB_FOCUS\", value: fromValue, src: \"selectNext\" });\n send({ type: \"ARROW_NEXT\", src: \"selectNext\" });\n },\n selectPrev(fromValue) {\n send({ type: \"TAB_FOCUS\", value: fromValue, src: \"selectPrev\" });\n send({ type: \"ARROW_PREV\", src: \"selectPrev\" });\n },\n focus() {\n const value = context.get(\"value\");\n if (!value) return;\n getTriggerEl(scope, value)?.focus();\n },\n getRootProps() {\n return normalize.element({\n ...parts.root.attrs,\n id: getRootId(scope),\n \"data-orientation\": prop(\"orientation\"),\n \"data-focus\": dataAttr(focused),\n dir: prop(\"dir\")\n });\n },\n getListProps() {\n return normalize.element({\n ...parts.list.attrs,\n id: getListId(scope),\n role: \"tablist\",\n dir: prop(\"dir\"),\n \"data-focus\": dataAttr(focused),\n \"aria-orientation\": prop(\"orientation\"),\n \"data-orientation\": prop(\"orientation\"),\n \"aria-label\": translations?.listLabel,\n onKeyDown(event) {\n if (event.defaultPrevented) return;\n if (!isSelfTarget(event)) return;\n if (isComposingEvent(event)) return;\n const keyMap = {\n ArrowDown() {\n if (isHorizontal) return;\n send({ type: \"ARROW_NEXT\", key: \"ArrowDown\" });\n },\n ArrowUp() {\n if (isHorizontal) return;\n send({ type: \"ARROW_PREV\", key: \"ArrowUp\" });\n },\n ArrowLeft() {\n if (isVertical) return;\n send({ type: \"ARROW_PREV\", key: \"ArrowLeft\" });\n },\n ArrowRight() {\n if (isVertical) return;\n send({ type: \"ARROW_NEXT\", key: \"ArrowRight\" });\n },\n Home() {\n send({ type: \"HOME\" });\n },\n End() {\n send({ type: \"END\" });\n }\n };\n let key = getEventKey(event, {\n dir: prop(\"dir\"),\n orientation: prop(\"orientation\")\n });\n const exec = keyMap[key];\n if (exec) {\n event.preventDefault();\n exec(event);\n return;\n }\n }\n });\n },\n getTriggerState,\n getTriggerProps(props2) {\n const { value, disabled } = props2;\n const triggerState = getTriggerState(props2);\n return normalize.button({\n ...parts.trigger.attrs,\n role: \"tab\",\n type: \"button\",\n disabled,\n dir: prop(\"dir\"),\n \"data-orientation\": prop(\"orientation\"),\n \"data-disabled\": dataAttr(disabled),\n \"aria-disabled\": disabled,\n \"data-value\": value,\n \"aria-selected\": triggerState.selected,\n \"data-selected\": dataAttr(triggerState.selected),\n \"data-focus\": dataAttr(triggerState.focused),\n \"aria-controls\": triggerState.selected ? getContentId(scope, value) : void 0,\n \"data-ownedby\": getListId(scope),\n \"data-ssr\": dataAttr(context.get(\"ssr\")),\n id: getTriggerId(scope, value),\n tabIndex: triggerState.selected && composite ? 0 : -1,\n onFocus() {\n send({ type: \"TAB_FOCUS\", value });\n },\n onBlur(event) {\n const target = event.relatedTarget;\n if (target?.getAttribute(\"role\") !== \"tab\") {\n send({ type: \"TAB_BLUR\" });\n }\n },\n onClick(event) {\n if (event.defaultPrevented) return;\n if (isOpeningInNewTab(event)) return;\n if (disabled) return;\n if (isSafari()) {\n event.currentTarget.focus();\n }\n send({ type: \"TAB_CLICK\", value });\n }\n });\n },\n getContentProps(props2) {\n const { value } = props2;\n const selected = context.get(\"value\") === value;\n return normalize.element({\n ...parts.content.attrs,\n dir: prop(\"dir\"),\n id: getContentId(scope, value),\n tabIndex: composite ? 0 : -1,\n \"aria-labelledby\": getTriggerId(scope, value),\n role: \"tabpanel\",\n \"data-ownedby\": getListId(scope),\n \"data-selected\": dataAttr(selected),\n \"data-orientation\": prop(\"orientation\"),\n hidden: !selected\n });\n },\n getIndicatorProps() {\n const indicatorRect = context.get(\"indicatorRect\");\n const indicatorTransition = context.get(\"indicatorTransition\");\n return normalize.element({\n id: getIndicatorId(scope),\n ...parts.indicator.attrs,\n dir: prop(\"dir\"),\n \"data-orientation\": prop(\"orientation\"),\n style: {\n \"--transition-property\": \"left, right, top, bottom, width, height\",\n \"--left\": indicatorRect.left,\n \"--top\": indicatorRect.top,\n \"--width\": indicatorRect.width,\n \"--height\": indicatorRect.height,\n position: \"absolute\",\n willChange: \"var(--transition-property)\",\n transitionProperty: \"var(--transition-property)\",\n transitionDuration: indicatorTransition ? \"var(--transition-duration, 150ms)\" : \"0ms\",\n transitionTimingFunction: \"var(--transition-timing-function)\",\n [isHorizontal ? \"left\" : \"top\"]: isHorizontal ? \"var(--left)\" : \"var(--top)\"\n }\n });\n }\n };\n}\nvar { createMachine } = setup();\nvar machine = createMachine({\n props({ props: props2 }) {\n return {\n dir: \"ltr\",\n orientation: \"horizontal\",\n activationMode: \"automatic\",\n loopFocus: true,\n composite: true,\n navigate(details) {\n clickIfLink(details.node);\n },\n defaultValue: null,\n ...props2\n };\n },\n initialState() {\n return \"idle\";\n },\n context({ prop, bindable }) {\n return {\n value: bindable(() => ({\n defaultValue: prop(\"defaultValue\"),\n value: prop(\"value\"),\n onChange(value) {\n prop(\"onValueChange\")?.({ value });\n }\n })),\n focusedValue: bindable(() => ({\n defaultValue: prop(\"value\") || prop(\"defaultValue\"),\n sync: true,\n onChange(value) {\n prop(\"onFocusChange\")?.({ focusedValue: value });\n }\n })),\n ssr: bindable(() => ({ defaultValue: true })),\n indicatorTransition: bindable(() => ({ defaultValue: false })),\n indicatorRect: bindable(() => ({\n defaultValue: { left: \"0px\", top: \"0px\", width: \"0px\", height: \"0px\" }\n }))\n };\n },\n watch({ context, prop, track, action }) {\n track([() => context.get(\"value\")], () => {\n action([\"allowIndicatorTransition\", \"syncIndicatorRect\", \"syncTabIndex\", \"navigateIfNeeded\"]);\n });\n track([() => prop(\"dir\"), () => prop(\"orientation\")], () => {\n action([\"syncIndicatorRect\"]);\n });\n },\n on: {\n SET_VALUE: {\n actions: [\"setValue\"]\n },\n CLEAR_VALUE: {\n actions: [\"clearValue\"]\n },\n SET_INDICATOR_RECT: {\n actions: [\"setIndicatorRect\"]\n },\n SYNC_TAB_INDEX: {\n actions: [\"syncTabIndex\"]\n }\n },\n entry: [\"syncIndicatorRect\", \"syncTabIndex\", \"syncSsr\"],\n exit: [\"cleanupObserver\"],\n states: {\n idle: {\n on: {\n TAB_FOCUS: {\n target: \"focused\",\n actions: [\"setFocusedValue\"]\n },\n TAB_CLICK: {\n target: \"focused\",\n actions: [\"setFocusedValue\", \"setValue\"]\n }\n }\n },\n focused: {\n on: {\n TAB_CLICK: {\n actions: [\"setFocusedValue\", \"setValue\"]\n },\n ARROW_PREV: [\n {\n guard: \"selectOnFocus\",\n actions: [\"focusPrevTab\", \"selectFocusedTab\"]\n },\n {\n actions: [\"focusPrevTab\"]\n }\n ],\n ARROW_NEXT: [\n {\n guard: \"selectOnFocus\",\n actions: [\"focusNextTab\", \"selectFocusedTab\"]\n },\n {\n actions: [\"focusNextTab\"]\n }\n ],\n HOME: [\n {\n guard: \"selectOnFocus\",\n actions: [\"focusFirstTab\", \"selectFocusedTab\"]\n },\n {\n actions: [\"focusFirstTab\"]\n }\n ],\n END: [\n {\n guard: \"selectOnFocus\",\n actions: [\"focusLastTab\", \"selectFocusedTab\"]\n },\n {\n actions: [\"focusLastTab\"]\n }\n ],\n TAB_FOCUS: {\n actions: [\"setFocusedValue\"]\n },\n TAB_BLUR: {\n target: \"idle\",\n actions: [\"clearFocusedValue\"]\n }\n }\n }\n },\n implementations: {\n guards: {\n selectOnFocus: ({ prop }) => prop(\"activationMode\") === \"automatic\"\n },\n actions: {\n selectFocusedTab({ context, prop }) {\n raf(() => {\n const focusedValue = context.get(\"focusedValue\");\n if (!focusedValue) return;\n const nullable = prop(\"deselectable\") && context.get(\"value\") === focusedValue;\n const value = nullable ? null : focusedValue;\n context.set(\"value\", value);\n });\n },\n setFocusedValue({ context, event, flush }) {\n if (event.value == null) return;\n flush(() => {\n context.set(\"focusedValue\", event.value);\n });\n },\n clearFocusedValue({ context }) {\n context.set(\"focusedValue\", null);\n },\n setValue({ context, event, prop }) {\n const nullable = prop(\"deselectable\") && context.get(\"value\") === context.get(\"focusedValue\");\n context.set(\"value\", nullable ? null : event.value);\n },\n clearValue({ context }) {\n context.set(\"value\", null);\n },\n focusFirstTab({ scope }) {\n raf(() => {\n getFirstTriggerEl(scope)?.focus();\n });\n },\n focusLastTab({ scope }) {\n raf(() => {\n getLastTriggerEl(scope)?.focus();\n });\n },\n focusNextTab({ context, prop, scope, event }) {\n const focusedValue = event.value ?? context.get(\"focusedValue\");\n if (!focusedValue) return;\n const triggerEl = getNextTriggerEl(scope, {\n value: focusedValue,\n loopFocus: prop(\"loopFocus\")\n });\n raf(() => {\n if (prop(\"composite\")) {\n triggerEl?.focus();\n } else if (triggerEl?.dataset.value != null) {\n context.set(\"focusedValue\", triggerEl.dataset.value);\n }\n });\n },\n focusPrevTab({ context, prop, scope, event }) {\n const focusedValue = event.value ?? context.get(\"focusedValue\");\n if (!focusedValue) return;\n const triggerEl = getPrevTriggerEl(scope, {\n value: focusedValue,\n loopFocus: prop(\"loopFocus\")\n });\n raf(() => {\n if (prop(\"composite\")) {\n triggerEl?.focus();\n } else if (triggerEl?.dataset.value != null) {\n context.set(\"focusedValue\", triggerEl.dataset.value);\n }\n });\n },\n syncTabIndex({ context, scope }) {\n raf(() => {\n const value = context.get(\"value\");\n if (!value) return;\n const contentEl = getContentEl(scope, value);\n if (!contentEl) return;\n const focusables = getFocusables(contentEl);\n if (focusables.length > 0) {\n contentEl.removeAttribute(\"tabindex\");\n } else {\n contentEl.setAttribute(\"tabindex\", \"0\");\n }\n });\n },\n cleanupObserver({ refs }) {\n const cleanup = refs.get(\"indicatorCleanup\");\n if (cleanup) cleanup();\n },\n allowIndicatorTransition({ context }) {\n context.set(\"indicatorTransition\", true);\n },\n setIndicatorRect({ context, event, scope }) {\n const value = event.id ?? context.get(\"value\");\n const indicatorEl = getIndicatorEl(scope);\n if (!indicatorEl) return;\n if (!value) {\n context.set(\"indicatorTransition\", false);\n return;\n }\n const triggerEl = getTriggerEl(scope, value);\n if (!triggerEl) return;\n context.set(\"indicatorRect\", getRectById(scope, value));\n nextTick(() => {\n context.set(\"indicatorTransition\", false);\n });\n },\n syncSsr({ context }) {\n context.set(\"ssr\", false);\n },\n syncIndicatorRect({ context, refs, scope }) {\n const cleanup = refs.get(\"indicatorCleanup\");\n if (cleanup) cleanup();\n const value = context.get(\"value\");\n if (!value) {\n context.set(\"indicatorTransition\", false);\n return;\n }\n const triggerEl = getTriggerEl(scope, value);\n const indicatorEl = getIndicatorEl(scope);\n if (!triggerEl || !indicatorEl) return;\n const indicatorCleanup = trackElementRect([triggerEl], {\n measure(el) {\n return getOffsetRect(el);\n },\n onEntry({ rects }) {\n const [rect] = rects;\n context.set(\"indicatorRect\", resolveRect(rect));\n }\n });\n refs.set(\"indicatorCleanup\", indicatorCleanup);\n },\n navigateIfNeeded({ context, prop, scope }) {\n const value = context.get(\"value\");\n if (!value) return;\n const triggerEl = getTriggerEl(scope, value);\n if (isAnchorElement(triggerEl)) {\n prop(\"navigate\")?.({ value, node: triggerEl, href: triggerEl.href });\n }\n }\n }\n }\n});\nvar props = createProps()([\n \"activationMode\",\n \"composite\",\n \"deselectable\",\n \"dir\",\n \"getRootNode\",\n \"id\",\n \"ids\",\n \"loopFocus\",\n \"navigate\",\n \"onFocusChange\",\n \"onValueChange\",\n \"orientation\",\n \"translations\",\n \"value\",\n \"defaultValue\"\n]);\nvar splitProps = createSplitProps(props);\nvar triggerProps = createProps()([\"disabled\", \"value\"]);\nvar splitTriggerProps = createSplitProps(triggerProps);\nvar contentProps = createProps()([\"value\"]);\nvar splitContentProps = createSplitProps(contentProps);\n\nexport { anatomy, connect, contentProps, machine, props, splitContentProps, splitProps, splitTriggerProps, triggerProps };\n","'use client';\nimport { useMachine, normalizeProps } from '@zag-js/react';\nimport * as tabs from '@zag-js/tabs';\nimport { useId } from 'react';\nimport { useEnvironmentContext } from '../../providers/environment/use-environment-context.js';\nimport { useLocaleContext } from '../../providers/locale/use-locale-context.js';\n\nconst useTabs = (props) => {\n const id = useId();\n const { getRootNode } = useEnvironmentContext();\n const { dir } = useLocaleContext();\n const machineProps = {\n id,\n dir,\n getRootNode,\n ...props\n };\n const service = useMachine(tabs.machine, machineProps);\n return tabs.connect(service, normalizeProps);\n};\n\nexport { useTabs };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { createSplitProps } from '../../utils/create-split-props.js';\nimport { splitRenderStrategyProps, RenderStrategyPropsProvider } from '../../utils/render-strategy.js';\nimport { ark } from '../factory.js';\nimport { useTabs } from './use-tabs.js';\nimport { TabsProvider } from './use-tabs-context.js';\n\nconst TabsRoot = forwardRef((props, ref) => {\n const [renderStrategyProps, tabsProps] = splitRenderStrategyProps(props);\n const [useTabsProps, localprops] = createSplitProps()(tabsProps, [\n \"activationMode\",\n \"composite\",\n \"defaultValue\",\n \"deselectable\",\n \"id\",\n \"ids\",\n \"loopFocus\",\n \"navigate\",\n \"onFocusChange\",\n \"onValueChange\",\n \"orientation\",\n \"translations\",\n \"value\"\n ]);\n const tabs = useTabs(useTabsProps);\n const mergedProps = mergeProps(tabs.getRootProps(), localprops);\n return /* @__PURE__ */ jsx(TabsProvider, { value: tabs, children: /* @__PURE__ */ jsx(RenderStrategyPropsProvider, { value: renderStrategyProps, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }) }) });\n});\nTabsRoot.displayName = \"TabsRoot\";\n\nexport { TabsRoot };\n","'use client';\nimport { jsx } from 'react/jsx-runtime';\nimport { mergeProps } from '@zag-js/react';\nimport { forwardRef } from 'react';\nimport { createSplitProps } from '../../utils/create-split-props.js';\nimport { splitRenderStrategyProps, RenderStrategyPropsProvider } from '../../utils/render-strategy.js';\nimport { ark } from '../factory.js';\nimport { TabsProvider } from './use-tabs-context.js';\n\nconst TabsRootProvider = forwardRef((props, ref) => {\n const [renderStrategyProps, tabsProps] = splitRenderStrategyProps(props);\n const [{ value: tabs }, localprops] = createSplitProps()(tabsProps, [\"value\"]);\n const mergedProps = mergeProps(tabs.getRootProps(), localprops);\n return /* @__PURE__ */ jsx(TabsProvider, { value: tabs, children: /* @__PURE__ */ jsx(RenderStrategyPropsProvider, { value: renderStrategyProps, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }) }) });\n});\nTabsRootProvider.displayName = \"TabsRootProvider\";\n\nexport { TabsRootProvider };\n","\"use strict\";\n\"use client\";\nimport { Tabs } from '@ark-ui/react/tabs';\nimport { createSlotRecipeContext } from '../../styled-system/create-slot-recipe-context.js';\n\nconst {\n withProvider,\n withContext,\n useStyles: useTabsStyles,\n PropsProvider\n} = createSlotRecipeContext({ key: \"tabs\" });\nconst TabsRootProvider = withProvider(Tabs.RootProvider, \"root\", { forwardAsChild: true });\nconst TabsRoot = withProvider(\n Tabs.Root,\n \"root\",\n { forwardAsChild: true }\n);\nconst TabsPropsProvider = PropsProvider;\nconst TabsTrigger = withContext(\n Tabs.Trigger,\n \"trigger\",\n { forwardAsChild: true }\n);\nconst TabsContent = withContext(\n Tabs.Content,\n \"content\",\n { forwardAsChild: true }\n);\nconst TabsContentGroup = withContext(\"div\", \"contentGroup\");\nconst TabsList = withContext(\n Tabs.List,\n \"list\",\n { forwardAsChild: true }\n);\nconst TabsIndicator = withContext(\n Tabs.Indicator,\n \"indicator\",\n { forwardAsChild: true }\n);\n\nexport { TabsContent, TabsContentGroup, TabsIndicator, TabsList, TabsPropsProvider, TabsRoot, TabsRootProvider, TabsTrigger, useTabsStyles };\n","import { TabSize } from './tab.types';\nimport { NotificationCounterSize } from 'components/NotificationCounter/notificationCounter.types';\nimport { HeadingSize } from 'components/Heading/heading.types';\n\nexport const tabNotificationCounterSize: Record<TabSize, NotificationCounterSize> = {\n xs: 'sm',\n sm: 'md',\n md: 'md',\n lg: 'lg',\n};\n\nexport const tabLabelSize: Record<TabSize, HeadingSize> = {\n xs: 'xs',\n sm: 'xs',\n md: 'sm',\n lg: 'md',\n};\n","import React from 'react';\nimport { Tabs } from '@chakra-ui/react/tabs';\nimport { Icon, IconName } from 'components/Icon';\nimport {\n NotificationCounter,\n NotificationCounterProps,\n} from 'components/NotificationCounter/notificationCounter.component';\nimport { TabIconPosition, TabSize } from './tab.types';\nimport { tabLabelSize, tabNotificationCounterSize } from './tab.records';\nimport { Heading } from 'components/Heading/heading.component';\n\nexport interface TabProps extends Tabs.TriggerProps {\n /** The name of the icon to be displayed. */\n iconName?: IconName;\n /** The position of the icon. */\n iconPosition?: TabIconPosition;\n /** The label of the tab. */\n label: string;\n /** Props to customize the notification counter. */\n notificationCounterProps?: Omit<NotificationCounterProps, 'size'>;\n /** Whether to show the notification counter to the right of the label or not. */\n showNotificationCounter?: boolean;\n /**\n * The size of the tab.\n * @default md\n */\n size?: TabSize;\n /** The value of the tab. */\n value: string;\n /** Data test id for the tab. */\n 'data-testid'?: string;\n}\n\nexport const Tab = ({\n iconName,\n iconPosition = 'left',\n label,\n notificationCounterProps,\n showNotificationCounter,\n size = 'md',\n ['data-testid']: dataTestId = 'kibble-tab',\n ...rest\n}: TabProps): React.JSX.Element => {\n return (\n <Tabs.Trigger className=\"Tab\" data-testid={dataTestId} {...rest}>\n {!!iconName && iconPosition === 'left' && (\n <Icon\n className=\"Tab__Icon\"\n data-testid={`${dataTestId}-icon-left`}\n name={iconName}\n size={size}\n variant=\"default\"\n />\n )}\n <Heading as=\"span\" className=\"Tab__Label\" data-testid={`${dataTestId}-label`} size={tabLabelSize[size]}>\n {label}\n </Heading>\n {!!iconName && iconPosition === 'right' && (\n <Icon className=\"Tab__Icon\" data-testid={`${dataTestId}-icon-right`} name={iconName} size={size} />\n )}\n {showNotificationCounter && (\n <NotificationCounter\n className=\"Tab__NotificationCounter\"\n data-testid={`${dataTestId}-notification-counter`}\n {...notificationCounterProps}\n size={tabNotificationCounterSize[size]}\n />\n )}\n </Tabs.Trigger>\n );\n};\n","import React from 'react';\nimport { Tabs as CTabs } from '@chakra-ui/react/tabs';\nimport { TabSize } from './components/Tab/tab.types';\nimport { Tab, TabProps } from './components/Tab/tab.component';\nimport { Alignment } from 'shared/types/alignment';\nimport { Box } from 'chakra';\n\nexport interface TabsProps extends Omit<CTabs.RootProps, 'onChange' | 'variant'> {\n /** Alignment of the tabs. */\n align?: Alignment;\n /** Callback function when the tab changes. */\n onChange?: (value: string) => void;\n /**\n * When true, the tab list scrolls horizontally instead of wrapping or overflowing.\n * @default false\n */\n scrollable?: boolean;\n /**\n * Size of the tabs.\n * @default md\n */\n size?: TabSize;\n /** Array of tabs. Each tab should have a value prop. */\n tabs: TabProps[];\n /** Array of tab contents, each tab content should have a value prop that matches the value of their corresponding tab. */\n tabsContent?: CTabs.ContentProps[];\n /**\n * Data test id for the tabs.\n * @default kibble-tabs\n */\n 'data-testid'?: string;\n /** The current value of the tabs. */\n value?: string | null;\n}\n\nexport const Tabs = ({\n align = 'start',\n onChange,\n scrollable = false,\n size = 'md',\n tabs,\n tabsContent,\n ['data-testid']: dataTestId = 'kibble-tabs',\n ...rest\n}: TabsProps): React.JSX.Element => {\n const tabList = (\n <CTabs.List className=\"Tabs__List\" data-testid={`${dataTestId}-trigger-list`}>\n {tabs.map((tab, index) => (\n <Tab\n key={`tab-${index}`}\n {...tab}\n data-testid={`${dataTestId}-trigger-${tab.value}`}\n size={size}\n {...(scrollable && { style: { flexShrink: 0 } })}\n />\n ))}\n </CTabs.List>\n );\n\n return (\n <CTabs.Root\n className=\"Tabs\"\n data-testid={dataTestId}\n justify={align || rest.justify}\n size={size}\n onValueChange={({ value }) => onChange?.(value)}\n {...rest}\n >\n {scrollable ? (\n <Box overflowX=\"auto\" scrollbarWidth=\"none\">\n {tabList}\n </Box>\n ) : (\n tabList\n )}\n {!!tabsContent &&\n tabsContent.map((tabContent, index) => (\n <CTabs.Content\n key={`${dataTestId}-tabContent-${index}`}\n data-testid={`${dataTestId}-content-${tabs[index].value}`}\n {...tabContent}\n />\n ))}\n </CTabs.Root>\n );\n};\n","export const tabSizes = ['xs', 'sm', 'md', 'lg'] as const;\nexport type TabSize = (typeof tabSizes)[number];\n\nexport const tabIconPositions = ['left', 'right'] as const;\nexport type TabIconPosition = (typeof tabIconPositions)[number];\n"],"names":["useDebounce","value","delay","debouncedValue","setDebouncedValue","useState","useEffect","timer","TabsProvider","useTabsContext","createContext","TabContent","forwardRef","props","ref","contentProps","localProps","createSplitProps","tabs","renderStrategyProps","useRenderStrategyPropsContext","presence","usePresence","mergedProps","mergeProps","jsx","PresenceProvider","ark","composeRefs","TabIndicator","TabList","TabTrigger","tabProps","anatomy","createAnatomy","parts","getRootId","ctx","getListId","getContentId","id","getTriggerId","getIndicatorId","getListEl","getContentEl","getTriggerEl","getIndicatorEl","getElements","selector","queryAll","getFirstTriggerEl","first","getLastTriggerEl","last","getNextTriggerEl","opts","nextById","getPrevTriggerEl","prevById","getOffsetRect","el","getRectById","tab","itemById","resolveRect","rect","connect","service","normalize","state","send","context","prop","scope","translations","focused","isVertical","isHorizontal","composite","getTriggerState","props2","fromValue","dataAttr","event","isSelfTarget","isComposingEvent","keyMap","key","getEventKey","exec","disabled","triggerState","isOpeningInNewTab","isSafari","selected","indicatorRect","indicatorTransition","createMachine","setup","machine","details","clickIfLink","bindable","track","action","raf","focusedValue","flush","nullable","triggerEl","contentEl","getFocusables","refs","cleanup","nextTick","indicatorEl","indicatorCleanup","trackElementRect","rects","isAnchorElement","createProps","useTabs","useId","getRootNode","useEnvironmentContext","dir","useLocaleContext","machineProps","useMachine","tabs.machine","tabs.connect","normalizeProps","TabsRoot","tabsProps","splitRenderStrategyProps","useTabsProps","localprops","RenderStrategyPropsProvider","TabsRootProvider","withProvider","withContext","createSlotRecipeContext","Tabs.RootProvider","Tabs.Root","TabsTrigger","Tabs.Trigger","TabsContent","Tabs.Content","TabsList","Tabs.List","Tabs.Indicator","tabNotificationCounterSize","tabLabelSize","Tab","iconName","iconPosition","label","notificationCounterProps","showNotificationCounter","size","dataTestId","rest","jsxs","Icon","Heading","NotificationCounter","Tabs","align","onChange","scrollable","tabsContent","tabList","CTabs.List","index","CTabs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