@raystack/apsara 1.0.0-rc.1 → 1.0.0-rc.2

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 (88) hide show
  1. package/dist/components/alert-dialog/alert-dialog.cjs +2 -1
  2. package/dist/components/alert-dialog/alert-dialog.cjs.map +1 -1
  3. package/dist/components/alert-dialog/alert-dialog.d.ts +10 -9
  4. package/dist/components/alert-dialog/alert-dialog.d.ts.map +1 -1
  5. package/dist/components/alert-dialog/alert-dialog.js +2 -1
  6. package/dist/components/alert-dialog/alert-dialog.js.map +1 -1
  7. package/dist/components/calendar/calendar.cjs +1 -1
  8. package/dist/components/calendar/calendar.cjs.map +1 -1
  9. package/dist/components/calendar/calendar.d.ts.map +1 -1
  10. package/dist/components/calendar/calendar.js +1 -1
  11. package/dist/components/calendar/calendar.js.map +1 -1
  12. package/dist/components/calendar/date-picker.cjs +1 -1
  13. package/dist/components/calendar/date-picker.cjs.map +1 -1
  14. package/dist/components/calendar/date-picker.js +1 -1
  15. package/dist/components/calendar/date-picker.js.map +1 -1
  16. package/dist/components/combobox/combobox.cjs +4 -1
  17. package/dist/components/combobox/combobox.cjs.map +1 -1
  18. package/dist/components/combobox/combobox.d.ts +3 -0
  19. package/dist/components/combobox/combobox.d.ts.map +1 -1
  20. package/dist/components/combobox/combobox.js +4 -1
  21. package/dist/components/combobox/combobox.js.map +1 -1
  22. package/dist/components/data-table/utils/filter-operations.cjs +12 -3
  23. package/dist/components/data-table/utils/filter-operations.cjs.map +1 -1
  24. package/dist/components/data-table/utils/filter-operations.d.ts.map +1 -1
  25. package/dist/components/data-table/utils/filter-operations.js +12 -3
  26. package/dist/components/data-table/utils/filter-operations.js.map +1 -1
  27. package/dist/components/dialog/dialog.cjs +2 -1
  28. package/dist/components/dialog/dialog.cjs.map +1 -1
  29. package/dist/components/dialog/dialog.d.ts +1 -0
  30. package/dist/components/dialog/dialog.d.ts.map +1 -1
  31. package/dist/components/dialog/dialog.js +2 -1
  32. package/dist/components/dialog/dialog.js.map +1 -1
  33. package/dist/components/drawer/drawer-content.cjs +1 -1
  34. package/dist/components/drawer/drawer-content.cjs.map +1 -1
  35. package/dist/components/drawer/drawer-content.d.ts +1 -1
  36. package/dist/components/drawer/drawer-content.d.ts.map +1 -1
  37. package/dist/components/drawer/drawer-content.js +2 -2
  38. package/dist/components/drawer/drawer-content.js.map +1 -1
  39. package/dist/components/drawer/drawer-misc.cjs +2 -2
  40. package/dist/components/drawer/drawer-misc.cjs.map +1 -1
  41. package/dist/components/drawer/drawer-misc.d.ts +1 -1
  42. package/dist/components/drawer/drawer-misc.d.ts.map +1 -1
  43. package/dist/components/drawer/drawer-misc.js +3 -3
  44. package/dist/components/drawer/drawer-misc.js.map +1 -1
  45. package/dist/components/drawer/drawer-root.cjs +1 -1
  46. package/dist/components/drawer/drawer-root.cjs.map +1 -1
  47. package/dist/components/drawer/drawer-root.d.ts +1 -1
  48. package/dist/components/drawer/drawer-root.d.ts.map +1 -1
  49. package/dist/components/drawer/drawer-root.js +2 -2
  50. package/dist/components/drawer/drawer-root.js.map +1 -1
  51. package/dist/components/drawer/drawer.cjs +3 -2
  52. package/dist/components/drawer/drawer.cjs.map +1 -1
  53. package/dist/components/drawer/drawer.d.ts +2 -1
  54. package/dist/components/drawer/drawer.d.ts.map +1 -1
  55. package/dist/components/drawer/drawer.js +4 -3
  56. package/dist/components/drawer/drawer.js.map +1 -1
  57. package/dist/components/flex/flex.d.ts +3 -3
  58. package/dist/components/menu/menu.cjs +3 -1
  59. package/dist/components/menu/menu.cjs.map +1 -1
  60. package/dist/components/menu/menu.d.ts +2 -0
  61. package/dist/components/menu/menu.d.ts.map +1 -1
  62. package/dist/components/menu/menu.js +3 -1
  63. package/dist/components/menu/menu.js.map +1 -1
  64. package/dist/components/popover/popover.cjs +2 -1
  65. package/dist/components/popover/popover.cjs.map +1 -1
  66. package/dist/components/popover/popover.d.ts +1 -0
  67. package/dist/components/popover/popover.d.ts.map +1 -1
  68. package/dist/components/popover/popover.js +2 -1
  69. package/dist/components/popover/popover.js.map +1 -1
  70. package/dist/components/scroll-area/scroll-area-scrollbar.cjs +1 -1
  71. package/dist/components/scroll-area/scroll-area-scrollbar.cjs.map +1 -1
  72. package/dist/components/scroll-area/scroll-area-scrollbar.d.ts.map +1 -1
  73. package/dist/components/scroll-area/scroll-area-scrollbar.js +1 -1
  74. package/dist/components/scroll-area/scroll-area-scrollbar.js.map +1 -1
  75. package/dist/components/text/text.d.ts +2 -2
  76. package/dist/components/text-area/text-area.cjs +1 -1
  77. package/dist/components/text-area/text-area.cjs.map +1 -1
  78. package/dist/components/text-area/text-area.d.ts.map +1 -1
  79. package/dist/components/text-area/text-area.js +1 -1
  80. package/dist/components/text-area/text-area.js.map +1 -1
  81. package/dist/components/tooltip/tooltip.cjs +2 -1
  82. package/dist/components/tooltip/tooltip.cjs.map +1 -1
  83. package/dist/components/tooltip/tooltip.d.ts +1 -0
  84. package/dist/components/tooltip/tooltip.d.ts.map +1 -1
  85. package/dist/components/tooltip/tooltip.js +2 -1
  86. package/dist/components/tooltip/tooltip.js.map +1 -1
  87. package/dist/style.css +1 -1
  88. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"filter-operations.js","sources":["../../../../components/data-table/utils/filter-operations.tsx"],"sourcesContent":["import type { FilterFn } from '@tanstack/table-core';\nimport dayjs from 'dayjs';\nimport isSameOrAfter from 'dayjs/plugin/isSameOrAfter';\nimport isSameOrBefore from 'dayjs/plugin/isSameOrBefore';\n\nimport {\n DataTableFilterOperatorTypes,\n DateFilterOperatorType,\n EmptyFilterValue,\n FilterOperatorTypes,\n FilterType,\n FilterTypes,\n FilterValue,\n FilterValueType,\n MultiSelectFilterOperatorType,\n NumberFilterOperatorType,\n SelectFilterOperatorType,\n StringFilterOperatorType\n} from '~/types/filters';\nimport { DataTableFilterValues } from '../data-table.types';\n\ndayjs.extend(isSameOrAfter);\ndayjs.extend(isSameOrBefore);\n\nexport type FilterFunctionsMap = {\n number: Record<NumberFilterOperatorType, FilterFn<unknown>>;\n string: Record<StringFilterOperatorType, FilterFn<unknown>>;\n date: Record<DateFilterOperatorType, FilterFn<unknown>>;\n select: Record<SelectFilterOperatorType, FilterFn<unknown>>;\n multiselect: Record<MultiSelectFilterOperatorType, FilterFn<unknown>>;\n};\n\nexport const filterOperationsMap: FilterFunctionsMap = {\n number: {\n eq: (row, columnId, filterValue: FilterValue, _addMeta) => {\n return Number(row.getValue(columnId)) === Number(filterValue.value);\n },\n neq: (row, columnId, filterValue: FilterValue, _addMeta) => {\n return Number(row.getValue(columnId)) !== Number(filterValue.value);\n },\n lt: (row, columnId, filterValue: FilterValue, _addMeta) => {\n return Number(row.getValue(columnId)) < Number(filterValue.value);\n },\n lte: (row, columnId, filterValue: FilterValue, _addMeta) => {\n return Number(row.getValue(columnId)) <= Number(filterValue.value);\n },\n gt: (row, columnId, filterValue: FilterValue, _addMeta) => {\n return Number(row.getValue(columnId)) > Number(filterValue.value);\n },\n gte: (row, columnId, filterValue: FilterValue, _addMeta) => {\n return Number(row.getValue(columnId)) >= Number(filterValue.value);\n }\n },\n string: {\n eq: (row, columnId, filterValue: FilterValue, _addMeta) => {\n return (\n String(row.getValue(columnId)).toLowerCase() ===\n String(filterValue.value).toLowerCase()\n );\n },\n neq: (row, columnId, filterValue: FilterValue, _addMeta) => {\n return (\n String(row.getValue(columnId)).toLowerCase() !==\n String(filterValue.value).toLowerCase()\n );\n },\n contains: (row, columnId, filterValue: FilterValue, _addMeta) => {\n const columnValue = String(row.getValue(columnId)).toLowerCase();\n const filterStr = String(filterValue.value).toLowerCase();\n return columnValue.includes(filterStr);\n },\n starts_with: (row, columnId, filterValue: FilterValue, _addMeta) => {\n const columnValue = String(row.getValue(columnId)).toLowerCase();\n const filterStr = String(filterValue.value).toLowerCase();\n return columnValue.startsWith(filterStr);\n },\n ends_with: (row, columnId, filterValue: FilterValue, _addMeta) => {\n const columnValue = String(row.getValue(columnId)).toLowerCase();\n const filterStr = String(filterValue.value).toLowerCase();\n return columnValue.endsWith(filterStr);\n }\n },\n date: {\n eq: (row, columnId, filterValue: FilterValue, _addMeta) => {\n return dayjs(row.getValue(columnId)).isSame(\n dayjs(filterValue.date),\n 'day'\n );\n },\n neq: (row, columnId, filterValue: FilterValue, _addMeta) => {\n return !dayjs(row.getValue(columnId)).isSame(\n dayjs(filterValue.date),\n 'day'\n );\n },\n lt: (row, columnId, filterValue: FilterValue, _addMeta) => {\n return dayjs(row.getValue(columnId)).isBefore(\n dayjs(filterValue.date),\n 'day'\n );\n },\n lte: (row, columnId, filterValue: FilterValue, _addMeta) => {\n return dayjs(row.getValue(columnId)).isSameOrBefore(\n dayjs(filterValue.date),\n 'day'\n );\n },\n gt: (row, columnId, filterValue: FilterValue, _addMeta) => {\n return dayjs(row.getValue(columnId)).isAfter(\n dayjs(filterValue.date),\n 'day'\n );\n },\n gte: (row, columnId, filterValue: FilterValue, _addMeta) => {\n return dayjs(row.getValue(columnId)).isSameOrAfter(\n dayjs(filterValue.date),\n 'day'\n );\n }\n },\n select: {\n eq: (row, columnId, filterValue: FilterValue, _addMeta) => {\n if (String(filterValue.value) === EmptyFilterValue) {\n return row.getValue(columnId) === '';\n }\n // Select only supports string values\n return String(row.getValue(columnId)) === String(filterValue.value);\n },\n neq: (row, columnId, filterValue: FilterValue, _addMeta) => {\n if (String(filterValue.value) === EmptyFilterValue) {\n return row.getValue(columnId) !== '';\n }\n // Select only supports string values\n return String(row.getValue(columnId)) !== String(filterValue.value);\n }\n },\n multiselect: {\n in: (row, columnId, filterValue: FilterValue, _addMeta) => {\n if (!Array.isArray(filterValue.value)) return false;\n\n return filterValue.value\n .map(value => (value === EmptyFilterValue ? '' : String(value)))\n .includes(String(row.getValue(columnId)));\n },\n notin: (row, columnId, filterValue: FilterValue, _addMeta) => {\n if (!Array.isArray(filterValue.value)) return false;\n\n return !filterValue.value\n .map(value => (value === EmptyFilterValue ? '' : String(value)))\n .includes(String(row.getValue(columnId)));\n }\n }\n} as const;\n\nexport function getFilterFn<T extends keyof FilterFunctionsMap>(\n type: T,\n operator: FilterOperatorTypes\n) {\n // @ts-expect-error FilterOperatorTypes is union of all possible operators\n return filterOperationsMap[type][operator];\n}\n\nconst handleStringBasedTypes = (\n filterType: FilterTypes,\n value: any,\n operator?: FilterOperatorTypes | DataTableFilterOperatorTypes\n): DataTableFilterValues => {\n switch (filterType) {\n case FilterType.date: {\n const dateValue = dayjs(value);\n return {\n value,\n stringValue: dateValue.isValid() ? dateValue.toISOString() : ''\n };\n }\n case FilterType.select:\n return {\n stringValue: value === EmptyFilterValue ? '' : value,\n value\n };\n case FilterType.multiselect:\n return {\n value,\n stringValue: value\n .map((value: any) =>\n value === EmptyFilterValue ? '' : String(value)\n )\n .join()\n };\n case FilterType.string: {\n // Apply wildcards for ilike operations\n let processedValue = value;\n // Check if we need to apply wildcards (operator could be UI type or already converted to 'ilike')\n if (operator === 'contains') {\n processedValue = `%${value}%`;\n } else if (operator === 'starts_with') {\n processedValue = `${value}%`;\n } else if (operator === 'ends_with') {\n processedValue = `%${value}`;\n } else if (operator === 'ilike') {\n // If already converted to ilike, assume it needs contains-style wildcards\n // unless the value already has wildcards\n if (!value.includes('%')) {\n processedValue = `%${value}%`;\n }\n }\n return {\n stringValue: processedValue,\n value\n };\n }\n default:\n return {\n stringValue: value,\n value\n };\n }\n};\n\nexport const getFilterOperator = ({\n value,\n filterType,\n operator\n}: {\n value: any;\n filterType?: FilterTypes;\n operator: FilterOperatorTypes;\n}): DataTableFilterOperatorTypes => {\n if (value === EmptyFilterValue && filterType === FilterType.select) {\n return 'empty';\n }\n\n // Map string filter operators to ilike for DataTableFilter\n if (\n filterType === FilterType.string &&\n (operator === 'contains' ||\n operator === 'starts_with' ||\n operator === 'ends_with')\n ) {\n return 'ilike';\n }\n\n return operator as DataTableFilterOperatorTypes;\n};\n\nexport const getFilterValue = ({\n value,\n dataType = 'string',\n filterType = FilterType.string,\n operator\n}: {\n value: any;\n dataType?: FilterValueType;\n filterType?: FilterTypes;\n operator?: FilterOperatorTypes | DataTableFilterOperatorTypes;\n}): DataTableFilterValues => {\n if (dataType === 'boolean') {\n return { boolValue: value, value };\n }\n if (dataType === 'number') {\n return { numberValue: value, value };\n }\n\n // Handle string-based types\n return handleStringBasedTypes(filterType, value, operator);\n};\n\nexport const getDataType = ({\n filterType = FilterType.string,\n dataType = 'string'\n}: {\n dataType?: FilterValueType;\n filterType?: FilterTypes;\n}): FilterValueType => {\n switch (filterType) {\n case FilterType.multiselect:\n case FilterType.select:\n return dataType;\n case FilterType.date:\n return 'string';\n default:\n return filterType;\n }\n};\n"],"names":[],"mappings":";;;;;AAqBA,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;AAC5B,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;AAUhB,MAAA,mBAAmB,GAAuB;AACrD,IAAA,MAAM,EAAE;QACN,EAAE,EAAE,CAAC,GAAG,EAAE,QAAQ,EAAE,WAAwB,EAAE,QAAQ,KAAI;AACxD,YAAA,OAAO,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,KAAK,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;SACrE;QACD,GAAG,EAAE,CAAC,GAAG,EAAE,QAAQ,EAAE,WAAwB,EAAE,QAAQ,KAAI;AACzD,YAAA,OAAO,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,KAAK,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;SACrE;QACD,EAAE,EAAE,CAAC,GAAG,EAAE,QAAQ,EAAE,WAAwB,EAAE,QAAQ,KAAI;AACxD,YAAA,OAAO,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,GAAG,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;SACnE;QACD,GAAG,EAAE,CAAC,GAAG,EAAE,QAAQ,EAAE,WAAwB,EAAE,QAAQ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AAE;AACzB,QAAA,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;KACtC;;IAGD,OAAO,sBAAsB,CAAC,UAAU,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;AAC7D,EAAE;AAEW,MAAA,WAAW,GAAG,CAAC,EAC1B,UAAU,GAAG,UAAU,CAAC,MAAM,EAC9B,QAAQ,GAAG,QAAQ,EAIpB,KAAqB;IACpB,QAAQ,UAAU;QAChB,KAAK,UAAU,CAAC,WAAW,CAAC;QAC5B,KAAK,UAAU,CAAC,MAAM;AACpB,YAAA,OAAO,QAAQ,CAAC;QAClB,KAAK,UAAU,CAAC,IAAI;AAClB,YAAA,OAAO,QAAQ,CAAC;AAClB,QAAA;AACE,YAAA,OAAO,UAAU,CAAC;KACrB;AACH;;;;"}
1
+ {"version":3,"file":"filter-operations.js","sources":["../../../../components/data-table/utils/filter-operations.tsx"],"sourcesContent":["import type { FilterFn } from '@tanstack/table-core';\nimport dayjs from 'dayjs';\nimport isSameOrAfter from 'dayjs/plugin/isSameOrAfter.js';\nimport isSameOrBefore from 'dayjs/plugin/isSameOrBefore.js';\n\nimport {\n DataTableFilterOperatorTypes,\n DateFilterOperatorType,\n EmptyFilterValue,\n FilterOperatorTypes,\n FilterType,\n FilterTypes,\n FilterValue,\n FilterValueType,\n MultiSelectFilterOperatorType,\n NumberFilterOperatorType,\n SelectFilterOperatorType,\n StringFilterOperatorType\n} from '~/types/filters';\nimport { DataTableFilterValues } from '../data-table.types';\n\ndayjs.extend(isSameOrAfter);\ndayjs.extend(isSameOrBefore);\n\nexport type FilterFunctionsMap = {\n number: Record<NumberFilterOperatorType, FilterFn<unknown>>;\n string: Record<StringFilterOperatorType, FilterFn<unknown>>;\n date: Record<DateFilterOperatorType, FilterFn<unknown>>;\n select: Record<SelectFilterOperatorType, FilterFn<unknown>>;\n multiselect: Record<MultiSelectFilterOperatorType, FilterFn<unknown>>;\n};\n\nexport const filterOperationsMap: FilterFunctionsMap = {\n number: {\n eq: (row, columnId, filterValue: FilterValue, _addMeta) => {\n return Number(row.getValue(columnId)) === Number(filterValue.value);\n },\n neq: (row, columnId, filterValue: FilterValue, _addMeta) => {\n return Number(row.getValue(columnId)) !== Number(filterValue.value);\n },\n lt: (row, columnId, filterValue: FilterValue, _addMeta) => {\n return Number(row.getValue(columnId)) < Number(filterValue.value);\n },\n lte: (row, columnId, filterValue: FilterValue, _addMeta) => {\n return Number(row.getValue(columnId)) <= Number(filterValue.value);\n },\n gt: (row, columnId, filterValue: FilterValue, _addMeta) => {\n return Number(row.getValue(columnId)) > Number(filterValue.value);\n },\n gte: (row, columnId, filterValue: FilterValue, _addMeta) => {\n return Number(row.getValue(columnId)) >= Number(filterValue.value);\n }\n },\n string: {\n eq: (row, columnId, filterValue: FilterValue, _addMeta) => {\n return (\n String(row.getValue(columnId)).toLowerCase() ===\n String(filterValue.value).toLowerCase()\n );\n },\n neq: (row, columnId, filterValue: FilterValue, _addMeta) => {\n return (\n String(row.getValue(columnId)).toLowerCase() !==\n String(filterValue.value).toLowerCase()\n );\n },\n contains: (row, columnId, filterValue: FilterValue, _addMeta) => {\n const columnValue = String(row.getValue(columnId)).toLowerCase();\n const filterStr = String(filterValue.value).toLowerCase();\n return columnValue.includes(filterStr);\n },\n starts_with: (row, columnId, filterValue: FilterValue, _addMeta) => {\n const columnValue = String(row.getValue(columnId)).toLowerCase();\n const filterStr = String(filterValue.value).toLowerCase();\n return columnValue.startsWith(filterStr);\n },\n ends_with: (row, columnId, filterValue: FilterValue, _addMeta) => {\n const columnValue = String(row.getValue(columnId)).toLowerCase();\n const filterStr = String(filterValue.value).toLowerCase();\n return columnValue.endsWith(filterStr);\n }\n },\n date: {\n eq: (row, columnId, filterValue: FilterValue, _addMeta) => {\n return dayjs(row.getValue(columnId)).isSame(\n dayjs(filterValue.date),\n 'day'\n );\n },\n neq: (row, columnId, filterValue: FilterValue, _addMeta) => {\n return !dayjs(row.getValue(columnId)).isSame(\n dayjs(filterValue.date),\n 'day'\n );\n },\n lt: (row, columnId, filterValue: FilterValue, _addMeta) => {\n return dayjs(row.getValue(columnId)).isBefore(\n dayjs(filterValue.date),\n 'day'\n );\n },\n lte: (row, columnId, filterValue: FilterValue, _addMeta) => {\n return dayjs(row.getValue(columnId)).isSameOrBefore(\n dayjs(filterValue.date),\n 'day'\n );\n },\n gt: (row, columnId, filterValue: FilterValue, _addMeta) => {\n return dayjs(row.getValue(columnId)).isAfter(\n dayjs(filterValue.date),\n 'day'\n );\n },\n gte: (row, columnId, filterValue: FilterValue, _addMeta) => {\n return dayjs(row.getValue(columnId)).isSameOrAfter(\n dayjs(filterValue.date),\n 'day'\n );\n }\n },\n select: {\n eq: (row, columnId, filterValue: FilterValue, _addMeta) => {\n if (String(filterValue.value) === EmptyFilterValue) {\n return row.getValue(columnId) === '';\n }\n // Select only supports string values\n return String(row.getValue(columnId)) === String(filterValue.value);\n },\n neq: (row, columnId, filterValue: FilterValue, _addMeta) => {\n if (String(filterValue.value) === EmptyFilterValue) {\n return row.getValue(columnId) !== '';\n }\n // Select only supports string values\n return String(row.getValue(columnId)) !== String(filterValue.value);\n }\n },\n multiselect: {\n in: (row, columnId, filterValue: FilterValue, _addMeta) => {\n if (!Array.isArray(filterValue.value)) return false;\n\n return filterValue.value\n .map(value => (value === EmptyFilterValue ? '' : String(value)))\n .includes(String(row.getValue(columnId)));\n },\n notin: (row, columnId, filterValue: FilterValue, _addMeta) => {\n if (!Array.isArray(filterValue.value)) return false;\n\n return !filterValue.value\n .map(value => (value === EmptyFilterValue ? '' : String(value)))\n .includes(String(row.getValue(columnId)));\n }\n }\n} as const;\n\nexport function getFilterFn<T extends keyof FilterFunctionsMap>(\n type: T,\n operator: FilterOperatorTypes\n) {\n // @ts-expect-error FilterOperatorTypes is union of all possible operators\n return filterOperationsMap[type][operator];\n}\n\nconst handleStringBasedTypes = (\n filterType: FilterTypes,\n value: any,\n operator?: FilterOperatorTypes | DataTableFilterOperatorTypes\n): DataTableFilterValues => {\n switch (filterType) {\n case FilterType.date: {\n const dateValue = dayjs(value);\n let stringValue = '';\n if (dateValue.isValid()) {\n try {\n stringValue = dateValue.toISOString();\n } catch {\n stringValue = '';\n }\n }\n return {\n value,\n stringValue\n };\n }\n case FilterType.select:\n return {\n stringValue: value === EmptyFilterValue ? '' : value,\n value\n };\n case FilterType.multiselect:\n return {\n value,\n stringValue: value\n .map((value: any) =>\n value === EmptyFilterValue ? '' : String(value)\n )\n .join()\n };\n case FilterType.string: {\n // Apply wildcards for ilike operations\n let processedValue = value;\n // Check if we need to apply wildcards (operator could be UI type or already converted to 'ilike')\n if (operator === 'contains') {\n processedValue = `%${value}%`;\n } else if (operator === 'starts_with') {\n processedValue = `${value}%`;\n } else if (operator === 'ends_with') {\n processedValue = `%${value}`;\n } else if (operator === 'ilike') {\n // If already converted to ilike, assume it needs contains-style wildcards\n // unless the value already has wildcards\n if (!value.includes('%')) {\n processedValue = `%${value}%`;\n }\n }\n return {\n stringValue: processedValue,\n value\n };\n }\n default:\n return {\n stringValue: value,\n value\n };\n }\n};\n\nexport const getFilterOperator = ({\n value,\n filterType,\n operator\n}: {\n value: any;\n filterType?: FilterTypes;\n operator: FilterOperatorTypes;\n}): DataTableFilterOperatorTypes => {\n if (value === EmptyFilterValue && filterType === FilterType.select) {\n return 'empty';\n }\n\n // Map string filter operators to ilike for DataTableFilter\n if (\n filterType === FilterType.string &&\n (operator === 'contains' ||\n operator === 'starts_with' ||\n operator === 'ends_with')\n ) {\n return 'ilike';\n }\n\n return operator as DataTableFilterOperatorTypes;\n};\n\nexport const getFilterValue = ({\n value,\n dataType = 'string',\n filterType = FilterType.string,\n operator\n}: {\n value: any;\n dataType?: FilterValueType;\n filterType?: FilterTypes;\n operator?: FilterOperatorTypes | DataTableFilterOperatorTypes;\n}): DataTableFilterValues => {\n if (dataType === 'boolean') {\n return { boolValue: value, value };\n }\n if (dataType === 'number') {\n return { numberValue: value, value };\n }\n\n // Handle string-based types\n return handleStringBasedTypes(filterType, value, operator);\n};\n\nexport const getDataType = ({\n filterType = FilterType.string,\n dataType = 'string'\n}: {\n dataType?: FilterValueType;\n filterType?: FilterTypes;\n}): FilterValueType => {\n switch (filterType) {\n case FilterType.multiselect:\n case FilterType.select:\n return dataType;\n case FilterType.date:\n return 'string';\n default:\n return filterType;\n }\n};\n"],"names":[],"mappings":";;;;;AAqBA,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;AAC5B,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;AAUhB,MAAA,mBAAmB,GAAuB;AACrD,IAAA,MAAM,EAAE;QACN,EAAE,EAAE,CAAC,GAAG,EAAE,QAAQ,EAAE,WAAwB,EAAE,QAAQ,KAAI;AACxD,YAAA,OAAO,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,KAAK,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;SACrE;QACD,GAAG,EAAE,CAAC,GAAG,EAAE,QAAQ,EAAE,WAAwB,EAAE,QAAQ,KAAI;AACzD,YAAA,OAAO,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,KAAK,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;SACrE;QACD,EAAE,EAAE,CAAC,GAAG,EAAE,QAAQ,EAAE,WAAwB,EAAE,QAAQ,KAAI;AACxD,YAAA,OAAO,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,GAAG,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;SACnE;QACD,GAAG,EAAE,CAAC,GAAG,EAAE,QAAQ,EAAE,WAAwB,EAAE,QAAQ,KAAI;AACzD,YAAA,OAAO,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,IAAI,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;SACpE;QACD,EAAE,EAAE,CAAC,GAAG,EAAE,QAAQ,EAAE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AE,KAAK,EAAE,KAAK,EAAE,CAAC;KACtC;;IAGD,OAAO,sBAAsB,CAAC,UAAU,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;AAC7D,EAAE;AAEW,MAAA,WAAW,GAAG,CAAC,EAC1B,UAAU,GAAG,UAAU,CAAC,MAAM,EAC9B,QAAQ,GAAG,QAAQ,EAIpB,KAAqB;IACpB,QAAQ,UAAU;QAChB,KAAK,UAAU,CAAC,WAAW,CAAC;QAC5B,KAAK,UAAU,CAAC,MAAM;AACpB,YAAA,OAAO,QAAQ,CAAC;QAClB,KAAK,UAAU,CAAC,IAAI;AAClB,YAAA,OAAO,QAAQ,CAAC;AAClB,QAAA;AACE,YAAA,OAAO,UAAU,CAAC;KACrB;AACH;;;;"}
@@ -13,7 +13,8 @@ const Dialog = Object.assign(react.Dialog.Root, {
13
13
  Close: react.Dialog.Close,
14
14
  CloseButton: dialogMisc.CloseButton,
15
15
  Title: dialogMisc.DialogTitle,
16
- Description: dialogMisc.DialogDescription
16
+ Description: dialogMisc.DialogDescription,
17
+ createHandle: react.Dialog.createHandle
17
18
  });
18
19
 
19
20
  exports.Dialog = Dialog;
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.cjs","sources":["../../../components/dialog/dialog.tsx"],"sourcesContent":["import { Dialog as DialogPrimitive } from '@base-ui/react';\nimport { DialogContent } from './dialog-content';\nimport {\n CloseButton,\n DialogBody,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle\n} from './dialog-misc';\n\nexport const Dialog = Object.assign(DialogPrimitive.Root, {\n Header: DialogHeader,\n Footer: DialogFooter,\n Body: DialogBody,\n Trigger: DialogPrimitive.Trigger,\n Content: DialogContent,\n Close: DialogPrimitive.Close,\n CloseButton: CloseButton,\n Title: DialogTitle,\n Description: DialogDescription\n});\n"],"names":["DialogPrimitive","DialogHeader","DialogFooter","DialogBody","DialogContent","CloseButton","DialogTitle","DialogDescription"],"mappings":";;;;;;AAWa,MAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAACA,YAAe,CAAC,IAAI,EAAE;AACxD,IAAA,MAAM,EAAEC,uBAAY;AACpB,IAAA,MAAM,EAAEC,uBAAY;AACpB,IAAA,IAAI,EAAEC,qBAAU;IAChB,OAAO,EAAEH,YAAe,CAAC,OAAO;AAChC,IAAA,OAAO,EAAEI,2BAAa;IACtB,KAAK,EAAEJ,YAAe,CAAC,KAAK;AAC5B,IAAA,WAAW,EAAEK,sBAAW;AACxB,IAAA,KAAK,EAAEC,sBAAW;AAClB,IAAA,WAAW,EAAEC,4BAAiB;AAC/B,CAAA;;;;"}
1
+ {"version":3,"file":"dialog.cjs","sources":["../../../components/dialog/dialog.tsx"],"sourcesContent":["import { Dialog as DialogPrimitive } from '@base-ui/react';\nimport { DialogContent } from './dialog-content';\nimport {\n CloseButton,\n DialogBody,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle\n} from './dialog-misc';\n\nexport const Dialog = Object.assign(DialogPrimitive.Root, {\n Header: DialogHeader,\n Footer: DialogFooter,\n Body: DialogBody,\n Trigger: DialogPrimitive.Trigger,\n Content: DialogContent,\n Close: DialogPrimitive.Close,\n CloseButton: CloseButton,\n Title: DialogTitle,\n Description: DialogDescription,\n createHandle: DialogPrimitive.createHandle\n});\n"],"names":["DialogPrimitive","DialogHeader","DialogFooter","DialogBody","DialogContent","CloseButton","DialogTitle","DialogDescription"],"mappings":";;;;;;AAWa,MAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAACA,YAAe,CAAC,IAAI,EAAE;AACxD,IAAA,MAAM,EAAEC,uBAAY;AACpB,IAAA,MAAM,EAAEC,uBAAY;AACpB,IAAA,IAAI,EAAEC,qBAAU;IAChB,OAAO,EAAEH,YAAe,CAAC,OAAO;AAChC,IAAA,OAAO,EAAEI,2BAAa;IACtB,KAAK,EAAEJ,YAAe,CAAC,KAAK;AAC5B,IAAA,WAAW,EAAEK,sBAAW;AACxB,IAAA,KAAK,EAAEC,sBAAW;AAClB,IAAA,WAAW,EAAEC,4BAAiB;IAC9B,YAAY,EAAEP,YAAe,CAAC,YAAY;AAC3C,CAAA;;;;"}
@@ -11,5 +11,6 @@ export declare const Dialog: typeof DialogPrimitive.Root & {
11
11
  CloseButton: typeof CloseButton;
12
12
  Title: typeof DialogTitle;
13
13
  Description: typeof DialogDescription;
14
+ createHandle: typeof DialogPrimitive.createHandle;
14
15
  };
15
16
  //# sourceMappingURL=dialog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../components/dialog/dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EACL,WAAW,EACX,UAAU,EACV,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,WAAW,EACZ,MAAM,eAAe,CAAC;AAEvB,eAAO,MAAM,MAAM;;;;;;;;;;CAUjB,CAAC"}
1
+ {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../components/dialog/dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EACL,WAAW,EACX,UAAU,EACV,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,WAAW,EACZ,MAAM,eAAe,CAAC;AAEvB,eAAO,MAAM,MAAM;;;;;;;;;;;CAWjB,CAAC"}
@@ -11,7 +11,8 @@ const Dialog = Object.assign(Dialog$1.Root, {
11
11
  Close: Dialog$1.Close,
12
12
  CloseButton: CloseButton,
13
13
  Title: DialogTitle,
14
- Description: DialogDescription
14
+ Description: DialogDescription,
15
+ createHandle: Dialog$1.createHandle
15
16
  });
16
17
 
17
18
  export { Dialog };
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.js","sources":["../../../components/dialog/dialog.tsx"],"sourcesContent":["import { Dialog as DialogPrimitive } from '@base-ui/react';\nimport { DialogContent } from './dialog-content';\nimport {\n CloseButton,\n DialogBody,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle\n} from './dialog-misc';\n\nexport const Dialog = Object.assign(DialogPrimitive.Root, {\n Header: DialogHeader,\n Footer: DialogFooter,\n Body: DialogBody,\n Trigger: DialogPrimitive.Trigger,\n Content: DialogContent,\n Close: DialogPrimitive.Close,\n CloseButton: CloseButton,\n Title: DialogTitle,\n Description: DialogDescription\n});\n"],"names":["DialogPrimitive"],"mappings":";;;;AAWa,MAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAACA,QAAe,CAAC,IAAI,EAAE;AACxD,IAAA,MAAM,EAAE,YAAY;AACpB,IAAA,MAAM,EAAE,YAAY;AACpB,IAAA,IAAI,EAAE,UAAU;IAChB,OAAO,EAAEA,QAAe,CAAC,OAAO;AAChC,IAAA,OAAO,EAAE,aAAa;IACtB,KAAK,EAAEA,QAAe,CAAC,KAAK;AAC5B,IAAA,WAAW,EAAE,WAAW;AACxB,IAAA,KAAK,EAAE,WAAW;AAClB,IAAA,WAAW,EAAE,iBAAiB;AAC/B,CAAA;;;;"}
1
+ {"version":3,"file":"dialog.js","sources":["../../../components/dialog/dialog.tsx"],"sourcesContent":["import { Dialog as DialogPrimitive } from '@base-ui/react';\nimport { DialogContent } from './dialog-content';\nimport {\n CloseButton,\n DialogBody,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle\n} from './dialog-misc';\n\nexport const Dialog = Object.assign(DialogPrimitive.Root, {\n Header: DialogHeader,\n Footer: DialogFooter,\n Body: DialogBody,\n Trigger: DialogPrimitive.Trigger,\n Content: DialogContent,\n Close: DialogPrimitive.Close,\n CloseButton: CloseButton,\n Title: DialogTitle,\n Description: DialogDescription,\n createHandle: DialogPrimitive.createHandle\n});\n"],"names":["DialogPrimitive"],"mappings":";;;;AAWa,MAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAACA,QAAe,CAAC,IAAI,EAAE;AACxD,IAAA,MAAM,EAAE,YAAY;AACpB,IAAA,MAAM,EAAE,YAAY;AACpB,IAAA,IAAI,EAAE,UAAU;IAChB,OAAO,EAAEA,QAAe,CAAC,OAAO;AAChC,IAAA,OAAO,EAAE,aAAa;IACtB,KAAK,EAAEA,QAAe,CAAC,KAAK;AAC5B,IAAA,WAAW,EAAE,WAAW;AACxB,IAAA,KAAK,EAAE,WAAW;AAClB,IAAA,WAAW,EAAE,iBAAiB;IAC9B,YAAY,EAAEA,QAAe,CAAC,YAAY;AAC3C,CAAA;;;;"}
@@ -21,7 +21,7 @@ const drawerPopup = classVarianceAuthority.cva(drawer_module.default.drawerPopup
21
21
  }
22
22
  });
23
23
  function DrawerContent({ className, children, side = 'right', showCloseButton = true, overlayProps, ...props }) {
24
- return (jsxRuntime.jsxs(drawer.DrawerPreview.Portal, { children: [jsxRuntime.jsx(drawer.DrawerPreview.Backdrop, { ...overlayProps, className: classVarianceAuthority.cx(drawer_module.default.backdrop, overlayProps?.className) }), jsxRuntime.jsx(drawer.DrawerPreview.Viewport, { className: drawer_module.default.viewport, children: jsxRuntime.jsx(drawer.DrawerPreview.Popup, { className: drawerPopup({ side, className }), "aria-label": 'Drawer', ...props, children: jsxRuntime.jsxs(drawer.DrawerPreview.Content, { className: drawer_module.default.content, children: [children, showCloseButton && (jsxRuntime.jsx(drawer.DrawerPreview.Close, { className: drawer_module.default.close, "aria-label": 'Close Drawer', children: jsxRuntime.jsx(reactIcons.Cross1Icon, { "aria-hidden": 'true' }) }))] }) }) })] }));
24
+ return (jsxRuntime.jsxs(drawer.Drawer.Portal, { children: [jsxRuntime.jsx(drawer.Drawer.Backdrop, { ...overlayProps, className: classVarianceAuthority.cx(drawer_module.default.backdrop, overlayProps?.className) }), jsxRuntime.jsx(drawer.Drawer.Viewport, { className: drawer_module.default.viewport, children: jsxRuntime.jsx(drawer.Drawer.Popup, { className: drawerPopup({ side, className }), "aria-label": 'Drawer', ...props, children: jsxRuntime.jsxs(drawer.Drawer.Content, { className: drawer_module.default.content, children: [children, showCloseButton && (jsxRuntime.jsx(drawer.Drawer.Close, { className: drawer_module.default.close, "aria-label": 'Close Drawer', children: jsxRuntime.jsx(reactIcons.Cross1Icon, { "aria-hidden": 'true' }) }))] }) }) })] }));
25
25
  }
26
26
  DrawerContent.displayName = 'Drawer.Content';
27
27
 
@@ -1 +1 @@
1
- {"version":3,"file":"drawer-content.cjs","sources":["../../../components/drawer/drawer-content.tsx"],"sourcesContent":["'use client';\n\nimport { DrawerPreview as DrawerPrimitive } from '@base-ui/react/drawer';\nimport { Cross1Icon } from '@radix-ui/react-icons';\nimport { cva, cx, type VariantProps } from 'class-variance-authority';\nimport { ReactNode } from 'react';\nimport styles from './drawer.module.css';\n\nconst drawerPopup = cva(styles.drawerPopup, {\n variants: {\n side: {\n top: styles['drawerPopup-top'],\n bottom: styles['drawerPopup-bottom'],\n left: styles['drawerPopup-left'],\n right: styles['drawerPopup-right']\n }\n },\n defaultVariants: {\n side: 'right'\n }\n});\n\nexport interface DrawerContentProps\n extends Omit<DrawerPrimitive.Popup.Props, 'children'>,\n VariantProps<typeof drawerPopup> {\n showCloseButton?: boolean;\n overlayProps?: DrawerPrimitive.Backdrop.Props;\n children?: ReactNode;\n}\n\nexport function DrawerContent({\n className,\n children,\n side = 'right',\n showCloseButton = true,\n overlayProps,\n ...props\n}: DrawerContentProps) {\n return (\n <DrawerPrimitive.Portal>\n <DrawerPrimitive.Backdrop\n {...overlayProps}\n className={cx(styles.backdrop, overlayProps?.className)}\n />\n <DrawerPrimitive.Viewport className={styles.viewport}>\n <DrawerPrimitive.Popup\n className={drawerPopup({ side, className })}\n aria-label='Drawer'\n {...props}\n >\n <DrawerPrimitive.Content className={styles.content}>\n {children}\n {showCloseButton && (\n <DrawerPrimitive.Close\n className={styles.close}\n aria-label='Close Drawer'\n >\n <Cross1Icon aria-hidden='true' />\n </DrawerPrimitive.Close>\n )}\n </DrawerPrimitive.Content>\n </DrawerPrimitive.Popup>\n </DrawerPrimitive.Viewport>\n </DrawerPrimitive.Portal>\n );\n}\nDrawerContent.displayName = 'Drawer.Content';\n"],"names":[],"mappings":";;;;;;;;;AAQA;AACE;AACE;AACE;AACA;AACA;AACA;AACD;AACF;AACD;AACE;AACD;AACF;AAUK;;AAmCN;AACA;;"}
1
+ {"version":3,"file":"drawer-content.cjs","sources":["../../../components/drawer/drawer-content.tsx"],"sourcesContent":["'use client';\n\nimport { Drawer as DrawerPrimitive } from '@base-ui/react/drawer';\nimport { Cross1Icon } from '@radix-ui/react-icons';\nimport { cva, cx, type VariantProps } from 'class-variance-authority';\nimport { ReactNode } from 'react';\nimport styles from './drawer.module.css';\n\nconst drawerPopup = cva(styles.drawerPopup, {\n variants: {\n side: {\n top: styles['drawerPopup-top'],\n bottom: styles['drawerPopup-bottom'],\n left: styles['drawerPopup-left'],\n right: styles['drawerPopup-right']\n }\n },\n defaultVariants: {\n side: 'right'\n }\n});\n\nexport interface DrawerContentProps\n extends Omit<DrawerPrimitive.Popup.Props, 'children'>,\n VariantProps<typeof drawerPopup> {\n showCloseButton?: boolean;\n overlayProps?: DrawerPrimitive.Backdrop.Props;\n children?: ReactNode;\n}\n\nexport function DrawerContent({\n className,\n children,\n side = 'right',\n showCloseButton = true,\n overlayProps,\n ...props\n}: DrawerContentProps) {\n return (\n <DrawerPrimitive.Portal>\n <DrawerPrimitive.Backdrop\n {...overlayProps}\n className={cx(styles.backdrop, overlayProps?.className)}\n />\n <DrawerPrimitive.Viewport className={styles.viewport}>\n <DrawerPrimitive.Popup\n className={drawerPopup({ side, className })}\n aria-label='Drawer'\n {...props}\n >\n <DrawerPrimitive.Content className={styles.content}>\n {children}\n {showCloseButton && (\n <DrawerPrimitive.Close\n className={styles.close}\n aria-label='Close Drawer'\n >\n <Cross1Icon aria-hidden='true' />\n </DrawerPrimitive.Close>\n )}\n </DrawerPrimitive.Content>\n </DrawerPrimitive.Popup>\n </DrawerPrimitive.Viewport>\n </DrawerPrimitive.Portal>\n );\n}\nDrawerContent.displayName = 'Drawer.Content';\n"],"names":[],"mappings":";;;;;;;;;AAQA;AACE;AACE;AACE;AACA;AACA;AACA;AACD;AACF;AACD;AACE;AACD;AACF;AAUK;;AAmCN;AACA;;"}
@@ -1,4 +1,4 @@
1
- import { DrawerPreview as DrawerPrimitive } from '@base-ui/react/drawer';
1
+ import { Drawer as DrawerPrimitive } from '@base-ui/react/drawer';
2
2
  import { type VariantProps } from 'class-variance-authority';
3
3
  import { ReactNode } from 'react';
4
4
  declare const drawerPopup: (props?: ({
@@ -1 +1 @@
1
- {"version":3,"file":"drawer-content.d.ts","sourceRoot":"","sources":["../../../components/drawer/drawer-content.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGlC,QAAA,MAAM,WAAW;;8EAYf,CAAC;AAEH,MAAM,WAAW,kBACf,SAAQ,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,EACnD,YAAY,CAAC,OAAO,WAAW,CAAC;IAClC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,YAAY,CAAC,EAAE,eAAe,CAAC,QAAQ,CAAC,KAAK,CAAC;IAC9C,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,wBAAgB,aAAa,CAAC,EAC5B,SAAS,EACT,QAAQ,EACR,IAAc,EACd,eAAsB,EACtB,YAAY,EACZ,GAAG,KAAK,EACT,EAAE,kBAAkB,2CA4BpB;yBAnCe,aAAa"}
1
+ {"version":3,"file":"drawer-content.d.ts","sourceRoot":"","sources":["../../../components/drawer/drawer-content.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAElE,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGlC,QAAA,MAAM,WAAW;;8EAYf,CAAC;AAEH,MAAM,WAAW,kBACf,SAAQ,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,EACnD,YAAY,CAAC,OAAO,WAAW,CAAC;IAClC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,YAAY,CAAC,EAAE,eAAe,CAAC,QAAQ,CAAC,KAAK,CAAC;IAC9C,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,wBAAgB,aAAa,CAAC,EAC5B,SAAS,EACT,QAAQ,EACR,IAAc,EACd,eAAsB,EACtB,YAAY,EACZ,GAAG,KAAK,EACT,EAAE,kBAAkB,2CA4BpB;yBAnCe,aAAa"}
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { jsxs, jsx } from 'react/jsx-runtime';
3
- import { DrawerPreview } from '@base-ui/react/drawer';
3
+ import { Drawer } from '@base-ui/react/drawer';
4
4
  import { Cross1Icon } from '@radix-ui/react-icons';
5
5
  import { cva, cx } from 'class-variance-authority';
6
6
  import styles from './drawer.module.css.js';
@@ -19,7 +19,7 @@ const drawerPopup = cva(styles.drawerPopup, {
19
19
  }
20
20
  });
21
21
  function DrawerContent({ className, children, side = 'right', showCloseButton = true, overlayProps, ...props }) {
22
- return (jsxs(DrawerPreview.Portal, { children: [jsx(DrawerPreview.Backdrop, { ...overlayProps, className: cx(styles.backdrop, overlayProps?.className) }), jsx(DrawerPreview.Viewport, { className: styles.viewport, children: jsx(DrawerPreview.Popup, { className: drawerPopup({ side, className }), "aria-label": 'Drawer', ...props, children: jsxs(DrawerPreview.Content, { className: styles.content, children: [children, showCloseButton && (jsx(DrawerPreview.Close, { className: styles.close, "aria-label": 'Close Drawer', children: jsx(Cross1Icon, { "aria-hidden": 'true' }) }))] }) }) })] }));
22
+ return (jsxs(Drawer.Portal, { children: [jsx(Drawer.Backdrop, { ...overlayProps, className: cx(styles.backdrop, overlayProps?.className) }), jsx(Drawer.Viewport, { className: styles.viewport, children: jsx(Drawer.Popup, { className: drawerPopup({ side, className }), "aria-label": 'Drawer', ...props, children: jsxs(Drawer.Content, { className: styles.content, children: [children, showCloseButton && (jsx(Drawer.Close, { className: styles.close, "aria-label": 'Close Drawer', children: jsx(Cross1Icon, { "aria-hidden": 'true' }) }))] }) }) })] }));
23
23
  }
24
24
  DrawerContent.displayName = 'Drawer.Content';
25
25
 
@@ -1 +1 @@
1
- {"version":3,"file":"drawer-content.js","sources":["../../../components/drawer/drawer-content.tsx"],"sourcesContent":["'use client';\n\nimport { DrawerPreview as DrawerPrimitive } from '@base-ui/react/drawer';\nimport { Cross1Icon } from '@radix-ui/react-icons';\nimport { cva, cx, type VariantProps } from 'class-variance-authority';\nimport { ReactNode } from 'react';\nimport styles from './drawer.module.css';\n\nconst drawerPopup = cva(styles.drawerPopup, {\n variants: {\n side: {\n top: styles['drawerPopup-top'],\n bottom: styles['drawerPopup-bottom'],\n left: styles['drawerPopup-left'],\n right: styles['drawerPopup-right']\n }\n },\n defaultVariants: {\n side: 'right'\n }\n});\n\nexport interface DrawerContentProps\n extends Omit<DrawerPrimitive.Popup.Props, 'children'>,\n VariantProps<typeof drawerPopup> {\n showCloseButton?: boolean;\n overlayProps?: DrawerPrimitive.Backdrop.Props;\n children?: ReactNode;\n}\n\nexport function DrawerContent({\n className,\n children,\n side = 'right',\n showCloseButton = true,\n overlayProps,\n ...props\n}: DrawerContentProps) {\n return (\n <DrawerPrimitive.Portal>\n <DrawerPrimitive.Backdrop\n {...overlayProps}\n className={cx(styles.backdrop, overlayProps?.className)}\n />\n <DrawerPrimitive.Viewport className={styles.viewport}>\n <DrawerPrimitive.Popup\n className={drawerPopup({ side, className })}\n aria-label='Drawer'\n {...props}\n >\n <DrawerPrimitive.Content className={styles.content}>\n {children}\n {showCloseButton && (\n <DrawerPrimitive.Close\n className={styles.close}\n aria-label='Close Drawer'\n >\n <Cross1Icon aria-hidden='true' />\n </DrawerPrimitive.Close>\n )}\n </DrawerPrimitive.Content>\n </DrawerPrimitive.Popup>\n </DrawerPrimitive.Viewport>\n </DrawerPrimitive.Portal>\n );\n}\nDrawerContent.displayName = 'Drawer.Content';\n"],"names":[],"mappings":";;;;;;;AAQA;AACE;AACE;AACE;AACA;AACA;AACA;AACD;AACF;AACD;AACE;AACD;AACF;AAUK;;AAmCN;AACA;;"}
1
+ {"version":3,"file":"drawer-content.js","sources":["../../../components/drawer/drawer-content.tsx"],"sourcesContent":["'use client';\n\nimport { Drawer as DrawerPrimitive } from '@base-ui/react/drawer';\nimport { Cross1Icon } from '@radix-ui/react-icons';\nimport { cva, cx, type VariantProps } from 'class-variance-authority';\nimport { ReactNode } from 'react';\nimport styles from './drawer.module.css';\n\nconst drawerPopup = cva(styles.drawerPopup, {\n variants: {\n side: {\n top: styles['drawerPopup-top'],\n bottom: styles['drawerPopup-bottom'],\n left: styles['drawerPopup-left'],\n right: styles['drawerPopup-right']\n }\n },\n defaultVariants: {\n side: 'right'\n }\n});\n\nexport interface DrawerContentProps\n extends Omit<DrawerPrimitive.Popup.Props, 'children'>,\n VariantProps<typeof drawerPopup> {\n showCloseButton?: boolean;\n overlayProps?: DrawerPrimitive.Backdrop.Props;\n children?: ReactNode;\n}\n\nexport function DrawerContent({\n className,\n children,\n side = 'right',\n showCloseButton = true,\n overlayProps,\n ...props\n}: DrawerContentProps) {\n return (\n <DrawerPrimitive.Portal>\n <DrawerPrimitive.Backdrop\n {...overlayProps}\n className={cx(styles.backdrop, overlayProps?.className)}\n />\n <DrawerPrimitive.Viewport className={styles.viewport}>\n <DrawerPrimitive.Popup\n className={drawerPopup({ side, className })}\n aria-label='Drawer'\n {...props}\n >\n <DrawerPrimitive.Content className={styles.content}>\n {children}\n {showCloseButton && (\n <DrawerPrimitive.Close\n className={styles.close}\n aria-label='Close Drawer'\n >\n <Cross1Icon aria-hidden='true' />\n </DrawerPrimitive.Close>\n )}\n </DrawerPrimitive.Content>\n </DrawerPrimitive.Popup>\n </DrawerPrimitive.Viewport>\n </DrawerPrimitive.Portal>\n );\n}\nDrawerContent.displayName = 'Drawer.Content';\n"],"names":[],"mappings":";;;;;;;AAQA;AACE;AACE;AACE;AACA;AACA;AACA;AACD;AACF;AACD;AACE;AACD;AACF;AAUK;;AAmCN;AACA;;"}
@@ -9,11 +9,11 @@ var drawer_module = require('./drawer.module.css.cjs');
9
9
  const DrawerHeader = ({ children, className }) => jsxRuntime.jsx("div", { className: classVarianceAuthority.cx(drawer_module.default.header, className), children: children });
10
10
  DrawerHeader.displayName = 'Drawer.Header';
11
11
  function DrawerTitle({ className, ...props }) {
12
- return (jsxRuntime.jsx(drawer.DrawerPreview.Title, { className: classVarianceAuthority.cx(drawer_module.default.title, className), ...props }));
12
+ return (jsxRuntime.jsx(drawer.Drawer.Title, { className: classVarianceAuthority.cx(drawer_module.default.title, className), ...props }));
13
13
  }
14
14
  DrawerTitle.displayName = 'Drawer.Title';
15
15
  function DrawerDescription({ className, ...props }) {
16
- return (jsxRuntime.jsx(drawer.DrawerPreview.Description, { className: classVarianceAuthority.cx(drawer_module.default.description, className), ...props }));
16
+ return (jsxRuntime.jsx(drawer.Drawer.Description, { className: classVarianceAuthority.cx(drawer_module.default.description, className), ...props }));
17
17
  }
18
18
  DrawerDescription.displayName = 'Drawer.Description';
19
19
  function DrawerBody({ className, ...props }) {
@@ -1 +1 @@
1
- {"version":3,"file":"drawer-misc.cjs","sources":["../../../components/drawer/drawer-misc.tsx"],"sourcesContent":["'use client';\n\nimport { DrawerPreview as DrawerPrimitive } from '@base-ui/react/drawer';\nimport { cx } from 'class-variance-authority';\nimport { ComponentProps, type ReactNode } from 'react';\nimport styles from './drawer.module.css';\n\nexport const DrawerHeader = ({\n children,\n className\n}: {\n children: ReactNode;\n className?: string;\n}) => <div className={cx(styles.header, className)}>{children}</div>;\nDrawerHeader.displayName = 'Drawer.Header';\n\nexport function DrawerTitle({\n className,\n ...props\n}: DrawerPrimitive.Title.Props) {\n return (\n <DrawerPrimitive.Title className={cx(styles.title, className)} {...props} />\n );\n}\nDrawerTitle.displayName = 'Drawer.Title';\n\nexport function DrawerDescription({\n className,\n ...props\n}: DrawerPrimitive.Description.Props) {\n return (\n <DrawerPrimitive.Description\n className={cx(styles.description, className)}\n {...props}\n />\n );\n}\nDrawerDescription.displayName = 'Drawer.Description';\n\nexport function DrawerBody({ className, ...props }: ComponentProps<'div'>) {\n return <div className={cx(styles.body, className)} {...props} />;\n}\nDrawerBody.displayName = 'Drawer.Body';\n\nexport function DrawerFooter({ className, ...props }: ComponentProps<'div'>) {\n return <div className={cx(styles.footer, className)} {...props} />;\n}\nDrawerFooter.displayName = 'Drawer.Footer';\n"],"names":[],"mappings":";;;;;;;;AAOa;AAOb;AAEM;;AAON;AACA;AAEM;;AAUN;AACA;AAEM;AACJ;AACF;AACA;AAEM;AACJ;AACF;AACA;;;;;;"}
1
+ {"version":3,"file":"drawer-misc.cjs","sources":["../../../components/drawer/drawer-misc.tsx"],"sourcesContent":["'use client';\n\nimport { Drawer as DrawerPrimitive } from '@base-ui/react/drawer';\nimport { cx } from 'class-variance-authority';\nimport { ComponentProps, type ReactNode } from 'react';\nimport styles from './drawer.module.css';\n\nexport const DrawerHeader = ({\n children,\n className\n}: {\n children: ReactNode;\n className?: string;\n}) => <div className={cx(styles.header, className)}>{children}</div>;\nDrawerHeader.displayName = 'Drawer.Header';\n\nexport function DrawerTitle({\n className,\n ...props\n}: DrawerPrimitive.Title.Props) {\n return (\n <DrawerPrimitive.Title className={cx(styles.title, className)} {...props} />\n );\n}\nDrawerTitle.displayName = 'Drawer.Title';\n\nexport function DrawerDescription({\n className,\n ...props\n}: DrawerPrimitive.Description.Props) {\n return (\n <DrawerPrimitive.Description\n className={cx(styles.description, className)}\n {...props}\n />\n );\n}\nDrawerDescription.displayName = 'Drawer.Description';\n\nexport function DrawerBody({ className, ...props }: ComponentProps<'div'>) {\n return <div className={cx(styles.body, className)} {...props} />;\n}\nDrawerBody.displayName = 'Drawer.Body';\n\nexport function DrawerFooter({ className, ...props }: ComponentProps<'div'>) {\n return <div className={cx(styles.footer, className)} {...props} />;\n}\nDrawerFooter.displayName = 'Drawer.Footer';\n"],"names":[],"mappings":";;;;;;;;AAOa;AAOb;AAEM;;AAON;AACA;AAEM;;AAUN;AACA;AAEM;AACJ;AACF;AACA;AAEM;AACJ;AACF;AACA;;;;;;"}
@@ -1,4 +1,4 @@
1
- import { DrawerPreview as DrawerPrimitive } from '@base-ui/react/drawer';
1
+ import { Drawer as DrawerPrimitive } from '@base-ui/react/drawer';
2
2
  import { ComponentProps, type ReactNode } from 'react';
3
3
  export declare const DrawerHeader: {
4
4
  ({ children, className }: {
@@ -1 +1 @@
1
- {"version":3,"file":"drawer-misc.d.ts","sourceRoot":"","sources":["../../../components/drawer/drawer-misc.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EAAE,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvD,eAAO,MAAM,YAAY;;kBAIb,SAAS;;;;CAE+C,CAAC;AAGrE,wBAAgB,WAAW,CAAC,EAC1B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,eAAe,CAAC,KAAK,CAAC,KAAK,2CAI7B;yBAPe,WAAW;;;AAU3B,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,eAAe,CAAC,WAAW,CAAC,KAAK,2CAOnC;yBAVe,iBAAiB;;;AAajC,wBAAgB,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,KAAK,CAAC,2CAExE;yBAFe,UAAU;;;AAK1B,wBAAgB,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,KAAK,CAAC,2CAE1E;yBAFe,YAAY"}
1
+ {"version":3,"file":"drawer-misc.d.ts","sourceRoot":"","sources":["../../../components/drawer/drawer-misc.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAElE,OAAO,EAAE,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvD,eAAO,MAAM,YAAY;;kBAIb,SAAS;;;;CAE+C,CAAC;AAGrE,wBAAgB,WAAW,CAAC,EAC1B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,eAAe,CAAC,KAAK,CAAC,KAAK,2CAI7B;yBAPe,WAAW;;;AAU3B,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,GAAG,KAAK,EACT,EAAE,eAAe,CAAC,WAAW,CAAC,KAAK,2CAOnC;yBAVe,iBAAiB;;;AAajC,wBAAgB,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,KAAK,CAAC,2CAExE;yBAFe,UAAU;;;AAK1B,wBAAgB,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,KAAK,CAAC,2CAE1E;yBAFe,YAAY"}
@@ -1,17 +1,17 @@
1
1
  "use client";
2
2
  import { jsx } from 'react/jsx-runtime';
3
- import { DrawerPreview } from '@base-ui/react/drawer';
3
+ import { Drawer } from '@base-ui/react/drawer';
4
4
  import { cx } from 'class-variance-authority';
5
5
  import styles from './drawer.module.css.js';
6
6
 
7
7
  const DrawerHeader = ({ children, className }) => jsx("div", { className: cx(styles.header, className), children: children });
8
8
  DrawerHeader.displayName = 'Drawer.Header';
9
9
  function DrawerTitle({ className, ...props }) {
10
- return (jsx(DrawerPreview.Title, { className: cx(styles.title, className), ...props }));
10
+ return (jsx(Drawer.Title, { className: cx(styles.title, className), ...props }));
11
11
  }
12
12
  DrawerTitle.displayName = 'Drawer.Title';
13
13
  function DrawerDescription({ className, ...props }) {
14
- return (jsx(DrawerPreview.Description, { className: cx(styles.description, className), ...props }));
14
+ return (jsx(Drawer.Description, { className: cx(styles.description, className), ...props }));
15
15
  }
16
16
  DrawerDescription.displayName = 'Drawer.Description';
17
17
  function DrawerBody({ className, ...props }) {
@@ -1 +1 @@
1
- {"version":3,"file":"drawer-misc.js","sources":["../../../components/drawer/drawer-misc.tsx"],"sourcesContent":["'use client';\n\nimport { DrawerPreview as DrawerPrimitive } from '@base-ui/react/drawer';\nimport { cx } from 'class-variance-authority';\nimport { ComponentProps, type ReactNode } from 'react';\nimport styles from './drawer.module.css';\n\nexport const DrawerHeader = ({\n children,\n className\n}: {\n children: ReactNode;\n className?: string;\n}) => <div className={cx(styles.header, className)}>{children}</div>;\nDrawerHeader.displayName = 'Drawer.Header';\n\nexport function DrawerTitle({\n className,\n ...props\n}: DrawerPrimitive.Title.Props) {\n return (\n <DrawerPrimitive.Title className={cx(styles.title, className)} {...props} />\n );\n}\nDrawerTitle.displayName = 'Drawer.Title';\n\nexport function DrawerDescription({\n className,\n ...props\n}: DrawerPrimitive.Description.Props) {\n return (\n <DrawerPrimitive.Description\n className={cx(styles.description, className)}\n {...props}\n />\n );\n}\nDrawerDescription.displayName = 'Drawer.Description';\n\nexport function DrawerBody({ className, ...props }: ComponentProps<'div'>) {\n return <div className={cx(styles.body, className)} {...props} />;\n}\nDrawerBody.displayName = 'Drawer.Body';\n\nexport function DrawerFooter({ className, ...props }: ComponentProps<'div'>) {\n return <div className={cx(styles.footer, className)} {...props} />;\n}\nDrawerFooter.displayName = 'Drawer.Footer';\n"],"names":[],"mappings":";;;;;;AAOa;AAOb;AAEM;;AAON;AACA;AAEM;;AAUN;AACA;AAEM;AACJ;AACF;AACA;AAEM;AACJ;AACF;AACA;;"}
1
+ {"version":3,"file":"drawer-misc.js","sources":["../../../components/drawer/drawer-misc.tsx"],"sourcesContent":["'use client';\n\nimport { Drawer as DrawerPrimitive } from '@base-ui/react/drawer';\nimport { cx } from 'class-variance-authority';\nimport { ComponentProps, type ReactNode } from 'react';\nimport styles from './drawer.module.css';\n\nexport const DrawerHeader = ({\n children,\n className\n}: {\n children: ReactNode;\n className?: string;\n}) => <div className={cx(styles.header, className)}>{children}</div>;\nDrawerHeader.displayName = 'Drawer.Header';\n\nexport function DrawerTitle({\n className,\n ...props\n}: DrawerPrimitive.Title.Props) {\n return (\n <DrawerPrimitive.Title className={cx(styles.title, className)} {...props} />\n );\n}\nDrawerTitle.displayName = 'Drawer.Title';\n\nexport function DrawerDescription({\n className,\n ...props\n}: DrawerPrimitive.Description.Props) {\n return (\n <DrawerPrimitive.Description\n className={cx(styles.description, className)}\n {...props}\n />\n );\n}\nDrawerDescription.displayName = 'Drawer.Description';\n\nexport function DrawerBody({ className, ...props }: ComponentProps<'div'>) {\n return <div className={cx(styles.body, className)} {...props} />;\n}\nDrawerBody.displayName = 'Drawer.Body';\n\nexport function DrawerFooter({ className, ...props }: ComponentProps<'div'>) {\n return <div className={cx(styles.footer, className)} {...props} />;\n}\nDrawerFooter.displayName = 'Drawer.Footer';\n"],"names":[],"mappings":";;;;;;AAOa;AAOb;AAEM;;AAON;AACA;AAEM;;AAUN;AACA;AAEM;AACJ;AACF;AACA;AAEM;AACJ;AACF;AACA;;"}
@@ -11,7 +11,7 @@ const sideToSwipeDirection = {
11
11
  left: 'left'
12
12
  };
13
13
  function DrawerRoot({ side = 'right', swipeDirection, ...props }) {
14
- return (jsxRuntime.jsx(drawer.DrawerPreview.Root, { swipeDirection: swipeDirection ?? sideToSwipeDirection[side], ...props }));
14
+ return (jsxRuntime.jsx(drawer.Drawer.Root, { swipeDirection: swipeDirection ?? sideToSwipeDirection[side], ...props }));
15
15
  }
16
16
  DrawerRoot.displayName = 'Drawer';
17
17
 
@@ -1 +1 @@
1
- {"version":3,"file":"drawer-root.cjs","sources":["../../../components/drawer/drawer-root.tsx"],"sourcesContent":["'use client';\n\nimport { DrawerPreview as DrawerPrimitive } from '@base-ui/react/drawer';\n\ntype Side = 'top' | 'right' | 'bottom' | 'left';\n\nconst sideToSwipeDirection: Record<\n Side,\n DrawerPrimitive.Root.Props['swipeDirection']\n> = {\n top: 'up',\n right: 'right',\n bottom: 'down',\n left: 'left'\n};\n\nexport interface DrawerRootProps extends DrawerPrimitive.Root.Props {\n /** The direction from which the drawer appears and can be swiped to dismiss. */\n side?: Side;\n}\n\nexport function DrawerRoot({\n side = 'right',\n swipeDirection,\n ...props\n}: DrawerRootProps) {\n return (\n <DrawerPrimitive.Root\n swipeDirection={swipeDirection ?? sideToSwipeDirection[side]}\n {...props}\n />\n );\n}\nDrawerRoot.displayName = 'Drawer';\n"],"names":[],"mappings":";;;;;;AAMA;AAIE;AACA;AACA;AACA;;AAQc;AAKd;AAMF;AACA;;"}
1
+ {"version":3,"file":"drawer-root.cjs","sources":["../../../components/drawer/drawer-root.tsx"],"sourcesContent":["'use client';\n\nimport { Drawer as DrawerPrimitive } from '@base-ui/react/drawer';\n\ntype Side = 'top' | 'right' | 'bottom' | 'left';\n\nconst sideToSwipeDirection: Record<\n Side,\n DrawerPrimitive.Root.Props['swipeDirection']\n> = {\n top: 'up',\n right: 'right',\n bottom: 'down',\n left: 'left'\n};\n\nexport interface DrawerRootProps extends DrawerPrimitive.Root.Props {\n /** The direction from which the drawer appears and can be swiped to dismiss. */\n side?: Side;\n}\n\nexport function DrawerRoot({\n side = 'right',\n swipeDirection,\n ...props\n}: DrawerRootProps) {\n return (\n <DrawerPrimitive.Root\n swipeDirection={swipeDirection ?? sideToSwipeDirection[side]}\n {...props}\n />\n );\n}\nDrawerRoot.displayName = 'Drawer';\n"],"names":[],"mappings":";;;;;;AAMA;AAIE;AACA;AACA;AACA;;AAQc;AAKd;AAMF;AACA;;"}
@@ -1,4 +1,4 @@
1
- import { DrawerPreview as DrawerPrimitive } from '@base-ui/react/drawer';
1
+ import { Drawer as DrawerPrimitive } from '@base-ui/react/drawer';
2
2
  type Side = 'top' | 'right' | 'bottom' | 'left';
3
3
  export interface DrawerRootProps extends DrawerPrimitive.Root.Props {
4
4
  /** The direction from which the drawer appears and can be swiped to dismiss. */
@@ -1 +1 @@
1
- {"version":3,"file":"drawer-root.d.ts","sourceRoot":"","sources":["../../../components/drawer/drawer-root.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAEzE,KAAK,IAAI,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;AAYhD,MAAM,WAAW,eAAgB,SAAQ,eAAe,CAAC,IAAI,CAAC,KAAK;IACjE,gFAAgF;IAChF,IAAI,CAAC,EAAE,IAAI,CAAC;CACb;AAED,wBAAgB,UAAU,CAAC,EACzB,IAAc,EACd,cAAc,EACd,GAAG,KAAK,EACT,EAAE,eAAe,2CAOjB;yBAXe,UAAU"}
1
+ {"version":3,"file":"drawer-root.d.ts","sourceRoot":"","sources":["../../../components/drawer/drawer-root.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAElE,KAAK,IAAI,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;AAYhD,MAAM,WAAW,eAAgB,SAAQ,eAAe,CAAC,IAAI,CAAC,KAAK;IACjE,gFAAgF;IAChF,IAAI,CAAC,EAAE,IAAI,CAAC;CACb;AAED,wBAAgB,UAAU,CAAC,EACzB,IAAc,EACd,cAAc,EACd,GAAG,KAAK,EACT,EAAE,eAAe,2CAOjB;yBAXe,UAAU"}
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { jsx } from 'react/jsx-runtime';
3
- import { DrawerPreview } from '@base-ui/react/drawer';
3
+ import { Drawer } from '@base-ui/react/drawer';
4
4
 
5
5
  const sideToSwipeDirection = {
6
6
  top: 'up',
@@ -9,7 +9,7 @@ const sideToSwipeDirection = {
9
9
  left: 'left'
10
10
  };
11
11
  function DrawerRoot({ side = 'right', swipeDirection, ...props }) {
12
- return (jsx(DrawerPreview.Root, { swipeDirection: swipeDirection ?? sideToSwipeDirection[side], ...props }));
12
+ return (jsx(Drawer.Root, { swipeDirection: swipeDirection ?? sideToSwipeDirection[side], ...props }));
13
13
  }
14
14
  DrawerRoot.displayName = 'Drawer';
15
15
 
@@ -1 +1 @@
1
- {"version":3,"file":"drawer-root.js","sources":["../../../components/drawer/drawer-root.tsx"],"sourcesContent":["'use client';\n\nimport { DrawerPreview as DrawerPrimitive } from '@base-ui/react/drawer';\n\ntype Side = 'top' | 'right' | 'bottom' | 'left';\n\nconst sideToSwipeDirection: Record<\n Side,\n DrawerPrimitive.Root.Props['swipeDirection']\n> = {\n top: 'up',\n right: 'right',\n bottom: 'down',\n left: 'left'\n};\n\nexport interface DrawerRootProps extends DrawerPrimitive.Root.Props {\n /** The direction from which the drawer appears and can be swiped to dismiss. */\n side?: Side;\n}\n\nexport function DrawerRoot({\n side = 'right',\n swipeDirection,\n ...props\n}: DrawerRootProps) {\n return (\n <DrawerPrimitive.Root\n swipeDirection={swipeDirection ?? sideToSwipeDirection[side]}\n {...props}\n />\n );\n}\nDrawerRoot.displayName = 'Drawer';\n"],"names":[],"mappings":";;;;AAMA;AAIE;AACA;AACA;AACA;;AAQc;AAKd;AAMF;AACA;;"}
1
+ {"version":3,"file":"drawer-root.js","sources":["../../../components/drawer/drawer-root.tsx"],"sourcesContent":["'use client';\n\nimport { Drawer as DrawerPrimitive } from '@base-ui/react/drawer';\n\ntype Side = 'top' | 'right' | 'bottom' | 'left';\n\nconst sideToSwipeDirection: Record<\n Side,\n DrawerPrimitive.Root.Props['swipeDirection']\n> = {\n top: 'up',\n right: 'right',\n bottom: 'down',\n left: 'left'\n};\n\nexport interface DrawerRootProps extends DrawerPrimitive.Root.Props {\n /** The direction from which the drawer appears and can be swiped to dismiss. */\n side?: Side;\n}\n\nexport function DrawerRoot({\n side = 'right',\n swipeDirection,\n ...props\n}: DrawerRootProps) {\n return (\n <DrawerPrimitive.Root\n swipeDirection={swipeDirection ?? sideToSwipeDirection[side]}\n {...props}\n />\n );\n}\nDrawerRoot.displayName = 'Drawer';\n"],"names":[],"mappings":";;;;AAMA;AAIE;AACA;AACA;AACA;;AAQc;AAKd;AAMF;AACA;;"}
@@ -6,14 +6,15 @@ var drawerMisc = require('./drawer-misc.cjs');
6
6
  var drawerRoot = require('./drawer-root.cjs');
7
7
 
8
8
  const Drawer = Object.assign(drawerRoot.DrawerRoot, {
9
- Trigger: drawer.DrawerPreview.Trigger,
9
+ Trigger: drawer.Drawer.Trigger,
10
10
  Content: drawerContent.DrawerContent,
11
11
  Header: drawerMisc.DrawerHeader,
12
12
  Title: drawerMisc.DrawerTitle,
13
13
  Description: drawerMisc.DrawerDescription,
14
14
  Body: drawerMisc.DrawerBody,
15
15
  Footer: drawerMisc.DrawerFooter,
16
- Close: drawer.DrawerPreview.Close
16
+ Close: drawer.Drawer.Close,
17
+ createHandle: drawer.Drawer.createHandle
17
18
  });
18
19
 
19
20
  exports.Drawer = Drawer;
@@ -1 +1 @@
1
- {"version":3,"file":"drawer.cjs","sources":["../../../components/drawer/drawer.tsx"],"sourcesContent":["import { DrawerPreview as DrawerPrimitive } from '@base-ui/react/drawer';\nimport { DrawerContent } from './drawer-content';\nimport {\n DrawerBody,\n DrawerDescription,\n DrawerFooter,\n DrawerHeader,\n DrawerTitle\n} from './drawer-misc';\nimport { DrawerRoot } from './drawer-root';\n\nexport type { DrawerContentProps } from './drawer-content';\nexport type { DrawerRootProps } from './drawer-root';\n\nexport const Drawer = Object.assign(DrawerRoot, {\n Trigger: DrawerPrimitive.Trigger,\n Content: DrawerContent,\n Header: DrawerHeader,\n Title: DrawerTitle,\n Description: DrawerDescription,\n Body: DrawerBody,\n Footer: DrawerFooter,\n Close: DrawerPrimitive.Close\n});\n"],"names":["DrawerRoot","DrawerPrimitive","DrawerContent","DrawerHeader","DrawerTitle","DrawerDescription","DrawerBody","DrawerFooter"],"mappings":";;;;;;;MAca,MAAM,GAAG,MAAM,CAAC,MAAM,CAACA,qBAAU,EAAE;IAC9C,OAAO,EAAEC,oBAAe,CAAC,OAAO;AAChC,IAAA,OAAO,EAAEC,2BAAa;AACtB,IAAA,MAAM,EAAEC,uBAAY;AACpB,IAAA,KAAK,EAAEC,sBAAW;AAClB,IAAA,WAAW,EAAEC,4BAAiB;AAC9B,IAAA,IAAI,EAAEC,qBAAU;AAChB,IAAA,MAAM,EAAEC,uBAAY;IACpB,KAAK,EAAEN,oBAAe,CAAC,KAAK;AAC7B,CAAA;;;;"}
1
+ {"version":3,"file":"drawer.cjs","sources":["../../../components/drawer/drawer.tsx"],"sourcesContent":["import { Drawer as DrawerPrimitive } from '@base-ui/react/drawer';\nimport { DrawerContent } from './drawer-content';\nimport {\n DrawerBody,\n DrawerDescription,\n DrawerFooter,\n DrawerHeader,\n DrawerTitle\n} from './drawer-misc';\nimport { DrawerRoot } from './drawer-root';\n\nexport type { DrawerContentProps } from './drawer-content';\nexport type { DrawerRootProps } from './drawer-root';\n\nexport const Drawer = Object.assign(DrawerRoot, {\n Trigger: DrawerPrimitive.Trigger,\n Content: DrawerContent,\n Header: DrawerHeader,\n Title: DrawerTitle,\n Description: DrawerDescription,\n Body: DrawerBody,\n Footer: DrawerFooter,\n Close: DrawerPrimitive.Close,\n createHandle: DrawerPrimitive.createHandle\n});\n"],"names":["DrawerRoot","DrawerPrimitive","DrawerContent","DrawerHeader","DrawerTitle","DrawerDescription","DrawerBody","DrawerFooter"],"mappings":";;;;;;;MAca,MAAM,GAAG,MAAM,CAAC,MAAM,CAACA,qBAAU,EAAE;IAC9C,OAAO,EAAEC,aAAe,CAAC,OAAO;AAChC,IAAA,OAAO,EAAEC,2BAAa;AACtB,IAAA,MAAM,EAAEC,uBAAY;AACpB,IAAA,KAAK,EAAEC,sBAAW;AAClB,IAAA,WAAW,EAAEC,4BAAiB;AAC9B,IAAA,IAAI,EAAEC,qBAAU;AAChB,IAAA,MAAM,EAAEC,uBAAY;IACpB,KAAK,EAAEN,aAAe,CAAC,KAAK;IAC5B,YAAY,EAAEA,aAAe,CAAC,YAAY;AAC3C,CAAA;;;;"}
@@ -1,4 +1,4 @@
1
- import { DrawerPreview as DrawerPrimitive } from '@base-ui/react/drawer';
1
+ import { Drawer as DrawerPrimitive } from '@base-ui/react/drawer';
2
2
  import { DrawerContent } from './drawer-content';
3
3
  import { DrawerBody, DrawerDescription, DrawerFooter, DrawerTitle } from './drawer-misc';
4
4
  import { DrawerRoot } from './drawer-root';
@@ -19,5 +19,6 @@ export declare const Drawer: typeof DrawerRoot & {
19
19
  Body: typeof DrawerBody;
20
20
  Footer: typeof DrawerFooter;
21
21
  Close: DrawerPrimitive.Close;
22
+ createHandle: typeof DrawerPrimitive.createHandle;
22
23
  };
23
24
  //# sourceMappingURL=drawer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../../components/drawer/drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EACL,UAAU,EACV,iBAAiB,EACjB,YAAY,EAEZ,WAAW,EACZ,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,YAAY,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;CASjB,CAAC"}
1
+ {"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../../components/drawer/drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EACL,UAAU,EACV,iBAAiB,EACjB,YAAY,EAEZ,WAAW,EACZ,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,YAAY,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;CAUjB,CAAC"}
@@ -1,17 +1,18 @@
1
- import { DrawerPreview } from '@base-ui/react/drawer';
1
+ import { Drawer as Drawer$1 } from '@base-ui/react/drawer';
2
2
  import { DrawerContent } from './drawer-content.js';
3
3
  import { DrawerHeader, DrawerTitle, DrawerDescription, DrawerBody, DrawerFooter } from './drawer-misc.js';
4
4
  import { DrawerRoot } from './drawer-root.js';
5
5
 
6
6
  const Drawer = Object.assign(DrawerRoot, {
7
- Trigger: DrawerPreview.Trigger,
7
+ Trigger: Drawer$1.Trigger,
8
8
  Content: DrawerContent,
9
9
  Header: DrawerHeader,
10
10
  Title: DrawerTitle,
11
11
  Description: DrawerDescription,
12
12
  Body: DrawerBody,
13
13
  Footer: DrawerFooter,
14
- Close: DrawerPreview.Close
14
+ Close: Drawer$1.Close,
15
+ createHandle: Drawer$1.createHandle
15
16
  });
16
17
 
17
18
  export { Drawer };
@@ -1 +1 @@
1
- {"version":3,"file":"drawer.js","sources":["../../../components/drawer/drawer.tsx"],"sourcesContent":["import { DrawerPreview as DrawerPrimitive } from '@base-ui/react/drawer';\nimport { DrawerContent } from './drawer-content';\nimport {\n DrawerBody,\n DrawerDescription,\n DrawerFooter,\n DrawerHeader,\n DrawerTitle\n} from './drawer-misc';\nimport { DrawerRoot } from './drawer-root';\n\nexport type { DrawerContentProps } from './drawer-content';\nexport type { DrawerRootProps } from './drawer-root';\n\nexport const Drawer = Object.assign(DrawerRoot, {\n Trigger: DrawerPrimitive.Trigger,\n Content: DrawerContent,\n Header: DrawerHeader,\n Title: DrawerTitle,\n Description: DrawerDescription,\n Body: DrawerBody,\n Footer: DrawerFooter,\n Close: DrawerPrimitive.Close\n});\n"],"names":["DrawerPrimitive"],"mappings":";;;;;MAca,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE;IAC9C,OAAO,EAAEA,aAAe,CAAC,OAAO;AAChC,IAAA,OAAO,EAAE,aAAa;AACtB,IAAA,MAAM,EAAE,YAAY;AACpB,IAAA,KAAK,EAAE,WAAW;AAClB,IAAA,WAAW,EAAE,iBAAiB;AAC9B,IAAA,IAAI,EAAE,UAAU;AAChB,IAAA,MAAM,EAAE,YAAY;IACpB,KAAK,EAAEA,aAAe,CAAC,KAAK;AAC7B,CAAA;;;;"}
1
+ {"version":3,"file":"drawer.js","sources":["../../../components/drawer/drawer.tsx"],"sourcesContent":["import { Drawer as DrawerPrimitive } from '@base-ui/react/drawer';\nimport { DrawerContent } from './drawer-content';\nimport {\n DrawerBody,\n DrawerDescription,\n DrawerFooter,\n DrawerHeader,\n DrawerTitle\n} from './drawer-misc';\nimport { DrawerRoot } from './drawer-root';\n\nexport type { DrawerContentProps } from './drawer-content';\nexport type { DrawerRootProps } from './drawer-root';\n\nexport const Drawer = Object.assign(DrawerRoot, {\n Trigger: DrawerPrimitive.Trigger,\n Content: DrawerContent,\n Header: DrawerHeader,\n Title: DrawerTitle,\n Description: DrawerDescription,\n Body: DrawerBody,\n Footer: DrawerFooter,\n Close: DrawerPrimitive.Close,\n createHandle: DrawerPrimitive.createHandle\n});\n"],"names":["DrawerPrimitive"],"mappings":";;;;;MAca,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE;IAC9C,OAAO,EAAEA,QAAe,CAAC,OAAO;AAChC,IAAA,OAAO,EAAE,aAAa;AACtB,IAAA,MAAM,EAAE,YAAY;AACpB,IAAA,KAAK,EAAE,WAAW;AAClB,IAAA,WAAW,EAAE,iBAAiB;AAC9B,IAAA,IAAI,EAAE,UAAU;AAChB,IAAA,MAAM,EAAE,YAAY;IACpB,KAAK,EAAEA,QAAe,CAAC,KAAK;IAC5B,YAAY,EAAEA,QAAe,CAAC,YAAY;AAC3C,CAAA;;;;"}
@@ -2,10 +2,10 @@ import { useRender } from '@base-ui/react';
2
2
  import { VariantProps } from 'class-variance-authority';
3
3
  declare const flex: (props?: ({
4
4
  direction?: "row" | "column" | "rowReverse" | "columnReverse" | null | undefined;
5
- align?: "center" | "start" | "end" | "stretch" | "baseline" | null | undefined;
6
- justify?: "center" | "start" | "end" | "between" | null | undefined;
5
+ align?: "center" | "stretch" | "end" | "start" | "baseline" | null | undefined;
6
+ justify?: "center" | "end" | "start" | "between" | null | undefined;
7
7
  wrap?: "wrap" | "noWrap" | "wrapReverse" | null | undefined;
8
- gap?: "small" | 1 | "extra-small" | "medium" | "large" | "extra-large" | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | null | undefined;
8
+ gap?: "small" | 1 | "medium" | "large" | "extra-small" | "extra-large" | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | null | undefined;
9
9
  width?: "full" | null | undefined;
10
10
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
11
11
  type BoxProps = VariantProps<typeof flex> & useRender.ComponentProps<'div'>;
@@ -1,5 +1,6 @@
1
1
  'use strict';
2
2
 
3
+ var menu = require('@base-ui/react/menu');
3
4
  var menuContent = require('./menu-content.cjs');
4
5
  var menuItem = require('./menu-item.cjs');
5
6
  var menuMisc = require('./menu-misc.cjs');
@@ -16,7 +17,8 @@ const Menu = Object.assign(menuRoot.MenuRoot, {
16
17
  EmptyState: menuMisc.MenuEmptyState,
17
18
  Submenu: menuRoot.MenuSubMenu,
18
19
  SubmenuTrigger: menuTrigger.MenuSubTrigger,
19
- SubmenuContent: menuContent.MenuSubContent
20
+ SubmenuContent: menuContent.MenuSubContent,
21
+ createHandle: menu.Menu.createHandle
20
22
  });
21
23
 
22
24
  exports.Menu = Menu;
@@ -1 +1 @@
1
- {"version":3,"file":"menu.cjs","sources":["../../../components/menu/menu.tsx"],"sourcesContent":["import { MenuContent, MenuSubContent } from './menu-content';\nimport { MenuItem } from './menu-item';\nimport {\n MenuEmptyState,\n MenuGroup,\n MenuLabel,\n MenuSeparator\n} from './menu-misc';\nimport { MenuRoot, MenuSubMenu } from './menu-root';\nimport { MenuSubTrigger, MenuTrigger } from './menu-trigger';\n\nexport const Menu = Object.assign(MenuRoot, {\n Trigger: MenuTrigger,\n Content: MenuContent,\n Item: MenuItem,\n Group: MenuGroup,\n Label: MenuLabel,\n Separator: MenuSeparator,\n EmptyState: MenuEmptyState,\n Submenu: MenuSubMenu,\n SubmenuTrigger: MenuSubTrigger,\n SubmenuContent: MenuSubContent\n});\n"],"names":["MenuRoot","MenuTrigger","MenuContent","MenuItem","MenuGroup","MenuLabel","MenuSeparator","MenuEmptyState","MenuSubMenu","MenuSubTrigger","MenuSubContent"],"mappings":";;;;;;;;MAWa,IAAI,GAAG,MAAM,CAAC,MAAM,CAACA,iBAAQ,EAAE;AAC1C,IAAA,OAAO,EAAEC,uBAAW;AACpB,IAAA,OAAO,EAAEC,uBAAW;AACpB,IAAA,IAAI,EAAEC,iBAAQ;AACd,IAAA,KAAK,EAAEC,kBAAS;AAChB,IAAA,KAAK,EAAEC,kBAAS;AAChB,IAAA,SAAS,EAAEC,sBAAa;AACxB,IAAA,UAAU,EAAEC,uBAAc;AAC1B,IAAA,OAAO,EAAEC,oBAAW;AACpB,IAAA,cAAc,EAAEC,0BAAc;AAC9B,IAAA,cAAc,EAAEC,0BAAc;AAC/B,CAAA;;;;"}
1
+ {"version":3,"file":"menu.cjs","sources":["../../../components/menu/menu.tsx"],"sourcesContent":["import { Menu as MenuPrimitive } from '@base-ui/react/menu';\nimport { MenuContent, MenuSubContent } from './menu-content';\nimport { MenuItem } from './menu-item';\nimport {\n MenuEmptyState,\n MenuGroup,\n MenuLabel,\n MenuSeparator\n} from './menu-misc';\nimport { MenuRoot, MenuSubMenu } from './menu-root';\nimport { MenuSubTrigger, MenuTrigger } from './menu-trigger';\n\nexport const Menu = Object.assign(MenuRoot, {\n Trigger: MenuTrigger,\n Content: MenuContent,\n Item: MenuItem,\n Group: MenuGroup,\n Label: MenuLabel,\n Separator: MenuSeparator,\n EmptyState: MenuEmptyState,\n Submenu: MenuSubMenu,\n SubmenuTrigger: MenuSubTrigger,\n SubmenuContent: MenuSubContent,\n createHandle: MenuPrimitive.createHandle\n});\n"],"names":["MenuRoot","MenuTrigger","MenuContent","MenuItem","MenuGroup","MenuLabel","MenuSeparator","MenuEmptyState","MenuSubMenu","MenuSubTrigger","MenuSubContent","MenuPrimitive"],"mappings":";;;;;;;;;MAYa,IAAI,GAAG,MAAM,CAAC,MAAM,CAACA,iBAAQ,EAAE;AAC1C,IAAA,OAAO,EAAEC,uBAAW;AACpB,IAAA,OAAO,EAAEC,uBAAW;AACpB,IAAA,IAAI,EAAEC,iBAAQ;AACd,IAAA,KAAK,EAAEC,kBAAS;AAChB,IAAA,KAAK,EAAEC,kBAAS;AAChB,IAAA,SAAS,EAAEC,sBAAa;AACxB,IAAA,UAAU,EAAEC,uBAAc;AAC1B,IAAA,OAAO,EAAEC,oBAAW;AACpB,IAAA,cAAc,EAAEC,0BAAc;AAC9B,IAAA,cAAc,EAAEC,0BAAc;IAC9B,YAAY,EAAEC,SAAa,CAAC,YAAY;AACzC,CAAA;;;;"}
@@ -1,3 +1,4 @@
1
+ import { Menu as MenuPrimitive } from '@base-ui/react/menu';
1
2
  import { MenuContent, MenuSubContent } from './menu-content';
2
3
  import { MenuItem } from './menu-item';
3
4
  import { MenuEmptyState, MenuGroup, MenuLabel, MenuSeparator } from './menu-misc';
@@ -19,5 +20,6 @@ export declare const Menu: {
19
20
  };
20
21
  SubmenuTrigger: typeof MenuSubTrigger;
21
22
  SubmenuContent: typeof MenuSubContent;
23
+ createHandle: typeof MenuPrimitive.createHandle;
22
24
  };
23
25
  //# sourceMappingURL=menu.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../../components/menu/menu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EACL,cAAc,EACd,SAAS,EACT,SAAS,EACT,aAAa,EACd,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7D,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;CAWf,CAAC"}
1
+ {"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../../components/menu/menu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EACL,cAAc,EACd,SAAS,EACT,SAAS,EACT,aAAa,EACd,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7D,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;CAYf,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { Menu as Menu$1 } from '@base-ui/react/menu';
1
2
  import { MenuContent, MenuSubContent } from './menu-content.js';
2
3
  import { MenuItem } from './menu-item.js';
3
4
  import { MenuGroup, MenuLabel, MenuSeparator, MenuEmptyState } from './menu-misc.js';
@@ -14,7 +15,8 @@ const Menu = Object.assign(MenuRoot, {
14
15
  EmptyState: MenuEmptyState,
15
16
  Submenu: MenuSubMenu,
16
17
  SubmenuTrigger: MenuSubTrigger,
17
- SubmenuContent: MenuSubContent
18
+ SubmenuContent: MenuSubContent,
19
+ createHandle: Menu$1.createHandle
18
20
  });
19
21
 
20
22
  export { Menu };
@@ -1 +1 @@
1
- {"version":3,"file":"menu.js","sources":["../../../components/menu/menu.tsx"],"sourcesContent":["import { MenuContent, MenuSubContent } from './menu-content';\nimport { MenuItem } from './menu-item';\nimport {\n MenuEmptyState,\n MenuGroup,\n MenuLabel,\n MenuSeparator\n} from './menu-misc';\nimport { MenuRoot, MenuSubMenu } from './menu-root';\nimport { MenuSubTrigger, MenuTrigger } from './menu-trigger';\n\nexport const Menu = Object.assign(MenuRoot, {\n Trigger: MenuTrigger,\n Content: MenuContent,\n Item: MenuItem,\n Group: MenuGroup,\n Label: MenuLabel,\n Separator: MenuSeparator,\n EmptyState: MenuEmptyState,\n Submenu: MenuSubMenu,\n SubmenuTrigger: MenuSubTrigger,\n SubmenuContent: MenuSubContent\n});\n"],"names":[],"mappings":";;;;;;MAWa,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE;AAC1C,IAAA,OAAO,EAAE,WAAW;AACpB,IAAA,OAAO,EAAE,WAAW;AACpB,IAAA,IAAI,EAAE,QAAQ;AACd,IAAA,KAAK,EAAE,SAAS;AAChB,IAAA,KAAK,EAAE,SAAS;AAChB,IAAA,SAAS,EAAE,aAAa;AACxB,IAAA,UAAU,EAAE,cAAc;AAC1B,IAAA,OAAO,EAAE,WAAW;AACpB,IAAA,cAAc,EAAE,cAAc;AAC9B,IAAA,cAAc,EAAE,cAAc;AAC/B,CAAA;;;;"}
1
+ {"version":3,"file":"menu.js","sources":["../../../components/menu/menu.tsx"],"sourcesContent":["import { Menu as MenuPrimitive } from '@base-ui/react/menu';\nimport { MenuContent, MenuSubContent } from './menu-content';\nimport { MenuItem } from './menu-item';\nimport {\n MenuEmptyState,\n MenuGroup,\n MenuLabel,\n MenuSeparator\n} from './menu-misc';\nimport { MenuRoot, MenuSubMenu } from './menu-root';\nimport { MenuSubTrigger, MenuTrigger } from './menu-trigger';\n\nexport const Menu = Object.assign(MenuRoot, {\n Trigger: MenuTrigger,\n Content: MenuContent,\n Item: MenuItem,\n Group: MenuGroup,\n Label: MenuLabel,\n Separator: MenuSeparator,\n EmptyState: MenuEmptyState,\n Submenu: MenuSubMenu,\n SubmenuTrigger: MenuSubTrigger,\n SubmenuContent: MenuSubContent,\n createHandle: MenuPrimitive.createHandle\n});\n"],"names":["MenuPrimitive"],"mappings":";;;;;;;MAYa,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE;AAC1C,IAAA,OAAO,EAAE,WAAW;AACpB,IAAA,OAAO,EAAE,WAAW;AACpB,IAAA,IAAI,EAAE,QAAQ;AACd,IAAA,KAAK,EAAE,SAAS;AAChB,IAAA,KAAK,EAAE,SAAS;AAChB,IAAA,SAAS,EAAE,aAAa;AACxB,IAAA,UAAU,EAAE,cAAc;AAC1B,IAAA,OAAO,EAAE,WAAW;AACpB,IAAA,cAAc,EAAE,cAAc;AAC9B,IAAA,cAAc,EAAE,cAAc;IAC9B,YAAY,EAAEA,MAAa,CAAC,YAAY;AACzC,CAAA;;;;"}
@@ -13,7 +13,8 @@ PopoverContent.displayName = 'Popover.Content';
13
13
  const Popover = Object.assign(react.Popover.Root, {
14
14
  Trigger: react.Popover.Trigger,
15
15
  Close: react.Popover.Close,
16
- Content: PopoverContent
16
+ Content: PopoverContent,
17
+ createHandle: react.Popover.createHandle
17
18
  });
18
19
 
19
20
  exports.Popover = Popover;
@@ -1 +1 @@
1
- {"version":3,"file":"popover.cjs","sources":["../../../components/popover/popover.tsx"],"sourcesContent":["'use client';\n\nimport { Popover as PopoverPrimitive } from '@base-ui/react';\nimport { cx } from 'class-variance-authority';\nimport styles from './popover.module.css';\n\nexport interface PopoverContentProps\n extends Omit<\n PopoverPrimitive.Positioner.Props,\n 'render' | 'className' | 'style' | 'ref'\n >,\n PopoverPrimitive.Popup.Props {}\n\nfunction PopoverContent({\n ref,\n initialFocus,\n finalFocus,\n className,\n style,\n render,\n children,\n ...positionerProps\n}: PopoverContentProps) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Positioner\n sideOffset={4}\n collisionPadding={3}\n className={styles.popoverPositioner}\n {...positionerProps}\n >\n <PopoverPrimitive.Popup\n ref={ref}\n className={cx(styles.popover, className)}\n render={render}\n initialFocus={initialFocus}\n finalFocus={finalFocus}\n style={style}\n >\n {children}\n </PopoverPrimitive.Popup>\n </PopoverPrimitive.Positioner>\n </PopoverPrimitive.Portal>\n );\n}\nPopoverContent.displayName = 'Popover.Content';\n\nexport const Popover = Object.assign(PopoverPrimitive.Root, {\n Trigger: PopoverPrimitive.Trigger,\n Close: PopoverPrimitive.Close,\n Content: PopoverContent\n});\n"],"names":[],"mappings":";;;;;;;;AAaA;AAUE;AAqBF;AACA;AAEa;;;AAGX;AACD;;"}
1
+ {"version":3,"file":"popover.cjs","sources":["../../../components/popover/popover.tsx"],"sourcesContent":["'use client';\n\nimport { Popover as PopoverPrimitive } from '@base-ui/react';\nimport { cx } from 'class-variance-authority';\nimport styles from './popover.module.css';\n\nexport interface PopoverContentProps\n extends Omit<\n PopoverPrimitive.Positioner.Props,\n 'render' | 'className' | 'style' | 'ref'\n >,\n PopoverPrimitive.Popup.Props {}\n\nfunction PopoverContent({\n ref,\n initialFocus,\n finalFocus,\n className,\n style,\n render,\n children,\n ...positionerProps\n}: PopoverContentProps) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Positioner\n sideOffset={4}\n collisionPadding={3}\n className={styles.popoverPositioner}\n {...positionerProps}\n >\n <PopoverPrimitive.Popup\n ref={ref}\n className={cx(styles.popover, className)}\n render={render}\n initialFocus={initialFocus}\n finalFocus={finalFocus}\n style={style}\n >\n {children}\n </PopoverPrimitive.Popup>\n </PopoverPrimitive.Positioner>\n </PopoverPrimitive.Portal>\n );\n}\nPopoverContent.displayName = 'Popover.Content';\n\nexport const Popover = Object.assign(PopoverPrimitive.Root, {\n Trigger: PopoverPrimitive.Trigger,\n Close: PopoverPrimitive.Close,\n Content: PopoverContent,\n createHandle: PopoverPrimitive.createHandle\n});\n"],"names":[],"mappings":";;;;;;;;AAaA;AAUE;AAqBF;AACA;AAEa;;;AAGX;;AAED;;"}
@@ -9,6 +9,7 @@ export declare const Popover: typeof PopoverPrimitive.Root & {
9
9
  Trigger: PopoverPrimitive.Trigger;
10
10
  Close: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").PopoverCloseProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
11
11
  Content: typeof PopoverContent;
12
+ createHandle: typeof PopoverPrimitive.createHandle;
12
13
  };
13
14
  export {};
14
15
  //# sourceMappingURL=popover.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../../components/popover/popover.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAI7D,MAAM,WAAW,mBACf,SAAQ,IAAI,CACR,gBAAgB,CAAC,UAAU,CAAC,KAAK,EACjC,QAAQ,GAAG,WAAW,GAAG,OAAO,GAAG,KAAK,CACzC,EACD,gBAAgB,CAAC,KAAK,CAAC,KAAK;CAAG;AAEnC,iBAAS,cAAc,CAAC,EACtB,GAAG,EACH,YAAY,EACZ,UAAU,EACV,SAAS,EACT,KAAK,EACL,MAAM,EACN,QAAQ,EACR,GAAG,eAAe,EACnB,EAAE,mBAAmB,2CAsBrB;kBA/BQ,cAAc;;;AAkCvB,eAAO,MAAM,OAAO;;;;CAIlB,CAAC"}
1
+ {"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../../components/popover/popover.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAI7D,MAAM,WAAW,mBACf,SAAQ,IAAI,CACR,gBAAgB,CAAC,UAAU,CAAC,KAAK,EACjC,QAAQ,GAAG,WAAW,GAAG,OAAO,GAAG,KAAK,CACzC,EACD,gBAAgB,CAAC,KAAK,CAAC,KAAK;CAAG;AAEnC,iBAAS,cAAc,CAAC,EACtB,GAAG,EACH,YAAY,EACZ,UAAU,EACV,SAAS,EACT,KAAK,EACL,MAAM,EACN,QAAQ,EACR,GAAG,eAAe,EACnB,EAAE,mBAAmB,2CAsBrB;kBA/BQ,cAAc;;;AAkCvB,eAAO,MAAM,OAAO;;;;;CAKlB,CAAC"}
@@ -11,7 +11,8 @@ PopoverContent.displayName = 'Popover.Content';
11
11
  const Popover = Object.assign(Popover$1.Root, {
12
12
  Trigger: Popover$1.Trigger,
13
13
  Close: Popover$1.Close,
14
- Content: PopoverContent
14
+ Content: PopoverContent,
15
+ createHandle: Popover$1.createHandle
15
16
  });
16
17
 
17
18
  export { Popover };
@@ -1 +1 @@
1
- {"version":3,"file":"popover.js","sources":["../../../components/popover/popover.tsx"],"sourcesContent":["'use client';\n\nimport { Popover as PopoverPrimitive } from '@base-ui/react';\nimport { cx } from 'class-variance-authority';\nimport styles from './popover.module.css';\n\nexport interface PopoverContentProps\n extends Omit<\n PopoverPrimitive.Positioner.Props,\n 'render' | 'className' | 'style' | 'ref'\n >,\n PopoverPrimitive.Popup.Props {}\n\nfunction PopoverContent({\n ref,\n initialFocus,\n finalFocus,\n className,\n style,\n render,\n children,\n ...positionerProps\n}: PopoverContentProps) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Positioner\n sideOffset={4}\n collisionPadding={3}\n className={styles.popoverPositioner}\n {...positionerProps}\n >\n <PopoverPrimitive.Popup\n ref={ref}\n className={cx(styles.popover, className)}\n render={render}\n initialFocus={initialFocus}\n finalFocus={finalFocus}\n style={style}\n >\n {children}\n </PopoverPrimitive.Popup>\n </PopoverPrimitive.Positioner>\n </PopoverPrimitive.Portal>\n );\n}\nPopoverContent.displayName = 'Popover.Content';\n\nexport const Popover = Object.assign(PopoverPrimitive.Root, {\n Trigger: PopoverPrimitive.Trigger,\n Close: PopoverPrimitive.Close,\n Content: PopoverContent\n});\n"],"names":[],"mappings":";;;;;;AAaA;AAUE;AAqBF;AACA;AAEa;;;AAGX;AACD;;"}
1
+ {"version":3,"file":"popover.js","sources":["../../../components/popover/popover.tsx"],"sourcesContent":["'use client';\n\nimport { Popover as PopoverPrimitive } from '@base-ui/react';\nimport { cx } from 'class-variance-authority';\nimport styles from './popover.module.css';\n\nexport interface PopoverContentProps\n extends Omit<\n PopoverPrimitive.Positioner.Props,\n 'render' | 'className' | 'style' | 'ref'\n >,\n PopoverPrimitive.Popup.Props {}\n\nfunction PopoverContent({\n ref,\n initialFocus,\n finalFocus,\n className,\n style,\n render,\n children,\n ...positionerProps\n}: PopoverContentProps) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Positioner\n sideOffset={4}\n collisionPadding={3}\n className={styles.popoverPositioner}\n {...positionerProps}\n >\n <PopoverPrimitive.Popup\n ref={ref}\n className={cx(styles.popover, className)}\n render={render}\n initialFocus={initialFocus}\n finalFocus={finalFocus}\n style={style}\n >\n {children}\n </PopoverPrimitive.Popup>\n </PopoverPrimitive.Positioner>\n </PopoverPrimitive.Portal>\n );\n}\nPopoverContent.displayName = 'Popover.Content';\n\nexport const Popover = Object.assign(PopoverPrimitive.Root, {\n Trigger: PopoverPrimitive.Trigger,\n Close: PopoverPrimitive.Close,\n Content: PopoverContent,\n createHandle: PopoverPrimitive.createHandle\n});\n"],"names":[],"mappings":";;;;;;AAaA;AAUE;AAqBF;AACA;AAEa;;;AAGX;;AAED;;"}