@serendie/ui 3.5.1 → 3.6.0-dev.202606260532

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/client.js +128 -124
  2. package/dist/components/BottomNavigation/BottomNavigation.d.ts +1 -1
  3. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +84 -0
  4. package/dist/components/Breadcrumbs/Breadcrumbs.js +268 -0
  5. package/dist/components/Breadcrumbs/index.d.ts +2 -0
  6. package/dist/components/Breadcrumbs/index.js +6 -0
  7. package/dist/components/DataTable/DataTable.sampleData.d.ts +12 -0
  8. package/dist/components/DataTable/DataTable.sampleData.test.d.ts +1 -0
  9. package/dist/components/DataTable/DataTableComponent.d.ts +1 -1
  10. package/dist/components/DataTable/table/BodyCheckbox.d.ts +1 -1
  11. package/dist/components/Divider/Divider.d.ts +1 -1
  12. package/dist/components/List/List.d.ts +1 -1
  13. package/dist/components/List/ListItem.d.ts +42 -12
  14. package/dist/components/List/ListItem.js +122 -75
  15. package/dist/components/ProgressIndicator/AnimatedArc.d.ts +1 -0
  16. package/dist/components/ProgressIndicator/AnimatedArc.js +31 -34
  17. package/dist/components/ProgressIndicator/AnimatedArc.test.d.ts +1 -0
  18. package/dist/components/ProgressIndicator/ProgressIndicator.d.ts +1 -1
  19. package/dist/components/ProgressIndicator/ProgressIndicatorIndeterminate.d.ts +2 -1
  20. package/dist/components/ProgressIndicator/ProgressIndicatorIndeterminate.js +49 -36
  21. package/dist/components/ProgressIndicator/animatedArcProps.d.ts +11 -0
  22. package/dist/components/ProgressIndicator/animatedArcProps.js +19 -0
  23. package/dist/components/Tabs/TabItem.d.ts +1 -1
  24. package/dist/components/Tabs/Tabs.d.ts +1 -1
  25. package/dist/i18n/dictionary.d.ts +4 -0
  26. package/dist/i18n/dictionary.js +8 -4
  27. package/dist/i18n/provider.d.ts +1 -1
  28. package/dist/index.d.ts +1 -0
  29. package/dist/index.js +128 -124
  30. package/dist/node_modules/@zag-js/accordion/dist/accordion.connect.js +49 -50
  31. package/dist/node_modules/@zag-js/combobox/dist/combobox.connect.js +70 -68
  32. package/dist/node_modules/@zag-js/combobox/dist/combobox.machine.js +1 -1
  33. package/dist/node_modules/@zag-js/date-picker/dist/date-picker.connect.js +322 -308
  34. package/dist/node_modules/@zag-js/date-picker/dist/date-picker.machine.js +93 -79
  35. package/dist/node_modules/@zag-js/date-picker/dist/date-picker.utils.js +35 -43
  36. package/dist/node_modules/@zag-js/date-utils/dist/locale.js +12 -0
  37. package/dist/node_modules/@zag-js/dialog/dist/dialog.dom.js +36 -35
  38. package/dist/node_modules/@zag-js/dialog/dist/dialog.machine.js +27 -37
  39. package/dist/node_modules/@zag-js/dismissable/dist/dismissable-layer.js +56 -41
  40. package/dist/node_modules/@zag-js/dismissable/dist/layer-stack.js +51 -31
  41. package/dist/node_modules/@zag-js/dismissable/dist/pointer-event-outside.js +46 -25
  42. package/dist/node_modules/@zag-js/dom-query/dist/controller.js +5 -5
  43. package/dist/node_modules/@zag-js/dom-query/dist/overflow.js +13 -21
  44. package/dist/node_modules/@zag-js/dom-query/dist/scroll.js +11 -0
  45. package/dist/node_modules/@zag-js/live-region/dist/index.js +29 -19
  46. package/dist/node_modules/@zag-js/menu/dist/menu.connect.js +138 -135
  47. package/dist/node_modules/@zag-js/menu/dist/menu.dom.js +24 -24
  48. package/dist/node_modules/@zag-js/menu/dist/menu.machine.js +1 -1
  49. package/dist/node_modules/@zag-js/popper/dist/get-placement.js +82 -71
  50. package/dist/node_modules/@zag-js/react/dist/machine.js +105 -96
  51. package/dist/node_modules/@zag-js/remove-scroll/dist/index.js +34 -26
  52. package/dist/node_modules/@zag-js/select/dist/select.connect.js +104 -101
  53. package/dist/node_modules/@zag-js/select/dist/select.machine.js +1 -1
  54. package/dist/node_modules/@zag-js/tabs/dist/tabs.machine.js +63 -60
  55. package/dist/node_modules/@zag-js/tooltip/dist/tooltip.connect.js +27 -25
  56. package/dist/node_modules/@zag-js/tooltip/dist/tooltip.dom.js +15 -14
  57. package/dist/styles.css +1 -1
  58. package/dist/theme/initColorScheme.d.ts +1 -1
  59. package/package.json +8 -8
@@ -14,6 +14,8 @@ export declare const dictionary: {
14
14
  readonly "pagination.nextPage": "次のページへ";
15
15
  readonly "pagination.goToPage": "ページ{{page}}へ移動";
16
16
  readonly "modalDialog.close": "閉じる";
17
+ readonly "breadcrumbs.label": "パンくずリスト";
18
+ readonly "breadcrumbs.showMore": "折りたたまれた項目を表示";
17
19
  };
18
20
  readonly en: {
19
21
  readonly "common.required": "Required";
@@ -30,5 +32,7 @@ export declare const dictionary: {
30
32
  readonly "pagination.nextPage": "Go to next page";
31
33
  readonly "pagination.goToPage": "Go to page {{page}}";
32
34
  readonly "modalDialog.close": "Close";
35
+ readonly "breadcrumbs.label": "Breadcrumb";
36
+ readonly "breadcrumbs.showMore": "Show more breadcrumbs";
33
37
  };
34
38
  };
@@ -1,4 +1,4 @@
1
- const a = {
1
+ const e = {
2
2
  ja: {
3
3
  "common.required": "必須",
4
4
  "textField.clearValue": "値をクリア",
@@ -13,7 +13,9 @@ const a = {
13
13
  "pagination.lastPage": "最後のページです",
14
14
  "pagination.nextPage": "次のページへ",
15
15
  "pagination.goToPage": "ページ{{page}}へ移動",
16
- "modalDialog.close": "閉じる"
16
+ "modalDialog.close": "閉じる",
17
+ "breadcrumbs.label": "パンくずリスト",
18
+ "breadcrumbs.showMore": "折りたたまれた項目を表示"
17
19
  },
18
20
  en: {
19
21
  "common.required": "Required",
@@ -29,9 +31,11 @@ const a = {
29
31
  "pagination.lastPage": "This is the last page",
30
32
  "pagination.nextPage": "Go to next page",
31
33
  "pagination.goToPage": "Go to page {{page}}",
32
- "modalDialog.close": "Close"
34
+ "modalDialog.close": "Close",
35
+ "breadcrumbs.label": "Breadcrumb",
36
+ "breadcrumbs.showMore": "Show more breadcrumbs"
33
37
  }
34
38
  };
35
39
  export {
36
- a as dictionary
40
+ e as dictionary
37
41
  };
@@ -32,7 +32,7 @@ export interface SerendieProviderProps {
32
32
  * </SerendieProvider>
33
33
  * ```
34
34
  */
35
- export declare function SerendieProvider({ lang, colorTheme, colorMode, children, }: SerendieProviderProps): import("react/jsx-runtime").JSX.Element;
35
+ export declare function SerendieProvider({ lang, colorTheme, colorMode, children, }: SerendieProviderProps): import("react").JSX.Element;
36
36
  /**
37
37
  * @deprecated LanguageProvider は SerendieProvider にリネームされました
38
38
  */
package/dist/index.d.ts CHANGED
@@ -5,6 +5,7 @@ export * from './components/Accordion/index.ts';
5
5
  export * from './components/Avatar/index.ts';
6
6
  export * from './components/Badge/index.ts';
7
7
  export * from './components/Banner/index.ts';
8
+ export * from './components/Breadcrumbs/index.ts';
8
9
  export * from './components/BottomNavigation/index.ts';
9
10
  export * from './components/Button/index.ts';
10
11
  export * from './components/Chart/index.ts';
package/dist/index.js CHANGED
@@ -1,142 +1,146 @@
1
1
  import { SerendiePreset as r } from "./preset.js";
2
2
  import { ThemeContext as a, resolveTheme as m, useThemeContext as p } from "./theme/ThemeContext.js";
3
3
  import { useSystemColorScheme as i } from "./theme/useSystemColorScheme.js";
4
- import { ColorSchemeScript as s, getColorSchemeScript as f } from "./theme/initColorScheme.js";
4
+ import { ColorSchemeScript as n, getColorSchemeScript as f } from "./theme/initColorScheme.js";
5
5
  import { formatDateByLang as l, getTranslations as d, useTranslations as S } from "./i18n/index.js";
6
6
  import { Accordion as C } from "./components/Accordion/Accordion.js";
7
- import { AccordionGroup as y } from "./components/Accordion/AccordionGroup.js";
8
- import { Avatar as u, AvatarStyle as T } from "./components/Avatar/Avatar.js";
9
- import { Badge as P, BadgeCloseButton as D, BadgeStyle as b } from "./components/Badge/Badge.js";
7
+ import { AccordionGroup as u } from "./components/Accordion/AccordionGroup.js";
8
+ import { Avatar as y, AvatarStyle as I } from "./components/Avatar/Avatar.js";
9
+ import { Badge as b, BadgeCloseButton as P, BadgeStyle as D } from "./components/Badge/Badge.js";
10
10
  import { Banner as v } from "./components/Banner/Banner.js";
11
- import { BottomNavigation as w } from "./components/BottomNavigation/BottomNavigation.js";
12
- import { BottomNavigationItem as L, BottomNavigationItemStyle as N } from "./components/BottomNavigation/BottomNavigationItem.js";
13
- import { Button as F, ButtonStyle as G } from "./components/Button/Button.js";
14
- import { SerendieChartTheme as W } from "./components/Chart/SerendieChartTheme.js";
15
- import { compactChartMargin as q, defaultChartMargin as z, getChartColor as E, getChartColors as H, legendChartMargin as J, spaciousChartMargin as K, useBarChartProps as O, useChartProps as Q, useLineChartProps as V, usePieChartProps as X } from "./components/Chart/SerendieChartProps.js";
16
- import { CheckBox as Z, CheckBoxStyle as _, checkboxCheckedIconCss as $, checkboxIconCss as oo, checkboxUncheckedIconCss as eo } from "./components/CheckBox/CheckBox.js";
17
- import { ChoiceBox as to, ChoiceBoxStyle as ao } from "./components/ChoiceBox/ChoiceBox.js";
18
- import { DashboardWidget as po } from "./components/DashboardWidget/DashboardWidget.js";
19
- import { DataTable as io } from "./components/DataTable/index.js";
20
- import { DatePicker as so } from "./components/DatePicker/DatePicker.js";
21
- import { Divider as co, DividerStyle as lo } from "./components/Divider/Divider.js";
22
- import { Drawer as ho } from "./components/Drawer/Drawer.js";
23
- import { DropdownMenu as go, DropdownMenuStyle as yo } from "./components/DropdownMenu/DropdownMenu.js";
24
- import { IconButton as uo, IconButtonStyle as To } from "./components/IconButton/IconButton.js";
25
- import { List as Po } from "./components/List/List.js";
26
- import { ListItem as bo, ListItemStyle as ko } from "./components/List/ListItem.js";
27
- import { ModalDialog as Mo } from "./components/ModalDialog/ModalDialog.js";
28
- import { NotificationBadge as Ao } from "./components/NotificationBadge/NotificationBadge.js";
29
- import { Pagination as No, PaginationStyle as Ro } from "./components/Pagination/Pagination.js";
30
- import { PasswordField as Go } from "./components/PasswordField/PasswordField.js";
31
- import { ProgressIndicator as Wo } from "./components/ProgressIndicator/ProgressIndicator.js";
32
- import { ProgressIndicatorIndeterminate as qo } from "./components/ProgressIndicator/ProgressIndicatorIndeterminate.js";
33
- import { RadioButton as Eo, RadioButtonStyle as Ho, radioCheckedIconCss as Jo, radioIconCss as Ko, radioUncheckedIconCss as Oo } from "./components/RadioButton/RadioButton.js";
34
- import { RadioGroup as Vo } from "./components/RadioButton/RadioGroup.js";
35
- import { Search as Yo, SearchStyle as Zo } from "./components/Search/Search.js";
36
- import { Select as $o, SelectStyle as oe } from "./components/Select/Select.js";
37
- import { Slider as re, SliderStyle as te } from "./components/Slider/Slider.js";
38
- import { Steps as me, stepsStyles as pe } from "./components/Steps/Steps.js";
39
- import { Switch as ie, SwitchStyle as ne } from "./components/Switch/Switch.js";
40
- import { Tabs as fe, TabsStyle as ce } from "./components/Tabs/Tabs.js";
41
- import { TabItem as de, TabItemStyle as Se } from "./components/Tabs/TabItem.js";
42
- import { TextArea as Ce } from "./components/TextArea/TextArea.js";
43
- import { TextField as ye } from "./components/TextField/TextField.js";
44
- import { Toast as ue, ToastStyle as Te, toaster as Ie } from "./components/Toast/Toast.js";
45
- import { Tooltip as De } from "./components/Tooltip/Tooltip.js";
46
- import { TopAppBar as ke } from "./components/TopAppBar/TopAppBar.js";
47
- import { DataTableComponent as Me } from "./components/DataTable/DataTableComponent.js";
48
- import { LanguageProvider as Ae, SerendieProvider as Le } from "./i18n/provider.js";
49
- import { parse as Re } from "./node_modules/@zag-js/date-picker/dist/date-picker.parse.js";
11
+ import { BreadcrumbItem as w, Breadcrumbs as A, breadcrumbsStyle as L } from "./components/Breadcrumbs/Breadcrumbs.js";
12
+ import { BottomNavigation as R } from "./components/BottomNavigation/BottomNavigation.js";
13
+ import { BottomNavigationItem as G, BottomNavigationItemStyle as U } from "./components/BottomNavigation/BottomNavigationItem.js";
14
+ import { Button as j, ButtonStyle as q } from "./components/Button/Button.js";
15
+ import { SerendieChartTheme as E } from "./components/Chart/SerendieChartTheme.js";
16
+ import { compactChartMargin as J, defaultChartMargin as K, getChartColor as O, getChartColors as Q, legendChartMargin as V, spaciousChartMargin as X, useBarChartProps as Y, useChartProps as Z, useLineChartProps as _, usePieChartProps as $ } from "./components/Chart/SerendieChartProps.js";
17
+ import { CheckBox as eo, CheckBoxStyle as ro, checkboxCheckedIconCss as to, checkboxIconCss as ao, checkboxUncheckedIconCss as mo } from "./components/CheckBox/CheckBox.js";
18
+ import { ChoiceBox as xo, ChoiceBoxStyle as io } from "./components/ChoiceBox/ChoiceBox.js";
19
+ import { DashboardWidget as no } from "./components/DashboardWidget/DashboardWidget.js";
20
+ import { DataTable as co } from "./components/DataTable/index.js";
21
+ import { DatePicker as So } from "./components/DatePicker/DatePicker.js";
22
+ import { Divider as Co, DividerStyle as go } from "./components/Divider/Divider.js";
23
+ import { Drawer as Bo } from "./components/Drawer/Drawer.js";
24
+ import { DropdownMenu as Io, DropdownMenuStyle as To } from "./components/DropdownMenu/DropdownMenu.js";
25
+ import { IconButton as Po, IconButtonStyle as Do } from "./components/IconButton/IconButton.js";
26
+ import { List as vo } from "./components/List/List.js";
27
+ import { ListItem as wo, ListItemStyle as Ao } from "./components/List/ListItem.js";
28
+ import { ModalDialog as No } from "./components/ModalDialog/ModalDialog.js";
29
+ import { NotificationBadge as Fo } from "./components/NotificationBadge/NotificationBadge.js";
30
+ import { Pagination as Uo, PaginationStyle as Wo } from "./components/Pagination/Pagination.js";
31
+ import { PasswordField as qo } from "./components/PasswordField/PasswordField.js";
32
+ import { ProgressIndicator as Eo } from "./components/ProgressIndicator/ProgressIndicator.js";
33
+ import { ProgressIndicatorIndeterminate as Jo } from "./components/ProgressIndicator/ProgressIndicatorIndeterminate.js";
34
+ import { RadioButton as Oo, RadioButtonStyle as Qo, radioCheckedIconCss as Vo, radioIconCss as Xo, radioUncheckedIconCss as Yo } from "./components/RadioButton/RadioButton.js";
35
+ import { RadioGroup as _o } from "./components/RadioButton/RadioGroup.js";
36
+ import { Search as oe, SearchStyle as ee } from "./components/Search/Search.js";
37
+ import { Select as te, SelectStyle as ae } from "./components/Select/Select.js";
38
+ import { Slider as pe, SliderStyle as xe } from "./components/Slider/Slider.js";
39
+ import { Steps as se, stepsStyles as ne } from "./components/Steps/Steps.js";
40
+ import { Switch as ce, SwitchStyle as le } from "./components/Switch/Switch.js";
41
+ import { Tabs as Se, TabsStyle as he } from "./components/Tabs/Tabs.js";
42
+ import { TabItem as ge, TabItemStyle as ue } from "./components/Tabs/TabItem.js";
43
+ import { TextArea as ye } from "./components/TextArea/TextArea.js";
44
+ import { TextField as Te } from "./components/TextField/TextField.js";
45
+ import { Toast as Pe, ToastStyle as De, toaster as ke } from "./components/Toast/Toast.js";
46
+ import { Tooltip as Me } from "./components/Tooltip/Tooltip.js";
47
+ import { TopAppBar as Ae } from "./components/TopAppBar/TopAppBar.js";
48
+ import { DataTableComponent as Ne } from "./components/DataTable/DataTableComponent.js";
49
+ import { LanguageProvider as Fe, SerendieProvider as Ge } from "./i18n/provider.js";
50
+ import { parse as We } from "./node_modules/@zag-js/date-picker/dist/date-picker.parse.js";
50
51
  export {
51
52
  C as Accordion,
52
- y as AccordionGroup,
53
- u as Avatar,
54
- T as AvatarStyle,
55
- P as Badge,
56
- D as BadgeCloseButton,
57
- b as BadgeStyle,
53
+ u as AccordionGroup,
54
+ y as Avatar,
55
+ I as AvatarStyle,
56
+ b as Badge,
57
+ P as BadgeCloseButton,
58
+ D as BadgeStyle,
58
59
  v as Banner,
59
- w as BottomNavigation,
60
- L as BottomNavigationItem,
61
- N as BottomNavigationItemStyle,
62
- F as Button,
63
- G as ButtonStyle,
64
- Z as CheckBox,
65
- _ as CheckBoxStyle,
66
- to as ChoiceBox,
67
- ao as ChoiceBoxStyle,
68
- s as ColorSchemeScript,
69
- po as DashboardWidget,
70
- io as DataTable,
71
- Me as DataTableComponent,
72
- so as DatePicker,
73
- co as Divider,
74
- lo as DividerStyle,
75
- ho as Drawer,
76
- go as DropdownMenu,
77
- yo as DropdownMenuStyle,
78
- uo as IconButton,
79
- To as IconButtonStyle,
80
- Ae as LanguageProvider,
81
- Po as List,
82
- bo as ListItem,
83
- ko as ListItemStyle,
84
- Mo as ModalDialog,
85
- Ao as NotificationBadge,
86
- No as Pagination,
87
- Ro as PaginationStyle,
88
- Go as PasswordField,
89
- Wo as ProgressIndicator,
90
- qo as ProgressIndicatorIndeterminate,
91
- Eo as RadioButton,
92
- Ho as RadioButtonStyle,
93
- Vo as RadioGroup,
94
- Yo as Search,
95
- Zo as SearchStyle,
96
- $o as Select,
97
- oe as SelectStyle,
98
- W as SerendieChartTheme,
60
+ R as BottomNavigation,
61
+ G as BottomNavigationItem,
62
+ U as BottomNavigationItemStyle,
63
+ w as BreadcrumbItem,
64
+ A as Breadcrumbs,
65
+ j as Button,
66
+ q as ButtonStyle,
67
+ eo as CheckBox,
68
+ ro as CheckBoxStyle,
69
+ xo as ChoiceBox,
70
+ io as ChoiceBoxStyle,
71
+ n as ColorSchemeScript,
72
+ no as DashboardWidget,
73
+ co as DataTable,
74
+ Ne as DataTableComponent,
75
+ So as DatePicker,
76
+ Co as Divider,
77
+ go as DividerStyle,
78
+ Bo as Drawer,
79
+ Io as DropdownMenu,
80
+ To as DropdownMenuStyle,
81
+ Po as IconButton,
82
+ Do as IconButtonStyle,
83
+ Fe as LanguageProvider,
84
+ vo as List,
85
+ wo as ListItem,
86
+ Ao as ListItemStyle,
87
+ No as ModalDialog,
88
+ Fo as NotificationBadge,
89
+ Uo as Pagination,
90
+ Wo as PaginationStyle,
91
+ qo as PasswordField,
92
+ Eo as ProgressIndicator,
93
+ Jo as ProgressIndicatorIndeterminate,
94
+ Oo as RadioButton,
95
+ Qo as RadioButtonStyle,
96
+ _o as RadioGroup,
97
+ oe as Search,
98
+ ee as SearchStyle,
99
+ te as Select,
100
+ ae as SelectStyle,
101
+ E as SerendieChartTheme,
99
102
  r as SerendiePreset,
100
- Le as SerendieProvider,
101
- re as Slider,
102
- te as SliderStyle,
103
- me as Steps,
104
- ie as Switch,
105
- ne as SwitchStyle,
106
- de as TabItem,
107
- Se as TabItemStyle,
108
- fe as Tabs,
109
- ce as TabsStyle,
110
- Ce as TextArea,
111
- ye as TextField,
103
+ Ge as SerendieProvider,
104
+ pe as Slider,
105
+ xe as SliderStyle,
106
+ se as Steps,
107
+ ce as Switch,
108
+ le as SwitchStyle,
109
+ ge as TabItem,
110
+ ue as TabItemStyle,
111
+ Se as Tabs,
112
+ he as TabsStyle,
113
+ ye as TextArea,
114
+ Te as TextField,
112
115
  a as ThemeContext,
113
- ue as Toast,
114
- Te as ToastStyle,
115
- De as Tooltip,
116
- ke as TopAppBar,
117
- $ as checkboxCheckedIconCss,
118
- oo as checkboxIconCss,
119
- eo as checkboxUncheckedIconCss,
120
- q as compactChartMargin,
121
- z as defaultChartMargin,
116
+ Pe as Toast,
117
+ De as ToastStyle,
118
+ Me as Tooltip,
119
+ Ae as TopAppBar,
120
+ L as breadcrumbsStyle,
121
+ to as checkboxCheckedIconCss,
122
+ ao as checkboxIconCss,
123
+ mo as checkboxUncheckedIconCss,
124
+ J as compactChartMargin,
125
+ K as defaultChartMargin,
122
126
  l as formatDateByLang,
123
- E as getChartColor,
124
- H as getChartColors,
127
+ O as getChartColor,
128
+ Q as getChartColors,
125
129
  f as getColorSchemeScript,
126
130
  d as getTranslations,
127
- J as legendChartMargin,
128
- Re as parseDate,
129
- Jo as radioCheckedIconCss,
130
- Ko as radioIconCss,
131
- Oo as radioUncheckedIconCss,
131
+ V as legendChartMargin,
132
+ We as parseDate,
133
+ Vo as radioCheckedIconCss,
134
+ Xo as radioIconCss,
135
+ Yo as radioUncheckedIconCss,
132
136
  m as resolveTheme,
133
- K as spaciousChartMargin,
134
- pe as stepsStyles,
135
- Ie as toaster,
136
- O as useBarChartProps,
137
- Q as useChartProps,
138
- V as useLineChartProps,
139
- X as usePieChartProps,
137
+ X as spaciousChartMargin,
138
+ ne as stepsStyles,
139
+ ke as toaster,
140
+ Y as useBarChartProps,
141
+ Z as useChartProps,
142
+ _ as useLineChartProps,
143
+ $ as usePieChartProps,
140
144
  i as useSystemColorScheme,
141
145
  p as useThemeContext,
142
146
  S as useTranslations
@@ -1,15 +1,15 @@
1
1
  import { getEventKey as G } from "../../dom-query/dist/event.js";
2
2
  import { isSafari as E } from "../../dom-query/dist/platform.js";
3
- import { dataAttr as r } from "../../dom-query/dist/shared.js";
4
- import { parts as u } from "./accordion.anatomy.js";
3
+ import { dataAttr as i } from "../../dom-query/dist/shared.js";
4
+ import { parts as l } from "./accordion.anatomy.js";
5
5
  import { getRootId as I, getItemContentId as f, getItemTriggerId as v, getItemId as S } from "./accordion.dom.js";
6
- function H(T, s) {
7
- const { send: d, context: p, prop: a, scope: i, computed: c } = T, m = p.get("focusedValue"), g = p.get("value"), y = a("multiple");
6
+ function H(T, u) {
7
+ const { send: o, context: p, prop: a, scope: d, computed: c } = T, m = p.get("focusedValue"), g = p.get("value"), y = a("multiple");
8
8
  function O(t) {
9
9
  let e = t;
10
- !y && e.length > 1 && (e = [e[0]]), d({ type: "VALUE.SET", value: e });
10
+ !y && e.length > 1 && (e = [e[0]]), o({ type: "VALUE.SET", value: e });
11
11
  }
12
- function l(t) {
12
+ function s(t) {
13
13
  return {
14
14
  expanded: g.includes(t.value),
15
15
  focused: m === t.value,
@@ -20,99 +20,98 @@ function H(T, s) {
20
20
  focusedValue: m,
21
21
  value: g,
22
22
  setValue: O,
23
- getItemState: l,
23
+ getItemState: s,
24
24
  getRootProps() {
25
- return s.element({
26
- ...u.root.attrs,
25
+ return u.element({
26
+ ...l.root.attrs,
27
27
  dir: a("dir"),
28
- id: I(i),
28
+ id: I(d),
29
29
  "data-orientation": a("orientation")
30
30
  });
31
31
  },
32
32
  getItemProps(t) {
33
- const e = l(t);
34
- return s.element({
35
- ...u.item.attrs,
33
+ const e = s(t);
34
+ return u.element({
35
+ ...l.item.attrs,
36
36
  dir: a("dir"),
37
- id: S(i, t.value),
37
+ id: S(d, t.value),
38
38
  "data-state": e.expanded ? "open" : "closed",
39
- "data-focus": r(e.focused),
40
- "data-disabled": r(e.disabled),
39
+ "data-focus": i(e.focused),
40
+ "data-disabled": i(e.disabled),
41
41
  "data-orientation": a("orientation")
42
42
  });
43
43
  },
44
44
  getItemContentProps(t) {
45
- const e = l(t);
46
- return s.element({
47
- ...u.itemContent.attrs,
45
+ const e = s(t);
46
+ return u.element({
47
+ ...l.itemContent.attrs,
48
48
  dir: a("dir"),
49
49
  role: "region",
50
- id: f(i, t.value),
51
- "aria-labelledby": v(i, t.value),
50
+ id: f(d, t.value),
51
+ "aria-labelledby": v(d, t.value),
52
52
  hidden: !e.expanded,
53
53
  "data-state": e.expanded ? "open" : "closed",
54
- "data-disabled": r(e.disabled),
55
- "data-focus": r(e.focused),
54
+ "data-disabled": i(e.disabled),
55
+ "data-focus": i(e.focused),
56
56
  "data-orientation": a("orientation")
57
57
  });
58
58
  },
59
59
  getItemIndicatorProps(t) {
60
- const e = l(t);
61
- return s.element({
62
- ...u.itemIndicator.attrs,
60
+ const e = s(t);
61
+ return u.element({
62
+ ...l.itemIndicator.attrs,
63
63
  dir: a("dir"),
64
64
  "aria-hidden": !0,
65
65
  "data-state": e.expanded ? "open" : "closed",
66
- "data-disabled": r(e.disabled),
67
- "data-focus": r(e.focused),
66
+ "data-disabled": i(e.disabled),
67
+ "data-focus": i(e.focused),
68
68
  "data-orientation": a("orientation")
69
69
  });
70
70
  },
71
71
  getItemTriggerProps(t) {
72
- const { value: e } = t, o = l(t);
73
- return s.button({
74
- ...u.itemTrigger.attrs,
72
+ const { value: e } = t, r = s(t);
73
+ return u.button({
74
+ ...l.itemTrigger.attrs,
75
75
  type: "button",
76
76
  dir: a("dir"),
77
- id: v(i, e),
78
- "aria-controls": f(i, e),
79
- "data-controls": f(i, e),
80
- "aria-expanded": o.expanded,
81
- disabled: o.disabled,
77
+ id: v(d, e),
78
+ "aria-controls": f(d, e),
79
+ "data-controls": f(d, e),
80
+ "aria-expanded": r.expanded,
81
+ disabled: r.disabled,
82
82
  "data-orientation": a("orientation"),
83
- "aria-disabled": o.disabled,
84
- "data-state": o.expanded ? "open" : "closed",
85
- "data-focus": r(o.focused),
86
- "data-ownedby": I(i),
83
+ "data-state": r.expanded ? "open" : "closed",
84
+ "data-focus": i(r.focused),
85
+ "data-ownedby": I(d),
87
86
  onFocus() {
88
- o.disabled || d({ type: "TRIGGER.FOCUS", value: e });
87
+ r.disabled || o({ type: "TRIGGER.FOCUS", value: e });
89
88
  },
90
89
  onBlur() {
91
- o.disabled || d({ type: "TRIGGER.BLUR" });
90
+ r.disabled || o({ type: "TRIGGER.BLUR" });
92
91
  },
93
92
  onClick(n) {
94
- o.disabled || (E() && n.currentTarget.focus(), d({ type: "TRIGGER.CLICK", value: e }));
93
+ r.disabled || (E() && n.currentTarget.focus(), o({ type: "TRIGGER.CLICK", value: e }));
95
94
  },
96
95
  onKeyDown(n) {
97
- if (n.defaultPrevented || o.disabled) return;
96
+ if (n.defaultPrevented || r.disabled) return;
98
97
  const R = {
99
98
  ArrowDown() {
100
- c("isHorizontal") || d({ type: "GOTO.NEXT", value: e });
99
+ c("isHorizontal") || o({ type: "GOTO.NEXT", value: e });
101
100
  },
102
101
  ArrowUp() {
103
- c("isHorizontal") || d({ type: "GOTO.PREV", value: e });
102
+ c("isHorizontal") || o({ type: "GOTO.PREV", value: e });
104
103
  },
105
104
  ArrowRight() {
106
- c("isHorizontal") && d({ type: "GOTO.NEXT", value: e });
105
+ c("isHorizontal") && o({ type: "GOTO.NEXT", value: e });
107
106
  },
108
107
  ArrowLeft() {
109
- c("isHorizontal") && d({ type: "GOTO.PREV", value: e });
108
+ c("isHorizontal") && o({ type: "GOTO.PREV", value: e });
110
109
  },
111
110
  Home() {
112
- d({ type: "GOTO.FIRST", value: e });
111
+ o({ type: "GOTO.FIRST", value: e });
113
112
  },
114
113
  End() {
115
- d({ type: "GOTO.LAST", value: e });
114
+ o({ type: "GOTO.LAST", value: e });
116
115
  }
117
116
  }, x = G(n, {
118
117
  dir: a("dir"),