@adgytec/adgytec-web-ui-components 2.1.9 → 2.3.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/dist/assets/AppBarHeadline.css +1 -1
- package/dist/assets/Card.css +1 -0
- package/dist/assets/CardIcon.css +1 -0
- package/dist/assets/ConnectedButtonGroup.css +1 -1
- package/dist/assets/GridBackgroundDecorator.css +1 -0
- package/dist/assets/ListAvatar.css +1 -0
- package/dist/assets/ListBox.css +1 -0
- package/dist/assets/ListIcon.css +1 -0
- package/dist/assets/ListItem.css +1 -0
- package/dist/assets/ListLabelText.css +1 -0
- package/dist/assets/ListMedia.css +1 -0
- package/dist/assets/ListOverlineText.css +1 -0
- package/dist/assets/ListSupportingText.css +1 -0
- package/dist/assets/NavigationScrollContainer.css +1 -1
- package/dist/assets/RadialGlowDecorator.css +1 -0
- package/dist/assets/Snackbar.css +1 -1
- package/dist/assets/index.css +1 -0
- package/dist/chunks/AppBarHeadline +2 -2
- package/dist/chunks/AppBarHeadline.map +1 -1
- package/dist/chunks/Card +22 -0
- package/dist/chunks/Card.map +1 -0
- package/dist/chunks/CardIcon +23 -0
- package/dist/chunks/CardIcon.map +1 -0
- package/dist/chunks/ConnectedButtonGroup +6 -6
- package/dist/chunks/ConnectedButtonGroup.map +1 -1
- package/dist/chunks/GridBackgroundDecorator +16 -0
- package/dist/chunks/GridBackgroundDecorator.map +1 -0
- package/dist/chunks/ListAvatar +20 -0
- package/dist/chunks/ListAvatar.map +1 -0
- package/dist/chunks/ListBox +16 -0
- package/dist/chunks/ListBox.map +1 -0
- package/dist/chunks/ListIcon +21 -0
- package/dist/chunks/ListIcon.map +1 -0
- package/dist/chunks/ListItem +63 -0
- package/dist/chunks/ListItem.map +1 -0
- package/dist/chunks/ListLabelText +22 -0
- package/dist/chunks/ListLabelText.map +1 -0
- package/dist/chunks/ListMedia +15 -0
- package/dist/chunks/ListMedia.map +1 -0
- package/dist/chunks/ListOverlineText +21 -0
- package/dist/chunks/ListOverlineText.map +1 -0
- package/dist/chunks/ListSupportingText +22 -0
- package/dist/chunks/ListSupportingText.map +1 -0
- package/dist/chunks/Navigation +20 -20
- package/dist/chunks/NavigationScrollContainer +45 -32
- package/dist/chunks/NavigationScrollContainer.map +1 -1
- package/dist/chunks/RadialGlowDecorator +110 -0
- package/dist/chunks/RadialGlowDecorator.map +1 -0
- package/dist/chunks/Snackbar +18 -27
- package/dist/chunks/Snackbar.map +1 -1
- package/dist/chunks/types +6 -0
- package/dist/chunks/types.map +1 -0
- package/dist/components/Card/Card/Card.d.ts +2 -0
- package/dist/components/Card/Card/index.d.ts +2 -0
- package/dist/components/Card/Card/index.js +3 -0
- package/dist/components/Card/Card/types.d.ts +7 -0
- package/dist/components/Card/CardIcon/CardIcon.d.ts +2 -0
- package/dist/components/Card/CardIcon/index.d.ts +1 -0
- package/dist/components/Card/CardIcon/index.js +2 -0
- package/dist/components/Card/index.d.ts +2 -0
- package/dist/components/Card/index.js +4 -0
- package/dist/components/Decorators/GridBackgroundDecorator/GridBackgroundDecorator.d.ts +14 -0
- package/dist/components/Decorators/GridBackgroundDecorator/index.d.ts +1 -0
- package/dist/components/Decorators/GridBackgroundDecorator/index.js +2 -0
- package/dist/components/Decorators/RadialGlowDecorator/RadialGlowDecorator.d.ts +12 -0
- package/dist/components/Decorators/RadialGlowDecorator/index.d.ts +1 -0
- package/dist/components/Decorators/RadialGlowDecorator/index.js +2 -0
- package/dist/components/Decorators/index.d.ts +2 -0
- package/dist/components/Decorators/index.js +3 -0
- package/dist/components/List/ListAction/ListAction.d.ts +2 -0
- package/dist/components/List/ListAction/index.d.ts +1 -0
- package/dist/components/List/ListAction/index.js +0 -0
- package/dist/components/List/ListAvatar/ListAvatar.d.ts +1 -0
- package/dist/components/List/ListAvatar/index.d.ts +1 -0
- package/dist/components/List/ListAvatar/index.js +2 -0
- package/dist/components/List/ListBox/ListBox.d.ts +2 -0
- package/dist/components/List/ListBox/index.d.ts +2 -0
- package/dist/components/List/ListBox/index.js +2 -0
- package/dist/components/List/ListBox/types.d.ts +5 -0
- package/dist/components/List/ListIcon/ListIcon.d.ts +2 -0
- package/dist/components/List/ListIcon/index.d.ts +1 -0
- package/dist/components/List/ListIcon/index.js +2 -0
- package/dist/components/List/ListItem/ListItem.d.ts +2 -0
- package/dist/components/List/ListItem/index.d.ts +2 -0
- package/dist/components/List/ListItem/index.js +2 -0
- package/dist/components/List/ListItem/types.d.ts +9 -0
- package/dist/components/List/ListLabelText/ListLabelText.d.ts +2 -0
- package/dist/components/List/ListLabelText/index.d.ts +1 -0
- package/dist/components/List/ListLabelText/index.js +2 -0
- package/dist/components/List/ListMedia/ListMedia.d.ts +2 -0
- package/dist/components/List/ListMedia/index.d.ts +2 -0
- package/dist/components/List/ListMedia/index.js +2 -0
- package/dist/components/List/ListMedia/types.d.ts +10 -0
- package/dist/components/List/ListOverlineText/ListOverlineText.d.ts +2 -0
- package/dist/components/List/ListOverlineText/index.d.ts +1 -0
- package/dist/components/List/ListOverlineText/index.js +2 -0
- package/dist/components/List/ListSupportingText/ListSupportingText.d.ts +2 -0
- package/dist/components/List/ListSupportingText/index.d.ts +1 -0
- package/dist/components/List/ListSupportingText/index.js +2 -0
- package/dist/components/List/ListTrailingText/ListTrailingText.d.ts +2 -0
- package/dist/components/List/ListTrailingText/index.d.ts +1 -0
- package/dist/components/List/ListTrailingText/index.js +0 -0
- package/dist/components/List/index.d.ts +10 -0
- package/dist/components/List/index.js +9 -0
- package/dist/components/Navigation/NavigationState/context.d.ts +1 -1
- package/dist/components/Navigation/NavigationState/index.js +61 -2
- package/dist/components/Navigation/NavigationState/index.js.map +1 -0
- package/dist/components/Navigation/SubNavigation/SubNavigation/index.js +4 -4
- package/dist/components/Navigation/SubNavigation/SubNavigationTrigger/index.js +5 -5
- package/dist/components/Navigation/index.js +2 -2
- package/dist/index.d.ts +3 -0
- package/dist/index.js +162 -113
- package/dist/index.js.map +1 -1
- package/dist/utils/gradients/gradients.d.ts +17 -0
- package/dist/utils/gradients/index.d.ts +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/chunks/NavigationState +0 -69
- package/dist/chunks/NavigationState.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,128 +1,177 @@
|
|
|
1
1
|
import { AppBarState as e, AppBarStateContext as t } from "./components/AppBar/AppBarState/index.js";
|
|
2
|
-
import {
|
|
3
|
-
import { n as
|
|
4
|
-
import { i as
|
|
5
|
-
import { t as
|
|
6
|
-
import { AppBarContext as
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import { n as
|
|
11
|
-
import { a as
|
|
12
|
-
import { ButtonGroupContext as
|
|
13
|
-
import { t as
|
|
14
|
-
import { t as
|
|
15
|
-
import { t as
|
|
16
|
-
import { t as
|
|
17
|
-
import { t as
|
|
18
|
-
import { RichTooltipSubhead as
|
|
19
|
-
import { RichTooltipText as
|
|
20
|
-
import { t as
|
|
21
|
-
import { TooltipTrigger as
|
|
22
|
-
import { Button as
|
|
23
|
-
import { IconButton as
|
|
24
|
-
import { LinkButton as
|
|
25
|
-
import { LinkIconButton as
|
|
26
|
-
import { a as
|
|
27
|
-
import { t as
|
|
28
|
-
import { SplitButtonPrimary as
|
|
29
|
-
import { t as
|
|
30
|
-
import { ToggleButton as
|
|
31
|
-
import { ToggleIconButton as
|
|
32
|
-
import { t as
|
|
33
|
-
import { t as
|
|
34
|
-
import { t as
|
|
2
|
+
import { n, r } from "./chunks/NavigationScrollContainer";
|
|
3
|
+
import { n as ee, t as te } from "./chunks/tapTarget";
|
|
4
|
+
import { i as ne, n as i, r as a, t as o } from "./chunks/ThemeSelector";
|
|
5
|
+
import { t as s } from "./chunks/base";
|
|
6
|
+
import { AppBarContext as c, AppBarHeadlineBlockSize as l, AppBarHeadlineTypography as u, useAppBarContext as d } from "./components/AppBar/core/index.js";
|
|
7
|
+
import { t as f } from "./chunks/AppBar";
|
|
8
|
+
import { t as p } from "./chunks/Icon";
|
|
9
|
+
import { t as m } from "./chunks/Loader";
|
|
10
|
+
import { n as h, t as g } from "./chunks/useSplash";
|
|
11
|
+
import { a as _, c as v, d as y, f as b, i as x, l as S, n as C, o as w, p as T, r as E, s as D, t as O, u as k } from "./chunks/core";
|
|
12
|
+
import { ButtonGroupContext as A, ConnectedButtonGroupContext as j, useButtonGroupContext as M, useConnectedButtonGroupContext as N } from "./components/Button/ButtonGroups/ButtonGroupContext/index.js";
|
|
13
|
+
import { t as P } from "./chunks/ButtonGroup";
|
|
14
|
+
import { t as F } from "./chunks/ConnectedButtonGroup";
|
|
15
|
+
import { t as I } from "./chunks/RichTooltip";
|
|
16
|
+
import { t as L } from "./chunks/RichTooltipActions";
|
|
17
|
+
import { t as R } from "./chunks/RichTooltipInfo";
|
|
18
|
+
import { RichTooltipSubhead as z } from "./components/Tooltip/RichTooltip/RichTooltipInfo/RichTooltipSubhead/index.js";
|
|
19
|
+
import { RichTooltipText as B } from "./components/Tooltip/RichTooltip/RichTooltipInfo/RichTooltipText/index.js";
|
|
20
|
+
import { t as V } from "./chunks/Tooltip";
|
|
21
|
+
import { TooltipTrigger as H } from "./components/Tooltip/TooltipTrigger/index.js";
|
|
22
|
+
import { Button as U } from "./components/Button/Button/index.js";
|
|
23
|
+
import { IconButton as W } from "./components/Button/IconButton/index.js";
|
|
24
|
+
import { LinkButton as G } from "./components/Button/LinkButton/index.js";
|
|
25
|
+
import { LinkIconButton as K } from "./components/Button/LinkIconButton/index.js";
|
|
26
|
+
import { a as q, i as J, n as Y, r as X, t as Z } from "./chunks/core2";
|
|
27
|
+
import { t as re } from "./chunks/SplitButton";
|
|
28
|
+
import { SplitButtonPrimary as ie } from "./components/Button/SplitButton/SplitButtonPrimary/index.js";
|
|
29
|
+
import { t as ae } from "./chunks/SplitButtonTrigger";
|
|
30
|
+
import { ToggleButton as oe } from "./components/Button/ToggleButton/index.js";
|
|
31
|
+
import { ToggleIconButton as se } from "./components/Button/ToggleIconButton/index.js";
|
|
32
|
+
import { t as ce } from "./chunks/AppBarAction";
|
|
33
|
+
import { t as le } from "./chunks/AppBarAvatar";
|
|
34
|
+
import { t as ue } from "./chunks/AppBarHeadline";
|
|
35
35
|
import "./components/AppBar/index.js";
|
|
36
|
-
import { Calendar as
|
|
37
|
-
import { RangeCalendar as
|
|
38
|
-
import {
|
|
39
|
-
import { t as
|
|
40
|
-
import { t as
|
|
41
|
-
import
|
|
42
|
-
import { t as
|
|
43
|
-
import {
|
|
44
|
-
import
|
|
45
|
-
import {
|
|
46
|
-
import { t as
|
|
47
|
-
import { t as
|
|
36
|
+
import { Calendar as de } from "./components/Calendar/Calendar/index.js";
|
|
37
|
+
import { RangeCalendar as fe } from "./components/Calendar/RangeCalendar/index.js";
|
|
38
|
+
import { t as pe } from "./chunks/Card";
|
|
39
|
+
import { n as me, t as he } from "./chunks/types";
|
|
40
|
+
import { t as ge } from "./chunks/CardIcon";
|
|
41
|
+
import "./components/Card/index.js";
|
|
42
|
+
import { t as _e } from "./chunks/GridBackgroundDecorator";
|
|
43
|
+
import { t as ve } from "./chunks/RadialGlowDecorator";
|
|
44
|
+
import "./components/Decorators/index.js";
|
|
45
|
+
import { DialogBodyTypography as ye, DialogContext as be, DialogHeadlineTypography as xe, DialogIconSize as Se, useInDialog as Ce } from "./components/Dialog/core/index.js";
|
|
46
|
+
import { t as we } from "./chunks/Dialog";
|
|
47
|
+
import { t as Te } from "./chunks/ActionDialog";
|
|
48
|
+
import { t as Ee } from "./chunks/Modal";
|
|
49
|
+
import { t as De } from "./chunks/ModalOverlay";
|
|
50
|
+
import { DisclosureTypographyContext as Oe, useDisclosureTypographyContext as ke } from "./components/Disclosure/context/index.js";
|
|
51
|
+
import { t as Ae } from "./chunks/Disclosure";
|
|
52
|
+
import { t as je } from "./chunks/DisclosureGroup";
|
|
53
|
+
import { t as Me } from "./chunks/DisclosureHeader";
|
|
54
|
+
import { t as Ne } from "./chunks/DisclosurePanel";
|
|
48
55
|
import "./components/Disclosure/index.js";
|
|
49
|
-
import { t as
|
|
50
|
-
import { Image as
|
|
51
|
-
import { n as
|
|
52
|
-
import { Description as
|
|
53
|
-
import { t as
|
|
54
|
-
import { Label as
|
|
55
|
-
import { DateField as
|
|
56
|
-
import { t as
|
|
57
|
-
import { n as
|
|
58
|
-
import { useControllableState as
|
|
59
|
-
import { DatePicker as
|
|
60
|
-
import { DateRangePicker as
|
|
61
|
-
import { n as
|
|
62
|
-
import { t as
|
|
63
|
-
import { n as
|
|
64
|
-
import { t as
|
|
65
|
-
import { t as
|
|
66
|
-
import { t as
|
|
67
|
-
import { Select as
|
|
68
|
-
import { a as
|
|
69
|
-
import { Menu as
|
|
70
|
-
import { MenuItem as
|
|
71
|
-
import { t as
|
|
72
|
-
import { MenuSection as
|
|
73
|
-
import { MenuSectionHeader as
|
|
74
|
-
import { MenuShortcut as
|
|
75
|
-
import { MenuTrailingText as
|
|
76
|
-
import { MenuTrigger as
|
|
77
|
-
import { t as
|
|
78
|
-
import { SelectItem as
|
|
79
|
-
import { SelectList as
|
|
80
|
-
import { SelectListSection as
|
|
81
|
-
import { SelectListSectionHeader as
|
|
82
|
-
import { t as
|
|
83
|
-
import { t as
|
|
84
|
-
import { a as
|
|
85
|
-
import { t as
|
|
86
|
-
import { t as
|
|
87
|
-
import { RangeSlider as
|
|
88
|
-
import { t as
|
|
89
|
-
import { t as
|
|
90
|
-
import { TextArea as
|
|
91
|
-
import { TimeField as
|
|
92
|
-
import {
|
|
93
|
-
import {
|
|
94
|
-
import {
|
|
95
|
-
import {
|
|
96
|
-
import { t as
|
|
97
|
-
import { t as
|
|
98
|
-
import {
|
|
99
|
-
import {
|
|
56
|
+
import { t as Pe } from "./chunks/Divider";
|
|
57
|
+
import { Image as Fe } from "./components/Image/index.js";
|
|
58
|
+
import { n as Ie, t as Le } from "./chunks/Input";
|
|
59
|
+
import { Description as Re } from "./components/Input/Description/index.js";
|
|
60
|
+
import { t as ze } from "./chunks/FieldError";
|
|
61
|
+
import { Label as Be } from "./components/Input/Label/index.js";
|
|
62
|
+
import { DateField as Ve } from "./components/Input/DateField/index.js";
|
|
63
|
+
import { t as He } from "./chunks/Popover";
|
|
64
|
+
import { n as Ue, t as We } from "./chunks/Input2";
|
|
65
|
+
import { useControllableState as Ge } from "./components/Input/hooks/index.js";
|
|
66
|
+
import { DatePicker as Ke } from "./components/Input/DatePicker/DatePicker/index.js";
|
|
67
|
+
import { DateRangePicker as qe } from "./components/Input/DatePicker/DateRangePicker/index.js";
|
|
68
|
+
import { n as Je, t as Ye } from "./chunks/Radio";
|
|
69
|
+
import { t as Xe } from "./chunks/SearchField";
|
|
70
|
+
import { n as Ze, r as Qe, t as $e } from "./chunks/Tag";
|
|
71
|
+
import { t as et } from "./chunks/ComboBox";
|
|
72
|
+
import { t as tt } from "./chunks/ComboBoxPopover";
|
|
73
|
+
import { t as nt } from "./chunks/ComboBoxTrigger";
|
|
74
|
+
import { Select as rt } from "./components/Input/Select/Select/index.js";
|
|
75
|
+
import { a as it, c as at, d as Q, f as ot, i as st, l as ct, n as lt, o as ut, p as dt, r as ft, s as pt, t as mt, u as ht } from "./chunks/core6";
|
|
76
|
+
import { Menu as gt } from "./components/Menu/Menu/index.js";
|
|
77
|
+
import { MenuItem as _t } from "./components/Menu/MenuItem/index.js";
|
|
78
|
+
import { t as vt } from "./chunks/MenuPopover";
|
|
79
|
+
import { MenuSection as yt } from "./components/Menu/MenuSection/index.js";
|
|
80
|
+
import { MenuSectionHeader as bt } from "./components/Menu/MenuSectionHeader/index.js";
|
|
81
|
+
import { MenuShortcut as xt } from "./components/Menu/MenuShortcut/index.js";
|
|
82
|
+
import { MenuTrailingText as St } from "./components/Menu/MenuTrailingText/index.js";
|
|
83
|
+
import { MenuTrigger as Ct } from "./components/Menu/MenuTrigger/index.js";
|
|
84
|
+
import { t as wt } from "./chunks/SubmenuPopover";
|
|
85
|
+
import { SelectItem as Tt } from "./components/Input/Select/SelectItem/index.js";
|
|
86
|
+
import { SelectList as Et } from "./components/Input/Select/SelectList/index.js";
|
|
87
|
+
import { SelectListSection as Dt } from "./components/Input/Select/SelectListSection/index.js";
|
|
88
|
+
import { SelectListSectionHeader as Ot } from "./components/Input/Select/SelectListSectionHeader/index.js";
|
|
89
|
+
import { t as kt } from "./chunks/SelectPopover";
|
|
90
|
+
import { t as At } from "./chunks/SelectTrigger";
|
|
91
|
+
import { a as jt, c as Mt, i as Nt, n as Pt, o as Ft, r as It, s as Lt, t as Rt } from "./chunks/core7";
|
|
92
|
+
import { t as zt } from "./chunks/SliderOutput";
|
|
93
|
+
import { t as Bt } from "./chunks/CenteredSlider";
|
|
94
|
+
import { RangeSlider as Vt } from "./components/Input/Slider/RangeSlider/index.js";
|
|
95
|
+
import { t as Ht } from "./chunks/Slider";
|
|
96
|
+
import { t as Ut } from "./chunks/Switch";
|
|
97
|
+
import { TextArea as Wt } from "./components/Input/TextArea/index.js";
|
|
98
|
+
import { TimeField as Gt } from "./components/Input/TimeField/index.js";
|
|
99
|
+
import { t as Kt } from "./chunks/ListAvatar";
|
|
100
|
+
import { t as qt } from "./chunks/ListBox";
|
|
101
|
+
import { t as Jt } from "./chunks/ListIcon";
|
|
102
|
+
import { t as Yt } from "./chunks/ListItem";
|
|
103
|
+
import { t as Xt } from "./chunks/ListLabelText";
|
|
104
|
+
import { a as Zt, i as Qt, n as $t, o as en, r as tn, s as nn, t as rn } from "./chunks/ListMedia";
|
|
105
|
+
import { t as an } from "./chunks/ListOverlineText";
|
|
106
|
+
import { t as on } from "./chunks/ListSupportingText";
|
|
107
|
+
import "./components/List/index.js";
|
|
108
|
+
import { NavigationState as sn, NavigationStateContext as cn, useNavigationState as ln } from "./components/Navigation/NavigationState/index.js";
|
|
109
|
+
import { n as un, t as dn } from "./chunks/navContext";
|
|
110
|
+
import { n as fn, r as pn, t as mn } from "./chunks/Navigation";
|
|
111
|
+
import { NavigationButton as hn } from "./components/Navigation/NavigationItem/NavigationButton/index.js";
|
|
112
|
+
import { NavigationLink as gn } from "./components/Navigation/NavigationItem/NavigationLink/index.js";
|
|
113
|
+
import { t as _n } from "./chunks/NavigationSection";
|
|
114
|
+
import { t as vn } from "./chunks/NavigationSectionLabel";
|
|
115
|
+
import { SubNavigation as yn } from "./components/Navigation/SubNavigation/SubNavigation/index.js";
|
|
116
|
+
import { SubNavigationTrigger as bn } from "./components/Navigation/SubNavigation/SubNavigationTrigger/index.js";
|
|
100
117
|
import "./components/Navigation/index.js";
|
|
101
|
-
import { n as
|
|
102
|
-
import { t as
|
|
103
|
-
import { n as
|
|
104
|
-
import { n as
|
|
118
|
+
import { n as xn, t as Sn } from "./chunks/BottomSheetModal";
|
|
119
|
+
import { t as Cn } from "./chunks/BottomSheet";
|
|
120
|
+
import { n as wn, t as Tn } from "./chunks/SideSheetModal";
|
|
121
|
+
import { n as En, t as Dn } from "./chunks/SideSheet";
|
|
105
122
|
import "./components/Sheets/index.js";
|
|
106
|
-
import { n as
|
|
107
|
-
import { t as
|
|
108
|
-
import { t as
|
|
109
|
-
import { t as
|
|
110
|
-
import { t as
|
|
111
|
-
import { t as
|
|
123
|
+
import { n as On, r as kn, t as An } from "./chunks/Snackbar";
|
|
124
|
+
import { t as jn } from "./chunks/Tab";
|
|
125
|
+
import { t as Mn } from "./chunks/TabList";
|
|
126
|
+
import { t as Nn } from "./chunks/TabPanel";
|
|
127
|
+
import { t as Pn } from "./chunks/TabPanels";
|
|
128
|
+
import { t as Fn } from "./chunks/Tabs";
|
|
112
129
|
import "./components/Tabs/index.js";
|
|
113
|
-
import { n as
|
|
114
|
-
import * as
|
|
115
|
-
|
|
116
|
-
var
|
|
130
|
+
import { n as In, t as Ln } from "./chunks/Toolbar";
|
|
131
|
+
import * as Rn from "zod";
|
|
132
|
+
import './assets/index.css';//#region src/utils/form/form.ts
|
|
133
|
+
var zn = (e, t) => {
|
|
117
134
|
let n = Object.fromEntries(new FormData(e)), r = t.safeParse(n);
|
|
118
135
|
return r.success ? {
|
|
119
136
|
success: !0,
|
|
120
137
|
data: r.data
|
|
121
138
|
} : {
|
|
122
139
|
success: !1,
|
|
123
|
-
errors:
|
|
140
|
+
errors: Rn.flattenError(r.error).fieldErrors
|
|
124
141
|
};
|
|
125
|
-
},
|
|
142
|
+
}, $ = {
|
|
143
|
+
"gradient-ambient-primary": "_gradient-ambient-primary_1aada_6",
|
|
144
|
+
"gradient-ambient-secondary": "_gradient-ambient-secondary_1aada_26",
|
|
145
|
+
"gradient-ambient-tertiary": "_gradient-ambient-tertiary_1aada_46",
|
|
146
|
+
"gradient-ambient-alt": "_gradient-ambient-alt_1aada_66",
|
|
147
|
+
"gradient-glow-primary": "_gradient-glow-primary_1aada_90",
|
|
148
|
+
"gradient-glow-secondary": "_gradient-glow-secondary_1aada_111",
|
|
149
|
+
"gradient-glow-tertiary": "_gradient-glow-tertiary_1aada_132",
|
|
150
|
+
"gradient-glow-alt": "_gradient-glow-alt_1aada_153",
|
|
151
|
+
"gradient-corner-primary": "_gradient-corner-primary_1aada_178",
|
|
152
|
+
"gradient-corner-secondary": "_gradient-corner-secondary_1aada_200",
|
|
153
|
+
"gradient-corner-tertiary": "_gradient-corner-tertiary_1aada_222",
|
|
154
|
+
"gradient-corner-alt": "_gradient-corner-alt_1aada_248",
|
|
155
|
+
"gradient-luster-soft": "_gradient-luster-soft_1aada_274",
|
|
156
|
+
"gradient-luster-metallic": "_gradient-luster-metallic_1aada_284",
|
|
157
|
+
"gradient-luster-deep": "_gradient-luster-deep_1aada_295"
|
|
158
|
+
}, Bn = {
|
|
159
|
+
AmbientPrimary: $["gradient-ambient-primary"],
|
|
160
|
+
AmbientSecondary: $["gradient-ambient-secondary"],
|
|
161
|
+
AmbientTertiary: $["gradient-ambient-tertiary"],
|
|
162
|
+
AmbientAlt: $["gradient-ambient-alt"],
|
|
163
|
+
GlowPrimary: $["gradient-glow-primary"],
|
|
164
|
+
GlowSecondary: $["gradient-glow-secondary"],
|
|
165
|
+
GlowTertiary: $["gradient-glow-tertiary"],
|
|
166
|
+
GlowAlt: $["gradient-glow-alt"],
|
|
167
|
+
CornerPrimary: $["gradient-corner-primary"],
|
|
168
|
+
CornerSecondary: $["gradient-corner-secondary"],
|
|
169
|
+
CornerTertiary: $["gradient-corner-tertiary"],
|
|
170
|
+
CornerAlt: $["gradient-corner-alt"],
|
|
171
|
+
LusterSoft: $["gradient-luster-soft"],
|
|
172
|
+
LusterMetallic: $["gradient-luster-metallic"],
|
|
173
|
+
LusterDeep: $["gradient-luster-deep"]
|
|
174
|
+
}, Vn = {
|
|
126
175
|
displayLarge: "typography-display-large-fluid",
|
|
127
176
|
displayMedium: "typography-display-medium-fluid",
|
|
128
177
|
displaySmall: "typography-display-small-fluid",
|
|
@@ -131,6 +180,6 @@ var vn = (e, t) => {
|
|
|
131
180
|
headlineSmall: "typography-headline-small-fluid"
|
|
132
181
|
};
|
|
133
182
|
//#endregion
|
|
134
|
-
export {
|
|
183
|
+
export { Te as ActionDialog, Rt as ActiveTrackStyles, f as AppBar, ce as AppBarAction, le as AppBarAvatar, c as AppBarContext, ue as AppBarHeadline, l as AppBarHeadlineBlockSize, u as AppBarHeadlineTypography, e as AppBarState, t as AppBarStateContext, Ze as AvatarSize, Cn as BottomSheet, xn as BottomSheetContext, Sn as BottomSheetModal, U as Button, y as ButtonCore, P as ButtonGroup, A as ButtonGroupContext, x as ButtonIconSizeMapping, _ as ButtonLabelTextMapping, b as ButtonReset, w as ButtonSizeBase, de as Calendar, pe as Card, ge as CardIcon, he as CardIconSize, Bt as CenteredSlider, Ie as Checkbox, Le as CheckboxGroup, et as ComboBox, tt as ComboBoxPopover, nt as ComboBoxTrigger, E as ConnectedButton, F as ConnectedButtonGroup, j as ConnectedButtonGroupContext, Ve as DateField, Ke as DatePicker, qe as DateRangePicker, Re as Description, we as Dialog, ye as DialogBodyTypography, be as DialogContext, xe as DialogHeadlineTypography, Se as DialogIconSize, Ae as Disclosure, je as DisclosureGroup, Me as DisclosureHeader, Ne as DisclosurePanel, Oe as DisclosureTypographyContext, Pe as Divider, ze as FieldError, _e as GridBackgroundDecorator, p as Icon, W as IconButton, D as IconButtonIconSizeMapping, Fe as Image, Pt as InactiveTrackStyles, We as Input, Ue as InputButton, Be as Label, G as LinkButton, K as LinkIconButton, Kt as ListAvatar, qt as ListBox, Jt as ListIcon, Yt as ListItem, Xt as ListLabelText, nn as ListMedia, rn as ListMediaImageHeight, $t as ListMediaImageWidth, tn as ListMediaLargeVideoHeight, Qt as ListMediaLargeVideoWidth, Zt as ListMediaVideoHeight, en as ListMediaVideoWidth, an as ListOverlineText, on as ListSupportingText, m as Loader, gt as Menu, pt as MenuBaseLayout, _t as MenuItem, at as MenuItemIconSize, mt as MenuItemLeadingStyles, lt as MenuItemStyles, ft as MenuItemTrailingStyles, vt as MenuPopover, yt as MenuSection, bt as MenuSectionHeader, st as MenuSectionHeaderStyles, it as MenuSectionStyles, xt as MenuShortcut, ut as MenuStyles, St as MenuTrailingText, Ct as MenuTrigger, Ee as Modal, De as ModalOverlay, mn as Navigation, hn as NavigationButton, dn as NavigationContext, gn as NavigationLink, fn as NavigationRenderingContext, _n as NavigationSection, vn as NavigationSectionLabel, sn as NavigationState, cn as NavigationStateContext, me as PaddingBetweenCards, He as Popover, ve as RadialGlowDecorator, Je as Radio, Ye as RadioGroup, fe as RangeCalendar, Vt as RangeSlider, I as RichTooltip, L as RichTooltipActions, R as RichTooltipInfo, z as RichTooltipSubhead, B as RichTooltipText, Xe as SearchField, rt as Select, Tt as SelectItem, Et as SelectList, Dt as SelectListSection, Ot as SelectListSectionHeader, kt as SelectPopover, At as SelectTrigger, Dn as SideSheet, wn as SideSheetContext, En as SideSheetDialog, Tn as SideSheetModal, Ht as Slider, Mt as SliderColors, zt as SliderOutput, Nt as SliderSizeStyles, jt as SliderStyles, On as SnackbarQueueContext, An as SnackbarRegion, h as Splash, re as SplitButton, ie as SplitButtonPrimary, Z as SplitButtonPrimaryBase, ae as SplitButtonTrigger, Y as SplitButtonTriggerBase, X as SplitButtonTriggerIconSize, J as SplitButtonVariantBase, yn as SubNavigation, bn as SubNavigationTrigger, wt as SubmenuPopover, Ut as Switch, jn as Tab, Mn as TabList, Nn as TabPanel, Pn as TabPanels, Fn as Tabs, $e as Tag, Qe as TagIconSize, te as TapTarget, ee as TapTargetBefore, Wt as TextArea, i as ThemeProvider, o as ThemeSelector, Gt as TimeField, oe as ToggleButton, se as ToggleIconButton, In as Toolbar, Ln as ToolbarToggleButtonGroup, V as Tooltip, H as TooltipTrigger, Ft as TrackContainerStyles, Lt as TrackStyles, It as VisualTrackStyles, ne as buildThemeString, S as buttonColorBase, k as buttonColorConfig, v as buttonSizeConfig, Vn as fluidTypography, n as getScrollProgress, r as getScrollTopFromProgress, Bn as gradientStyles, ht as menuBaseColor, Q as menuColorConfig, ot as menuItemBaseColor, dt as menuItemLabelColor, ct as menuLayoutConfig, T as newButtonBaseDataAttrs, q as splitButtonSizeConfig, s as typography, d as useAppBarContext, C as useButtonConfig, M as useButtonGroupContext, N as useConnectedButtonGroupContext, Ge as useControllableState, ke as useDisclosureTypographyContext, Ce as useInDialog, pn as useNavigationContainer, un as useNavigationContext, ln as useNavigationState, kn as useSnackbarQueue, g as useSplash, a as useTheme, zn as validateAndGetFormValues, O as withTooltip };
|
|
135
184
|
|
|
136
185
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/utils/form/form.ts","../src/utils/typography/fluid.ts"],"sourcesContent":["import * as z from \"zod\";\n\ninterface FormValidateSuccessResult<T> {\n success: true;\n data: T;\n}\n\ninterface FormValidateFailureResult<T> {\n success: false;\n errors: Partial<Record<keyof T, string | string[]>>;\n}\n\ntype FormValidateResult<T> =\n | FormValidateSuccessResult<T>\n | FormValidateFailureResult<T>;\n\nexport type ValidateAndGetFormValues = <T extends z.ZodTypeAny>(\n formElement: HTMLFormElement,\n schema: T\n) => FormValidateResult<z.infer<T>>;\n\nexport const validateAndGetFormValues: ValidateAndGetFormValues = (\n formElement,\n schema\n) => {\n const valueObject = Object.fromEntries(new FormData(formElement));\n const result = schema.safeParse(valueObject);\n if (result.success) {\n return {\n success: true,\n data: result.data,\n };\n }\n\n return {\n success: false,\n errors: z.flattenError(result.error).fieldErrors,\n };\n};\n","export const fluidTypography = {\n displayLarge: \"typography-display-large-fluid\",\n displayMedium: \"typography-display-medium-fluid\",\n displaySmall: \"typography-display-small-fluid\",\n\n headlineLarge: \"typography-headline-large-fluid\",\n headlineMedium: \"typography-headline-medium-fluid\",\n headlineSmall: \"typography-headline-small-fluid\",\n} as const;\n\nexport type FluidTypographyVariant =\n (typeof fluidTypography)[keyof typeof fluidTypography];\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,IAAa,MACT,GACA,MACC;CACD,IAAM,IAAc,OAAO,YAAY,IAAI,SAAS,CAAW,CAAC,GAC1D,IAAS,EAAO,UAAU,CAAW;CAQ3C,OAPI,EAAO,UACA;EACH,SAAS;EACT,MAAM,EAAO;CACjB,IAGG;EACH,SAAS;EACT,QAAQ,GAAE,aAAa,EAAO,KAAK,CAAC,CAAC;CACzC;AACJ,GCtCa,KAAkB;CAC3B,cAAc;CACd,eAAe;CACf,cAAc;CAEd,eAAe;CACf,gBAAgB;CAChB,eAAe;AACnB"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/utils/form/form.ts","../src/utils/gradients/gradients.module.css","../src/utils/gradients/gradients.ts","../src/utils/typography/fluid.ts"],"sourcesContent":["import * as z from \"zod\";\n\ninterface FormValidateSuccessResult<T> {\n success: true;\n data: T;\n}\n\ninterface FormValidateFailureResult<T> {\n success: false;\n errors: Partial<Record<keyof T, string | string[]>>;\n}\n\ntype FormValidateResult<T> =\n | FormValidateSuccessResult<T>\n | FormValidateFailureResult<T>;\n\nexport type ValidateAndGetFormValues = <T extends z.ZodTypeAny>(\n formElement: HTMLFormElement,\n schema: T\n) => FormValidateResult<z.infer<T>>;\n\nexport const validateAndGetFormValues: ValidateAndGetFormValues = (\n formElement,\n schema\n) => {\n const valueObject = Object.fromEntries(new FormData(formElement));\n const result = schema.safeParse(valueObject);\n if (result.success) {\n return {\n success: true,\n data: result.data,\n };\n }\n\n return {\n success: false,\n errors: z.flattenError(result.error).fieldErrors,\n };\n};\n","@layer adgytec.comps {\n /* ==========================================================================\n 1. Ambient Diagonal Gradients (Soft Color Wash)\n ========================================================================== */\n\n .gradient-ambient-primary {\n background-color: var(--md-sys-color-surface-container-low);\n color: var(--md-sys-color-on-surface);\n background-image: linear-gradient(\n 135deg,\n color-mix(\n in srgb,\n var(--md-sys-color-primary) 10%,\n var(--md-sys-color-surface-container-low)\n )\n 0%,\n color-mix(\n in srgb,\n var(--md-sys-color-secondary) 7%,\n var(--md-sys-color-surface-container-low)\n )\n 100%\n );\n }\n\n .gradient-ambient-secondary {\n background-color: var(--md-sys-color-surface-container-low);\n color: var(--md-sys-color-on-surface);\n background-image: linear-gradient(\n 135deg,\n color-mix(\n in srgb,\n var(--md-sys-color-secondary) 10%,\n var(--md-sys-color-surface-container-low)\n )\n 0%,\n color-mix(\n in srgb,\n var(--md-sys-color-tertiary) 7%,\n var(--md-sys-color-surface-container-low)\n )\n 100%\n );\n }\n\n .gradient-ambient-tertiary {\n background-color: var(--md-sys-color-surface-container-low);\n color: var(--md-sys-color-on-surface);\n background-image: linear-gradient(\n 135deg,\n color-mix(\n in srgb,\n var(--md-sys-color-tertiary) 10%,\n var(--md-sys-color-surface-container-low)\n )\n 0%,\n color-mix(\n in srgb,\n var(--md-extended-color-primary-alt-color) 7%,\n var(--md-sys-color-surface-container-low)\n )\n 100%\n );\n }\n\n .gradient-ambient-alt {\n background-color: var(--md-sys-color-surface-container-low);\n color: var(--md-sys-color-on-surface);\n background-image: linear-gradient(\n 135deg,\n color-mix(\n in srgb,\n var(--md-extended-color-primary-alt-color) 10%,\n var(--md-sys-color-surface-container-low)\n )\n 0%,\n color-mix(\n in srgb,\n var(--md-sys-color-primary) 7%,\n var(--md-sys-color-surface-container-low)\n )\n 100%\n );\n }\n\n /* ==========================================================================\n 2. Split Tint Top-Glow (Vertical Accent)\n ========================================================================== */\n\n .gradient-glow-primary {\n background-color: var(--md-sys-color-surface-container-low);\n color: var(--md-sys-color-on-surface);\n background-image: linear-gradient(\n 180deg,\n color-mix(\n in srgb,\n var(--md-sys-color-primary) 12%,\n var(--md-sys-color-surface-container-low)\n )\n 0%,\n color-mix(\n in srgb,\n var(--md-sys-color-primary) 3%,\n var(--md-sys-color-surface-container-low)\n )\n 45%,\n var(--md-sys-color-surface-container-low) 100%\n );\n }\n\n .gradient-glow-secondary {\n background-color: var(--md-sys-color-surface-container-low);\n color: var(--md-sys-color-on-surface);\n background-image: linear-gradient(\n 180deg,\n color-mix(\n in srgb,\n var(--md-sys-color-secondary) 12%,\n var(--md-sys-color-surface-container-low)\n )\n 0%,\n color-mix(\n in srgb,\n var(--md-sys-color-secondary) 3%,\n var(--md-sys-color-surface-container-low)\n )\n 45%,\n var(--md-sys-color-surface-container-low) 100%\n );\n }\n\n .gradient-glow-tertiary {\n background-color: var(--md-sys-color-surface-container-low);\n color: var(--md-sys-color-on-surface);\n background-image: linear-gradient(\n 180deg,\n color-mix(\n in srgb,\n var(--md-sys-color-tertiary) 12%,\n var(--md-sys-color-surface-container-low)\n )\n 0%,\n color-mix(\n in srgb,\n var(--md-sys-color-tertiary) 3%,\n var(--md-sys-color-surface-container-low)\n )\n 45%,\n var(--md-sys-color-surface-container-low) 100%\n );\n }\n\n .gradient-glow-alt {\n background-color: var(--md-sys-color-surface-container-low);\n color: var(--md-sys-color-on-surface);\n background-image: linear-gradient(\n 180deg,\n color-mix(\n in srgb,\n var(--md-extended-color-primary-alt-color) 12%,\n var(--md-sys-color-surface-container-low)\n )\n 0%,\n color-mix(\n in srgb,\n var(--md-extended-color-primary-alt-color) 3%,\n var(--md-sys-color-surface-container-low)\n )\n 45%,\n var(--md-sys-color-surface-container-low) 100%\n );\n }\n\n /* ==========================================================================\n 3. Corner Radial Glows (Soft Blend)\n ========================================================================== */\n\n .gradient-corner-primary {\n background-color: var(--md-sys-color-surface-container-low);\n color: var(--md-sys-color-on-surface);\n background-image:\n radial-gradient(\n circle at 0% 0%,\n color-mix(in srgb, var(--md-sys-color-primary) 11%, transparent)\n 0%,\n transparent 70%\n ),\n radial-gradient(\n circle at 100% 100%,\n color-mix(\n in srgb,\n var(--md-sys-color-secondary) 8%,\n transparent\n )\n 0%,\n transparent 70%\n );\n }\n\n .gradient-corner-secondary {\n background-color: var(--md-sys-color-surface-container-low);\n color: var(--md-sys-color-on-surface);\n background-image:\n radial-gradient(\n circle at 0% 0%,\n color-mix(\n in srgb,\n var(--md-sys-color-secondary) 11%,\n transparent\n )\n 0%,\n transparent 70%\n ),\n radial-gradient(\n circle at 100% 100%,\n color-mix(in srgb, var(--md-sys-color-tertiary) 8%, transparent)\n 0%,\n transparent 70%\n );\n }\n\n .gradient-corner-tertiary {\n background-color: var(--md-sys-color-surface-container-low);\n color: var(--md-sys-color-on-surface);\n background-image:\n radial-gradient(\n circle at 0% 0%,\n color-mix(\n in srgb,\n var(--md-sys-color-tertiary) 11%,\n transparent\n )\n 0%,\n transparent 70%\n ),\n radial-gradient(\n circle at 100% 100%,\n color-mix(\n in srgb,\n var(--md-extended-color-primary-alt-color) 8%,\n transparent\n )\n 0%,\n transparent 70%\n );\n }\n\n .gradient-corner-alt {\n background-color: var(--md-sys-color-surface-container-low);\n color: var(--md-sys-color-on-surface);\n background-image:\n radial-gradient(\n circle at 0% 0%,\n color-mix(\n in srgb,\n var(--md-extended-color-primary-alt-color) 11%,\n transparent\n )\n 0%,\n transparent 70%\n ),\n radial-gradient(\n circle at 100% 100%,\n color-mix(in srgb, var(--md-sys-color-primary) 8%, transparent)\n 0%,\n transparent 70%\n );\n }\n\n /* ==========================================================================\n 4. Monochromatic Surface Lusters (Colorless)\n ========================================================================== */\n\n .gradient-luster-soft {\n background-color: var(--md-sys-color-surface-container-low);\n color: var(--md-sys-color-on-surface);\n background-image: linear-gradient(\n 135deg,\n var(--md-sys-color-surface-container) 0%,\n var(--md-sys-color-surface-container-low) 100%\n );\n }\n\n .gradient-luster-metallic {\n background-color: var(--md-sys-color-surface-container-low);\n color: var(--md-sys-color-on-surface);\n background-image: linear-gradient(\n 135deg,\n var(--md-sys-color-surface-bright) 0%,\n var(--md-sys-color-surface-container) 50%,\n var(--md-sys-color-surface-container-low) 100%\n );\n }\n\n .gradient-luster-deep {\n background-color: var(--md-sys-color-surface-container-low);\n color: var(--md-sys-color-on-surface);\n background-image: linear-gradient(\n 145deg,\n var(--md-sys-color-surface-container-high) 0%,\n var(--md-sys-color-surface-container) 60%,\n var(--md-sys-color-surface-container-lowest) 100%\n );\n }\n}\n","import styles from \"./gradients.module.css\";\n\nexport const gradientStyles = {\n // 1. Ambient Diagonal Gradients (Very Low Opacity)\n AmbientPrimary: styles[\"gradient-ambient-primary\"],\n AmbientSecondary: styles[\"gradient-ambient-secondary\"],\n AmbientTertiary: styles[\"gradient-ambient-tertiary\"],\n AmbientAlt: styles[\"gradient-ambient-alt\"],\n\n // 2. Split Tint Top-Glow (Vertical Accent)\n GlowPrimary: styles[\"gradient-glow-primary\"],\n GlowSecondary: styles[\"gradient-glow-secondary\"],\n GlowTertiary: styles[\"gradient-glow-tertiary\"],\n GlowAlt: styles[\"gradient-glow-alt\"],\n\n // 3. Subtle Corner Radial Glows\n CornerPrimary: styles[\"gradient-corner-primary\"],\n CornerSecondary: styles[\"gradient-corner-secondary\"],\n CornerTertiary: styles[\"gradient-corner-tertiary\"],\n CornerAlt: styles[\"gradient-corner-alt\"],\n\n // 4. Monochromatic Surface Lusters (Colorless)\n LusterSoft: styles[\"gradient-luster-soft\"],\n LusterMetallic: styles[\"gradient-luster-metallic\"],\n LusterDeep: styles[\"gradient-luster-deep\"],\n} as const;\n","export const fluidTypography = {\n displayLarge: \"typography-display-large-fluid\",\n displayMedium: \"typography-display-medium-fluid\",\n displaySmall: \"typography-display-small-fluid\",\n\n headlineLarge: \"typography-headline-large-fluid\",\n headlineMedium: \"typography-headline-medium-fluid\",\n headlineSmall: \"typography-headline-small-fluid\",\n} as const;\n\nexport type FluidTypographyVariant =\n (typeof fluidTypography)[keyof typeof fluidTypography];\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,IAAa,MACT,GACA,MACC;CACD,IAAM,IAAc,OAAO,YAAY,IAAI,SAAS,CAAW,CAAC,GAC1D,IAAS,EAAO,UAAU,CAAW;CAQ3C,OAPI,EAAO,UACA;EACH,SAAS;EACT,MAAM,EAAO;CACjB,IAGG;EACH,SAAS;EACT,QAAQ,GAAE,aAAa,EAAO,KAAK,CAAC,CAAC;CACzC;AACJ;;;;;;;;;;;;;;;;GEpCa,KAAiB;CAE1B,gBAAgB,EAAO;CACvB,kBAAkB,EAAO;CACzB,iBAAiB,EAAO;CACxB,YAAY,EAAO;CAGnB,aAAa,EAAO;CACpB,eAAe,EAAO;CACtB,cAAc,EAAO;CACrB,SAAS,EAAO;CAGhB,eAAe,EAAO;CACtB,iBAAiB,EAAO;CACxB,gBAAgB,EAAO;CACvB,WAAW,EAAO;CAGlB,YAAY,EAAO;CACnB,gBAAgB,EAAO;CACvB,YAAY,EAAO;AACvB,GCzBa,KAAkB;CAC3B,cAAc;CACd,eAAe;CACf,cAAc;CAEd,eAAe;CACf,gBAAgB;CAChB,eAAe;AACnB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const gradientStyles: {
|
|
2
|
+
readonly AmbientPrimary: string;
|
|
3
|
+
readonly AmbientSecondary: string;
|
|
4
|
+
readonly AmbientTertiary: string;
|
|
5
|
+
readonly AmbientAlt: string;
|
|
6
|
+
readonly GlowPrimary: string;
|
|
7
|
+
readonly GlowSecondary: string;
|
|
8
|
+
readonly GlowTertiary: string;
|
|
9
|
+
readonly GlowAlt: string;
|
|
10
|
+
readonly CornerPrimary: string;
|
|
11
|
+
readonly CornerSecondary: string;
|
|
12
|
+
readonly CornerTertiary: string;
|
|
13
|
+
readonly CornerAlt: string;
|
|
14
|
+
readonly LusterSoft: string;
|
|
15
|
+
readonly LusterMetallic: string;
|
|
16
|
+
readonly LusterDeep: string;
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './gradients';
|
package/dist/utils/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { createContext as e, useCallback as t, useContext as n, useRef as r, useState as i } from "react";
|
|
2
|
-
import { jsx as a } from "react/jsx-runtime";
|
|
3
|
-
//#region src/utils/scroll/scroll.ts
|
|
4
|
-
function o({ scrollHeight: e, scrollTop: t, clientHeight: n }) {
|
|
5
|
-
let r = e - n;
|
|
6
|
-
return r <= 0 ? 0 : t / r;
|
|
7
|
-
}
|
|
8
|
-
function s({ scrollHeight: e, progress: t, clientHeight: n }) {
|
|
9
|
-
return t * (e - n);
|
|
10
|
-
}
|
|
11
|
-
//#endregion
|
|
12
|
-
//#region src/components/Navigation/NavigationState/context.ts
|
|
13
|
-
var c = e(null);
|
|
14
|
-
function l() {
|
|
15
|
-
let e = n(c);
|
|
16
|
-
if (e === null) throw Error("Missing navigation state. Ensure this component is rendered within Navigation component.");
|
|
17
|
-
return e;
|
|
18
|
-
}
|
|
19
|
-
//#endregion
|
|
20
|
-
//#region src/components/Navigation/NavigationState/NavigationState.tsx
|
|
21
|
-
var u = ({ children: e }) => {
|
|
22
|
-
let [n, o] = i([]), l = r({}), u = r({}), d = t((e, t) => {
|
|
23
|
-
let n = l.current[e] ?? 0;
|
|
24
|
-
return t.scrollTop = s({
|
|
25
|
-
scrollHeight: t.scrollHeight,
|
|
26
|
-
clientHeight: t.clientHeight,
|
|
27
|
-
progress: n
|
|
28
|
-
}), u.current[e] ??= /* @__PURE__ */ new Set(), u.current[e].add(t), () => {
|
|
29
|
-
u.current[e]?.delete(t), u.current[e]?.size === 0 && delete u.current[e];
|
|
30
|
-
};
|
|
31
|
-
}, []);
|
|
32
|
-
return /* @__PURE__ */ a(c, {
|
|
33
|
-
value: {
|
|
34
|
-
openSubNavigation: t((e, t) => {
|
|
35
|
-
o((n) => [...n.filter((e) => e.depth < t), {
|
|
36
|
-
id: e,
|
|
37
|
-
depth: t
|
|
38
|
-
}]);
|
|
39
|
-
}, []),
|
|
40
|
-
closeSubNavigation: t((e) => {
|
|
41
|
-
let t = n.find((t) => t.id === e);
|
|
42
|
-
if (!t) return;
|
|
43
|
-
let r = n.filter((e) => e.depth >= t.depth);
|
|
44
|
-
for (let e of r) delete l.current[e.id];
|
|
45
|
-
o((e) => e.filter((e) => e.depth < t.depth));
|
|
46
|
-
}, [n]),
|
|
47
|
-
saveNavigationScrollTopProgress: t((e, t) => {
|
|
48
|
-
l.current[e] = t;
|
|
49
|
-
let n = u.current[e];
|
|
50
|
-
if (n) for (let e of n) {
|
|
51
|
-
let n = s({
|
|
52
|
-
scrollHeight: e.scrollHeight,
|
|
53
|
-
clientHeight: e.clientHeight,
|
|
54
|
-
progress: t
|
|
55
|
-
});
|
|
56
|
-
Math.abs(e.scrollTop - n) > 1 && (e.scrollTop = n);
|
|
57
|
-
}
|
|
58
|
-
}, []),
|
|
59
|
-
registerNavigationContainer: d,
|
|
60
|
-
isSubNavigationOpen: t((e) => n.some((t) => t.id === e), [n]),
|
|
61
|
-
isInert: t((e) => e < (n[n.length - 1]?.depth ?? 0), [n])
|
|
62
|
-
},
|
|
63
|
-
children: e
|
|
64
|
-
});
|
|
65
|
-
};
|
|
66
|
-
//#endregion
|
|
67
|
-
export { s as a, o as i, c as n, l as r, u as t };
|
|
68
|
-
|
|
69
|
-
//# sourceMappingURL=NavigationState.map
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|