@bitrise/bitkit-v2 0.3.481-beta.3077 → 0.3.481-beta.3081

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 (143) hide show
  1. package/dist/components/BitkitCalendar/BitkitCalendar.d.ts +0 -12
  2. package/dist/components/BitkitCalendar/BitkitCalendar.js +1 -7
  3. package/dist/components/BitkitCalendar/BitkitCalendar.js.map +1 -1
  4. package/dist/components/BitkitCalendar/components/CalendarContent.d.ts +1 -5
  5. package/dist/components/BitkitCalendar/components/CalendarContent.js +43 -60
  6. package/dist/components/BitkitCalendar/components/CalendarContent.js.map +1 -1
  7. package/dist/components/BitkitCalendar/components/CalendarMonth.d.ts +2 -4
  8. package/dist/components/BitkitCalendar/components/CalendarMonth.js +5 -15
  9. package/dist/components/BitkitCalendar/components/CalendarMonth.js.map +1 -1
  10. package/dist/components/BitkitCalendar/components/CalendarMonthSelect.d.ts +1 -2
  11. package/dist/components/BitkitCalendar/components/CalendarMonthSelect.js +2 -3
  12. package/dist/components/BitkitCalendar/components/CalendarMonthSelect.js.map +1 -1
  13. package/dist/components/BitkitCalendar/components/CalendarNextTrigger.d.ts +1 -3
  14. package/dist/components/BitkitCalendar/components/CalendarNextTrigger.js +3 -3
  15. package/dist/components/BitkitCalendar/components/CalendarNextTrigger.js.map +1 -1
  16. package/dist/components/BitkitCalendar/components/CalendarPrevTrigger.d.ts +1 -3
  17. package/dist/components/BitkitCalendar/components/CalendarPrevTrigger.js +3 -3
  18. package/dist/components/BitkitCalendar/components/CalendarPrevTrigger.js.map +1 -1
  19. package/dist/components/BitkitCalendar/components/CalendarSelect.d.ts +0 -1
  20. package/dist/components/BitkitCalendar/components/CalendarSelect.js +3 -5
  21. package/dist/components/BitkitCalendar/components/CalendarSelect.js.map +1 -1
  22. package/dist/components/BitkitCalendar/components/CalendarTrigger.js +0 -1
  23. package/dist/components/BitkitCalendar/components/CalendarTrigger.js.map +1 -1
  24. package/dist/components/BitkitCalendar/components/CalendarYearSelect.d.ts +1 -2
  25. package/dist/components/BitkitCalendar/components/CalendarYearSelect.js +2 -3
  26. package/dist/components/BitkitCalendar/components/CalendarYearSelect.js.map +1 -1
  27. package/dist/components/BitkitDatePicker/BitkitDatePicker.d.ts +0 -2
  28. package/dist/components/BitkitDatePicker/BitkitDatePicker.js +1 -2
  29. package/dist/components/BitkitDatePicker/BitkitDatePicker.js.map +1 -1
  30. package/dist/components/BitkitLabelTooltip/BitkitLabelTooltip.d.ts +3 -4
  31. package/dist/components/BitkitLabelTooltip/BitkitLabelTooltip.js +2 -3
  32. package/dist/components/BitkitLabelTooltip/BitkitLabelTooltip.js.map +1 -1
  33. package/dist/components/BitkitMarkdown/BitkitMarkdown.js +1 -1
  34. package/dist/components/BitkitNoteCard/BitkitNoteCard.js +1 -1
  35. package/dist/components/BitkitPageSidebar/BitkitPageSidebar.js +1 -1
  36. package/dist/components/BitkitUIHeader/BitkitUIHeader.d.ts +37 -0
  37. package/dist/components/BitkitUIHeader/BitkitUIHeader.js +113 -0
  38. package/dist/components/BitkitUIHeader/BitkitUIHeader.js.map +1 -0
  39. package/dist/components/BitkitUIHeader/BitriseLogo.d.ts +10 -0
  40. package/dist/components/BitkitUIHeader/BitriseLogo.js +86 -0
  41. package/dist/components/BitkitUIHeader/BitriseLogo.js.map +1 -0
  42. package/dist/components/BitkitUIHeader/UIHeaderAccount.d.ts +26 -0
  43. package/dist/components/BitkitUIHeader/UIHeaderAccount.js +40 -0
  44. package/dist/components/BitkitUIHeader/UIHeaderAccount.js.map +1 -0
  45. package/dist/components/BitkitUIHeader/UIHeaderButton.d.ts +34 -0
  46. package/dist/components/BitkitUIHeader/UIHeaderButton.js +43 -0
  47. package/dist/components/BitkitUIHeader/UIHeaderButton.js.map +1 -0
  48. package/dist/components/BitkitUIHeader/UIHeaderContext.d.ts +13 -0
  49. package/dist/components/BitkitUIHeader/UIHeaderContext.js +11 -0
  50. package/dist/components/BitkitUIHeader/UIHeaderContext.js.map +1 -0
  51. package/dist/components/BitkitUIHeader/UIHeaderControl.d.ts +65 -0
  52. package/dist/components/BitkitUIHeader/UIHeaderControl.js +72 -0
  53. package/dist/components/BitkitUIHeader/UIHeaderControl.js.map +1 -0
  54. package/dist/components/BitkitUIHeader/UIHeaderNavButton.d.ts +20 -0
  55. package/dist/components/BitkitUIHeader/UIHeaderNavButton.js +46 -0
  56. package/dist/components/BitkitUIHeader/UIHeaderNavButton.js.map +1 -0
  57. package/dist/components/BitkitUIHeader/UIHeaderSearch.d.ts +32 -0
  58. package/dist/components/BitkitUIHeader/UIHeaderSearch.js +116 -0
  59. package/dist/components/BitkitUIHeader/UIHeaderSearch.js.map +1 -0
  60. package/dist/components/BitkitUIHeader/uiHeaderPart.d.ts +9 -0
  61. package/dist/components/BitkitUIHeader/uiHeaderPart.js +13 -0
  62. package/dist/components/BitkitUIHeader/uiHeaderPart.js.map +1 -0
  63. package/dist/components/index.d.ts +1 -6
  64. package/dist/main.js +9 -8
  65. package/dist/theme/recipes/UIHeaderButton.recipe.js +103 -0
  66. package/dist/theme/recipes/UIHeaderButton.recipe.js.map +1 -0
  67. package/dist/theme/recipes/index.js +3 -1
  68. package/dist/theme/recipes/index.js.map +1 -1
  69. package/dist/theme/semantic-tokens/index.d.ts +5 -0
  70. package/dist/theme/semantic-tokens/semanticColors.d.ts +5 -0
  71. package/dist/theme/semantic-tokens/semanticColors.js +1 -0
  72. package/dist/theme/semantic-tokens/semanticColors.js.map +1 -1
  73. package/dist/theme/slot-recipes/DatePicker.recipe.d.ts +0 -15
  74. package/dist/theme/slot-recipes/DatePicker.recipe.js +22 -72
  75. package/dist/theme/slot-recipes/DatePicker.recipe.js.map +1 -1
  76. package/dist/theme/slot-recipes/DatePickerSelect.recipe.d.ts +0 -85
  77. package/dist/theme/slot-recipes/DatePickerSelect.recipe.js +10 -35
  78. package/dist/theme/slot-recipes/DatePickerSelect.recipe.js.map +1 -1
  79. package/dist/theme/slot-recipes/Menu.recipe.js +1 -6
  80. package/dist/theme/slot-recipes/Menu.recipe.js.map +1 -1
  81. package/dist/theme/slot-recipes/Tag.recipe.d.ts +1 -1
  82. package/dist/theme/slot-recipes/UIHeader.recipe.d.ts +4 -0
  83. package/dist/theme/slot-recipes/UIHeader.recipe.js +243 -0
  84. package/dist/theme/slot-recipes/UIHeader.recipe.js.map +1 -0
  85. package/dist/theme/slot-recipes/UISideNav.recipe.d.ts +1 -2
  86. package/dist/theme/slot-recipes/UISideNav.recipe.js +2 -3
  87. package/dist/theme/slot-recipes/UISideNav.recipe.js.map +1 -1
  88. package/dist/theme/slot-recipes/index.d.ts +3 -160
  89. package/dist/theme/slot-recipes/index.js +2 -4
  90. package/dist/theme/slot-recipes/index.js.map +1 -1
  91. package/dist/theme/themeUtils.d.ts +6 -0
  92. package/dist/theme/themeUtils.js +7 -1
  93. package/dist/theme/themeUtils.js.map +1 -1
  94. package/dist/utilities/BitkitPortalContext.js +2 -3
  95. package/dist/utilities/BitkitPortalContext.js.map +1 -1
  96. package/docs/v1-to-v2-migration-guide.md +1 -48
  97. package/package.json +1 -1
  98. package/dist/components/BitkitFilter/BitkitFilter.context.d.ts +0 -65
  99. package/dist/components/BitkitFilter/BitkitFilter.context.js +0 -82
  100. package/dist/components/BitkitFilter/BitkitFilter.context.js.map +0 -1
  101. package/dist/components/BitkitFilter/BitkitFilter.d.ts +0 -55
  102. package/dist/components/BitkitFilter/BitkitFilter.js +0 -247
  103. package/dist/components/BitkitFilter/BitkitFilter.js.map +0 -1
  104. package/dist/components/BitkitFilter/BitkitFilter.utils.d.ts +0 -18
  105. package/dist/components/BitkitFilter/BitkitFilter.utils.js +0 -42
  106. package/dist/components/BitkitFilter/BitkitFilter.utils.js.map +0 -1
  107. package/dist/components/BitkitFilter/BitkitFilterAdd.d.ts +0 -18
  108. package/dist/components/BitkitFilter/BitkitFilterAdd.js +0 -200
  109. package/dist/components/BitkitFilter/BitkitFilterAdd.js.map +0 -1
  110. package/dist/components/BitkitFilter/BitkitFilterDateRange.d.ts +0 -26
  111. package/dist/components/BitkitFilter/BitkitFilterDateRange.js +0 -118
  112. package/dist/components/BitkitFilter/BitkitFilterDateRange.js.map +0 -1
  113. package/dist/components/BitkitFilter/BitkitFilterSearch.d.ts +0 -23
  114. package/dist/components/BitkitFilter/BitkitFilterSearch.js +0 -72
  115. package/dist/components/BitkitFilter/BitkitFilterSearch.js.map +0 -1
  116. package/dist/components/BitkitFilter/BitkitFilterSelect.d.ts +0 -61
  117. package/dist/components/BitkitFilter/BitkitFilterSelect.js +0 -149
  118. package/dist/components/BitkitFilter/BitkitFilterSelect.js.map +0 -1
  119. package/dist/components/BitkitFilter/BitkitFilterSwitch.d.ts +0 -28
  120. package/dist/components/BitkitFilter/BitkitFilterSwitch.js +0 -87
  121. package/dist/components/BitkitFilter/BitkitFilterSwitch.js.map +0 -1
  122. package/dist/components/BitkitFilter/components/FilterChip.d.ts +0 -23
  123. package/dist/components/BitkitFilter/components/FilterChip.js +0 -66
  124. package/dist/components/BitkitFilter/components/FilterChip.js.map +0 -1
  125. package/dist/components/BitkitFilter/components/FilterField.d.ts +0 -15
  126. package/dist/components/BitkitFilter/components/FilterField.js +0 -60
  127. package/dist/components/BitkitFilter/components/FilterField.js.map +0 -1
  128. package/dist/components/BitkitFilter/components/FilterPanel.d.ts +0 -42
  129. package/dist/components/BitkitFilter/components/FilterPanel.js +0 -126
  130. package/dist/components/BitkitFilter/components/FilterPanel.js.map +0 -1
  131. package/dist/components/BitkitFilter/components/FilterSearchInput.d.ts +0 -15
  132. package/dist/components/BitkitFilter/components/FilterSearchInput.js +0 -42
  133. package/dist/components/BitkitFilter/components/FilterSearchInput.js.map +0 -1
  134. package/dist/components/BitkitFilter/components/FilterSelectForm.d.ts +0 -45
  135. package/dist/components/BitkitFilter/components/FilterSelectForm.js +0 -341
  136. package/dist/components/BitkitFilter/components/FilterSelectForm.js.map +0 -1
  137. package/dist/theme/recipes/index.d.ts +0 -525
  138. package/dist/theme/slot-recipes/Filter.recipe.d.ts +0 -37
  139. package/dist/theme/slot-recipes/Filter.recipe.js +0 -655
  140. package/dist/theme/slot-recipes/Filter.recipe.js.map +0 -1
  141. package/dist/theme/slot-recipes/Listbox.recipe.d.ts +0 -22
  142. package/dist/theme/slot-recipes/Listbox.recipe.js +0 -96
  143. package/dist/theme/slot-recipes/Listbox.recipe.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["groupHeadingSlotRecipe","inlineLoadingSlotRecipe","paginationLoadMoreSlotRecipe","sectionHeadingSlotRecipe"],"sources":["../../../lib/theme/slot-recipes/index.ts"],"sourcesContent":["import accordionSlotRecipe from './Accordion.recipe.ts';\nimport actionBarSlotRecipe from './ActionBar.recipe.ts';\nimport alertSlotRecipe from './Alert.recipe.ts';\nimport avatarSlotRecipe from './Avatar.recipe.ts';\nimport breadcrumbSlotRecipe from './Breadcrumb.recipe.ts';\nimport cardSlotRecipe from './Card.recipe';\nimport checkboxSlotRecipe from './Checkbox.recipe';\nimport codeSnippetSlotRecipe from './CodeSnippet.recipe.ts';\nimport collapsibleSlotRecipe from './Collapsible.recipe.ts';\nimport comboboxSlotRecipe from './Combobox.recipe.ts';\nimport dataWidgetSlotRecipe from './DataWidget.recipe.ts';\nimport datePickerSlotRecipe from './DatePicker.recipe.ts';\nimport datePickerSelectSlotRecipe from './DatePickerSelect.recipe.ts';\nimport dialogSlotRecipe from './Dialog.recipe.ts';\nimport draggableCardSlotRecipe from './DraggableCard.recipe.ts';\nimport drawerSlotRecipe from './Drawer.recipe.ts';\nimport emptyStateSlotRecipe from './EmptyState.recipe';\nimport expandableCardSlotRecipe from './ExpandableCard.recipe.ts';\nimport fieldSlotRecipe from './Field.recipe';\nimport fieldsetSlotRecipe from './Fieldset.recipe.ts';\nimport fileUploadSlotRecipe from './FileUpload.recipe.ts';\nimport filterSlotRecipe from './Filter.recipe.ts';\nimport groupHeadingSlotRecipe from './GroupHeading.recipe.ts';\nimport imageCropperSlotRecipe from './ImageCropper.recipe.ts';\nimport inlineLoadingSlotRecipe from './InlineLoading.recipe.ts';\nimport labeledDataSlotRecipe from './LabeledData.recipe.ts';\nimport listSlotRecipe from './List.recipe.ts';\nimport listboxSlotRecipe from './Listbox.recipe.ts';\nimport markdownSlotRecipe from './Markdown.recipe.ts';\nimport markdownCardSlotRecipe from './MarkdownCard.recipe.ts';\nimport menuSlotRecipe from './Menu.recipe.ts';\nimport multiselectSlotRecipe from './Multiselect.recipe.ts';\nimport nativeSelectSlotRecipe from './NativeSelect.recipe.ts';\nimport noteCardSlotRecipe from './NoteCard.recipe.ts';\nimport numberInputSlotRecipe from './NumberInput.recipe';\nimport overflowContentSlotRecipe from './OverflowContent.recipe.ts';\nimport pageFooterSlotRecipe from './PageFooter.recipe.ts';\nimport pageHeaderSlotRecipe from './PageHeader.recipe.ts';\nimport pageSidebarSlotRecipe from './PageSidebar.recipe.ts';\nimport paginationSlotRecipe from './Pagination.recipe.ts';\nimport paginationLoadMoreSlotRecipe from './PaginationLoadMore.recipe.ts';\nimport popoverSlotRecipe from './Popover.recipe.ts';\nimport progressSlotRecipe from './Progress.recipe.ts';\nimport qrCodeSlotRecipe from './QrCode.recipe.ts';\nimport radioGroupSlotRecipe from './RadioGroup.recipe.ts';\nimport ribbonSlotRecipe from './Ribbon.recipe.ts';\nimport sectionHeadingSlotRecipe from './SectionHeading.recipe.ts';\nimport segmentGroupSlotRecipe from './SegmentGroup.recipe.ts';\nimport { selectSlotRecipe } from './Select.recipe.ts';\nimport settingsCardSlotRecipe from './SettingsCard.recipe.ts';\nimport splitButtonSlotRecipe from './SplitButton.recipe.ts';\nimport statSlotRecipe from './Stat.recipe.ts';\nimport stepCardSlotRecipe from './StepCard.recipe.ts';\nimport stepsSlotRecipe from './Steps.recipe.ts';\nimport switchSlotRecipe from './Switch.recipe';\nimport tableSlotRecipe from './Table.recipe.ts';\nimport tableCardSlotRecipe from './TableCard.recipe.ts';\nimport tabsSlotRecipe from './Tabs.recipe';\nimport tagSlotRecipe from './Tag.recipe.ts';\nimport tagsInputSlotRecipe from './TagsInput.recipe.ts';\nimport textInputSlotRecipe from './TextInput.recipe.ts';\nimport toastSlotRecipe from './Toast.recipe';\nimport toggletipSlotRecipe from './Toggletip.recipe';\nimport tooltipSlotRecipe from './Tooltip.recipe';\nimport tourSlotRecipe from './Tour.recipe.ts';\nimport treeViewSlotRecipe from './TreeView.recipe.ts';\nimport uiSideNavSlotRecipe from './UISideNav.recipe.ts';\n\nconst slotRecipes = {\n accordion: accordionSlotRecipe,\n actionBar: actionBarSlotRecipe,\n alert: alertSlotRecipe,\n avatar: avatarSlotRecipe,\n breadcrumb: breadcrumbSlotRecipe,\n card: cardSlotRecipe,\n checkbox: checkboxSlotRecipe,\n codeSnippet: codeSnippetSlotRecipe,\n collapsible: collapsibleSlotRecipe,\n combobox: comboboxSlotRecipe,\n dataWidget: dataWidgetSlotRecipe,\n datePicker: datePickerSlotRecipe,\n datePickerSelect: datePickerSelectSlotRecipe,\n dialog: dialogSlotRecipe,\n draggableCard: draggableCardSlotRecipe,\n drawer: drawerSlotRecipe,\n emptyState: emptyStateSlotRecipe,\n expandableCard: expandableCardSlotRecipe,\n field: fieldSlotRecipe,\n groupHeading: groupHeadingSlotRecipe,\n fieldset: fieldsetSlotRecipe,\n fileUpload: fileUploadSlotRecipe,\n filter: filterSlotRecipe,\n imageCropper: imageCropperSlotRecipe,\n inlineLoading: inlineLoadingSlotRecipe,\n list: listSlotRecipe,\n listbox: listboxSlotRecipe,\n markdown: markdownSlotRecipe,\n markdownCard: markdownCardSlotRecipe,\n menu: menuSlotRecipe,\n multiselect: multiselectSlotRecipe,\n noteCard: noteCardSlotRecipe,\n nativeSelect: nativeSelectSlotRecipe,\n numberInput: numberInputSlotRecipe,\n overflowContent: overflowContentSlotRecipe,\n pageFooter: pageFooterSlotRecipe,\n pageHeader: pageHeaderSlotRecipe,\n pageSidebar: pageSidebarSlotRecipe,\n pagination: paginationSlotRecipe,\n paginationLoadMore: paginationLoadMoreSlotRecipe,\n popover: popoverSlotRecipe,\n progress: progressSlotRecipe,\n qrCode: qrCodeSlotRecipe,\n radioGroup: radioGroupSlotRecipe,\n ribbon: ribbonSlotRecipe,\n sectionHeading: sectionHeadingSlotRecipe,\n labeledData: labeledDataSlotRecipe,\n segmentGroup: segmentGroupSlotRecipe,\n select: selectSlotRecipe,\n settingsCard: settingsCardSlotRecipe,\n splitButton: splitButtonSlotRecipe,\n stat: statSlotRecipe,\n stepsCard: stepCardSlotRecipe,\n steps: stepsSlotRecipe,\n switch: switchSlotRecipe,\n table: tableSlotRecipe,\n tableCard: tableCardSlotRecipe,\n tabs: tabsSlotRecipe,\n tag: tagSlotRecipe,\n tagsInput: tagsInputSlotRecipe,\n textInput: textInputSlotRecipe,\n toast: toastSlotRecipe,\n toggletip: toggletipSlotRecipe,\n tooltip: tooltipSlotRecipe,\n tour: tourSlotRecipe,\n treeView: treeViewSlotRecipe,\n uiSideNav: uiSideNavSlotRecipe,\n};\n\nexport default slotRecipes;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoEA,IAAM,cAAc;CAClB,WAAW;CACX,WAAW;CACX,OAAO;CACP,QAAQ;CACR,YAAY;CACZ,MAAM;CACN,UAAU;CACV,aAAa;CACb,aAAa;CACb,UAAU;CACV,YAAY;CACZ,YAAY;CACZ,kBAAkB;CAClB,QAAQ;CACR,eAAe;CACf,QAAQ;CACR,YAAY;CACZ,gBAAgB;CAChB,OAAO;CACP,cAAcA;CACd,UAAU;CACV,YAAY;CACZ,QAAQ;CACR,cAAc;CACd,eAAeC;CACf,MAAM;CACN,SAAS;CACT,UAAU;CACV,cAAc;CACd,MAAM;CACN,aAAa;CACb,UAAU;CACV,cAAc;CACd,aAAa;CACb,iBAAiB;CACjB,YAAY;CACZ,YAAY;CACZ,aAAa;CACb,YAAY;CACZ,oBAAoBC;CACpB,SAAS;CACT,UAAU;CACV,QAAQ;CACR,YAAY;CACZ,QAAQ;CACR,gBAAgBC;CAChB,aAAa;CACb,cAAc;CACd,QAAQ;CACR,cAAc;CACd,aAAa;CACb,MAAM;CACN,WAAW;CACX,OAAO;CACP,QAAQ;CACR,OAAO;CACP,WAAW;CACX,MAAM;CACN,KAAK;CACL,WAAW;CACX,WAAW;CACX,OAAO;CACP,WAAW;CACX,SAAS;CACT,MAAM;CACN,UAAU;CACV,WAAW;AACb"}
1
+ {"version":3,"file":"index.js","names":["groupHeadingSlotRecipe","inlineLoadingSlotRecipe","paginationLoadMoreSlotRecipe","sectionHeadingSlotRecipe"],"sources":["../../../lib/theme/slot-recipes/index.ts"],"sourcesContent":["import accordionSlotRecipe from './Accordion.recipe.ts';\nimport actionBarSlotRecipe from './ActionBar.recipe.ts';\nimport alertSlotRecipe from './Alert.recipe.ts';\nimport avatarSlotRecipe from './Avatar.recipe.ts';\nimport breadcrumbSlotRecipe from './Breadcrumb.recipe.ts';\nimport cardSlotRecipe from './Card.recipe';\nimport checkboxSlotRecipe from './Checkbox.recipe';\nimport codeSnippetSlotRecipe from './CodeSnippet.recipe.ts';\nimport collapsibleSlotRecipe from './Collapsible.recipe.ts';\nimport comboboxSlotRecipe from './Combobox.recipe.ts';\nimport dataWidgetSlotRecipe from './DataWidget.recipe.ts';\nimport datePickerSlotRecipe from './DatePicker.recipe.ts';\nimport datePickerSelectSlotRecipe from './DatePickerSelect.recipe.ts';\nimport dialogSlotRecipe from './Dialog.recipe.ts';\nimport draggableCardSlotRecipe from './DraggableCard.recipe.ts';\nimport drawerSlotRecipe from './Drawer.recipe.ts';\nimport emptyStateSlotRecipe from './EmptyState.recipe';\nimport expandableCardSlotRecipe from './ExpandableCard.recipe.ts';\nimport fieldSlotRecipe from './Field.recipe';\nimport fieldsetSlotRecipe from './Fieldset.recipe.ts';\nimport fileUploadSlotRecipe from './FileUpload.recipe.ts';\nimport groupHeadingSlotRecipe from './GroupHeading.recipe.ts';\nimport imageCropperSlotRecipe from './ImageCropper.recipe.ts';\nimport inlineLoadingSlotRecipe from './InlineLoading.recipe.ts';\nimport labeledDataSlotRecipe from './LabeledData.recipe.ts';\nimport listSlotRecipe from './List.recipe.ts';\nimport markdownSlotRecipe from './Markdown.recipe.ts';\nimport markdownCardSlotRecipe from './MarkdownCard.recipe.ts';\nimport menuSlotRecipe from './Menu.recipe.ts';\nimport multiselectSlotRecipe from './Multiselect.recipe.ts';\nimport nativeSelectSlotRecipe from './NativeSelect.recipe.ts';\nimport noteCardSlotRecipe from './NoteCard.recipe.ts';\nimport numberInputSlotRecipe from './NumberInput.recipe';\nimport overflowContentSlotRecipe from './OverflowContent.recipe.ts';\nimport pageFooterSlotRecipe from './PageFooter.recipe.ts';\nimport pageHeaderSlotRecipe from './PageHeader.recipe.ts';\nimport pageSidebarSlotRecipe from './PageSidebar.recipe.ts';\nimport paginationSlotRecipe from './Pagination.recipe.ts';\nimport paginationLoadMoreSlotRecipe from './PaginationLoadMore.recipe.ts';\nimport popoverSlotRecipe from './Popover.recipe.ts';\nimport progressSlotRecipe from './Progress.recipe.ts';\nimport qrCodeSlotRecipe from './QrCode.recipe.ts';\nimport radioGroupSlotRecipe from './RadioGroup.recipe.ts';\nimport ribbonSlotRecipe from './Ribbon.recipe.ts';\nimport sectionHeadingSlotRecipe from './SectionHeading.recipe.ts';\nimport segmentGroupSlotRecipe from './SegmentGroup.recipe.ts';\nimport { selectSlotRecipe } from './Select.recipe.ts';\nimport settingsCardSlotRecipe from './SettingsCard.recipe.ts';\nimport splitButtonSlotRecipe from './SplitButton.recipe.ts';\nimport statSlotRecipe from './Stat.recipe.ts';\nimport stepCardSlotRecipe from './StepCard.recipe.ts';\nimport stepsSlotRecipe from './Steps.recipe.ts';\nimport switchSlotRecipe from './Switch.recipe';\nimport tableSlotRecipe from './Table.recipe.ts';\nimport tableCardSlotRecipe from './TableCard.recipe.ts';\nimport tabsSlotRecipe from './Tabs.recipe';\nimport tagSlotRecipe from './Tag.recipe.ts';\nimport tagsInputSlotRecipe from './TagsInput.recipe.ts';\nimport textInputSlotRecipe from './TextInput.recipe.ts';\nimport toastSlotRecipe from './Toast.recipe';\nimport toggletipSlotRecipe from './Toggletip.recipe';\nimport tooltipSlotRecipe from './Tooltip.recipe';\nimport tourSlotRecipe from './Tour.recipe.ts';\nimport treeViewSlotRecipe from './TreeView.recipe.ts';\nimport uiHeaderSlotRecipe from './UIHeader.recipe';\nimport uiSideNavSlotRecipe from './UISideNav.recipe.ts';\n\nconst slotRecipes = {\n accordion: accordionSlotRecipe,\n actionBar: actionBarSlotRecipe,\n alert: alertSlotRecipe,\n avatar: avatarSlotRecipe,\n breadcrumb: breadcrumbSlotRecipe,\n card: cardSlotRecipe,\n checkbox: checkboxSlotRecipe,\n codeSnippet: codeSnippetSlotRecipe,\n collapsible: collapsibleSlotRecipe,\n combobox: comboboxSlotRecipe,\n dataWidget: dataWidgetSlotRecipe,\n datePicker: datePickerSlotRecipe,\n datePickerSelect: datePickerSelectSlotRecipe,\n dialog: dialogSlotRecipe,\n draggableCard: draggableCardSlotRecipe,\n drawer: drawerSlotRecipe,\n emptyState: emptyStateSlotRecipe,\n expandableCard: expandableCardSlotRecipe,\n field: fieldSlotRecipe,\n groupHeading: groupHeadingSlotRecipe,\n fieldset: fieldsetSlotRecipe,\n fileUpload: fileUploadSlotRecipe,\n imageCropper: imageCropperSlotRecipe,\n inlineLoading: inlineLoadingSlotRecipe,\n list: listSlotRecipe,\n markdown: markdownSlotRecipe,\n markdownCard: markdownCardSlotRecipe,\n menu: menuSlotRecipe,\n multiselect: multiselectSlotRecipe,\n noteCard: noteCardSlotRecipe,\n nativeSelect: nativeSelectSlotRecipe,\n numberInput: numberInputSlotRecipe,\n overflowContent: overflowContentSlotRecipe,\n pageFooter: pageFooterSlotRecipe,\n pageHeader: pageHeaderSlotRecipe,\n pageSidebar: pageSidebarSlotRecipe,\n pagination: paginationSlotRecipe,\n paginationLoadMore: paginationLoadMoreSlotRecipe,\n popover: popoverSlotRecipe,\n progress: progressSlotRecipe,\n qrCode: qrCodeSlotRecipe,\n radioGroup: radioGroupSlotRecipe,\n ribbon: ribbonSlotRecipe,\n sectionHeading: sectionHeadingSlotRecipe,\n labeledData: labeledDataSlotRecipe,\n segmentGroup: segmentGroupSlotRecipe,\n select: selectSlotRecipe,\n settingsCard: settingsCardSlotRecipe,\n splitButton: splitButtonSlotRecipe,\n stat: statSlotRecipe,\n stepsCard: stepCardSlotRecipe,\n steps: stepsSlotRecipe,\n switch: switchSlotRecipe,\n table: tableSlotRecipe,\n tableCard: tableCardSlotRecipe,\n tabs: tabsSlotRecipe,\n tag: tagSlotRecipe,\n tagsInput: tagsInputSlotRecipe,\n textInput: textInputSlotRecipe,\n toast: toastSlotRecipe,\n toggletip: toggletipSlotRecipe,\n tooltip: tooltipSlotRecipe,\n tour: tourSlotRecipe,\n treeView: treeViewSlotRecipe,\n uiHeader: uiHeaderSlotRecipe,\n uiSideNav: uiSideNavSlotRecipe,\n};\n\nexport default slotRecipes;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmEA,IAAM,cAAc;CAClB,WAAW;CACX,WAAW;CACX,OAAO;CACP,QAAQ;CACR,YAAY;CACZ,MAAM;CACN,UAAU;CACV,aAAa;CACb,aAAa;CACb,UAAU;CACV,YAAY;CACZ,YAAY;CACZ,kBAAkB;CAClB,QAAQ;CACR,eAAe;CACf,QAAQ;CACR,YAAY;CACZ,gBAAgB;CAChB,OAAO;CACP,cAAcA;CACd,UAAU;CACV,YAAY;CACZ,cAAc;CACd,eAAeC;CACf,MAAM;CACN,UAAU;CACV,cAAc;CACd,MAAM;CACN,aAAa;CACb,UAAU;CACV,cAAc;CACd,aAAa;CACb,iBAAiB;CACjB,YAAY;CACZ,YAAY;CACZ,aAAa;CACb,YAAY;CACZ,oBAAoBC;CACpB,SAAS;CACT,UAAU;CACV,QAAQ;CACR,YAAY;CACZ,QAAQ;CACR,gBAAgBC;CAChB,aAAa;CACb,cAAc;CACd,QAAQ;CACR,cAAc;CACd,aAAa;CACb,MAAM;CACN,WAAW;CACX,OAAO;CACP,QAAQ;CACR,OAAO;CACP,WAAW;CACX,MAAM;CACN,KAAK;CACL,WAAW;CACX,WAAW;CACX,OAAO;CACP,WAAW;CACX,SAAS;CACT,MAAM;CACN,UAAU;CACV,UAAU;CACV,WAAW;AACb"}
@@ -8,6 +8,12 @@ export declare function withSlashes(object: Record<string, any>): Record<string,
8
8
  * @returns Value in rems, typed precisely enough to satisfy props that take a `${number}rem`
9
9
  */
10
10
  export declare const rem: (input: number) => `${number}rem`;
11
+ /**
12
+ * A colour token as the raw CSS variable Chakra compiles it to, for the places a `{colors.…}`
13
+ * reference cannot go: inside a compound value like a gradient, Chakra reads the token's first `/`
14
+ * as its colour-mix opacity modifier, so the slashes have to be escaped by hand instead.
15
+ */
16
+ export declare const colorVar: (token: string) => string;
11
17
  /**
12
18
  * The colour tokens under the given prefixes, for props that must take a semantic token.
13
19
  *
@@ -29,7 +29,13 @@ function withSlashes(object) {
29
29
  var rem = (input) => {
30
30
  return `${input / 16}rem`;
31
31
  };
32
+ /**
33
+ * A colour token as the raw CSS variable Chakra compiles it to, for the places a `{colors.…}`
34
+ * reference cannot go: inside a compound value like a gradient, Chakra reads the token's first `/`
35
+ * as its colour-mix opacity modifier, so the slashes have to be escaped by hand instead.
36
+ */
37
+ var colorVar = (token) => `var(--colors-${token.replace(/\//g, "\\/")})`;
32
38
  //#endregion
33
- export { flattenTokens, rem, withSlashes };
39
+ export { colorVar, flattenTokens, rem, withSlashes };
34
40
 
35
41
  //# sourceMappingURL=themeUtils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"themeUtils.js","names":[],"sources":["../../lib/theme/themeUtils.ts"],"sourcesContent":["import { type Tokens } from '@chakra-ui/react/styled-system';\nimport { type TextProps } from '@chakra-ui/react/text';\nimport { isPlainObject } from 'es-toolkit';\n\n// Based on https://github.com/toss/es-toolkit/blob/main/src/object/flattenObject.ts\nexport const flattenTokens = (object: object, prefix: string = ''): Record<string, any> => {\n const result: Record<string, any> = {};\n const keys = Object.keys(object);\n\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n const value = (object as any)[key];\n\n const prefixedKey = prefix ? `${prefix}/${key}` : key;\n\n if (isPlainObject(value) && Object.keys(value).length > 0 && Object.keys(value)[0] !== 'value') {\n Object.assign(result, flattenTokens(value, prefixedKey));\n continue;\n }\n\n result[prefixedKey] = value;\n }\n\n return result;\n};\n\nexport function withSlashes(object: Record<string, any>): Record<string, any> {\n return {\n ...object,\n ...flattenTokens(object),\n };\n}\n\n/**\n *\n * @param input Value in pixels\n * @returns Value in rems, typed precisely enough to satisfy props that take a `${number}rem`\n */\nexport const rem = (input: number): `${number}rem` => {\n return `${input / 16}rem`;\n};\n\n/**\n * The colour tokens under the given prefixes, for props that must take a semantic token.\n *\n * `Tokens` is generated in the consumer's own project by `chakra typegen`, which\n * `scripts/postinstall.cjs` runs and which exits 0 with a warning when it cannot. Where it did not\n * run, `Tokens['colors']` is Chakra's stock union, the `Extract` has nothing to match and collapses\n * to `never` -- which would make every prop using it a type error pointing at the wrong thing. So it\n * falls back to `string`: the narrowing is a guard where the types are real, not a tripwire where\n * they are not.\n */\nexport type BitkitColorToken<Prefix extends string> = [Extract<Tokens['colors'], `${Prefix}/${string}`>] extends [never]\n ? string\n : Extract<Tokens['colors'], `${Prefix}/${string}`>;\n\nexport const getTextStyle = (as: TextProps['as']) => {\n if (['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(as as string)) {\n return `heading/${as}`;\n }\n return undefined;\n};\n"],"mappings":";;AAKA,IAAa,iBAAiB,QAAgB,SAAiB,OAA4B;CACzF,MAAM,SAA8B,CAAC;CACrC,MAAM,OAAO,OAAO,KAAK,MAAM;CAE/B,KAAK,IAAI,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;EACpC,MAAM,MAAM,KAAK;EACjB,MAAM,QAAS,OAAe;EAE9B,MAAM,cAAc,SAAS,GAAG,OAAO,GAAG,QAAQ;EAElD,IAAI,cAAc,KAAK,KAAK,OAAO,KAAK,KAAK,CAAC,CAAC,SAAS,KAAK,OAAO,KAAK,KAAK,CAAC,CAAC,OAAO,SAAS;GAC9F,OAAO,OAAO,QAAQ,cAAc,OAAO,WAAW,CAAC;GACvD;EACF;EAEA,OAAO,eAAe;CACxB;CAEA,OAAO;AACT;AAEA,SAAgB,YAAY,QAAkD;CAC5E,OAAO;EACL,GAAG;EACH,GAAG,cAAc,MAAM;CACzB;AACF;;;;;;AAOA,IAAa,OAAO,UAAkC;CACpD,OAAO,GAAG,QAAQ,GAAG;AACvB"}
1
+ {"version":3,"file":"themeUtils.js","names":[],"sources":["../../lib/theme/themeUtils.ts"],"sourcesContent":["import { type Tokens } from '@chakra-ui/react/styled-system';\nimport { type TextProps } from '@chakra-ui/react/text';\nimport { isPlainObject } from 'es-toolkit';\n\n// Based on https://github.com/toss/es-toolkit/blob/main/src/object/flattenObject.ts\nexport const flattenTokens = (object: object, prefix: string = ''): Record<string, any> => {\n const result: Record<string, any> = {};\n const keys = Object.keys(object);\n\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n const value = (object as any)[key];\n\n const prefixedKey = prefix ? `${prefix}/${key}` : key;\n\n if (isPlainObject(value) && Object.keys(value).length > 0 && Object.keys(value)[0] !== 'value') {\n Object.assign(result, flattenTokens(value, prefixedKey));\n continue;\n }\n\n result[prefixedKey] = value;\n }\n\n return result;\n};\n\nexport function withSlashes(object: Record<string, any>): Record<string, any> {\n return {\n ...object,\n ...flattenTokens(object),\n };\n}\n\n/**\n *\n * @param input Value in pixels\n * @returns Value in rems, typed precisely enough to satisfy props that take a `${number}rem`\n */\nexport const rem = (input: number): `${number}rem` => {\n return `${input / 16}rem`;\n};\n\n/**\n * A colour token as the raw CSS variable Chakra compiles it to, for the places a `{colors.…}`\n * reference cannot go: inside a compound value like a gradient, Chakra reads the token's first `/`\n * as its colour-mix opacity modifier, so the slashes have to be escaped by hand instead.\n */\nexport const colorVar = (token: string): string => `var(--colors-${token.replace(/\\//g, '\\\\/')})`;\n\n/**\n * The colour tokens under the given prefixes, for props that must take a semantic token.\n *\n * `Tokens` is generated in the consumer's own project by `chakra typegen`, which\n * `scripts/postinstall.cjs` runs and which exits 0 with a warning when it cannot. Where it did not\n * run, `Tokens['colors']` is Chakra's stock union, the `Extract` has nothing to match and collapses\n * to `never` -- which would make every prop using it a type error pointing at the wrong thing. So it\n * falls back to `string`: the narrowing is a guard where the types are real, not a tripwire where\n * they are not.\n */\nexport type BitkitColorToken<Prefix extends string> = [Extract<Tokens['colors'], `${Prefix}/${string}`>] extends [never]\n ? string\n : Extract<Tokens['colors'], `${Prefix}/${string}`>;\n\nexport const getTextStyle = (as: TextProps['as']) => {\n if (['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(as as string)) {\n return `heading/${as}`;\n }\n return undefined;\n};\n"],"mappings":";;AAKA,IAAa,iBAAiB,QAAgB,SAAiB,OAA4B;CACzF,MAAM,SAA8B,CAAC;CACrC,MAAM,OAAO,OAAO,KAAK,MAAM;CAE/B,KAAK,IAAI,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;EACpC,MAAM,MAAM,KAAK;EACjB,MAAM,QAAS,OAAe;EAE9B,MAAM,cAAc,SAAS,GAAG,OAAO,GAAG,QAAQ;EAElD,IAAI,cAAc,KAAK,KAAK,OAAO,KAAK,KAAK,CAAC,CAAC,SAAS,KAAK,OAAO,KAAK,KAAK,CAAC,CAAC,OAAO,SAAS;GAC9F,OAAO,OAAO,QAAQ,cAAc,OAAO,WAAW,CAAC;GACvD;EACF;EAEA,OAAO,eAAe;CACxB;CAEA,OAAO;AACT;AAEA,SAAgB,YAAY,QAAkD;CAC5E,OAAO;EACL,GAAG;EACH,GAAG,cAAc,MAAM;CACzB;AACF;;;;;;AAOA,IAAa,OAAO,UAAkC;CACpD,OAAO,GAAG,QAAQ,GAAG;AACvB;;;;;;AAOA,IAAa,YAAY,UAA0B,gBAAgB,MAAM,QAAQ,OAAO,KAAK,EAAE"}
@@ -1,8 +1,7 @@
1
- import { createContext, useContext } from "react";
1
+ import { createContext } from "react";
2
2
  //#region lib/utilities/BitkitPortalContext.ts
3
3
  var BitkitPortalContext = createContext({ disablePortal: false });
4
- var usePortalContext = () => useContext(BitkitPortalContext);
5
4
  //#endregion
6
- export { BitkitPortalContext as default, usePortalContext };
5
+ export { BitkitPortalContext as default };
7
6
 
8
7
  //# sourceMappingURL=BitkitPortalContext.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BitkitPortalContext.js","names":[],"sources":["../../lib/utilities/BitkitPortalContext.ts"],"sourcesContent":["import { createContext, useContext } from 'react';\n\nconst BitkitPortalContext = createContext({ disablePortal: false });\n\nexport const usePortalContext = () => useContext(BitkitPortalContext);\n\nexport default BitkitPortalContext;\n"],"mappings":";;AAEA,IAAM,sBAAsB,cAAc,EAAE,eAAe,MAAM,CAAC;AAElE,IAAa,yBAAyB,WAAW,mBAAmB"}
1
+ {"version":3,"file":"BitkitPortalContext.js","names":[],"sources":["../../lib/utilities/BitkitPortalContext.ts"],"sourcesContent":["import { createContext, useContext } from 'react';\n\nconst BitkitPortalContext = createContext({ disablePortal: false });\n\nexport const usePortalContext = () => useContext(BitkitPortalContext);\n\nexport default BitkitPortalContext;\n"],"mappings":";;AAEA,IAAM,sBAAsB,cAAc,EAAE,eAAe,MAAM,CAAC"}
@@ -35,7 +35,7 @@ Migrate in this order to minimize blockers:
35
35
  2. **Atomic components**: `Button`, `Badge`, `Tag`, `Spinner`, `Toast`
36
36
  3. **Form components**: `Input`, `Textarea`, `Select`, `Checkbox`, `Switch`
37
37
  4. **Layout & navigation**: `Sidebar`, `Breadcrumb`
38
- 5. **Composite components**: `Dialog`, `Tabs`, `Table`, `Card`, `Alert`, `Filter`
38
+ 5. **Composite components**: `Dialog`, `Tabs`, `Table`, `Card`, `Alert`
39
39
  6. **Icons** (if migrating from `lucide-react` or similar)
40
40
  7. **Dependency cleanup**: remove v1 and all now-unused peer deps
41
41
 
@@ -270,53 +270,6 @@ import { Table } from '@chakra-ui/react/table'
270
270
 
271
271
  For password fields with an eye-toggle: use `BitkitField` + Chakra v3 `InputGroup` with `endElement`.
272
272
 
273
- ### Filter
274
-
275
- v1's single `data` object becomes children: each filter is a controlled sub-component with its own `value` and `onValueChange`.
276
-
277
- ```tsx
278
- // v1
279
- <Filter data={{ project: {...}, date_range: { type: 'dateRange' }, branch: { type: 'tag', isPatternEnabled: true } }} state={state} onChange={setState} showAdd showSearch />
280
-
281
- // v2
282
- <BitkitFilter>
283
- <BitkitFilter.Select label="Project" pluralLabel="Projects" items={projects} value={project} onValueChange={setProject} />
284
- <BitkitFilter.DateRange value={dates} onValueChange={setDates} />
285
- <BitkitFilter.Add>
286
- <BitkitFilter.Select label="Branch" pluralLabel="Branches" items={branches} multiple pattern value={branch} onValueChange={setBranch} />
287
- </BitkitFilter.Add>
288
- <BitkitFilter.Search value={search} onValueChange={setSearch} />
289
- </BitkitFilter>
290
- ```
291
-
292
- | v1 | v2 |
293
- |----|----|
294
- | `state` / `onChange` | per-filter `value` / `onValueChange` |
295
- | `defaultState` | per-filter `resetValue`; root `onClear` to reset everything in one write |
296
- | `type: 'select'`, `isMultiple` | `BitkitFilter.Select`, `multiple` |
297
- | `type: 'switch'`, `allOptionLabel` | `BitkitFilter.Switch`, `allLabel` |
298
- | `type: 'dateRange'`, `selectable`, `dayTooltip` | `BitkitFilter.DateRange`, `min` / `max`, `dayTooltip` (now `(date: Date) => string \| undefined`; v1 passed `{ date, selectable }` with a luxon `DateTime`) |
299
- | `type: 'tag'`, `showAdd` | `BitkitFilter.Select` inside `BitkitFilter.Add` |
300
- | `showSearch`, `searchTooltip`, `state.search = [text]` | `BitkitFilter.Search`, `tooltip`, `value: string` |
301
- | `options`, `optionsMap`, `iconsMap`, `iconColorsMap` | `items: { value, label, icon?, iconColor? }[]` |
302
- | `categoryName`, `categoryNamePlural`, `unfilteredLabel` | `label`, `pluralLabel` (required), `emptyLabel` |
303
- | `onAsyncSearch` | `onSearchChange` + `items` + `loading` |
304
- | `isInitialLoading`, `loadingText` | `loading`, `loadingLabel` |
305
- | `isPatternEnabled` | `pattern` |
306
- | `hasNotFilteredOption: false` | `required`, with the default as `resetValue` |
307
- | `preserveOptionOrder` | `preserveOrder` |
308
- | `dependsOn`, `filtersDependOn` | `disabledReason`; clear the dependent filter in the parent's `onValueChange` |
309
- | `isLoading` | `state="loading"` |
310
- | `isMobile` | `device` |
311
- | `showFilterIcon`, `showClearFilters` | `showIcon`, `showClear` |
312
-
313
- Things that behave differently:
314
- - **Mobile is automatic** below the tablet breakpoint. v1 was opt-in; pass `device="desktop"` where a page relied on that.
315
- - **`onSearchChange` returns nothing.** Fetch yourself and pass the results as `items`, with `loading` meanwhile. It is debounced (300ms), but dropping out-of-order responses is up to you.
316
- - **Values are typed per filter**: `string | null` for a switch (`null` = "All"), `[start, end] | null` of `Date`s for a date range, `string[]` for a select, a plain `string` for the search.
317
- - **`iconColor` takes an `icon/*` token**, e.g. `icon/positive` instead of `status/success/icon`.
318
- - **"Clear filters" only resets the filters that changed**, each through its own `onValueChange`. A URL-backed page should pass `onClear`, or it gets one history entry per filter.
319
-
320
273
  ### Cards
321
274
 
322
275
  | v1 | v2 |
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bitrise/bitkit-v2",
3
3
  "private": false,
4
- "version": "0.3.481-beta.3077",
4
+ "version": "0.3.481-beta.3081",
5
5
  "description": "Bitrise Design System Components built with Chakra UI V3",
6
6
  "keywords": [
7
7
  "react",
@@ -1,65 +0,0 @@
1
- import { SystemStyleObject } from '@chakra-ui/react/styled-system';
2
- import { FilterValue } from './BitkitFilter.utils';
3
- export interface FilterStatus {
4
- /** Holds a selection — counted on the mobile "Filters" button. */
5
- isActive: boolean;
6
- /** Differs from its `resetValue` — shows "Clear filters". */
7
- isDirty: boolean;
8
- }
9
- interface FilterContext {
10
- /** The page is loading: the filters can't be opened or cleared. */
11
- isDisabled: boolean;
12
- /** Below the tablet breakpoint the filters render as fields in a full-screen dialog. */
13
- isMobile: boolean;
14
- register: (id: string, reset: () => void) => void;
15
- setStatus: (id: string, status: FilterStatus) => void;
16
- styles: Record<string, SystemStyleObject>;
17
- unregister: (id: string) => void;
18
- }
19
- export declare const FilterContextProvider: import('react').Provider<FilterContext>, useFilterContext: () => FilterContext;
20
- /** What a filter inside `BitkitFilter.Add` tells it, to list itself in the "Add filter" menu. */
21
- export interface FilterAddEntry {
22
- disabledReason?: string;
23
- /** Has options to pick, or a search to find them. */
24
- hasOptions: boolean;
25
- /** Holds no value, so it is offered in the menu rather than shown as a chip. */
26
- isEmpty: boolean;
27
- label: string;
28
- }
29
- interface FilterAddContext {
30
- /** The filter picked from the menu, whose panel is open. */
31
- addingId?: string;
32
- /** Moves focus to the "Add filter" button once it is enabled, e.g. after a chip is removed. */
33
- focusTrigger: () => void;
34
- /** The "Add filter" button: the panels anchor to it and hand focus back to it. */
35
- getTrigger: () => HTMLElement | null;
36
- register: (id: string, entry: FilterAddEntry) => void;
37
- stopAdding: () => void;
38
- unregister: (id: string) => void;
39
- }
40
- /** Set by `BitkitFilter.Add` around its filters: they render as removable chips, only while they hold a value. */
41
- export declare const FilterAddContextProvider: import('react').Provider<FilterAddContext | undefined>, useFilterAddContext: () => FilterAddContext | undefined;
42
- /**
43
- * Lists a filter in its `BitkitFilter.Add` menu, wherever it sits in the tree, so a filter wrapped in
44
- * a consumer component is listed too. Returns nothing outside `Add`.
45
- */
46
- export declare const useFilterAddItem: ({ disabledReason, hasOptions, isEmpty, label }: FilterAddEntry) => {
47
- isAdding: boolean;
48
- /** The filter picked from the menu, whose panel is open. */
49
- addingId?: string;
50
- /** Moves focus to the "Add filter" button once it is enabled, e.g. after a chip is removed. */
51
- focusTrigger: () => void;
52
- /** The "Add filter" button: the panels anchor to it and hand focus back to it. */
53
- getTrigger: () => HTMLElement | null;
54
- register: (id: string, entry: FilterAddEntry) => void;
55
- stopAdding: () => void;
56
- unregister: (id: string) => void;
57
- } | undefined;
58
- /**
59
- * Registers a filter with the root, which shows "Clear filters" while any filter differs from its
60
- * `resetValue` and hands each one its `resetValue` back when clicked, and counts the active ones.
61
- */
62
- export declare const useFilterRegistration: <T extends FilterValue>(value: T, resetValue: T, onValueChange: (value: T) => void,
63
- /** Off for the search, which sits outside the mobile dialog the count describes. */
64
- isCounted?: boolean) => void;
65
- export {};
@@ -1,82 +0,0 @@
1
- import { isEmptyFilterValue, isEqualFilterValue } from "./BitkitFilter.utils.js";
2
- import { useEffect, useId, useRef } from "react";
3
- import { createContext as createContext$1 } from "@chakra-ui/react";
4
- //#region lib/components/BitkitFilter/BitkitFilter.context.ts
5
- var [FilterContextProvider, useFilterContext] = createContext$1({
6
- hookName: "useFilterContext",
7
- name: "FilterContext",
8
- providerName: "<BitkitFilter />"
9
- });
10
- /** Set by `BitkitFilter.Add` around its filters: they render as removable chips, only while they hold a value. */
11
- var [FilterAddContextProvider, useFilterAddContext] = createContext$1({
12
- name: "FilterAddContext",
13
- strict: false
14
- });
15
- /**
16
- * Lists a filter in its `BitkitFilter.Add` menu, wherever it sits in the tree, so a filter wrapped in
17
- * a consumer component is listed too. Returns nothing outside `Add`.
18
- */
19
- var useFilterAddItem = ({ disabledReason, hasOptions, isEmpty, label }) => {
20
- const add = useFilterAddContext();
21
- const id = useId();
22
- const register = add?.register;
23
- const unregister = add?.unregister;
24
- useEffect(() => {
25
- register?.(id, {
26
- disabledReason,
27
- hasOptions,
28
- isEmpty,
29
- label
30
- });
31
- }, [
32
- disabledReason,
33
- hasOptions,
34
- id,
35
- isEmpty,
36
- label,
37
- register
38
- ]);
39
- useEffect(() => () => unregister?.(id), [id, unregister]);
40
- if (!add) return void 0;
41
- return {
42
- ...add,
43
- isAdding: add.addingId === id
44
- };
45
- };
46
- /**
47
- * Registers a filter with the root, which shows "Clear filters" while any filter differs from its
48
- * `resetValue` and hands each one its `resetValue` back when clicked, and counts the active ones.
49
- */
50
- var useFilterRegistration = (value, resetValue, onValueChange, isCounted = true) => {
51
- const { register, setStatus, unregister } = useFilterContext();
52
- const id = useId();
53
- const resetRef = useRef(() => onValueChange(resetValue));
54
- useEffect(() => {
55
- resetRef.current = () => onValueChange(resetValue);
56
- });
57
- useEffect(() => {
58
- register(id, () => resetRef.current());
59
- return () => unregister(id);
60
- }, [
61
- id,
62
- register,
63
- unregister
64
- ]);
65
- const isDirty = !isEqualFilterValue(value, resetValue);
66
- const isActive = isCounted && !isEmptyFilterValue(value);
67
- useEffect(() => {
68
- setStatus(id, {
69
- isActive,
70
- isDirty
71
- });
72
- }, [
73
- id,
74
- isActive,
75
- isDirty,
76
- setStatus
77
- ]);
78
- };
79
- //#endregion
80
- export { FilterAddContextProvider, FilterContextProvider, useFilterAddContext, useFilterAddItem, useFilterContext, useFilterRegistration };
81
-
82
- //# sourceMappingURL=BitkitFilter.context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BitkitFilter.context.js","names":["createContext"],"sources":["../../../lib/components/BitkitFilter/BitkitFilter.context.ts"],"sourcesContent":["// eslint-disable-next-line no-restricted-imports\nimport { createContext } from '@chakra-ui/react';\nimport { type SystemStyleObject } from '@chakra-ui/react/styled-system';\nimport { useEffect, useId, useRef } from 'react';\n\nimport { type FilterValue, isEmptyFilterValue, isEqualFilterValue } from './BitkitFilter.utils';\n\nexport interface FilterStatus {\n /** Holds a selection — counted on the mobile \"Filters\" button. */\n isActive: boolean;\n /** Differs from its `resetValue` — shows \"Clear filters\". */\n isDirty: boolean;\n}\n\ninterface FilterContext {\n /** The page is loading: the filters can't be opened or cleared. */\n isDisabled: boolean;\n /** Below the tablet breakpoint the filters render as fields in a full-screen dialog. */\n isMobile: boolean;\n register: (id: string, reset: () => void) => void;\n setStatus: (id: string, status: FilterStatus) => void;\n styles: Record<string, SystemStyleObject>;\n unregister: (id: string) => void;\n}\n\nexport const [FilterContextProvider, useFilterContext] = createContext<FilterContext>({\n hookName: 'useFilterContext',\n name: 'FilterContext',\n providerName: '<BitkitFilter />',\n});\n\n/** What a filter inside `BitkitFilter.Add` tells it, to list itself in the \"Add filter\" menu. */\nexport interface FilterAddEntry {\n disabledReason?: string;\n /** Has options to pick, or a search to find them. */\n hasOptions: boolean;\n /** Holds no value, so it is offered in the menu rather than shown as a chip. */\n isEmpty: boolean;\n label: string;\n}\n\ninterface FilterAddContext {\n /** The filter picked from the menu, whose panel is open. */\n addingId?: string;\n /** Moves focus to the \"Add filter\" button once it is enabled, e.g. after a chip is removed. */\n focusTrigger: () => void;\n /** The \"Add filter\" button: the panels anchor to it and hand focus back to it. */\n getTrigger: () => HTMLElement | null;\n register: (id: string, entry: FilterAddEntry) => void;\n stopAdding: () => void;\n unregister: (id: string) => void;\n}\n\n/** Set by `BitkitFilter.Add` around its filters: they render as removable chips, only while they hold a value. */\nexport const [FilterAddContextProvider, useFilterAddContext] = createContext<FilterAddContext | undefined>({\n name: 'FilterAddContext',\n strict: false,\n});\n\n/**\n * Lists a filter in its `BitkitFilter.Add` menu, wherever it sits in the tree, so a filter wrapped in\n * a consumer component is listed too. Returns nothing outside `Add`.\n */\nexport const useFilterAddItem = ({ disabledReason, hasOptions, isEmpty, label }: FilterAddEntry) => {\n const add = useFilterAddContext();\n const id = useId();\n const register = add?.register;\n const unregister = add?.unregister;\n\n useEffect(() => {\n register?.(id, { disabledReason, hasOptions, isEmpty, label });\n }, [disabledReason, hasOptions, id, isEmpty, label, register]);\n\n useEffect(() => () => unregister?.(id), [id, unregister]);\n\n if (!add) return undefined;\n return { ...add, isAdding: add.addingId === id };\n};\n\n/**\n * Registers a filter with the root, which shows \"Clear filters\" while any filter differs from its\n * `resetValue` and hands each one its `resetValue` back when clicked, and counts the active ones.\n */\nexport const useFilterRegistration = <T extends FilterValue>(\n value: T,\n resetValue: T,\n onValueChange: (value: T) => void,\n /** Off for the search, which sits outside the mobile dialog the count describes. */\n isCounted = true,\n) => {\n const { register, setStatus, unregister } = useFilterContext();\n const id = useId();\n const resetRef = useRef(() => onValueChange(resetValue));\n useEffect(() => {\n resetRef.current = () => onValueChange(resetValue);\n });\n\n useEffect(() => {\n register(id, () => resetRef.current());\n return () => unregister(id);\n }, [id, register, unregister]);\n\n const isDirty = !isEqualFilterValue(value, resetValue);\n const isActive = isCounted && !isEmptyFilterValue(value);\n useEffect(() => {\n setStatus(id, { isActive, isDirty });\n }, [id, isActive, isDirty, setStatus]);\n};\n"],"mappings":";;;;AAyBA,IAAa,CAAC,uBAAuB,oBAAoBA,gBAA6B;CACpF,UAAU;CACV,MAAM;CACN,cAAc;AAChB,CAAC;;AAyBD,IAAa,CAAC,0BAA0B,uBAAuBA,gBAA4C;CACzG,MAAM;CACN,QAAQ;AACV,CAAC;;;;;AAMD,IAAa,oBAAoB,EAAE,gBAAgB,YAAY,SAAS,YAA4B;CAClG,MAAM,MAAM,oBAAoB;CAChC,MAAM,KAAK,MAAM;CACjB,MAAM,WAAW,KAAK;CACtB,MAAM,aAAa,KAAK;CAExB,gBAAgB;EACd,WAAW,IAAI;GAAE;GAAgB;GAAY;GAAS;EAAM,CAAC;CAC/D,GAAG;EAAC;EAAgB;EAAY;EAAI;EAAS;EAAO;CAAQ,CAAC;CAE7D,sBAAsB,aAAa,EAAE,GAAG,CAAC,IAAI,UAAU,CAAC;CAExD,IAAI,CAAC,KAAK,OAAO,KAAA;CACjB,OAAO;EAAE,GAAG;EAAK,UAAU,IAAI,aAAa;CAAG;AACjD;;;;;AAMA,IAAa,yBACX,OACA,YACA,eAEA,YAAY,SACT;CACH,MAAM,EAAE,UAAU,WAAW,eAAe,iBAAiB;CAC7D,MAAM,KAAK,MAAM;CACjB,MAAM,WAAW,aAAa,cAAc,UAAU,CAAC;CACvD,gBAAgB;EACd,SAAS,gBAAgB,cAAc,UAAU;CACnD,CAAC;CAED,gBAAgB;EACd,SAAS,UAAU,SAAS,QAAQ,CAAC;EACrC,aAAa,WAAW,EAAE;CAC5B,GAAG;EAAC;EAAI;EAAU;CAAU,CAAC;CAE7B,MAAM,UAAU,CAAC,mBAAmB,OAAO,UAAU;CACrD,MAAM,WAAW,aAAa,CAAC,mBAAmB,KAAK;CACvD,gBAAgB;EACd,UAAU,IAAI;GAAE;GAAU;EAAQ,CAAC;CACrC,GAAG;EAAC;EAAI;EAAU;EAAS;CAAS,CAAC;AACvC"}
@@ -1,55 +0,0 @@
1
- import { BoxProps } from '@chakra-ui/react/box';
2
- import { ReactNode } from 'react';
3
- export interface BitkitFilterProps extends Omit<BoxProps, 'children'> {
4
- /**
5
- * The filters: `BitkitFilter.Switch`, `.Select`, `.DateRange`, `.Add` and `.Search`, in the
6
- * order they appear. `.Search` always sits at the end of the bar.
7
- */
8
- children: ReactNode;
9
- /**
10
- * Where a capped content block sits: `center` over a centred page column, `start` over one that
11
- * starts against a sidebar. Pass the same alignment as the page header and content below it.
12
- * Only applies with a `contentWidth` in rems. Desktop only.
13
- */
14
- contentAlign?: 'center' | 'start';
15
- /**
16
- * Lines the bar up with the page content below it, for a bar under a page header: it gains a
17
- * bottom border and the page's inline padding. Pass the content column's `max-width` in rems to
18
- * cap the bar's content with it (padded 32 on both sides), or `'full'` for a full-width column
19
- * (24 at the start, like the default `BitkitPageHeader`, and 32 at the end).
20
- *
21
- * Without it the bar has the tighter inset of a filter above a table. Desktop only.
22
- */
23
- contentWidth?: `${number}rem` | 'full';
24
- /**
25
- * Forces the desktop bar or the mobile "Filters" dialog. Defaults to the viewport: mobile below the
26
- * tablet breakpoint. The mobile dialog is made for narrow screens; from tablet up it is a 320px drawer.
27
- */
28
- device?: 'desktop' | 'mobile';
29
- /**
30
- * Called once on "Clear filters" in place of handing each changed filter its `resetValue` — for a
31
- * page that resets them all in one write, e.g. one URL update. The `resetValue`s still decide when
32
- * the button shows.
33
- */
34
- onClear?: () => void;
35
- /**
36
- * Shows "Clear filters" while any filter differs from its `resetValue`. It hands each of those
37
- * filters its `resetValue` back through its own `onValueChange`, or calls `onClear`.
38
- */
39
- showClear?: boolean;
40
- /** Shows the filter icon at the start of the bar. Desktop only. */
41
- showIcon?: boolean;
42
- /** `loading`: while the page's data loads, the filters can't be opened, removed or cleared. The search stays usable. */
43
- state?: 'loading';
44
- }
45
- declare const _default: import('react').ForwardRefExoticComponent<BitkitFilterProps & import('react').RefAttributes<HTMLDivElement>> & {
46
- Add: {
47
- ({ children }: import('./BitkitFilterAdd').BitkitFilterAddProps): import('react').JSX.Element;
48
- displayName: string;
49
- };
50
- DateRange: import('react').ForwardRefExoticComponent<import('./BitkitFilterDateRange').BitkitFilterDateRangeProps & import('react').RefAttributes<HTMLButtonElement>>;
51
- Search: import('react').ForwardRefExoticComponent<import('./BitkitFilterSearch').BitkitFilterSearchProps & import('react').RefAttributes<HTMLInputElement>>;
52
- Select: import('react').ForwardRefExoticComponent<import('./BitkitFilterSelect').BitkitFilterSelectProps & import('react').RefAttributes<HTMLButtonElement>>;
53
- Switch: import('react').ForwardRefExoticComponent<import('./BitkitFilterSwitch').BitkitFilterSwitchProps & import('react').RefAttributes<HTMLElement>>;
54
- };
55
- export default _default;
@@ -1,247 +0,0 @@
1
- import { withSubComponents } from "../../utilities/withSubComponents.js";
2
- import IconCross from "../../icons/IconCross.js";
3
- import IconFilter from "../../icons/IconFilter.js";
4
- import { usePortalContext } from "../../utilities/BitkitPortalContext.js";
5
- import BitkitCloseButton from "../BitkitCloseButton/BitkitCloseButton.js";
6
- import BitkitBadge from "../BitkitBadge/BitkitBadge.js";
7
- import { flattenChildren } from "../../utilities/flattenChildren.js";
8
- import BitkitButton from "../BitkitButton/BitkitButton.js";
9
- import useResponsive from "../../hooks/useResponsive.js";
10
- import { FilterContextProvider } from "./BitkitFilter.context.js";
11
- import BitkitFilterAdd from "./BitkitFilterAdd.js";
12
- import BitkitFilterDateRange from "./BitkitFilterDateRange.js";
13
- import BitkitFilterSearch from "./BitkitFilterSearch.js";
14
- import BitkitFilterSelect from "./BitkitFilterSelect.js";
15
- import BitkitFilterSwitch from "./BitkitFilterSwitch.js";
16
- import { Box } from "@chakra-ui/react/box";
17
- import { chakra, useSlotRecipe } from "@chakra-ui/react/styled-system";
18
- import { forwardRef, useCallback, useEffect, useMemo, useRef, useState } from "react";
19
- import { jsx, jsxs } from "react/jsx-runtime";
20
- import { Portal } from "@chakra-ui/react/portal";
21
- import { Drawer } from "@chakra-ui/react/drawer";
22
- //#region lib/components/BitkitFilter/BitkitFilter.tsx
23
- var toggle = (set, id, isIn) => {
24
- if (set.has(id) === isIn) return set;
25
- const next = new Set(set);
26
- if (isIn) next.add(id);
27
- else next.delete(id);
28
- return next;
29
- };
30
- /**
31
- * A bar of filters above a list. Each filter is a controlled sub-component with its own `value` and
32
- * `onValueChange`; the bar lays them out and offers "Clear filters" across all of them.
33
- *
34
- * Below the tablet breakpoint the bar collapses into a "Filters" button opening a full-screen dialog,
35
- * where every filter is a field opening its own view. A filter still applies on its view's "Apply".
36
- */
37
- var BitkitFilter = forwardRef((props, ref) => {
38
- const { children, contentAlign, contentWidth, css, device, onClear, showClear = true, showIcon = true, state, ...rest } = props;
39
- const { isMobile: isMobileViewport } = useResponsive();
40
- const isMobile = device ? device === "mobile" : isMobileViewport;
41
- const isDisabled = state === "loading";
42
- const { disablePortal } = usePortalContext();
43
- const [isDialogOpen, setIsDialogOpen] = useState(false);
44
- const recipe = useSlotRecipe({ key: "filter" });
45
- let pageLayout;
46
- if (contentWidth) pageLayout = contentWidth === "full" ? "full" : "capped";
47
- const styles = recipe({
48
- contentAlign: pageLayout === "capped" ? contentAlign : void 0,
49
- pageLayout
50
- });
51
- const resets = useRef(/* @__PURE__ */ new Map());
52
- const [dirtyIds, setDirtyIds] = useState(/* @__PURE__ */ new Set());
53
- const [activeIds, setActiveIds] = useState(/* @__PURE__ */ new Set());
54
- const register = useCallback((id, reset) => {
55
- resets.current.set(id, reset);
56
- }, []);
57
- const setStatus = useCallback((id, { isActive, isDirty }) => {
58
- setDirtyIds((prev) => toggle(prev, id, isDirty));
59
- setActiveIds((prev) => toggle(prev, id, isActive));
60
- }, []);
61
- const unregister = useCallback((id) => {
62
- resets.current.delete(id);
63
- setStatus(id, {
64
- isActive: false,
65
- isDirty: false
66
- });
67
- }, [setStatus]);
68
- const context = useMemo(() => ({
69
- isDisabled,
70
- isMobile,
71
- register,
72
- setStatus,
73
- styles,
74
- unregister
75
- }), [
76
- isDisabled,
77
- isMobile,
78
- register,
79
- setStatus,
80
- styles,
81
- unregister
82
- ]);
83
- const filters = [];
84
- const searches = [];
85
- flattenChildren(children).forEach((child) => {
86
- if (child.type === BitkitFilterSearch) searches.push(child);
87
- else filters.push(child);
88
- });
89
- const isDirty = dirtyIds.size > 0;
90
- const activeCount = activeIds.size;
91
- const focusTarget = useRef(null);
92
- const isFocusPending = useRef(false);
93
- const clearAll = () => {
94
- if (isDisabled) return;
95
- isFocusPending.current = true;
96
- document.addEventListener("focusin", () => {
97
- isFocusPending.current = false;
98
- }, { once: true });
99
- if (onClear) onClear();
100
- else dirtyIds.forEach((id) => resets.current.get(id)?.());
101
- };
102
- useEffect(() => {
103
- if (!isFocusPending.current || isDirty) return;
104
- isFocusPending.current = false;
105
- const active = document.activeElement;
106
- if (active && active !== document.body && !active.matches("[data-filter-clear]")) return;
107
- focusTarget.current?.querySelector("button:not(:disabled), input:not(:disabled)")?.focus();
108
- }, [isDirty]);
109
- const disabledProps = {
110
- "aria-disabled": isDisabled || void 0,
111
- "data-disabled": isDisabled ? "" : void 0
112
- };
113
- const clearProps = {
114
- ...disabledProps,
115
- "data-filter-clear": "",
116
- onClick: clearAll
117
- };
118
- if (isMobile) return /* @__PURE__ */ jsx(FilterContextProvider, {
119
- value: context,
120
- children: /* @__PURE__ */ jsxs(Box, {
121
- css,
122
- ref,
123
- ...rest,
124
- children: [
125
- /* @__PURE__ */ jsxs(Box, {
126
- css: styles.mobileBar,
127
- ref: isDialogOpen ? void 0 : focusTarget,
128
- children: [/* @__PURE__ */ jsxs(chakra.button, {
129
- "aria-expanded": isDialogOpen,
130
- "aria-haspopup": "dialog",
131
- "aria-label": `Filters, ${activeCount} applied`,
132
- ...disabledProps,
133
- css: styles.mobileTrigger,
134
- onClick: () => !isDisabled && setIsDialogOpen(true),
135
- type: "button",
136
- children: [
137
- /* @__PURE__ */ jsx(IconFilter, { size: "16" }),
138
- "Filters",
139
- /* @__PURE__ */ jsx(BitkitBadge, {
140
- colorVariant: activeCount ? "purple" : "neutral",
141
- children: activeCount
142
- })
143
- ]
144
- }), showClear && isDirty && /* @__PURE__ */ jsx(BitkitButton, {
145
- ...clearProps,
146
- icon: IconCross,
147
- size: "sm",
148
- variant: "tertiary",
149
- children: "Clear filters"
150
- })]
151
- }),
152
- searches,
153
- /* @__PURE__ */ jsx(Drawer.Root, {
154
- lazyMount: false,
155
- onOpenChange: ({ open }) => setIsDialogOpen(open),
156
- open: isDialogOpen,
157
- unmountOnExit: false,
158
- children: /* @__PURE__ */ jsx(Portal, {
159
- disabled: disablePortal,
160
- children: /* @__PURE__ */ jsx(Drawer.Positioner, { children: /* @__PURE__ */ jsxs(Drawer.Content, { children: [
161
- /* @__PURE__ */ jsxs(Box, {
162
- css: styles.mobileHeader,
163
- children: [/* @__PURE__ */ jsx(Drawer.Title, {
164
- css: styles.mobileTitle,
165
- unstyled: true,
166
- children: "Filters"
167
- }), /* @__PURE__ */ jsx(Drawer.CloseTrigger, {
168
- asChild: true,
169
- unstyled: true,
170
- children: /* @__PURE__ */ jsx(BitkitCloseButton, { size: "sm" })
171
- })]
172
- }),
173
- /* @__PURE__ */ jsx(Drawer.Body, {
174
- css: styles.mobileBody,
175
- ref: isDialogOpen ? focusTarget : void 0,
176
- children: filters
177
- }),
178
- /* @__PURE__ */ jsx(Drawer.Footer, { children: /* @__PURE__ */ jsxs(Box, {
179
- css: styles.mobileFooter,
180
- children: [showClear && /* @__PURE__ */ jsx(BitkitButton, {
181
- ...clearProps,
182
- size: "md",
183
- state: isDirty ? void 0 : "disabled",
184
- variant: "secondary",
185
- children: "Clear filters"
186
- }), /* @__PURE__ */ jsx(BitkitButton, {
187
- onClick: () => setIsDialogOpen(false),
188
- size: "md",
189
- children: "Show results"
190
- })]
191
- }) })
192
- ] }) })
193
- })
194
- })
195
- ]
196
- })
197
- });
198
- return /* @__PURE__ */ jsx(FilterContextProvider, {
199
- value: context,
200
- children: /* @__PURE__ */ jsx(Box, {
201
- css: [styles.root, css],
202
- ref,
203
- ...rest,
204
- children: /* @__PURE__ */ jsxs(Box, {
205
- css: styles.content,
206
- maxWidth: contentWidth === "full" ? void 0 : contentWidth,
207
- ref: focusTarget,
208
- children: [/* @__PURE__ */ jsxs(Box, {
209
- css: styles.filters,
210
- children: [
211
- showIcon && /* @__PURE__ */ jsx(Box, {
212
- css: styles.icon,
213
- children: /* @__PURE__ */ jsx(IconFilter, {})
214
- }),
215
- /* @__PURE__ */ jsx(Box, {
216
- css: styles.items,
217
- children: filters
218
- }),
219
- showClear && isDirty && /* @__PURE__ */ jsx(BitkitButton, {
220
- ...clearProps,
221
- flexShrink: "0",
222
- icon: IconCross,
223
- size: "sm",
224
- variant: "tertiary",
225
- children: "Clear filters"
226
- })
227
- ]
228
- }), searches.length > 0 && /* @__PURE__ */ jsx(Box, {
229
- css: styles.searchBlock,
230
- children: searches
231
- })]
232
- })
233
- })
234
- });
235
- });
236
- BitkitFilter.displayName = "BitkitFilter";
237
- var BitkitFilter_default = withSubComponents(BitkitFilter, {
238
- Add: BitkitFilterAdd,
239
- DateRange: BitkitFilterDateRange,
240
- Search: BitkitFilterSearch,
241
- Select: BitkitFilterSelect,
242
- Switch: BitkitFilterSwitch
243
- });
244
- //#endregion
245
- export { BitkitFilter_default as default };
246
-
247
- //# sourceMappingURL=BitkitFilter.js.map