@adgytec/adgytec-web-ui-components 2.1.7 → 2.1.8
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/dist/assets/core.css +1 -1
- package/dist/chunks/ActionDialog.map +1 -1
- package/dist/chunks/AppBarAction.map +1 -1
- package/dist/chunks/AppBarAvatar +38 -30
- package/dist/chunks/AppBarAvatar.map +1 -1
- package/dist/chunks/AppBarHeadline +18 -12
- package/dist/chunks/AppBarHeadline.map +1 -1
- package/dist/chunks/BaseCalendar.map +1 -1
- package/dist/chunks/BottomSheet +23 -16
- package/dist/chunks/BottomSheet.map +1 -1
- package/dist/chunks/BottomSheetModal.map +1 -1
- package/dist/chunks/ButtonGroup +28 -20
- package/dist/chunks/ButtonGroup.map +1 -1
- package/dist/chunks/CalendarCell.map +1 -1
- package/dist/chunks/CalendarGrid +40 -22
- package/dist/chunks/CalendarGrid.map +1 -1
- package/dist/chunks/CalendarMenuItem +18 -9
- package/dist/chunks/CalendarMenuItem.map +1 -1
- package/dist/chunks/CenteredSlider.map +1 -1
- package/dist/chunks/ComboBox.map +1 -1
- package/dist/chunks/ComboBoxPopover.map +1 -1
- package/dist/chunks/ComboBoxTrigger +66 -44
- package/dist/chunks/ComboBoxTrigger.map +1 -1
- package/dist/chunks/ConnectedButtonGroup.map +1 -1
- package/dist/chunks/Dialog +21 -12
- package/dist/chunks/Dialog.map +1 -1
- package/dist/chunks/Disclosure +17 -8
- package/dist/chunks/Disclosure.map +1 -1
- package/dist/chunks/DisclosureGroup +28 -15
- package/dist/chunks/DisclosureGroup.map +1 -1
- package/dist/chunks/DisclosureHeader +53 -35
- package/dist/chunks/DisclosureHeader.map +1 -1
- package/dist/chunks/DisclosurePanel +22 -12
- package/dist/chunks/DisclosurePanel.map +1 -1
- package/dist/chunks/Divider +18 -9
- package/dist/chunks/Divider.map +1 -1
- package/dist/chunks/FieldError +18 -9
- package/dist/chunks/FieldError.map +1 -1
- package/dist/chunks/Icon +20 -15
- package/dist/chunks/Icon.map +1 -1
- package/dist/chunks/Input +72 -64
- package/dist/chunks/Input.map +1 -1
- package/dist/chunks/Input2 +82 -72
- package/dist/chunks/Input2.map +1 -1
- package/dist/chunks/Loader +17 -10
- package/dist/chunks/Loader.map +1 -1
- package/dist/chunks/MenuPopover +17 -8
- package/dist/chunks/MenuPopover.map +1 -1
- package/dist/chunks/Modal +17 -8
- package/dist/chunks/Modal.map +1 -1
- package/dist/chunks/ModalOverlay +17 -8
- package/dist/chunks/ModalOverlay.map +1 -1
- package/dist/chunks/Navigation +46 -36
- package/dist/chunks/Navigation.map +1 -1
- package/dist/chunks/NavigationScrollContainer +37 -27
- package/dist/chunks/NavigationScrollContainer.map +1 -1
- package/dist/chunks/NavigationSection +16 -7
- package/dist/chunks/NavigationSection.map +1 -1
- package/dist/chunks/NavigationSectionLabel +18 -9
- package/dist/chunks/NavigationSectionLabel.map +1 -1
- package/dist/chunks/NavigationState.map +1 -1
- package/dist/chunks/Popover +17 -8
- package/dist/chunks/Popover.map +1 -1
- package/dist/chunks/Radio +59 -52
- package/dist/chunks/Radio.map +1 -1
- package/dist/chunks/RichTooltip +17 -8
- package/dist/chunks/RichTooltip.map +1 -1
- package/dist/chunks/RichTooltipActions +16 -7
- package/dist/chunks/RichTooltipActions.map +1 -1
- package/dist/chunks/RichTooltipInfo +16 -7
- package/dist/chunks/RichTooltipInfo.map +1 -1
- package/dist/chunks/SearchField.map +1 -1
- package/dist/chunks/SelectPopover +17 -8
- package/dist/chunks/SelectPopover.map +1 -1
- package/dist/chunks/SelectTrigger +34 -24
- package/dist/chunks/SelectTrigger.map +1 -1
- package/dist/chunks/SideSheet +64 -52
- package/dist/chunks/SideSheet.map +1 -1
- package/dist/chunks/SideSheetModal.map +1 -1
- package/dist/chunks/Slider.map +1 -1
- package/dist/chunks/SliderOutput +21 -16
- package/dist/chunks/SliderOutput.map +1 -1
- package/dist/chunks/SliderStops.map +1 -1
- package/dist/chunks/Snackbar.map +1 -1
- package/dist/chunks/SplitButtonTrigger +48 -38
- package/dist/chunks/SplitButtonTrigger.map +1 -1
- package/dist/chunks/SubmenuPopover.map +1 -1
- package/dist/chunks/Switch.map +1 -1
- package/dist/chunks/Tab +41 -29
- package/dist/chunks/Tab.map +1 -1
- package/dist/chunks/TabList +16 -8
- package/dist/chunks/TabList.map +1 -1
- package/dist/chunks/TabPanel +16 -8
- package/dist/chunks/TabPanel.map +1 -1
- package/dist/chunks/TabPanels +17 -9
- package/dist/chunks/TabPanels.map +1 -1
- package/dist/chunks/Tabs +17 -8
- package/dist/chunks/Tabs.map +1 -1
- package/dist/chunks/Tag.map +1 -1
- package/dist/chunks/ThemeSelector +73 -72
- package/dist/chunks/ThemeSelector.map +1 -1
- package/dist/chunks/Toolbar +20 -12
- package/dist/chunks/Toolbar.map +1 -1
- package/dist/chunks/Tooltip.map +1 -1
- package/dist/chunks/compiler-runtime +24 -0
- package/dist/chunks/compiler-runtime.map +1 -0
- package/dist/chunks/core +75 -68
- package/dist/chunks/core.map +1 -1
- package/dist/chunks/core3.map +1 -1
- package/dist/chunks/core8.map +1 -1
- package/dist/chunks/navContext.map +1 -1
- package/dist/chunks/useGlobalListeners.map +1 -1
- package/dist/chunks/useHover +1 -1
- package/dist/chunks/useHover.map +1 -1
- package/dist/chunks/usePress +1 -1
- package/dist/chunks/usePress.map +1 -1
- package/dist/chunks/useSplash +42 -27
- package/dist/chunks/useSplash.map +1 -1
- package/dist/components/AppBar/core/index.js.map +1 -1
- package/dist/components/Button/Button/index.js +61 -48
- package/dist/components/Button/Button/index.js.map +1 -1
- package/dist/components/Button/ButtonGroups/ButtonGroupContext/index.js.map +1 -1
- package/dist/components/Button/IconButton/index.js.map +1 -1
- package/dist/components/Button/LinkButton/index.js +61 -48
- package/dist/components/Button/LinkButton/index.js.map +1 -1
- package/dist/components/Button/LinkIconButton/index.js.map +1 -1
- package/dist/components/Button/SplitButton/SplitButtonContext/index.js.map +1 -1
- package/dist/components/Button/SplitButton/SplitButtonPrimary/index.js.map +1 -1
- package/dist/components/Button/ToggleButton/index.js +69 -54
- package/dist/components/Button/ToggleButton/index.js.map +1 -1
- package/dist/components/Button/ToggleIconButton/index.js.map +1 -1
- package/dist/components/Calendar/Calendar/index.js +22 -12
- package/dist/components/Calendar/Calendar/index.js.map +1 -1
- package/dist/components/Calendar/CalendarMonthMenu/index.js +38 -33
- package/dist/components/Calendar/CalendarMonthMenu/index.js.map +1 -1
- package/dist/components/Calendar/CalendarYearMenu/index.js +31 -26
- package/dist/components/Calendar/CalendarYearMenu/index.js.map +1 -1
- package/dist/components/Calendar/RangeCalendar/index.js +25 -15
- package/dist/components/Calendar/RangeCalendar/index.js.map +1 -1
- package/dist/components/Dialog/core/index.js.map +1 -1
- package/dist/components/Disclosure/context/index.js +11 -12
- package/dist/components/Disclosure/context/index.js.map +1 -1
- package/dist/components/Image/index.js.map +1 -1
- package/dist/components/Input/CharacterCount/index.js +18 -10
- package/dist/components/Input/CharacterCount/index.js.map +1 -1
- package/dist/components/Input/DateField/index.js.map +1 -1
- package/dist/components/Input/DatePicker/DatePicker/index.js.map +1 -1
- package/dist/components/Input/DatePicker/DateRangePicker/index.js.map +1 -1
- package/dist/components/Input/Description/index.js +21 -10
- package/dist/components/Input/Description/index.js.map +1 -1
- package/dist/components/Input/Label/index.js +18 -10
- package/dist/components/Input/Label/index.js.map +1 -1
- package/dist/components/Input/Select/Select/index.js.map +1 -1
- package/dist/components/Input/Select/SelectItem/index.js.map +1 -1
- package/dist/components/Input/Select/SelectList/index.js.map +1 -1
- package/dist/components/Input/Select/SelectListSection/index.js +17 -9
- package/dist/components/Input/Select/SelectListSection/index.js.map +1 -1
- package/dist/components/Input/Select/SelectListSectionHeader/index.js +18 -10
- package/dist/components/Input/Select/SelectListSectionHeader/index.js.map +1 -1
- package/dist/components/Input/Slider/RangeSlider/index.js.map +1 -1
- package/dist/components/Input/TextArea/index.js.map +1 -1
- package/dist/components/Input/TimeField/index.js.map +1 -1
- package/dist/components/Input/hooks/index.js +16 -10
- package/dist/components/Input/hooks/index.js.map +1 -1
- package/dist/components/Menu/Menu/index.js +19 -14
- package/dist/components/Menu/Menu/index.js.map +1 -1
- package/dist/components/Menu/MenuItem/index.js +48 -38
- package/dist/components/Menu/MenuItem/index.js.map +1 -1
- package/dist/components/Menu/MenuSection/index.js +18 -10
- package/dist/components/Menu/MenuSection/index.js.map +1 -1
- package/dist/components/Menu/MenuSectionHeader/index.js +18 -10
- package/dist/components/Menu/MenuSectionHeader/index.js.map +1 -1
- package/dist/components/Menu/MenuShortcut/index.js +16 -8
- package/dist/components/Menu/MenuShortcut/index.js.map +1 -1
- package/dist/components/Menu/MenuTrailingText/index.js +16 -8
- package/dist/components/Menu/MenuTrailingText/index.js.map +1 -1
- package/dist/components/Menu/MenuTrigger/index.js +21 -11
- package/dist/components/Menu/MenuTrigger/index.js.map +1 -1
- package/dist/components/Menu/context/index.js.map +1 -1
- package/dist/components/Navigation/NavigationItem/NavigationButton/index.js +30 -21
- package/dist/components/Navigation/NavigationItem/NavigationButton/index.js.map +1 -1
- package/dist/components/Navigation/NavigationItem/NavigationItemIconRenderer/index.js +30 -8
- package/dist/components/Navigation/NavigationItem/NavigationItemIconRenderer/index.js.map +1 -1
- package/dist/components/Navigation/NavigationItem/NavigationLink/index.js +29 -20
- package/dist/components/Navigation/NavigationItem/NavigationLink/index.js.map +1 -1
- package/dist/components/Navigation/SubNavigation/SubNavigation/index.js +69 -56
- package/dist/components/Navigation/SubNavigation/SubNavigation/index.js.map +1 -1
- package/dist/components/Navigation/SubNavigation/SubNavigationTrigger/index.js +48 -29
- package/dist/components/Navigation/SubNavigation/SubNavigationTrigger/index.js.map +1 -1
- package/dist/components/Tooltip/RichTooltip/RichTooltipInfo/RichTooltipSubhead/index.js +17 -9
- package/dist/components/Tooltip/RichTooltip/RichTooltipInfo/RichTooltipSubhead/index.js.map +1 -1
- package/dist/components/Tooltip/RichTooltip/RichTooltipInfo/RichTooltipText/index.js +17 -9
- package/dist/components/Tooltip/RichTooltip/RichTooltipInfo/RichTooltipText/index.js.map +1 -1
- package/dist/components/Tooltip/TooltipTrigger/index.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/chunks/Navigation
CHANGED
|
@@ -1,42 +1,44 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as r } from "./
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { t as u } from "./
|
|
8
|
-
import d from "
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { t as e } from "./compiler-runtime";
|
|
2
|
+
import { n as t, r as n, t as r } from "./NavigationState";
|
|
3
|
+
import { t as i } from "./base";
|
|
4
|
+
import { IconButton as a } from "../components/Button/IconButton/index.js";
|
|
5
|
+
import { useInDialog as o } from "../components/Dialog/core/index.js";
|
|
6
|
+
import { a as s, i as c, n as l } from "./core8";
|
|
7
|
+
import { t as u } from "./NavigationScrollContainer";
|
|
8
|
+
import { t as d } from "./navContext";
|
|
9
|
+
import f from "clsx";
|
|
10
|
+
import { createContext as p, useContext as m, useState as h } from "react";
|
|
11
|
+
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
12
|
+
import { Header as v, Heading as y, Provider as b } from "react-aria-components";
|
|
13
|
+
import { X as x } from "lucide-react";
|
|
14
|
+
import '../assets/Navigation.css';//#region src/components/Navigation/Navigation/navigation.module.css
|
|
15
|
+
var S = e(), C = { container: "_container_npu2b_2" }, w = p(null);
|
|
16
|
+
function T() {
|
|
17
|
+
let e = m(w);
|
|
16
18
|
if (e === null) throw Error("Missing navigation rendering info. Ensure this component is rendered within Navigation component.");
|
|
17
19
|
return e;
|
|
18
20
|
}
|
|
19
21
|
//#endregion
|
|
20
22
|
//#region src/components/Navigation/Navigation/Navigation.tsx
|
|
21
|
-
var
|
|
22
|
-
let [k, A] =
|
|
23
|
-
return /* @__PURE__ */
|
|
23
|
+
var E = ({ label: e, children: t, className: r, isLinkActive: p, isButtonActive: m, stateID: S = "__root__", inert: T, style: E, containerClassName: D, ...O }) => {
|
|
24
|
+
let [k, A] = h(null), { isInert: j } = n(), M = o(), N = M || !!e || !1;
|
|
25
|
+
return /* @__PURE__ */ g(b, {
|
|
24
26
|
values: [
|
|
25
|
-
[
|
|
26
|
-
[
|
|
27
|
+
[w, { container: k }],
|
|
28
|
+
[d, {
|
|
27
29
|
isLinkActive: p,
|
|
28
|
-
isButtonActive:
|
|
30
|
+
isButtonActive: m
|
|
29
31
|
}],
|
|
30
|
-
[
|
|
31
|
-
id:
|
|
32
|
+
[l, {
|
|
33
|
+
id: S,
|
|
32
34
|
depth: 0
|
|
33
35
|
}]
|
|
34
36
|
],
|
|
35
|
-
children: /* @__PURE__ */
|
|
37
|
+
children: /* @__PURE__ */ g("div", {
|
|
36
38
|
ref: A,
|
|
37
|
-
className:
|
|
38
|
-
children: /* @__PURE__ */
|
|
39
|
-
className:
|
|
39
|
+
className: f(C.container, D),
|
|
40
|
+
children: /* @__PURE__ */ _("nav", {
|
|
41
|
+
className: f(s, r),
|
|
40
42
|
...O,
|
|
41
43
|
"data-header": N || void 0,
|
|
42
44
|
style: {
|
|
@@ -45,24 +47,32 @@ var w = ({ label: e, children: n, className: f, isLinkActive: p, isButtonActive:
|
|
|
45
47
|
},
|
|
46
48
|
inert: T ?? j(0),
|
|
47
49
|
"data-modal": M || void 0,
|
|
48
|
-
children: [N && /* @__PURE__ */
|
|
49
|
-
className:
|
|
50
|
-
children: [e && /* @__PURE__ */
|
|
51
|
-
className:
|
|
50
|
+
children: [N && /* @__PURE__ */ _(v, {
|
|
51
|
+
className: f(c),
|
|
52
|
+
children: [e && /* @__PURE__ */ g(y, {
|
|
53
|
+
className: f(i.titleLarge),
|
|
52
54
|
"data-heading": !0,
|
|
53
55
|
children: e
|
|
54
|
-
}), M && /* @__PURE__ */
|
|
55
|
-
icon:
|
|
56
|
+
}), M && /* @__PURE__ */ g(a, {
|
|
57
|
+
icon: x,
|
|
56
58
|
color: "standard",
|
|
57
59
|
slot: "close",
|
|
58
60
|
"data-close-button": !0
|
|
59
61
|
})]
|
|
60
|
-
}), /* @__PURE__ */
|
|
62
|
+
}), /* @__PURE__ */ g(u, { children: t })]
|
|
61
63
|
})
|
|
62
64
|
})
|
|
63
65
|
});
|
|
64
|
-
},
|
|
66
|
+
}, D = (e) => {
|
|
67
|
+
let n = (0, S.c)(4);
|
|
68
|
+
if (m(t) === null) {
|
|
69
|
+
let t;
|
|
70
|
+
return n[0] === e ? t = n[1] : (t = /* @__PURE__ */ g(r, { children: /* @__PURE__ */ g(E, { ...e }) }), n[0] = e, n[1] = t), t;
|
|
71
|
+
}
|
|
72
|
+
let i;
|
|
73
|
+
return n[2] === e ? i = n[3] : (i = /* @__PURE__ */ g(E, { ...e }), n[2] = e, n[3] = i), i;
|
|
74
|
+
};
|
|
65
75
|
//#endregion
|
|
66
|
-
export {
|
|
76
|
+
export { w as n, T as r, D as t };
|
|
67
77
|
|
|
68
78
|
//# sourceMappingURL=Navigation.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Navigation","names":[],"sources":["../../src/components/Navigation/Navigation/navigation.module.css","../../src/components/Navigation/Navigation/navRenderingContext.ts","../../src/components/Navigation/Navigation/Navigation.tsx"],"sourcesContent":["@layer adgytec.comps {\n .container {\n --_md-navigation-items-gap: var(--md-sys-layout-space-4);\n\n position: relative;\n border-radius: inherit;\n overflow: clip;\n }\n}\n","import { createContext, useContext } from \"react\";\n\nexport type NavigationRenderingContextType = {\n container: HTMLDivElement | null;\n};\n\nexport const NavigationRenderingContext =\n createContext<NavigationRenderingContextType | null>(null);\n\nexport function useNavigationContainer() {\n const container = useContext(NavigationRenderingContext);\n if (container === null) {\n throw new Error(\n \"Missing navigation rendering info. Ensure this component is rendered within Navigation component.\"\n );\n }\n\n return container;\n}\n","import clsx from \"clsx\";\nimport { X } from \"lucide-react\";\nimport { useContext, useState } from \"react\";\nimport { Header, Heading, Provider } from \"react-aria-components\";\nimport { IconButton } from \"@/components/Button\";\nimport { useInDialog } from \"@/components/Dialog\";\nimport { typography } from \"@/utils\";\nimport {\n NavigationHeaderStyles,\n NavigationInfoContext,\n NavigationStyles,\n} from \"../core\";\nimport { NavigationScrollContainer } from \"../NavigationScrollContainer\";\nimport {\n NavigationState,\n NavigationStateContext,\n useNavigationState,\n} from \"../NavigationState\";\nimport { NavigationContext } from \"./navContext\";\nimport styles from \"./navigation.module.css\";\nimport { NavigationRenderingContext } from \"./navRenderingContext\";\nimport type { NavigationProps } from \"./types\";\n\nconst Nav: React.FC<NavigationProps> = ({\n label,\n children,\n className,\n isLinkActive,\n isButtonActive,\n stateID = \"__root__\",\n inert,\n style,\n containerClassName,\n ...props\n}) => {\n const depth = 0;\n\n const [container, setContainer] = useState<HTMLDivElement | null>(null);\n const { isInert } = useNavigationState();\n\n const isInModal = useInDialog();\n const renderHeader = isInModal || !!label || false;\n\n return (\n <Provider\n values={[\n [NavigationRenderingContext, { container }],\n [NavigationContext, { isLinkActive, isButtonActive }],\n [NavigationInfoContext, { id: stateID, depth }],\n ]}\n >\n <div\n ref={setContainer}\n className={clsx(styles[\"container\"], containerClassName)}\n >\n <nav\n className={clsx(NavigationStyles, className)}\n {...props}\n data-header={renderHeader || undefined}\n style={{\n ...style,\n zIndex: depth + 1,\n }}\n inert={inert ?? isInert(depth)}\n data-modal={isInModal || undefined}\n >\n {renderHeader && (\n <Header className={clsx(NavigationHeaderStyles)}>\n {label && (\n <Heading\n className={clsx(typography.titleLarge)}\n data-heading\n >\n {label}\n </Heading>\n )}\n\n {isInModal && (\n <IconButton\n icon={X}\n color=\"standard\"\n slot=\"close\"\n data-close-button\n />\n )}\n </Header>\n )}\n\n <NavigationScrollContainer>\n {children}\n </NavigationScrollContainer>\n </nav>\n </div>\n </Provider>\n );\n};\n\nexport const Navigation: React.FC<NavigationProps> = (props) => {\n const navStateCtx = useContext(NavigationStateContext);\n\n if (navStateCtx === null) {\n return (\n <NavigationState>\n <Nav {...props} />\n </NavigationState>\n );\n }\n\n return <Nav {...props} />;\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Navigation","names":[],"sources":["../../src/components/Navigation/Navigation/navigation.module.css","../../src/components/Navigation/Navigation/navRenderingContext.ts","../../src/components/Navigation/Navigation/Navigation.tsx"],"sourcesContent":["@layer adgytec.comps {\n .container {\n --_md-navigation-items-gap: var(--md-sys-layout-space-4);\n\n position: relative;\n border-radius: inherit;\n overflow: clip;\n }\n}\n","import { createContext, useContext } from \"react\";\n\nexport type NavigationRenderingContextType = {\n container: HTMLDivElement | null;\n};\n\nexport const NavigationRenderingContext =\n createContext<NavigationRenderingContextType | null>(null);\n\nexport function useNavigationContainer() {\n const container = useContext(NavigationRenderingContext);\n if (container === null) {\n throw new Error(\n \"Missing navigation rendering info. Ensure this component is rendered within Navigation component.\"\n );\n }\n\n return container;\n}\n","import clsx from \"clsx\";\nimport { X } from \"lucide-react\";\nimport { useContext, useState } from \"react\";\nimport { Header, Heading, Provider } from \"react-aria-components\";\nimport { IconButton } from \"@/components/Button\";\nimport { useInDialog } from \"@/components/Dialog\";\nimport { typography } from \"@/utils\";\nimport {\n NavigationHeaderStyles,\n NavigationInfoContext,\n NavigationStyles,\n} from \"../core\";\nimport { NavigationScrollContainer } from \"../NavigationScrollContainer\";\nimport {\n NavigationState,\n NavigationStateContext,\n useNavigationState,\n} from \"../NavigationState\";\nimport { NavigationContext } from \"./navContext\";\nimport styles from \"./navigation.module.css\";\nimport { NavigationRenderingContext } from \"./navRenderingContext\";\nimport type { NavigationProps } from \"./types\";\n\nconst Nav: React.FC<NavigationProps> = ({\n label,\n children,\n className,\n isLinkActive,\n isButtonActive,\n stateID = \"__root__\",\n inert,\n style,\n containerClassName,\n ...props\n}) => {\n const depth = 0;\n\n const [container, setContainer] = useState<HTMLDivElement | null>(null);\n const { isInert } = useNavigationState();\n\n const isInModal = useInDialog();\n const renderHeader = isInModal || !!label || false;\n\n return (\n <Provider\n values={[\n [NavigationRenderingContext, { container }],\n [NavigationContext, { isLinkActive, isButtonActive }],\n [NavigationInfoContext, { id: stateID, depth }],\n ]}\n >\n <div\n ref={setContainer}\n className={clsx(styles[\"container\"], containerClassName)}\n >\n <nav\n className={clsx(NavigationStyles, className)}\n {...props}\n data-header={renderHeader || undefined}\n style={{\n ...style,\n zIndex: depth + 1,\n }}\n inert={inert ?? isInert(depth)}\n data-modal={isInModal || undefined}\n >\n {renderHeader && (\n <Header className={clsx(NavigationHeaderStyles)}>\n {label && (\n <Heading\n className={clsx(typography.titleLarge)}\n data-heading\n >\n {label}\n </Heading>\n )}\n\n {isInModal && (\n <IconButton\n icon={X}\n color=\"standard\"\n slot=\"close\"\n data-close-button\n />\n )}\n </Header>\n )}\n\n <NavigationScrollContainer>\n {children}\n </NavigationScrollContainer>\n </nav>\n </div>\n </Provider>\n );\n};\n\nexport const Navigation: React.FC<NavigationProps> = (props) => {\n const navStateCtx = useContext(NavigationStateContext);\n\n if (navStateCtx === null) {\n return (\n <NavigationState>\n <Nav {...props} />\n </NavigationState>\n );\n }\n\n return <Nav {...props} />;\n};\n"],"mappings":";;;;;;;;;;;;;;sDCMa,IACT,EAAqD,IAAI;AAE7D,SAAO,IAAA;CACH,IAAA,IAAkB,EAAW,CAA0B;CACvD,IAAI,MAAc,MACd,MAAU,MACN,mGACJ;CACH,OAEM;AAAS;;;ACMpB,IAAM,KAAkC,EACpC,UACA,aACA,cACA,iBACA,mBACA,aAAU,YACV,UACA,UACA,uBACA,GAAG,QACD;CACF,IAEM,CAAC,GAAW,KAAgB,EAAgC,IAAI,GAChE,EAAE,eAAY,EAAmB,GAEjC,IAAY,EAAY,GACxB,IAAe,KAAa,CAAC,CAAC,KAAS;CAE7C,OACI,kBAAC,GAAD;EACI,QAAQ;GACJ,CAAC,GAA4B,EAAE,aAAU,CAAC;GAC1C,CAAC,GAAmB;IAAE;IAAc;GAAe,CAAC;GACpD,CAAC,GAAuB;IAAE,IAAI;IAAS;GAAM,CAAC;EAAC;YAGnD,kBAAC,OAAD;GACI,KAAK;GACL,WAAW,EAAK,EAAO,WAAc,CAAkB;aAEvD,kBAAC,OAAD;IACI,WAAW,EAAK,GAAkB,CAAS;IAC3C,GAAI;IACJ,eAAa,KAAgB,KAAA;IAC7B,OAAO;KACH,GAAG;KACH,QAAQ;IACZ;IACA,OAAO,KAAS,EAAQ,CAAK;IAC7B,cAAY,KAAa,KAAA;cAT7B,CAWK,KACG,kBAAC,GAAD;KAAQ,WAAW,EAAK,CAAsB;eAA9C,CACK,KACG,kBAAC,GAAD;MACI,WAAW,EAAK,EAAW,UAAU;MACrC,gBAAA;gBAEC;KACI,CAAA,GAGZ,KACG,kBAAC,GAAD;MACI,MAAM;MACN,OAAM;MACN,MAAK;MACL,qBAAA;KAAiB,CAAA,CAGrB;QAGZ,kBAAC,GAAD,EACK,YACsB,CAAA,CAC1B;;EACJ,CAAA;CACC,CAAA;AAElB,GAEa,KAAwC,MAAA;CAAA,IAAA,KAAA,GAAA,EAAA,EAAA,CAAA,CAAA;CAGjD,IAFoB,EAAW,CAE3B,MAAgB,MAAI;EAAA,IAAA;EAIE,OAJF,EAAA,OAAA,IAIE,IAAA,EAAA,MAFlB,IAAA,kBAAC,GAAD,EAAA,UACI,kBAAC,GAAD,EAAI,GAAK,EAAK,CAAA,EADF,CAAA,GAEE,EAAA,KAAA,GAAA,EAAA,KAAA,IAFlB;CAEkB;CAEzB,IAAA;CAEwB,OAFxB,EAAA,OAAA,IAEwB,IAAA,EAAA,MAAlB,IAAA,kBAAC,GAAD,EAAI,GAAK,EAAK,CAAA,GAAI,EAAA,KAAA,GAAA,EAAA,KAAA,IAAlB;AAAkB"}
|
|
@@ -1,32 +1,42 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { r as n } from "./
|
|
3
|
-
import r from "
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
},
|
|
13
|
-
|
|
1
|
+
import { t as e } from "./compiler-runtime";
|
|
2
|
+
import { i as t, r as n } from "./NavigationState";
|
|
3
|
+
import { r } from "./core8";
|
|
4
|
+
import i from "clsx";
|
|
5
|
+
import { useLayoutEffect as a } from "react";
|
|
6
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
7
|
+
import { useObjectRef as s } from "react-aria";
|
|
8
|
+
import '../assets/NavigationScrollContainer.css';//#region src/components/Navigation/NavigationScrollContainer/navigationScrollContainer.module.css
|
|
9
|
+
var c = e(), l = { container: "_container_1tvqz_2" }, u = (e) => {
|
|
10
|
+
let u = (0, c.c)(19), d, f, p;
|
|
11
|
+
u[0] === e ? (d = u[1], f = u[2], p = u[3]) : ({ref: p, className: d, ...f} = e, u[0] = e, u[1] = d, u[2] = f, u[3] = p);
|
|
12
|
+
let m = s(p), { registerNavigationContainer: h, saveNavigationScrollTopProgress: g } = n(), { id: _ } = r(), v, y;
|
|
13
|
+
u[4] !== _ || u[5] !== h || u[6] !== m ? (v = () => {
|
|
14
|
+
let e = m.current;
|
|
15
|
+
if (e) return h(_, e);
|
|
16
|
+
}, y = [
|
|
14
17
|
m,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
18
|
+
_,
|
|
19
|
+
h
|
|
20
|
+
], u[4] = _, u[5] = h, u[6] = m, u[7] = v, u[8] = y) : (v = u[7], y = u[8]), a(v, y);
|
|
21
|
+
let b;
|
|
22
|
+
u[9] !== _ || u[10] !== g ? (b = (e) => {
|
|
23
|
+
g(_, t({
|
|
24
|
+
scrollHeight: e.currentTarget.scrollHeight,
|
|
25
|
+
clientHeight: e.currentTarget.clientHeight,
|
|
26
|
+
scrollTop: e.currentTarget.scrollTop
|
|
27
|
+
}));
|
|
28
|
+
}, u[9] = _, u[10] = g, u[11] = b) : b = u[11];
|
|
29
|
+
let x;
|
|
30
|
+
u[12] === d ? x = u[13] : (x = i(l.container, d), u[12] = d, u[13] = x);
|
|
31
|
+
let S;
|
|
32
|
+
return u[14] !== f || u[15] !== m || u[16] !== b || u[17] !== x ? (S = /* @__PURE__ */ o("div", {
|
|
33
|
+
ref: m,
|
|
34
|
+
onScroll: b,
|
|
35
|
+
className: x,
|
|
36
|
+
...f
|
|
37
|
+
}), u[14] = f, u[15] = m, u[16] = b, u[17] = x, u[18] = S) : S = u[18], S;
|
|
28
38
|
};
|
|
29
39
|
//#endregion
|
|
30
|
-
export {
|
|
40
|
+
export { u as t };
|
|
31
41
|
|
|
32
42
|
//# sourceMappingURL=NavigationScrollContainer.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationScrollContainer","names":[],"sources":["../../src/components/Navigation/NavigationScrollContainer/navigationScrollContainer.module.css","../../src/components/Navigation/NavigationScrollContainer/NavigationScrollContainer.tsx"],"sourcesContent":["@layer adgytec.comps {\n .container {\n padding-inline: var(--md-sys-layout-space-16);\n overflow-y: auto;\n\n display: grid;\n gap: var(--_md-navigation-items-gap);\n align-content: start;\n\n /* 2dp for focus outline offset and 3dp for focus outline width + 1dp to prevent clipping */\n padding-block: calc(6 * var(--dp, 1px));\n }\n}\n","import clsx from \"clsx\";\nimport { useLayoutEffect } from \"react\";\nimport { useObjectRef } from \"react-aria\";\nimport { getScrollProgress } from \"@/utils\";\nimport { useNavigationInfo } from \"../core\";\nimport { useNavigationState } from \"../NavigationState\";\nimport styles from \"./navigationScrollContainer.module.css\";\n\nexport const NavigationScrollContainer: React.FC<\n React.ComponentPropsWithRef<\"div\">\n> = ({ ref, className, ...props }) => {\n const scrollContainerRef = useObjectRef(ref);\n\n const { registerNavigationContainer, saveNavigationScrollTopProgress } =\n useNavigationState();\n const { id } = useNavigationInfo();\n\n useLayoutEffect(() => {\n const container = scrollContainerRef.current;\n if (!container) {\n return;\n }\n\n return registerNavigationContainer(id, container);\n }, [scrollContainerRef, id, registerNavigationContainer]);\n\n return (\n <div\n ref={scrollContainerRef}\n onScroll={(e) => {\n saveNavigationScrollTopProgress(\n id,\n getScrollProgress({\n scrollHeight: e.currentTarget.scrollHeight,\n clientHeight: e.currentTarget.clientHeight,\n scrollTop: e.currentTarget.scrollTop,\n })\n );\n }}\n className={clsx(styles[\"container\"], className)}\n {...props}\n />\n );\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"NavigationScrollContainer","names":["scrollContainerRef"],"sources":["../../src/components/Navigation/NavigationScrollContainer/navigationScrollContainer.module.css","../../src/components/Navigation/NavigationScrollContainer/NavigationScrollContainer.tsx"],"sourcesContent":["@layer adgytec.comps {\n .container {\n padding-inline: var(--md-sys-layout-space-16);\n overflow-y: auto;\n\n display: grid;\n gap: var(--_md-navigation-items-gap);\n align-content: start;\n\n /* 2dp for focus outline offset and 3dp for focus outline width + 1dp to prevent clipping */\n padding-block: calc(6 * var(--dp, 1px));\n }\n}\n","import clsx from \"clsx\";\nimport { useLayoutEffect } from \"react\";\nimport { useObjectRef } from \"react-aria\";\nimport { getScrollProgress } from \"@/utils\";\nimport { useNavigationInfo } from \"../core\";\nimport { useNavigationState } from \"../NavigationState\";\nimport styles from \"./navigationScrollContainer.module.css\";\n\nexport const NavigationScrollContainer: React.FC<\n React.ComponentPropsWithRef<\"div\">\n> = ({ ref, className, ...props }) => {\n const scrollContainerRef = useObjectRef(ref);\n\n const { registerNavigationContainer, saveNavigationScrollTopProgress } =\n useNavigationState();\n const { id } = useNavigationInfo();\n\n useLayoutEffect(() => {\n const container = scrollContainerRef.current;\n if (!container) {\n return;\n }\n\n return registerNavigationContainer(id, container);\n }, [scrollContainerRef, id, registerNavigationContainer]);\n\n return (\n <div\n ref={scrollContainerRef}\n onScroll={(e) => {\n saveNavigationScrollTopProgress(\n id,\n getScrollProgress({\n scrollHeight: e.currentTarget.scrollHeight,\n clientHeight: e.currentTarget.clientHeight,\n scrollTop: e.currentTarget.scrollTop,\n })\n );\n }}\n className={clsx(styles[\"container\"], className)}\n {...props}\n />\n );\n};\n"],"mappings":";;;;;;;;sDCQa,KAET,MAAA;CAAA,IAAA,KAAA,GAAA,EAAA,EAAA,CAAA,EAAA,GAAA,GAAA,GAAA;CAAA,AAAA,EAAA,OAAA,KAA6B,IAAA,EAAA,IAAA,IAAA,EAAA,IAAA,IAAA,EAAA,OAA5B,0BAAA,KAAA,GAA4B,EAAA,KAAA,GAAA,EAAA,KAAA,GAAA,EAAA,KAAA,GAAA,EAAA,KAAA;CAC7B,IAAA,IAA2B,EAAa,CAAG,GAE3C,EAAA,gCAAA,uCACI,EAAmB,GACvB,EAAA,UAAe,EAAkB,GAAE,GAAA;CAEnC,AAFmC,EAAA,OAAA,KAAA,EAAA,OAAA,KAAA,EAAA,OAAA,KAEnB,UAAA;EACZ,IAAA,IAAkB,EAAkB;EAC/B,OAEJ,OAEM,EAA4B,GAAI,CAAS;CAAC,GAClD,IAAA;EAAC;EAAoB;EAAI;CAA2B,GAAC,EAAA,KAAA,GAAA,EAAA,KAAA,GAAA,EAAA,KAAA,GAAA,EAAA,KAAA,GAAA,EAAA,KAAA,MAAA,IAAA,EAAA,IAAA,IAAA,EAAA,KAPxD,EAAgB,GAOb,CAAqD;CAAC,IAAA;CAAA,AAAA,EAAA,OAAA,KAAA,EAAA,QAAA,KAKvC,KAAA,MAAA;EACN,EACI,GACA,EAAkB;GAAA,cACA,EAAC,cAAc;GAAa,cAC5B,EAAC,cAAc;GAAa,WAC/B,EAAC,cAAc;EAC9B,CAAC,CACL;CAAC,GACJ,EAAA,KAAA,GAAA,EAAA,MAAA,GAAA,EAAA,MAAA,KAAA,IAAA,EAAA;CAAA,IAAA;CAAA,AAAA,EAAA,QAAA,IAC8C,IAAA,EAAA,OAApC,IAAA,EAAK,EAAM,WAAe,CAAS,GAAC,EAAA,MAAA,GAAA,EAAA,MAAA;CAAA,IAAA;CAEjD,OAFiD,EAAA,QAAA,KAAA,EAAA,QAAA,KAAA,EAAA,QAAA,KAAA,EAAA,QAAA,KAZnD,IAAA,kBAAA,OAAA;EACSA,KAAA;EACK,UAAA;EAUC,WAAA;EAAoC,GAC3C;CAAK,CAAA,GACX,EAAA,MAAA,GAAA,EAAA,MAAA,GAAA,EAAA,MAAA,GAAA,EAAA,MAAA,GAAA,EAAA,MAAA,KAAA,IAAA,EAAA,KAdF;AAcE"}
|
|
@@ -1,10 +1,19 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { t as e } from "./compiler-runtime";
|
|
2
|
+
import t from "clsx";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
import '../assets/NavigationSection.css';//#region src/components/Navigation/NavigationSection/NavigationSection/navigationSection.module.css
|
|
5
|
+
var r = e(), i = { section: "_section_1u3u0_2" }, a = (e) => {
|
|
6
|
+
let a = (0, r.c)(8), o, s;
|
|
7
|
+
a[0] === e ? (o = a[1], s = a[2]) : ({className: o, ...s} = e, a[0] = e, a[1] = o, a[2] = s);
|
|
8
|
+
let c;
|
|
9
|
+
a[3] === o ? c = a[4] : (c = t(i.section, o), a[3] = o, a[4] = c);
|
|
10
|
+
let l;
|
|
11
|
+
return a[5] !== s || a[6] !== c ? (l = /* @__PURE__ */ n("section", {
|
|
12
|
+
className: c,
|
|
13
|
+
...s
|
|
14
|
+
}), a[5] = s, a[6] = c, a[7] = l) : l = a[7], l;
|
|
15
|
+
};
|
|
7
16
|
//#endregion
|
|
8
|
-
export {
|
|
17
|
+
export { a as t };
|
|
9
18
|
|
|
10
19
|
//# sourceMappingURL=NavigationSection.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationSection","names":[],"sources":["../../src/components/Navigation/NavigationSection/NavigationSection/navigationSection.module.css","../../src/components/Navigation/NavigationSection/NavigationSection/NavigationSection.tsx"],"sourcesContent":["@layer adgytec.comps {\n .section {\n display: grid;\n gap: var(--_md-navigation-items-gap);\n\n margin-block-end: var(--md-sys-layout-space-16);\n }\n}\n","import clsx from \"clsx\";\nimport styles from \"./navigationSection.module.css\";\n\nexport const NavigationSection: React.FC<\n React.ComponentPropsWithRef<\"section\">\n> = ({ className, ...props }) => {\n return (\n <section className={clsx(styles[\"section\"], className)} {...props} />\n );\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"NavigationSection","names":[],"sources":["../../src/components/Navigation/NavigationSection/NavigationSection/navigationSection.module.css","../../src/components/Navigation/NavigationSection/NavigationSection/NavigationSection.tsx"],"sourcesContent":["@layer adgytec.comps {\n .section {\n display: grid;\n gap: var(--_md-navigation-items-gap);\n\n margin-block-end: var(--md-sys-layout-space-16);\n }\n}\n","import clsx from \"clsx\";\nimport styles from \"./navigationSection.module.css\";\n\nexport const NavigationSection: React.FC<\n React.ComponentPropsWithRef<\"section\">\n> = ({ className, ...props }) => {\n return (\n <section className={clsx(styles[\"section\"], className)} {...props} />\n );\n};\n"],"mappings":";;;;kDCGa,KAET,MAAA;CAAA,IAAA,KAAA,GAAA,EAAA,EAAA,CAAA,CAAA,GAAA,GAAA;CAAA,AAAA,EAAA,OAAA,KAAwB,IAAA,EAAA,IAAA,IAAA,EAAA,OAAvB,kBAAA,KAAA,GAAuB,EAAA,KAAA,GAAA,EAAA,KAAA,GAAA,EAAA,KAAA;CAAA,IAAA;CAAA,AAAA,EAAA,OAAA,IAEkC,IAAA,EAAA,MAAlC,IAAA,EAAK,EAAM,SAAa,CAAS,GAAC,EAAA,KAAA,GAAA,EAAA,KAAA;CAAA,IAAA;CAAe,OAAf,EAAA,OAAA,KAAA,EAAA,OAAA,KAAtD,IAAA,kBAAA,WAAA;EAAoB,WAAA;EAAkC,GAAM;CAAK,CAAA,GAAI,EAAA,KAAA,GAAA,EAAA,KAAA,GAAA,EAAA,KAAA,KAAA,IAAA,EAAA,IAArE;AAAqE"}
|
|
@@ -1,12 +1,21 @@
|
|
|
1
|
-
import { t as e } from "./
|
|
2
|
-
import t from "
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { t as e } from "./compiler-runtime";
|
|
2
|
+
import { t } from "./base";
|
|
3
|
+
import n from "clsx";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
import { Heading as i } from "react-aria-components";
|
|
6
|
+
import '../assets/NavigationSectionLabel.css';//#region src/components/Navigation/NavigationSection/NavigationSectionLabel/navigationSectionLabel.module.css
|
|
7
|
+
var a = e(), o = { label: "_label_6sxxv_2" }, s = (e) => {
|
|
8
|
+
let s = (0, a.c)(8), c, l;
|
|
9
|
+
s[0] === e ? (c = s[1], l = s[2]) : ({className: c, ...l} = e, s[0] = e, s[1] = c, s[2] = l);
|
|
10
|
+
let u;
|
|
11
|
+
s[3] === c ? u = s[4] : (u = n(o.label, t.titleSmall, c), s[3] = c, s[4] = u);
|
|
12
|
+
let d;
|
|
13
|
+
return s[5] !== l || s[6] !== u ? (d = /* @__PURE__ */ r(i, {
|
|
14
|
+
className: u,
|
|
15
|
+
...l
|
|
16
|
+
}), s[5] = l, s[6] = u, s[7] = d) : d = s[7], d;
|
|
17
|
+
};
|
|
9
18
|
//#endregion
|
|
10
|
-
export {
|
|
19
|
+
export { s as t };
|
|
11
20
|
|
|
12
21
|
//# sourceMappingURL=NavigationSectionLabel.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationSectionLabel","names":[],"sources":["../../src/components/Navigation/NavigationSection/NavigationSectionLabel/navigationSectionLabel.module.css","../../src/components/Navigation/NavigationSection/NavigationSectionLabel/NavigationSectionLabel.tsx"],"sourcesContent":["@layer adgytec.comps {\n .label {\n --_md-navigation-section-label-color: var(\n --md-navigation-section-label-color,\n var(--md-sys-color-on-surface-variant)\n );\n\n padding-inline: var(--md-sys-layout-space-16);\n padding-block-end: var(--md-sys-layout-space-4);\n\n color: var(--_md-navigation-section-label-color);\n }\n}\n","import clsx from \"clsx\";\nimport { Heading } from \"react-aria-components\";\nimport { typography } from \"@/utils\";\nimport styles from \"./navigationSectionLabel.module.css\";\n\nexport const NavigationSectionLabel: React.FC<\n React.ComponentPropsWithRef<typeof Heading>\n> = ({ className, ...props }) => {\n return (\n <Heading\n className={clsx(styles[\"label\"], typography.titleSmall, className)}\n {...props}\n />\n );\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"NavigationSectionLabel","names":[],"sources":["../../src/components/Navigation/NavigationSection/NavigationSectionLabel/navigationSectionLabel.module.css","../../src/components/Navigation/NavigationSection/NavigationSectionLabel/NavigationSectionLabel.tsx"],"sourcesContent":["@layer adgytec.comps {\n .label {\n --_md-navigation-section-label-color: var(\n --md-navigation-section-label-color,\n var(--md-sys-color-on-surface-variant)\n );\n\n padding-inline: var(--md-sys-layout-space-16);\n padding-block-end: var(--md-sys-layout-space-4);\n\n color: var(--_md-navigation-section-label-color);\n }\n}\n","import clsx from \"clsx\";\nimport { Heading } from \"react-aria-components\";\nimport { typography } from \"@/utils\";\nimport styles from \"./navigationSectionLabel.module.css\";\n\nexport const NavigationSectionLabel: React.FC<\n React.ComponentPropsWithRef<typeof Heading>\n> = ({ className, ...props }) => {\n return (\n <Heading\n className={clsx(styles[\"label\"], typography.titleSmall, className)}\n {...props}\n />\n );\n};\n"],"mappings":";;;;;;8CCKa,KAET,MAAA;CAAA,IAAA,KAAA,GAAA,EAAA,EAAA,CAAA,CAAA,GAAA,GAAA;CAAA,AAAA,EAAA,OAAA,KAAwB,IAAA,EAAA,IAAA,IAAA,EAAA,OAAvB,kBAAA,KAAA,GAAuB,EAAA,KAAA,GAAA,EAAA,KAAA,GAAA,EAAA,KAAA;CAAA,IAAA;CAAA,AAAA,EAAA,OAAA,IAGkD,IAAA,EAAA,MAAvD,IAAA,EAAK,EAAM,OAAW,EAAU,YAAa,CAAS,GAAC,EAAA,KAAA,GAAA,EAAA,KAAA;CAAA,IAAA;CAEpE,OAFoE,EAAA,OAAA,KAAA,EAAA,OAAA,KADtE,IAAA,kBAAC,GAAD;EACe,WAAA;EAAuD,GAC9D;CAAK,CAAA,GACX,EAAA,KAAA,GAAA,EAAA,KAAA,GAAA,EAAA,KAAA,KAAA,IAAA,EAAA,IAHF;AAGE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationState","names":[],"sources":["../../src/utils/scroll/scroll.ts","../../src/components/Navigation/NavigationState/context.ts","../../src/components/Navigation/NavigationState/NavigationState.tsx"],"sourcesContent":["export function getScrollProgress({\n scrollHeight,\n scrollTop,\n clientHeight,\n}: {\n scrollTop: number;\n scrollHeight: number;\n clientHeight: number;\n}): number {\n const maxScrollTop = scrollHeight - clientHeight;\n return maxScrollTop <= 0 ? 0 : scrollTop / maxScrollTop;\n}\nexport function getScrollTopFromProgress({\n scrollHeight,\n progress,\n clientHeight,\n}: {\n progress: number;\n scrollHeight: number;\n clientHeight: number;\n}): number {\n const maxScrollTop = scrollHeight - clientHeight;\n return progress * maxScrollTop;\n}\n","import { createContext, useContext } from \"react\";\n\nexport type NavigationStateContextType = {\n openSubNavigation: (id: string, depth: number) => void;\n closeSubNavigation: (id: string) => void;\n saveNavigationScrollTopProgress: (id: string, progress: number) => void;\n registerNavigationContainer: (\n id: string,\n container: HTMLDivElement\n ) => () => void;\n\n isSubNavigationOpen: (id: string) => boolean;\n isInert: (depth: number) => boolean;\n};\n\nexport const NavigationStateContext =\n createContext<NavigationStateContextType | null>(null);\n\nexport function useNavigationState() {\n const ctx = useContext(NavigationStateContext);\n if (ctx === null) {\n throw new Error(\n \"Missing navigation state. Ensure this component is rendered within Navigation component.\"\n );\n }\n\n return ctx;\n}\n","import { type ReactNode, useCallback, useRef, useState } from \"react\";\nimport { getScrollTopFromProgress } from \"@/utils\";\nimport { NavigationStateContext } from \"./context\";\nimport type { NavScrollInfo, SubNavItem } from \"./types\";\n\nexport const NavigationState: React.FC<{ children?: ReactNode }> = ({\n children,\n}) => {\n const [openSubNavs, setOpenSubNavs] = useState<SubNavItem[]>([]);\n const navScrollRef = useRef<NavScrollInfo>({});\n const navContainersRef = useRef<Record<string, Set<HTMLDivElement>>>({});\n\n const registerNavigationContainer = useCallback(\n (id: string, container: HTMLDivElement) => {\n const progress = navScrollRef.current[id] ?? 0;\n\n container.scrollTop = getScrollTopFromProgress({\n scrollHeight: container.scrollHeight,\n clientHeight: container.clientHeight,\n progress,\n });\n\n navContainersRef.current[id] ??= new Set();\n navContainersRef.current[id].add(container);\n\n return () => {\n navContainersRef.current[id]?.delete(container);\n\n if (navContainersRef.current[id]?.size === 0) {\n delete navContainersRef.current[id];\n }\n };\n },\n []\n );\n\n const openSubNavigation = useCallback((id: string, depth: number) => {\n setOpenSubNavs((prev) => [\n ...prev.filter((item) => item.depth < depth),\n { id, depth },\n ]);\n }, []);\n\n const closeSubNavigation = useCallback(\n (id: string) => {\n const item = openSubNavs.find((x) => x.id === id);\n if (!item) {\n return;\n }\n\n const removedItems = openSubNavs.filter(\n (x) => x.depth >= item.depth\n );\n for (const removedItem of removedItems) {\n delete navScrollRef.current[removedItem.id];\n }\n\n setOpenSubNavs((prev) => prev.filter((x) => x.depth < item.depth));\n },\n [openSubNavs]\n );\n\n const saveNavigationScrollTopProgress = useCallback(\n (id: string, progress: number) => {\n navScrollRef.current[id] = progress;\n\n const containers = navContainersRef.current[id];\n\n if (!containers) {\n return;\n }\n\n for (const container of containers) {\n const targetScrollTop = getScrollTopFromProgress({\n scrollHeight: container.scrollHeight,\n clientHeight: container.clientHeight,\n progress,\n });\n\n if (Math.abs(container.scrollTop - targetScrollTop) > 1) {\n container.scrollTop = targetScrollTop;\n }\n }\n },\n []\n );\n\n const isSubNavigationOpen = useCallback(\n (id: string) => {\n return openSubNavs.some((item) => item.id === id);\n },\n [openSubNavs]\n );\n\n const isInert = useCallback(\n (depth: number) => {\n const activeDepth = openSubNavs[openSubNavs.length - 1]?.depth ?? 0;\n\n return depth < activeDepth;\n },\n [openSubNavs]\n );\n\n return (\n <NavigationStateContext\n value={{\n openSubNavigation,\n closeSubNavigation,\n saveNavigationScrollTopProgress,\n registerNavigationContainer,\n isSubNavigationOpen,\n isInert,\n }}\n >\n {children}\n </NavigationStateContext>\n );\n};\n"],"mappings":";;;AAAA,SAAgB,EAAkB,EAC9B,iBACA,cACA,mBAKO;CACP,IAAM,IAAe,IAAe;CACpC,OAAO,KAAgB,IAAI,IAAI,IAAY;AAC/C;AACA,SAAgB,EAAyB,EACrC,iBACA,aACA,mBAKO;CAEP,OAAO,KADc,IAAe;AAExC;;;ACRA,IAAa,IACT,EAAiD,IAAI;AAEzD,
|
|
1
|
+
{"version":3,"file":"NavigationState","names":["id","item","x","prev","progress","container","depth"],"sources":["../../src/utils/scroll/scroll.ts","../../src/components/Navigation/NavigationState/context.ts","../../src/components/Navigation/NavigationState/NavigationState.tsx"],"sourcesContent":["export function getScrollProgress({\n scrollHeight,\n scrollTop,\n clientHeight,\n}: {\n scrollTop: number;\n scrollHeight: number;\n clientHeight: number;\n}): number {\n const maxScrollTop = scrollHeight - clientHeight;\n return maxScrollTop <= 0 ? 0 : scrollTop / maxScrollTop;\n}\nexport function getScrollTopFromProgress({\n scrollHeight,\n progress,\n clientHeight,\n}: {\n progress: number;\n scrollHeight: number;\n clientHeight: number;\n}): number {\n const maxScrollTop = scrollHeight - clientHeight;\n return progress * maxScrollTop;\n}\n","import { createContext, useContext } from \"react\";\n\nexport type NavigationStateContextType = {\n openSubNavigation: (id: string, depth: number) => void;\n closeSubNavigation: (id: string) => void;\n saveNavigationScrollTopProgress: (id: string, progress: number) => void;\n registerNavigationContainer: (\n id: string,\n container: HTMLDivElement\n ) => () => void;\n\n isSubNavigationOpen: (id: string) => boolean;\n isInert: (depth: number) => boolean;\n};\n\nexport const NavigationStateContext =\n createContext<NavigationStateContextType | null>(null);\n\nexport function useNavigationState() {\n const ctx = useContext(NavigationStateContext);\n if (ctx === null) {\n throw new Error(\n \"Missing navigation state. Ensure this component is rendered within Navigation component.\"\n );\n }\n\n return ctx;\n}\n","import { type ReactNode, useCallback, useRef, useState } from \"react\";\nimport { getScrollTopFromProgress } from \"@/utils\";\nimport { NavigationStateContext } from \"./context\";\nimport type { NavScrollInfo, SubNavItem } from \"./types\";\n\nexport const NavigationState: React.FC<{ children?: ReactNode }> = ({\n children,\n}) => {\n const [openSubNavs, setOpenSubNavs] = useState<SubNavItem[]>([]);\n const navScrollRef = useRef<NavScrollInfo>({});\n const navContainersRef = useRef<Record<string, Set<HTMLDivElement>>>({});\n\n const registerNavigationContainer = useCallback(\n (id: string, container: HTMLDivElement) => {\n const progress = navScrollRef.current[id] ?? 0;\n\n container.scrollTop = getScrollTopFromProgress({\n scrollHeight: container.scrollHeight,\n clientHeight: container.clientHeight,\n progress,\n });\n\n navContainersRef.current[id] ??= new Set();\n navContainersRef.current[id].add(container);\n\n return () => {\n navContainersRef.current[id]?.delete(container);\n\n if (navContainersRef.current[id]?.size === 0) {\n delete navContainersRef.current[id];\n }\n };\n },\n []\n );\n\n const openSubNavigation = useCallback((id: string, depth: number) => {\n setOpenSubNavs((prev) => [\n ...prev.filter((item) => item.depth < depth),\n { id, depth },\n ]);\n }, []);\n\n const closeSubNavigation = useCallback(\n (id: string) => {\n const item = openSubNavs.find((x) => x.id === id);\n if (!item) {\n return;\n }\n\n const removedItems = openSubNavs.filter(\n (x) => x.depth >= item.depth\n );\n for (const removedItem of removedItems) {\n delete navScrollRef.current[removedItem.id];\n }\n\n setOpenSubNavs((prev) => prev.filter((x) => x.depth < item.depth));\n },\n [openSubNavs]\n );\n\n const saveNavigationScrollTopProgress = useCallback(\n (id: string, progress: number) => {\n navScrollRef.current[id] = progress;\n\n const containers = navContainersRef.current[id];\n\n if (!containers) {\n return;\n }\n\n for (const container of containers) {\n const targetScrollTop = getScrollTopFromProgress({\n scrollHeight: container.scrollHeight,\n clientHeight: container.clientHeight,\n progress,\n });\n\n if (Math.abs(container.scrollTop - targetScrollTop) > 1) {\n container.scrollTop = targetScrollTop;\n }\n }\n },\n []\n );\n\n const isSubNavigationOpen = useCallback(\n (id: string) => {\n return openSubNavs.some((item) => item.id === id);\n },\n [openSubNavs]\n );\n\n const isInert = useCallback(\n (depth: number) => {\n const activeDepth = openSubNavs[openSubNavs.length - 1]?.depth ?? 0;\n\n return depth < activeDepth;\n },\n [openSubNavs]\n );\n\n return (\n <NavigationStateContext\n value={{\n openSubNavigation,\n closeSubNavigation,\n saveNavigationScrollTopProgress,\n registerNavigationContainer,\n isSubNavigationOpen,\n isInert,\n }}\n >\n {children}\n </NavigationStateContext>\n );\n};\n"],"mappings":";;;AAAA,SAAgB,EAAkB,EAC9B,iBACA,cACA,mBAKO;CACP,IAAM,IAAe,IAAe;CACpC,OAAO,KAAgB,IAAI,IAAI,IAAY;AAC/C;AACA,SAAgB,EAAyB,EACrC,iBACA,aACA,mBAKO;CAEP,OAAO,KADc,IAAe;AAExC;;;ACRA,IAAa,IACT,EAAiD,IAAI;AAEzD,SAAO,IAAA;CACH,IAAA,IAAY,EAAW,CAAsB;CAC7C,IAAI,MAAQ,MACR,MAAU,MACN,0FACJ;CACH,OAEM;AAAG;;;ACrBd,IAAa,KAAuD,EAChE,kBACE;CACF,IAAM,CAAC,GAAa,KAAkB,EAAuB,CAAA,CAAE,GACzD,IAAe,EAAsB,CAAC,CAAC,GACvC,IAAmB,EAA4C,CAAC,CAAC,GAEjE,IAA8B,GAC/B,GAAY,MAA8B;EACvC,IAAM,IAAW,EAAa,QAAQ,MAAO;EAW7C,OATA,EAAU,YAAY,EAAyB;GAC3C,cAAc,EAAU;GACxB,cAAc,EAAU;GACxB;EACJ,CAAC,GAED,EAAiB,QAAQ,uBAAQ,IAAI,IAAI,GACzC,EAAiB,QAAQ,EAAG,CAAC,IAAI,CAAS,SAE7B;GAGT,AAFA,EAAiB,QAAQ,EAAG,EAAE,OAAO,CAAS,GAE1C,EAAiB,QAAQ,EAAG,EAAE,SAAS,KACvC,OAAO,EAAiB,QAAQ;EAExC;CACJ,GACA,CAAA,CACJ;CAqEA,OACI,kBAAC,GAAD;EACI,OAAO;GACH,mBAtEc,GAAaA,GAAY,MAAkB;IACjE,GAAgB,MAAS,CACrB,GAAG,EAAK,QAAQ,MAAS,EAAK,QAAQ,CAAK,GAC3C;KAAE,IAAAA;KAAI;IAAM,CAAC,CAChB;GACL,GAAG,CAAA,CAiES;GACA,oBAhEe,GACtBA,MAAe;IACZ,IAAMC,IAAO,EAAY,MAAM,MAAM,EAAE,OAAOD,CAAE;IAChD,IAAI,CAACC,GACD;IAGJ,IAAM,IAAe,EAAY,QAC5BC,MAAMA,EAAE,SAASD,EAAK,KAC3B;IACA,KAAK,IAAM,KAAe,GACtB,OAAO,EAAa,QAAQ,EAAY;IAG5C,GAAgBE,MAASA,EAAK,QAAQD,MAAMA,EAAE,QAAQD,EAAK,KAAK,CAAC;GACrE,GACA,CAAC,CAAW,CAgDJ;GACA,iCA9C4B,GACnCD,GAAYI,MAAqB;IAC9B,EAAa,QAAQJ,KAAMI;IAE3B,IAAM,IAAa,EAAiB,QAAQJ;IAEvC,OAIL,KAAK,IAAMK,KAAa,GAAY;KAChC,IAAM,IAAkB,EAAyB;MAC7C,cAAcA,EAAU;MACxB,cAAcA,EAAU;MACxB,UAAAD;KACJ,CAAC;KAED,AAAI,KAAK,IAAIC,EAAU,YAAY,CAAe,IAAI,MAClDA,EAAU,YAAY;IAE9B;GACJ,GACA,CAAA,CAwBQ;GACA;GACA,qBAvBgB,GACvBL,MACU,EAAY,MAAMC,MAASA,EAAK,OAAOD,CAAE,GAEpD,CAAC,CAAW,CAmBJ;GACA,SAjBI,GACXM,MAGUA,KAFa,EAAY,EAAY,SAAS,EAAE,EAAE,SAAS,IAItE,CAAC,CAAW,CAWJ;EACJ;EAEC;CACmB,CAAA;AAEhC"}
|
package/dist/chunks/Popover
CHANGED
|
@@ -1,11 +1,20 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { t as e } from "./compiler-runtime";
|
|
2
|
+
import t from "clsx";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
import { Popover as r } from "react-aria-components";
|
|
5
|
+
import '../assets/Popover.css';//#region src/components/Popover/popover.module.css
|
|
6
|
+
var i = e(), a = { popover: "_popover_gsd0s_2" }, o = (e) => {
|
|
7
|
+
let o = (0, i.c)(8), s, c;
|
|
8
|
+
o[0] === e ? (s = o[1], c = o[2]) : ({className: s, ...c} = e, o[0] = e, o[1] = s, o[2] = c);
|
|
9
|
+
let l;
|
|
10
|
+
o[3] === s ? l = o[4] : (l = (e) => t(a.popover, typeof s == "function" ? s(e) : s), o[3] = s, o[4] = l);
|
|
11
|
+
let u;
|
|
12
|
+
return o[5] !== c || o[6] !== l ? (u = /* @__PURE__ */ n(r, {
|
|
13
|
+
className: l,
|
|
14
|
+
...c
|
|
15
|
+
}), o[5] = c, o[6] = l, o[7] = u) : u = o[7], u;
|
|
16
|
+
};
|
|
8
17
|
//#endregion
|
|
9
|
-
export {
|
|
18
|
+
export { o as t };
|
|
10
19
|
|
|
11
20
|
//# sourceMappingURL=Popover.map
|
package/dist/chunks/Popover.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover","names":[],"sources":["../../src/components/Popover/popover.module.css","../../src/components/Popover/Popover.tsx"],"sourcesContent":["@layer adgytec.comps {\n .popover {\n --_offset: calc(4 * var(--dp, 1px));\n\n transform: translate3d(0, 0, 0);\n transition:\n transform var(--md-sys-motion-expressive-fast-spatial)\n var(--md-sys-motion-expressive-fast-spatial-duration),\n opacity var(--md-sys-motion-expressive-fast-effects)\n var(--md-sys-motion-expressive-fast-effects-duration);\n\n &[data-placement=\"bottom\"] {\n --_origin: translateY(calc(-1 * var(--_offset)));\n }\n\n &[data-placement=\"top\"] {\n --_origin: translateY(var(--_offset));\n }\n\n &[data-placement=\"right\"] {\n --_origin: translateX(calc(-1 * var(--_offset)));\n }\n\n &[data-placement=\"left\"] {\n --_origin: translateX(var(--_offset));\n }\n\n &[data-entering],\n &[data-exiting] {\n transform: var(--_origin);\n opacity: 0;\n }\n }\n}\n","import clsx from \"clsx\";\nimport { Popover as AriaPopover } from \"react-aria-components\";\nimport styles from \"./popover.module.css\";\n\nexport const Popover: React.FC<\n React.ComponentPropsWithRef<typeof AriaPopover>\n> = ({ className, ...props }) => {\n return (\n <AriaPopover\n className={(renderProps) =>\n clsx(\n styles[\"popover\"],\n typeof className === \"function\"\n ? className(renderProps)\n : className\n )\n }\n {...props}\n />\n );\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Popover","names":[],"sources":["../../src/components/Popover/popover.module.css","../../src/components/Popover/Popover.tsx"],"sourcesContent":["@layer adgytec.comps {\n .popover {\n --_offset: calc(4 * var(--dp, 1px));\n\n transform: translate3d(0, 0, 0);\n transition:\n transform var(--md-sys-motion-expressive-fast-spatial)\n var(--md-sys-motion-expressive-fast-spatial-duration),\n opacity var(--md-sys-motion-expressive-fast-effects)\n var(--md-sys-motion-expressive-fast-effects-duration);\n\n &[data-placement=\"bottom\"] {\n --_origin: translateY(calc(-1 * var(--_offset)));\n }\n\n &[data-placement=\"top\"] {\n --_origin: translateY(var(--_offset));\n }\n\n &[data-placement=\"right\"] {\n --_origin: translateX(calc(-1 * var(--_offset)));\n }\n\n &[data-placement=\"left\"] {\n --_origin: translateX(var(--_offset));\n }\n\n &[data-entering],\n &[data-exiting] {\n transform: var(--_origin);\n opacity: 0;\n }\n }\n}\n","import clsx from \"clsx\";\nimport { Popover as AriaPopover } from \"react-aria-components\";\nimport styles from \"./popover.module.css\";\n\nexport const Popover: React.FC<\n React.ComponentPropsWithRef<typeof AriaPopover>\n> = ({ className, ...props }) => {\n return (\n <AriaPopover\n className={(renderProps) =>\n clsx(\n styles[\"popover\"],\n typeof className === \"function\"\n ? className(renderProps)\n : className\n )\n }\n {...props}\n />\n );\n};\n"],"mappings":";;;;;kDCIa,KAET,MAAA;CAAA,IAAA,KAAA,GAAA,EAAA,EAAA,CAAA,CAAA,GAAA,GAAA;CAAA,AAAA,EAAA,OAAA,KAAwB,IAAA,EAAA,IAAA,IAAA,EAAA,OAAvB,kBAAA,KAAA,GAAuB,EAAA,KAAA,GAAA,EAAA,KAAA,GAAA,EAAA,KAAA;CAAA,IAAA;CAAA,AAAA,EAAA,OAAA,IASX,IAAA,EAAA,MANM,KAAA,MACP,EACI,EAAM,SACN,OAAO,KAAc,aACf,EAAU,CACF,IAFd,CAGJ,GAAC,EAAA,KAAA,GAAA,EAAA,KAAA;CAAA,IAAA;CAGP,OAHO,EAAA,OAAA,KAAA,EAAA,OAAA,KAPT,IAAA,kBAAC,GAAD;EACe,WAAA;EAMN,GAED;CAAK,CAAA,GACX,EAAA,KAAA,GAAA,EAAA,KAAA,GAAA,EAAA,KAAA,KAAA,IAAA,EAAA,IAVF;AAUE"}
|
package/dist/chunks/Radio
CHANGED
|
@@ -1,77 +1,84 @@
|
|
|
1
|
-
import { t as e } from "./
|
|
2
|
-
import { t } from "./
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
1
|
+
import { t as e } from "./compiler-runtime";
|
|
2
|
+
import { t } from "./tapTarget";
|
|
3
|
+
import { t as n } from "./base";
|
|
4
|
+
import { Description as r } from "../components/Input/Description/index.js";
|
|
5
|
+
import { t as i } from "./FieldError";
|
|
6
|
+
import { Label as a } from "../components/Input/Label/index.js";
|
|
7
|
+
import { clsx as o } from "clsx";
|
|
8
|
+
import { createContext as s, useContext as c } from "react";
|
|
9
|
+
import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
10
|
+
import { Radio as f, RadioGroup as p } from "react-aria-components";
|
|
10
11
|
import '../assets/Radio.css';//#region src/components/Input/Radio/context.ts
|
|
11
|
-
var
|
|
12
|
+
var m = e(), h = s({}), g = {
|
|
12
13
|
"radio-group": "_radio-group_12t9w_15",
|
|
13
14
|
"radio-items": "_radio-items_12t9w_58",
|
|
14
15
|
radio: "_radio_12t9w_15",
|
|
15
16
|
"state-layer": "_state-layer_12t9w_149",
|
|
16
17
|
indicator: "_indicator_12t9w_169",
|
|
17
18
|
"indicator-icon": "_indicator-icon_12t9w_252"
|
|
18
|
-
},
|
|
19
|
-
let
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
}, _ = (e) => {
|
|
20
|
+
let r = (0, m.c)(17), i, a, s, p, _;
|
|
21
|
+
r[0] === e ? (i = r[1], a = r[2], s = r[3], p = r[4], _ = r[5]) : ({className: a, children: i, labelPlacement: p, containerStateLayer: s, ..._} = e, r[0] = e, r[1] = i, r[2] = a, r[3] = s, r[4] = p, r[5] = _);
|
|
22
|
+
let { labelPlacement: v, containerStateLayer: y } = c(h), b = p ?? v ?? "end", x = s ?? y ?? !1, S;
|
|
23
|
+
r[6] !== a || r[7] !== x ? (S = (e) => o(g.radio, x && g["state-layer"], n.labelLarge, typeof a == "function" ? a(e) : a), r[6] = a, r[7] = x, r[8] = S) : S = r[8];
|
|
24
|
+
let C;
|
|
25
|
+
r[9] !== i || r[10] !== b || r[11] !== x ? (C = (e) => {
|
|
26
|
+
let { isSelected: n, isHovered: r, isDisabled: a, isFocused: s, isFocusVisible: c, isPressed: f, isInvalid: p } = e, m = {
|
|
27
|
+
"data-selected": n || void 0,
|
|
28
|
+
"data-hovered": r || void 0,
|
|
29
|
+
"data-disabled": a || void 0,
|
|
30
|
+
"data-focused": s || void 0,
|
|
31
|
+
"data-focus-visible": c || void 0,
|
|
32
|
+
"data-pressed": f || void 0,
|
|
33
|
+
"data-show-state-layer": !x || void 0,
|
|
34
|
+
"data-invalid": p || void 0
|
|
35
|
+
}, h = typeof i == "function" ? i(e) : i;
|
|
36
|
+
return /* @__PURE__ */ d(l, { children: [
|
|
37
|
+
b === "start" && h,
|
|
38
|
+
/* @__PURE__ */ u("span", {
|
|
39
|
+
className: o(g.indicator, t),
|
|
40
|
+
...m,
|
|
41
|
+
children: /* @__PURE__ */ u("span", {
|
|
42
|
+
className: o(g["indicator-icon"]),
|
|
43
|
+
...m
|
|
44
|
+
})
|
|
45
|
+
}),
|
|
46
|
+
b === "end" && h
|
|
47
|
+
] });
|
|
48
|
+
}, r[9] = i, r[10] = b, r[11] = x, r[12] = C) : C = r[12];
|
|
49
|
+
let w;
|
|
50
|
+
return r[13] !== _ || r[14] !== S || r[15] !== C ? (w = /* @__PURE__ */ u(f, {
|
|
51
|
+
className: S,
|
|
52
|
+
..._,
|
|
23
53
|
"data-radio": !0,
|
|
24
|
-
children:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"data-hovered": i || void 0,
|
|
28
|
-
"data-disabled": o || void 0,
|
|
29
|
-
"data-focused": s || void 0,
|
|
30
|
-
"data-focus-visible": d || void 0,
|
|
31
|
-
"data-pressed": f || void 0,
|
|
32
|
-
"data-show-state-layer": !v || void 0,
|
|
33
|
-
"data-invalid": p || void 0
|
|
34
|
-
}, g = typeof r == "function" ? r(t) : r;
|
|
35
|
-
return /* @__PURE__ */ u(c, { children: [
|
|
36
|
-
_ === "start" && g,
|
|
37
|
-
/* @__PURE__ */ l("span", {
|
|
38
|
-
className: a(m.indicator, e),
|
|
39
|
-
...h,
|
|
40
|
-
children: /* @__PURE__ */ l("span", {
|
|
41
|
-
className: a(m["indicator-icon"]),
|
|
42
|
-
...h
|
|
43
|
-
})
|
|
44
|
-
}),
|
|
45
|
-
_ === "end" && g
|
|
46
|
-
] });
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
}, g = ({ label: e, description: t, errorMessage: o, showDescriptionOnInvalid: s = !1, children: d, className: h, radioItemsGap: g = 24, labelPlacement: _, containerStateLayer: v, ...y }) => /* @__PURE__ */ l(p, {
|
|
54
|
+
children: C
|
|
55
|
+
}), r[13] = _, r[14] = S, r[15] = C, r[16] = w) : w = r[16], w;
|
|
56
|
+
}, v = ({ label: e, description: t, errorMessage: n, showDescriptionOnInvalid: s = !1, children: c, className: f, radioItemsGap: m = 24, labelPlacement: _, containerStateLayer: v, ...y }) => /* @__PURE__ */ u(h, {
|
|
50
57
|
value: {
|
|
51
58
|
labelPlacement: _,
|
|
52
59
|
containerStateLayer: v
|
|
53
60
|
},
|
|
54
|
-
children: /* @__PURE__ */
|
|
55
|
-
className: (e) =>
|
|
61
|
+
children: /* @__PURE__ */ u(p, {
|
|
62
|
+
className: (e) => o(g["radio-group"], typeof f == "function" ? f(e) : f),
|
|
56
63
|
...y,
|
|
57
64
|
"data-radio-group": !0,
|
|
58
65
|
children: ({ orientation: f, isInvalid: p }) => {
|
|
59
66
|
let h = t && (!p || p && s);
|
|
60
|
-
return /* @__PURE__ */
|
|
61
|
-
e && /* @__PURE__ */
|
|
62
|
-
/* @__PURE__ */
|
|
67
|
+
return /* @__PURE__ */ d(l, { children: [
|
|
68
|
+
e && /* @__PURE__ */ u(a, { children: e }),
|
|
69
|
+
/* @__PURE__ */ u("div", {
|
|
63
70
|
"data-orientation": f,
|
|
64
|
-
className:
|
|
65
|
-
style: { gap: `calc(${
|
|
66
|
-
children:
|
|
71
|
+
className: o(g["radio-items"]),
|
|
72
|
+
style: { gap: `calc(${m} * var(--dp, 1px))` },
|
|
73
|
+
children: c
|
|
67
74
|
}),
|
|
68
|
-
h && /* @__PURE__ */
|
|
69
|
-
/* @__PURE__ */
|
|
75
|
+
h && /* @__PURE__ */ u(r, { children: t }),
|
|
76
|
+
/* @__PURE__ */ u(i, { children: n })
|
|
70
77
|
] });
|
|
71
78
|
}
|
|
72
79
|
})
|
|
73
80
|
});
|
|
74
81
|
//#endregion
|
|
75
|
-
export {
|
|
82
|
+
export { _ as n, v as t };
|
|
76
83
|
|
|
77
84
|
//# sourceMappingURL=Radio.map
|