@navikt/ds-react 5.5.0 → 5.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_docs.json +507 -106
- package/cjs/accordion/Accordion.js +1 -0
- package/cjs/accordion/AccordionContext.js +1 -1
- package/cjs/accordion/AccordionHeader.js +2 -2
- package/cjs/accordion/AccordionItem.js +6 -2
- package/cjs/date/datepicker/DatePicker.js +30 -34
- package/cjs/date/datepicker/DatePickerStandalone.js +23 -26
- package/cjs/date/datepicker/parts/Caption.js +28 -0
- package/cjs/date/datepicker/{DayButton.js → parts/DayButton.js} +1 -2
- package/cjs/date/datepicker/{caption → parts}/DropdownCaption.js +13 -7
- package/cjs/date/datepicker/parts/HeadRow.js +36 -0
- package/cjs/date/datepicker/parts/Row.js +23 -0
- package/cjs/date/datepicker/{TableHead.js → parts/TableHead.js} +4 -3
- package/cjs/date/datepicker/parts/WeekNumber.js +35 -0
- package/cjs/date/datepicker/parts/WeekRow.js +34 -0
- package/cjs/date/hooks/useDatepicker.js +2 -2
- package/cjs/date/hooks/useMonthPicker.js +2 -2
- package/cjs/date/hooks/useRangeDatepicker.js +3 -3
- package/cjs/date/monthpicker/MonthSelector.js +1 -1
- package/cjs/date/utils/get-month-weeks.js +46 -0
- package/cjs/date/utils/labels.js +40 -1
- package/cjs/dropdown/Toggle.js +2 -2
- package/cjs/dropdown/index.js +0 -15
- package/cjs/form/Select.js +1 -1
- package/cjs/form/checkbox/useCheckbox.js +3 -4
- package/cjs/form/combobox/Combobox.js +1 -1
- package/cjs/form/combobox/Input/Input.js +1 -1
- package/cjs/form/search/Search.js +3 -1
- package/cjs/index.js +1 -0
- package/cjs/layout/bleed/Bleed.js +69 -0
- package/cjs/layout/bleed/index.js +5 -0
- package/cjs/layout/bleed/package.json +6 -0
- package/cjs/layout/box/Box.js +1 -1
- package/cjs/layout/responsive/Responsive.js +8 -6
- package/cjs/layout/sidemal-test/AvatarPanel.js +18 -0
- package/cjs/layout/sidemal-test/Content.js +66 -0
- package/cjs/layout/sidemal-test/Filter.js +48 -0
- package/cjs/layout/sidemal-test/Header.js +48 -0
- package/cjs/layout/sidemal-test/Intro.js +36 -0
- package/cjs/layout/sidemal-test/Sidebar.js +49 -0
- package/cjs/layout/sidemal-test/content-box/ContentBox.js +65 -0
- package/cjs/layout/sidemal-test/content-box/index.js +8 -0
- package/cjs/layout/sidemal-test/content-box/package.json +6 -0
- package/cjs/layout/stack/Stack.js +2 -2
- package/cjs/layout/stack/index.js +3 -1
- package/cjs/layout/utilities/css.js +37 -14
- package/cjs/loader/Loader.js +2 -2
- package/cjs/modal/dialog-polyfill.js +2 -0
- package/cjs/popover/Popover.js +3 -2
- package/cjs/tabs/TabList.js +6 -7
- package/cjs/timeline/Pin.js +20 -20
- package/cjs/timeline/Timeline.js +4 -4
- package/cjs/timeline/period/ClickablePeriod.js +19 -19
- package/cjs/timeline/period/index.js +1 -1
- package/cjs/timeline/utils/timeline.js +3 -3
- package/cjs/toggle-group/ToggleGroup.js +1 -1
- package/cjs/tooltip/Tooltip.js +1 -1
- package/cjs/typography/Heading.js +1 -1
- package/cjs/util/RandomIcon.js +1 -0
- package/cjs/util/Slot.js +88 -0
- package/cjs/util/useId.js +2 -4
- package/esm/accordion/Accordion.js +1 -0
- package/esm/accordion/Accordion.js.map +1 -1
- package/esm/accordion/AccordionContext.d.ts +1 -0
- package/esm/accordion/AccordionContext.js +1 -1
- package/esm/accordion/AccordionContext.js.map +1 -1
- package/esm/accordion/AccordionHeader.js +2 -2
- package/esm/accordion/AccordionHeader.js.map +1 -1
- package/esm/accordion/AccordionItem.js +6 -2
- package/esm/accordion/AccordionItem.js.map +1 -1
- package/esm/date/datepicker/DatePicker.d.ts +14 -5
- package/esm/date/datepicker/DatePicker.js +29 -33
- package/esm/date/datepicker/DatePicker.js.map +1 -1
- package/esm/date/datepicker/DatePickerStandalone.d.ts +3 -2
- package/esm/date/datepicker/DatePickerStandalone.js +22 -25
- package/esm/date/datepicker/DatePickerStandalone.js.map +1 -1
- package/esm/date/datepicker/{caption → parts}/Caption.d.ts +3 -0
- package/esm/date/datepicker/parts/Caption.js +22 -0
- package/esm/date/datepicker/parts/Caption.js.map +1 -0
- package/esm/date/datepicker/parts/DayButton.d.ts +4 -0
- package/esm/date/datepicker/{DayButton.js → parts/DayButton.js} +2 -1
- package/esm/date/datepicker/parts/DayButton.js.map +1 -0
- package/esm/date/datepicker/{caption → parts}/DropdownCaption.d.ts +3 -0
- package/esm/date/datepicker/parts/DropdownCaption.js +44 -0
- package/esm/date/datepicker/parts/DropdownCaption.js.map +1 -0
- package/esm/date/datepicker/parts/HeadRow.d.ts +11 -0
- package/esm/date/datepicker/parts/HeadRow.js +29 -0
- package/esm/date/datepicker/parts/HeadRow.js.map +1 -0
- package/esm/date/datepicker/parts/Row.d.ts +17 -0
- package/esm/date/datepicker/parts/Row.js +19 -0
- package/esm/date/datepicker/parts/Row.js.map +1 -0
- package/esm/date/datepicker/parts/TableHead.d.ts +6 -0
- package/esm/date/datepicker/{TableHead.js → parts/TableHead.js} +5 -2
- package/esm/date/datepicker/parts/TableHead.js.map +1 -0
- package/esm/date/datepicker/parts/WeekNumber.d.ts +13 -0
- package/esm/date/datepicker/parts/WeekNumber.js +31 -0
- package/esm/date/datepicker/parts/WeekNumber.js.map +1 -0
- package/esm/date/datepicker/parts/WeekRow.d.ts +5 -0
- package/esm/date/datepicker/parts/WeekRow.js +30 -0
- package/esm/date/datepicker/parts/WeekRow.js.map +1 -0
- package/esm/date/hooks/useDatepicker.js +2 -2
- package/esm/date/hooks/useDatepicker.js.map +1 -1
- package/esm/date/hooks/useMonthPicker.js +2 -2
- package/esm/date/hooks/useMonthPicker.js.map +1 -1
- package/esm/date/hooks/useRangeDatepicker.js +3 -3
- package/esm/date/hooks/useRangeDatepicker.js.map +1 -1
- package/esm/date/monthpicker/MonthButton.d.ts +2 -2
- package/esm/date/monthpicker/MonthPicker.d.ts +1 -1
- package/esm/date/monthpicker/MonthSelector.js +1 -1
- package/esm/date/monthpicker/MonthSelector.js.map +1 -1
- package/esm/date/utils/get-month-weeks.d.ts +16 -0
- package/esm/date/utils/get-month-weeks.js +42 -0
- package/esm/date/utils/get-month-weeks.js.map +1 -0
- package/esm/date/utils/labels.d.ts +9 -0
- package/esm/date/utils/labels.js +36 -0
- package/esm/date/utils/labels.js.map +1 -1
- package/esm/date/utils/navigation.d.ts +1 -1
- package/esm/date/utils/navigation.js.map +1 -1
- package/esm/dropdown/Toggle.js +1 -1
- package/esm/dropdown/Toggle.js.map +1 -1
- package/esm/dropdown/index.d.ts +1 -2
- package/esm/dropdown/index.js +0 -1
- package/esm/dropdown/index.js.map +1 -1
- package/esm/form/Select.js +1 -1
- package/esm/form/Select.js.map +1 -1
- package/esm/form/checkbox/useCheckbox.d.ts +1 -1
- package/esm/form/checkbox/useCheckbox.js +3 -4
- package/esm/form/checkbox/useCheckbox.js.map +1 -1
- package/esm/form/combobox/Combobox.d.ts +1 -1
- package/esm/form/combobox/Combobox.js +1 -1
- package/esm/form/combobox/Combobox.js.map +1 -1
- package/esm/form/combobox/Input/Input.d.ts +0 -2
- package/esm/form/combobox/Input/Input.js +1 -1
- package/esm/form/combobox/Input/Input.js.map +1 -1
- package/esm/form/search/Search.js +3 -1
- package/esm/form/search/Search.js.map +1 -1
- package/esm/index.d.ts +1 -0
- package/esm/index.js +1 -0
- package/esm/index.js.map +1 -1
- package/esm/layout/bleed/Bleed.d.ts +47 -0
- package/esm/layout/bleed/Bleed.js +41 -0
- package/esm/layout/bleed/Bleed.js.map +1 -0
- package/esm/layout/bleed/index.d.ts +1 -0
- package/esm/layout/bleed/index.js +2 -0
- package/esm/layout/bleed/index.js.map +1 -0
- package/esm/layout/box/Box.d.ts +1 -2
- package/esm/layout/box/Box.js +1 -1
- package/esm/layout/box/Box.js.map +1 -1
- package/esm/layout/responsive/Responsive.d.ts +8 -4
- package/esm/layout/responsive/Responsive.js +8 -6
- package/esm/layout/responsive/Responsive.js.map +1 -1
- package/esm/layout/sidemal-test/AvatarPanel.d.ts +4 -0
- package/esm/layout/sidemal-test/AvatarPanel.js +12 -0
- package/esm/layout/sidemal-test/AvatarPanel.js.map +1 -0
- package/esm/layout/sidemal-test/Content.d.ts +2 -0
- package/esm/layout/sidemal-test/Content.js +60 -0
- package/esm/layout/sidemal-test/Content.js.map +1 -0
- package/esm/layout/sidemal-test/Filter.d.ts +2 -0
- package/esm/layout/sidemal-test/Filter.js +22 -0
- package/esm/layout/sidemal-test/Filter.js.map +1 -0
- package/esm/layout/sidemal-test/Header.d.ts +2 -0
- package/esm/layout/sidemal-test/Header.js +42 -0
- package/esm/layout/sidemal-test/Header.js.map +1 -0
- package/esm/layout/sidemal-test/Intro.d.ts +2 -0
- package/esm/layout/sidemal-test/Intro.js +30 -0
- package/esm/layout/sidemal-test/Intro.js.map +1 -0
- package/esm/layout/sidemal-test/Sidebar.d.ts +4 -0
- package/esm/layout/sidemal-test/Sidebar.js +41 -0
- package/esm/layout/sidemal-test/Sidebar.js.map +1 -0
- package/esm/layout/sidemal-test/content-box/ContentBox.d.ts +8 -0
- package/esm/layout/sidemal-test/content-box/ContentBox.js +37 -0
- package/esm/layout/sidemal-test/content-box/ContentBox.js.map +1 -0
- package/esm/layout/sidemal-test/content-box/index.d.ts +1 -0
- package/esm/layout/sidemal-test/content-box/index.js +2 -0
- package/esm/layout/sidemal-test/content-box/index.js.map +1 -0
- package/esm/layout/stack/Stack.d.ts +7 -3
- package/esm/layout/stack/Stack.js +3 -3
- package/esm/layout/stack/Stack.js.map +1 -1
- package/esm/layout/stack/index.d.ts +1 -0
- package/esm/layout/stack/index.js +1 -0
- package/esm/layout/stack/index.js.map +1 -1
- package/esm/layout/utilities/css.d.ts +1 -1
- package/esm/layout/utilities/css.js +37 -14
- package/esm/layout/utilities/css.js.map +1 -1
- package/esm/loader/Loader.js +3 -3
- package/esm/loader/Loader.js.map +1 -1
- package/esm/modal/dialog-polyfill.js +2 -0
- package/esm/modal/dialog-polyfill.js.map +1 -1
- package/esm/popover/Popover.js +3 -2
- package/esm/popover/Popover.js.map +1 -1
- package/esm/tabs/TabList.js +6 -7
- package/esm/tabs/TabList.js.map +1 -1
- package/esm/timeline/Pin.js +21 -21
- package/esm/timeline/Pin.js.map +1 -1
- package/esm/timeline/Timeline.js +4 -4
- package/esm/timeline/Timeline.js.map +1 -1
- package/esm/timeline/TimelineRow.js.map +1 -1
- package/esm/timeline/hooks/usePeriodContext.d.ts +1 -1
- package/esm/timeline/period/ClickablePeriod.js +20 -20
- package/esm/timeline/period/ClickablePeriod.js.map +1 -1
- package/esm/timeline/period/index.d.ts +2 -2
- package/esm/timeline/period/index.js +1 -1
- package/esm/timeline/period/index.js.map +1 -1
- package/esm/timeline/utils/timeline.js +3 -3
- package/esm/timeline/utils/timeline.js.map +1 -1
- package/esm/toggle-group/ToggleGroup.js +1 -1
- package/esm/toggle-group/ToggleGroup.js.map +1 -1
- package/esm/tooltip/Tooltip.js +1 -1
- package/esm/tooltip/Tooltip.js.map +1 -1
- package/esm/typography/Heading.js +1 -1
- package/esm/typography/Heading.js.map +1 -1
- package/esm/util/RandomIcon.js +1 -0
- package/esm/util/RandomIcon.js.map +1 -1
- package/esm/util/Slot.d.ts +6 -0
- package/esm/util/Slot.js +60 -0
- package/esm/util/Slot.js.map +1 -0
- package/esm/util/mergeRefs.d.ts +1 -1
- package/esm/util/useId.js +2 -4
- package/esm/util/useId.js.map +1 -1
- package/package.json +4 -4
- package/src/accordion/Accordion.tsx +1 -0
- package/src/accordion/AccordionContext.tsx +2 -1
- package/src/accordion/AccordionHeader.tsx +2 -2
- package/src/accordion/AccordionItem.tsx +7 -5
- package/src/accordion/accordion.stories.tsx +21 -34
- package/src/alert/alert.stories.tsx +2 -2
- package/src/chips/chips.stories.tsx +29 -32
- package/src/date/datepicker/DatePicker.tsx +63 -58
- package/src/date/datepicker/DatePickerStandalone.tsx +36 -39
- package/src/date/datepicker/datepicker.stories.tsx +67 -2
- package/src/date/datepicker/datepicker.test.tsx +5 -4
- package/src/date/datepicker/{caption → parts}/Caption.tsx +19 -17
- package/src/date/datepicker/{DayButton.tsx → parts/DayButton.tsx} +3 -1
- package/src/date/datepicker/parts/DropdownCaption.tsx +113 -0
- package/src/date/datepicker/parts/HeadRow.tsx +56 -0
- package/src/date/datepicker/parts/Row.tsx +47 -0
- package/src/date/datepicker/{TableHead.tsx → parts/TableHead.tsx} +6 -2
- package/src/date/datepicker/parts/WeekNumber.tsx +79 -0
- package/src/date/datepicker/parts/WeekRow.tsx +60 -0
- package/src/date/hooks/useDatepicker.tsx +2 -2
- package/src/date/hooks/useMonthPicker.tsx +2 -2
- package/src/date/hooks/useRangeDatepicker.test.tsx +11 -11
- package/src/date/hooks/useRangeDatepicker.tsx +3 -3
- package/src/date/monthpicker/MonthButton.tsx +2 -2
- package/src/date/monthpicker/MonthPicker.tsx +1 -1
- package/src/date/monthpicker/MonthSelector.tsx +3 -3
- package/src/date/monthpicker/monthpicker.stories.tsx +1 -1
- package/src/date/utils/__tests__/get-initial-year.test.ts +0 -12
- package/src/date/utils/__tests__/get-month-weeks.test.ts +113 -0
- package/src/date/utils/__tests__/is-match.test.ts +3 -3
- package/src/date/utils/__tests__/parse-dates.test.ts +4 -2
- package/src/date/utils/get-month-weeks.ts +93 -0
- package/src/date/utils/labels.ts +51 -0
- package/src/date/utils/navigation.ts +3 -3
- package/src/dropdown/Toggle.tsx +1 -1
- package/src/dropdown/dropdown.stories.tsx +25 -28
- package/src/dropdown/index.ts +1 -2
- package/src/expansion-card/expansion-card.stories.tsx +143 -161
- package/src/form/ConfirmationPanel.test.tsx +5 -5
- package/src/form/Select.tsx +1 -1
- package/src/form/checkbox/Checkbox.test.tsx +14 -26
- package/src/form/checkbox/checkbox.stories.tsx +66 -71
- package/src/form/checkbox/useCheckbox.ts +3 -4
- package/src/form/combobox/Combobox.tsx +2 -3
- package/src/form/combobox/Input/Input.tsx +1 -3
- package/src/form/combobox/combobox.stories.tsx +20 -23
- package/src/form/combobox/combobox.test.tsx +22 -20
- package/src/form/radio/radio.stories.tsx +39 -44
- package/src/form/search/Search.tsx +1 -0
- package/src/form/search/search.stories.tsx +22 -26
- package/src/form/stories/fieldset.stories.tsx +1 -1
- package/src/index.ts +1 -0
- package/src/layout/bleed/Bleed.stories.tsx +381 -0
- package/src/layout/bleed/Bleed.tsx +130 -0
- package/src/layout/bleed/index.ts +1 -0
- package/src/layout/box/Box.stories.tsx +251 -256
- package/src/layout/box/Box.tsx +2 -1
- package/src/layout/responsive/Responsive.tsx +21 -6
- package/src/layout/responsive/hide.stories.tsx +35 -0
- package/src/layout/responsive/show.stories.tsx +35 -0
- package/src/layout/sidemal-test/AvatarPanel.tsx +27 -0
- package/src/layout/sidemal-test/Content.tsx +129 -0
- package/src/layout/sidemal-test/Filter.tsx +46 -0
- package/src/layout/sidemal-test/Header.tsx +96 -0
- package/src/layout/sidemal-test/Intro.tsx +91 -0
- package/src/layout/sidemal-test/Sidebar.tsx +77 -0
- package/src/layout/sidemal-test/content-box/ContentBox.tsx +46 -0
- package/src/layout/sidemal-test/content-box/index.ts +1 -0
- package/src/layout/sidemal-test/navno-sidemal.stories.mdx +29 -0
- package/src/layout/sidemal-test/navno-sidemal.stories.tsx +65 -0
- package/src/layout/sidemal-test/styling.css +43 -0
- package/src/layout/stack/Stack.tsx +14 -8
- package/src/layout/stack/index.ts +1 -0
- package/src/layout/stack/stack.stories.tsx +23 -1
- package/src/layout/utilities/css.ts +59 -20
- package/src/loader/Loader.tsx +2 -3
- package/src/modal/dialog-polyfill.ts +2 -0
- package/src/pagination/pagination.stories.tsx +35 -42
- package/src/popover/Popover.test.tsx +21 -35
- package/src/popover/Popover.tsx +2 -2
- package/src/popover/popover.stories.tsx +25 -41
- package/src/react-css.d.ts +0 -1
- package/src/read-more/readmore.stories.tsx +35 -36
- package/src/stepper/stepper.stories.tsx +45 -52
- package/src/table/stories/table-expandable.stories.tsx +59 -63
- package/src/tabs/TabList.tsx +4 -6
- package/src/tabs/Tabs.stories.tsx +3 -3
- package/src/tag/tag.stories.tsx +4 -4
- package/src/timeline/Pin.tsx +44 -39
- package/src/timeline/Timeline.tsx +6 -6
- package/src/timeline/TimelineRow.tsx +1 -0
- package/src/timeline/hooks/usePeriodContext.tsx +1 -1
- package/src/timeline/period/ClickablePeriod.tsx +42 -38
- package/src/timeline/period/index.tsx +5 -4
- package/src/timeline/timeline.stories.tsx +11 -10
- package/src/timeline/utils/timeline.ts +3 -3
- package/src/toggle-group/ToggleGroup.stories.tsx +25 -29
- package/src/toggle-group/ToggleGroup.tsx +0 -1
- package/src/tooltip/Tooltip.test.tsx +40 -54
- package/src/tooltip/Tooltip.tsx +1 -1
- package/src/typography/Heading.tsx +1 -1
- package/src/util/RandomIcon.tsx +1 -0
- package/src/util/Slot.tsx +69 -0
- package/src/util/__tests__/Slot.test.tsx +98 -0
- package/src/util/mergeRefs.tsx +1 -1
- package/src/util/useId.ts +1 -3
- package/cjs/date/datepicker/caption/Caption.js +0 -23
- package/cjs/date/datepicker/caption/index.js +0 -10
- package/cjs/date/datepicker/caption/package.json +0 -6
- package/esm/date/datepicker/DayButton.d.ts +0 -3
- package/esm/date/datepicker/DayButton.js.map +0 -1
- package/esm/date/datepicker/TableHead.d.ts +0 -3
- package/esm/date/datepicker/TableHead.js.map +0 -1
- package/esm/date/datepicker/caption/Caption.js +0 -17
- package/esm/date/datepicker/caption/Caption.js.map +0 -1
- package/esm/date/datepicker/caption/DropdownCaption.js +0 -38
- package/esm/date/datepicker/caption/DropdownCaption.js.map +0 -1
- package/esm/date/datepicker/caption/index.d.ts +0 -2
- package/esm/date/datepicker/caption/index.js +0 -3
- package/esm/date/datepicker/caption/index.js.map +0 -1
- package/src/date/datepicker/caption/DropdownCaption.tsx +0 -108
- package/src/date/datepicker/caption/index.ts +0 -2
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Meta } from "@storybook/blocks";
|
|
2
|
+
|
|
3
|
+
<Meta title="Kitchen sink/How to use" />
|
|
4
|
+
|
|
5
|
+
<div className="wrapper navds-body-long">
|
|
6
|
+
|
|
7
|
+
<h1>Kitchen sink</h1>
|
|
8
|
+
|
|
9
|
+
<p>
|
|
10
|
+
A collection of stories for testing and verifying the use of Aksel in context
|
|
11
|
+
of actual content
|
|
12
|
+
</p>
|
|
13
|
+
<p className="heavy">
|
|
14
|
+
These pages are not intended as templates or patterns for use, only for
|
|
15
|
+
testing.
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
<style>
|
|
21
|
+
{`
|
|
22
|
+
.wrapper p {
|
|
23
|
+
font-size: 20px;
|
|
24
|
+
}
|
|
25
|
+
.heavy {
|
|
26
|
+
font-weight: 600;
|
|
27
|
+
}
|
|
28
|
+
`}
|
|
29
|
+
</style>
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Box, HGrid, Hide, Show, VStack } from "../..";
|
|
4
|
+
import { Content } from "./Content";
|
|
5
|
+
import { FilterCard } from "./Filter";
|
|
6
|
+
import { Header } from "./Header";
|
|
7
|
+
import { IntroCard } from "./Intro";
|
|
8
|
+
import { Sidebar } from "./Sidebar";
|
|
9
|
+
import "./styling.css";
|
|
10
|
+
import { ContentBox } from "./content-box";
|
|
11
|
+
|
|
12
|
+
const meta = {
|
|
13
|
+
title: "kitchen sink/navno-sidemal",
|
|
14
|
+
parameters: {
|
|
15
|
+
layout: "fullscreen",
|
|
16
|
+
},
|
|
17
|
+
} satisfies Meta;
|
|
18
|
+
|
|
19
|
+
export default meta;
|
|
20
|
+
type Story = StoryObj<typeof meta>;
|
|
21
|
+
|
|
22
|
+
export const Page: Story = {
|
|
23
|
+
render: () => {
|
|
24
|
+
return (
|
|
25
|
+
<div>
|
|
26
|
+
<Header />
|
|
27
|
+
<Box
|
|
28
|
+
style={{ minHeight: "calc(100vh - 10rem)" }}
|
|
29
|
+
background="surface-subtle"
|
|
30
|
+
paddingBlock="12 0"
|
|
31
|
+
>
|
|
32
|
+
<ContentBox maxWidth="lg">
|
|
33
|
+
<Box paddingInline="4">
|
|
34
|
+
<HGrid
|
|
35
|
+
align="start"
|
|
36
|
+
columns={{
|
|
37
|
+
xs: "minmax(auto, 600px)",
|
|
38
|
+
md: "288px minmax(auto, 600px)",
|
|
39
|
+
}}
|
|
40
|
+
gap={{ xs: "3", md: "6" }}
|
|
41
|
+
>
|
|
42
|
+
<Box style={{ position: "sticky", top: "1rem" }}>
|
|
43
|
+
<Show above="md">
|
|
44
|
+
<Sidebar />
|
|
45
|
+
</Show>
|
|
46
|
+
</Box>
|
|
47
|
+
<VStack gap={{ xs: "6", md: "8" }}>
|
|
48
|
+
<IntroCard />
|
|
49
|
+
<FilterCard />
|
|
50
|
+
<Hide above="md">
|
|
51
|
+
<Sidebar />
|
|
52
|
+
</Hide>
|
|
53
|
+
<Content />
|
|
54
|
+
<Content />
|
|
55
|
+
<Content />
|
|
56
|
+
<Content />
|
|
57
|
+
</VStack>
|
|
58
|
+
</HGrid>
|
|
59
|
+
</Box>
|
|
60
|
+
</ContentBox>
|
|
61
|
+
</Box>
|
|
62
|
+
</div>
|
|
63
|
+
);
|
|
64
|
+
},
|
|
65
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
.reset-list {
|
|
2
|
+
list-style: none;
|
|
3
|
+
margin: 0;
|
|
4
|
+
padding: 0;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
/* Sidebars */
|
|
8
|
+
.sidebar {
|
|
9
|
+
position: sticky;
|
|
10
|
+
top: 1rem;
|
|
11
|
+
bottom: 1rem;
|
|
12
|
+
max-height: calc(100vh - 2rem);
|
|
13
|
+
overflow: auto;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.sidebarlink {
|
|
17
|
+
color: var(--a-text-action);
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
padding: var(--a-spacing-3) var(--a-spacing-2);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.sidebarlink:hover {
|
|
23
|
+
text-decoration: underline;
|
|
24
|
+
background-color: var(--a-surface-action-subtle);
|
|
25
|
+
color: var(--a-text-default);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* Cards */
|
|
29
|
+
.avatar-card {
|
|
30
|
+
--avatar-size: 4rem;
|
|
31
|
+
|
|
32
|
+
position: relative;
|
|
33
|
+
margin-top: calc(var(--avatar-size) / 2);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.avatar {
|
|
37
|
+
position: absolute;
|
|
38
|
+
top: calc((var(--avatar-size) / 2) * -1);
|
|
39
|
+
height: var(--avatar-size);
|
|
40
|
+
width: var(--avatar-size);
|
|
41
|
+
display: grid;
|
|
42
|
+
place-content: center;
|
|
43
|
+
}
|
|
@@ -3,6 +3,7 @@ import React, { forwardRef, HTMLAttributes } from "react";
|
|
|
3
3
|
import { OverridableComponent } from "../../util/OverridableComponent";
|
|
4
4
|
import {
|
|
5
5
|
getResponsiveProps,
|
|
6
|
+
getResponsiveValue,
|
|
6
7
|
ResponsiveProp,
|
|
7
8
|
SpacingScale,
|
|
8
9
|
} from "../utilities/css";
|
|
@@ -12,17 +13,18 @@ export interface StackProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
12
13
|
/**
|
|
13
14
|
* Justify-content
|
|
14
15
|
*/
|
|
15
|
-
justify?:
|
|
16
|
+
justify?: ResponsiveProp<
|
|
16
17
|
| "start"
|
|
17
18
|
| "center"
|
|
18
19
|
| "end"
|
|
19
20
|
| "space-around"
|
|
20
21
|
| "space-between"
|
|
21
|
-
| "space-evenly"
|
|
22
|
+
| "space-evenly"
|
|
23
|
+
>;
|
|
22
24
|
/**
|
|
23
25
|
* Align-items
|
|
24
26
|
*/
|
|
25
|
-
align?: "start" | "center" | "end" | "baseline" | "stretch"
|
|
27
|
+
align?: ResponsiveProp<"start" | "center" | "end" | "baseline" | "stretch">;
|
|
26
28
|
/**
|
|
27
29
|
* flex-wrap
|
|
28
30
|
*/
|
|
@@ -33,7 +35,11 @@ export interface StackProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
33
35
|
* gap={{xs: '2', sm: '3', md: '4', lg: '5', xl: '6'}}
|
|
34
36
|
*/
|
|
35
37
|
gap?: ResponsiveProp<SpacingScale>;
|
|
36
|
-
|
|
38
|
+
/**
|
|
39
|
+
* flex-direction
|
|
40
|
+
* @default "row"
|
|
41
|
+
*/
|
|
42
|
+
direction?: ResponsiveProp<"row" | "column">;
|
|
37
43
|
}
|
|
38
44
|
|
|
39
45
|
export const Stack: OverridableComponent<StackProps, HTMLDivElement> =
|
|
@@ -47,18 +53,18 @@ export const Stack: OverridableComponent<StackProps, HTMLDivElement> =
|
|
|
47
53
|
wrap = true,
|
|
48
54
|
gap,
|
|
49
55
|
style: _style,
|
|
50
|
-
direction,
|
|
56
|
+
direction = "row",
|
|
51
57
|
...rest
|
|
52
58
|
},
|
|
53
59
|
ref
|
|
54
60
|
) => {
|
|
55
61
|
const style: React.CSSProperties = {
|
|
56
62
|
..._style,
|
|
57
|
-
"--__ac-stack-direction": direction,
|
|
58
|
-
"--__ac-stack-align": align,
|
|
59
|
-
"--__ac-stack-justify": justify,
|
|
60
63
|
"--__ac-stack-wrap": wrap ? "wrap" : "nowrap",
|
|
61
64
|
...getResponsiveProps(`stack`, "gap", "spacing", gap),
|
|
65
|
+
...getResponsiveValue(`stack`, "direction", direction),
|
|
66
|
+
...getResponsiveValue(`stack`, "align", align),
|
|
67
|
+
...getResponsiveValue(`stack`, "justify", justify),
|
|
62
68
|
};
|
|
63
69
|
|
|
64
70
|
return (
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { Meta } from "@storybook/react";
|
|
3
|
-
import { HStack, VStack, Spacer } from ".";
|
|
3
|
+
import { HStack, VStack, Spacer, Stack } from ".";
|
|
4
|
+
import { Box } from "../box";
|
|
4
5
|
|
|
5
6
|
export default {
|
|
6
7
|
title: "ds-react/Primitives/Stack",
|
|
@@ -133,6 +134,27 @@ export const DividerDemo = {
|
|
|
133
134
|
),
|
|
134
135
|
};
|
|
135
136
|
|
|
137
|
+
export const ResponsiveDirection = {
|
|
138
|
+
render: () => (
|
|
139
|
+
<Box
|
|
140
|
+
background="surface-alt-3-subtle"
|
|
141
|
+
padding="12"
|
|
142
|
+
style={{ minWidth: "20rem", aspectRatio: "1/1" }}
|
|
143
|
+
>
|
|
144
|
+
<Stack
|
|
145
|
+
align={{ xs: "center", md: "start" }}
|
|
146
|
+
gap="2"
|
|
147
|
+
direction={{ xs: "column", lg: "row" }}
|
|
148
|
+
>
|
|
149
|
+
<Box padding="6" background="surface-action" />
|
|
150
|
+
<Box padding="2" background="surface-action" />
|
|
151
|
+
<Box padding="6" background="surface-action" />
|
|
152
|
+
<Box padding="4" background="surface-action" />
|
|
153
|
+
</Stack>
|
|
154
|
+
</Box>
|
|
155
|
+
),
|
|
156
|
+
};
|
|
157
|
+
|
|
136
158
|
function Placeholders({
|
|
137
159
|
count,
|
|
138
160
|
children,
|
|
@@ -29,7 +29,6 @@ export type SpaceDelimitedAttribute<T extends string> =
|
|
|
29
29
|
| `${T} ${T} ${T} ${T}`;
|
|
30
30
|
|
|
31
31
|
type FixedResponsiveT<T> = {
|
|
32
|
-
// eslint-disable-next-line no-unused-vars
|
|
33
32
|
[Breakpoint in BreakpointsAlias]?: T;
|
|
34
33
|
};
|
|
35
34
|
|
|
@@ -58,11 +57,50 @@ export function getResponsiveValue<T = string>(
|
|
|
58
57
|
);
|
|
59
58
|
}
|
|
60
59
|
|
|
60
|
+
const translateExceptionToCSS = (exception: string) => {
|
|
61
|
+
switch (exception) {
|
|
62
|
+
case "px":
|
|
63
|
+
return "1px";
|
|
64
|
+
}
|
|
65
|
+
return exception;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
const translateTokenStringToCSS = (
|
|
69
|
+
componentProp: string,
|
|
70
|
+
tokenString: string,
|
|
71
|
+
tokenSubgroup: string,
|
|
72
|
+
tokenExceptions: string[],
|
|
73
|
+
invert: boolean
|
|
74
|
+
) => {
|
|
75
|
+
return tokenString
|
|
76
|
+
.split(" ")
|
|
77
|
+
.map((x, _, arr) => {
|
|
78
|
+
if (componentProp === "margin-inline" && x === "full") {
|
|
79
|
+
const width = 100 / arr.length;
|
|
80
|
+
return `calc((100vw - ${width}%)/-2)`;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
let output = `var(--a-${tokenSubgroup}-${x})`;
|
|
84
|
+
if (tokenExceptions.includes(x)) {
|
|
85
|
+
output = translateExceptionToCSS(x);
|
|
86
|
+
}
|
|
87
|
+
if (invert) {
|
|
88
|
+
if (x === "0") {
|
|
89
|
+
return `0`;
|
|
90
|
+
}
|
|
91
|
+
return `calc(-1 * ${output})`;
|
|
92
|
+
}
|
|
93
|
+
return output;
|
|
94
|
+
})
|
|
95
|
+
.join(" ");
|
|
96
|
+
};
|
|
97
|
+
|
|
61
98
|
export function getResponsiveProps<T extends string>(
|
|
62
99
|
componentName: string,
|
|
63
100
|
componentProp: string,
|
|
64
101
|
tokenSubgroup: string,
|
|
65
102
|
responsiveProp?: ResponsiveProp<T>,
|
|
103
|
+
invert = false,
|
|
66
104
|
tokenExceptions: string[] = []
|
|
67
105
|
) {
|
|
68
106
|
if (!responsiveProp) {
|
|
@@ -71,26 +109,27 @@ export function getResponsiveProps<T extends string>(
|
|
|
71
109
|
|
|
72
110
|
if (typeof responsiveProp === "string") {
|
|
73
111
|
return {
|
|
74
|
-
[`--__ac-${componentName}-${componentProp}-xs`]:
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
112
|
+
[`--__ac-${componentName}-${componentProp}-xs`]:
|
|
113
|
+
translateTokenStringToCSS(
|
|
114
|
+
componentProp,
|
|
115
|
+
responsiveProp,
|
|
116
|
+
tokenSubgroup,
|
|
117
|
+
tokenExceptions,
|
|
118
|
+
invert
|
|
119
|
+
),
|
|
80
120
|
};
|
|
81
121
|
}
|
|
82
122
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
);
|
|
123
|
+
const styleProps = {};
|
|
124
|
+
Object.entries(responsiveProp).forEach(([breakpointAlias, aliasOrScale]) => {
|
|
125
|
+
styleProps[`--__ac-${componentName}-${componentProp}-${breakpointAlias}`] =
|
|
126
|
+
translateTokenStringToCSS(
|
|
127
|
+
componentProp,
|
|
128
|
+
aliasOrScale,
|
|
129
|
+
tokenSubgroup,
|
|
130
|
+
tokenExceptions,
|
|
131
|
+
invert
|
|
132
|
+
);
|
|
133
|
+
});
|
|
134
|
+
return styleProps;
|
|
96
135
|
}
|
package/src/loader/Loader.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { forwardRef, SVGProps } from "react";
|
|
2
2
|
import cl from "clsx";
|
|
3
|
-
import { useId } from "..";
|
|
3
|
+
import { omit, useId } from "..";
|
|
4
4
|
|
|
5
5
|
export interface LoaderProps extends SVGProps<SVGSVGElement> {
|
|
6
6
|
/**
|
|
@@ -52,7 +52,6 @@ export type LoaderType = React.ForwardRefExoticComponent<
|
|
|
52
52
|
export const Loader: LoaderType = forwardRef<SVGSVGElement, LoaderProps>(
|
|
53
53
|
(
|
|
54
54
|
{
|
|
55
|
-
children,
|
|
56
55
|
className,
|
|
57
56
|
size = "medium",
|
|
58
57
|
title = "venter...",
|
|
@@ -81,7 +80,7 @@ export const Loader: LoaderType = forwardRef<SVGSVGElement, LoaderProps>(
|
|
|
81
80
|
focusable="false"
|
|
82
81
|
viewBox="0 0 50 50"
|
|
83
82
|
preserveAspectRatio="xMidYMid"
|
|
84
|
-
{...rest}
|
|
83
|
+
{...omit(rest, ["children"])}
|
|
85
84
|
>
|
|
86
85
|
<title id={id ?? `loader-${internalId}`}>{title}</title>
|
|
87
86
|
<circle
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* eslint-disable react-hooks/rules-of-hooks */
|
|
2
1
|
import React, { useState } from "react";
|
|
3
2
|
import { Link, HashRouter as Router } from "react-router-dom";
|
|
4
3
|
import Pagination from "./Pagination";
|
|
@@ -16,19 +15,16 @@ export default {
|
|
|
16
15
|
},
|
|
17
16
|
};
|
|
18
17
|
|
|
19
|
-
export const Default = {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
boundaryCount: 1,
|
|
30
|
-
prevNextTexts: false,
|
|
31
|
-
},
|
|
18
|
+
export const Default = (props: any) => {
|
|
19
|
+
const [page, setPage] = useState(props.page);
|
|
20
|
+
return <Pagination {...props} page={page} onPageChange={setPage} />;
|
|
21
|
+
};
|
|
22
|
+
Default.args = {
|
|
23
|
+
page: 2,
|
|
24
|
+
count: 8,
|
|
25
|
+
siblingCount: 1,
|
|
26
|
+
boundaryCount: 1,
|
|
27
|
+
prevNextTexts: false,
|
|
32
28
|
};
|
|
33
29
|
|
|
34
30
|
export const PrevNextText = () => {
|
|
@@ -86,32 +82,29 @@ export const XSmall = () => {
|
|
|
86
82
|
);
|
|
87
83
|
};
|
|
88
84
|
|
|
89
|
-
export const AsLink = {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
);
|
|
108
|
-
},
|
|
109
|
-
|
|
110
|
-
decorators: [
|
|
111
|
-
(Story) => (
|
|
112
|
-
<Router>
|
|
113
|
-
<Story />
|
|
114
|
-
</Router>
|
|
115
|
-
),
|
|
116
|
-
],
|
|
85
|
+
export const AsLink = () => {
|
|
86
|
+
const [page, setPage] = useState(1);
|
|
87
|
+
const props = {
|
|
88
|
+
page: 1,
|
|
89
|
+
count: 8,
|
|
90
|
+
siblingCount: 1,
|
|
91
|
+
boundaryCount: 1,
|
|
92
|
+
};
|
|
93
|
+
return (
|
|
94
|
+
<Pagination
|
|
95
|
+
{...props}
|
|
96
|
+
page={page}
|
|
97
|
+
onPageChange={setPage}
|
|
98
|
+
renderItem={(item) => (
|
|
99
|
+
<Pagination.Item {...item} as={Link} to={`?page=${item.page}`} />
|
|
100
|
+
)}
|
|
101
|
+
/>
|
|
102
|
+
);
|
|
117
103
|
};
|
|
104
|
+
AsLink.decorators = [
|
|
105
|
+
(Story) => (
|
|
106
|
+
<Router>
|
|
107
|
+
<Story />
|
|
108
|
+
</Router>
|
|
109
|
+
),
|
|
110
|
+
];
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { act,
|
|
1
|
+
import { act, fireEvent, screen } from "@testing-library/react";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { renderWithStyles as render } from "../../tests/utils";
|
|
4
4
|
import Popover from "./Popover";
|
|
5
5
|
|
|
6
6
|
describe("Popover", () => {
|
|
7
7
|
test("open", () => {
|
|
8
|
-
|
|
8
|
+
render(
|
|
9
9
|
<Popover
|
|
10
10
|
open
|
|
11
11
|
anchorEl={document.createElement("div")}
|
|
@@ -16,12 +16,11 @@ describe("Popover", () => {
|
|
|
16
16
|
</Popover>
|
|
17
17
|
);
|
|
18
18
|
|
|
19
|
-
expect(getByTestId("popover-id")).toBeVisible();
|
|
20
|
-
cleanup();
|
|
19
|
+
expect(screen.getByTestId("popover-id")).toBeVisible();
|
|
21
20
|
});
|
|
22
21
|
|
|
23
22
|
test("should be hidden", () => {
|
|
24
|
-
|
|
23
|
+
render(
|
|
25
24
|
<Popover
|
|
26
25
|
open={false}
|
|
27
26
|
anchorEl={document.createElement("div")}
|
|
@@ -32,13 +31,12 @@ describe("Popover", () => {
|
|
|
32
31
|
</Popover>
|
|
33
32
|
);
|
|
34
33
|
|
|
35
|
-
expect(getByTestId("popover-id")).not.toBeVisible();
|
|
36
|
-
cleanup();
|
|
34
|
+
expect(screen.getByTestId("popover-id")).not.toBeVisible();
|
|
37
35
|
});
|
|
38
36
|
|
|
39
37
|
it("outsideClick", async () => {
|
|
40
38
|
const fn = jest.fn();
|
|
41
|
-
|
|
39
|
+
render(
|
|
42
40
|
<div>
|
|
43
41
|
<Popover
|
|
44
42
|
open={true}
|
|
@@ -53,18 +51,16 @@ describe("Popover", () => {
|
|
|
53
51
|
);
|
|
54
52
|
|
|
55
53
|
await act(async () => {
|
|
56
|
-
expect(getByTestId("popover-id")).toBeVisible();
|
|
57
|
-
getByRole("link").focus();
|
|
54
|
+
expect(screen.getByTestId("popover-id")).toBeVisible();
|
|
55
|
+
screen.getByRole("link").focus();
|
|
58
56
|
});
|
|
59
57
|
|
|
60
58
|
expect(fn).toHaveBeenCalled();
|
|
61
|
-
|
|
62
|
-
cleanup();
|
|
63
59
|
});
|
|
64
60
|
|
|
65
61
|
it("escape", async () => {
|
|
66
62
|
const fn = jest.fn();
|
|
67
|
-
const { container
|
|
63
|
+
const { container } = render(
|
|
68
64
|
<div>
|
|
69
65
|
<Popover
|
|
70
66
|
open={true}
|
|
@@ -77,23 +73,19 @@ describe("Popover", () => {
|
|
|
77
73
|
</div>
|
|
78
74
|
);
|
|
79
75
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
);
|
|
87
|
-
});
|
|
76
|
+
expect(screen.getByTestId("popover-id")).toBeVisible();
|
|
77
|
+
fireEvent.keyDown(
|
|
78
|
+
// Should work anywhere
|
|
79
|
+
container,
|
|
80
|
+
{ key: "Escape" }
|
|
81
|
+
);
|
|
88
82
|
|
|
89
83
|
expect(fn).toHaveBeenCalled();
|
|
90
|
-
|
|
91
|
-
cleanup();
|
|
92
84
|
});
|
|
93
85
|
|
|
94
86
|
it("keep open on popover-focus", async () => {
|
|
95
87
|
const fn = jest.fn();
|
|
96
|
-
|
|
88
|
+
render(
|
|
97
89
|
<div>
|
|
98
90
|
<Popover
|
|
99
91
|
open={true}
|
|
@@ -107,18 +99,16 @@ describe("Popover", () => {
|
|
|
107
99
|
);
|
|
108
100
|
|
|
109
101
|
await act(async () => {
|
|
110
|
-
expect(getByTestId("popover-id")).toBeVisible();
|
|
111
|
-
getByTestId("popover-id").focus();
|
|
102
|
+
expect(screen.getByTestId("popover-id")).toBeVisible();
|
|
103
|
+
screen.getByTestId("popover-id").focus();
|
|
112
104
|
});
|
|
113
105
|
|
|
114
106
|
expect(fn).toHaveBeenCalledTimes(0);
|
|
115
|
-
|
|
116
|
-
cleanup();
|
|
117
107
|
}, 20000);
|
|
118
108
|
|
|
119
109
|
it("keep open on popover-click", async () => {
|
|
120
110
|
const fn = jest.fn();
|
|
121
|
-
|
|
111
|
+
render(
|
|
122
112
|
<div>
|
|
123
113
|
<Popover
|
|
124
114
|
open={true}
|
|
@@ -131,13 +121,9 @@ describe("Popover", () => {
|
|
|
131
121
|
</div>
|
|
132
122
|
);
|
|
133
123
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
fireEvent.click(getByTestId("popover-id"));
|
|
137
|
-
});
|
|
124
|
+
expect(screen.getByTestId("popover-id")).toBeVisible();
|
|
125
|
+
fireEvent.click(screen.getByTestId("popover-id"));
|
|
138
126
|
|
|
139
127
|
expect(fn).toHaveBeenCalledTimes(0);
|
|
140
|
-
|
|
141
|
-
cleanup();
|
|
142
128
|
});
|
|
143
129
|
});
|
package/src/popover/Popover.tsx
CHANGED
|
@@ -142,7 +142,7 @@ export const Popover = forwardRef<HTMLDivElement, PopoverProps>(
|
|
|
142
142
|
strategy: chosenStrategy,
|
|
143
143
|
placement,
|
|
144
144
|
open: open,
|
|
145
|
-
onOpenChange: onClose,
|
|
145
|
+
onOpenChange: () => onClose(),
|
|
146
146
|
middleware: [
|
|
147
147
|
flOffset(offset ?? (arrow ? 16 : 4)),
|
|
148
148
|
flip({ padding: 5, fallbackPlacements: ["bottom", "top"] }),
|
|
@@ -210,7 +210,6 @@ export const Popover = forwardRef<HTMLDivElement, PopoverProps>(
|
|
|
210
210
|
})}
|
|
211
211
|
data-placement={flPlacement}
|
|
212
212
|
aria-hidden={!open || !anchorEl}
|
|
213
|
-
tabIndex={-1}
|
|
214
213
|
{...getFloatingProps({
|
|
215
214
|
ref: floatingRef,
|
|
216
215
|
style: {
|
|
@@ -218,6 +217,7 @@ export const Popover = forwardRef<HTMLDivElement, PopoverProps>(
|
|
|
218
217
|
top: y ?? 0,
|
|
219
218
|
left: x ?? 0,
|
|
220
219
|
},
|
|
220
|
+
tabIndex: undefined,
|
|
221
221
|
})}
|
|
222
222
|
{...rest}
|
|
223
223
|
>
|