@kanso-labs/kanso-ui 0.35.0 → 0.37.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/README.md +90 -9
- package/dist/button/context.js +7 -0
- package/dist/button/context.js.map +1 -0
- package/dist/button/group.js +25 -0
- package/dist/button/group.js.map +1 -0
- package/dist/button/hooks.js +81 -0
- package/dist/button/hooks.js.map +1 -0
- package/dist/button/index.d.ts +11 -0
- package/dist/button/index.js +273 -0
- package/dist/button/index.js.map +1 -0
- package/dist/button/styles.js +23 -0
- package/dist/button/styles.js.map +1 -0
- package/dist/calendar/index.js +473 -7
- package/dist/calendar/index.js.map +1 -1
- package/dist/calendar/styles.js +132 -4
- package/dist/calendar/styles.js.map +1 -1
- package/dist/chip/index.js +74 -9
- package/dist/chip/index.js.map +1 -1
- package/dist/chip/styles.js +78 -4
- package/dist/chip/styles.js.map +1 -1
- package/dist/collection/index.js +12 -9
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/styles.js +21 -2
- package/dist/collection/styles.js.map +1 -1
- package/dist/color-scheme.d.ts +29 -0
- package/dist/color-scheme.js +32 -0
- package/dist/color-scheme.js.map +1 -0
- package/dist/components/avatar/index.js +35 -22
- package/dist/components/avatar/index.js.map +1 -1
- package/dist/components/badge/index.d.ts +40 -0
- package/dist/components/badge/index.js +102 -0
- package/dist/components/badge/index.js.map +1 -0
- package/dist/components/breadcrumbs/index.d.ts +1 -1
- package/dist/components/breadcrumbs/index.js +1 -1
- package/dist/components/breadcrumbs/index.js.map +1 -1
- package/dist/components/button/index.d.ts +58 -14
- package/dist/components/button/index.js +400 -147
- package/dist/components/button/index.js.map +1 -1
- package/dist/components/button-group/index.d.ts +54 -0
- package/dist/components/button-group/index.js +272 -0
- package/dist/components/button-group/index.js.map +1 -0
- package/dist/components/calendar/index.d.ts +9 -1
- package/dist/components/calendar/index.js +71 -44
- package/dist/components/calendar/index.js.map +1 -1
- package/dist/components/card/index.d.ts +1 -1
- package/dist/components/card/index.js +4 -4
- package/dist/components/card/index.js.map +1 -1
- package/dist/components/checkbox/index.js +15 -1
- package/dist/components/checkbox/index.js.map +1 -1
- package/dist/components/checkbox-group/index.js +1 -0
- package/dist/components/checkbox-group/index.js.map +1 -1
- package/dist/components/chip/index.d.ts +55 -8
- package/dist/components/chip/index.js +174 -63
- package/dist/components/chip/index.js.map +1 -1
- package/dist/components/chip-group/index.d.ts +16 -7
- package/dist/components/chip-group/index.js +58 -35
- package/dist/components/chip-group/index.js.map +1 -1
- package/dist/components/color-field/index.js +25 -23
- package/dist/components/color-field/index.js.map +1 -1
- package/dist/components/color-picker/index.js +42 -31
- package/dist/components/color-picker/index.js.map +1 -1
- package/dist/components/color-swatch-picker/index.d.ts +1 -1
- package/dist/components/color-swatch-picker/index.js +17 -13
- package/dist/components/color-swatch-picker/index.js.map +1 -1
- package/dist/components/combo-box/index.d.ts +5 -3
- package/dist/components/combo-box/index.js +63 -58
- package/dist/components/combo-box/index.js.map +1 -1
- package/dist/components/copy-field/index.d.ts +7 -6
- package/dist/components/copy-field/index.js +92 -90
- package/dist/components/copy-field/index.js.map +1 -1
- package/dist/components/currency/index.d.ts +8 -7
- package/dist/components/currency/index.js +43 -65
- package/dist/components/currency/index.js.map +1 -1
- package/dist/components/date-field/index.js +24 -22
- package/dist/components/date-field/index.js.map +1 -1
- package/dist/components/date-picker/index.d.ts +10 -2
- package/dist/components/date-picker/index.js +76 -69
- package/dist/components/date-picker/index.js.map +1 -1
- package/dist/components/date-range-picker/index.d.ts +10 -2
- package/dist/components/date-range-picker/index.js +93 -86
- package/dist/components/date-range-picker/index.js.map +1 -1
- package/dist/components/dialog/index.d.ts +1 -1
- package/dist/components/dialog/index.js +2 -2
- package/dist/components/dialog/index.js.map +1 -1
- package/dist/components/disclosure/index.d.ts +1 -1
- package/dist/components/disclosure/index.js +6 -6
- package/dist/components/disclosure/index.js.map +1 -1
- package/dist/components/fab/index.d.ts +72 -0
- package/dist/components/fab/index.js +89 -0
- package/dist/components/fab/index.js.map +1 -0
- package/dist/components/fab-menu/index.d.ts +90 -0
- package/dist/components/fab-menu/index.js +297 -0
- package/dist/components/fab-menu/index.js.map +1 -0
- package/dist/components/feed/index.d.ts +2 -1
- package/dist/components/feed/index.js +1 -1
- package/dist/components/feed/index.js.map +1 -1
- package/dist/components/icon-button/index.d.ts +11 -8
- package/dist/components/icon-button/index.js +244 -181
- package/dist/components/icon-button/index.js.map +1 -1
- package/dist/components/index.d.ts +30 -21
- package/dist/components/list/index.d.ts +15 -13
- package/dist/components/list/index.js +60 -61
- package/dist/components/list/index.js.map +1 -1
- package/dist/components/list-box/index.d.ts +3 -2
- package/dist/components/list-box/index.js +16 -16
- package/dist/components/list-box/index.js.map +1 -1
- package/dist/components/list-item/index.js +1 -1
- package/dist/components/list-item/index.js.map +1 -1
- package/dist/components/menu/index.d.ts +3 -2
- package/dist/components/menu/index.js +2 -2
- package/dist/components/menu/index.js.map +1 -1
- package/dist/components/navigation-bar/index.d.ts +50 -0
- package/dist/components/navigation-bar/index.js +129 -0
- package/dist/components/navigation-bar/index.js.map +1 -0
- package/dist/components/navigation-rail/index.d.ts +59 -0
- package/dist/components/navigation-rail/index.js +166 -0
- package/dist/components/navigation-rail/index.js.map +1 -0
- package/dist/components/navigation-tree/index.d.ts +1 -5
- package/dist/components/navigation-tree/index.js +3 -3
- package/dist/components/navigation-tree/index.js.map +1 -1
- package/dist/components/number-field/index.d.ts +6 -4
- package/dist/components/number-field/index.js +84 -84
- package/dist/components/number-field/index.js.map +1 -1
- package/dist/components/popover/index.d.ts +1 -1
- package/dist/components/popover/index.js +1 -1
- package/dist/components/popover/index.js.map +1 -1
- package/dist/components/radio-group/index.js +22 -11
- package/dist/components/radio-group/index.js.map +1 -1
- package/dist/components/range-calendar/index.d.ts +7 -1
- package/dist/components/range-calendar/index.js +71 -44
- package/dist/components/range-calendar/index.js.map +1 -1
- package/dist/components/search-field/index.d.ts +2 -1
- package/dist/components/search-field/index.js +24 -25
- package/dist/components/search-field/index.js.map +1 -1
- package/dist/components/search-view/index.d.ts +79 -0
- package/dist/components/search-view/index.js +255 -0
- package/dist/components/search-view/index.js.map +1 -0
- package/dist/components/segmented-button/index.d.ts +2 -2
- package/dist/components/segmented-button/index.js +60 -31
- package/dist/components/segmented-button/index.js.map +1 -1
- package/dist/components/select/index.js +1 -0
- package/dist/components/select/index.js.map +1 -1
- package/dist/components/sheet/index.d.ts +1 -1
- package/dist/components/sheet/index.js +2 -2
- package/dist/components/sheet/index.js.map +1 -1
- package/dist/components/slider/index.js +1 -1
- package/dist/components/slider/index.js.map +1 -1
- package/dist/components/snackbar/index.d.ts +2 -2
- package/dist/components/snackbar/index.js +28 -13
- package/dist/components/snackbar/index.js.map +1 -1
- package/dist/components/split-button/index.d.ts +83 -0
- package/dist/components/split-button/index.js +341 -0
- package/dist/components/split-button/index.js.map +1 -0
- package/dist/components/switch/index.js +11 -1
- package/dist/components/switch/index.js.map +1 -1
- package/dist/components/table/index.d.ts +11 -9
- package/dist/components/table/index.js +87 -31
- package/dist/components/table/index.js.map +1 -1
- package/dist/components/tabs/index.d.ts +35 -4
- package/dist/components/tabs/index.js +403 -93
- package/dist/components/tabs/index.js.map +1 -1
- package/dist/components/tag/index.d.ts +1 -1
- package/dist/components/tag/index.js.map +1 -1
- package/dist/components/text-area/index.d.ts +7 -5
- package/dist/components/text-area/index.js +28 -26
- package/dist/components/text-area/index.js.map +1 -1
- package/dist/components/text-field/index.d.ts +7 -5
- package/dist/components/text-field/index.js +28 -26
- package/dist/components/text-field/index.js.map +1 -1
- package/dist/components/time-field/index.js +24 -22
- package/dist/components/time-field/index.js.map +1 -1
- package/dist/components/tree/index.d.ts +7 -9
- package/dist/components/tree/index.js +15 -16
- package/dist/components/tree/index.js.map +1 -1
- package/dist/drag/index.js.map +1 -1
- package/dist/drag/styles.js +4 -1
- package/dist/drag/styles.js.map +1 -1
- package/dist/fab/styles.js +161 -0
- package/dist/fab/styles.js.map +1 -0
- package/dist/field/index.js +260 -214
- package/dist/field/index.js.map +1 -1
- package/dist/field/styles.js +10 -2
- package/dist/field/styles.js.map +1 -1
- package/dist/glyphs/index.js +55 -1
- package/dist/glyphs/index.js.map +1 -1
- package/dist/hooks/useRipple.js +199 -162
- package/dist/hooks/useRipple.js.map +1 -1
- package/dist/hooks/useToggleGroupDisabled.js +24 -0
- package/dist/hooks/useToggleGroupDisabled.js.map +1 -0
- package/dist/i18n/index.js +43 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/i18n/messages.js +387 -0
- package/dist/i18n/messages.js.map +1 -0
- package/dist/index.d.ts +31 -21
- package/dist/index.js +25 -16
- package/dist/navigation/context.js +7 -0
- package/dist/navigation/context.js.map +1 -0
- package/dist/navigation/index.d.ts +28 -0
- package/dist/navigation/index.js +96 -0
- package/dist/navigation/index.js.map +1 -0
- package/dist/navigation/styles.js +312 -0
- package/dist/navigation/styles.js.map +1 -0
- package/dist/react-aria.d.ts +2 -2
- package/dist/react-aria.js +2 -2
- package/dist/render/useRender.js +0 -1
- package/dist/render/useRender.js.map +1 -1
- package/dist/row/styles.js +33 -11
- package/dist/row/styles.js.map +1 -1
- package/dist/styles/focus.js.map +1 -1
- package/dist/styles/icon-button.js +9 -1
- package/dist/styles/icon-button.js.map +1 -1
- package/dist/styles/overlay.js +1 -0
- package/dist/styles/overlay.js.map +1 -1
- package/dist/styles/picker.js +1 -1
- package/dist/styles/picker.js.map +1 -1
- package/dist/styles.css +1104 -336
- package/dist/tokens/design.tokens.stylex.js +42 -1
- package/dist/tokens/design.tokens.stylex.js.map +1 -1
- package/dist/tokens.css +166 -53
- package/package.json +9 -5
package/dist/index.js
CHANGED
|
@@ -1,26 +1,29 @@
|
|
|
1
|
+
import { colorScheme } from "./color-scheme.js";
|
|
1
2
|
import Text from "./components/text/index.js";
|
|
2
3
|
import AppBar from "./components/app-bar/index.js";
|
|
3
4
|
import Autocomplete from "./components/autocomplete/index.js";
|
|
4
5
|
import Avatar from "./components/avatar/index.js";
|
|
6
|
+
import Badge from "./components/badge/index.js";
|
|
5
7
|
import Link from "./components/link/index.js";
|
|
6
|
-
import Breadcrumbs from "./components/breadcrumbs/index.js";
|
|
8
|
+
import Breadcrumbs, { BreadcrumbsItem } from "./components/breadcrumbs/index.js";
|
|
7
9
|
import ProgressIndicator from "./components/progress-indicator/index.js";
|
|
8
10
|
import Button from "./components/button/index.js";
|
|
11
|
+
import ButtonGroup from "./components/button-group/index.js";
|
|
9
12
|
import Calendar from "./components/calendar/index.js";
|
|
10
13
|
import Card from "./components/card/index.js";
|
|
11
14
|
import Checkbox from "./components/checkbox/index.js";
|
|
12
15
|
import CheckboxGroup from "./components/checkbox-group/index.js";
|
|
13
16
|
import Chip from "./components/chip/index.js";
|
|
14
|
-
import ChipGroup from "./components/chip-group/index.js";
|
|
17
|
+
import ChipGroup, { ChipGroupChip } from "./components/chip-group/index.js";
|
|
15
18
|
import Code from "./components/code/index.js";
|
|
16
19
|
import ColorArea from "./components/color-area/index.js";
|
|
17
20
|
import ColorField from "./components/color-field/index.js";
|
|
18
21
|
import ColorSlider from "./components/color-slider/index.js";
|
|
19
22
|
import ColorSwatch from "./components/color-swatch/index.js";
|
|
20
23
|
import ColorPicker from "./components/color-picker/index.js";
|
|
21
|
-
import ColorSwatchPicker from "./components/color-swatch-picker/index.js";
|
|
24
|
+
import ColorSwatchPicker, { ColorSwatchPickerItem } from "./components/color-swatch-picker/index.js";
|
|
22
25
|
import ColorWheel from "./components/color-wheel/index.js";
|
|
23
|
-
import ListBox from "./components/list-box/index.js";
|
|
26
|
+
import ListBox, { ListBoxItem, ListBoxLoadMore, ListBoxSection } from "./components/list-box/index.js";
|
|
24
27
|
import ComboBox from "./components/combo-box/index.js";
|
|
25
28
|
import Container from "./components/container/index.js";
|
|
26
29
|
import CopyField from "./components/copy-field/index.js";
|
|
@@ -29,36 +32,42 @@ import DateField from "./components/date-field/index.js";
|
|
|
29
32
|
import DatePicker from "./components/date-picker/index.js";
|
|
30
33
|
import RangeCalendar from "./components/range-calendar/index.js";
|
|
31
34
|
import DateRangePicker from "./components/date-range-picker/index.js";
|
|
32
|
-
import Dialog from "./components/dialog/index.js";
|
|
33
|
-
import Disclosure from "./components/disclosure/index.js";
|
|
35
|
+
import Dialog, { DialogBody, DialogContent, DialogFooter, DialogHeader, DialogTitle } from "./components/dialog/index.js";
|
|
36
|
+
import Disclosure, { DisclosureHeader, DisclosurePanel } from "./components/disclosure/index.js";
|
|
34
37
|
import Separator from "./components/separator/index.js";
|
|
35
38
|
import DisclosureGroup from "./components/disclosure-group/index.js";
|
|
36
39
|
import DropZone, { FileTrigger } from "./components/drop-zone/index.js";
|
|
40
|
+
import Fab from "./components/fab/index.js";
|
|
41
|
+
import FabMenu, { FabMenuItem } from "./components/fab-menu/index.js";
|
|
37
42
|
import Feed from "./components/feed/index.js";
|
|
38
43
|
import Form from "./components/form/index.js";
|
|
39
44
|
import IconButton from "./components/icon-button/index.js";
|
|
40
45
|
import Keycap from "./components/keycap/index.js";
|
|
41
|
-
import List from "./components/list/index.js";
|
|
46
|
+
import List, { ListLoadMore, ListRow, ListSection } from "./components/list/index.js";
|
|
42
47
|
import ListDetail from "./components/list-detail/index.js";
|
|
43
48
|
import ListItem from "./components/list-item/index.js";
|
|
44
|
-
import Menu from "./components/menu/index.js";
|
|
49
|
+
import Menu, { MenuContent, MenuItem, MenuLoadMore, MenuSection, MenuSeparator, MenuSubmenu } from "./components/menu/index.js";
|
|
45
50
|
import Meter from "./components/meter/index.js";
|
|
46
|
-
import
|
|
51
|
+
import NavigationBar, { NavigationBarItem } from "./components/navigation-bar/index.js";
|
|
52
|
+
import NavigationRail, { NavigationRailItem } from "./components/navigation-rail/index.js";
|
|
53
|
+
import NavigationTree, { NavigationTreeItem, NavigationTreeSection } from "./components/navigation-tree/index.js";
|
|
47
54
|
import NumberField from "./components/number-field/index.js";
|
|
48
|
-
import Popover from "./components/popover/index.js";
|
|
55
|
+
import Popover, { PopoverContent, PopoverDescription, PopoverTitle } from "./components/popover/index.js";
|
|
49
56
|
import ProductIcon from "./components/product-icon/index.js";
|
|
50
57
|
import RadioGroup, { Radio } from "./components/radio-group/index.js";
|
|
51
58
|
import SearchField from "./components/search-field/index.js";
|
|
52
|
-
import
|
|
59
|
+
import SearchView, { SearchViewContent } from "./components/search-view/index.js";
|
|
60
|
+
import SegmentedButton, { SegmentedButtonSegment } from "./components/segmented-button/index.js";
|
|
53
61
|
import Select from "./components/select/index.js";
|
|
54
|
-
import Sheet from "./components/sheet/index.js";
|
|
62
|
+
import Sheet, { SheetBody, SheetContent, SheetFooter, SheetHandle, SheetHeader, SheetTitle } from "./components/sheet/index.js";
|
|
55
63
|
import Slider from "./components/slider/index.js";
|
|
56
64
|
import Snackbar from "./components/snackbar/index.js";
|
|
65
|
+
import SplitButton, { SplitButtonAction, SplitButtonMenu } from "./components/split-button/index.js";
|
|
57
66
|
import Stack from "./components/stack/index.js";
|
|
58
67
|
import SupportingPane from "./components/supporting-pane/index.js";
|
|
59
68
|
import Switch from "./components/switch/index.js";
|
|
60
|
-
import Table from "./components/table/index.js";
|
|
61
|
-
import Tabs from "./components/tabs/index.js";
|
|
69
|
+
import Table, { TableBody, TableCell, TableColumn, TableFooter, TableHeader, TableLoadMore, TableRow } from "./components/table/index.js";
|
|
70
|
+
import Tabs, { TabsList, TabsPanel, TabsPanels, TabsTab } from "./components/tabs/index.js";
|
|
62
71
|
import Tag from "./components/tag/index.js";
|
|
63
72
|
import TextArea from "./components/text-area/index.js";
|
|
64
73
|
import TextField from "./components/text-field/index.js";
|
|
@@ -66,9 +75,9 @@ import TimeField from "./components/time-field/index.js";
|
|
|
66
75
|
import TokenField from "./components/token-field/index.js";
|
|
67
76
|
import Toolbar from "./components/toolbar/index.js";
|
|
68
77
|
import Tooltip from "./components/tooltip/index.js";
|
|
69
|
-
import Tree from "./components/tree/index.js";
|
|
78
|
+
import Tree, { TreeItem, TreeLoadMore, TreeSection } from "./components/tree/index.js";
|
|
70
79
|
import { collectionSizes } from "./layout.js";
|
|
71
80
|
import { useDragAndDrop } from "./drag/hooks.js";
|
|
72
81
|
import { Collection, DIRECTORY_DRAG_TYPE, Focusable, GridLayout, I18nProvider, ListLayout, Pressable, RouterProvider, SharedElement, SharedElementTransition, TableLayout, TokenFieldValue, Virtualizer, VisuallyHidden, WaterfallLayout, getColorChannels, isDirectoryDropItem, isFileDropItem, isTextDropItem, parseColor, useAsyncList, useDrag, useDrop, useFilter, useListData, useLocale, useTreeData } from "./react-aria.js";
|
|
73
82
|
import "./styles.css";
|
|
74
|
-
export { AppBar, Autocomplete, Avatar, Breadcrumbs, Button, Calendar, Card, Checkbox, CheckboxGroup, Chip, ChipGroup, Code, Collection, ColorArea, ColorField, ColorPicker, ColorSlider, ColorSwatch, ColorSwatchPicker, ColorWheel, ComboBox, Container, CopyField, Currency, DIRECTORY_DRAG_TYPE, DateField, DatePicker, DateRangePicker, Dialog, Disclosure, DisclosureGroup, DropZone, Feed, FileTrigger, Focusable, Form, GridLayout, I18nProvider, IconButton, Keycap, Link, List, ListBox, ListDetail, ListItem, ListLayout, Menu, Meter, NavigationTree, NumberField, Popover, Pressable, ProductIcon, ProgressIndicator, Radio, RadioGroup, RangeCalendar, RouterProvider, SearchField, SegmentedButton, Select, Separator, SharedElement, SharedElementTransition, Sheet, Slider, Snackbar, Stack, SupportingPane, Switch, Table, TableLayout, Tabs, Tag, Text, TextArea, TextField, TimeField, TokenField, TokenFieldValue, Toolbar, Tooltip, Tree, Virtualizer, VisuallyHidden, WaterfallLayout, collectionSizes, getColorChannels, isDirectoryDropItem, isFileDropItem, isTextDropItem, parseColor, useAsyncList, useDrag, useDragAndDrop, useDrop, useFilter, useListData, useLocale, useTreeData };
|
|
83
|
+
export { AppBar, Autocomplete, Avatar, Badge, Breadcrumbs, BreadcrumbsItem, Button, ButtonGroup, Calendar, Card, Checkbox, CheckboxGroup, Chip, ChipGroup, ChipGroupChip, Code, Collection, ColorArea, ColorField, ColorPicker, ColorSlider, ColorSwatch, ColorSwatchPicker, ColorSwatchPickerItem, ColorWheel, ComboBox, Container, CopyField, Currency, DIRECTORY_DRAG_TYPE, DateField, DatePicker, DateRangePicker, Dialog, DialogBody, DialogContent, DialogFooter, DialogHeader, DialogTitle, Disclosure, DisclosureGroup, DisclosureHeader, DisclosurePanel, DropZone, Fab, FabMenu, FabMenuItem, Feed, FileTrigger, Focusable, Form, GridLayout, I18nProvider, IconButton, Keycap, Link, List, ListBox, ListBoxItem, ListBoxLoadMore, ListBoxSection, ListDetail, ListItem, ListLayout, ListLoadMore, ListRow, ListSection, Menu, MenuContent, MenuItem, MenuLoadMore, MenuSection, MenuSeparator, MenuSubmenu, Meter, NavigationBar, NavigationBarItem, NavigationRail, NavigationRailItem, NavigationTree, NavigationTreeItem, NavigationTreeSection, NumberField, Popover, PopoverContent, PopoverDescription, PopoverTitle, Pressable, ProductIcon, ProgressIndicator, Radio, RadioGroup, RangeCalendar, RouterProvider, SearchField, SearchView, SearchViewContent, SegmentedButton, SegmentedButtonSegment, Select, Separator, SharedElement, SharedElementTransition, Sheet, SheetBody, SheetContent, SheetFooter, SheetHandle, SheetHeader, SheetTitle, Slider, Snackbar, SplitButton, SplitButtonAction, SplitButtonMenu, Stack, SupportingPane, Switch, Table, TableBody, TableCell, TableColumn, TableFooter, TableHeader, TableLayout, TableLoadMore, TableRow, Tabs, TabsList, TabsPanel, TabsPanels, TabsTab, Tag, Text, TextArea, TextField, TimeField, TokenField, TokenFieldValue, Toolbar, Tooltip, Tree, TreeItem, TreeLoadMore, TreeSection, Virtualizer, VisuallyHidden, WaterfallLayout, collectionSizes, colorScheme, getColorChannels, isDirectoryDropItem, isFileDropItem, isTextDropItem, parseColor, useAsyncList, useDrag, useDragAndDrop, useDrop, useFilter, useListData, useLocale, useTreeData };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","names":["createContext","NavigationContextValue","form","NavigationForm","selectedRoute","NavigationContext"],"sources":["../../src/navigation/context.ts"],"sourcesContent":["import { createContext } from 'react'\n\n// Apart from ./index.tsx so that file exports components alone, which is what\n// keeps fast refresh working for it — the same arrangement `src/row` uses.\n\n/**\n * What NavigationBar and NavigationRail hand their destinations: the form to\n * draw, and the route of the current one.\n */\ntype NavigationContextValue = {\n form: NavigationForm\n selectedRoute?: string | undefined\n}\n\n/** Which of the three forms a destination draws — see ./styles.ts. */\ntype NavigationForm = 'bar' | 'collapsed' | 'expanded'\n\nconst NavigationContext = createContext<NavigationContextValue>({\n form: 'bar',\n})\n\nexport type { NavigationContextValue, NavigationForm }\n\nexport { NavigationContext }\n"],"mappings":";;AAiBA,MAAMK,oBAAoBL,cAAsC,EAC9DE,MAAM,MACR,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ReactNode, RefAttributes } from "react";
|
|
2
|
+
import { LinkProps } from "react-aria-components";
|
|
3
|
+
//#region src/navigation/index.d.ts
|
|
4
|
+
type NavigationItemProps = {
|
|
5
|
+
/**
|
|
6
|
+
* A badge on the icon: `true` for the badges page's small dot, a number
|
|
7
|
+
* for the large badge holding it. The badge is hidden from assistive
|
|
8
|
+
* technology, so say what it says in the destination's `aria-label` too —
|
|
9
|
+
* "First item, 3 new".
|
|
10
|
+
*/
|
|
11
|
+
badge?: boolean | number;
|
|
12
|
+
/** The destination's name, drawn as its label. */
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
/** A function may compute the class from the destination's render state. */
|
|
15
|
+
className?: LinkProps['className'];
|
|
16
|
+
/**
|
|
17
|
+
* Where the destination goes, and what the bar's or the rail's
|
|
18
|
+
* `selectedRoute` is matched against.
|
|
19
|
+
*/
|
|
20
|
+
href: string;
|
|
21
|
+
/** The destination's icon, at the pages' 24dp. */
|
|
22
|
+
icon: ReactNode;
|
|
23
|
+
/** A function may compute the style from the destination's render state. */
|
|
24
|
+
style?: LinkProps['style'];
|
|
25
|
+
} & Omit<LinkProps, 'children' | 'className' | 'href' | 'style'>;
|
|
26
|
+
//#endregion
|
|
27
|
+
export type { NavigationItemProps };
|
|
28
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { props } from "../node_modules/@stylexjs/stylex/lib/es/stylex.js";
|
|
2
|
+
import { mergeStatefulStyles } from "../styles/merge.js";
|
|
3
|
+
import Badge from "../components/badge/index.js";
|
|
4
|
+
import { focus } from "../styles/focus.js";
|
|
5
|
+
import { NavigationContext } from "./context.js";
|
|
6
|
+
import { barItemStyles, collapsedItemStyles, expandedItemStyles, navigationItemStyles } from "./styles.js";
|
|
7
|
+
import { c } from "react/compiler-runtime";
|
|
8
|
+
import { useContext } from "react";
|
|
9
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
import { Link } from "react-aria-components";
|
|
11
|
+
//#region src/navigation/index.tsx
|
|
12
|
+
const FORMS = {
|
|
13
|
+
bar: barItemStyles,
|
|
14
|
+
collapsed: collapsedItemStyles,
|
|
15
|
+
expanded: expandedItemStyles
|
|
16
|
+
};
|
|
17
|
+
const RINGS = {
|
|
18
|
+
bar: {
|
|
19
|
+
indicator: barItemStyles.indicatorRing,
|
|
20
|
+
item: barItemStyles.itemRing
|
|
21
|
+
},
|
|
22
|
+
collapsed: {
|
|
23
|
+
indicator: focus.ringVisible,
|
|
24
|
+
item: null
|
|
25
|
+
},
|
|
26
|
+
expanded: {
|
|
27
|
+
indicator: null,
|
|
28
|
+
item: focus.ringVisible
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
function itemClasses(form, isCurrent) {
|
|
32
|
+
const styles = FORMS[form];
|
|
33
|
+
return (state) => props(navigationItemStyles.link, styles.item, isCurrent && styles.itemCurrent, state.isHovered && (isCurrent ? styles.itemHoveredCurrent : styles.itemHovered), state.isFocusVisible && (isCurrent ? styles.itemFocusedCurrent : styles.itemFocused), state.isPressed && (isCurrent ? styles.itemPressedCurrent : styles.itemPressed), state.isFocusVisible && RINGS[form].item, state.isDisabled && navigationItemStyles.itemDisabled);
|
|
34
|
+
}
|
|
35
|
+
function itemContent(form, isCurrent, badge, icon, label) {
|
|
36
|
+
const styles = FORMS[form];
|
|
37
|
+
const glyph = badge === void 0 || badge === false ? icon : /* @__PURE__ */ jsx(Badge, {
|
|
38
|
+
count: badge === true ? void 0 : badge,
|
|
39
|
+
children: icon
|
|
40
|
+
});
|
|
41
|
+
return (state) => /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
|
|
42
|
+
...props(navigationItemStyles.pill, styles.indicator, isCurrent && styles.indicatorCurrent, state.isHovered && (isCurrent ? styles.indicatorHoveredCurrent : styles.indicatorHovered), state.isFocusVisible && (isCurrent ? styles.indicatorFocusedCurrent : styles.indicatorFocused), state.isPressed && (isCurrent ? styles.indicatorPressedCurrent : styles.indicatorPressed), state.isFocusVisible && RINGS[form].indicator, state.isDisabled && navigationItemStyles.itemDisabled),
|
|
43
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
44
|
+
...props(navigationItemStyles.icon),
|
|
45
|
+
children: glyph
|
|
46
|
+
})
|
|
47
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
48
|
+
...props(navigationItemStyles.label, styles.label, isCurrent && styles.labelCurrent, state.isDisabled && navigationItemStyles.itemDisabled),
|
|
49
|
+
children: label
|
|
50
|
+
})] });
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* One destination in a navigation bar or rail: an icon, a label and, when
|
|
54
|
+
* it is the current one, the active indicator behind them.
|
|
55
|
+
*/
|
|
56
|
+
function NavigationItem(t0) {
|
|
57
|
+
const $ = c(13);
|
|
58
|
+
const { badge, children, href, icon, ...props } = t0;
|
|
59
|
+
const { form, selectedRoute } = useContext(NavigationContext);
|
|
60
|
+
const isCurrent = selectedRoute !== void 0 && href === selectedRoute;
|
|
61
|
+
const T0 = Link;
|
|
62
|
+
const t1 = isCurrent ? "page" : void 0;
|
|
63
|
+
const t2 = mergeStatefulStyles(itemClasses(form, isCurrent), props);
|
|
64
|
+
let t3;
|
|
65
|
+
if ($[0] !== badge || $[1] !== children || $[2] !== form || $[3] !== icon || $[4] !== isCurrent) {
|
|
66
|
+
t3 = itemContent(form, isCurrent, badge, icon, children);
|
|
67
|
+
$[0] = badge;
|
|
68
|
+
$[1] = children;
|
|
69
|
+
$[2] = form;
|
|
70
|
+
$[3] = icon;
|
|
71
|
+
$[4] = isCurrent;
|
|
72
|
+
$[5] = t3;
|
|
73
|
+
} else t3 = $[5];
|
|
74
|
+
let t4;
|
|
75
|
+
if ($[6] !== T0 || $[7] !== href || $[8] !== props || $[9] !== t1 || $[10] !== t2 || $[11] !== t3) {
|
|
76
|
+
t4 = /* @__PURE__ */ jsx(T0, {
|
|
77
|
+
"aria-current": t1,
|
|
78
|
+
href,
|
|
79
|
+
...props,
|
|
80
|
+
...t2,
|
|
81
|
+
children: t3
|
|
82
|
+
});
|
|
83
|
+
$[6] = T0;
|
|
84
|
+
$[7] = href;
|
|
85
|
+
$[8] = props;
|
|
86
|
+
$[9] = t1;
|
|
87
|
+
$[10] = t2;
|
|
88
|
+
$[11] = t3;
|
|
89
|
+
$[12] = t4;
|
|
90
|
+
} else t4 = $[12];
|
|
91
|
+
return t4;
|
|
92
|
+
}
|
|
93
|
+
//#endregion
|
|
94
|
+
export { NavigationItem };
|
|
95
|
+
|
|
96
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["ReactNode","RefAttributes","LinkRenderProps","LinkProps","RACLinkProps","stylex","useContext","Link","RACLink","NavigationForm","Badge","focus","mergeStatefulStyles","NavigationContext","barItemStyles","collapsedItemStyles","expandedItemStyles","navigationItemStyles","FORMS","bar","collapsed","expanded","RINGS","indicator","indicatorRing","item","itemRing","ringVisible","NavigationItemProps","badge","children","className","href","icon","style","Omit","itemClasses","form","isCurrent","styles","state","props","link","itemCurrent","isHovered","itemHoveredCurrent","itemHovered","isFocusVisible","itemFocusedCurrent","itemFocused","isPressed","itemPressedCurrent","itemPressed","isDisabled","itemDisabled","itemContent","label","glyph","undefined","pill","indicatorCurrent","indicatorHoveredCurrent","indicatorHovered","indicatorFocusedCurrent","indicatorFocused","indicatorPressedCurrent","indicatorPressed","labelCurrent","NavigationItem","t0","$","_c","selectedRoute","T0","t1","t2","t3","t4","stylex.props","_c","RACLink"],"sources":["../../src/navigation/index.tsx"],"sourcesContent":["import type { ReactNode, RefAttributes } from 'react';\nimport type { LinkRenderProps, LinkProps as RACLinkProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { useContext } from 'react';\nimport { Link as RACLink } from 'react-aria-components';\nimport type { NavigationForm } from './context';\nimport Badge from '../components/badge';\nimport { focus } from '../styles/focus';\nimport { mergeStatefulStyles } from '../styles/merge';\nimport { NavigationContext } from './context';\nimport { barItemStyles, collapsedItemStyles, expandedItemStyles, navigationItemStyles } from './styles';\n\n// The destination NavigationBar and NavigationRail both render, and the\n// context each hands it: which of the three forms to draw and which route is\n// current. See ./styles.ts for the forms.\n//\n// A destination is a link — it goes somewhere, rather than selecting\n// something — so it is React Aria's `Link`, which routes through a\n// `RouterProvider` when an app has one. The current one is the one whose\n// `href` is the bar's or the rail's `selectedRoute`, the same matching\n// NavigationTree does, and it carries `aria-current=\"page\"`.\n\nconst FORMS = {\n bar: barItemStyles,\n collapsed: collapsedItemStyles,\n expanded: expandedItemStyles\n};\n\n// The focus ring goes around the pill, wherever a form draws it: the\n// indicator in a vertical destination, the whole destination in a horizontal\n// one. The rail's two forms take the library's shared ring. The bar's pill\n// moves from one element to the other at the medium breakpoint, so its rings\n// are its own, each giving way at the width the other takes over.\nconst RINGS = {\n bar: {\n indicator: barItemStyles.indicatorRing,\n item: barItemStyles.itemRing\n },\n collapsed: {\n indicator: focus.ringVisible,\n item: null\n },\n expanded: {\n indicator: null,\n item: focus.ringVisible\n }\n};\ntype NavigationItemProps = {\n /**\n * A badge on the icon: `true` for the badges page's small dot, a number\n * for the large badge holding it. The badge is hidden from assistive\n * technology, so say what it says in the destination's `aria-label` too —\n * \"First item, 3 new\".\n */\n badge?: boolean | number;\n /** The destination's name, drawn as its label. */\n children: ReactNode;\n /** A function may compute the class from the destination's render state. */\n className?: RACLinkProps['className'];\n /**\n * Where the destination goes, and what the bar's or the rail's\n * `selectedRoute` is matched against.\n */\n href: string;\n /** The destination's icon, at the pages' 24dp. */\n icon: ReactNode;\n /** A function may compute the style from the destination's render state. */\n style?: RACLinkProps['style'];\n} & Omit<RACLinkProps, 'children' | 'className' | 'href' | 'style'>;\n\n// A destination's own classes, from React Aria's render state: the pill in a\n// horizontal form, and the layers over it.\nfunction itemClasses(form: NavigationForm, isCurrent: boolean) {\n const styles = FORMS[form];\n return (state: LinkRenderProps) => stylex.props(navigationItemStyles.link, styles.item, isCurrent && styles.itemCurrent, state.isHovered && (isCurrent ? styles.itemHoveredCurrent : styles.itemHovered), state.isFocusVisible && (isCurrent ? styles.itemFocusedCurrent : styles.itemFocused), state.isPressed && (isCurrent ? styles.itemPressedCurrent : styles.itemPressed), state.isFocusVisible && RINGS[form].item, state.isDisabled && navigationItemStyles.itemDisabled);\n}\n\n// What a destination draws, from React Aria's render state: the indicator\n// holding the icon, and the label beside or under it. Built by a call rather\n// than written inline at the prop, which is what react-perf's\n// no-new-function-as-prop is after.\nfunction itemContent(form: NavigationForm, isCurrent: boolean, badge: boolean | number | undefined, icon: ReactNode, label: ReactNode) {\n const styles = FORMS[form];\n const glyph = badge === undefined || badge === false ? icon : <Badge count={badge === true ? undefined : badge}>{icon}</Badge>;\n return (state: LinkRenderProps) => <>\n <span {...stylex.props(navigationItemStyles.pill, styles.indicator, isCurrent && styles.indicatorCurrent, state.isHovered && (isCurrent ? styles.indicatorHoveredCurrent : styles.indicatorHovered), state.isFocusVisible && (isCurrent ? styles.indicatorFocusedCurrent : styles.indicatorFocused), state.isPressed && (isCurrent ? styles.indicatorPressedCurrent : styles.indicatorPressed), state.isFocusVisible && RINGS[form].indicator, state.isDisabled && navigationItemStyles.itemDisabled)}>\n <span {...stylex.props(navigationItemStyles.icon)}>{glyph}</span>\n </span>\n <span {...stylex.props(navigationItemStyles.label, styles.label, isCurrent && styles.labelCurrent, state.isDisabled && navigationItemStyles.itemDisabled)}>\n {label}\n </span>\n </>;\n}\n\n/**\n * One destination in a navigation bar or rail: an icon, a label and, when\n * it is the current one, the active indicator behind them.\n */\nfunction NavigationItem({\n badge,\n children,\n href,\n icon,\n ...props\n}: NavigationItemProps & RefAttributes<HTMLAnchorElement>) {\n const {\n form,\n selectedRoute\n } = useContext(NavigationContext);\n const isCurrent = selectedRoute !== undefined && href === selectedRoute;\n return <RACLink aria-current={isCurrent ? 'page' : undefined} href={href} {...props} {...mergeStatefulStyles(itemClasses(form, isCurrent), props)}>\n {itemContent(form, isCurrent, badge, icon, children)}\n </RACLink>;\n}\nexport type { NavigationItemProps };\nexport { NavigationItem };"],"mappings":";;;;;;;;;;;AAsBA,MAAMkB,QAAQ;CACZC,KAAKL;CACLM,WAAWL;CACXM,UAAUL;AACZ;AAOA,MAAMM,QAAQ;CACZH,KAAK;EACHI,WAAWT,cAAcU;EACzBC,MAAMX,cAAcY;CACtB;CACAN,WAAW;EACTG,WAAWZ,MAAMgB;EACjBF,MAAM;CACR;CACAJ,UAAU;EACRE,WAAW;EACXE,MAAMd,MAAMgB;CACd;AACF;AA0BA,SAASS,YAAYC,MAAsBC,WAAoB;CAC7D,MAAMC,SAASrB,MAAMmB;CACrB,QAAQG,UAA2BnC,MAAaY,qBAAqByB,MAAMH,OAAOd,MAAMa,aAAaC,OAAOI,aAAaH,MAAMI,cAAcN,YAAYC,OAAOM,qBAAqBN,OAAOO,cAAcN,MAAMO,mBAAmBT,YAAYC,OAAOS,qBAAqBT,OAAOU,cAAcT,MAAMU,cAAcZ,YAAYC,OAAOY,qBAAqBZ,OAAOa,cAAcZ,MAAMO,kBAAkBzB,MAAMe,KAAK,CAACZ,MAAMe,MAAMa,cAAcpC,qBAAqBqC,YAAY;AACld;AAMA,SAASC,YAAYlB,MAAsBC,WAAoB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A/D,oBAAoBwB,YAAYC,MAAMC,SAAS,GAAGG,KAAK;CAAC,IAAAmC;CAAA,IAAAN,EAAA,OAAAzC,SAAAyC,EAAA,OAAAxC,YAAAwC,EAAA,OAAAjC,QAAAiC,EAAA,OAAArC,QAAAqC,EAAA,OAAAhC,WAAA;EAC5IsC,KAAArB,YAAYlB,MAAMC,WAAWT,OAAOI,MAAMH,QAAQ;EAACwC,EAAA,KAAAzC;EAAAyC,EAAA,KAAAxC;EAAAwC,EAAA,KAAAjC;EAAAiC,EAAA,KAAArC;EAAAqC,EAAA,KAAAhC;EAAAgC,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,IAAAO;CAAA,IAAAP,EAAA,OAAAG,MAAAH,EAAA,OAAAtC,QAAAsC,EAAA,OAAA7B,SAAA6B,EAAA,OAAAI,MAAAJ,EAAA,QAAAK,MAAAL,EAAA,QAAAM,IAAA;EADjDC,KAAA,oBAAC,IAAD;GAAuB,gBAAAH;GAAsC1C;GAAI,GAAMS;GAAK,GAAMkC;GACpFC,UAAAA;EADU,CAAA;EAEHN,EAAA,KAAAG;EAAAH,EAAA,KAAAtC;EAAAsC,EAAA,KAAA7B;EAAA6B,EAAA,KAAAI;EAAAJ,EAAA,MAAAK;EAAAL,EAAA,MAAAM;EAAAN,EAAA,MAAAO;CAAA,OAAAA,KAAAP,EAAA;CAAA,OAFLO;AAEK"}
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
import { colors, stateLayerOpacity } from "../tokens/design.tokens.stylex.js";
|
|
2
|
+
//#region src/navigation/styles.ts
|
|
3
|
+
`${colors.onSecondaryContainer}${stateLayerOpacity.hover}`;
|
|
4
|
+
`${colors.onSecondaryContainer}${stateLayerOpacity.focus}`;
|
|
5
|
+
`${colors.onSecondaryContainer}${stateLayerOpacity.pressed}`;
|
|
6
|
+
`${colors.onSecondaryContainer}${stateLayerOpacity.hover}${colors.secondaryContainer}`;
|
|
7
|
+
`${colors.onSecondaryContainer}${stateLayerOpacity.focus}${colors.secondaryContainer}`;
|
|
8
|
+
`${colors.onSecondaryContainer}${stateLayerOpacity.pressed}${colors.secondaryContainer}`;
|
|
9
|
+
const navigationItemStyles = {
|
|
10
|
+
icon: {
|
|
11
|
+
kGNEyG: "x6s0dn4",
|
|
12
|
+
k1xSpc: "x78zum5",
|
|
13
|
+
kGuDYH: "x1pvqxga",
|
|
14
|
+
kjj79g: "xl56j7k",
|
|
15
|
+
$$css: true
|
|
16
|
+
},
|
|
17
|
+
itemDisabled: {
|
|
18
|
+
kMwMTN: "x1gpw424",
|
|
19
|
+
kkrTdU: "xt0e3qv",
|
|
20
|
+
$$css: true
|
|
21
|
+
},
|
|
22
|
+
label: {
|
|
23
|
+
kMwMTN: "x1w5n3ug",
|
|
24
|
+
kVQacm: "xb3r6kr",
|
|
25
|
+
kg5iWk: "xlyipyv",
|
|
26
|
+
khDVqt: "xuxw1ft",
|
|
27
|
+
$$css: true
|
|
28
|
+
},
|
|
29
|
+
link: {
|
|
30
|
+
kGNEyG: "x6s0dn4",
|
|
31
|
+
kB7OPa: "x9f619",
|
|
32
|
+
kMwMTN: "x1w5n3ug",
|
|
33
|
+
kkrTdU: "x1ypdohk",
|
|
34
|
+
k1xSpc: "x78zum5",
|
|
35
|
+
k3XXqK: "x1t137rt",
|
|
36
|
+
kVAEAm: "x1n2onr6",
|
|
37
|
+
kMnn75: "xkrqix3",
|
|
38
|
+
$$css: true
|
|
39
|
+
},
|
|
40
|
+
pill: {
|
|
41
|
+
kWkggS: "xjbqb8w",
|
|
42
|
+
kaIpWk: "x1dkaolv",
|
|
43
|
+
kB7OPa: "x9f619",
|
|
44
|
+
kMwMTN: "x1w5n3ug",
|
|
45
|
+
$$css: true
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
const barItemStyles = {
|
|
49
|
+
indicator: {
|
|
50
|
+
kGNEyG: "x6s0dn4",
|
|
51
|
+
kZKoxP: "x10w6t97 x10qpgbh",
|
|
52
|
+
kaIpWk: "x1dkaolv",
|
|
53
|
+
kB7OPa: "x9f619",
|
|
54
|
+
k1xSpc: "x78zum5",
|
|
55
|
+
kmuXW: "x2lah0s",
|
|
56
|
+
kzqmXN: "x15yg21f x11lewyt",
|
|
57
|
+
kjj79g: "xl56j7k",
|
|
58
|
+
$$css: true
|
|
59
|
+
},
|
|
60
|
+
indicatorCurrent: {
|
|
61
|
+
kWkggS: "x15dekr4 x8jqrm0",
|
|
62
|
+
kVAM5u: "x1n2ykn",
|
|
63
|
+
ksu8eU: "xx61lck xnqlxux",
|
|
64
|
+
kMzoRj: "x2h6xq1",
|
|
65
|
+
kMwMTN: "x1sawysd",
|
|
66
|
+
$$css: true
|
|
67
|
+
},
|
|
68
|
+
indicatorFocused: {
|
|
69
|
+
kWkggS: "x1syr9su x8jqrm0",
|
|
70
|
+
$$css: true
|
|
71
|
+
},
|
|
72
|
+
indicatorFocusedCurrent: {
|
|
73
|
+
kWkggS: "x1s5x49g x8jqrm0",
|
|
74
|
+
$$css: true
|
|
75
|
+
},
|
|
76
|
+
indicatorHovered: {
|
|
77
|
+
kWkggS: "x173luhf x8jqrm0",
|
|
78
|
+
$$css: true
|
|
79
|
+
},
|
|
80
|
+
indicatorHoveredCurrent: {
|
|
81
|
+
kWkggS: "x1fctxn6 x8jqrm0",
|
|
82
|
+
$$css: true
|
|
83
|
+
},
|
|
84
|
+
indicatorPressed: {
|
|
85
|
+
kWkggS: "x1rydsgj x8jqrm0",
|
|
86
|
+
$$css: true
|
|
87
|
+
},
|
|
88
|
+
indicatorPressedCurrent: {
|
|
89
|
+
kWkggS: "xzpauq9 x8jqrm0",
|
|
90
|
+
$$css: true
|
|
91
|
+
},
|
|
92
|
+
indicatorRing: {
|
|
93
|
+
kjBf7l: "xrgy624",
|
|
94
|
+
kInvED: "x1hl8ikr",
|
|
95
|
+
k3XXqK: "xaatb59 x1t601oj",
|
|
96
|
+
kMeerF: "x1de99jn",
|
|
97
|
+
$$css: true
|
|
98
|
+
},
|
|
99
|
+
item: {
|
|
100
|
+
kZKoxP: "x5yr21d xiioxts",
|
|
101
|
+
kaIpWk: "x1dkaolv",
|
|
102
|
+
kCS8Yb: "x1r8uery x1a6ly76",
|
|
103
|
+
kXwgrk: "xdt5ytf xapwh9g",
|
|
104
|
+
kzQI83: "x1iyjqo2 x10cb59y",
|
|
105
|
+
kOIVth: "xzoy561",
|
|
106
|
+
kjj79g: "xl56j7k",
|
|
107
|
+
k7Eaqz: "xeuugli",
|
|
108
|
+
k8WAf4: "x1t0vds8 x1nouyz5",
|
|
109
|
+
kg3NbH: "xnjsko4 xze1m75",
|
|
110
|
+
$$css: true
|
|
111
|
+
},
|
|
112
|
+
itemCurrent: {
|
|
113
|
+
kWkggS: "xjbqb8w x1xec0pq",
|
|
114
|
+
kVAM5u: "x1n2ykn",
|
|
115
|
+
ksu8eU: "x1xldtvv x1wx4lrg",
|
|
116
|
+
kMzoRj: "x2h6xq1",
|
|
117
|
+
$$css: true
|
|
118
|
+
},
|
|
119
|
+
itemFocused: {
|
|
120
|
+
kWkggS: "xjbqb8w xdodzsd",
|
|
121
|
+
$$css: true
|
|
122
|
+
},
|
|
123
|
+
itemFocusedCurrent: {
|
|
124
|
+
kWkggS: "xjbqb8w xnmt8re",
|
|
125
|
+
$$css: true
|
|
126
|
+
},
|
|
127
|
+
itemHovered: {
|
|
128
|
+
kWkggS: "xjbqb8w xdenq60",
|
|
129
|
+
$$css: true
|
|
130
|
+
},
|
|
131
|
+
itemHoveredCurrent: {
|
|
132
|
+
kWkggS: "xjbqb8w xjq3nej",
|
|
133
|
+
$$css: true
|
|
134
|
+
},
|
|
135
|
+
itemPressed: {
|
|
136
|
+
kWkggS: "xjbqb8w x7fq6vu",
|
|
137
|
+
$$css: true
|
|
138
|
+
},
|
|
139
|
+
itemPressedCurrent: {
|
|
140
|
+
kWkggS: "xjbqb8w x9wewpu",
|
|
141
|
+
$$css: true
|
|
142
|
+
},
|
|
143
|
+
itemRing: {
|
|
144
|
+
kjBf7l: "xrgy624",
|
|
145
|
+
kInvED: "x1hl8ikr",
|
|
146
|
+
k3XXqK: "x1t137rt xxgb522",
|
|
147
|
+
kMeerF: "x1de99jn",
|
|
148
|
+
$$css: true
|
|
149
|
+
},
|
|
150
|
+
label: {
|
|
151
|
+
kMv6JI: "xp6n8n2",
|
|
152
|
+
kGuDYH: "xkucv67",
|
|
153
|
+
k63SB2: "x14hhc5u",
|
|
154
|
+
kb6lSQ: "x12utw95",
|
|
155
|
+
kLWn49: "xvzb9hk",
|
|
156
|
+
ks0D6T: "x193iq5w",
|
|
157
|
+
$$css: true
|
|
158
|
+
},
|
|
159
|
+
labelCurrent: {
|
|
160
|
+
kMwMTN: "xzakmg9 x16ybrrz",
|
|
161
|
+
$$css: true
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
const collapsedItemStyles = {
|
|
165
|
+
indicator: {
|
|
166
|
+
kGNEyG: "x6s0dn4",
|
|
167
|
+
kZKoxP: "x10w6t97",
|
|
168
|
+
kaIpWk: "x1dkaolv",
|
|
169
|
+
kB7OPa: "x9f619",
|
|
170
|
+
k1xSpc: "x78zum5",
|
|
171
|
+
kmuXW: "x2lah0s",
|
|
172
|
+
kzqmXN: "x15yg21f",
|
|
173
|
+
kjj79g: "xl56j7k",
|
|
174
|
+
$$css: true
|
|
175
|
+
},
|
|
176
|
+
indicatorCurrent: {
|
|
177
|
+
kWkggS: "x15dekr4",
|
|
178
|
+
kVAM5u: "x1n2ykn",
|
|
179
|
+
ksu8eU: "xx61lck",
|
|
180
|
+
kMzoRj: "x2h6xq1",
|
|
181
|
+
kMwMTN: "x1sawysd",
|
|
182
|
+
$$css: true
|
|
183
|
+
},
|
|
184
|
+
indicatorFocused: {
|
|
185
|
+
kWkggS: "x1syr9su",
|
|
186
|
+
$$css: true
|
|
187
|
+
},
|
|
188
|
+
indicatorFocusedCurrent: {
|
|
189
|
+
kWkggS: "x1s5x49g",
|
|
190
|
+
$$css: true
|
|
191
|
+
},
|
|
192
|
+
indicatorHovered: {
|
|
193
|
+
kWkggS: "x173luhf",
|
|
194
|
+
$$css: true
|
|
195
|
+
},
|
|
196
|
+
indicatorHoveredCurrent: {
|
|
197
|
+
kWkggS: "x1fctxn6",
|
|
198
|
+
$$css: true
|
|
199
|
+
},
|
|
200
|
+
indicatorPressed: {
|
|
201
|
+
kWkggS: "x1rydsgj",
|
|
202
|
+
$$css: true
|
|
203
|
+
},
|
|
204
|
+
indicatorPressedCurrent: {
|
|
205
|
+
kWkggS: "xzpauq9",
|
|
206
|
+
$$css: true
|
|
207
|
+
},
|
|
208
|
+
item: {
|
|
209
|
+
kXwgrk: "xdt5ytf",
|
|
210
|
+
kOIVth: "xzoy561",
|
|
211
|
+
kzqmXN: "xh8yej3",
|
|
212
|
+
kjj79g: "xl56j7k",
|
|
213
|
+
k8WAf4: "x1t0vds8",
|
|
214
|
+
kg3NbH: "ximhkdq",
|
|
215
|
+
$$css: true
|
|
216
|
+
},
|
|
217
|
+
itemCurrent: { $$css: true },
|
|
218
|
+
itemFocused: { $$css: true },
|
|
219
|
+
itemFocusedCurrent: { $$css: true },
|
|
220
|
+
itemHovered: { $$css: true },
|
|
221
|
+
itemHoveredCurrent: { $$css: true },
|
|
222
|
+
itemPressed: { $$css: true },
|
|
223
|
+
itemPressedCurrent: { $$css: true },
|
|
224
|
+
label: {
|
|
225
|
+
kMv6JI: "xp6n8n2",
|
|
226
|
+
kGuDYH: "xkucv67",
|
|
227
|
+
k63SB2: "x14hhc5u",
|
|
228
|
+
kb6lSQ: "x12utw95",
|
|
229
|
+
kLWn49: "xvzb9hk",
|
|
230
|
+
ks0D6T: "x193iq5w",
|
|
231
|
+
$$css: true
|
|
232
|
+
},
|
|
233
|
+
labelCurrent: {
|
|
234
|
+
kMwMTN: "xzakmg9",
|
|
235
|
+
$$css: true
|
|
236
|
+
}
|
|
237
|
+
};
|
|
238
|
+
const expandedItemStyles = {
|
|
239
|
+
indicator: {
|
|
240
|
+
kGNEyG: "x6s0dn4",
|
|
241
|
+
k1xSpc: "x78zum5",
|
|
242
|
+
kmuXW: "x2lah0s",
|
|
243
|
+
$$css: true
|
|
244
|
+
},
|
|
245
|
+
indicatorCurrent: {
|
|
246
|
+
kMwMTN: "x1sawysd",
|
|
247
|
+
$$css: true
|
|
248
|
+
},
|
|
249
|
+
indicatorFocused: { $$css: true },
|
|
250
|
+
indicatorFocusedCurrent: { $$css: true },
|
|
251
|
+
indicatorHovered: { $$css: true },
|
|
252
|
+
indicatorHoveredCurrent: { $$css: true },
|
|
253
|
+
indicatorPressed: { $$css: true },
|
|
254
|
+
indicatorPressedCurrent: { $$css: true },
|
|
255
|
+
item: {
|
|
256
|
+
kSGwAc: "xqcrz7y",
|
|
257
|
+
kZKoxP: "xnnlda6",
|
|
258
|
+
kaIpWk: "x1dkaolv",
|
|
259
|
+
kXwgrk: "x1q0g3np",
|
|
260
|
+
kOIVth: "x126z3so",
|
|
261
|
+
ks0D6T: "x193iq5w",
|
|
262
|
+
kg3NbH: "x790zyz",
|
|
263
|
+
$$css: true
|
|
264
|
+
},
|
|
265
|
+
itemCurrent: {
|
|
266
|
+
kWkggS: "x15dekr4",
|
|
267
|
+
kVAM5u: "x1n2ykn",
|
|
268
|
+
ksu8eU: "xx61lck",
|
|
269
|
+
kMzoRj: "x2h6xq1",
|
|
270
|
+
$$css: true
|
|
271
|
+
},
|
|
272
|
+
itemFocused: {
|
|
273
|
+
kWkggS: "x1syr9su",
|
|
274
|
+
$$css: true
|
|
275
|
+
},
|
|
276
|
+
itemFocusedCurrent: {
|
|
277
|
+
kWkggS: "x1s5x49g",
|
|
278
|
+
$$css: true
|
|
279
|
+
},
|
|
280
|
+
itemHovered: {
|
|
281
|
+
kWkggS: "x173luhf",
|
|
282
|
+
$$css: true
|
|
283
|
+
},
|
|
284
|
+
itemHoveredCurrent: {
|
|
285
|
+
kWkggS: "x1fctxn6",
|
|
286
|
+
$$css: true
|
|
287
|
+
},
|
|
288
|
+
itemPressed: {
|
|
289
|
+
kWkggS: "x1rydsgj",
|
|
290
|
+
$$css: true
|
|
291
|
+
},
|
|
292
|
+
itemPressedCurrent: {
|
|
293
|
+
kWkggS: "xzpauq9",
|
|
294
|
+
$$css: true
|
|
295
|
+
},
|
|
296
|
+
label: {
|
|
297
|
+
kMv6JI: "xkknnkr",
|
|
298
|
+
kGuDYH: "x14zspaw",
|
|
299
|
+
k63SB2: "x1v9cpvo",
|
|
300
|
+
kb6lSQ: "x155f00i",
|
|
301
|
+
kLWn49: "x1lz68p4",
|
|
302
|
+
$$css: true
|
|
303
|
+
},
|
|
304
|
+
labelCurrent: {
|
|
305
|
+
kMwMTN: "x1sawysd",
|
|
306
|
+
$$css: true
|
|
307
|
+
}
|
|
308
|
+
};
|
|
309
|
+
//#endregion
|
|
310
|
+
export { barItemStyles, collapsedItemStyles, expandedItemStyles, navigationItemStyles };
|
|
311
|
+
|
|
312
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","names":["stylex","colors","media","radii","spacing","stateLayerOpacity","typography","FORCED_COLORS","HOVERED_OVER_NOTHING","onSecondaryContainer","hover","FOCUSED_OVER_NOTHING","focus","PRESSED_OVER_NOTHING","pressed","HOVERED_OVER_CURRENT","secondaryContainer","FOCUSED_OVER_CURRENT","PRESSED_OVER_CURRENT","navigationItemStyles","icon","kGNEyG","k1xSpc","kGuDYH","kjj79g","$$css","itemDisabled","kMwMTN","kkrTdU","label","kVQacm","kg5iWk","khDVqt","link","kB7OPa","k3XXqK","kVAEAm","kMnn75","pill","kWkggS","kaIpWk","barItemStyles","indicator","kZKoxP","kmuXW","kzqmXN","indicatorCurrent","kVAM5u","ksu8eU","kMzoRj","indicatorFocused","indicatorFocusedCurrent","indicatorHovered","indicatorHoveredCurrent","indicatorPressed","indicatorPressedCurrent","indicatorRing","kjBf7l","kInvED","kMeerF","item","kCS8Yb","kXwgrk","kzQI83","kOIVth","k7Eaqz","k8WAf4","kg3NbH","itemCurrent","itemFocused","itemFocusedCurrent","itemHovered","itemHoveredCurrent","itemPressed","itemPressedCurrent","itemRing","kMv6JI","k63SB2","kb6lSQ","kLWn49","ks0D6T","labelCurrent","collapsedItemStyles","expandedItemStyles","kSGwAc"],"sources":["../../src/navigation/styles.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors, media, radii, spacing, stateLayerOpacity, typography } from '../tokens/design.tokens.stylex';\n\n// The destinations NavigationBar and NavigationRail both draw, in the three\n// forms the two pages give them. Apart from either component so the two\n// cannot drift, and outside `src/components` for the reason src/row gives.\n//\n// A vertical destination puts its icon in the page's 56dp by 32dp active\n// indicator with the label 4dp under it, in label medium: the navigation bar\n// below the medium breakpoint, and the collapsed rail. A horizontal one is a\n// pill holding the icon and the label side by side, 16dp in at either end:\n// the bar at and above the medium breakpoint at 40dp with 4dp between the\n// two, and the expanded rail at 56dp with 8dp between them, in label large.\n//\n// The current destination's pill is the secondary container, with its icon\n// in on secondary container and, under the pill, its label in secondary;\n// every other is on surface variant. A label set inside the pill, as a\n// horizontal destination sets it, takes on secondary container instead — the\n// library's own call. Secondary over secondary container is not a pair a\n// scheme is held to, and the Poster scheme's came to 4:1, short of the 4.5:1\n// text needs; on secondary container is the pair every scheme guarantees.\n//\n// The hover, focus and pressed layers are the on secondary container role\n// over whatever the pill is, at the pages' 8%, 10% and 10%, drawn on the\n// pill — the indicator in a vertical destination, the whole destination in a\n// horizontal one. They are applied in that order, so where two hold the\n// later wins, as the pages draw one layer at a time. A focused destination's\n// ring goes around the same pill; ./index.tsx says whose ring it is.\n//\n// Under forced colours the mode paints the secondary container over in its\n// background, which left the current destination looking like every other.\n// The pill takes a 2px border in `Highlight` there, which the mode keeps.\n\n// Windows High Contrast and the rest of the forced-colours modes. Spelled\n// here rather than imported, for the reason src/field/styles.ts records: the\n// StyleX compiler resolves a constant across files only out of a `.stylex.ts`\n// module, and the generated one holds design tokens rather than queries.\nconst FORCED_COLORS = '@media (forced-colors: active)';\n\n// The pill's ground and the layers over it, written out whole for each\n// ground, since StyleX replaces a property whole.\nconst HOVERED_OVER_NOTHING = `color-mix(in srgb, ${colors.onSecondaryContainer} calc(${stateLayerOpacity.hover} * 100%), transparent)`;\nconst FOCUSED_OVER_NOTHING = `color-mix(in srgb, ${colors.onSecondaryContainer} calc(${stateLayerOpacity.focus} * 100%), transparent)`;\nconst PRESSED_OVER_NOTHING = `color-mix(in srgb, ${colors.onSecondaryContainer} calc(${stateLayerOpacity.pressed} * 100%), transparent)`;\nconst HOVERED_OVER_CURRENT = `color-mix(in srgb, ${colors.onSecondaryContainer} calc(${stateLayerOpacity.hover} * 100%), ${colors.secondaryContainer})`;\nconst FOCUSED_OVER_CURRENT = `color-mix(in srgb, ${colors.onSecondaryContainer} calc(${stateLayerOpacity.focus} * 100%), ${colors.secondaryContainer})`;\nconst PRESSED_OVER_CURRENT = `color-mix(in srgb, ${colors.onSecondaryContainer} calc(${stateLayerOpacity.pressed} * 100%), ${colors.secondaryContainer})`;\n\n// What every destination draws whatever its form.\nconst navigationItemStyles = {\n icon: {\n kGNEyG: \"x6s0dn4\",\n k1xSpc: \"x78zum5\",\n kGuDYH: \"x1pvqxga\",\n kjj79g: \"xl56j7k\",\n $$css: true\n },\n itemDisabled: {\n kMwMTN: \"x1gpw424\",\n kkrTdU: \"xt0e3qv\",\n $$css: true\n },\n label: {\n kMwMTN: \"x1w5n3ug\",\n kVQacm: \"xb3r6kr\",\n kg5iWk: \"xlyipyv\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n link: {\n kGNEyG: \"x6s0dn4\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x78zum5\",\n k3XXqK: \"x1t137rt\",\n kVAEAm: \"x1n2onr6\",\n kMnn75: \"xkrqix3\",\n $$css: true\n },\n pill: {\n kWkggS: \"xjbqb8w\",\n kaIpWk: \"x1dkaolv\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n $$css: true\n }\n};\n\n// The navigation bar's destination: vertical below the medium breakpoint and\n// horizontal at it and above, so every value that differs is a pair.\nconst barItemStyles = {\n indicator: {\n kGNEyG: \"x6s0dn4\",\n kZKoxP: \"x10w6t97 x10qpgbh\",\n kaIpWk: \"x1dkaolv\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kmuXW: \"x2lah0s\",\n kzqmXN: \"x15yg21f x11lewyt\",\n kjj79g: \"xl56j7k\",\n $$css: true\n },\n indicatorCurrent: {\n kWkggS: \"x15dekr4 x8jqrm0\",\n kVAM5u: \"x1n2ykn\",\n ksu8eU: \"xx61lck xnqlxux\",\n kMzoRj: \"x2h6xq1\",\n kMwMTN: \"x1sawysd\",\n $$css: true\n },\n indicatorFocused: {\n kWkggS: \"x1syr9su x8jqrm0\",\n $$css: true\n },\n indicatorFocusedCurrent: {\n kWkggS: \"x1s5x49g x8jqrm0\",\n $$css: true\n },\n indicatorHovered: {\n kWkggS: \"x173luhf x8jqrm0\",\n $$css: true\n },\n indicatorHoveredCurrent: {\n kWkggS: \"x1fctxn6 x8jqrm0\",\n $$css: true\n },\n indicatorPressed: {\n kWkggS: \"x1rydsgj x8jqrm0\",\n $$css: true\n },\n indicatorPressedCurrent: {\n kWkggS: \"xzpauq9 x8jqrm0\",\n $$css: true\n },\n indicatorRing: {\n kjBf7l: \"xrgy624\",\n kInvED: \"x1hl8ikr\",\n k3XXqK: \"xaatb59 x1t601oj\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n item: {\n kZKoxP: \"x5yr21d xiioxts\",\n kaIpWk: \"x1dkaolv\",\n kCS8Yb: \"x1r8uery x1a6ly76\",\n kXwgrk: \"xdt5ytf xapwh9g\",\n kzQI83: \"x1iyjqo2 x10cb59y\",\n kOIVth: \"xzoy561\",\n kjj79g: \"xl56j7k\",\n k7Eaqz: \"xeuugli\",\n k8WAf4: \"x1t0vds8 x1nouyz5\",\n kg3NbH: \"xnjsko4 xze1m75\",\n $$css: true\n },\n itemCurrent: {\n kWkggS: \"xjbqb8w x1xec0pq\",\n kVAM5u: \"x1n2ykn\",\n ksu8eU: \"x1xldtvv x1wx4lrg\",\n kMzoRj: \"x2h6xq1\",\n $$css: true\n },\n itemFocused: {\n kWkggS: \"xjbqb8w xdodzsd\",\n $$css: true\n },\n itemFocusedCurrent: {\n kWkggS: \"xjbqb8w xnmt8re\",\n $$css: true\n },\n itemHovered: {\n kWkggS: \"xjbqb8w xdenq60\",\n $$css: true\n },\n itemHoveredCurrent: {\n kWkggS: \"xjbqb8w xjq3nej\",\n $$css: true\n },\n itemPressed: {\n kWkggS: \"xjbqb8w x7fq6vu\",\n $$css: true\n },\n itemPressedCurrent: {\n kWkggS: \"xjbqb8w x9wewpu\",\n $$css: true\n },\n itemRing: {\n kjBf7l: \"xrgy624\",\n kInvED: \"x1hl8ikr\",\n k3XXqK: \"x1t137rt xxgb522\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n label: {\n kMv6JI: \"xp6n8n2\",\n kGuDYH: \"xkucv67\",\n k63SB2: \"x14hhc5u\",\n kb6lSQ: \"x12utw95\",\n kLWn49: \"xvzb9hk\",\n ks0D6T: \"x193iq5w\",\n $$css: true\n },\n labelCurrent: {\n kMwMTN: \"xzakmg9 x16ybrrz\",\n $$css: true\n }\n};\n\n// The collapsed rail's destination: always vertical, the pitch from one to\n// the next the rail's 4dp gap.\nconst collapsedItemStyles = {\n indicator: {\n kGNEyG: \"x6s0dn4\",\n kZKoxP: \"x10w6t97\",\n kaIpWk: \"x1dkaolv\",\n kB7OPa: \"x9f619\",\n k1xSpc: \"x78zum5\",\n kmuXW: \"x2lah0s\",\n kzqmXN: \"x15yg21f\",\n kjj79g: \"xl56j7k\",\n $$css: true\n },\n indicatorCurrent: {\n kWkggS: \"x15dekr4\",\n kVAM5u: \"x1n2ykn\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"x2h6xq1\",\n kMwMTN: \"x1sawysd\",\n $$css: true\n },\n indicatorFocused: {\n kWkggS: \"x1syr9su\",\n $$css: true\n },\n indicatorFocusedCurrent: {\n kWkggS: \"x1s5x49g\",\n $$css: true\n },\n indicatorHovered: {\n kWkggS: \"x173luhf\",\n $$css: true\n },\n indicatorHoveredCurrent: {\n kWkggS: \"x1fctxn6\",\n $$css: true\n },\n indicatorPressed: {\n kWkggS: \"x1rydsgj\",\n $$css: true\n },\n indicatorPressedCurrent: {\n kWkggS: \"xzpauq9\",\n $$css: true\n },\n item: {\n kXwgrk: \"xdt5ytf\",\n kOIVth: \"xzoy561\",\n kzqmXN: \"xh8yej3\",\n kjj79g: \"xl56j7k\",\n k8WAf4: \"x1t0vds8\",\n kg3NbH: \"ximhkdq\",\n $$css: true\n },\n itemCurrent: {\n $$css: true\n },\n itemFocused: {\n $$css: true\n },\n itemFocusedCurrent: {\n $$css: true\n },\n itemHovered: {\n $$css: true\n },\n itemHoveredCurrent: {\n $$css: true\n },\n itemPressed: {\n $$css: true\n },\n itemPressedCurrent: {\n $$css: true\n },\n label: {\n kMv6JI: \"xp6n8n2\",\n kGuDYH: \"xkucv67\",\n k63SB2: \"x14hhc5u\",\n kb6lSQ: \"x12utw95\",\n kLWn49: \"xvzb9hk\",\n ks0D6T: \"x193iq5w\",\n $$css: true\n },\n labelCurrent: {\n kMwMTN: \"xzakmg9\",\n $$css: true\n }\n};\n\n// The expanded rail's destination: always horizontal, a 56dp pill as wide as\n// what it holds.\nconst expandedItemStyles = {\n indicator: {\n kGNEyG: \"x6s0dn4\",\n k1xSpc: \"x78zum5\",\n kmuXW: \"x2lah0s\",\n $$css: true\n },\n indicatorCurrent: {\n kMwMTN: \"x1sawysd\",\n $$css: true\n },\n indicatorFocused: {\n $$css: true\n },\n indicatorFocusedCurrent: {\n $$css: true\n },\n indicatorHovered: {\n $$css: true\n },\n indicatorHoveredCurrent: {\n $$css: true\n },\n indicatorPressed: {\n $$css: true\n },\n indicatorPressedCurrent: {\n $$css: true\n },\n item: {\n kSGwAc: \"xqcrz7y\",\n kZKoxP: \"xnnlda6\",\n kaIpWk: \"x1dkaolv\",\n kXwgrk: \"x1q0g3np\",\n kOIVth: \"x126z3so\",\n ks0D6T: \"x193iq5w\",\n kg3NbH: \"x790zyz\",\n $$css: true\n },\n itemCurrent: {\n kWkggS: \"x15dekr4\",\n kVAM5u: \"x1n2ykn\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"x2h6xq1\",\n $$css: true\n },\n itemFocused: {\n kWkggS: \"x1syr9su\",\n $$css: true\n },\n itemFocusedCurrent: {\n kWkggS: \"x1s5x49g\",\n $$css: true\n },\n itemHovered: {\n kWkggS: \"x173luhf\",\n $$css: true\n },\n itemHoveredCurrent: {\n kWkggS: \"x1fctxn6\",\n $$css: true\n },\n itemPressed: {\n kWkggS: \"x1rydsgj\",\n $$css: true\n },\n itemPressedCurrent: {\n kWkggS: \"xzpauq9\",\n $$css: true\n },\n label: {\n kMv6JI: \"xkknnkr\",\n kGuDYH: \"x14zspaw\",\n k63SB2: \"x1v9cpvo\",\n kb6lSQ: \"x155f00i\",\n kLWn49: \"x1lz68p4\",\n $$css: true\n },\n labelCurrent: {\n kMwMTN: \"x1sawysd\",\n $$css: true\n }\n};\nexport { barItemStyles, collapsedItemStyles, expandedItemStyles, navigationItemStyles };"],"mappings":";;AA0C6B,GAAsBC,OAAOQ,uBAA6BJ,kBAAkBK;AAC5E,GAAsBT,OAAOQ,uBAA6BJ,kBAAkBO;AAC5E,GAAsBX,OAAOQ,uBAA6BJ,kBAAkBS;AAC5E,GAAsBb,OAAOQ,uBAA6BJ,kBAAkBK,QAAkBT,OAAOe;AACrG,GAAsBf,OAAOQ,uBAA6BJ,kBAAkBO,QAAkBX,OAAOe;AACrG,GAAsBf,OAAOQ,uBAA6BJ,kBAAkBS,UAAoBb,OAAOe;AAGpI,MAAMG,uBAAuB;CAC3BC,MAAM;EACJC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,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L+C,QAAQ;EACRrD,QAAQ;EACRsD,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRtD,OAAO;CACT;CACAwD,cAAc;EACZtD,QAAQ;EACRF,OAAO;CACT;AACF"}
|
package/dist/react-aria.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { useDragAndDrop as useDragAndDrop$1 } from "./drag/hooks.js";
|
|
2
|
-
import { Collection, DIRECTORY_DRAG_TYPE, Focusable, GridLayout, I18nProvider, Key, ListLayout, PressEvent, Pressable, RouterProvider, Selection, SharedElement, SharedElementTransition, SortDescriptor, TableLayout, TokenFieldValue as TokenFieldValue$1, Virtualizer, VisuallyHidden as VisuallyHidden$1, WaterfallLayout, getColorChannels, isDirectoryDropItem, isFileDropItem, isTextDropItem, parseColor, useAsyncList, useDrag, useDrop, useFilter as useFilter$1, useListData, useLocale, useTreeData } from "react-aria-components";
|
|
3
|
-
export { Collection, DIRECTORY_DRAG_TYPE, Focusable, GridLayout, I18nProvider, type Key, ListLayout, type PressEvent, Pressable, RouterProvider, type Selection, SharedElement, SharedElementTransition, type SortDescriptor, TableLayout, TokenFieldValue$1 as TokenFieldValue, Virtualizer, VisuallyHidden$1 as VisuallyHidden, WaterfallLayout, getColorChannels, isDirectoryDropItem, isFileDropItem, isTextDropItem, parseColor, useAsyncList, useDrag, useDragAndDrop$1 as useDragAndDrop, useDrop, useFilter$1 as useFilter, useListData, useLocale, useTreeData };
|
|
2
|
+
import { Collection, DIRECTORY_DRAG_TYPE, Focusable, GridLayout, I18nProvider, Key as Key$1, ListLayout, PressEvent, Pressable, RouterProvider, Selection, SharedElement, SharedElementTransition, SortDescriptor, TableLayout, TokenFieldValue as TokenFieldValue$1, Virtualizer, VisuallyHidden as VisuallyHidden$1, WaterfallLayout, getColorChannels, isDirectoryDropItem, isFileDropItem, isTextDropItem, parseColor as parseColor$1, useAsyncList, useDrag, useDrop, useFilter as useFilter$1, useListData, useLocale as useLocale$1, useTreeData } from "react-aria-components";
|
|
3
|
+
export { Collection, DIRECTORY_DRAG_TYPE, Focusable, GridLayout, I18nProvider, type Key$1 as Key, ListLayout, type PressEvent, Pressable, RouterProvider, type Selection, SharedElement, SharedElementTransition, type SortDescriptor, TableLayout, TokenFieldValue$1 as TokenFieldValue, Virtualizer, VisuallyHidden$1 as VisuallyHidden, WaterfallLayout, getColorChannels, isDirectoryDropItem, isFileDropItem, isTextDropItem, parseColor$1 as parseColor, useAsyncList, useDrag, useDragAndDrop$1 as useDragAndDrop, useDrop, useFilter$1 as useFilter, useListData, useLocale$1 as useLocale, useTreeData };
|
package/dist/react-aria.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useDragAndDrop as useDragAndDrop$1 } from "./drag/hooks.js";
|
|
3
|
-
import { Collection, DIRECTORY_DRAG_TYPE, Focusable, GridLayout, I18nProvider, ListLayout, Pressable, RouterProvider, SharedElement, SharedElementTransition, TableLayout, TokenFieldValue as TokenFieldValue$1, Virtualizer, VisuallyHidden as VisuallyHidden$1, WaterfallLayout, getColorChannels, isDirectoryDropItem, isFileDropItem, isTextDropItem, parseColor, useAsyncList, useDrag, useDrop, useFilter as useFilter$1, useListData, useLocale, useTreeData } from "react-aria-components";
|
|
4
|
-
export { Collection, DIRECTORY_DRAG_TYPE, Focusable, GridLayout, I18nProvider, ListLayout, Pressable, RouterProvider, SharedElement, SharedElementTransition, TableLayout, TokenFieldValue$1 as TokenFieldValue, Virtualizer, VisuallyHidden$1 as VisuallyHidden, WaterfallLayout, getColorChannels, isDirectoryDropItem, isFileDropItem, isTextDropItem, parseColor, useAsyncList, useDrag, useDragAndDrop$1 as useDragAndDrop, useDrop, useFilter$1 as useFilter, useListData, useLocale, useTreeData };
|
|
3
|
+
import { Collection, DIRECTORY_DRAG_TYPE, Focusable, GridLayout, I18nProvider, ListLayout, Pressable, RouterProvider, SharedElement, SharedElementTransition, TableLayout, TokenFieldValue as TokenFieldValue$1, Virtualizer, VisuallyHidden as VisuallyHidden$1, WaterfallLayout, getColorChannels, isDirectoryDropItem, isFileDropItem, isTextDropItem, parseColor as parseColor$1, useAsyncList, useDrag, useDrop, useFilter as useFilter$1, useListData, useLocale as useLocale$1, useTreeData } from "react-aria-components";
|
|
4
|
+
export { Collection, DIRECTORY_DRAG_TYPE, Focusable, GridLayout, I18nProvider, ListLayout, Pressable, RouterProvider, SharedElement, SharedElementTransition, TableLayout, TokenFieldValue$1 as TokenFieldValue, Virtualizer, VisuallyHidden$1 as VisuallyHidden, WaterfallLayout, getColorChannels, isDirectoryDropItem, isFileDropItem, isTextDropItem, parseColor$1 as parseColor, useAsyncList, useDrag, useDragAndDrop$1 as useDragAndDrop, useDrop, useFilter$1 as useFilter, useListData, useLocale$1 as useLocale, useTreeData };
|
package/dist/render/useRender.js
CHANGED
|
@@ -2,7 +2,6 @@ import { c } from "react/compiler-runtime";
|
|
|
2
2
|
import { cloneElement, createElement, isValidElement } from "react";
|
|
3
3
|
//#region src/render/useRender.tsx
|
|
4
4
|
function attach(ref, node) {
|
|
5
|
-
if (ref === null) return () => {};
|
|
6
5
|
if (typeof ref === "function") {
|
|
7
6
|
const cleanup = ref(node);
|
|
8
7
|
return typeof cleanup === "function" ? cleanup : () => {
|