@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 +0,0 @@
1
- {"version":3,"file":"FilterSelectForm.js","names":["_Fragment","BitkitList"],"sources":["../../../../lib/components/BitkitFilter/components/FilterSelectForm.tsx"],"sourcesContent":["import { Box } from '@chakra-ui/react/box';\nimport { createListCollection } from '@chakra-ui/react/collection';\nimport { Listbox } from '@chakra-ui/react/listbox';\nimport { HStack } from '@chakra-ui/react/stack';\nimport { useSlotRecipe } from '@chakra-ui/react/styled-system';\nimport { Text } from '@chakra-ui/react/text';\nimport { Fragment, type ReactNode, useEffect, useId, useMemo, useRef, useState } from 'react';\n\nimport { type BitkitIconComponent, IconCheck } from '../../../icons';\nimport { type BitkitColorToken } from '../../../theme/themeUtils';\nimport BitkitCheckbox from '../../BitkitCheckbox/BitkitCheckbox';\nimport BitkitCheckboxGroup from '../../BitkitCheckboxGroup/BitkitCheckboxGroup';\nimport BitkitGroupHeading from '../../BitkitGroupHeading/BitkitGroupHeading';\nimport BitkitInlineLoading from '../../BitkitInlineLoading/BitkitInlineLoading';\nimport BitkitList from '../../BitkitList/BitkitList';\nimport BitkitSearchInput from '../../BitkitSearchInput/BitkitSearchInput';\nimport BitkitTextInput from '../../BitkitTextInput/BitkitTextInput';\nimport { useFilterContext } from '../BitkitFilter.context';\nimport { compilePattern, isEqualFilterValue, isPattern, toRunningText } from '../BitkitFilter.utils';\nimport { FilterPanelFooter, FilterPanelHeader } from './FilterPanel';\nimport FilterSearchInput from './FilterSearchInput';\n\nexport interface BitkitFilterSelectItem {\n /**\n * Lists the option under this heading, with the others of the same group. Only the open list shows\n * it: the chip shows the label alone, so the label has to make sense without its group.\n */\n group?: string;\n icon?: BitkitIconComponent;\n /** Colors the icon, e.g. a status: `icon/positive` for \"Passed\". */\n iconColor?: BitkitColorToken<'icon'>;\n label: string;\n /** Unique across all groups. */\n value: string;\n}\n\n/**\n * Gathers the options by `group`, so the list (and its keyboard order) runs group by group. The groups\n * keep their order in `items`, with the ungrouped options (an empty-named group) first; within a\n * group the options keep their order in `options`, e.g. the applied ones first.\n */\nconst groupItems = (options: BitkitFilterSelectItem[], items: BitkitFilterSelectItem[]) => {\n const groups = new Map<string, BitkitFilterSelectItem[]>([['', []]]);\n [...items, ...options].forEach((item) => {\n if (!groups.has(item.group ?? '')) groups.set(item.group ?? '', []);\n });\n options.forEach((option) => groups.get(option.group ?? '')?.push(option));\n return [...groups].filter(([, groupOptions]) => groupOptions.length);\n};\n\n/** The list renders at most this many options; search narrows down the rest. */\nexport const MAX_VISIBLE_ITEMS = 100;\n\n/** Below this many options the list is short enough to scan, so there is no search input. */\nconst SEARCH_THRESHOLD = 5;\n\nexport interface FilterSelectFormProps {\n /** The filter holds a value: the footer offers \"Clear\" instead of the wildcard-mode switch. */\n isEditing: boolean;\n /** Keeps `items` in their own order instead of listing the applied ones first — for a switch's fixed options. */\n isOrderFixed?: boolean;\n /** A value is always applied: no \"Clear\" in the footer. */\n isRequired?: boolean;\n items: BitkitFilterSelectItem[];\n label: string;\n loading?: boolean;\n loadingLabel?: string;\n multiple?: boolean;\n onApply: (value: string[]) => void;\n onCancel: () => void;\n onSearchChange?: (searchText: string) => void;\n pattern?: boolean;\n pluralLabel: string;\n searchPlaceholder?: string;\n /**\n * The applied selection with its labels. Without a search, any of it missing from `items` — e.g.\n * left behind by a server search — is listed first, so it can still be unchecked.\n */\n selectedItems?: BitkitFilterSelectItem[];\n value: string[];\n}\n\n/** The body of a select filter's panel: search, the option list or wildcard pattern, and the footer. */\nconst FilterSelectForm = (props: FilterSelectFormProps) => {\n const {\n isEditing,\n isOrderFixed,\n isRequired,\n items,\n label,\n loading,\n loadingLabel = 'Loading...',\n multiple,\n onApply,\n onCancel,\n onSearchChange,\n pattern,\n pluralLabel,\n searchPlaceholder = 'Search for options',\n selectedItems = [],\n value,\n } = props;\n const { isMobile, styles } = useFilterContext();\n\n const [draft, setDraft] = useState(value);\n const [mode, setMode] = useState<'list' | 'pattern'>(pattern && value[0] && isPattern(value[0]) ? 'pattern' : 'list');\n const [searchText, setSearchText] = useState('');\n // Set once the options have loaded, so a later reload (a search, or clearing it) keeps the search and footer.\n const [hasLoaded, setHasLoaded] = useState(!loading);\n if (!loading && !hasLoaded) setHasLoaded(true);\n\n const onSearchTextChange = (text: string) => {\n setSearchText(text);\n onSearchChange?.(text);\n };\n\n // With `onSearchChange` the consumer filters `items` itself, e.g. on the server. Without a search,\n // the applied options come first. `value` doesn't change while the panel is open, so the order is\n // set when it opens and rows don't jump as options are (un)checked.\n const matchingItems = useMemo(() => {\n if (!searchText) {\n if (isOrderFixed) return items;\n const applied = value.flatMap((selected) => {\n const item = items.find((option) => option.value === selected);\n return item ?? selectedItems.find((option) => option.value === selected) ?? [];\n });\n return [...applied, ...items.filter((item) => !value.includes(item.value))];\n }\n if (onSearchChange) return items;\n const query = searchText.toLowerCase();\n return items.filter((item) => item.label.toLowerCase().includes(query));\n }, [isOrderFixed, items, onSearchChange, searchText, selectedItems, value]);\n\n const visibleGroups = useMemo(\n () => groupItems(matchingItems.slice(0, MAX_VISIBLE_ITEMS), items),\n [items, matchingItems],\n );\n const visibleItems = visibleGroups.flatMap(([, groupItems]) => groupItems);\n // The first load shows only the title and a loading row; later loads keep the input and footer in place.\n const isInitialLoading = !!loading && !hasLoaded;\n const showSearch = !isInitialLoading && (!!onSearchChange || items.length > SEARCH_THRESHOLD);\n const searchLabel = `Search ${toRunningText(pluralLabel)}`;\n const showLimitHelper = matchingItems.length > MAX_VISIBLE_ITEMS;\n\n const patternValue = draft[0] ?? '';\n const isApplyDisabled =\n isEqualFilterValue(draft, value) ||\n (mode === 'pattern' && !(patternValue && isPattern(patternValue))) ||\n (!!isRequired && !draft.length);\n\n // Switching between the list and the pattern moves focus into the new view, so typing goes there.\n const bodyRef = useRef<HTMLDivElement>(null);\n const hasSwitchedMode = useRef(false);\n useEffect(() => {\n if (!hasSwitchedMode.current) return;\n bodyRef.current\n ?.querySelector<HTMLElement>('input:not([type=hidden]), [role=listbox], input[type=checkbox]')\n ?.focus();\n }, [mode]);\n\n let start;\n if (isEditing && !isRequired) {\n start = { label: multiple && isMobile ? 'Clear all' : 'Clear', onClick: () => onApply([]) };\n } else if (pattern && !isEditing) {\n start = {\n label: mode === 'list' ? 'Use wildcard pattern' : 'Select from list',\n onClick: () => {\n hasSwitchedMode.current = true;\n setMode(mode === 'list' ? 'pattern' : 'list');\n setDraft([]);\n },\n };\n }\n\n let list;\n if (loading) {\n list = <BitkitInlineLoading css={styles.loading} label={loadingLabel} size={isMobile ? 'lg' : 'md'} />;\n } else if (!visibleItems.length) {\n list = (\n <Text css={styles.loading} color=\"text/secondary\" textStyle={isMobile ? 'body/lg/regular' : 'body/md/regular'}>\n {searchText ? 'No result. Refine your search term.' : 'No options available.'}\n </Text>\n );\n } else if (multiple && !isMobile) {\n list = (\n <Box css={styles.checkboxList}>\n <BitkitCheckboxGroup aria-label={label} onValueChange={setDraft} size=\"md\" value={draft}>\n {visibleGroups.map(([group, groupItems]) => {\n const checkboxes = groupItems.map((item) => (\n <BitkitCheckbox\n key={item.value}\n labelText={\n item.icon ? (\n <HStack gap=\"4\">\n <item.icon color={item.iconColor} size=\"16\" />\n {item.label}\n </HStack>\n ) : (\n item.label\n )\n }\n value={item.value}\n />\n ));\n return group ? (\n <CheckboxOptionGroup key={group} label={group}>\n {checkboxes}\n </CheckboxOptionGroup>\n ) : (\n <Fragment key={group}>{checkboxes}</Fragment>\n );\n })}\n </BitkitCheckboxGroup>\n {showLimitHelper && <LimitHelper marginBlockStart=\"16\" />}\n </Box>\n );\n } else {\n list = (\n <FilterListbox\n groups={visibleGroups}\n items={visibleItems}\n label={label}\n multiple={multiple}\n onValueChange={setDraft}\n showLimitHelper={showLimitHelper}\n value={draft}\n />\n );\n }\n\n let search = null;\n if (showSearch && isMobile) {\n search = (\n <FilterSearchInput\n label={searchLabel}\n onValueChange={onSearchTextChange}\n placeholder={searchPlaceholder}\n value={searchText}\n />\n );\n } else if (showSearch) {\n search = (\n <Box css={styles.popoverSearch} data-filter-search=\"\">\n <BitkitSearchInput\n label={searchLabel}\n onChange={onSearchTextChange}\n placeholder={searchPlaceholder}\n size=\"md\"\n value={searchText}\n />\n </Box>\n );\n }\n\n const body = (\n <Box css={styles.popoverBody} ref={bodyRef}>\n {mode === 'pattern' ? (\n <FilterPatternBody items={items} onValueChange={setDraft} pluralLabel={pluralLabel} value={patternValue} />\n ) : (\n <>\n {search}\n {list}\n </>\n )}\n </Box>\n );\n\n return (\n <>\n <FilterPanelHeader\n count={multiple && mode === 'list' ? draft.length : undefined}\n title={multiple ? pluralLabel : label}\n />\n {isMobile ? (\n <Box flex=\"1\" overflowY=\"auto\">\n {body}\n </Box>\n ) : (\n body\n )}\n {!isInitialLoading && (\n <FilterPanelFooter\n applyLabel={multiple && mode === 'list' && draft.length ? `Apply (${draft.length})` : undefined}\n isApplyDisabled={isApplyDisabled}\n onApply={() => onApply(mode === 'pattern' ? [patternValue] : draft)}\n onCancel={onCancel}\n start={start}\n />\n )}\n </>\n );\n};\n\n/** A named group of the desktop checkboxes, so a screen reader tells which group an option is in. */\nconst CheckboxOptionGroup = ({ children, label }: { children: ReactNode; label: string }) => {\n const headingId = useId();\n\n return (\n // Stacked like the checkbox group's own children, which its flex column no longer reaches in here.\n <Box aria-labelledby={headingId} display=\"flex\" flexDirection=\"column\" gap=\"12\" role=\"group\">\n {/* The list pads 20; the heading lines up 24 from the popover's edge, like the listbox's. */}\n <BitkitGroupHeading id={headingId} label={label} paddingBlockStart=\"12\" paddingInline=\"4\" />\n {children}\n </Box>\n );\n};\n\nconst LimitHelper = ({ marginBlockStart }: { marginBlockStart?: '16' }) => {\n const { styles } = useFilterContext();\n\n return (\n <Text css={styles.listHelperText} marginBlockStart={marginBlockStart}>\n Showing the first {MAX_VISIBLE_ITEMS} options. Search to find more.\n </Text>\n );\n};\n\ninterface FilterListboxProps {\n groups: [string, BitkitFilterSelectItem[]][];\n /** `groups` flattened, in the same order: the collection's (and so the keyboard's) order. */\n items: BitkitFilterSelectItem[];\n label: string;\n multiple?: boolean;\n onValueChange: (value: string[]) => void;\n showLimitHelper: boolean;\n value: string[];\n}\n\n/**\n * The option list for a single select, and on mobile for a multiple one too — there the rows are\n * full-width and highlighted when selected, with a checkbox drawn in front.\n */\nconst FilterListbox = (props: FilterListboxProps) => {\n const { groups, items, label, multiple, onValueChange, showLimitHelper, value } = props;\n const { isMobile, styles } = useFilterContext();\n const collection = useMemo(() => createListCollection({ items }), [items]);\n const checkboxStyles = useSlotRecipe({ key: 'checkbox' })({ size: 'lg' });\n\n const checkIndicator = (\n <Listbox.ItemIndicator>\n <IconCheck size=\"16\" />\n </Listbox.ItemIndicator>\n );\n\n const renderItem = (item: BitkitFilterSelectItem) => {\n const state = value.includes(item.value) ? 'checked' : 'unchecked';\n const check = multiple ? (\n // Drawn, not a real checkbox: the option row is the control, and a nested input would be a second one.\n <Box aria-hidden css={[checkboxStyles.control, styles.mobileListCheckbox]} data-state={state}>\n <IconCheck />\n </Box>\n ) : (\n <Box aria-hidden css={styles.mobileListCheck} data-state={state}>\n <IconCheck size=\"16\" />\n </Box>\n );\n return (\n <Listbox.Item item={item} key={item.value}>\n {isMobile && check}\n {!!item.icon && <item.icon color={item.iconColor} size={isMobile ? '24' : '16'} />}\n <Listbox.ItemText>{item.label}</Listbox.ItemText>\n {!isMobile && checkIndicator}\n </Listbox.Item>\n );\n };\n\n return (\n <Listbox.Root\n collection={collection}\n onValueChange={(details) => onValueChange(details.value)}\n selectionMode={multiple ? 'multiple' : 'single'}\n size={isMobile ? 'lg' : 'md'}\n value={value}\n >\n {/* Zag points the content's aria-labelledby at the label, so it has to exist. */}\n <Listbox.Label srOnly>{label}</Listbox.Label>\n <Listbox.Content>\n {/* Ungrouped options sit straight in the list: a group around them would have no name. */}\n {groups.map(([group, groupItems]) =>\n group ? (\n <Listbox.ItemGroup key={group}>\n <Listbox.ItemGroupLabel asChild>\n <BitkitGroupHeading label={group} paddingBlockStart=\"12\" paddingInline=\"24\" />\n </Listbox.ItemGroupLabel>\n {groupItems.map(renderItem)}\n </Listbox.ItemGroup>\n ) : (\n groupItems.map(renderItem)\n ),\n )}\n </Listbox.Content>\n {/* Outside the content, whose `listbox` role allows only options and groups. */}\n {showLimitHelper && (\n <Box paddingBlockStart=\"8\" paddingInline=\"24\">\n <LimitHelper />\n </Box>\n )}\n </Listbox.Root>\n );\n};\n\ninterface FilterPatternBodyProps {\n items: BitkitFilterSelectItem[];\n onValueChange: (value: string[]) => void;\n pluralLabel: string;\n value: string;\n}\n\nconst FilterPatternBody = ({ items, onValueChange, pluralLabel, value }: FilterPatternBodyProps) => {\n const { isMobile, styles } = useFilterContext();\n const noun = toRunningText(pluralLabel);\n const matches = useMemo(() => {\n if (!isPattern(value)) return null;\n const regExp = compilePattern(value);\n return items.filter((item) => !isPattern(item.label) && regExp.test(item.label));\n }, [items, value]);\n\n let results;\n if (!matches) {\n results = (\n <Text color=\"text/secondary\" textStyle=\"body/md/regular\">\n Enter a pattern with the wildcard &lsquo;*&rsquo; to view {noun} with matching names.\n </Text>\n );\n } else if (!matches.length) {\n results = (\n <Text color=\"text/tertiary\" textStyle=\"body/md/regular\">\n (no matching {noun})\n </Text>\n );\n } else {\n results = (\n <>\n <BitkitList size=\"md\">\n {matches.slice(0, MAX_VISIBLE_ITEMS).map((item) => (\n <BitkitList.Item key={item.value}>{item.label}</BitkitList.Item>\n ))}\n </BitkitList>\n {matches.length > MAX_VISIBLE_ITEMS && (\n <Text css={styles.listHelperText} marginBlockStart=\"16\">\n Showing the first {MAX_VISIBLE_ITEMS} matches.\n </Text>\n )}\n </>\n );\n }\n\n return (\n <Box css={styles.pattern} data-filter-pattern=\"\">\n <BitkitTextInput\n helperText=\"Allowed wildcard character: *\"\n label=\"Wildcard pattern\"\n onValueChange={(text) => onValueChange(text ? [text] : [])}\n placeholder=\"(e.g. *main*, release-*)\"\n size={isMobile ? 'lg' : 'md'}\n value={value}\n />\n <Box css={styles.patternResults}>\n <Text css={styles.patternResultsLabel}>Matching results{matches?.length ? ` (${matches.length})` : ''}</Text>\n {results}\n </Box>\n </Box>\n );\n};\n\nexport default FilterSelectForm;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,IAAM,cAAc,SAAmC,UAAoC;CACzF,MAAM,yBAAS,IAAI,IAAsC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;CACnE,CAAC,GAAG,OAAO,GAAG,OAAO,CAAC,CAAC,SAAS,SAAS;EACvC,IAAI,CAAC,OAAO,IAAI,KAAK,SAAS,EAAE,GAAG,OAAO,IAAI,KAAK,SAAS,IAAI,CAAC,CAAC;CACpE,CAAC;CACD,QAAQ,SAAS,WAAW,OAAO,IAAI,OAAO,SAAS,EAAE,CAAC,EAAE,KAAK,MAAM,CAAC;CACxE,OAAO,CAAC,GAAG,MAAM,CAAC,CAAC,QAAQ,GAAG,kBAAkB,aAAa,MAAM;AACrE;;AAMA,IAAM,mBAAmB;;AA6BzB,IAAM,oBAAoB,UAAiC;CACzD,MAAM,EACJ,WACA,cACA,YACA,OACA,OACA,SACA,eAAe,cACf,UACA,SACA,UACA,gBACA,SACA,aACA,oBAAoB,sBACpB,gBAAgB,CAAC,GACjB,UACE;CACJ,MAAM,EAAE,UAAU,WAAW,iBAAiB;CAE9C,MAAM,CAAC,OAAO,YAAY,SAAS,KAAK;CACxC,MAAM,CAAC,MAAM,WAAW,SAA6B,WAAW,MAAM,MAAM,UAAU,MAAM,EAAE,IAAI,YAAY,MAAM;CACpH,MAAM,CAAC,YAAY,iBAAiB,SAAS,EAAE;CAE/C,MAAM,CAAC,WAAW,gBAAgB,SAAS,CAAC,OAAO;CACnD,IAAI,CAAC,WAAW,CAAC,WAAW,aA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M;EAAgB,WAAU;EAAtC,UAAA;GAAwD;GACxC;GAAK;EACf;;MAGR,UACE,qBAAAA,YAAA,EAAA,UAAA,CACE,oBAACC,oBAAD;EAAY,MAAK;EACd,UAAA,QAAQ,MAAM,GAAA,GAAoB,CAAC,CAAC,KAAK,SACxC,oBAACA,mBAAW,MAAZ,EAAA,UAAmC,KAAK,MAAuB,GAAzC,KAAK,KAAoC,CAChE;CACS,CAAA,GACX,QAAQ,SAAA,OACP,qBAAC,MAAD;EAAM,KAAK,OAAO;EAAgB,kBAAiB;EAAnD,UAAA;GAAwD;;GACjB;EACjC;CAER,CAAA,CAAA,EAAA,CAAA;CAIN,OACE,qBAAC,KAAD;EAAK,KAAK,OAAO;EAAS,uBAAoB;EAA9C,UAAA,CACE,oBAAC,iBAAD;GACE,YAAW;GACX,OAAM;GACN,gBAAgB,SAAS,cAAc,OAAO,CAAC,IAAI,IAAI,CAAC,CAAC;GACzD,aAAY;GACZ,MAAM,WAAW,OAAO;GACjB;EACR,CAAA,GACD,qBAAC,KAAD;GAAK,KAAK,OAAO;GAAjB,UAAA,CACE,qBAAC,MAAD;IAAM,KAAK,OAAO;IAAlB,UAAA,CAAuC,oBAAiB,SAAS,SAAS,KAAK,QAAQ,OAAO,KAAK,EAAS;GAC3G,CAAA,GAAA,OACE;EACF,CAAA,CAAA;;AAET"}
@@ -1,525 +0,0 @@
1
- declare const recipes: {
2
- badge: import('@chakra-ui/react').RecipeDefinition<{
3
- size: {
4
- xs: {
5
- minWidth: "20";
6
- paddingBlock: "2";
7
- };
8
- sm: {
9
- minWidth: "24";
10
- paddingBlock: "4";
11
- };
12
- };
13
- colorVariant: {
14
- neutral: {
15
- color: "color/neutral/strong";
16
- background: "color/neutral/subtle";
17
- };
18
- purple: {
19
- color: "color/purple/strong";
20
- background: "color/purple/subtle";
21
- };
22
- blue: {
23
- color: "color/blue/strong";
24
- background: "color/blue/subtle";
25
- };
26
- green: {
27
- color: "color/green/strong";
28
- background: "color/green/subtle";
29
- };
30
- yellow: {
31
- color: "color/yellow/strong";
32
- background: "color/yellow/subtle";
33
- };
34
- red: {
35
- color: "color/red/strong";
36
- background: "color/red/subtle";
37
- };
38
- orange: {
39
- color: "color/orange/strong";
40
- background: "color/orange/subtle";
41
- };
42
- turquoise: {
43
- color: "color/turquoise/strong";
44
- background: "color/turquoise/subtle";
45
- };
46
- 'ai-gradient': {
47
- color: "status/ai/text";
48
- background: "gradient/ai/background/subtle";
49
- };
50
- };
51
- variant: {
52
- subtle: {};
53
- bold: {
54
- color: "text/on-color";
55
- };
56
- };
57
- }>;
58
- button: import('@chakra-ui/react').RecipeDefinition<{
59
- variant: Record<NonNullable<"primary" | "secondary" | "tertiary" | "danger-primary" | "danger-secondary" | "danger-tertiary" | "ai-primary" | "ai-secondary" | "ai-tertiary">, import('@chakra-ui/react').SystemStyleObject>;
60
- size: {
61
- sm: {
62
- minWidth: "32";
63
- height: "32";
64
- paddingInline: `${number}rem`;
65
- paddingBlock: `${number}rem`;
66
- textStyle: "comp/button/sm";
67
- };
68
- md: {
69
- minWidth: "40";
70
- height: "40";
71
- paddingInline: `${number}rem`;
72
- paddingBlock: `${number}rem`;
73
- textStyle: "comp/button/md";
74
- };
75
- lg: {
76
- minWidth: "48";
77
- height: "48";
78
- padding: `${number}rem`;
79
- textStyle: "comp/button/lg";
80
- };
81
- };
82
- }>;
83
- closeButton: import('@chakra-ui/react').RecipeDefinition<{
84
- size: {
85
- xs: {
86
- h: "24";
87
- w: "24";
88
- };
89
- sm: {
90
- h: "32";
91
- w: "32";
92
- };
93
- md: {
94
- h: "40";
95
- w: "40";
96
- };
97
- };
98
- colorVariant: {
99
- neutral: {
100
- color: "color/neutral/strong";
101
- '&:hover': {
102
- backgroundColor: "color/neutral/subtle";
103
- };
104
- '&:active': {
105
- backgroundColor: "color/neutral/moderate";
106
- };
107
- };
108
- blue: {
109
- color: "color/blue/strong";
110
- '&:hover': {
111
- backgroundColor: "color/blue/subtle";
112
- };
113
- '&:active': {
114
- backgroundColor: "color/blue/moderate";
115
- };
116
- };
117
- green: {
118
- color: "color/green/strong";
119
- '&:hover': {
120
- backgroundColor: "color/green/subtle";
121
- };
122
- '&:active': {
123
- backgroundColor: "color/green/moderate";
124
- };
125
- };
126
- red: {
127
- color: "color/red/strong";
128
- '&:hover': {
129
- backgroundColor: "color/red/subtle";
130
- };
131
- '&:active': {
132
- backgroundColor: "color/red/moderate";
133
- };
134
- };
135
- yellow: {
136
- color: "color/yellow/strong";
137
- '&:hover': {
138
- backgroundColor: "color/yellow/subtle";
139
- };
140
- '&:active': {
141
- backgroundColor: "color/yellow/moderate";
142
- };
143
- };
144
- purple: {
145
- color: "color/purple/strong";
146
- '&:hover': {
147
- backgroundColor: "color/purple/subtle";
148
- };
149
- '&:active': {
150
- backgroundColor: "color/purple/moderate";
151
- };
152
- };
153
- indigo: {
154
- color: "color/indigo/strong";
155
- '&:hover': {
156
- backgroundColor: "color/indigo/subtle";
157
- };
158
- '&:active': {
159
- backgroundColor: "color/indigo/moderate";
160
- };
161
- };
162
- white: {
163
- color: "icon/on-contrast";
164
- };
165
- };
166
- }>;
167
- controlButton: import('@chakra-ui/react').RecipeDefinition<{
168
- isDanger: {
169
- false: {
170
- color: "button/control/fg";
171
- _hover: {
172
- background: "button/control/bg-hover";
173
- color: "button/control/fg-hover";
174
- _active: {
175
- background: "button/control/bg-active";
176
- color: "button/control/fg-active";
177
- };
178
- };
179
- _active: {
180
- background: "button/control/bg-active";
181
- color: "button/control/fg-active";
182
- };
183
- _disabled: {
184
- color: "button/control/fg-disabled!";
185
- };
186
- };
187
- true: {
188
- color: "button/control-danger/fg";
189
- _hover: {
190
- background: "button/control-danger/bg-hover";
191
- color: "button/control-danger/fg-hover";
192
- _active: {
193
- background: "button/control-danger/bg-active";
194
- color: "button/control-danger/fg-active";
195
- };
196
- };
197
- _active: {
198
- background: "button/control-danger/bg-active";
199
- color: "button/control-danger/fg-active";
200
- };
201
- _disabled: {
202
- color: "button/control-danger/fg-disabled!";
203
- };
204
- };
205
- };
206
- size: {
207
- xxs: {
208
- padding: "4";
209
- };
210
- xs: {
211
- padding: "8";
212
- };
213
- sm: {
214
- padding: "4";
215
- };
216
- md: {
217
- padding: "8";
218
- };
219
- lg: {
220
- padding: "12";
221
- };
222
- };
223
- }>;
224
- colorButton: import('@chakra-ui/react').RecipeDefinition<{
225
- size: {
226
- sm: {
227
- height: "32";
228
- paddingInline: "12";
229
- textStyle: "comp/button/sm";
230
- };
231
- md: {
232
- height: "40";
233
- paddingInline: "12";
234
- textStyle: "comp/button/md";
235
- };
236
- lg: {
237
- height: "48";
238
- paddingInline: "16";
239
- textStyle: "comp/button/lg";
240
- };
241
- };
242
- colorVariant: {
243
- neutral: {
244
- color: "color/neutral/strong";
245
- '&:hover': {
246
- backgroundColor: "color/neutral/subtle";
247
- };
248
- '&:active': {
249
- backgroundColor: "color/neutral/moderate";
250
- };
251
- };
252
- blue: {
253
- color: "color/blue/strong";
254
- '&:hover': {
255
- backgroundColor: "color/blue/subtle";
256
- };
257
- '&:active': {
258
- backgroundColor: "color/blue/moderate";
259
- };
260
- };
261
- green: {
262
- color: "color/green/strong";
263
- '&:hover': {
264
- backgroundColor: "color/green/subtle";
265
- };
266
- '&:active': {
267
- backgroundColor: "color/green/moderate";
268
- };
269
- };
270
- red: {
271
- color: "color/red/strong";
272
- '&:hover': {
273
- backgroundColor: "color/red/subtle";
274
- };
275
- '&:active': {
276
- backgroundColor: "color/red/moderate";
277
- };
278
- };
279
- yellow: {
280
- color: "color/yellow/strong";
281
- '&:hover': {
282
- backgroundColor: "color/yellow/subtle";
283
- };
284
- '&:active': {
285
- backgroundColor: "color/yellow/moderate";
286
- };
287
- };
288
- purple: {
289
- color: "color/purple/strong";
290
- '&:hover': {
291
- backgroundColor: "color/purple/subtle";
292
- };
293
- '&:active': {
294
- backgroundColor: "color/purple/moderate";
295
- };
296
- };
297
- orange: {
298
- color: "color/orange/strong";
299
- '&:hover': {
300
- backgroundColor: "color/orange/subtle";
301
- };
302
- '&:active': {
303
- backgroundColor: "color/orange/moderate";
304
- };
305
- };
306
- turquoise: {
307
- color: "color/turquoise/strong";
308
- '&:hover': {
309
- backgroundColor: "color/turquoise/subtle";
310
- };
311
- '&:active': {
312
- backgroundColor: "color/turquoise/moderate";
313
- };
314
- };
315
- indigo: {
316
- color: "color/indigo/strong";
317
- '&:hover': {
318
- backgroundColor: "color/indigo/subtle";
319
- };
320
- '&:active': {
321
- backgroundColor: "color/indigo/moderate";
322
- };
323
- };
324
- white: {
325
- color: "text/on-color";
326
- borderColor: "border/inverse";
327
- '&:hover': {
328
- backgroundColor: "color/white/15";
329
- };
330
- '&:active': {
331
- backgroundColor: "color/white/30";
332
- };
333
- };
334
- };
335
- }>;
336
- definitionTooltip: import('@chakra-ui/react').RecipeDefinition<{
337
- method: {
338
- click: {
339
- cursor: "pointer";
340
- };
341
- hover: {
342
- cursor: "default";
343
- };
344
- };
345
- textSize: {
346
- lg: {
347
- textStyle: "body/lg/regular";
348
- };
349
- md: {
350
- textStyle: "body/md/regular";
351
- textUnderlineOffset: "0.25em";
352
- };
353
- sm: {
354
- textStyle: "body/sm/regular";
355
- textUnderlineOffset: "0.25em";
356
- };
357
- };
358
- }>;
359
- icon: import('@chakra-ui/react').RecipeDefinition<import('@chakra-ui/react').RecipeVariantRecord>;
360
- input: import('@chakra-ui/react').RecipeDefinition<{
361
- size: {
362
- md: {
363
- paddingInline: `${number}rem`;
364
- paddingBlock: `${number}rem`;
365
- textStyle: "body/md/regular";
366
- '--input-height': `${number}rem`;
367
- };
368
- lg: {
369
- paddingInline: `${number}rem`;
370
- paddingBlock: `${number}rem`;
371
- textStyle: "body/lg/regular";
372
- '--input-height': `${number}rem`;
373
- };
374
- };
375
- }>;
376
- inputAddon: import('@chakra-ui/react').RecipeDefinition<{
377
- position: {
378
- start: {
379
- borderInlineStartWidth: "1";
380
- borderStartStartRadius: "4";
381
- borderEndStartRadius: "4";
382
- };
383
- end: {
384
- borderInlineWidth: "1";
385
- borderStartEndRadius: "4";
386
- borderEndEndRadius: "4";
387
- };
388
- };
389
- size: {
390
- md: {
391
- paddingInline: `${number}rem`;
392
- textStyle: "body/md/regular";
393
- };
394
- lg: {
395
- paddingInline: `${number}rem`;
396
- textStyle: "body/lg/regular";
397
- };
398
- };
399
- }>;
400
- link: import('@chakra-ui/react').RecipeDefinition<{
401
- colorVariant: {
402
- purple: {
403
- color: "text/link";
404
- _hover: {
405
- color: "text/link-hover";
406
- };
407
- };
408
- };
409
- }>;
410
- linkButton: import('@chakra-ui/react').RecipeDefinition<{
411
- size: {
412
- lg: {
413
- textStyle: "body/lg/regular";
414
- };
415
- md: {
416
- textStyle: "body/md/regular";
417
- };
418
- sm: {
419
- textStyle: "body/sm/regular";
420
- };
421
- };
422
- }>;
423
- selectableTag: import('@chakra-ui/react').RecipeDefinition<import('@chakra-ui/react').RecipeVariantRecord>;
424
- separator: import('@chakra-ui/react').RecipeDefinition<{
425
- variant: {};
426
- orientation: {
427
- horizontal: {
428
- borderTopWidth: "var(--separator-thickness)";
429
- width: "100%";
430
- };
431
- vertical: {
432
- borderInlineStartWidth: "var(--separator-thickness)";
433
- minHeight: "20";
434
- };
435
- };
436
- size: {
437
- '1': {
438
- '--separator-thickness': "1px";
439
- };
440
- '2': {
441
- '--separator-thickness': "2px";
442
- };
443
- };
444
- }>;
445
- skeleton: import('@chakra-ui/react').RecipeDefinition<{
446
- loading: {
447
- true: {
448
- position: "relative";
449
- overflow: "hidden";
450
- backgroundColor: "utilities/skeleton";
451
- borderColor: "transparent";
452
- backgroundClip: "padding-box";
453
- cursor: "default";
454
- color: "transparent";
455
- pointerEvents: "none";
456
- userSelect: "none";
457
- flexShrink: "0";
458
- '&::before, *': {
459
- visibility: "hidden";
460
- };
461
- '&::after': import('@chakra-ui/react').SystemStyleObject;
462
- };
463
- false: {
464
- animation: "fade-in var(--fade-duration, 0.1s) ease-out !important";
465
- };
466
- };
467
- }>;
468
- spinner: import('@chakra-ui/react').RecipeDefinition<{
469
- size: {
470
- md: {
471
- '--spinner-size': "sizes.12";
472
- };
473
- lg: {
474
- '--spinner-size': "sizes.20";
475
- };
476
- };
477
- variant: {
478
- primary: {
479
- '--spinner-color': "colors.icon/primary";
480
- };
481
- purple: {
482
- '--spinner-color': "colors.color/purple/strong";
483
- };
484
- white: {
485
- '--spinner-color': "colors.icon/on-color";
486
- };
487
- 'on-disabled': {
488
- '--spinner-color': "colors.icon/on-disabled";
489
- };
490
- };
491
- }>;
492
- textarea: import('@chakra-ui/react').RecipeDefinition<{
493
- size: {
494
- md: {
495
- '&[rows="1"]': {
496
- paddingBlock: `${number}rem`;
497
- };
498
- paddingInline: `${number}rem`;
499
- paddingBlock: `${number}rem`;
500
- textStyle: "body/md/regular";
501
- '--input-height': `${number}rem`;
502
- };
503
- lg: {
504
- paddingInline: `${number}rem`;
505
- paddingBlock: `${number}rem`;
506
- textStyle: "body/lg/regular";
507
- '--input-height': `${number}rem`;
508
- };
509
- };
510
- }>;
511
- toggleButton: import('@chakra-ui/react').RecipeDefinition<{
512
- size: {
513
- sm: {
514
- padding: "8";
515
- };
516
- md: {
517
- padding: "12";
518
- };
519
- lg: {
520
- padding: "12";
521
- };
522
- };
523
- }>;
524
- };
525
- export default recipes;
@@ -1,37 +0,0 @@
1
- declare const filterSlotRecipe: import('@chakra-ui/react').SlotRecipeDefinition<"search" | "content" | "pattern" | "switch" | "icon" | "field" | "root" | "loading" | "items" | "searchInput" | "addSheetBackdrop" | "addSheetPositioner" | "addSheet" | "addMenu" | "addMenuLabel" | "addSheetItem" | "addMenuItem" | "addMenuIcon" | "addSheetItemReason" | "chip" | "chipLabel" | "chipTrigger" | "chipRemove" | "chipIcon" | "chipValue" | "chipChevron" | "fieldLabel" | "fieldControl" | "fieldTrigger" | "fieldRemove" | "fieldIcon" | "fieldValue" | "fieldChevron" | "mobilePanelHeader" | "popoverFooter" | "mobileFooter" | "popoverFooterStart" | "mobilePanelOverline" | "mobilePanelTitle" | "popoverContent" | "calendarFooter" | "mobileSearch" | "mobileSearchInput" | "popoverBody" | "checkboxList" | "popoverSearch" | "listHelperText" | "mobileListCheckbox" | "mobileListCheck" | "patternResults" | "patternResultsLabel" | "switchItem" | "switchItemText" | "filters" | "searchBlock" | "mobileBar" | "mobileTrigger" | "mobileHeader" | "mobileTitle" | "mobileBody", {
2
- pageLayout: {
3
- capped: {
4
- root: {
5
- borderBlockEndWidth: "1";
6
- borderColor: "border/regular";
7
- paddingInline: {
8
- base: "16";
9
- tablet: "32";
10
- };
11
- };
12
- };
13
- full: {
14
- root: {
15
- borderBlockEndWidth: "1";
16
- borderColor: "border/regular";
17
- paddingInlineEnd: {
18
- base: "16";
19
- tablet: "32";
20
- };
21
- paddingInlineStart: {
22
- base: "16";
23
- tablet: "24";
24
- };
25
- };
26
- };
27
- };
28
- contentAlign: {
29
- center: {};
30
- start: {
31
- root: {
32
- justifyContent: "flex-start";
33
- };
34
- };
35
- };
36
- }>;
37
- export default filterSlotRecipe;